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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79ce091105b52bbfdf911f15848b852a33623054 | 298,516 | py | Python | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 46.570359 | 339 | 0.680339 |
79ce0b4002f3aad3c31a93fd0df9492af3ce5e78 | 1,547 | py | Python | bot/commands/editcommandmods.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 20 | 2017-09-08T21:13:38.000Z | 2022-01-29T03:24:13.000Z | bot/commands/editcommandmods.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 32 | 2017-08-20T17:46:14.000Z | 2021-11-18T22:54:59.000Z | bot/commands/editcommandmods.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 10 | 2017-08-19T01:13:41.000Z | 2021-08-07T08:45:30.000Z | """Commands: "!addmod", "!delmod"."""
from bot.commands.abstract.command import Command
from bot.utilities.permission import Permission
from bot.utilities.tools import replace_vars
class EditCommandMods(Command):
"""Command for owners to add or delete mods to list of trusted mods."""
perm = Permission.Admin... | 35.976744 | 87 | 0.581125 |
79ce1bb60d8b892be4124dc92764f61350f0a11b | 56,069 | py | Python | pyseqlab/linear_chain_crf.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 6 | 2019-05-03T22:14:11.000Z | 2022-03-04T10:36:31.000Z | pyseqlab/linear_chain_crf.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 1 | 2020-11-12T02:46:15.000Z | 2020-11-12T03:12:45.000Z | pyseqlab/linear_chain_crf.py | bratao/-PySeqLab | fea1c4bd4d43565b1bb20a789d78946e1022d0ff | [
"MIT"
] | 3 | 2019-05-04T03:50:49.000Z | 2020-06-27T00:43:29.000Z | """
@author: ahmed allam <ahmed.allam@yale.edu>
"""
import os
from copy import deepcopy
from collections import OrderedDict
import numpy
from .utilities import ReaderWriter, create_directory, vectorized_logsumexp
class LCRFModelRepresentation(object):
"""Model representation that will hold data structures to be... | 41.318349 | 168 | 0.566409 |
79ce2ea7a8a279bd7a4fe81d6abcf4f894b24be5 | 663 | py | Python | imagefactory_plugins/vSphere/__init__.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | 1 | 2019-06-16T07:05:24.000Z | 2019-06-16T07:05:24.000Z | imagefactory_plugins/vSphere/__init__.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | null | null | null | imagefactory_plugins/vSphere/__init__.py | henrysher/imgfac | e0979139a93b055f018f460b1404cc9b1796c838 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.833333 | 76 | 0.739065 |
79ce46a415ea0eb8b706c3ca234a4a06bde773ab | 839 | py | Python | dev/cursor.py | Riptide00/pretty_console | 8fc7f45e4515b5eb465becdd4ee663e306a24604 | [
"MIT"
] | 1 | 2017-11-08T15:22:20.000Z | 2017-11-08T15:22:20.000Z | package/cursor.py | Riptide00/pretty_console | 8fc7f45e4515b5eb465becdd4ee663e306a24604 | [
"MIT"
] | null | null | null | package/cursor.py | Riptide00/pretty_console | 8fc7f45e4515b5eb465becdd4ee663e306a24604 | [
"MIT"
] | null | null | null | """Hide/ show cursor on Windows."""
import ctypes
class _CursorInfo(ctypes.Structure):
_fields_ = [("size", ctypes.c_int),
("visible", ctypes.c_byte)]
def hide():
"""Hide cursor."""
ci = _CursorInfo()
handle = ctypes.windll.kernel32.GetStdHandle(-11)
ctypes.windll.kernel32.GetCon... | 27.064516 | 73 | 0.66031 |
79ce6dd4c61a51f04e3011715458cbcc4190f53c | 23,939 | py | Python | fabric_cf/actor/core/kernel/resource_set.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | fabric_cf/actor/core/kernel/resource_set.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/core/kernel/resource_set.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to ... | 40.166107 | 115 | 0.65245 |
79ce7a2305a0a4c5073c9909f1766e795d80e85d | 13,407 | py | Python | tests/test_convert_inline_link_to_reference.py | xamronpc/MarkdownEditing | 9e96fa62badefddee1e71233c8aa348670662954 | [
"MIT"
] | null | null | null | tests/test_convert_inline_link_to_reference.py | xamronpc/MarkdownEditing | 9e96fa62badefddee1e71233c8aa348670662954 | [
"MIT"
] | null | null | null | tests/test_convert_inline_link_to_reference.py | xamronpc/MarkdownEditing | 9e96fa62badefddee1e71233c8aa348670662954 | [
"MIT"
] | null | null | null | from MarkdownEditing.tests import DereferrablePanelTestCase
class TestConvertInlineLinkToReference(DereferrablePanelTestCase):
def setUp(self):
self.setBlockText(
"""
# Test 1
First [GitHub](https://github.com) inline link.
[Issues](https://github.com/user/r... | 29.993289 | 90 | 0.53211 |
79ceb2b3ffe4fc95f4f468e95b8c85feb53b21c9 | 6,249 | py | Python | src/bloombox/schema/analytics/context/Library_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/analytics/context/Library_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/analytics/context/Library_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: analytics/context/Library.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf im... | 46.634328 | 851 | 0.776604 |
79ceb776fe5b9306c92cc2f9ac58460cb87e570f | 11,330 | py | Python | moto/ec2/exceptions.py | argos83/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2021-03-06T22:01:41.000Z | 2021-03-06T22:01:41.000Z | moto/ec2/exceptions.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | null | null | null | moto/ec2/exceptions.py | marciogh/moto | d3df810065c9c453d40fcc971f9be6b7b2846061 | [
"Apache-2.0"
] | 1 | 2017-10-19T00:53:28.000Z | 2017-10-19T00:53:28.000Z | from __future__ import unicode_literals
from moto.core.exceptions import RESTError
class EC2ClientError(RESTError):
code = 400
class DependencyViolationError(EC2ClientError):
def __init__(self, message):
super(DependencyViolationError, self).__init__(
"DependencyViolation", message)
cl... | 34.43769 | 85 | 0.671492 |
79cecc171b07ceffe107d7c5517dbdb1cd29d55a | 5,487 | py | Python | nova/db/sqlalchemy/utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2021-09-10T15:29:02.000Z | 2021-09-10T15:29:02.000Z | nova/db/sqlalchemy/utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/db/sqlalchemy/utils.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright (c) 2013 Boris Pavlovic (boris@pavlovic.me).
# 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... | 40.345588 | 79 | 0.658465 |
79cee333d1bd3cdb91007d38eb9673f481186735 | 6,474 | py | Python | codes/Day16_EFN_aug.py | jason022085/AIFER | 3d5b8826c41922ed1ea39b7d55446ec44773735d | [
"MIT"
] | 1 | 2021-10-03T12:47:52.000Z | 2021-10-03T12:47:52.000Z | codes/Day16_EFN_aug.py | jason022085/AIFER | 3d5b8826c41922ed1ea39b7d55446ec44773735d | [
"MIT"
] | null | null | null | codes/Day16_EFN_aug.py | jason022085/AIFER | 3d5b8826c41922ed1ea39b7d55446ec44773735d | [
"MIT"
] | null | null | null | # %%
from tensorflow.keras.callbacks import LearningRateScheduler
from tensorflow.keras.preprocessing.image import random_rotation, random_shear, random_zoom
from sklearn.metrics import confusion_matrix, classification_report
from tensorflow.keras.applications.efficientnet import preprocess_input
from tensorflow.keras.... | 35.767956 | 91 | 0.674235 |
79cf305fa053fa04c24f392c00f4b2b6d067929e | 20,881 | py | Python | trash/project_secret.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | 1 | 2022-02-11T06:52:03.000Z | 2022-02-11T06:52:03.000Z | trash/project_secret.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | null | null | null | trash/project_secret.py | sammck/cloud-dev-box | 2af013c77418910fef701a1fccc71f8908c3a73d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Simple tools for getting/setting project-scoped secrets. Supports arbitrary JSON-compatible secrets.
Makes use of the "keyring" package to actually store/retrieve secrets.
.project-secret.json:
{
"version": "1.0",
"keyring_backend_package": "keyring.backends.SecretService.Keyring",
... | 34.859766 | 191 | 0.7026 |
79cf8c381f3ea775524a1c9e60eca130529ef141 | 4,046 | py | Python | alipay/aop/api/request/AlipayEbppInvoiceMerchantEnterstatusQueryRequest.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/request/AlipayEbppInvoiceMerchantEnterstatusQueryRequest.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/request/AlipayEbppInvoiceMerchantEnterstatusQueryRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppInvoiceMerchantEnterstatusQueryModel import AlipayEbppInvoiceMerchantEnterstatusQueryModel
class AlipayEbppInvoiceMerchant... | 27.903448 | 148 | 0.651013 |
79cffaf80d80326db2a62f268abf1f215a764532 | 4,944 | py | Python | tempest/scenario/midokura/test_network_basic_security_groups_netcat.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/scenario/midokura/test_network_basic_security_groups_netcat.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/scenario/midokura/test_network_basic_security_groups_netcat.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 41.2 | 78 | 0.641181 |
79d01877f3198f95bc6beac3cf56bfa5bf3bf7b4 | 739 | py | Python | tests/conftest.py | cdvx/movies | e03560627c501e5f4ca8ccbfe17d47f71ba49203 | [
"MIT"
] | null | null | null | tests/conftest.py | cdvx/movies | e03560627c501e5f4ca8ccbfe17d47f71ba49203 | [
"MIT"
] | null | null | null | tests/conftest.py | cdvx/movies | e03560627c501e5f4ca8ccbfe17d47f71ba49203 | [
"MIT"
] | null | null | null | """Module for setting up testing fixtures"""
# Third-party libraries
import pytest
from flask import current_app, Response
# Local imports
from application import create_app
from app.db import MovieStore
# constants
from app.utils import BASE_URL
@pytest.yield_fixture(scope='session')
def app_():
"""
Setup ... | 18.948718 | 67 | 0.675237 |
79d01a98f36f15a01eb432d51f33088d799e3ade | 1,881 | py | Python | manage.py | eshta/authentek | c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4 | [
"MIT"
] | null | null | null | manage.py | eshta/authentek | c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4 | [
"MIT"
] | null | null | null | manage.py | eshta/authentek | c81e5e6bd3f0cc68f224fb92b663445f8d1ee4d4 | [
"MIT"
] | null | null | null | # manage.py
import os
import unittest
import coverage
from flask_script import Manager
from authentek.app import create_app as initialize_app
from authentek.logger import log
from authentek.extensions import db, migrate
from authentek.database.models import User, BlacklistToken # noqa
from flask_migrate import Mi... | 22.129412 | 81 | 0.682084 |
79d01cc92282677a807b079dbc469f66dac66b5b | 5,378 | py | Python | sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/eventhub/azure-eventhub/samples/async_samples/iot_hub_connection_string_receive_async.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | #!/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.
# ---------------------------------------------... | 42.346457 | 120 | 0.669766 |
79d01d7244d1235ae6986674819c76597194ae85 | 411 | py | Python | describe/describe/descriptors/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | describe/describe/descriptors/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | describe/describe/descriptors/__init__.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | from describe.descriptors.descriptor import Descriptor
from describe.descriptors.mbtr import MBTR
from describe.descriptors.ewaldmatrix import EwaldMatrix
from describe.descriptors.coulombmatrix import CoulombMatrix
from describe.descriptors.sortedcoulombmatrix import SortedCoulombMatrix
from describe.descriptors.sinem... | 51.375 | 72 | 0.89781 |
79d04cdaadde28e6eb317544197aa9cb92fd3168 | 1,355 | py | Python | missioncontrol/home/migrations/0003_groundstation.py | fleetspace/missioncontrol | d7116569b689875f5d149273150c3ce4c1319cd0 | [
"Apache-2.0"
] | 7 | 2019-03-29T06:05:08.000Z | 2021-07-29T07:49:49.000Z | missioncontrol/home/migrations/0003_groundstation.py | fleetspace/missioncontrol | d7116569b689875f5d149273150c3ce4c1319cd0 | [
"Apache-2.0"
] | 18 | 2019-02-19T05:59:34.000Z | 2021-05-18T03:05:30.000Z | missioncontrol/home/migrations/0003_groundstation.py | fleetspace/missioncontrol | d7116569b689875f5d149273150c3ce4c1319cd0 | [
"Apache-2.0"
] | 3 | 2019-01-31T02:07:38.000Z | 2019-08-04T14:52:02.000Z | # Generated by Django 2.1.3 on 2018-11-20 22:16
import django.core.validators
from django.db import migrations, models
import home.models
class Migration(migrations.Migration):
dependencies = [("home", "0002_better_satellites")]
operations = [
migrations.CreateModel(
name="GroundStation... | 32.261905 | 84 | 0.450923 |
79d05ea7657470ee8da337e52aca39184a316599 | 20,677 | py | Python | scripts/main.py | geetickachauhan/relation-extraction | aa920449b20c7127954eaaaa05244e7fc379e018 | [
"MIT"
] | 19 | 2019-06-24T18:33:36.000Z | 2022-01-21T03:16:12.000Z | scripts/main.py | geetickachauhan/relation-extraction | aa920449b20c7127954eaaaa05244e7fc379e018 | [
"MIT"
] | null | null | null | scripts/main.py | geetickachauhan/relation-extraction | aa920449b20c7127954eaaaa05244e7fc379e018 | [
"MIT"
] | 11 | 2019-06-02T08:59:16.000Z | 2021-08-23T04:31:07.000Z | '''
Author: Geeticka Chauhan
Main file to be run for replicating experiments in this work
'''
from __future__ import print_function
from __future__ import division
import numpy as np
import tensorflow as tf
import logging
import os
import sys
sys.path.append('..')
import time
import random
import uuid # for generati... | 50.555012 | 150 | 0.651448 |
79d05ff20fcef1c4314218f9a810d55d3c8fe9d9 | 784 | py | Python | pre_request/filters/base.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 86 | 2017-08-17T12:41:52.000Z | 2022-02-24T12:17:47.000Z | mask/parse/filters/base.py | Eastwu5788/Mask | 6df8d6c26ec095e6c6c78101087c452e7bc713df | [
"MIT"
] | 10 | 2020-03-30T03:24:46.000Z | 2022-02-23T01:34:53.000Z | pre_request/filters/base.py | Eastwu5788/pre-request | 6e51076ef9260d5fcf56dc513ad0240f04ce4938 | [
"MIT"
] | 7 | 2017-08-18T03:40:35.000Z | 2020-05-19T04:09:10.000Z | # !/usr/local/python/bin/python
# -*- coding: utf-8 -*-
# (C) Wu Dong, 2019
# All rights reserved
# @Author: 'Wu Dong <wudong@eastwu.cn>'
# @Time: '2020-03-17 15:34'
class BaseFilter:
""" Base class for filter object
"""
def __init__(self, key, value, rule):
"""
初始化过滤器
:param key:... | 21.189189 | 73 | 0.544643 |
79d0b7a88cfb8bb265ceafb8f6b0ea4effda7228 | 13,610 | py | Python | Examples/torch/compression/channel_pruning.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 1 | 2022-01-22T10:17:30.000Z | 2022-01-22T10:17:30.000Z | Examples/torch/compression/channel_pruning.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | null | null | null | Examples/torch/compression/channel_pruning.py | lipovsek/aimet | 236fb02cc6c45e65c067030416c49a09ace82045 | [
"BSD-3-Clause"
] | 1 | 2022-02-08T22:06:07.000Z | 2022-02-08T22:06:07.000Z | # =============================================================================
#
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2021, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following con... | 45.97973 | 139 | 0.650992 |
79d0b8db059c4d534bfdca6d63eefa3222f50c7e | 24,021 | py | Python | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_generated/v7_1/models/_models.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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.90583 | 129 | 0.629824 |
79d0eb28af9c84aae4d1890802e3a50f2e304886 | 4,406 | py | Python | pyOCD/pyDAPAccess/interface/pywinusb_backend.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 2 | 2019-07-18T06:51:27.000Z | 2021-06-30T00:36:12.000Z | pyOCD/pyDAPAccess/interface/pywinusb_backend.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | null | null | null | pyOCD/pyDAPAccess/interface/pywinusb_backend.py | oliviermartin/pyOCD | 87ca6b91477db7d458960504f2103dae9b7a319f | [
"Apache-2.0"
] | 1 | 2017-07-20T20:47:18.000Z | 2017-07-20T20:47:18.000Z | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 ... | 32.397059 | 82 | 0.598956 |
79d1581608f268d7986c2b98702b576be2a1478e | 32,036 | py | Python | mslib/msui/editor.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 33 | 2020-12-04T04:29:28.000Z | 2022-03-05T17:11:49.000Z | mslib/msui/editor.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 614 | 2020-12-06T16:54:44.000Z | 2022-03-31T07:41:02.000Z | mslib/msui/editor.py | aravindm711/MSS | 128687ec036d445656a70ff4b82c3cb7586715e4 | [
"Apache-2.0"
] | 51 | 2020-12-04T15:10:46.000Z | 2022-03-20T02:02:11.000Z | # -*- coding: utf-8 -*-
"""
mslib.msui.editor
~~~~~~~~~~~~~~~~~~~~~~
config editor for mss_settings.json.
This file is part of mss.
:copyright: Copyright 2020 Vaibhav Mehra <veb7vmehra@gmail.com>
:copyright: Copyright 2020-2021 by the mss team, see AUTHORS.
:license: APACHE-2.0, see LICE... | 45.184767 | 119 | 0.608347 |
79d15ef07436f34dd05648f8867b63a20b7aa4d0 | 8,567 | py | Python | esperclient/models/emm_device.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | esperclient/models/emm_device.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | esperclient/models/emm_device.py | pallavigopi/esper-client-py | f7e71d3f25a5d91f35628b414e8abe9e6849d316 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
ESPER API REFERENCE
OpenAPI spec version: 1.0.0
Contact: developer@esper.io
---------------------------------------------------------
Copyright 2019 Shoonya Enterprises Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Li... | 25.421365 | 171 | 0.584802 |
79d1741bed1763b635eeecd90ae671759feee6be | 1,703 | py | Python | sh/scripts/view_infra_nodes.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | sh/scripts/view_infra_nodes.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | sh/scripts/view_infra_nodes.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import argparse
from beautifultable import BeautifulTable
from stests.core import cache
from stests.core import factory
from stests.core.utils import args_validator
from stests.core.utils import cli as utils
from stests.core.utils import env
# CLI argument parser.
ARGS = argparse.ArgumentParser("List set of nodes r... | 23.652778 | 78 | 0.662361 |
79d17f49fcdff42efd34ddc7dae3b00c11021b68 | 6,128 | py | Python | ooni/utils/net.py | irl/ooni-probe | c21861c28ca6bd667715872d099006fab87222fd | [
"BSD-2-Clause"
] | 24 | 2018-12-23T12:53:57.000Z | 2022-01-19T19:50:53.000Z | ooni/utils/net.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 64 | 2018-09-13T08:26:20.000Z | 2022-02-11T03:48:34.000Z | ooni/utils/net.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 9 | 2019-06-10T01:41:48.000Z | 2022-01-08T08:46:25.000Z | import sys
import socket
from random import randint
from zope.interface import implements
from twisted.internet import defer
from twisted.internet.protocol import Factory, Protocol
from twisted.web.iweb import IBodyProducer
from scapy.config import conf
from ooni.errors import IfaceError
# This is our own connectPr... | 30.039216 | 105 | 0.623858 |
79d1e6c20a1600e6474fc20c5c0a8fe649d98e93 | 16,397 | py | Python | lib/matplotlib/afm.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/afm.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/afm.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
This is a python interface to Adobe Font Metrics Files. Although a
number of other python implementations exist, and may be more complete
than this, it was decided not to go with them because they were
either:
1) copyrighted or used a non-BSD compatible license
2) had too many dependencies and a free standin... | 29.332737 | 79 | 0.565164 |
79d1f56276d438850cac3f09e5f5fc7cd33f24ac | 961 | py | Python | botoflow/workers/__init__.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | botoflow/workers/__init__.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | botoflow/workers/__init__.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | # Copyright 2013 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | 48.05 | 78 | 0.824142 |
79d227697183e9055f14366d60f9ffe828d3dca3 | 177 | py | Python | synmod/__init__.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | null | null | null | synmod/__init__.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | null | null | null | synmod/__init__.py | Craven-Biostat-Lab/synmod | 433e2f1726e68acbc45f226b1235f15508156de1 | [
"MIT"
] | null | null | null | """Top-level package for synmod."""
__author__ = """Akshay Sood"""
__email__ = "sood.iitd@gmail.com"
__version__ = "0.1.4"
from synmod.master import synthesize # noqa: F401
| 19.666667 | 50 | 0.694915 |
79d22fe0a0340fcdd048050d8ab15cdfe05f5592 | 173 | py | Python | disassembler/formats/__init__.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 12 | 2015-11-24T22:43:14.000Z | 2021-03-24T05:01:43.000Z | disassembler/formats/__init__.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 1 | 2015-04-22T17:26:31.000Z | 2015-04-22T17:48:38.000Z | disassembler/formats/__init__.py | jchristman/PyDA | 25a1091bfff369736e534424ddbdc426ba32a3a0 | [
"BSD-3-Clause"
] | 9 | 2015-03-05T17:43:47.000Z | 2021-03-19T14:29:49.000Z | import os,glob
filenames = [os.path.splitext(os.path.basename(f))[0] for f in glob.glob(os.path.dirname(__file__)+"/*.py")]
filenames.remove('__init__')
__all__ = filenames
| 34.6 | 108 | 0.734104 |
79d254890d112944a81658f36c2e961c6a998cc6 | 11,890 | py | Python | comancpipeline/Tools/Coordinates.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | 5 | 2019-03-05T11:56:13.000Z | 2022-02-16T17:24:07.000Z | comancpipeline/Tools/Coordinates.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | null | null | null | comancpipeline/Tools/Coordinates.py | SharperJBCA/COMAPreduce | 6722c2f59b4968c24b81be4a0f4b12955e270d2b | [
"MIT"
] | 2 | 2021-02-12T14:32:51.000Z | 2021-03-10T08:44:44.000Z | from comancpipeline.Tools import pysla
import numpy as np
import healpy as hp
# List of sources used for calibration
# Ephem objects have None, calculated on the fly
CalibratorList = {
'TauA': [(5 + 34./60. + 31.94/60.**2)*15, 22 + 0 + 52.2/60.**2],
'CasA': [(23 + 23./60. + 24./60.**2)*15, 58 + 48/60. + 54./60... | 23.923541 | 126 | 0.562489 |
79d25a4f9e80ece06d2e721349a1996391fbe3cc | 1,133 | py | Python | models/car.py | pfspontus/lexwheels | 0386b7bf3169c322b24e7c54037033079a38afdf | [
"MIT"
] | null | null | null | models/car.py | pfspontus/lexwheels | 0386b7bf3169c322b24e7c54037033079a38afdf | [
"MIT"
] | null | null | null | models/car.py | pfspontus/lexwheels | 0386b7bf3169c322b24e7c54037033079a38afdf | [
"MIT"
] | null | null | null | """
SQLAlchemy Car model class
"""
def init(db):
class Car(db.Model):
id = db.Column(db.Integer, primary_key=True)
owner_id = db.Column(db.Integer,
db.ForeignKey('owner.id'),
nullable=False)
owner = db.relationship('Owner',
... | 30.621622 | 70 | 0.461606 |
79d26c7f3005e3186e0ced0142d119906a32a417 | 56,825 | py | Python | testtools/testresult/real.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | testtools/testresult/real.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | testtools/testresult/real.py | elopio/testtools-textresult | 04384df526e1111834a6801d70d4c13052a4d261 | [
"MIT"
] | null | null | null | # Copyright (c) 2008-2012 testtools developers. See LICENSE for details.
"""Test results and related things."""
__metaclass__ = type
__all__ = [
'ExtendedToOriginalDecorator',
'ExtendedToStreamDecorator',
'MultiTestResult',
'StreamFailFast',
'StreamResult',
'StreamSummary',
'StreamTagger',... | 35.806553 | 79 | 0.634668 |
79d2790481e750a31aef96ba111531c72825ae99 | 139 | py | Python | signver/extractor/pretrainedextractor.py | victordibia/signver | e547177b5dab542c6d242566675ddb9468dadc08 | [
"MIT"
] | 4 | 2021-09-06T13:02:05.000Z | 2022-03-20T15:22:45.000Z | signver/extractor/pretrainedextractor.py | victordibia/signver | e547177b5dab542c6d242566675ddb9468dadc08 | [
"MIT"
] | null | null | null | signver/extractor/pretrainedextractor.py | victordibia/signver | e547177b5dab542c6d242566675ddb9468dadc08 | [
"MIT"
] | 1 | 2022-03-04T16:20:52.000Z | 2022-03-04T16:20:52.000Z | from signver.extractor import BaseExtractor
class PretrainedExtractor(BaseExtractor):
def __init__(self):
super().__init__()
| 19.857143 | 43 | 0.748201 |
79d28265640827e7bd0b40a913e45f5f62e5168d | 5,189 | py | Python | dataproc/concat_and_split.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | 1 | 2019-12-05T15:23:11.000Z | 2019-12-05T15:23:11.000Z | dataproc/concat_and_split.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | null | null | null | dataproc/concat_and_split.py | acadTags/caml-mimic | 4d81c3ef5ed5ad76fa9a728f9494d7871fa050be | [
"MIT"
] | null | null | null | """
Concatenate the labels with the notes data and split using the saved splits
"""
import csv
from datetime import datetime
import random
from constants import DATA_DIR
from constants import MIMIC_3_DIR
import pandas as pd
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S"
def concat_data(labelsfile, notes_file):
"""
... | 33.050955 | 113 | 0.568125 |
79d28c61ce9af06fccc40d2849f5a04c3a09af70 | 3,519 | py | Python | openapi_client/models/bad_request_source.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/bad_request_source.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/bad_request_source.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 28.379032 | 97 | 0.583689 |
79d2a7d96f09d93c81080cbc7446e024e91be1fd | 797 | py | Python | migrations/versions/d5353fa1f0bd_initial_migration.py | BeatriceWambui/my-blog | 88137cab1a0e1c4325bd7437a7f1a88225b96ef8 | [
"MIT"
] | null | null | null | migrations/versions/d5353fa1f0bd_initial_migration.py | BeatriceWambui/my-blog | 88137cab1a0e1c4325bd7437a7f1a88225b96ef8 | [
"MIT"
] | 1 | 2021-06-02T00:26:57.000Z | 2021-06-02T00:26:57.000Z | migrations/versions/d5353fa1f0bd_initial_migration.py | BeatriceWambui/my-blog | 88137cab1a0e1c4325bd7437a7f1a88225b96ef8 | [
"MIT"
] | null | null | null | """Initial Migration
Revision ID: d5353fa1f0bd
Revises: 0b6bfbce4494
Create Date: 2019-09-23 23:35:44.517817
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd5353fa1f0bd'
down_revision = '0b6bfbce4494'
branch_labels = None
depends_on = None
def upgrade():
... | 25.709677 | 80 | 0.690088 |
79d2dc60f3fc65c24bdf57d84fd9a0f6817285d4 | 564 | py | Python | 985.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | 985.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | 985.py | BLUECARVIN/LeetCode | 0d085ed2dbee47c57d22ac368872161076369ff9 | [
"MIT"
] | null | null | null | class Solution:
def sumEvenAfterQueries(self, A: List[int], queries: List[List[int]]) -> List[int]:
ans = []
times = len(queries)
A_len = len(A)
for i in range(times):
temp = 0
val = queries[i][0]
index = queries[i][1]
... | 25.636364 | 87 | 0.379433 |
79d2f18a538af40e53012152cbc70574e92bdf9e | 235 | py | Python | odin/conf.py | tbobm/odin | d53208845776f0fa166b954f35613c9ba52bdb26 | [
"MIT"
] | 3 | 2020-03-12T14:16:52.000Z | 2021-01-19T08:50:49.000Z | odin/conf.py | tbobm/odin | d53208845776f0fa166b954f35613c9ba52bdb26 | [
"MIT"
] | 21 | 2020-03-11T14:05:04.000Z | 2020-09-15T20:01:19.000Z | odin/conf.py | tbobm/odin | d53208845776f0fa166b954f35613c9ba52bdb26 | [
"MIT"
] | null | null | null | """Configuration variables."""
import os
HTTP_TIMEOUT = os.environ.get('ODIN_HTTP_TIMEOUT', 5)
SLEEPY_DURATION = int(os.environ.get('ODIN_SLEEP_DURATION', "30"))
CONFIG_LOCATION = os.environ.get("ODIN_CONFIG_FILE", "/app/odin.yaml")
| 29.375 | 70 | 0.753191 |
79d354586f24afdf1aa36825291265ec8d2fde37 | 521 | py | Python | contrib/python/src/python/pants/contrib/python/checks/tasks/python_eval_subsystem.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | contrib/python/src/python/pants/contrib/python/checks/tasks/python_eval_subsystem.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/python_eval_subsystem.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.subsystem.subsystem import Subsystem
class PythonEval(Subsystem):
options_scope = "python-eval"
@classmethod
def register_options(cls, register):
super()... | 26.05 | 72 | 0.641075 |
79d3786735db1f9a56f86ec002147f6324282ada | 2,237 | py | Python | setup.py | goodok/composed-trackers | d7d277dbceefd69ab8632da9848bba6d4ceea7df | [
"MIT"
] | 2 | 2020-02-15T22:25:04.000Z | 2020-02-26T11:03:25.000Z | setup.py | goodok/composed-trackers | d7d277dbceefd69ab8632da9848bba6d4ceea7df | [
"MIT"
] | 1 | 2020-02-19T20:05:01.000Z | 2020-02-20T10:35:20.000Z | setup.py | goodok/composed-trackers | d7d277dbceefd69ab8632da9848bba6d4ceea7df | [
"MIT"
] | null | null | null | # This source code is licensed under the MIT-style license found in the
# LICENSE file in the root directory of this source tree.
from setuptools import setup, find_packages
import re
__version__ = ""
exec(open('composed_trackers/version.py').read())
# from fastai:
# helper functions to make it easier to list depen... | 29.051948 | 124 | 0.686634 |
79d39a2c8de44f3b670f2e622fc5a99d007c7bf1 | 8,764 | py | Python | projects/tutorials/object_nav_ithor_ppo_one_object.py | prithv1/allenact | ee736e6a3aeed29b3661ee18fa0dc0a68a40201e | [
"MIT"
] | 1 | 2020-09-10T13:09:14.000Z | 2020-09-10T13:09:14.000Z | projects/tutorials/object_nav_ithor_ppo_one_object.py | andrlima/allenact | f29dd6f0ec62425b02ca07fee815b1a82627a28e | [
"MIT"
] | null | null | null | projects/tutorials/object_nav_ithor_ppo_one_object.py | andrlima/allenact | f29dd6f0ec62425b02ca07fee815b1a82627a28e | [
"MIT"
] | null | null | null | from math import ceil
from typing import Dict, Any, List, Optional
import gym
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import LambdaLR
from core.algorithms.onpolicy_sync.losses import PPO
from core.algorithms.onpolicy_sync.losses.ppo import PPOCon... | 35.771429 | 106 | 0.618667 |
79d3a09f3e2309826ad55aee35f7406c8defc579 | 574 | py | Python | jina/helloworld/fork.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | jina/helloworld/fork.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | jina/helloworld/fork.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | import os
import shutil
from jina.logging.predefined import default_logger
def fork_hello(args) -> None:
"""Fork the hello world demos into a new directory
:param args: the arg from cli
"""
from_path = os.path.join(os.path.dirname(__file__), args.project)
shutil.copytree(from_path, args.destina... | 23.916667 | 78 | 0.675958 |
79d3d3f4dd7813017480c13214f728e3cfb1f7b4 | 403 | py | Python | main/migrations/0006_car_car_image.py | Nyota254/under-the-hood | 83acbb8419731b2c8d626c296ce0b47f560edb2f | [
"MIT"
] | null | null | null | main/migrations/0006_car_car_image.py | Nyota254/under-the-hood | 83acbb8419731b2c8d626c296ce0b47f560edb2f | [
"MIT"
] | null | null | null | main/migrations/0006_car_car_image.py | Nyota254/under-the-hood | 83acbb8419731b2c8d626c296ce0b47f560edb2f | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-31 13:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0005_auto_20191031_0908'),
]
operations = [
migrations.AddField(
model_name='car',
name='car_image',
... | 21.210526 | 72 | 0.602978 |
79d43f97089bae3f966b508d29eef40d791258c6 | 32,223 | py | Python | sdk/batch/azure-batch/azure/batch/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/batch/azure-batch/azure/batch/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/batch/azure-batch/azure/batch/models/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 39.683498 | 80 | 0.785433 |
79d455d7373632eee417235125feb6e7ed33282c | 4,246 | py | Python | latent/pair_plots.py | ed-ortizm/autoencoders | f1f6e9d1001b9de595907a17238c2eada6b57c16 | [
"MIT"
] | null | null | null | latent/pair_plots.py | ed-ortizm/autoencoders | f1f6e9d1001b9de595907a17238c2eada6b57c16 | [
"MIT"
] | 5 | 2022-03-25T20:04:06.000Z | 2022-03-28T16:19:54.000Z | latent/pair_plots.py | ed-ortizm/autoencoders | f1f6e9d1001b9de595907a17238c2eada6b57c16 | [
"MIT"
] | null | null | null | """Pair plot between variables of latent space"""
from configparser import ConfigParser, ExtendedInterpolation
import glob
import time
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
from sdss.utils.managefiles import FileDirectory
from sdss.utils.configfile import Configu... | 31.924812 | 79 | 0.568535 |
79d4797d3f2b9c08fdda9c3e6007cf562460d130 | 8,275 | py | Python | AlgorithmicTradingAndQuantitativeAnalysis/Examples/73_fx_macd_renk.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | AlgorithmicTradingAndQuantitativeAnalysis/Examples/73_fx_macd_renk.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | AlgorithmicTradingAndQuantitativeAnalysis/Examples/73_fx_macd_renk.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | # =============================================================================
# Automated trading script I - MACD
# Author : Mayank Rasu
# Please report bug/issues in the Q&A section
# =============================================================================
import fxcmpy
import numpy as np
from stocktrends imp... | 45.718232 | 168 | 0.585861 |
79d48920f1749579069cb0242bf5b6f41212e73d | 3,103 | py | Python | doc/source/user/examples/usage_helper.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | 65 | 2015-01-23T05:49:09.000Z | 2022-01-09T06:54:33.000Z | doc/source/user/examples/usage_helper.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | null | null | null | doc/source/user/examples/usage_helper.py | kaptnemo/oslo.log | b97137fb8e418b08067b7ad49c176f4bfc45e916 | [
"Apache-2.0"
] | 50 | 2015-02-02T14:26:24.000Z | 2021-03-12T06:13:16.000Z | # Copyright (c) 2016 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 i... | 29.836538 | 77 | 0.718659 |
79d4b71c80030080c1d2d1293b00912c15b8fc2d | 260 | py | Python | production/pygsl-0.9.5/pygsl/wavelet.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | production/pygsl-0.9.5/pygsl/wavelet.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/wavelet.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | """
Wavelet transfroms as provided by GSL
"""
from pygsl._transform import daubechies, haar, bspline
from pygsl._transform import daubechies_centered, haar_centered, bspline_centered
from pygsl._transform import wavelet_workspace
workspace = wavelet_workspace
| 32.5 | 81 | 0.842308 |
79d4cd89303b4d6c54290df0e0c7977a3f5e5678 | 3,951 | py | Python | python/app/plugins/port/Mssql/Mssql_Weakpwd.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/port/Mssql/Mssql_Weakpwd.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/port/Mssql/Mssql_Weakpwd.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #!/usr/bin/env python3
import socket
import binascii
from urllib.parse import urlparse
class Mssql_Weakpwd_BaseVerify:
def __init__(self, url):
self.info = {
'name': 'Mssql 弱口令漏洞',
'description': 'Mssql 弱口令漏洞',
'date': '',
'exptype': 'check',
'ty... | 54.875 | 1,198 | 0.649709 |
79d4d4b71ff1a7c3ab96b3b4742d19afbeab9a98 | 1,322 | py | Python | utils/probability.py | ChangYong-Oh/CoCaBO_code | d7eab8c8419de8df68355f1e410b8c4b4e697e44 | [
"MIT"
] | 28 | 2020-01-20T13:58:58.000Z | 2022-03-22T08:22:32.000Z | utils/probability.py | ChangYong-Oh/CoCaBO_code | d7eab8c8419de8df68355f1e410b8c4b4e697e44 | [
"MIT"
] | 6 | 2021-06-08T22:24:31.000Z | 2022-03-12T00:49:58.000Z | utils/probability.py | ChangYong-Oh/CoCaBO_code | d7eab8c8419de8df68355f1e410b8c4b4e697e44 | [
"MIT"
] | 5 | 2020-06-15T17:46:32.000Z | 2021-03-09T12:50:26.000Z | # -*- coding: utf-8 -*-
#==========================================
# Title: probability.py
# Author: Binxin Ru and Ahsan Alvi
# Date: 20 August 2019
# Link: https://arxiv.org/abs/1906.08878
#==========================================
"""
Created based on
https://jeremykun.com/2013/11/08/adversarial-bandits-and-t... | 25.921569 | 88 | 0.610439 |
79d4df3e806e3b10efbef02dcc6986b5830b6503 | 1,856 | py | Python | microbenthos/dataview/snapshot.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 3 | 2018-04-23T13:51:36.000Z | 2021-08-05T01:53:51.000Z | microbenthos/dataview/snapshot.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 5 | 2018-04-09T20:08:40.000Z | 2018-05-04T23:08:50.000Z | microbenthos/dataview/snapshot.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 2 | 2018-04-09T20:11:50.000Z | 2021-08-06T03:34:06.000Z | from collections.abc import Mapping
from fipy import PhysicalField
from fipy.tools import numerix as np
from .base import ModelData
class SnapshotModelData(ModelData):
"""
Class that encapsulates the model data stored in snapshot :class:`dict`
"""
def check_store(self, obj):
return i... | 30.42623 | 94 | 0.587823 |
79d504f64ace6f609a49ce035e8dd7abf85086a0 | 1,878 | py | Python | Classes/ResUNetPlusPlus/data_generator.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null | Classes/ResUNetPlusPlus/data_generator.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null | Classes/ResUNetPlusPlus/data_generator.py | Nitin-Mane/ALL-PyTorch-Segmentation-2021 | 0f3c7b129629cc2863c502898bcfa3c45077af85 | [
"MIT"
] | null | null | null | """
Data Generator
"""
import os
import numpy as np
import cv2
from tensorflow.keras.utils import Sequence
def parse_image(img_path, image_size):
image_rgb = cv2.imread(img_path, 1)
h, w, _ = image_rgb.shape
if (h == image_size) and (w == image_size):
pass
else:
image_rgb = cv2.resize(i... | 29.34375 | 89 | 0.646432 |
79d5174ce6b4858f6ce84cf813cb43f9e4716fc4 | 4,448 | py | Python | src/data/utils.py | samulic/cmmd | 5a12b11c65c8fc7d765a637e45b09bb93a10b043 | [
"MIT"
] | null | null | null | src/data/utils.py | samulic/cmmd | 5a12b11c65c8fc7d765a637e45b09bb93a10b043 | [
"MIT"
] | null | null | null | src/data/utils.py | samulic/cmmd | 5a12b11c65c8fc7d765a637e45b09bb93a10b043 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import png
import os
import pydicom
def get_png_filename(row):
""" 'D1-0000_L_A-R_mass_malignant|triple negative.png'
"""
fname = get_filename(row)
fname += ".png" # if not row['PatientName'] in PIDS_TO_CHECK else '-wrong.png'
return fname
def get_filename(row):
... | 35.023622 | 121 | 0.678507 |
79d52114bf05dc3e82116bf1456ecfb4781cb90b | 2,461 | py | Python | tests/settings.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | null | null | null | tests/settings.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | 12 | 2016-11-27T18:38:23.000Z | 2017-09-09T16:18:17.000Z | tests/settings.py | dblenkus/rolca | 033492d9b573b1dc65cb836579dff27c6e06c7a7 | [
"Apache-2.0"
] | null | null | null | """
Django settings for running tests for rolca-core package.
"""
import os
from django.utils.translation import gettext_lazy as _
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
SECRET_KEY = 'secret'
DEBUG = True
MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.mid... | 25.635417 | 81 | 0.662332 |
79d526850ed9aa7b072ac9a4e1267eea76d9fe90 | 3,138 | py | Python | src/caracara/rtr/_single_target.py | LaudateCorpus1/caracara | 1200f56891617f15dd48616d7198c45a1e0cbe26 | [
"Unlicense"
] | 1 | 2021-12-28T05:12:33.000Z | 2021-12-28T05:12:33.000Z | src/caracara/rtr/_single_target.py | CrowdStrike/caracara | 0cfc12447ee299f69e23a5d5210eab5fce8e033e | [
"Unlicense"
] | 1 | 2021-11-26T08:53:25.000Z | 2021-11-26T08:53:25.000Z | src/caracara/rtr/_single_target.py | LaudateCorpus1/caracara | 1200f56891617f15dd48616d7198c45a1e0cbe26 | [
"Unlicense"
] | 2 | 2022-02-22T07:32:20.000Z | 2022-02-26T03:05:57.000Z | """Single target interactions."""
from .._tool import Tool
class SingleTarget(Tool):
"""Class to represent single target interactions."""
BASE_COMMAND = "run" # This will prolly need to dynamic
def connect_to_host(self: object, aid: str):
"""Initialize a RTR session with the host matching the A... | 37.357143 | 96 | 0.560867 |
79d5296af1524808747440a2d321084a2a53c0c0 | 363 | py | Python | eth/tools/_utils/hashing.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | eth/tools/_utils/hashing.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | eth/tools/_utils/hashing.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | from eth_hash.auto import keccak
import rlp
from eth.rlp.logs import Log
def hash_log_entries(log_entries):
"""
Helper function for computing the RLP hash of the logs from transaction
execution.
"""
logs = [Log(*entry) for entry in log_entries]
encoded_logs = rlp.encode(logs)
logs_hash =... | 21.352941 | 75 | 0.713499 |
79d54222a61e2cb540e0e26314407bc02ff78d55 | 3,725 | py | Python | misc/rewards_BDR.py | WuJie1010/Fine-Grained-Image-Captioning | 340bc1868634f3bf0fdd62d439fec32ee1b45407 | [
"MIT"
] | 9 | 2019-10-31T05:39:39.000Z | 2021-08-18T02:30:17.000Z | misc/rewards_BDR.py | WuJie1010/Concrete-Image-Captioning.Pytorch | 340bc1868634f3bf0fdd62d439fec32ee1b45407 | [
"MIT"
] | null | null | null | misc/rewards_BDR.py | WuJie1010/Concrete-Image-Captioning.Pytorch | 340bc1868634f3bf0fdd62d439fec32ee1b45407 | [
"MIT"
] | 5 | 2018-10-08T07:55:01.000Z | 2019-09-09T12:32:52.000Z | """
Batch Discriminative Reward
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import time
import misc.utils as utils
from collections import OrderedDict
import torch
from torch.autograd import Variable
import sys
def array_to_str(a... | 36.881188 | 119 | 0.68 |
79d552605e5672cb52f5608828f471e656ca4f14 | 2,696 | py | Python | dev/cli.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | 12 | 2021-12-27T14:40:17.000Z | 2022-03-22T20:14:42.000Z | dev/cli.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | null | null | null | dev/cli.py | MasonData/dev | f4e996e7bb75d4b478fdd96ab8ac98edf63d7d36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Usage:
dev <command> [-- <extra_args>...]
dev cd [<repository>]
dev clone <repository_or_url>
dev init <shell>
dev open <target>
dev update
dev [-hvct]
Options:
-h, --help Show this screen
-v, --version Show version
-c, --commands List all commands
-t, --task... | 27.510204 | 100 | 0.635757 |
79d5867444343ac92dd71c753e06968277e1c875 | 5,184 | py | Python | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/broadcastmanager.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 2 | 2020-04-04T21:09:56.000Z | 2020-04-08T17:00:58.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/broadcastmanager.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | 13 | 2020-04-11T21:50:57.000Z | 2020-04-19T03:19:48.000Z | sjtwo-c/site_scons/site_tools/codegen/site_packages/can/broadcastmanager.py | seanlinc/Playmate | 077877d172dd6b7beab910c52ec95ee300bc6480 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Exposes several methods for transmitting cyclic messages.
The main entry point to these classes should be through
:meth:`can.BusABC.send_periodic`.
"""
import abc
import logging
import threading
import time
import warnings
log = logging.getLogger('can.bcm')
class CyclicTask(object):
"""
... | 32.603774 | 119 | 0.643711 |
79d58f0656759229e418449c17ea9f9752b1f06c | 210 | py | Python | src/authentication/urls.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | src/authentication/urls.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | src/authentication/urls.py | l27-0-0-1/sigma | f4796e4080f22aefcf6df8ac41748597859ccf4e | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.login),
url(r'^signup/$', views.signup),
url(r'^login/$', views.login),
url(r'^logout/$', views.logout),
] | 21 | 36 | 0.609524 |
79d5955bf6a897c23bb8cf61b3b30405e79625be | 5,975 | py | Python | test/selenium/src/lib/factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/selenium/src/lib/factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/selenium/src/lib/factory.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"Factory for modules, classes, methods, functions."
from lib import base, cache, constants, exception
from lib.constants import objects, element, locator
from lib.element import tree_view, widget_info, tree_v... | 34.142857 | 78 | 0.770711 |
79d5a7a70e3449953c150ff2fb6639f9ff6aa4c3 | 9,309 | py | Python | shaker/config.py | codysoyland/shaker | 426738df9577c4b34658701dfaf222637e263180 | [
"BSD-2-Clause"
] | 1 | 2020-12-27T19:41:20.000Z | 2020-12-27T19:41:20.000Z | shaker/config.py | codysoyland/shaker | 426738df9577c4b34658701dfaf222637e263180 | [
"BSD-2-Clause"
] | null | null | null | shaker/config.py | codysoyland/shaker | 426738df9577c4b34658701dfaf222637e263180 | [
"BSD-2-Clause"
] | null | null | null | import os
"""
Shaker configuration
"""
from jinja2 import Template
import yaml
import shaker.ami
import shaker.log
LOG = shaker.log.getLogger(__name__)
DEFAULTS = {
# These values will be overridden in profile/default or
# a user profile, or command-line options.
'hostname': None,
'domain': None,
... | 34.605948 | 89 | 0.508862 |
79d5d643e183a5b59b635753b5cab2f348708e98 | 1,056 | py | Python | lab1/nn/tensor.py | LRY89757/hello-dian.ai | 3072dd2c6ece5c91977a2e8d36978f5dcbcdd3be | [
"MIT"
] | 13 | 2021-07-20T05:25:54.000Z | 2022-03-23T09:35:48.000Z | lab1/nn/tensor.py | LRY89757/hello-dian.ai | 3072dd2c6ece5c91977a2e8d36978f5dcbcdd3be | [
"MIT"
] | 2 | 2021-10-09T06:35:28.000Z | 2021-10-17T11:43:43.000Z | lab1/nn/tensor.py | LRY89757/hello-dian.ai | 3072dd2c6ece5c91977a2e8d36978f5dcbcdd3be | [
"MIT"
] | 22 | 2021-07-22T14:05:53.000Z | 2022-03-26T01:18:27.000Z | import numpy as np
class Tensor(np.ndarray):
"""Derived Class of np.ndarray."""
def __init__(self, *args, **kwargs):
self.grad = None
def tensor(shape):
"""Return a tensor with a normal Gaussian distribution."""
return random(shape)
def from_array(arr):
"""Convert the input array-like ... | 21.55102 | 73 | 0.642992 |
79d5e5cb3b76c3dbf210c0d80df12afb36d58a68 | 18,546 | py | Python | framework/tasks/processing_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | framework/tasks/processing_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | 14 | 2019-03-01T02:35:36.000Z | 2019-05-28T18:31:24.000Z | framework/tasks/processing_tasks.py | CIMAC-CIDC/cidc-taskmanager | f6fcadb06a300c905f88de8879198d6485e6fc6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Module for tasks that do post-run processing of output files.
"""
__author__ = "Lloyd McCarthy"
__license__ = "MIT"
import datetime
import json
import logging
import re
import subprocess
import time
from os import remove
from typing import List
from uuid import uuid4
from cidc_utils.requests... | 31.648464 | 94 | 0.5729 |
79d62b6436ac85cf83bf6e20690c715a0e0aa7a1 | 3,492 | py | Python | tests/test_compute_roc_auc.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-08-02T07:18:50.000Z | 2021-08-02T07:18:50.000Z | tests/test_compute_roc_auc.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | tests/test_compute_roc_auc.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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... | 31.459459 | 118 | 0.62858 |
79d638757e4f5f19dff49d529a5568429e49ba31 | 537 | py | Python | policies/named_policies/Elspeth.py | TeamJumpstart/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 10 | 2021-04-18T17:54:02.000Z | 2021-07-26T19:58:41.000Z | policies/named_policies/Elspeth.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-21T15:13:41.000Z | 2021-04-21T15:13:41.000Z | policies/named_policies/Elspeth.py | DiddiZ/InformatiCup2021 | a4d07992f772d3a1e9ef715fa8e9ce2234cd47a4 | [
"MIT"
] | 1 | 2021-04-20T09:42:50.000Z | 2021-04-20T09:42:50.000Z | from heuristics import CompositeHeuristic, PathLengthHeuristic, RandomHeuristic, RandomProbingHeuristic, RegionHeuristic
from policies import HeuristicPolicy
pol = HeuristicPolicy(
CompositeHeuristic(
[
PathLengthHeuristic(20),
RandomProbingHeuristic(
RegionHeuristic... | 26.85 | 120 | 0.594041 |
79d6430a9ba6475b2d67dffab1cca10fcc3e794c | 68 | py | Python | scripts/hello-world-in-swedish.py | tgrasty/CSCI574-Machine-Learning | bcf797262852c4b46a6702c69f69724b0b9e93f6 | [
"CC-BY-3.0"
] | null | null | null | scripts/hello-world-in-swedish.py | tgrasty/CSCI574-Machine-Learning | bcf797262852c4b46a6702c69f69724b0b9e93f6 | [
"CC-BY-3.0"
] | null | null | null | scripts/hello-world-in-swedish.py | tgrasty/CSCI574-Machine-Learning | bcf797262852c4b46a6702c69f69724b0b9e93f6 | [
"CC-BY-3.0"
] | 1 | 2021-09-17T17:03:58.000Z | 2021-09-17T17:03:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
print("Hej världen!")
| 17 | 23 | 0.588235 |
79d654599e9c7b33864cdd3aff4dc0de3a970781 | 2,115 | gyp | Python | ios/crnet/crnet_pack.gyp | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | ios/crnet/crnet_pack.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | ios/crnet/crnet_pack.gyp | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'chromium_code': 1,
},
'targets': [],
'conditions': [
# Our shared library hack only works with ninja; xcode cannot generate... | 30.652174 | 77 | 0.462411 |
79d69034a7bb993601bbdba000a86dfe90f20683 | 2,795 | py | Python | auditor/tests/test_audit_processor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | auditor/tests/test_audit_processor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | auditor/tests/test_audit_processor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import os
import unittest
from unittest.mock import patch
import sqlalchemy
from auditor.audit_processor import AuditProcessor
from auditor.auditor import Auditor
from auditor.config import AuditorConfig
from auditor.utils.blockchain_client.client import BlockchainClient
from auditor.utils.key_client import KeyClient... | 43 | 115 | 0.793202 |
79d69c9ea1fe95b0925841146dbab2c65cf79005 | 541 | py | Python | client/verta/verta/_swagger/_public/uac/model/UacSetTeam.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 835 | 2017-02-08T20:14:24.000Z | 2020-03-12T17:37:49.000Z | client/verta/verta/_swagger/_public/uac/model/UacSetTeam.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 651 | 2019-04-18T12:55:07.000Z | 2022-03-31T23:45:09.000Z | client/verta/verta/_swagger/_public/uac/model/UacSetTeam.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | 170 | 2017-02-13T14:49:22.000Z | 2020-02-19T17:59:12.000Z | # THIS FILE IS AUTO-GENERATED. DO NOT EDIT
from verta._swagger.base_type import BaseType
class UacSetTeam(BaseType):
def __init__(self, team=None):
required = {
"team": False,
}
self.team = team
for k, v in required.items():
if self[k] is None and v:
raise ValueError('attribute {... | 21.64 | 62 | 0.63586 |
79d6c2f492e194790e69d0a0b80f17b2a25f4b79 | 1,860 | py | Python | selsearch/config.py | jeertmans/selsearch | d44cc530b3af67ecc5a65584e19dac258b277e09 | [
"MIT"
] | 8 | 2022-02-15T08:39:25.000Z | 2022-02-21T23:50:52.000Z | selsearch/config.py | jeertmans/selsearch | d44cc530b3af67ecc5a65584e19dac258b277e09 | [
"MIT"
] | null | null | null | selsearch/config.py | jeertmans/selsearch | d44cc530b3af67ecc5a65584e19dac258b277e09 | [
"MIT"
] | null | null | null | import configparser
import os
import click
from appdirs import user_config_dir
DEFAULT_CONFIG = {
"defaults": {
"exit": "<ctrl>+<alt>+e",
"url": "google",
"xsel": True,
},
"urls": {
"google": "https://www.google.com/search?q=",
"wordreference": "https://www.wordrefe... | 24.155844 | 97 | 0.625806 |
79d6e741f5f0c78bf8fc2ead704cb3e22721529b | 5,089 | py | Python | api/position.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | null | null | null | api/position.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | null | null | null | api/position.py | rezahsnz/papi | b17e5fc3a0380549a9541ade246862a55c905eea | [
"MIT"
] | 1 | 2022-02-20T10:45:36.000Z | 2022-02-20T10:45:36.000Z | import pymongo
import math
import os
import sys
from datetime import datetime
from datetime import timedelta
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import utils
import meta
def trades(_trader: str = None, _asset_list: list = None,
_start: int = None, _end: int = None) -> list:
"""... | 36.092199 | 102 | 0.604637 |
79d70154cffb2e20d828f6ea0ffb6837474f0cd4 | 7,644 | py | Python | streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | import requests, datetime, json2html, configparser
from obswebsocket import obsws
from obswebsocket import requests as obs_requests
from flask import Flask, render_template, Response
import youtube_streaming as yts
from optparse import OptionParser
import time, datetime, pytz
import os, random, shutil
from ptz_visca im... | 33.823009 | 137 | 0.694401 |
79d70ce407e104515714a32f209c6df8935a2195 | 2,576 | py | Python | experimental/tests/trash/unit_test_with_sympy.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 54 | 2015-03-05T13:38:08.000Z | 2021-11-29T11:54:48.000Z | experimental/tests/trash/unit_test_with_sympy.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 7 | 2016-04-06T11:25:00.000Z | 2020-11-09T13:53:20.000Z | experimental/tests/trash/unit_test_with_sympy.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 13 | 2015-01-17T17:05:56.000Z | 2021-08-05T01:13:16.000Z | #!/usr/bin/env python
#######################################################
# This is a Unit Test t that makes use of the Python #
# Module Sympy. #
#######################################################
import sympy as sym
from numpy import array, zeros, ones, shape
from nump... | 25.254902 | 168 | 0.560947 |
79d75684e8c7691cc03da1beb102b5d9a597f828 | 20,220 | py | Python | data.py | soochan-lee/CN-DPM | d592c5d794e4bddc4947f2ed61d6a9e50c6da277 | [
"MIT"
] | 91 | 2019-12-30T08:47:16.000Z | 2022-03-17T01:14:00.000Z | data.py | soochan-lee/CN-DPM | d592c5d794e4bddc4947f2ed61d6a9e50c6da277 | [
"MIT"
] | 6 | 2020-03-24T14:46:39.000Z | 2020-10-26T10:24:37.000Z | data.py | soochan-lee/CN-DPM | d592c5d794e4bddc4947f2ed61d6a9e50c6da277 | [
"MIT"
] | 13 | 2020-02-09T19:06:33.000Z | 2021-11-23T13:48:50.000Z | from abc import ABC, abstractmethod
from collections import Iterator, OrderedDict
from functools import reduce
import os
import math
import torch
from torch.utils.data import (
Dataset,
ConcatDataset,
Subset,
DataLoader,
RandomSampler,
)
from torch.utils.data.dataloader import default_collate
import... | 34.155405 | 79 | 0.533284 |
79d7924f7ab2706397de71365254f92535f246a8 | 12,141 | py | Python | scripts/ids_utils.py | r-dube/CICIDS | d367fd98571ff006925456633c3ac0ed01411f79 | [
"BSD-2-Clause"
] | 3 | 2020-11-13T15:19:53.000Z | 2021-03-23T15:04:53.000Z | scripts/ids_utils.py | r-dube/CICIDS | d367fd98571ff006925456633c3ac0ed01411f79 | [
"BSD-2-Clause"
] | null | null | null | scripts/ids_utils.py | r-dube/CICIDS | d367fd98571ff006925456633c3ac0ed01411f79 | [
"BSD-2-Clause"
] | 3 | 2021-03-31T16:13:05.000Z | 2021-11-06T03:26:28.000Z | #!/usr/bin/env python3
"""
Data Cleaning and Utility functions for CICIDS 2017 data
"""
# Load the top modules that are used in multiple places
import numpy as np
import pandas as pd
# Some global variables to drive the script
# The indir should match the location of the data
# The outdir should be the desired locat... | 29.255422 | 218 | 0.646075 |
79d7bc4fb63b44394b9889de3733a46fe3389dfd | 1,425 | py | Python | tests/testSequenceFinder.py | DogeMajor/GDFT | bd84a8cef8d68f88c3c80de9936ee65ce85fcb40 | [
"MIT"
] | null | null | null | tests/testSequenceFinder.py | DogeMajor/GDFT | bd84a8cef8d68f88c3c80de9936ee65ce85fcb40 | [
"MIT"
] | null | null | null | tests/testSequenceFinder.py | DogeMajor/GDFT | bd84a8cef8d68f88c3c80de9936ee65ce85fcb40 | [
"MIT"
] | null | null | null | import sys
sys.path.append("../src")
sys.path.append("src/")
import unittest
import numpy as np
from tools import *
from gdft import *
from correlations import *
from sequencefinder import *
GDFT_MAT = np.array([[1, -1], [-1, -1]], dtype=np.complex128)
class TestSequenceFinder(unittest.TestCase):
def setUp(self)... | 30.978261 | 68 | 0.628772 |
79d7c050a0aa4cc53a7709daa56c594d3d2ce2c0 | 1,626 | py | Python | tests/the3rdman_model_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 12 | 2015-03-18T15:51:04.000Z | 2021-01-06T14:03:51.000Z | tests/the3rdman_model_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 1 | 2018-05-29T20:00:38.000Z | 2018-05-30T02:44:49.000Z | tests/the3rdman_model_tests.py | django-oscar/django-oscar-datacash | 0e153b45db0f7e40d9f84dc12c40d526ab3e47f1 | [
"BSD-3-Clause"
] | 13 | 2015-08-12T20:11:40.000Z | 2021-09-25T19:53:59.000Z | from django.test import TestCase
from datacash import models
XML_RESPONSE = """<?xml version="1.0"?>
<RealTimeResponse xmlns="T3MCallback">
<aggregator_identifier/>
<merchant_identifier>5567</merchant_identifier>
<merchant_order_ref>12345</merchant_order_ref>
<t3m_id>333333333</t3m_id>
<score>%(sc... | 33.875 | 194 | 0.754613 |
79d7dadc20c5afc6803faa6ad4eca31abaaba80a | 5,514 | py | Python | feature_space_tree/attributes/filters_terms_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/filters_terms_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | feature_space_tree/attributes/filters_terms_config.py | jesusmiguelgarcia/FSTmikes | 34d68c979b0c019510db87793e5870eea8f9154f | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# coding: utf-8
# Copyright (C) 2011-2012 FeatureSpaceTree Project
#
# 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
... | 36.76 | 102 | 0.660863 |
79d7ececb81463b116858b3404782f5a6e96ac94 | 2,881 | py | Python | tests/common/test_run/ascend/upsampling_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/upsampling_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/upsampling_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.651515 | 109 | 0.676154 |
79d7f63f8f22e7dc65a67fcc71863989863ee0e6 | 2,338 | py | Python | alipay/aop/api/domain/AnttechOceanbaseMegagameTaskSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AnttechOceanbaseMegagameTaskSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AnttechOceanbaseMegagameTaskSyncModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AnttechOceanbaseMegagameTaskSyncModel(object):
def __init__(self):
self._fail_msg = None
self._id = None
self._machine_score = None
self._task_status = None
@... | 27.186047 | 77 | 0.578272 |
79d7f962204214d0fd35f0d529c57249b32c01e1 | 3,820 | py | Python | speedtest_manager/speedtest.py | tmarback/speedtest-manager | 4e1023605c206cbeffca3b5e815e94ff8023fb26 | [
"MIT"
] | null | null | null | speedtest_manager/speedtest.py | tmarback/speedtest-manager | 4e1023605c206cbeffca3b5e815e94ff8023fb26 | [
"MIT"
] | null | null | null | speedtest_manager/speedtest.py | tmarback/speedtest-manager | 4e1023605c206cbeffca3b5e815e94ff8023fb26 | [
"MIT"
] | null | null | null | """
Provides an interface for performing speedtests.
Classses:
TestError
Functions:
run_test( timeout ) -> Mapping
Constants:
DEFAULT_TIMEOUT - Default timeout for a test
"""
import json
import subprocess
from typing import Iterable, Mapping, Optional
DEFAULT_TIMEOUT: float = 10 * 60 # Default amoun... | 34.107143 | 139 | 0.672513 |
79d81e2efc564eb2fe45bcfaa51a8b9a98c6792b | 20,112 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_mutating_webhook.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_mutating_webhook.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1beta1_mutating_webhook.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1bet... | 51.43734 | 1,031 | 0.702765 |
79d8215927023b731112238dd25c8e39fc2e2c24 | 19 | py | Python | exp/__init__.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 20 | 2017-10-16T18:12:51.000Z | 2021-12-23T02:34:20.000Z | exp/__init__.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 1 | 2018-11-10T04:59:48.000Z | 2021-01-21T04:51:31.000Z | exp/__init__.py | yjy941124/PPR-FCN | 1eba5515b37e7b32413efdf14bb0c22a2e46fee9 | [
"MIT"
] | 5 | 2017-10-17T00:54:42.000Z | 2018-04-08T15:09:40.000Z | import _init_paths
| 9.5 | 18 | 0.894737 |
79d82281a74e33d20652b5cc64790f2bfac3a592 | 2,055 | py | Python | tasks/teardown_stack.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | 8 | 2019-11-13T17:48:14.000Z | 2021-06-03T20:19:38.000Z | tasks/teardown_stack.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | null | null | null | tasks/teardown_stack.py | stelligent/aws-anchore-engine-scanner | 413dd0969e0ba4a71b5823ed2f3d0508772ebeb0 | [
"MIT"
] | 3 | 2021-02-04T15:44:36.000Z | 2021-08-03T07:21:58.000Z | '''
Clean-up deployed aws resources
'''
import os
import sys
import traceback
import cloudformation as cfn
import keypair
from cloudformation import load_yaml_file # pylint: disable=no-name-in-module
print('Loading teardown function ....')
def main(configs):
'''
clean-up deployed stacks
'''
setup_dat... | 34.25 | 89 | 0.649635 |
79d83abfc81612187396de9a4985d38c551cbc12 | 6,170 | py | Python | pyexchange/base/email.py | ripl/pyexchange | 51680eb69176848c478bece0f9e6e76f6721a0da | [
"Apache-2.0"
] | null | null | null | pyexchange/base/email.py | ripl/pyexchange | 51680eb69176848c478bece0f9e6e76f6721a0da | [
"Apache-2.0"
] | null | null | null | pyexchange/base/email.py | ripl/pyexchange | 51680eb69176848c478bece0f9e6e76f6721a0da | [
"Apache-2.0"
] | null | null | null | import json
class BaseExchangeEmailService(object):
"""
The base service for emails
"""
def __init__(self, service, folder_id):
self.service = service
self.folder_id = folder_id
def get_email(self, email_id):
raise NotImplementedError
def list_emails(self):
rai... | 25.183673 | 88 | 0.588006 |
79d847a7902a15c7b82d69bb360c5c4d2641b0f3 | 84,006 | py | Python | keras/backend/theano_backend.py | mduranmustafa/keras | d4a14ee54728ac8ea6c5ffbf41f559662dcfba46 | [
"MIT"
] | null | null | null | keras/backend/theano_backend.py | mduranmustafa/keras | d4a14ee54728ac8ea6c5ffbf41f559662dcfba46 | [
"MIT"
] | null | null | null | keras/backend/theano_backend.py | mduranmustafa/keras | d4a14ee54728ac8ea6c5ffbf41f559662dcfba46 | [
"MIT"
] | 1 | 2019-03-03T11:44:17.000Z | 2019-03-03T11:44:17.000Z | from collections import defaultdict
from contextlib import contextmanager
import theano
from theano import tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from theano.tensor.signal import pool
from theano.printing import Print
try:
import theano.sparse as th_sparse_module
except Im... | 33.495215 | 114 | 0.603552 |
79d84efd008eba8507ba76ffa3cff02196a88135 | 3,448 | py | Python | src/yolo_opencv.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/yolo_opencv.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/yolo_opencv.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
class Yolo_opencv:
def __init__(self):
self.pathweight = "/home/duongnh/Documents/TPA/checkpoint/yolov3-tiny_3l_last.weights"
self.pathcfg = "/home/duongnh/Documents/TPA/checkpoint/yolov3-tiny_3l.cfg"
self.pathnames = "/home/duongnh/Documents/TPA/checkpoint/... | 37.89011 | 117 | 0.538573 |
79d85df023a207d98f2543b3243a303a2574aa65 | 2,783 | py | Python | datalad/support/archive_utils_7z.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2021-06-11T19:54:19.000Z | 2021-06-11T19:54:19.000Z | datalad/support/archive_utils_7z.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 1 | 2019-08-30T14:45:33.000Z | 2019-08-30T14:45:33.000Z | datalad/support/archive_utils_7z.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 32.741176 | 87 | 0.583184 |
79d867b9005ff499cd58a71e5f70ae614be3b694 | 3,671 | py | Python | swagger_client/api/node_api.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | swagger_client/api/node_api.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | swagger_client/api/node_api.py | atlanticwave-sdx/sdx-controller-client | 426453bf84e9522e857fd78139bb63429b9091cc | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SDX-Controller
You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). # noqa: E501
OpenAPI spec version: 1.0.0
Contact: yxin@renci.org
Generated by: https://github.com/swagger-api/swagger-code... | 31.376068 | 156 | 0.602016 |
79d8a483f280d857f33efabad239cab228a1d198 | 376 | py | Python | src/file_srr.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | 1 | 2021-03-13T11:32:32.000Z | 2021-03-13T11:32:32.000Z | src/file_srr.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | null | null | null | src/file_srr.py | ENCODE-DCC/geo-submission | 84f4adabd786b3e3ffadb4dfab5af7866100d32d | [
"MIT"
] | 3 | 2016-04-08T20:25:48.000Z | 2020-10-28T20:25:03.000Z | f = open('files_trans.5.2.18', 'r')
m = open('files.5.2.18', 'w')
for l in f:
# print ('line: ' + l)
arr = l.strip().split()
if len(arr) == 2:
m.write(arr[1].split('.')[0] + '\t' + arr[0]+'\n')
elif len(arr) == 3:
m.write(arr[1].split('.')[0] + '\t' + arr[0]+'\n')
m.write(arr[2].... | 28.923077 | 58 | 0.43883 |
79d8ae1915e903b02f43b7831a81ad55af249962 | 2,623 | py | Python | GPdoemd/case_studies/analytic/vthr2014linear.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 28 | 2018-07-04T21:46:18.000Z | 2022-01-10T07:48:59.000Z | GPdoemd/case_studies/analytic/vthr2014linear.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 1 | 2018-10-03T22:40:00.000Z | 2018-10-04T17:49:49.000Z | GPdoemd/case_studies/analytic/vthr2014linear.py | scwolof/GPdoemd | 485265a66585a8ebe88d1ba3da957199159dbcbf | [
"MIT"
] | 5 | 2018-09-18T18:43:19.000Z | 2020-11-28T22:07:22.000Z | """
MIT License
Copyright (c) 2018 Simon Olofsson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish... | 23.845455 | 78 | 0.694624 |
79d8dce709d06ed8cf6dbbb47b039be95a58fc21 | 5,261 | py | Python | tests/python/pants_test/build_graph/test_address.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/build_graph/test_address.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/build_graph/test_address.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import uni... | 37.848921 | 98 | 0.705379 |
79d941b8194b15e3a45be8edfa56fed06be26174 | 1,639 | py | Python | examples/custom_blobfactory.py | uit-cosmo/2d-propagating-blobs | 2c19458a5ba6d0d138461fadf3e935273bee4b5c | [
"MIT"
] | 1 | 2021-10-02T17:58:16.000Z | 2021-10-02T17:58:16.000Z | examples/custom_blobfactory.py | uit-cosmo/2d_propagating_blobs | 2c19458a5ba6d0d138461fadf3e935273bee4b5c | [
"MIT"
] | 20 | 2021-10-04T10:44:34.000Z | 2022-01-28T15:20:39.000Z | examples/custom_blobfactory.py | uit-cosmo/2d-propagating-blobs | 2c19458a5ba6d0d138461fadf3e935273bee4b5c | [
"MIT"
] | 1 | 2021-12-06T13:31:58.000Z | 2021-12-06T13:31:58.000Z | from blobmodel import Model, BlobFactory, Blob, show_model
import numpy as np
# create custom class that inherits from BlobFactory
# here you can define your custom parameter distributions
class CustomBlobFactory(BlobFactory):
def __init__(self) -> None:
pass
def sample_blobs(
self, Ly: float,... | 26.435484 | 82 | 0.568029 |
79d95001b429b3667596678f9440f4c4291062b4 | 12,344 | py | Python | train.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | 2 | 2021-05-06T12:34:11.000Z | 2021-05-10T02:26:27.000Z | train.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | null | null | null | train.py | Thien223/Multilanguage_Tacotron_2 | ee93c23117b317e5f7bda95aea45bf3095893c0a | [
"BSD-3-Clause"
] | 2 | 2020-11-27T00:55:15.000Z | 2021-09-20T17:08:11.000Z | import os
import time
import argparse
import math
from numpy import finfo
import torch
from distributed import apply_gradient_allreduce
import torch.distributed as dist
from torch.utils.data.distributed import DistributedSampler
from torch.utils.data import DataLoader
from model import Tacotron2
from data_... | 40.874172 | 109 | 0.629861 |
79d9cad4d978fefb9a1c753134db7bf108d094c4 | 4,913 | py | Python | tests/test_tweeter.py | timothyhull/ww_tweeter | 6ef76bed2bf10c7f2ef6c849e3fb883d8a286c83 | [
"Apache-2.0"
] | null | null | null | tests/test_tweeter.py | timothyhull/ww_tweeter | 6ef76bed2bf10c7f2ef6c849e3fb883d8a286c83 | [
"Apache-2.0"
] | null | null | null | tests/test_tweeter.py | timothyhull/ww_tweeter | 6ef76bed2bf10c7f2ef6c849e3fb883d8a286c83 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env pytest
""" Tests for tweeter.py. """
# Imports - Python Standard Library
from types import GeneratorType
from typing import List
from unittest.mock import MagicMock, patch
# Imports - Third-Party
from tweepy.api import API
import tweepy
# Imports - Local
from app.tweeter.tweeter import (
twitter_a... | 23.065728 | 78 | 0.584979 |
79d9ce83bdcf6fc8dc53cffa17db42836ffb5054 | 751 | py | Python | test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/Expected/AcceptanceTests/MediaTypes/mediatypes/models/__init__.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 ... | 31.291667 | 94 | 0.58988 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.