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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5a57dcf7e33158939250ecc06ce053d8a7a3e3a | 140,739 | py | Python | sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 35.87535 | 165 | 0.636043 |
d5a589539760f2e15cbade78f82b446a61a80546 | 2,520 | py | Python | sdk/batchai/azure-mgmt-batchai/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/batchai/azure-mgmt-batchai/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | sdk/batchai/azure-mgmt-batchai/setup.py | jkeech/azure-sdk-for-python | ab2b0ea3ef7528900a2f2e27cc7deda440b53f70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.054054 | 91 | 0.604365 |
d5a58dfd7135fcc812d75175f0c52f2cec0f8551 | 28,446 | py | Python | vnpy/app/cta_strategy/engine.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 323 | 2015-11-21T14:45:29.000Z | 2022-03-16T08:54:37.000Z | vnpy/app/cta_strategy/engine.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 9 | 2017-03-21T08:26:21.000Z | 2021-08-23T06:41:17.000Z | vnpy/app/cta_strategy/engine.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | 148 | 2016-09-26T03:25:39.000Z | 2022-02-06T14:43:48.000Z | """"""
import importlib
import os
import traceback
from collections import defaultdict
from pathlib import Path
from typing import Any, Callable
from datetime import datetime, timedelta
from concurrent.futures import ThreadPoolExecutor
from copy import copy
from logging import INFO
from vnpy.event import Event, Event... | 30.785714 | 110 | 0.595936 |
d5a596cdbbff0ef4c17b629e083b5fd022711671 | 429 | py | Python | mlm/apps/authentication/tokens.py | pierreclaverkoko/django-mlm-system | abfd895003b1ab59c6d0bfb4a06051ac6e4ca90f | [
"MIT"
] | null | null | null | mlm/apps/authentication/tokens.py | pierreclaverkoko/django-mlm-system | abfd895003b1ab59c6d0bfb4a06051ac6e4ca90f | [
"MIT"
] | null | null | null | mlm/apps/authentication/tokens.py | pierreclaverkoko/django-mlm-system | abfd895003b1ab59c6d0bfb4a06051ac6e4ca90f | [
"MIT"
] | 1 | 2020-06-09T09:16:57.000Z | 2020-06-09T09:16:57.000Z | from django.contrib.auth.tokens import PasswordResetTokenGenerator
from django.utils import six
class AccountActivationTokenGenerator(PasswordResetTokenGenerator):
def _make_hash_value(self, user, timestamp):
return (
six.text_type(user.pk)
+ six.text_type(timestamp)
+ ... | 28.6 | 67 | 0.731935 |
d5a5a5b3b5a96e7890c08197f44591c7420f8c58 | 3,866 | py | Python | embiggen/edge_prediction/edge_prediction_sklearn/decision_tree_edge_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 2 | 2020-01-30T11:57:37.000Z | 2020-05-02T00:05:49.000Z | embiggen/edge_prediction/edge_prediction_sklearn/decision_tree_edge_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 93 | 2020-01-26T00:43:51.000Z | 2020-05-10T03:29:54.000Z | embiggen/edge_prediction/edge_prediction_sklearn/decision_tree_edge_prediction.py | monarch-initiative/N2V | 8ae02ca125f1d24ca158c2849f2d9bb1711920b9 | [
"BSD-3-Clause"
] | 5 | 2020-02-13T07:18:11.000Z | 2020-03-19T08:03:34.000Z | """Submodule wrapping Decision Tree for edge prediction."""
from typing import Dict, Any
from sklearn.tree import DecisionTreeClassifier
from embiggen.edge_prediction.edge_prediction_sklearn.sklearn_edge_prediction_adapter import SklearnEdgePredictionAdapter
class DecisionTreeEdgePrediction(SklearnEdgePredictionAdapt... | 39.44898 | 126 | 0.651061 |
d5a5a666ca6b32b4c518a58fc13dcbdab7f3aabb | 923 | py | Python | lib/stages/washington_battle.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | null | null | null | lib/stages/washington_battle.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | 1 | 2017-04-12T15:16:20.000Z | 2017-04-12T15:16:20.000Z | lib/stages/washington_battle.py | brunitto/python-runner | 6d52feb45fb7b32a32a2c26324fb9345f5e9f330 | [
"MIT"
] | null | null | null | """washington_battle.py"""
from lib.stage import Stage
class WashingtonBattle(Stage):
"""Washington Battle stage"""
def desc(self):
"""Describe action"""
action = """
In the heat of the riot, a really big and bearded guy, riding a noisy
motorcyle rushes over you, swinging a chain in fire...... | 25.638889 | 77 | 0.666306 |
d5a5b7560d7b8d6d1b3df7f34d6b3da93092c12c | 13,871 | py | Python | rally/plugins/openstack/scenarios/heat/utils.py | LorenzoBianconi/rally | 2bbd7ee590cca048fb4ad6a8eefc484989979ff8 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:09.000Z | 2021-09-29T02:16:09.000Z | rally/plugins/openstack/scenarios/heat/utils.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-14T11:29:31.000Z | 2020-07-14T11:29:31.000Z | rally/plugins/openstack/scenarios/heat/utils.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-02T01:33:48.000Z | 2020-07-02T01:33:48.000Z | # Copyright 2014: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 39.859195 | 79 | 0.612429 |
d5a5d86cf66ebef37e9e34d4f8cd8e78ef77a126 | 4,664 | py | Python | tests/test_model.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | tests/test_model.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | tests/test_model.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
test_model
~~~~~~~~~~~~~~
Model test cases.
:copyright: (c) 2021 by weiminfeng.
:date: 2021/8/10
"""
import json
from datetime import datetime
from typing import List, Dict, ForwardRef
import pytest
from pyseed import SimpleEnum, DATETIME_FORMAT, MongoModel, BaseMode... | 25.767956 | 107 | 0.613422 |
d5a5dc5450d511c273342723d45d6c17da703b03 | 2,867 | py | Python | annodize/_func_fields.py | NowanIlfideme/annodize | d31f68b62f473990a43334ef50a0a176847b1f7a | [
"MIT"
] | null | null | null | annodize/_func_fields.py | NowanIlfideme/annodize | d31f68b62f473990a43334ef50a0a176847b1f7a | [
"MIT"
] | null | null | null | annodize/_func_fields.py | NowanIlfideme/annodize | d31f68b62f473990a43334ef50a0a176847b1f7a | [
"MIT"
] | null | null | null | """Field collection for functions."""
from inspect import Signature
from typing import Annotated, Callable, Sequence
from ._field import Field
from ._repr import repr_sig
class FunctionFields(object):
"""A set of fields for a function/callable. All attributes are read-only.
Attributes
----------
in... | 32.579545 | 96 | 0.638995 |
d5a5e00a0986f47272dedb2ff2a850d8b6f0ed97 | 144 | py | Python | main.py | penny-poo/SimPylSweeper | d695fce6ff3da9f5cfc0252c77b9b201a7e71557 | [
"MIT"
] | null | null | null | main.py | penny-poo/SimPylSweeper | d695fce6ff3da9f5cfc0252c77b9b201a7e71557 | [
"MIT"
] | null | null | null | main.py | penny-poo/SimPylSweeper | d695fce6ff3da9f5cfc0252c77b9b201a7e71557 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Running main.py script will launch minesweeper.
"""
import gui
if __name__ == "__main__":
gui.play()
| 14.4 | 48 | 0.583333 |
d5a5e45d386e3b1a8770d255924a8b306affb34c | 4,068 | py | Python | test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/multiapi/Expected/AcceptanceTests/MultiapiCustomBaseUrl/multiapicustombaseurl/v2/operations/_multiapi_custom_base_url_service_client_operations.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 36.981818 | 133 | 0.654621 |
d5a5f3c57c605fe19f17a8d518c5a43f00885b8b | 286 | py | Python | src/api/endpoints/roles/models.py | andela/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 1 | 2018-09-13T16:33:20.000Z | 2018-09-13T16:33:20.000Z | src/api/endpoints/roles/models.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 6 | 2019-03-11T17:50:27.000Z | 2019-08-26T11:00:40.000Z | src/api/endpoints/roles/models.py | jonathankamau/andela-societies-backend | b8382f308449a08e5c7bda46c6deabe597cc2e25 | [
"MIT"
] | 9 | 2019-01-09T12:23:12.000Z | 2021-05-28T04:58:31.000Z | from api.models.base import Base
db = Base.db
class Role(Base):
"""Models Roles to which all Andelans have."""
__tablename__ = 'roles'
users = db.relationship(
'User',
secondary='user_role',
lazy='dynamic',
back_populates='roles'
)
| 15.888889 | 50 | 0.594406 |
d5a60a2c35136f4910cfa6c2528432e2701ea5ef | 976 | py | Python | sdks/python/test/test_DeploymentModification.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_DeploymentModification.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_DeploymentModification.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 24.4 | 103 | 0.733607 |
d5a62e8f43539a23732fbe97ec0770cafa8bba2a | 10,084 | py | Python | keystoneclient/tests/unit/test_s3_token_middleware.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/unit/test_s3_token_middleware.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/keystoneclient/tests/unit/test_s3_token_middleware.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
#
# 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... | 42.369748 | 78 | 0.638933 |
d5a63d14cda79d233af0d52627490d9795ade737 | 4,449 | py | Python | hydrosdk/data/types.py | BulbaWarrior/hydro-serving-sdk | 154ab37034c22c13ef6bded56039f4f23404723d | [
"Apache-2.0"
] | 5 | 2020-02-20T08:53:43.000Z | 2021-02-19T12:00:23.000Z | hydrosdk/data/types.py | Hydrospheredata/hydro-serving-sdk | 94bc4d8335ffe0bf4c90af336656d3e5473952c4 | [
"Apache-2.0"
] | 43 | 2019-09-30T15:23:48.000Z | 2021-05-13T08:06:45.000Z | hydrosdk/data/types.py | BulbaWarrior/hydro-serving-sdk | 154ab37034c22c13ef6bded56039f4f23404723d | [
"Apache-2.0"
] | 6 | 2019-08-27T17:15:45.000Z | 2021-08-10T13:09:21.000Z | import numbers
from enum import Enum
import numpy as np
from hydro_serving_grpc.serving.contract.types_pb2 import (
DT_HALF, DT_FLOAT, DT_DOUBLE, DT_INT8, DT_INT16, DT_INT32, DT_INT64, DT_UINT8,
DT_UINT16, DT_UINT32, DT_UINT64, DT_COMPLEX64, DT_COMPLEX128, DT_BOOL, DT_STRING,
DT_QINT8, DT_QINT16, DT_QINT3... | 25.422857 | 101 | 0.660598 |
d5a63fc8784abe9ecb64a5f74e76276985c42f77 | 388 | py | Python | cmdrjump/migrations/0002_commanderjumpstartentry_count.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | cmdrjump/migrations/0002_commanderjumpstartentry_count.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | 5 | 2021-02-15T20:52:10.000Z | 2021-07-03T18:19:59.000Z | cmdrjump/migrations/0002_commanderjumpstartentry_count.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-05-19 23:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cmdrjump', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='commanderjumpstartentry',
name='count',... | 21.555556 | 49 | 0.603093 |
d5a6550c6bc4511a67358f6caa96bbdb6605569d | 1,846 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/gallery_data_disk_image_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 36.196078 | 79 | 0.619177 |
d5a68f660aadce828c9b8cac0b6ee6abbccd9247 | 13,682 | py | Python | deeppavlov/models/embedders/elmo_embedder.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:33.000Z | 2019-05-22T08:34:33.000Z | deeppavlov/models/embedders/elmo_embedder.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | null | null | null | deeppavlov/models/embedders/elmo_embedder.py | ineersa/DeepPavlov | 8200bf9a0f0b378baad4ee0eb75b59453f516004 | [
"Apache-2.0"
] | 1 | 2019-03-17T13:47:44.000Z | 2019-03-17T13:47:44.000Z | # Copyright 2017 Neural Networks and Deep Learning lab, MIPT
#
# 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.71246 | 120 | 0.605686 |
d5a6a0c9d5cb90b43299852a521fba7bdacc06dd | 3,774 | py | Python | sporco/pgm/stepsize.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | sporco/pgm/stepsize.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | sporco/pgm/stepsize.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2020 by Cristina Garcia-Cardona <cgarciac@lanl.gov>
# Brendt Wohlberg <brendt@ieee.org>
# All rights reserved. BSD 3-clause License.
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file... | 25.849315 | 79 | 0.599364 |
d5a6fcbac008707a6ce5ab2c015c616ad3e7b15c | 12,380 | py | Python | ferrox/model/db/submissions.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 3 | 2017-01-03T20:55:16.000Z | 2022-03-01T15:21:53.000Z | ferrox/model/db/submissions.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | null | null | null | ferrox/model/db/submissions.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 4 | 2017-01-03T20:48:09.000Z | 2022-03-01T15:21:58.000Z | from __future__ import with_statement
import pylons
from ferrox.lib.mimetype import get_mime_type
from ferrox.lib import helpers as h
import ferrox.lib.bbcode_for_fa as bbcode
from sqlalchemy import Column, MetaData, Table, ForeignKey, types, sql
from sqlalchemy.orm import relation
from sqlalchemy.exceptions import ... | 40.457516 | 155 | 0.642326 |
d5a719ba2a1deb1e03b533138a60b65866502575 | 4,228 | py | Python | pybargain_protocol/bargaining_request.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | 1 | 2015-06-30T15:34:41.000Z | 2015-06-30T15:34:41.000Z | pybargain_protocol/bargaining_request.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | null | null | null | pybargain_protocol/bargaining_request.py | LaurentMT/pybargain_protocol | 3b4c6040ec3562ce6921f917c97a9931d5c6e5de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Version: 0.0.1
Python library for the bargaining protocol
'''
from pybargain_protocol import bargaining_pb2
from pybargain_protocol.constants import MAINNET
from pybargain_protocol.exceptions import DeserializationError, SerializationError
from pybargain_protocol.protocol_rules import check_ti... | 35.830508 | 159 | 0.598628 |
d5a730957c2a94c7e9b66477dac2af6b12a24d55 | 1,179 | py | Python | binary_search.py/153_find_min.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | binary_search.py/153_find_min.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | binary_search.py/153_find_min.py | jayzane/leetcodePy | 27fbad4a4a94a60bed6cfa89cbef6ce17fa5e7d5 | [
"Apache-2.0"
] | null | null | null | from typing import *
class Solution:
"""
假设按照升序排序的数组在预先未知的某个点上进行了旋转。
( 例如,数组 [0,1,2,4,5,6,7] 可能变为 [4,5,6,7,0,1,2] )。
请找出其中最小的元素。
你可以假设数组中不存在重复元素。
示例 1:
输入: [3,4,5,1,2]
输出: 1
示例 2:
输入: [4,5,6,7,0,1,2]
输出: 0
"""
def findMin(self, nums: List[int]) -> int:
pass... | 19.016129 | 57 | 0.504665 |
d5a76214c71af6dc4003c34557e147f04e3dd588 | 10,187 | py | Python | Pistone3.py | Novellogiampiero/RaspSources | 57a98b3957426113fa8d1b0b0a75449948af3ca4 | [
"Apache-2.0"
] | null | null | null | Pistone3.py | Novellogiampiero/RaspSources | 57a98b3957426113fa8d1b0b0a75449948af3ca4 | [
"Apache-2.0"
] | null | null | null | Pistone3.py | Novellogiampiero/RaspSources | 57a98b3957426113fa8d1b0b0a75449948af3ca4 | [
"Apache-2.0"
] | null | null | null | #importiamo le librerie per il controllo dell'interfaccia GPIO
import RPi.GPIO as GPIO
import time
import sys
import unittest
#import pydevd
#from datetime import datetime, date, time, timezone
import Analogscan
#import threading
#from datetime import date
#import time
#from pytime import time
import _thread
#import th... | 27.458221 | 153 | 0.567095 |
d5a77442a52343be188d824ae84d3f384dd268d4 | 1,254 | py | Python | src/ram_instructions/ram_instr.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | 3 | 2022-01-26T21:19:06.000Z | 2022-02-02T23:55:54.000Z | src/ram_instructions/ram_instr.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | null | null | null | src/ram_instructions/ram_instr.py | margauxschmied/RAM_language_interpreter | 608d42f76d3a2bb28906cb7664b9f852f9aee805 | [
"MIT"
] | null | null | null | from tkinter import *
from tkhtmlview import HTMLLabel
import sys
def open_ram_instr(parent):
window_instr = Toplevel(parent)
window_instr.title("About")
# Set Geometry
window_instr.geometry("600x600")
# Add label
my_label = HTMLLabel(window_instr, html="""
<i><h2 style="color: red;">RAM... | 39.1875 | 166 | 0.54067 |
d5a785554f32aa24aede30dcf027d5309f5b0039 | 272 | py | Python | github/types/list.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/types/list.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/types/list.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from .object import Object
class List(list):
__slots__ = []
def __str__(self):
# noinspection PyCallByClass
return Object.__str__(self)
def __repr__(self):
return f"github.types.List([{','.join(Object.__repr__(i) for i in self)}])"
| 20.923077 | 83 | 0.632353 |
d5a786b236ea187dc54e0b89be8314748b29bf46 | 778 | py | Python | test/test_scenario_run_search.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | test/test_scenario_run_search.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | test/test_scenario_run_search.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | """
Cosmo Tech Plaform API
Cosmo Tech Platform API # noqa: E501
The version of the OpenAPI document: 0.0.11-SNAPSHOT
Contact: platform@cosmotech.com
Generated by: https://openapi-generator.tech
"""
import sys
import unittest
import cosmotech_api
from cosmotech_api.model.scenario_run_search imp... | 21.027027 | 79 | 0.691517 |
d5a79f029624ddc44a2f59bcd70172e835580b6f | 2,287 | py | Python | preprocessing.py | sales-tagging/text-tagging-ml | 7bf7162119026fcdd08a05edf2d1a107d6c11c02 | [
"MIT"
] | 1 | 2019-04-21T04:47:21.000Z | 2019-04-21T04:47:21.000Z | preprocessing.py | sales-tagging/text-tagging-ml | 7bf7162119026fcdd08a05edf2d1a107d6c11c02 | [
"MIT"
] | null | null | null | preprocessing.py | sales-tagging/text-tagging-ml | 7bf7162119026fcdd08a05edf2d1a107d6c11c02 | [
"MIT"
] | null | null | null | import logging
import argparse
from config import get_config
from dataloader import DataLoader
# Argument parser
parser = argparse.ArgumentParser(description='Pre-Processing PPSS article')
parser.add_argument('--load_from', type=str, help='load DataSet from db or csv', default='db', choices=['db', 'csv'])
parser.add... | 28.5875 | 117 | 0.599913 |
d5a800ad72cb716615ab7700eab08345a06b8323 | 11,995 | py | Python | deepdoctection/extern/tp/tpfrcnn/preproc.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 39 | 2021-12-14T11:05:25.000Z | 2022-03-31T18:50:58.000Z | deepdoctection/extern/tp/tpfrcnn/preproc.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 17 | 2022-01-04T14:32:26.000Z | 2022-03-29T14:01:36.000Z | deepdoctection/extern/tp/tpfrcnn/preproc.py | deepdoctection/deepdoctection | 7e0d7396e5ef8bf8109904e09c5d4ee56cb5a036 | [
"Apache-2.0"
] | 4 | 2022-01-11T16:40:17.000Z | 2022-03-30T02:09:55.000Z | # -*- coding: utf-8 -*-
# File: preproc.py
# Copyright (c) Tensorpack Contributors
# Licensed under the Apache License, Version 2.0 (the "License")
"""
This file is modified from
https://github.com/tensorpack/tensorpack/blob/1a79d595f7eda9dc9dc8428f4461680ed2222ab6/examples/FasterRCNN/data.py
"""
from typing import ... | 39.327869 | 118 | 0.700875 |
d5a80c06a8e3015ab539397506e1eb867698be2e | 4,787 | py | Python | algorithms/geometry.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2021-08-23T17:15:06.000Z | 2021-08-23T17:15:06.000Z | algorithms/geometry.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2018-05-02T17:29:42.000Z | 2018-05-02T17:31:18.000Z | algorithms/geometry.py | tommyod/PythonAlgorithms | f0a0f67be069fc9e9fa3027ed83942d6401223fe | [
"MIT"
] | 1 | 2018-05-02T12:31:52.000Z | 2018-05-02T12:31:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Geometry algorithms.
"""
import itertools
def closest_pair_line(sequence):
"""
Return the indices of the two closest points in a sequence, i.e. the two
points such that their difference is minimized.
Algorithmic details
-------------------
... | 29.91875 | 79 | 0.57677 |
d5a82d5f1aa7179c2fa4eec882dff97bb73b2e29 | 14,690 | py | Python | filter.py | andrewdyates/geo_api | 3c60afcdeab8af472e0c03587ee52c39101bfcef | [
"Unlicense"
] | 1 | 2020-04-29T18:55:56.000Z | 2020-04-29T18:55:56.000Z | filter.py | andrewdyates/geo_api | 3c60afcdeab8af472e0c03587ee52c39101bfcef | [
"Unlicense"
] | null | null | null | filter.py | andrewdyates/geo_api | 3c60afcdeab8af472e0c03587ee52c39101bfcef | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
"""Filter cleaned rows of GSE series matrix data.
Environment variables:
TMP_DIR: path to temporary directory
TODO: Configure filter parameters
"""
import os
import random
import time
import math
import geo
from logger import Log
class MalformedFilterError(Exception):
pass
class Filter(object):... | 35.143541 | 92 | 0.64241 |
d5a82dc46619fc9041d21eaea1c3ace3d8c328f3 | 86 | py | Python | KSIF/core/__init__.py | ksif/KSIF | 03d4a25b0ae30453ca8254a48641f1b9665f1d2c | [
"MIT"
] | 1 | 2019-03-29T14:55:36.000Z | 2019-03-29T14:55:36.000Z | KSIF/core/__init__.py | ksif/KSIF | 03d4a25b0ae30453ca8254a48641f1b9665f1d2c | [
"MIT"
] | null | null | null | KSIF/core/__init__.py | ksif/KSIF | 03d4a25b0ae30453ca8254a48641f1b9665f1d2c | [
"MIT"
] | null | null | null | """
"""
__author__ = 'Seung Hyeon Yu'
__email__ = 'rambor12@business.kaist.ac.kr' | 17.2 | 43 | 0.651163 |
d5a841b51e8c228f6830069976d14aeb4dd37f25 | 11,135 | py | Python | gcpy/ste_flux.py | sdeastham/gcpy | 941fd7b55510cbe4dae8771ad316a4f927490951 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | gcpy/ste_flux.py | sdeastham/gcpy | 941fd7b55510cbe4dae8771ad316a4f927490951 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | gcpy/ste_flux.py | sdeastham/gcpy | 941fd7b55510cbe4dae8771ad316a4f927490951 | [
"NCSA",
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Computes strat-trop exchange (taken as species flux across 100 hPa)
for selected benchmark species.
"""
# ======================================================================
# Imports etc.
# ======================================================================
import os
from calendar imp... | 33.640483 | 77 | 0.526628 |
d5a8781a331df3946e9be00a982bce0f32c17a8b | 4,771 | py | Python | mininet/examples/controlnet.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2016-11-16T16:26:16.000Z | 2021-04-26T17:20:28.000Z | mininet/examples/controlnet.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 3 | 2017-04-20T11:29:17.000Z | 2017-11-06T17:12:12.000Z | mininet/examples/controlnet.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2017-03-27T13:58:52.000Z | 2020-06-24T22:42:51.000Z | #!/usr/bin/python
"""
controlnet.py: Mininet with a custom control network
We create two Mininet() networks, a control network
and a data network, running four DataControllers on the
control network to control the data network.
Since we're using UserSwitch on the data network,
it should correctly fail over to a back... | 31.388158 | 76 | 0.634458 |
d5a8792c885d3f3931aa414467f34997b1cfbabe | 2,703 | py | Python | gluon/tests/test_compileapp.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,573 | 2015-01-01T07:19:06.000Z | 2022-03-30T09:06:06.000Z | gluon/tests/test_compileapp.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 1,691 | 2015-01-03T11:03:23.000Z | 2022-03-30T07:27:28.000Z | gluon/tests/test_compileapp.py | ngsimon/web2py | 93297fed8a3a916b45d17f5c4d5d2b80aaf92788 | [
"BSD-3-Clause"
] | 895 | 2015-01-03T19:56:15.000Z | 2022-03-18T18:30:57.000Z | # -*- coding: utf-8 -*-
""" Unit tests for compileapp.py """
import unittest
import os
import tempfile
import shutil
from gluon.fileutils import create_app, w2p_pack, w2p_unpack
from gluon.compileapp import compile_application, remove_compiled_application
from gluon.globals import Request
from gluon.admin import (ap... | 35.565789 | 98 | 0.694044 |
d5a87d412ae8b546e7ab7a54d64605195690666c | 378 | py | Python | migrations/versions/0155_revert_0153.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 41 | 2019-11-28T16:58:41.000Z | 2022-01-28T21:11:16.000Z | migrations/versions/0155_revert_0153.py | cds-snc/notification-api | b1c1064f291eb860b494c3fa65ac256ad70bf47c | [
"MIT"
] | 1,083 | 2019-07-08T12:57:24.000Z | 2022-03-08T18:53:40.000Z | migrations/versions/0155_revert_0153.py | cds-snc/notifier-api | 90b385ec49efbaee7e607516fc7d9f08991af813 | [
"MIT"
] | 9 | 2020-01-24T19:56:43.000Z | 2022-01-27T21:36:53.000Z | """
Revision ID: 0155_revert_0153
Revises: 0154_nullable_is_blank
Create Date: 2018-01-05 14:09:21.200102
"""
from alembic import op
revision = "0155_revert_0153"
down_revision = "0154_nullable_is_blank"
def upgrade():
op.drop_column("templates", "is_letter_contact_blank")
op.drop_column("templates_history... | 18 | 66 | 0.759259 |
d5a8915591184806219d5d862b4697ff0511f399 | 9,417 | py | Python | ddsp/training/decoders.py | lylyhan/ddsp | d7f38fe79a54ec746c0315eaf431fa1b19ef46ff | [
"Apache-2.0"
] | null | null | null | ddsp/training/decoders.py | lylyhan/ddsp | d7f38fe79a54ec746c0315eaf431fa1b19ef46ff | [
"Apache-2.0"
] | null | null | null | ddsp/training/decoders.py | lylyhan/ddsp | d7f38fe79a54ec746c0315eaf431fa1b19ef46ff | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The DDSP 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 applicable law or agreed to in wri... | 32.811847 | 80 | 0.630243 |
d5a8c3ca3b66c7399cc0d0ae1ec31a12e72eb922 | 1,778 | py | Python | alipay/aop/api/domain/SimpleShopInfo.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/SimpleShopInfo.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/SimpleShopInfo.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 SimpleShopInfo(object):
def __init__(self):
self._address = None
self._shop_id = None
self._shop_name = None
@property
def address(self):
return self._add... | 25.042254 | 69 | 0.56243 |
d5a8e0223d0e0a2a1ae67376ea3d44a9ccf9aba0 | 3,607 | py | Python | flow/environments/incite.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/environments/incite.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | flow/environments/incite.py | ilumsden/signac-flow | 1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018 The Regents of the University of Michigan
# All rights reserved.
# This software is licensed under the BSD 3-Clause License.
"""Environments for INCITE supercomputers.
http://www.doeleadershipcomputing.org/
"""
from ..environment import DefaultLSFEnvironment, DefaultTorqueEnvironment
from fractio... | 33.398148 | 83 | 0.646521 |
d5a8e51899795efb9ee061da17d1d2b7749f62b9 | 3,764 | py | Python | homeassistant/auth/providers/ais_demo.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 5 | 2020-01-21T16:06:49.000Z | 2021-12-20T11:54:20.000Z | homeassistant/auth/providers/ais_demo.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 68 | 2018-10-04T16:01:20.000Z | 2022-03-31T06:21:46.000Z | homeassistant/auth/providers/ais_demo.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Example auth provider."""
from collections import OrderedDict
import hmac
from typing import Any, Dict, Optional, cast
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.exceptions import HomeAssistantError
from . import AUTH_PROVIDER_SCHEMA, AUTH_PROVIDERS, AuthProvider, LoginFlo... | 30.601626 | 84 | 0.623273 |
d5a8fbcfe47e9a0d54f852f0d643fd671a58bcb2 | 11,195 | py | Python | tests/gpuarray/test_extra_ops.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | 1 | 2021-08-10T20:20:22.000Z | 2021-08-10T20:20:22.000Z | tests/gpuarray/test_extra_ops.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | tests/gpuarray/test_extra_ops.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | from functools import partial
from itertools import product
import numpy as np
import pytest
import aesara
import aesara.tensor.math as tm
from aesara.gpuarray.extra_ops import GpuCumOp
from aesara.gpuarray.type import get_context
from aesara.tensor.extra_ops import CumOp
from aesara.tensor.type import fmatrix, ftens... | 41.462963 | 88 | 0.564538 |
d5a922e0a39aefa506e762e9e039148527e0f6b8 | 410 | py | Python | tests/base/test_search.py | JasonPuglisi/emmental | ec60e79ac7fc7322445de84e4d431a151a1e8299 | [
"MIT"
] | 2 | 2019-01-29T10:19:36.000Z | 2020-02-05T20:25:58.000Z | tests/base/test_search.py | JasonPuglisi/emmental | ec60e79ac7fc7322445de84e4d431a151a1e8299 | [
"MIT"
] | 54 | 2019-01-28T02:41:58.000Z | 2019-04-16T21:24:09.000Z | tests/base/test_search.py | JasonPuglisi/emmental | ec60e79ac7fc7322445de84e4d431a151a1e8299 | [
"MIT"
] | 1 | 2020-02-05T20:26:17.000Z | 2020-02-05T20:26:17.000Z | """Tests filesystem search functionality (including vulnerability.)"""
import pytest
from src.search import search_ls
@pytest.mark.parametrize('directory, query, match', [
('/', 'e', 'etc'),
('/', ';echo BAD_OUTPUT!', 'BAD_OUTPUT!')
])
def test_search_ls(directory, query, match):
"""Test searching the fi... | 29.285714 | 70 | 0.7 |
d5a932a9aca87969c219a3f05f2ea1770edb1800 | 967 | py | Python | test/test_fixerio_v2.0.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | 1 | 2021-03-07T23:07:52.000Z | 2021-03-07T23:07:52.000Z | test/test_fixerio_v2.0.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | test/test_fixerio_v2.0.py | ai-abhinav/CCArbitrage | 6af8c2e6722f2398fabf3a6e483b1a0fcb8a3a53 | [
"MIT"
] | null | null | null | from fixerio import fixerio
def main():
test = fixerio.Fixerio()
response = test.convert(20, base='USD', dest='EUR')
print(response, end='\n\n')
response = test.get_rates(date='2010-12-31')
print(response, end='\n\n')
# print(test._cache)
response = test.convert(1000.0, 'EUR', date='2010-1... | 33.344828 | 76 | 0.620476 |
d5a9c8b347e5de1c9e964d7a74dc635c3b6abbc8 | 8,292 | py | Python | reactlibapp/libraryapi/tests/test_models.py | andela-sjames/Django-ReactJS-Library-App | d5d82e82a039ea90ffa8d65587dc10d2a0a1b1e5 | [
"MIT"
] | 14 | 2016-09-17T20:35:31.000Z | 2020-12-14T09:52:06.000Z | reactlibapp/libraryapi/tests/test_models.py | BolajiOlajide/Django-ReactJS-Library-App | d5d82e82a039ea90ffa8d65587dc10d2a0a1b1e5 | [
"MIT"
] | 35 | 2017-07-29T21:01:55.000Z | 2022-02-09T23:08:18.000Z | reactlibapp/libraryapi/tests/test_models.py | BolajiOlajide/Django-ReactJS-Library-App | d5d82e82a039ea90ffa8d65587dc10d2a0a1b1e5 | [
"MIT"
] | 5 | 2018-10-24T20:10:34.000Z | 2021-03-18T07:00:35.000Z | from django.test import TestCase, Client
from django.contrib.auth.models import User
import libraryapi.models as models
class ModelSetupTestCase(TestCase):
def setUp(self):
self.client = Client()
user = User.objects.create(
first_name='John',
last_name='Doe',
u... | 35.587983 | 117 | 0.664014 |
d5aa15ffe38db78250a8432043ae15200196bc18 | 56,843 | py | Python | tests/helpers/test_script.py | maximoei/core | 3df67ff9e12868734b369a2a27612036638f6df4 | [
"Apache-2.0"
] | 1 | 2018-04-24T21:48:14.000Z | 2018-04-24T21:48:14.000Z | tests/helpers/test_script.py | maximoei/core | 3df67ff9e12868734b369a2a27612036638f6df4 | [
"Apache-2.0"
] | 44 | 2020-08-03T07:31:07.000Z | 2022-03-31T06:02:04.000Z | tests/helpers/test_script.py | jeroen84/home-assistant | a47f73244c0b3fbe4210ffd7731be69b3984fbbd | [
"Apache-2.0"
] | 2 | 2017-09-03T16:06:02.000Z | 2021-01-12T15:07:52.000Z | """The tests for the Script component."""
# pylint: disable=protected-access
import asyncio
from contextlib import contextmanager
from datetime import timedelta
import logging
from types import MappingProxyType
from unittest import mock
import pytest
import voluptuous as vol
# Otherwise can't test just this file (imp... | 33.456739 | 88 | 0.596679 |
d5aa23ad2a724d243e03d50e480da87ff92d3853 | 9,040 | py | Python | Lib/fontTools/misc/py23_test.py | zemingWaterloo/FontTool | b049cbf01794cf3a3edf0ce79f428964cf0d86be | [
"Adobe-Glyph"
] | null | null | null | Lib/fontTools/misc/py23_test.py | zemingWaterloo/FontTool | b049cbf01794cf3a3edf0ce79f428964cf0d86be | [
"Adobe-Glyph"
] | null | null | null | Lib/fontTools/misc/py23_test.py | zemingWaterloo/FontTool | b049cbf01794cf3a3edf0ce79f428964cf0d86be | [
"Adobe-Glyph"
] | 1 | 2019-08-14T15:57:38.000Z | 2019-08-14T15:57:38.000Z | from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.misc.textTools import deHexStr
import filecmp
import tempfile
from subprocess import check_call
import sys
import os
import unittest
from fontTools.misc.py23 import round2, round3
PIPE_SCRIPT = """\
impo... | 35.45098 | 79 | 0.698341 |
d5aa2c28a0a51191fb849a0037792e202f6445c9 | 252 | py | Python | bittorrent/context/piece_info.py | zealous-hunter/BitTorrrent_Peer | cdc8b9fa3ef97ade9ea92d20396ec6195d8ff9b8 | [
"MIT"
] | null | null | null | bittorrent/context/piece_info.py | zealous-hunter/BitTorrrent_Peer | cdc8b9fa3ef97ade9ea92d20396ec6195d8ff9b8 | [
"MIT"
] | null | null | null | bittorrent/context/piece_info.py | zealous-hunter/BitTorrrent_Peer | cdc8b9fa3ef97ade9ea92d20396ec6195d8ff9b8 | [
"MIT"
] | null | null | null |
class PieceState:
Unknown = -1
NotHave = 0
Have = 1
Downloading = 2
class PieceInfo:
def __init__(self, index=0, state=PieceState.Unknown, hash=None):
self.index = index
self.state = state
self.hash = hash | 19.384615 | 69 | 0.607143 |
d5aa37ed9c43d5ce9a815cbf9bbf9a4ce5835eb9 | 3,163 | py | Python | yangvalidator/v2/confdParser.py | YangCatalog/bottle-yang-extractor-validator | 73515b77d9f85751eee89fc9cd438b1961912587 | [
"BSD-2-Clause"
] | 4 | 2019-06-15T03:11:41.000Z | 2021-06-29T05:34:59.000Z | yangvalidator/v2/confdParser.py | YangCatalog/bottle-yang-extractor-validator | 73515b77d9f85751eee89fc9cd438b1961912587 | [
"BSD-2-Clause"
] | 39 | 2019-07-08T06:58:26.000Z | 2021-10-06T11:39:25.000Z | yangvalidator/v2/confdParser.py | YangCatalog/bottle-yang-extractor-validator | 73515b77d9f85751eee89fc9cd438b1961912587 | [
"BSD-2-Clause"
] | 7 | 2019-09-18T15:08:26.000Z | 2021-12-12T13:56:05.000Z | # Copyright The IETF Trust 2021, All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.618421 | 103 | 0.672779 |
d5aa4545a646814ef6af3187191b63fb5876eb06 | 1,294 | py | Python | test/unit/gen_libs/prt_msg.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/prt_msg.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | test/unit/gen_libs/prt_msg.py | deepcoder42/python-lib | 249f456fdd41a6883206fea8e19c9e098cc969e5 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: prt_msg.py
Description: Unit testing of prt_msg in gen_libs.py.
Usage:
test/unit/gen_libs/prt_msg.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2, 7):
import unittest2 as unit... | 15.780488 | 76 | 0.630603 |
d5aa65a105461e1733064f881b4121a566f9103f | 1,609 | py | Python | validator/tests/integration/test_integration.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | 1 | 2019-03-18T13:31:11.000Z | 2019-03-18T13:31:11.000Z | validator/tests/integration/test_integration.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | validator/tests/integration/test_integration.py | gabykyei/GC_BlockChain_T_Rec | b72cb483064852d0a60286943ff55233462fea08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 33.520833 | 80 | 0.68179 |
d5aa69b732400b653e41b9ee272f014c92c852bc | 610 | py | Python | CADMium/partition/vp_surprise.py | wasserman-group/CADMium | 0d0e16f8965e0a3acfea9ea6ba5dd0d51f1bdc55 | [
"BSD-3-Clause"
] | null | null | null | CADMium/partition/vp_surprise.py | wasserman-group/CADMium | 0d0e16f8965e0a3acfea9ea6ba5dd0d51f1bdc55 | [
"BSD-3-Clause"
] | 1 | 2021-05-12T17:24:27.000Z | 2021-05-12T17:24:27.000Z | CADMium/partition/vp_surprise.py | wasserman-group/CADMium | 0d0e16f8965e0a3acfea9ea6ba5dd0d51f1bdc55 | [
"BSD-3-Clause"
] | 2 | 2020-10-07T20:48:56.000Z | 2021-04-22T19:06:18.000Z | """
vp_surpise.py
Do calculations for surprisal type functionals
"""
import numpy as np
def vp_surprise(self):
#Calculate overlap
Pa = np.sum(self.na_frac, axis=1) / np.sum(self.nf, axis=1)
Pb = np.sum(self.nb_frac, axis=1) / np.sum(self.nf, axis=1)
self.V.s = -Pa * np.log2(Pa) - Pb * np.log2(Pb)
... | 26.521739 | 68 | 0.616393 |
d5aa855b1d79169bdb640f1a68ac6276d41ff470 | 6,112 | py | Python | aeronet_analysis.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 4 | 2019-09-09T19:47:49.000Z | 2021-12-29T18:12:26.000Z | aeronet_analysis.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | null | null | null | aeronet_analysis.py | mfkiwl/PW_from_GPS | fa0b0b9e1325a055ce884f79c14d24148348886b | [
"MIT"
] | 6 | 2019-12-06T02:27:05.000Z | 2021-12-27T16:32:54.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 25 11:42:55 2020
@author: ziskin
"""
from PW_paths import work_yuval
from matplotlib import rcParams
import seaborn as sns
aero_path = work_yuval / 'AERONET'
gis_path = work_yuval / 'gis'
rc = {
'font.family': 'serif',
'xtick.labelsize': '... | 38.2 | 77 | 0.618128 |
d5aa8ff78a11de356d664995246c61994d1f7aa9 | 3,958 | py | Python | docx_microreader/translators/xml/xml_translators.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | docx_microreader/translators/xml/xml_translators.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | docx_microreader/translators/xml/xml_translators.py | DudaEugen/docx_microreader | cc524ff5233b0c074786f2a5c378ea542607359a | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from typing import List
from typing import Union, Optional
class TranslatorToXML:
@staticmethod
def create_properties_dict(parent: dict, rest, value):
tag: str = rest[0]
if len(rest) > 1:
if not (tag in parent):
parent[tag] = {}
... | 38.803922 | 117 | 0.618747 |
d5aa92af1f1eef8d1ef95e4bc74c1a2ee9e2c878 | 2,784 | py | Python | rally/common/db/migrations/versions/2017_12_a43700a813a5_add_env_platforms_tables.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 263 | 2015-04-26T16:05:34.000Z | 2022-02-28T11:17:07.000Z | rally/common/db/migrations/versions/2017_12_a43700a813a5_add_env_platforms_tables.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 19 | 2015-04-23T11:53:10.000Z | 2019-02-20T11:23:09.000Z | rally/common/db/migrations/versions/2017_12_a43700a813a5_add_env_platforms_tables.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | 287 | 2015-04-23T11:28:03.000Z | 2021-09-16T13:05:53.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 32 | 78 | 0.665589 |
d5aaad714746fbd89a4a59b01f17556a7af078dc | 4,912 | py | Python | dialogflow/cloud-client/detect_intent_texts_alliance.py | patelrajnath/python-docs-samples | ea32d48580f2cd2bc02fce68cde5651446f1bf46 | [
"Apache-2.0"
] | null | null | null | dialogflow/cloud-client/detect_intent_texts_alliance.py | patelrajnath/python-docs-samples | ea32d48580f2cd2bc02fce68cde5651446f1bf46 | [
"Apache-2.0"
] | null | null | null | dialogflow/cloud-client/detect_intent_texts_alliance.py | patelrajnath/python-docs-samples | ea32d48580f2cd2bc02fce68cde5651446f1bf46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# 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... | 36.656716 | 118 | 0.661849 |
d5aabc4e5ccd64cae1a807d0ce03d925b96b25b9 | 3,813 | py | Python | Paddle/paddle.py | elishatofunmi/Orbit | 9ab0b5e3009891cdc34f87b169d553324ab7db08 | [
"MIT"
] | 70 | 2019-11-21T02:43:45.000Z | 2022-03-14T01:21:34.000Z | Paddle/paddle.py | elishatofunmi/Orbit | 9ab0b5e3009891cdc34f87b169d553324ab7db08 | [
"MIT"
] | 4 | 2020-07-23T16:23:53.000Z | 2022-01-27T02:16:35.000Z | Paddle/paddle.py | elishatofunmi/Orbit | 9ab0b5e3009891cdc34f87b169d553324ab7db08 | [
"MIT"
] | 37 | 2019-11-21T04:15:27.000Z | 2021-11-04T10:17:14.000Z | # Author: Shiva Verma
import turtle as t
class Paddle():
def __init__(self):
self.done = False
self.reward = 0
self.hit, self.miss = 0, 0
# Setup Background
self.win = t.Screen()
self.win.title('Paddle')
self.win.bgcolor('black')
self.win.setup... | 24.921569 | 128 | 0.503278 |
d5aac70ab7248020ccd031e914bbe0e5a2f9ddd7 | 10,963 | py | Python | model/eigen3_svd.py | dapqa/speeding-up-bo-for-cf-public | f4082c91899d7991eaf33fdec0848aafe4544cc5 | [
"MIT"
] | null | null | null | model/eigen3_svd.py | dapqa/speeding-up-bo-for-cf-public | f4082c91899d7991eaf33fdec0848aafe4544cc5 | [
"MIT"
] | null | null | null | model/eigen3_svd.py | dapqa/speeding-up-bo-for-cf-public | f4082c91899d7991eaf33fdec0848aafe4544cc5 | [
"MIT"
] | null | null | null | """Classes for using dockerized native SVD/SVD++ models.
Their interface is similar to common Python model classes for the easier usage.
"""
import re
import os
from abc import ABCMeta, abstractmethod
from dataclasses import dataclass
from typing import List
from parameters import EnvParameters, get_env_parameters
fr... | 36.912458 | 119 | 0.592903 |
d5aaca86e4d3103b9e64f16001a1abe3b0e9d6a7 | 1,655 | py | Python | python/cytokit_reader.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-09T17:55:04.000Z | 2022-02-25T14:54:01.000Z | python/cytokit_reader.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 32 | 2020-01-09T20:40:26.000Z | 2020-12-18T16:39:41.000Z | python/cytokit_reader.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-18T14:50:11.000Z | 2021-10-06T12:49:24.000Z | #!/usr/bin/env python3
import csv
import argparse
import json
def round_conv(s):
# TODO: Truncating after decimal point might be slightly too aggressive?
return round(float(s))
def row_to_dict(row):
'''
>>> row = {
... 'id': '123', 'x': '1.2', 'y': '3.4',
... 'ci:ABC:mean': '5.... | 28.534483 | 76 | 0.554683 |
d5aacf2b8121f5ddb11fca5f90accd34cee5c68f | 852 | py | Python | dear_petition/petition/migrations/0034_auto_20200802_1419.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 4 | 2020-04-01T14:42:45.000Z | 2021-12-12T21:11:11.000Z | dear_petition/petition/migrations/0034_auto_20200802_1419.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 142 | 2019-08-12T19:08:34.000Z | 2022-03-29T23:05:35.000Z | dear_petition/petition/migrations/0034_auto_20200802_1419.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 8 | 2020-02-04T20:37:00.000Z | 2021-03-28T13:28:32.000Z | # Generated by Django 2.2.13 on 2020-08-02 14:19
from django.db import migrations
from django.db.models import Q
def add_files(apps, schema_editor):
CIPRSRecord = apps.get_model("petition", "CIPRSRecord")
BatchFile = apps.get_model("petition", "BatchFile")
records = CIPRSRecord.objects.exclude(
Q... | 28.4 | 70 | 0.700704 |
d5aaebde8ca405f558d5d8750398334987504679 | 10,639 | py | Python | lib/kb_transyt/kb_transyt_report.py | merlin-sysbio/kb_transyt | 2ac22d38927d7c1b66b633db4cc3c892fe9263a3 | [
"MIT"
] | 1 | 2020-03-26T17:40:19.000Z | 2020-03-26T17:40:19.000Z | lib/kb_transyt/kb_transyt_report.py | merlin-sysbio/kb_transyt | 2ac22d38927d7c1b66b633db4cc3c892fe9263a3 | [
"MIT"
] | null | null | null | lib/kb_transyt/kb_transyt_report.py | merlin-sysbio/kb_transyt | 2ac22d38927d7c1b66b633db4cc3c892fe9263a3 | [
"MIT"
] | 1 | 2020-08-10T20:54:19.000Z | 2020-08-10T20:54:19.000Z | from installed_clients.KBaseReportClient import KBaseReport
import uuid
tr_url = "https://transyt.bio.di.uminho.pt/reactions/"
search_bar_placeholder = "__SEARCHER__"
def generate_report(report_path, report_elements, references, objects_created, callback_url, ws_name, model_id,
sbml_path, transyt_... | 47.495536 | 133 | 0.532193 |
d5ab0125a8b6a221797180af63427310a0431fe2 | 2,131 | py | Python | web/reports/views.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 1 | 2018-07-11T20:20:21.000Z | 2018-07-11T20:20:21.000Z | web/reports/views.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 46 | 2018-08-08T19:46:15.000Z | 2019-02-22T20:33:49.000Z | web/reports/views.py | dani4571/FleetDeploymentReporting | 8b132a20fa3e9c4e4215feade79f689be6e4b364 | [
"Apache-2.0"
] | 7 | 2018-06-26T15:27:55.000Z | 2018-12-05T19:41:25.000Z | import logging
from django.http import Http404
from rest_framework import viewsets
from rest_framework.decorators import list_route
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from .registry import REGISTRY as report_registry
from .registry import ReportNameSeria... | 32.784615 | 76 | 0.680432 |
d5ab104c3c7232d3336de07e6fdbd6bfe3c76a5f | 8,555 | py | Python | tasks.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | 1 | 2022-03-21T11:14:17.000Z | 2022-03-21T11:14:17.000Z | tasks.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | tasks.py | tyochans/online_test | 4eb754c2e71922819de7390d1b4993a21763de3e | [
"Python-2.0"
] | null | null | null | from __future__ import print_function
import os
import sys
import shutil
from distutils.dir_util import copy_tree
from distutils.file_util import copy_file
import invoke
from invoke import task
from yaksh.settings import SERVER_POOL_PORT
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
TARGET_CONTAINER_NAME =... | 29.704861 | 78 | 0.621742 |
d5ab21e7c41621b6b419d521ede1d04fb2d2f0ab | 3,228 | py | Python | priority_queue.py | jschmidtnj/mazesolving | cf27b927a66ce7a128d899a984b0bace39306850 | [
"Unlicense"
] | null | null | null | priority_queue.py | jschmidtnj/mazesolving | cf27b927a66ce7a128d899a984b0bace39306850 | [
"Unlicense"
] | null | null | null | priority_queue.py | jschmidtnj/mazesolving | cf27b927a66ce7a128d899a984b0bace39306850 | [
"Unlicense"
] | null | null | null |
from abc import ABCMeta, abstractmethod
import itertools
from FibonacciHeap import FibHeap
import heapq
import Queue # queue for python3, Queue for python2
class PriorityQueue():
__metaclass__ = ABCMeta
@abstractmethod
def __len__(self): pass
@abstractmethod
def insert(self, node): pass
@a... | 24.641221 | 54 | 0.592007 |
d5ab269beec49e0f952bfa06da47f572d135e328 | 6,901 | py | Python | UtilsHandler/StrategyHandler.py | GitiHubi/deepContinualAuditing | 858830cb72b4c772120a623da753c0c5d535ee4e | [
"MIT"
] | null | null | null | UtilsHandler/StrategyHandler.py | GitiHubi/deepContinualAuditing | 858830cb72b4c772120a623da753c0c5d535ee4e | [
"MIT"
] | null | null | null | UtilsHandler/StrategyHandler.py | GitiHubi/deepContinualAuditing | 858830cb72b4c772120a623da753c0c5d535ee4e | [
"MIT"
] | 1 | 2022-02-24T11:10:50.000Z | 2022-02-24T11:10:50.000Z | import torch
from avalanche.training.strategies import Naive, EWC, LwF, SynapticIntelligence
from avalanche.evaluation.metrics import loss_metrics
from avalanche.training.plugins import EvaluationPlugin, ReplayPlugin
from avalanche.logging import InteractiveLogger
from avalanche.training.storage_policy import Reservoir... | 50.372263 | 103 | 0.574554 |
d5ab3e51d82cf0090e99a69ad9a48b3e525c5d1a | 79 | py | Python | nball4tree/experiments/membership_validation/data/__init__.py | logicalfarhad/nball4tree | d9c4be308a8751215e65d2ffc49171227971ca28 | [
"MIT"
] | 19 | 2018-12-26T03:51:30.000Z | 2021-08-17T09:05:09.000Z | nball4tree/experiments/membership_validation/data/__init__.py | logicalfarhad/nball4tree | d9c4be308a8751215e65d2ffc49171227971ca28 | [
"MIT"
] | null | null | null | nball4tree/experiments/membership_validation/data/__init__.py | logicalfarhad/nball4tree | d9c4be308a8751215e65d2ffc49171227971ca28 | [
"MIT"
] | 14 | 2018-10-01T09:57:21.000Z | 2021-01-12T11:22:50.000Z | from .create_datasets import create_training_testing_dataset_for_cat_prediction | 79 | 79 | 0.949367 |
d5ab70cdbab8e0812593d6c61c32470e340ecc8d | 6,386 | py | Python | simplecmr/result.py | KMarkert/simple-cmr | 7c6500466715692f18482ea379572ef30b46b380 | [
"MIT"
] | 1 | 2020-04-10T17:08:35.000Z | 2020-04-10T17:08:35.000Z | simplecmr/result.py | KMarkert/simple-cmr | 7c6500466715692f18482ea379572ef30b46b380 | [
"MIT"
] | null | null | null | simplecmr/result.py | KMarkert/simple-cmr | 7c6500466715692f18482ea379572ef30b46b380 | [
"MIT"
] | null | null | null | import os
import requests
import warnings
from pathlib import Path
from pprint import pformat
from collections import OrderedDict
from concurrent.futures import ThreadPoolExecutor
class Collections:
def __init__(self,ummResponse):
"""
Collections class that extracts the most relevant metadata prop... | 29.702326 | 94 | 0.576417 |
d5ab7f895f9505e7eb9b005062b14c55ee652041 | 9,552 | py | Python | userbot/plugins/pmpermit.py | toxic-dev0/my-userbot | edd6db76059bad41778a350010f446bb851a2607 | [
"MIT"
] | null | null | null | userbot/plugins/pmpermit.py | toxic-dev0/my-userbot | edd6db76059bad41778a350010f446bb851a2607 | [
"MIT"
] | null | null | null | userbot/plugins/pmpermit.py | toxic-dev0/my-userbot | edd6db76059bad41778a350010f446bb851a2607 | [
"MIT"
] | null | null | null | import os
import time
import asyncio
import io
import userbot.plugins.sql_helper.pmpermit_sql as pmpermit_sql
from telethon.tl.functions.users import GetFullUserRequest
from telethon import events, errors, functions, types
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
from userbot import CMD_HELP
... | 39.308642 | 420 | 0.561244 |
d5ab8803647d6ad0942804902f12249407e512b0 | 2,791 | py | Python | keyboards/inline/in_processing/keyboards_close_request.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | keyboards/inline/in_processing/keyboards_close_request.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | keyboards/inline/in_processing/keyboards_close_request.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | from aiogram.types import InlineKeyboardMarkup
from aiogram.types import InlineKeyboardButton
from aiogram.utils.callback_data import CallbackData
from data import all_emoji
cb_confirm_close_request = CallbackData('cb_ccr', 'type_btn')
def create_kb_confirm_close_request(request):
emo_snail = all_emoji['back__ma... | 27.633663 | 86 | 0.558581 |
d5ab93f7a8eb28020a2f8b181336b0e1c1174161 | 4,452 | py | Python | doozerlib/model.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/model.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | doozerlib/model.py | vfreex/doozer | 8ad0a1234120cdc30890afbbdda1bc40e4a4fc76 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
from future.utils import as_native_str
class ModelException(Exception):
def __init__(self, msg, result=None, **kwargs):
super(self.__class__, self).__init__(msg)
self.msg = msg
self.result = result
self.kwarg... | 27.652174 | 98 | 0.599506 |
d5aba2c906d2f83a09954e968ad2800f7c2c6a0f | 2,347 | py | Python | packages/infra_libs/infra_libs/ts_mon/protos/any_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | packages/infra_libs/infra_libs/ts_mon/protos/any_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 16 | 2020-09-07T11:55:09.000Z | 2022-03-02T05:47:58.000Z | packages/infra_libs/infra_libs/ts_mon/protos/any_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: any.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflectio... | 29.708861 | 174 | 0.735407 |
d5abbae5eaf25e7cd4628f9ba3539a39dd541b38 | 14,967 | py | Python | flit/install.py | hugovk/flit | 25e3c90c17c10b402b89acb3faabeb76459a0f4f | [
"BSD-3-Clause"
] | null | null | null | flit/install.py | hugovk/flit | 25e3c90c17c10b402b89acb3faabeb76459a0f4f | [
"BSD-3-Clause"
] | null | null | null | flit/install.py | hugovk/flit | 25e3c90c17c10b402b89acb3faabeb76459a0f4f | [
"BSD-3-Clause"
] | null | null | null | """Install packages locally for development
"""
import logging
import os
import csv
import pathlib
import random
import re
import shutil
import site
import sys
import tempfile
from subprocess import check_call, check_output
import sysconfig
from . import common
from . import inifile
from .wheel import WheelBuilder
fro... | 37.795455 | 94 | 0.583751 |
d5abc0d38c8e5c65af675b8a45c96669946dec97 | 1,408 | py | Python | attitude/test/io.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 8 | 2015-03-24T09:08:32.000Z | 2021-05-17T03:32:01.000Z | attitude/test/io.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | 3 | 2018-03-16T07:38:26.000Z | 2022-02-15T06:07:54.000Z | attitude/test/io.py | davenquinn/Attitude | f7cd15212ca7a2f9a0e367cf9769e382eeaea91e | [
"MIT"
] | null | null | null | """
Methods for dealing with saved test data
"""
from __future__ import print_function
from os import path
import numpy as N
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
__dirname__ = path.dirname(__file__)
def __test_fp(name):
fn = path.basename(name)+'.txt'
return ... | 25.142857 | 59 | 0.608665 |
d5abc87b486394cc2f6ffffd665efc3bedeba281 | 7,149 | py | Python | 0900-hp/hplip-3.21.12/config_usb_printer.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/config_usb_printer.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/config_usb_printer.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# (c) Copyright 2011-2015 HP Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (a... | 36.28934 | 176 | 0.645125 |
d5ac1d799c9f63d2fd42714ca1fdb85f530aef49 | 28,814 | py | Python | mmdet3d/datasets/kitti_dataset.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 12 | 2021-03-17T09:07:18.000Z | 2022-01-21T01:37:42.000Z | mmdet3d/datasets/kitti_dataset.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 1 | 2020-08-11T05:44:29.000Z | 2020-08-11T05:44:29.000Z | mmdet3d/datasets/kitti_dataset.py | BOURSa/mmdetection3d | 27d0001e873b3102a828a27e1372873fcf81ed7e | [
"Apache-2.0"
] | 2 | 2021-03-17T09:25:15.000Z | 2021-04-22T09:15:58.000Z | import copy
import mmcv
import numpy as np
import os
import tempfile
import torch
from mmcv.utils import print_log
from os import path as osp
from mmdet.datasets import DATASETS
from ..core import show_result
from ..core.bbox import Box3DMode, CameraInstance3DBoxes, points_cam2img
from .custom_3d import Custom3DDatase... | 41.340029 | 79 | 0.515097 |
d5ac21d5b243fbde9f18681a0c9ff8067eb3210e | 2,498 | py | Python | Commons/LRP_output.py | quilan78/MSC_project | 18c0298bca013a62c09752446f7c391a29f38618 | [
"Apache-2.0"
] | null | null | null | Commons/LRP_output.py | quilan78/MSC_project | 18c0298bca013a62c09752446f7c391a29f38618 | [
"Apache-2.0"
] | null | null | null | Commons/LRP_output.py | quilan78/MSC_project | 18c0298bca013a62c09752446f7c391a29f38618 | [
"Apache-2.0"
] | null | null | null | import json
import pickle
class LRP_output:
def __init__(self, original_text=[], input_text=[], input_summary=[], original_summary=[], greedy_summary=[], beam_summary=[], greedy_LRP_encoder_forward= [], greedy_LRP_encoder_backward= [], greedy_LRP_decoder = [], greedy_attention=[], beam_LRP=[], beam_attention=[]... | 38.430769 | 386 | 0.747798 |
d5ac2e69a394f9c8197b333ee6af5780a2e20f3d | 3,006 | py | Python | stubborn/settings/base.py | s-nagaev/stubborn | 092c42f57a3e9f6704171d56ce0bee5f12b29519 | [
"MIT"
] | 1 | 2022-01-21T18:52:20.000Z | 2022-01-21T18:52:20.000Z | stubborn/settings/base.py | s-nagaev/stubborn | 092c42f57a3e9f6704171d56ce0bee5f12b29519 | [
"MIT"
] | 4 | 2022-01-07T10:08:18.000Z | 2022-02-06T10:15:22.000Z | stubborn/settings/base.py | s-nagaev/stubborn | c5ad0f02c70ea59af9ecddda76339ae3b3999cd3 | [
"MIT"
] | null | null | null | import os
import environ
env = environ.Env()
environ.Env.read_env()
# GENERAL
DEBUG = env.bool('DJANGO_DEBUG_MODE', default=False)
ALLOWED_HOSTS = ['*']
SECRET_KEY = env.str('SECRET_KEY')
ROOT_DIR = (environ.Path(__file__) - 3)
APPS_DIR = ROOT_DIR.path('apps')
BASE_DIR = os.path.dirname(os.path.dirname(os.path.absp... | 27.327273 | 91 | 0.700266 |
d5ac42d4bf2690ad4c57a19ea9a21403b195f080 | 1,987 | py | Python | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/image_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/image_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy_extras/image_utils.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def load_image(imagepath,
dirname='',
place_holder=False,
recursive=False,
ncase_cmp=True,
convert_callback=None,
verbose=False,
relpath=None,
check_existing=False,
force_reload=False):... | 56.771429 | 331 | 0.695521 |
d5ac72c87f4b2492ec52d9cec66b62d3024729e8 | 2,918 | py | Python | cc_attention/functions.py | sk-wu/CCNet | b5d70f8cdb5ffaf38fe920403c7351d7cf81bc3f | [
"MIT"
] | null | null | null | cc_attention/functions.py | sk-wu/CCNet | b5d70f8cdb5ffaf38fe920403c7351d7cf81bc3f | [
"MIT"
] | null | null | null | cc_attention/functions.py | sk-wu/CCNet | b5d70f8cdb5ffaf38fe920403c7351d7cf81bc3f | [
"MIT"
] | null | null | null | '''
This code is borrowed from Serge-weihao/CCNet-Pure-Pytorch
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Softmax
def INF(B,H,W):
return -torch.diag(torch.tensor(float("inf")).cuda().repeat(H),0).unsqueeze(0).repeat(B*W,1,1)
class CrissCrossAttention(nn.Module)... | 50.310345 | 176 | 0.655929 |
d5ac76b7ca0873b9542e4c4b7e02d5663907ed17 | 1,457 | py | Python | jhML/tutorial/dataset.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | jhML/tutorial/dataset.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | jhML/tutorial/dataset.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | import os
import gzip
import numpy as np
import jhML
from jhML import Dataset
from jhML.utils.download import get_file
class MNIST(Dataset):
num_class = 10
def __init__(self, train=True, flatten=False):
self.train = train
self.flatten = flatten
self._download_data()
self.le... | 28.019231 | 64 | 0.605353 |
d5ac7bef95fa3875bdcace005bad0c85f89f0e47 | 5,630 | py | Python | src/tests/illumidesk/authenticators/test_lti13_validator.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | src/tests/illumidesk/authenticators/test_lti13_validator.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | src/tests/illumidesk/authenticators/test_lti13_validator.py | Abhi94N/illumidesk | 4cf07e3bd278931ac404f7482e92a4ec35827aa9 | [
"MIT"
] | null | null | null | import pytest
from tornado.web import HTTPError
from unittest.mock import patch
from illumidesk.authenticators.validator import LTI13LaunchValidator
from tests.illumidesk.factory import factory_lti13_empty_platform_jwks
from tests.illumidesk.factory import dummy_lti13_id_token_complete
from tests.illumidesk.factory... | 32.732558 | 105 | 0.748668 |
d5ac822f11a511f2cb36098adb028310e767d10c | 1,540 | py | Python | scripts/setup.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | scripts/setup.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | scripts/setup.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | null | null | null | """The module that implements PyPI settings.
"""
import sys
from setuptools import find_packages
from setuptools import setup
sys.path.append('./')
from apysc import __version__
_DESCRIPTION: str = (
'apysc is a Python\'s frontend library to create '
'html and js file, that has the ActionScri... | 28.518519 | 74 | 0.612338 |
d5aca37c116246c25a3ce85d4764737341fb6762 | 3,343 | py | Python | color.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | color.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | color.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | import os
import sys
import urllib.request
# PREWORK (don't modify): import colors, save to temp file and import
tmp = os.getenv("TMP", "/tmp")
color_values_module = os.path.join(tmp, 'color_values.py')
urllib.request.urlretrieve(
'https://bites-data.s3.us-east-2.amazonaws.com/color_values.py',
color_values_mo... | 29.324561 | 78 | 0.535447 |
d5acbc41beea8f695d97a3a1e579901481d22dc6 | 831 | py | Python | solutions/1/main.py | mattykay/leetcode | 5439e4c0b0f1596462906a40e5b52de4195157e3 | [
"MIT"
] | null | null | null | solutions/1/main.py | mattykay/leetcode | 5439e4c0b0f1596462906a40e5b52de4195157e3 | [
"MIT"
] | null | null | null | solutions/1/main.py | mattykay/leetcode | 5439e4c0b0f1596462906a40e5b52de4195157e3 | [
"MIT"
] | null | null | null | from collections import defaultdict
class Solution:
def twoSum(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
# Compile dictionary in num:list[index] format
nums_dict = defaultdict(list)
for k, v in [(value, in... | 29.678571 | 73 | 0.53911 |
d5acc6d8938a59eac357d939ea7a2f95dadffa15 | 3,554 | py | Python | sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 2 | 2021-09-07T18:30:33.000Z | 2021-11-23T02:50:57.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | 4 | 2021-10-06T16:39:52.000Z | 2021-11-18T18:33:37.000Z | sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py | nittaya1990/azure-sdk-for-python | 13f2d0f0864d15d774c1bca4acc9694f048c496c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... | 46.763158 | 147 | 0.740574 |
d5aceae6fe6bd577eb82a205588f4ae9434d6f2e | 1,547 | py | Python | test/test_person_create_response.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | test/test_person_create_response.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | 14 | 2020-12-06T23:54:23.000Z | 2021-02-03T18:35:02.000Z | test/test_person_create_response.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Registry of Open Community Challenge API
The OpenAPI specification implemented by the Challenge Registries. # Introduction TBA # noqa: E501
The version of the OpenAPI document: 0.1.4
Contact: thomas.schaffter@sagebionetworks.org
Generated by: https://openapi-generator.tech
"... | 28.648148 | 104 | 0.698772 |
d5ad03501b2fe5d6a43cd9d2178f36f0166d75aa | 4,791 | py | Python | docs/conf.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | 1 | 2020-05-21T14:56:14.000Z | 2020-05-21T14:56:14.000Z | docs/conf.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | 3 | 2020-10-20T08:17:07.000Z | 2021-09-08T02:34:51.000Z | docs/conf.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | 1 | 2021-12-14T21:16:53.000Z | 2021-12-14T21:16:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# synmod documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 9 13:47:02 2017.
#
# 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
# auto... | 29.213415 | 77 | 0.682321 |
d5ad67224a8e226f0b7cca356d2b63efb1f1353d | 982 | py | Python | samples/example_02/scenario_01.py | cair/deep-rts | 7aa5dde0c5df10ae3a3d057e7b89641aec58e115 | [
"MIT"
] | 144 | 2018-07-13T07:47:50.000Z | 2022-03-31T06:29:50.000Z | samples/example_02/scenario_01.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 18 | 2019-03-29T10:37:01.000Z | 2022-03-02T12:47:34.000Z | samples/example_02/scenario_01.py | cair/DeepRTS | 2ea4de0993ea0ca2677fdb36a172779db4ce7868 | [
"MIT"
] | 23 | 2018-11-02T18:12:51.000Z | 2022-02-15T20:32:18.000Z | from DeepRTS import Engine
import cv2
if __name__ == "__main__":
# Minimal example of DeepRTS Scenario
num_episodes = 100000
config: Engine.Config = Engine.Config().defaults()
config.set_console_caption_enabled(True)
config.set_gui("Blend2DGui")
game: Engine.Game = Engine.scenario.GoldColl... | 28.057143 | 106 | 0.654786 |
d5ad7fd7e50500d24cfe587ebb9f2f174b2feb25 | 619 | py | Python | mothra/cf_celery.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 4 | 2017-12-13T10:59:42.000Z | 2019-11-03T17:26:19.000Z | mothra/cf_celery.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | 21 | 2017-04-05T08:03:54.000Z | 2022-03-11T23:16:03.000Z | mothra/cf_celery.py | xflows/clowdflows-backend | 9fae3a27d16035147bebac6efcd7617aec35e0f3 | [
"MIT"
] | null | null | null |
import os
from celery import Celery
from celery.schedules import crontab
from django.conf import settings
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mothra.settings')
app = Celery('mothra')
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(settings.INSTALLED_APPS, related_name='tasks')
a... | 24.76 | 75 | 0.739903 |
d5adb1498300cf2f3383ffb3bf6158530f81d579 | 2,633 | py | Python | teafacto/scripts/atis/atisseqtransdec.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 2 | 2016-06-28T23:41:42.000Z | 2017-01-14T12:41:36.000Z | teafacto/scripts/atis/atisseqtransdec.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 1 | 2016-04-20T20:09:20.000Z | 2016-08-17T19:02:47.000Z | teafacto/scripts/atis/atisseqtransdec.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 5 | 2016-07-18T17:05:18.000Z | 2018-10-13T05:40:05.000Z | import pickle
import numpy as np
from teafacto.blocks.seq.oldseqproc import SimpleSeqTransDec
from teafacto.scripts.atis.atisseqtrans import getdatamatrix, atiseval
from teafacto.util import argprun
from teafacto.use.recsearch import GreedySearch
def shiftdata(x, right=1):
if isinstance(x, np.ndarray):
... | 36.569444 | 154 | 0.68439 |
d5adb59769deff3d2f60fddd473f24e3fd241e16 | 7,041 | py | Python | mt940e_v2.py | bvermeulen/mt940---simple | 5c1de1be1af2ff9339cf25b2e1829020676acd51 | [
"MIT"
] | null | null | null | mt940e_v2.py | bvermeulen/mt940---simple | 5c1de1be1af2ff9339cf25b2e1829020676acd51 | [
"MIT"
] | null | null | null | mt940e_v2.py | bvermeulen/mt940---simple | 5c1de1be1af2ff9339cf25b2e1829020676acd51 | [
"MIT"
] | null | null | null | from tkinter import Tk, Label, Frame, Entry
import re
import pdb # noqa F401
PADDING = 7
FONT = ('courier', 10)
HELP_TEXT = ' s - skip, <start> <end> m - memo, '\
'<start> <end> p - payee, u - undo, press enter to complete transaction'
class Editor:
''' Class for editor to edit entries in Tkinter t... | 34.514706 | 84 | 0.493538 |
d5adbcfc3bdef009061f1bca096a4361fd8cf3ac | 6,550 | py | Python | lib/model/utils/net_utils.py | wyg1997/Pictures_Tamper_Detection | abcf2495abd6631ef2865a5f8fe43d31c9bb6fdb | [
"MIT"
] | 1 | 2020-03-06T09:16:35.000Z | 2020-03-06T09:16:35.000Z | lib/model/utils/net_utils.py | wyg1997/Pictures_Tamper_Detection | abcf2495abd6631ef2865a5f8fe43d31c9bb6fdb | [
"MIT"
] | null | null | null | lib/model/utils/net_utils.py | wyg1997/Pictures_Tamper_Detection | abcf2495abd6631ef2865a5f8fe43d31c9bb6fdb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import torchvision.models as models
from model.utils.config import cfg
import cv2
import pdb
import random
def save_net(fname, net):
import h5py
h5f = h5py.File(fname, mode='w'... | 33.589744 | 111 | 0.53084 |
d5adbf2cbb3c391baec0c53325b6b67de703ba4d | 1,682 | py | Python | species/data/vega.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/data/vega.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | species/data/vega.py | vandalt/species | 527dd900a60c4d691bd490569cd3b2007f9beead | [
"MIT"
] | null | null | null | """
Text
"""
import os
import urllib.request
import numpy as np
from astropy.io import fits
def add_vega(input_path,
database):
"""
Function for adding a flux-calibrated spectrum of Vega to the database.
Parameters
----------
input_path : str
Path of the data folder.
d... | 26.28125 | 75 | 0.59453 |
d5ade626aeba3838e2dc3934a83794158f1a2a6f | 4,486 | py | Python | test/test_common.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2019-12-06T06:08:40.000Z | 2019-12-06T06:08:40.000Z | test/test_common.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 10 | 2021-02-03T16:45:53.000Z | 2021-04-07T16:24:17.000Z | test/test_common.py | knarflin/CrypTen | 6a06dc8cd52200f40a9fc520be0066bd0dea6b14 | [
"MIT"
] | 1 | 2021-02-10T06:15:02.000Z | 2021-02-10T06:15:02.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import sys
import unittest
import crypten
import torch
from crypten.common.util import chebyshev_series
from crypten.... | 34.244275 | 87 | 0.599643 |
d5ae11360276fcbb58464822e00c415edf605787 | 306 | py | Python | run.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | null | null | null | run.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | null | null | null | run.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from runner.application import create_app
#from runner.views import *
def main():
app = create_app()
if app.scheduler.running:
app.run(host='0.0.0.0', port=5000, use_reloader=False, reloader_type='watchdog')
if __name__ == '__main__':
main() | 23.538462 | 88 | 0.673203 |
d5ae116d7e62910af1199faf7bc7b3e436c8188e | 402 | py | Python | factom_sdk/utils/consts.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 7 | 2019-03-27T16:20:57.000Z | 2019-04-15T18:20:41.000Z | factom_sdk/utils/consts.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 11 | 2019-04-02T18:38:11.000Z | 2020-01-02T19:14:44.000Z | factom_sdk/utils/consts.py | FPriv/factom-harmony-connect-python-sdk | b853596e7ca15205e1b431f0d8af6ba423365fc7 | [
"MIT"
] | 3 | 2019-04-06T04:45:45.000Z | 2019-08-03T12:26:17.000Z | CHAINS_URL = "chains"
IDENTITIES_URL = "identities"
KEYS_STRING = "keys"
SEARCH_URL = "search"
IDENTITY_URL = "identities"
ENTRIES_URL = "entries"
FIRST_URL = "first"
LAST_URL = "last"
RECEIPTS_URL = "receipts"
ANCHORS_URL = "anchors"
PRIVATE_PREFIX_BYTES = bytearray([0x03, 0x45, 0xf3, 0xd0, 0xd6])
PUBLIC_PR... | 28.714286 | 65 | 0.723881 |
d5ae1caed5c27eb5077a20a5ca13ac5339741705 | 3,777 | py | Python | src/login/bklogin/api/utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/login/bklogin/api/utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/login/bklogin/api/utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS
Community Edition) available.
Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 35.632075 | 115 | 0.711146 |
d5ae25b65348c653c6a2a315704d8a6ccdc40cab | 2,965 | py | Python | setup.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2017-04-25T10:54:55.000Z | 2017-04-25T10:54:55.000Z | setup.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2022-02-10T06:48:36.000Z | 2022-02-10T06:48:36.000Z | setup.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Library setup, inspired by https://github.com/pypa/sampleproject"""
import json
from setuptools import setup, find_packages
EXCLUDE = ['*tests*', '*test_apps*', 'setup.py', 'node_modules', 'build', 'virtualenv', 'project']
with open('package.json') as json_data:
... | 32.582418 | 109 | 0.651602 |
d5ae32b827c1a09e28cb266fe94043492947af0d | 6,265 | py | Python | arjuna/tpi/guiauto/model/app.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/tpi/guiauto/model/app.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | arjuna/tpi/guiauto/model/app.py | ChandraMouliDisturbs/arjuna | 4965622fbb01a5e5b6459110c413accc5c483424 | [
"Apache-2.0"
] | null | null | null | # This file is a part of Arjuna
# Copyright 2015-2020 Rahul Verma
# Website: www.RahulVerma.net
# 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.435583 | 212 | 0.672147 |
d5ae3d780a802fd5bb8fdb561099b8be6b4eb531 | 686 | py | Python | migrations/versions/4f3a5a86655a_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | 1 | 2021-10-17T13:28:51.000Z | 2021-10-17T13:28:51.000Z | migrations/versions/4f3a5a86655a_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | migrations/versions/4f3a5a86655a_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 4f3a5a86655a
Revises: ce1cee954334
Create Date: 2021-12-16 13:00:13.700475
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '4f3a5a86655a'
down_revision = 'ce1cee954334'
branch_labels = None
depends_on = None
def upgrade():
# ... | 23.655172 | 94 | 0.705539 |
d5ae431b77170fe52932cb547c399cc17c5268f6 | 4,094 | py | Python | setup.py | limix/setup | 049aa757423c5b8f9aee2310d6da035630e37db5 | [
"MIT"
] | null | null | null | setup.py | limix/setup | 049aa757423c5b8f9aee2310d6da035630e37db5 | [
"MIT"
] | null | null | null | setup.py | limix/setup | 049aa757423c5b8f9aee2310d6da035630e37db5 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import pprint
import re
import sys
from ast import literal_eval
from os import chdir, getcwd
from os.path import abspath, dirname, join
from importlib import import_module
from setuptools import find_packages, setup
PY2 = sys.version_info[0] == 2
if PY2:
string_types = un... | 25.116564 | 77 | 0.66512 |
d5ae8e16a237e9ae9520b16bcc77444ed43801a9 | 16,883 | py | Python | nicu_los/src/tests/test_ga_extractor.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | 2 | 2020-06-25T20:34:30.000Z | 2021-10-09T09:30:32.000Z | nicu_los/src/tests/test_ga_extractor.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | null | null | null | nicu_los/src/tests/test_ga_extractor.py | bt-s/NICU-length-of-stay-prediction | 8ae2f72ba90996c552e17edce9b0bcddff43eb8f | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""test_ga_extractor.py
- Contains tests for testing the extract_gest_age_from_note() function.
"""
__author__ = "Bas Straathof"
from nicu_los.src.preprocessing.process_mimic3_tables import \
extract_gest_age_from_note
from nicu_los.src.utils.reg_exps import reg_exps
import unittest
e... | 37.269316 | 81 | 0.559261 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.