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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9eaf9f9fd5ae48ec265df6e40a6782f4c8bdfa56 | 115 | py | Python | djangocms_navigation/test_utils/app_2/models.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 6 | 2018-12-12T10:45:42.000Z | 2022-03-16T20:50:36.000Z | djangocms_navigation/test_utils/app_2/models.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 15 | 2019-01-08T11:55:31.000Z | 2022-03-01T15:06:52.000Z | djangocms_navigation/test_utils/app_2/models.py | Bernardvdv/djangocms-navigation | 200fff28cbb46fb2fd2504d00702cf2be8d687fa | [
"BSD-3-Clause"
] | 9 | 2018-12-14T00:58:25.000Z | 2022-03-11T17:16:17.000Z | from django.db import models
class TestModel3(models.Model):
pass
class TestModel4(models.Model):
pass
| 11.5 | 31 | 0.730435 |
9eafadc18b759c9c112b46d21979e3365b03bf75 | 16,374 | py | Python | tests/unit/admin/views/test_projects.py | Volcyy/warehouse | 6a183497f051eeace1bd8ba8028f0e2d3e879a35 | [
"Apache-2.0"
] | 1 | 2021-08-14T13:47:31.000Z | 2021-08-14T13:47:31.000Z | tests/unit/admin/views/test_projects.py | denza/warehouse | 928cd5b495a2e861fee7857467430d1def6f7995 | [
"Apache-2.0"
] | null | null | null | tests/unit/admin/views/test_projects.py | denza/warehouse | 928cd5b495a2e861fee7857467430d1def6f7995 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 33.484663 | 76 | 0.592464 |
9eafbf8b68c4ab67b5f9b78e14b143f3c9a6d4ef | 406 | py | Python | tests/test_testing/test_client.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | tests/test_testing/test_client.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | tests/test_testing/test_client.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import threading
import pytest
from botx import TestClient
pytestmark = pytest.mark.asyncio
async def test_disabling_sync_send_for_client(bot, incoming_message, build_handler):
bot.default(build_handler(threading.Event()))
with TestClient(bot) as client:
await client.send_command(incoming_message,... | 19.333333 | 84 | 0.753695 |
9eafdc1eb1cc3700af61fa9e4d30368098482b77 | 45,249 | py | Python | cosmotech_api/api/validator_api.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/api/validator_api.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/api/validator_api.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 re # noqa: F401
import sys # noqa: F401
from cosmotech_api.api_client import ApiClient,... | 36.141374 | 129 | 0.496608 |
9eafe7c9fb277e80393e5d1a0af3d8061c5f8eed | 1,702 | py | Python | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.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 ... | 32.113208 | 101 | 0.652761 |
9eb00b73e6dd10724ccc61401d880a6d928216fd | 429 | py | Python | vmg30/error.py | ikalevatykh/vmg30 | 2d36e488942a7d2075cd829252b72721a35da19d | [
"MIT"
] | 1 | 2020-07-08T09:52:42.000Z | 2020-07-08T09:52:42.000Z | vmg30/error.py | ikalevatykh/vmg30 | 2d36e488942a7d2075cd829252b72721a35da19d | [
"MIT"
] | null | null | null | vmg30/error.py | ikalevatykh/vmg30 | 2d36e488942a7d2075cd829252b72721a35da19d | [
"MIT"
] | null | null | null | """This module contains glove specific errors."""
__all__ = ('GloveError', 'GloveConnectionError', 'GloveTimeoutError', 'GlovePacketError')
class GloveError(Exception):
"""Bese glove error."""
class GloveConnectionError(GloveError):
"""Connection establishing error."""
class GloveTimeoutError(GloveError... | 20.428571 | 89 | 0.722611 |
9eb02047f0e85383471892d19e53269694e89d93 | 5,793 | py | Python | botty_mcbotface/plugins/calendar.py | ColumbiaSC-Tech/botty_mcbotface | f72fbc7e899650b40b0cf0197c9e6006a5224669 | [
"MIT"
] | 11 | 2017-09-16T21:00:52.000Z | 2020-10-08T19:58:09.000Z | botty_mcbotface/plugins/calendar.py | ColumbiaSC-Tech/botty_mcbotface | f72fbc7e899650b40b0cf0197c9e6006a5224669 | [
"MIT"
] | 12 | 2018-10-30T23:52:34.000Z | 2021-12-13T19:46:21.000Z | botty_mcbotface/plugins/calendar.py | ColumbiaSC-Tech/botty_mcbotface | f72fbc7e899650b40b0cf0197c9e6006a5224669 | [
"MIT"
] | 3 | 2017-09-15T13:22:37.000Z | 2019-08-01T11:42:14.000Z | # This functionality was incredibly annoying to figure out.
# Google docs have barely covered the python library that ISN'T deprecated, among other poorly and undocumented things:
#
# Here's how to do it:
#
# 1. Create a service in your google developer account for the bot.
# 2. Enable the DOMAIN-WIDE permissions for t... | 33.485549 | 119 | 0.685482 |
9eb022eb44519038e8ddb48d58757d3747552be9 | 7,019 | py | Python | scripts/perf-scripts/flow-manager-perf.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | 6 | 2015-01-30T20:44:32.000Z | 2021-11-09T10:56:04.000Z | scripts/perf-scripts/flow-manager-perf.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | null | null | null | scripts/perf-scripts/flow-manager-perf.py | opennetworkinglab/spring-open | 7e8a3af4a21674d198ffac462918e79e93f3c348 | [
"Apache-2.0"
] | 5 | 2017-04-27T02:27:51.000Z | 2020-12-29T05:23:35.000Z | #!/usr/bin/python
'''
Script that tests Flow Manager performance
Author: Brian O'Connor <bocon@onlab.us>
'''
import csv
import os
import sys
import re
from time import sleep, strftime
from subprocess import Popen, call, check_output, PIPE
from datetime import datetime
try:
import pexpect
except:
# install pexp... | 32.345622 | 103 | 0.646673 |
9eb024925a8eb26e4af8ac7308e7ba8d35c2603a | 25,899 | py | Python | aries-test-harness/features/steps/0037-present-proof.py | pruneau628/aries-agent-test-harness | ca49b544afdcdd5f23e33c4677139111683db5f4 | [
"Apache-2.0"
] | null | null | null | aries-test-harness/features/steps/0037-present-proof.py | pruneau628/aries-agent-test-harness | ca49b544afdcdd5f23e33c4677139111683db5f4 | [
"Apache-2.0"
] | null | null | null | aries-test-harness/features/steps/0037-present-proof.py | pruneau628/aries-agent-test-harness | ca49b544afdcdd5f23e33c4677139111683db5f4 | [
"Apache-2.0"
] | 1 | 2021-03-08T06:16:21.000Z | 2021-03-08T06:16:21.000Z | from behave import *
import json
from agent_backchannel_client import agent_backchannel_GET, agent_backchannel_POST, expected_agent_state
from agent_test_utils import get_relative_timestamp_to_epoch
from time import sleep
@when('{issuer} issues a new credential to "{prover}" with {credential_data}')
@given('"{prover}"... | 54.068894 | 207 | 0.660025 |
9eb02aed26188d7ab9a004b8b22a4b7a7f8e5742 | 1,011 | py | Python | merge_sort.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | merge_sort.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | merge_sort.py | trishahanlon/algorithms-review | 4e08938526020204d0a7f47982b46c05b0973636 | [
"Apache-2.0"
] | null | null | null | import sys
# get the input from the command line
arr = list(map(int, sys.argv[1].split(",")))
print('unsorted array before: ', arr)
def merge_sort(array):
if len(array) > 1:
# divide the array into left and right
middle = (len(array)//2)
left = array[:middle]
right = array[middle:... | 25.923077 | 66 | 0.556874 |
9eb0496f2d97192b045b0fa964e3ad268406af39 | 813 | py | Python | we_web/urls.py | shawxiaozhang/we_web | c9736c09fda1aa9b5d7796ba0315637697baa7e0 | [
"MIT"
] | null | null | null | we_web/urls.py | shawxiaozhang/we_web | c9736c09fda1aa9b5d7796ba0315637697baa7e0 | [
"MIT"
] | null | null | null | we_web/urls.py | shawxiaozhang/we_web | c9736c09fda1aa9b5d7796ba0315637697baa7e0 | [
"MIT"
] | null | null | null | """we_web URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 35.347826 | 79 | 0.698647 |
9eb05a3e4a5b1b674848dbb9cec23b29ae5a39f9 | 18,486 | py | Python | policy/PolicyManager.py | hydercps/pydia | 5936182c80e73680820d9ed6bd08ce84cb2befdd | [
"Apache-2.0"
] | null | null | null | policy/PolicyManager.py | hydercps/pydia | 5936182c80e73680820d9ed6bd08ce84cb2befdd | [
"Apache-2.0"
] | null | null | null | policy/PolicyManager.py | hydercps/pydia | 5936182c80e73680820d9ed6bd08ce84cb2befdd | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# PyDial: Multi-domain Statistical Spoken Dialogue System Software
###############################################################################
#
# Copyright 2015 - 2017
# Cambridge University Engineering Department Dialogue Systems Grou... | 47.278772 | 172 | 0.610354 |
9eb05bd728a2ae90d8af8e4916197b4e8539bc37 | 6,548 | py | Python | tests/minionswarm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | 1 | 2015-10-06T22:25:22.000Z | 2015-10-06T22:25:22.000Z | tests/minionswarm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | tests/minionswarm.py | gotcha/salt | 7b84c704777d3d2062911895dc3fdf93d40e9848 | [
"Apache-2.0"
] | null | null | null | #/usr/bin/env python
'''
The minionswarm script will start a group of salt minions with different ids
on a single system to test scale capabilities
'''
# Import Python Libs
import os
import pwd
import time
import signal
import optparse
import subprocess
import tempfile
import shutil
# Import salt libs
import salt
# ... | 28.593886 | 78 | 0.520312 |
9eb090dceeee4bb45c2361f44555fef8bab6735f | 34,298 | py | Python | napari/layers/shapes/_shapes_utils.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | 1 | 2021-05-16T19:31:42.000Z | 2021-05-16T19:31:42.000Z | napari/layers/shapes/_shapes_utils.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/shapes/_shapes_utils.py | 0x00b1/napari | 01c24e320dc3d8daaae80a383f95fc0587c98ee4 | [
"BSD-3-Clause"
] | null | null | null | from typing import Tuple
import numpy as np
from vispy.geometry import PolygonData
from vispy.visuals.tube import _frenet_frames
from ...utils.translations import trans
from ..utils.layer_utils import segment_normal
def inside_triangles(triangles):
"""Checks which triangles contain the origin
Parameters
... | 31.552898 | 105 | 0.585194 |
9eb09bde8b02f685a72a8501cd40b82fab431fbe | 3,217 | py | Python | data/tracking/sampler/_sampling_algos/sequence_picking/run_through/_server.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/tracking/sampler/_sampling_algos/sequence_picking/run_through/_server.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/tracking/sampler/_sampling_algos/sequence_picking/run_through/_server.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | import numpy as np
class DatasetsIndexingHelper:
def __init__(self, dataset_length_list):
self.dataset_length_list = dataset_length_list
self.length = sum(dataset_length_list)
def __getitem__(self, index: int):
for index_of_datasets, length in enumerate(self.dataset_length_list):
... | 39.716049 | 114 | 0.645322 |
9eb0d661005a477ae1b609eec0937b99c95ef474 | 739 | py | Python | alipay/aop/api/response/AlipayCommerceDataCampaignSendResponse.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/response/AlipayCommerceDataCampaignSendResponse.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/response/AlipayCommerceDataCampaignSendResponse.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.response.AlipayResponse import AlipayResponse
class AlipayCommerceDataCampaignSendResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceDataCampaignSendResponse, self).__init__()
self._sub_status = None
... | 28.423077 | 111 | 0.723951 |
9eb0ed8caa612b721c944d07a9b91d2bb429d62c | 2,463 | py | Python | fineract/objects/interest.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 7 | 2019-03-11T16:17:33.000Z | 2020-10-22T21:57:51.000Z | fineract/objects/interest.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 3 | 2019-11-05T20:22:16.000Z | 2019-12-11T17:09:04.000Z | fineract/objects/interest.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 2 | 2020-11-19T16:00:36.000Z | 2021-11-19T09:36:13.000Z | from fineract.objects.fineract_object import FineractObject
from fineract.objects.types import InterestRecalculationCompoundingType, RecalculationCompoundingFrequencyType, \
RescheduleStrategyType, RecalculationRestFrequencyType, PreClosureInterestCalculationStrategy
class InterestRecalculationData(FineractObject... | 60.073171 | 125 | 0.635404 |
9eb0f1deadc0254f8447c25acd2a1af68b989580 | 3,104 | py | Python | src/main.py | EitanWex/OOP_Ex3 | 22f73d0d9518c09b06ad0494701f2a899ce912f3 | [
"MIT"
] | null | null | null | src/main.py | EitanWex/OOP_Ex3 | 22f73d0d9518c09b06ad0494701f2a899ce912f3 | [
"MIT"
] | null | null | null | src/main.py | EitanWex/OOP_Ex3 | 22f73d0d9518c09b06ad0494701f2a899ce912f3 | [
"MIT"
] | null | null | null | from DiGraph import DiGraph
from GraphAlgo import GraphAlgo
import random
def check():
"""
Graph: |V|=4 , |E|=5
{0: 0: |edges out| 1 |edges in| 1, 1: 1: |edges out| 3 |edges in| 1, 2: 2: |edges out| 1 |edges in| 1, 3: 3: |edges out| 0 |edges in| 2}
{0: 1}
{0: 1.1, 2: 1.3, 3: 10}
(3.4, [0, 1, 2,... | 27.469027 | 140 | 0.590851 |
9eb0f35bc2d91805130fa96e6fdf2d090b3dc4a6 | 1,132 | py | Python | news/ajax.py | samersultan/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | 2 | 2019-02-22T16:02:19.000Z | 2019-02-23T19:27:34.000Z | news/ajax.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | news/ajax.py | dewmal/treeio | 6299fbe7826800d576f7ab68b4c1996b7194540f | [
"MIT"
] | null | null | null | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
News ajax views
"""
from dajaxice.core import dajaxice_functions
from dajax.core.Dajax import Dajax
from django.template import RequestContext
from django.db.models import Q
from treeio.core.rendering ... | 32.342857 | 104 | 0.681979 |
9eb12e8f6c7e72b9c1065bd4b3142d5e01111fe8 | 3,435 | py | Python | rlkit/envs/mujoco/swimmer.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | rlkit/envs/mujoco/swimmer.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | rlkit/envs/mujoco/swimmer.py | vincentlui/unsupervised-goal-conditioned-rl | 4f2e6938e072cb52f8ee779a939fe7bf6a980d45 | [
"MIT"
] | null | null | null | import numpy as np
from gym.envs.mujoco import mujoco_env
from gym import utils
DEFAULT_CAMERA_CONFIG = {}
class SwimmerEnv(mujoco_env.MujocoEnv, utils.EzPickle):
def __init__(self,
xml_file='swimmer.xml',
forward_reward_weight=1.0,
ctrl_cost_weight=1e-4,
... | 33.676471 | 77 | 0.627948 |
9eb14e5574040044fba998662a54d95df5d7bba5 | 267 | py | Python | src/geoportail/version.py | revesansparole/geoportail | 99a73e98943337e635028cd08442778ba481ea98 | [
"MIT"
] | null | null | null | src/geoportail/version.py | revesansparole/geoportail | 99a73e98943337e635028cd08442778ba481ea98 | [
"MIT"
] | null | null | null | src/geoportail/version.py | revesansparole/geoportail | 99a73e98943337e635028cd08442778ba481ea98 | [
"MIT"
] | null | null | null | # {# pkglts, version
# -*- coding: utf-8 -*-
MAJOR = 0
"""(int) Version major component."""
MINOR = 2
"""(int) Version minor component."""
POST = 0
"""(int) Version post or bugfix component."""
__version__ = ".".join([str(s) for s in (MAJOR, MINOR, POST)])
# #}
| 17.8 | 62 | 0.59176 |
9eb19cfa4c81cafe7ccf43cf11b55d1bbe8ab4bf | 10,428 | py | Python | src/Application/PythonScriptModule/pymodules_old/circuits/web/headers.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/PythonScriptModule/pymodules_old/circuits/web/headers.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/circuits/web/headers.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | # Module: headers
# Date: 1st February 2009 November 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Headers Support
This module implements support for parsing and handling headers.
"""
import re
from types import ListType
# Regular expression that matches `special' characters in para... | 34.190164 | 80 | 0.596279 |
9eb1ec346ddec98346ac9a34065181358bcc864b | 36,324 | py | Python | tests/api/v2_1_1/test_sda.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_sda.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/api/v2_1_1/test_sda.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI sda API fixtures and tests.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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, inclu... | 27.643836 | 457 | 0.73194 |
9eb22d3ea74d53b0636c45b6de9e9477d96fa470 | 1,734 | py | Python | rllib/agents/dqn/tests/test_r2d2.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | rllib/agents/dqn/tests/test_r2d2.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | rllib/agents/dqn/tests/test_r2d2.py | naijoaix/ray | 5a43b075bcc346fb95f1d30c85dbcb79a7fa5769 | [
"Apache-2.0"
] | null | null | null | import unittest
import ray
import ray.rllib.agents.dqn as dqn
from ray.rllib.utils.framework import try_import_tf, try_import_torch
from ray.rllib.utils.test_utils import (
check_compute_single_action,
check_train_results,
framework_iterator,
)
tf1, tf, tfv = try_import_tf()
torch, nn = try_import_torch()... | 28.9 | 72 | 0.641292 |
9eb2359fedbdde2a0395a24e938943d3fc9a0f81 | 10,965 | py | Python | src/third_party/wiredtiger/test/suite/test_timestamp03.py | marcelodsx/mongo | 324839c0c0c2b294a44d130105797ccdbb3b17a9 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/test/suite/test_timestamp03.py | marcelodsx/mongo | 324839c0c0c2b294a44d130105797ccdbb3b17a9 | [
"Apache-2.0"
] | null | null | null | src/third_party/wiredtiger/test/suite/test_timestamp03.py | marcelodsx/mongo | 324839c0c0c2b294a44d130105797ccdbb3b17a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Public Domain 2014-2017 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compil... | 40.3125 | 105 | 0.618513 |
9eb23a6387c655436587e0f69920c8bd9164994d | 774 | py | Python | 2020/day_07/day7.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_07/day7.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | 2020/day_07/day7.py | dandiez/AdventOfCode | 99ebe6991964290ede87b144c8692c8f6b31030d | [
"MIT"
] | null | null | null | import re
import networkx as nx
with open("input7.txt") as f:
lines = [line.strip() for line in f.readlines() if line.strip()]
G = nx.DiGraph()
for line in lines:
N, rest = line.split(" bags contain ")
if rest == "no other bags.":
G.add_node(N)
continue
rels = [b.strip() for b in re.s... | 24.1875 | 74 | 0.585271 |
9eb25c7ee462757441af06bc61d5ca92fba2dfa7 | 1,165 | py | Python | python/app/thirdparty/oneforall/modules/datasets/dnsdb_api.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/thirdparty/oneforall/modules/datasets/dnsdb_api.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/thirdparty/oneforall/modules/datasets/dnsdb_api.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | from app.thirdparty.oneforall.config import settings
from app.thirdparty.oneforall.common.query import Query
class DNSdbAPI(Query):
def __init__(self, domain):
Query.__init__(self)
self.domain = domain
self.module = 'Dataset'
self.source = 'DNSdbAPIQuery'
self.addr = 'https... | 22.403846 | 63 | 0.570815 |
9eb29a3a21c1406a9ae48de5049bdd7307a47e76 | 60,243 | py | Python | datalad/local/addurls.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/local/addurls.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"MIT"
] | null | null | null | datalad/local/addurls.py | soichih/datalad | 797dde3ab7497be170e2c4ea8824f33a4b38e5d8 | [
"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 et:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ### ... | 37.325279 | 95 | 0.571436 |
9eb2a83906453810b61fa5ac71d1bafc7404a27a | 8,755 | py | Python | project5/cnn/CIFAR10.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null | project5/cnn/CIFAR10.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null | project5/cnn/CIFAR10.py | HoliestCow/ece692_deeplearning | 638c27e0d9c01ec9b0a8be8a85e54937645a897e | [
"MIT"
] | null | null | null | import tflearn
from tflearn.data_utils import shuffle, to_categorical
from tflearn.models.dnn import DNN
from tflearn.layers.core import input_data, dropout, fully_connected
# from tflearn.layers.conv import conv_2d, max_pool_2d
from tflearn.layers.conv import conv_1d, max_pool_1d
from tflearn.layers.estimator import r... | 36.177686 | 98 | 0.618047 |
9eb2abdafd45884b1b8cf7e341ba6deab98a76e6 | 7,727 | py | Python | assam/propagator/gmat_interface.py | ykawashima/assam | a2b0d315fd8b2ede392cdfcd372ff856fccdfde8 | [
"MIT"
] | 3 | 2021-07-10T10:02:55.000Z | 2021-11-26T00:48:33.000Z | assam/propagator/gmat_interface.py | ykawashima/assam | a2b0d315fd8b2ede392cdfcd372ff856fccdfde8 | [
"MIT"
] | 1 | 2021-11-25T03:35:30.000Z | 2021-11-26T09:09:39.000Z | assam/propagator/gmat_interface.py | ykawashima/assam | a2b0d315fd8b2ede392cdfcd372ff856fccdfde8 | [
"MIT"
] | 2 | 2021-11-25T23:50:28.000Z | 2021-11-29T06:18:25.000Z | #!/usr/bin/env python
"""
MIT License
Copyright (c) 2020-2021 Max Hallgarten La Casta
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... | 35.939535 | 96 | 0.598033 |
9eb2d01aa0c382ca64439e4204663ff904f4fc1b | 13,252 | py | Python | src/emm/emm_cli.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | null | null | null | src/emm/emm_cli.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | null | null | null | src/emm/emm_cli.py | zamj/evg-module-manager | e6029edce023071847ef2ea25af89c31219f41f6 | [
"Apache-2.0"
] | null | null | null | """Command line entry point to application."""
import logging
import os.path
import sys
from functools import partial
from pathlib import Path
from typing import List, Optional
import click
import inject
import structlog
from evergreen import EvergreenApi, RetryingEvergreenApi
from structlog.stdlib import LoggerFactor... | 37.435028 | 100 | 0.716345 |
9eb2d1ffd566ff0897aaf09380f8cf85da905d6f | 4,352 | py | Python | test/test_v1_extra_alipay_pay_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_pay_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | test/test_v1_extra_alipay_pay_params.py | justapnet/justap-server-sdk-python | 2d3110c6447833334fa2f7e93ffa63e06913df17 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Justap API
欢迎阅读 Justap Api 文档 Justap 是为移动端应用和PC端应用打造的下一代聚合支付SAAS服务平台,通过一个 SDK 即可快速的支持各种形式的应用,并且一次接口完成多个不同支付渠道的接入。平台除了支持服务商子商户模式,同时还对商家自有商户(即自己前往微信、支付宝等机构开户)提供了完整的支持。 感谢您的支持,我们将不断探索,为您提供更优质的服务!如需技术支持可前往商户中心提交工单,支持工程师会尽快与您取得联系! # 文档说明 采用 REST 风格设计。所有接口请求地址都是可预期的以及面向资源的。使用规范的 HTTP 响应代码来表示请... | 106.146341 | 3,404 | 0.77068 |
9eb2e3ef1557ff050fe06bd1a281fd407fa060cc | 2,473 | py | Python | MachineLearning/Logistic Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/Logistic Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/Logistic Regression/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # 2018-9-29
# Logistic Regression
# python 机器学习算法
import numpy as np
def sig(x):
'''
Sigmoid函数
input: x(mat):feature * w
output: sigmoid(x)(mat):Sigmoid值
'''
return 1.0 / (1 + np.exp(-x))
def loadData(file_name, skip=True):
"""
载入数据
"""
feature = []
label = []
file = open(file_name)
... | 19.170543 | 87 | 0.591589 |
9eb2ebee5cdeab3501745462c233da74e48a425a | 821 | py | Python | python/queue_stack/1021_remove_outermost_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/queue_stack/1021_remove_outermost_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/queue_stack/1021_remove_outermost_parentheses.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def removeOuterParentheses(self, S):
"""
:type S: str
:rtype: str
"""
stack = []
removes = set()
for i, s in enumerate(S):
if s == '(':
stack.append((s, i,))
if s == ')':
v = stack... | 31.576923 | 75 | 0.436054 |
9eb2f96e7df27aad26f096216b745462d1ded54a | 15,153 | py | Python | bio/ensembl/ontology/loader/models.py | Ensembl/ols-ensembl-loader | c62d4dee4d0296fb35a84fdc683941ff7afac541 | [
"Apache-2.0"
] | null | null | null | bio/ensembl/ontology/loader/models.py | Ensembl/ols-ensembl-loader | c62d4dee4d0296fb35a84fdc683941ff7afac541 | [
"Apache-2.0"
] | 25 | 2018-09-13T08:29:33.000Z | 2019-12-10T14:48:05.000Z | bio/ensembl/ontology/loader/models.py | Ensembl/ols-ensembl-loader | c62d4dee4d0296fb35a84fdc683941ff7afac541 | [
"Apache-2.0"
] | 3 | 2019-07-18T13:34:07.000Z | 2020-07-30T12:54:22.000Z | # -*- coding: utf-8 -*-
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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
... | 38.557252 | 115 | 0.658945 |
9eb34b73b7e39908e19de7b175277896e564f81c | 8,565 | py | Python | pypeit/tests/tstutils.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 107 | 2018-08-06T07:07:20.000Z | 2022-02-28T14:33:42.000Z | pypeit/tests/tstutils.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 889 | 2018-07-26T12:14:33.000Z | 2022-03-18T22:49:42.000Z | pypeit/tests/tstutils.py | brackham/PypeIt | 8769f06ae8e8f18d3a55d12b01dd3dde50b98040 | [
"BSD-3-Clause"
] | 74 | 2018-09-25T17:03:07.000Z | 2022-03-10T23:59:24.000Z | """
Odds and ends in support of tests
"""
import os
import copy
import pytest
from pkg_resources import resource_filename
from IPython import embed
import numpy as np
from astropy import time
from astropy.io import fits
from pypeit.images import buildimage
from pypeit import edgetrace
from pypeit import wavecalib
fr... | 37.401747 | 111 | 0.63059 |
9eb3c45cc9c95c479a05422c9646e0489b1f2dc5 | 10,221 | py | Python | arraycontext/container/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | null | null | null | arraycontext/container/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | null | null | null | arraycontext/container/__init__.py | thomasgibson/arraycontext | 93140738460531f4fe6391bdfe745912b7f9676d | [
"MIT"
] | null | null | null | # mypy: disallow-untyped-defs
"""
.. currentmodule:: arraycontext
.. class:: ArrayT
:canonical: arraycontext.container.ArrayT
:class:`~typing.TypeVar` for arrays.
.. class:: ContainerT
:canonical: arraycontext.container.ContainerT
:class:`~typing.TypeVar` for array container-like objects.
.. class... | 34.414141 | 85 | 0.713433 |
9eb3f363ea8decd9bc6186f214fea5cadedacb28 | 204 | py | Python | registration/admin.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | null | null | null | registration/admin.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | 7 | 2021-02-13T16:45:37.000Z | 2021-08-31T09:26:10.000Z | registration/admin.py | shifat151/heartarcade | 887601bf9774dbbc0dcee9618c3a6e4a59f38717 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from . models import User
# Register your models here.
admin.site.register(User, UserAdmin)
# Register your models here.
| 22.666667 | 47 | 0.79902 |
9eb40fb7cd248c0e965b80ec2106587d5efdffa1 | 1,011 | py | Python | Lib/site-packages/wx-3.0-msw/wx/py/tests/test_version.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2021-02-13T22:40:50.000Z | 2021-02-13T22:40:50.000Z | Lib/site-packages/wx-3.0-msw/wx/py/tests/test_version.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 1 | 2018-07-28T20:07:04.000Z | 2018-07-30T18:28:34.000Z | Lib/site-packages/wx-3.0-msw/wx/py/tests/test_version.py | jickieduan/python27 | c752b552396bbed68d8555080d475718cea2edd0 | [
"bzip2-1.0.6"
] | 2 | 2019-12-02T01:39:10.000Z | 2021-02-13T22:41:00.000Z | #!/usr/bin/env python
__author__ = "Patrick K. O'Brien <pobrien@orbtech.com>"
__cvsid__ = "$Id$"
__revision__ = "$Revision$"[11:-2]
import unittest
import types
# Import from this module's parent directory.
import os
import sys
sys.path.insert(0, os.pardir)
import version
del sys.path[0]
del sys
del os
"""
These ... | 20.22 | 63 | 0.688427 |
9eb4101418f7ec4ee40015e806b50dc2422a2e10 | 3,120 | py | Python | incasem/gunpowder/merge_labels.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/gunpowder/merge_labels.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/gunpowder/merge_labels.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | from typing import Dict, List, Optional
import numpy as np
import gunpowder as gp
class MergeLabels(gp.BatchFilter):
"""Merge the labels from all input arrays into the output array
Multiply each array with the given integer value.
If there are multiple labels assigned for a voxel
we resolve with the ... | 28.888889 | 78 | 0.558333 |
9eb410ca2d9b2897e160030d35c2f159dfa71943 | 483 | py | Python | grams/__init__.py | escofresco/makeschool_fsp2_realtweets | a1df7c54e5ef3d5a91282141389200248b40f695 | [
"MIT"
] | null | null | null | grams/__init__.py | escofresco/makeschool_fsp2_realtweets | a1df7c54e5ef3d5a91282141389200248b40f695 | [
"MIT"
] | 9 | 2019-11-17T22:33:15.000Z | 2021-06-02T00:37:50.000Z | grams/__init__.py | escofresco/makeschool_fsp2_realtweets | a1df7c54e5ef3d5a91282141389200248b40f695 | [
"MIT"
] | null | null | null | # grams.__init__
#!/usr/bin/env python3
"""A package for using histograms to interact with data."""
import os
import nltk
__all__ = []
from .grams import *
__all__ += grams.__all__
from .online import *
__all__ += online.__all__
from .stats import FreqDist, Sample
__all__ += stats.__all__
from .utils import *
__all__... | 24.15 | 74 | 0.73913 |
9eb426971b9dab53d52a77fe2644658e2c00df1c | 2,216 | py | Python | ote_cli/ote_cli/datasets/__init__.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/datasets/__init__.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | ote_cli/ote_cli/datasets/__init__.py | ntyukaev/training_extensions | c897d42e50828fea853ceda0795e1f0e7d6e9909 | [
"Apache-2.0"
] | null | null | null | """
File system based datasets registry.
"""
# Copyright (C) 2021 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 ... | 35.741935 | 100 | 0.763538 |
9eb4522cc088d9296340a2ab2c881c4e9bd7bcdc | 6,850 | py | Python | create_l96_data/L96_updated.py | raghul-parthipan/l96_rnn | 9483fb9d3cd8fe283852dca35e578f063162e25c | [
"MIT"
] | null | null | null | create_l96_data/L96_updated.py | raghul-parthipan/l96_rnn | 9483fb9d3cd8fe283852dca35e578f063162e25c | [
"MIT"
] | null | null | null | create_l96_data/L96_updated.py | raghul-parthipan/l96_rnn | 9483fb9d3cd8fe283852dca35e578f063162e25c | [
"MIT"
] | null | null | null |
"""
#The below is edited based on work from Stephan Rasp (date created 2019-04-16-12-28, raspstephan@gmail.com) https://github.com/raspstephan/Lorenz-Online/blob/master/L96.py #
#https://hub.gke2.mybinder.org/user/raspstephan-l96-visualization-vn2xzwv1/notebooks/L96-visualization.ipynb#
"""
import sys
def in_noteboo... | 42.546584 | 174 | 0.543942 |
9eb4709ea697803fc1f916a487a9fa1ced08eadc | 1,919 | py | Python | examen-2019/correction-examen-20191118-2.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 7 | 2016-09-29T07:20:25.000Z | 2021-03-15T15:00:06.000Z | examen-2019/correction-examen-20191118-2.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | null | null | null | examen-2019/correction-examen-20191118-2.py | afafe78/python-im | c831eb92c163084bb3c9098e40d28e7ba8600319 | [
"MIT"
] | 11 | 2017-01-12T18:50:49.000Z | 2021-02-28T22:44:29.000Z | # -*- coding: utf-8 -*-
"""
Correction de l'examen Python du 18/11/2019
Deuxième partie sur le fichier 'lecun_pos.txt'
"""
import csv
from collections import Counter
def main():
input_file = 'lecun-pos.txt'
words = [] # structure de données principale
# liste de mots, chaque élément est un tuple (forme, ... | 34.267857 | 105 | 0.586243 |
9eb4753ec4a3e188885a2e9552c9e16fbdf2f910 | 10,413 | py | Python | nematus/random_sampler.py | zippotju/Context-Aware-Bilingual-Repair-for-Neural-Machine-Translation | 767572e377fd9fb525ebd28a619bc1696e779db9 | [
"BSD-3-Clause"
] | 1 | 2020-03-20T12:33:11.000Z | 2020-03-20T12:33:11.000Z | nematus/random_sampler.py | zippotju/Context-Aware-Bilingual-Repair-for-Neural-Machine-Translation | 767572e377fd9fb525ebd28a619bc1696e779db9 | [
"BSD-3-Clause"
] | null | null | null | nematus/random_sampler.py | zippotju/Context-Aware-Bilingual-Repair-for-Neural-Machine-Translation | 767572e377fd9fb525ebd28a619bc1696e779db9 | [
"BSD-3-Clause"
] | null | null | null | import tensorflow as tf
import rnn_inference
import sampler_inputs
from transformer import INT_DTYPE, FLOAT_DTYPE
import transformer_inference
class RandomSampler:
"""Implements random sampling with one or more models.
Samples translations by randomly drawing one token at a time according to
the probabi... | 39.744275 | 102 | 0.644579 |
9eb49bd4d5ce901e50c06abf37678d0ee06199b5 | 2,539 | py | Python | tests/test_apriori.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | tests/test_apriori.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | tests/test_apriori.py | mjamesruggiero/lily | 8348e41709d937bc0171604ab5a4f2c707b7dc17 | [
"Apache-2.0"
] | null | null | null | import unittest
from context import lily
from lily import apriori
import logging
logging.basicConfig(level=logging.INFO, format="%(lineno)d\t%(message)s")
class TestApriori(unittest.TestCase):
def setUp(self):
self.dataset = [
[0, 0, 0, 7, 0, 9, 0, 10, 0, 12, 0, 14, 0, 0, 21, 0, 23, 0, 28],
... | 34.310811 | 79 | 0.468688 |
9eb49ebb9298a1fcc4f7a048732e41b468d8dc80 | 1,201 | py | Python | pytablereader/loadermanager/_base.py | sthagen/thombashi-pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 81 | 2017-03-18T02:57:29.000Z | 2022-03-26T16:54:59.000Z | pytablereader/loadermanager/_base.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 4 | 2017-08-09T14:58:48.000Z | 2020-04-17T12:59:29.000Z | pytablereader/loadermanager/_base.py | sthagen/pytablereader | b59859da6fdcc94035933dd253e6e380b04a233b | [
"MIT"
] | 11 | 2017-05-02T16:23:59.000Z | 2021-12-10T15:05:39.000Z | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from ..interface import TableLoaderInterface
class TableLoaderManager(TableLoaderInterface):
def __init__(self, loader):
self.__loader = loader
@property
def loader(self):
return self.__loader
@property
def ... | 21.446429 | 63 | 0.656953 |
9eb4db3a05fdd8eb6abb6fa0b6bbcd0d7265c300 | 14,236 | py | Python | ssdaq/data/_ioimpl.py | sflis/SSDAQold | 4f9a84c34b580548a53719e000dc623f6e1b8a40 | [
"BSD-3-Clause"
] | 1 | 2018-10-23T11:12:44.000Z | 2018-10-23T11:12:44.000Z | ssdaq/data/_ioimpl.py | sflis/SSDAQold | 4f9a84c34b580548a53719e000dc623f6e1b8a40 | [
"BSD-3-Clause"
] | 28 | 2019-02-07T12:50:10.000Z | 2019-11-18T20:36:31.000Z | ssdaq/data/_ioimpl.py | sflis/SSDAQold | 4f9a84c34b580548a53719e000dc623f6e1b8a40 | [
"BSD-3-Clause"
] | 2 | 2019-02-07T12:46:03.000Z | 2019-05-27T13:44:41.000Z | ### Specialization to different protobuf protocols#####
from . import LogData, TriggerMessage, TriggerPacket, Frame
from ssdaq.core.io import RawObjectWriterBase, RawObjectReaderBase
from ssdaq import version as checvers
import struct
_header = struct.Struct("<2H") # version:datatype
_headers = {1: _header}
class ... | 31.426049 | 116 | 0.578814 |
9eb4dc5c486e3800af00bb6993aec809f64dc19e | 1,250 | py | Python | tests/pieces/test_king.py | trewjames/tdd-chess | 7aa5c1942627cc93886ffede8e84b65726e44946 | [
"MIT"
] | null | null | null | tests/pieces/test_king.py | trewjames/tdd-chess | 7aa5c1942627cc93886ffede8e84b65726e44946 | [
"MIT"
] | 3 | 2020-08-19T18:07:16.000Z | 2020-08-24T20:57:13.000Z | tests/pieces/test_king.py | trewjames/tdd-chess | 7aa5c1942627cc93886ffede8e84b65726e44946 | [
"MIT"
] | null | null | null | from chess.pieces import King
from chess.board import Board
import pytest
def test_king_init():
king = King(0, 4, False)
rep = king.__repr__()
assert (king.row, king.col) == (0, 4)
assert king.is_white is False
assert king.first_move is True
assert king.name == 'bk'
assert rep == "King(0... | 27.777778 | 80 | 0.4144 |
9eb4e635ac005a8e01626e3ce54d99f15ed9b988 | 5,366 | py | Python | pywick/models/classification/testnets/large_densenet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | 2 | 2020-11-28T07:56:09.000Z | 2021-11-08T09:30:39.000Z | pywick/models/classification/testnets/large_densenet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | pywick/models/classification/testnets/large_densenet.py | ashishpatel26/pywick | 1afffd1c21c2b188836d3599e802146182757bb5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Source: https://github.com/Ontheway361/stanford_cs231n/blob/master/basenet/zoo/densenet.py
"""
Created on 2019/06/03
author: lujie
"""
from collections import OrderedDict
import torch
import torch.nn.functional as F
from torch import nn
__all__ = ['lg_densenet264']... | 35.773333 | 150 | 0.638278 |
9eb4f1a7b59b9e87f3bcff1323172ebb01b5fe56 | 64,034 | py | Python | pymatgen/symmetry/analyzer.py | nwinner/pymatgen | 45cf4533bf92430b1c183066afb2929ed0a412f1 | [
"MIT"
] | 6 | 2015-02-06T08:27:09.000Z | 2021-02-28T14:42:52.000Z | pymatgen/symmetry/analyzer.py | nwinner/pymatgen | 45cf4533bf92430b1c183066afb2929ed0a412f1 | [
"MIT"
] | null | null | null | pymatgen/symmetry/analyzer.py | nwinner/pymatgen | 45cf4533bf92430b1c183066afb2929ed0a412f1 | [
"MIT"
] | 3 | 2015-10-21T08:04:40.000Z | 2019-03-19T23:11:15.000Z | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
An interface to the excellent spglib library by Atsushi Togo
(http://spglib.sourceforge.net/) for pymatgen.
v1.0 - Now works with both ordered and disordered structure.
v2.0 - Updated for spglib 1.6.
v3.0 ... | 39.52716 | 97 | 0.529812 |
9eb4f46f8d42fef905bb1869bcfb2558ea121732 | 355 | py | Python | owtf/plugins/network/active/msrpc@PTES-007.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/plugins/network/active/msrpc@PTES-007.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/plugins/network/active/msrpc@PTES-007.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | """
Plugin for probing MsRpc
"""
from owtf.managers.resource import get_resources
from owtf.plugin.plugin_helper import plugin_helper
DESCRIPTION = " MsRpc Probing "
def run(PluginInfo):
resource = get_resources('MsRpcProbeMethods')
# No previous output
return plugin_helper.CommandDump('Test Command', '... | 23.666667 | 88 | 0.75493 |
9eb50a04165f46ae84dd92f34fc81949b7636883 | 1,461 | py | Python | tools/utils.py | innovationOUtside/notebook_processing | 7444235112c2c0677f0873db54f080138c78ad95 | [
"MIT"
] | 2 | 2020-02-12T06:34:03.000Z | 2021-09-30T04:55:10.000Z | tools/utils.py | innovationOUtside/notebook_processing | 7444235112c2c0677f0873db54f080138c78ad95 | [
"MIT"
] | 8 | 2020-07-04T21:35:31.000Z | 2022-01-10T17:13:40.000Z | tools/utils.py | innovationOUtside/notebook_processing | 7444235112c2c0677f0873db54f080138c78ad95 | [
"MIT"
] | null | null | null | import os
import jupytext
import Path
import io
def _dir_file_handler(path, _f, filetype='.md'):
"""Get the filename for a single file on a specified path."""
f = os.path.join(path, _f)
if f.endswith(filetype):
return f
return None
# TO DO - at the moment assumes markdown
# Need to accommodate... | 29.816327 | 72 | 0.635866 |
9eb50ce69c12638d79208fd292c9e45506450af8 | 1,423 | py | Python | src/pykeen/datasets/umls/__init__.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/datasets/umls/__init__.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/datasets/umls/__init__.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Get triples from the UMLS dataset."""
import pathlib
from docdata import parse_docdata
from ..base import PathDataset
__all__ = [
'UMLS_TRAIN_PATH',
'UMLS_TEST_PATH',
'UMLS_VALIDATE_PATH',
'UMLS',
]
HERE = pathlib.Path(__file__).resolve().parent
UMLS_TRAIN_PATH = HERE.j... | 23.327869 | 93 | 0.646521 |
9eb558ac86e0169b7974970a22b24e480ef09554 | 5,589 | py | Python | src/lib/Bcfg2/Server/Reports/settings.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Reports/settings.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Reports/settings.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | import django
import os
import sys
# Compatibility import
from Bcfg2.Bcfg2Py3k import ConfigParser
# Django settings for bcfg2 reports project.
c = ConfigParser.ConfigParser()
if 'BCFG2_CONFIG_FILE' in os.environ:
cfiles=os.environ['BCFG2_CONFIG_FILE']
else:
cfiles=['/etc/bcfg2.conf', '/etc/bcfg2-web.conf']
if... | 32.876471 | 79 | 0.69762 |
9eb56fc867cafc36c1e5f6a986e34fafa7bdd8ff | 9,194 | py | Python | pypeit/scripts/show_2dspec.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | pypeit/scripts/show_2dspec.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | pypeit/scripts/show_2dspec.py | baileyji/PypeIt | eea71304f4a4bcf70148ea686967ed699dc36dfb | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
"""
This script enables the viewing of a processed FITS file
with extras. Run above the Science/ folder.
"""
import argparse
from astropy.table import Table
from pypeit import ginga
from pypeit.processimages import... | 43.164319 | 139 | 0.633783 |
9eb5814eaa9b8b993b8459023570341f8c0a0038 | 8,492 | py | Python | calculations.py | LoganHaug/simple-scouting-system | 9f9d797a0d91ac6bd38d90147448b400dbd9bf0b | [
"MIT"
] | null | null | null | calculations.py | LoganHaug/simple-scouting-system | 9f9d797a0d91ac6bd38d90147448b400dbd9bf0b | [
"MIT"
] | null | null | null | calculations.py | LoganHaug/simple-scouting-system | 9f9d797a0d91ac6bd38d90147448b400dbd9bf0b | [
"MIT"
] | null | null | null | """Holds the Calculations class which performs calculations"""
# Internal Imports
import database
import match
import team
class Calculations:
"""Performs calculations on match objects"""
def __init__(self):
"""Constructor Function
Aqcuires and assembles all matches into match objects"""
... | 36.290598 | 83 | 0.573245 |
9eb5b2f6e6037657e72043a981eb144968f09efe | 41,087 | py | Python | spyder/plugins/findinfiles/widgets.py | Nicztin/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | 1 | 2019-09-25T15:08:24.000Z | 2019-09-25T15:08:24.000Z | spyder/plugins/findinfiles/widgets.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | spyder/plugins/findinfiles/widgets.py | jorgeps86/spyder | 1c7b2232d2abbf1e101a1e2ab0552b32e8472bd6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""Find in files widget"""
# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201
# Standard library imports
... | 37.625458 | 80 | 0.554774 |
9eb5b8a571f88b6115f736555981b294f55562ca | 29,406 | py | Python | dtschema/lib.py | elkablo/dt-schema | 578fa5afc5b0b3a25418153c52af108c8c2bb3fe | [
"BSD-2-Clause"
] | 26 | 2019-05-07T23:55:51.000Z | 2022-01-31T20:10:48.000Z | dtschema/lib.py | elkablo/dt-schema | 578fa5afc5b0b3a25418153c52af108c8c2bb3fe | [
"BSD-2-Clause"
] | 41 | 2019-05-14T21:37:30.000Z | 2022-03-31T15:12:45.000Z | dtschema/lib.py | elkablo/dt-schema | 578fa5afc5b0b3a25418153c52af108c8c2bb3fe | [
"BSD-2-Clause"
] | 27 | 2019-05-07T18:16:13.000Z | 2022-01-31T20:10:50.000Z | # SPDX-License-Identifier: BSD-2-Clause
# Copyright 2018 Linaro Ltd.
# Copyright 2018 Arm Ltd.
# Python library for Devicetree schema validation
import sys
import os
import glob
import ruamel.yaml
import re
import pprint
import copy
import json
from ruamel.yaml.comments import CommentedMap
from urllib.request import u... | 33.077615 | 182 | 0.614228 |
9eb5c17cba10949acfdee30ee05c12dd53e789d0 | 5,923 | py | Python | pocean/cf.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/cf.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/cf.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | #!python
# coding=utf-8
import os
from datetime import datetime
import six
from six import u as astr
from .utils import all_subclasses
from .dataset import EnhancedDataset
from . import logger
class CFDataset(EnhancedDataset):
default_fill_value = -9999.9
default_time_unit = 'seconds since 1990-01-01 00:00... | 29.321782 | 81 | 0.516461 |
9eb5cb0d330490dbc6e5f57bc6a1b99722e06757 | 3,504 | py | Python | aws_organized/migrations.py | aws-samples/aws-organized | 934504f9b4a5851e846be668e0913dc37fa2d22b | [
"Apache-2.0"
] | 11 | 2021-01-03T22:52:40.000Z | 2022-02-23T21:27:02.000Z | aws_organized/migrations.py | aws-samples/aws-organized | 934504f9b4a5851e846be668e0913dc37fa2d22b | [
"Apache-2.0"
] | 4 | 2021-02-26T11:08:25.000Z | 2021-11-30T12:41:23.000Z | aws_organized/migrations.py | aws-samples/aws-organized | 934504f9b4a5851e846be668e0913dc37fa2d22b | [
"Apache-2.0"
] | 3 | 2021-01-16T13:49:17.000Z | 2022-03-22T10:15:49.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import sys
from typing import Callable, Tuple
import botocore
OU_CREATE = "OU_CREATE"
OU_CREATE_WITH_NON_EXISTENT_PARENT_OU = "OU_CREATE_WITH_NON_EXISTENT_PARENT_OU"
OU_RENAME = "OU_RENAME"
ACCOUNT_MOVE = "A... | 32.747664 | 91 | 0.691495 |
9eb5eac34f844b13d0b7a8c593635231227c16f8 | 3,804 | py | Python | cibuildwheel/bashlex_eval.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 702 | 2017-03-23T16:30:24.000Z | 2021-05-19T06:34:41.000Z | cibuildwheel/bashlex_eval.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 594 | 2017-03-20T23:13:42.000Z | 2021-05-19T14:22:19.000Z | cibuildwheel/bashlex_eval.py | bbayles/cibuildwheel | af2014c954cdda356d496732c4d5398c61526b8f | [
"BSD-2-Clause"
] | 124 | 2017-03-31T14:13:26.000Z | 2021-05-14T19:48:31.000Z | import subprocess
from typing import Callable, Dict, List, NamedTuple, Optional, Sequence
import bashlex
# a function that takes a command and the environment, and returns the result
EnvironmentExecutor = Callable[[List[str], Dict[str, str]], str]
def local_environment_executor(command: List[str], env: Dict[str, st... | 33.964286 | 97 | 0.685331 |
9eb64ee0af1cb193b13d41061392d2f9cb726780 | 1,857 | py | Python | DailyCodingProblem/46_Amazon_Longest_Palindromic_Subsequence.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | DailyCodingProblem/46_Amazon_Longest_Palindromic_Subsequence.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | DailyCodingProblem/46_Amazon_Longest_Palindromic_Subsequence.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | """
This problem was asked by Amazon.
Given a string, find the longest palindromic contiguous substring.
If there are more than one with the maximum length, return any one.
For example, the longest palindromic substring of "aabcdcb" is "bcdcb".
The longest palindromic substring of "bananas" is "anana".
"""
def check... | 26.913043 | 71 | 0.647281 |
9eb66d9b31f3b1b67e809c3de30e99d80efa1a14 | 4,960 | py | Python | selepy/driver_handler.py | atomicfruitcake/selepy | d25e13a2d98b56724f52bc690abec5f1fb61ddfd | [
"MIT"
] | null | null | null | selepy/driver_handler.py | atomicfruitcake/selepy | d25e13a2d98b56724f52bc690abec5f1fb61ddfd | [
"MIT"
] | null | null | null | selepy/driver_handler.py | atomicfruitcake/selepy | d25e13a2d98b56724f52bc690abec5f1fb61ddfd | [
"MIT"
] | null | null | null | '''!
@author atomicfruitcake
This module handles the driver based on the settings. By handling the types of browsers
here, we can separate the driver manipulation from the driver configuration
'''
import logging
import time
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import Desi... | 31.592357 | 87 | 0.70625 |
9eb6aef711b47cf17bec78000199907a67007b2e | 1,161 | py | Python | numpy_questions.py | oulianov/datacamp-assignment1 | 8c2f6c7f8b4118110edc1fc4993aa0af74524a21 | [
"BSD-2-Clause"
] | null | null | null | numpy_questions.py | oulianov/datacamp-assignment1 | 8c2f6c7f8b4118110edc1fc4993aa0af74524a21 | [
"BSD-2-Clause"
] | null | null | null | numpy_questions.py | oulianov/datacamp-assignment1 | 8c2f6c7f8b4118110edc1fc4993aa0af74524a21 | [
"BSD-2-Clause"
] | null | null | null | # noqa: D100
import numpy as np
def max_index(X):
"""Return the index of the maximum in a numpy array.
Parameters
----------
X : ndarray of shape (n_samples, n_features)
The input array.
Returns
-------
i : int
The row index of the maximum.
j : int
The column... | 20.368421 | 70 | 0.54522 |
9eb6c255511b9474994463ebdabcc91bc5463299 | 3,071 | py | Python | rl_quad/conventional_control/lqr_controller.py | vivekagra/Biplane-Quadrotor | afe69216494842f5bfe16cbcc0cdcc6ef0de7769 | [
"BSD-3-Clause"
] | null | null | null | rl_quad/conventional_control/lqr_controller.py | vivekagra/Biplane-Quadrotor | afe69216494842f5bfe16cbcc0cdcc6ef0de7769 | [
"BSD-3-Clause"
] | null | null | null | rl_quad/conventional_control/lqr_controller.py | vivekagra/Biplane-Quadrotor | afe69216494842f5bfe16cbcc0cdcc6ef0de7769 | [
"BSD-3-Clause"
] | null | null | null | # Implementation of an LQR controller for a linearized model
# of a quadrotor
import numpy as np
import rl_quad.environment.model.params as params
from math import sin, cos
import rl_quad.utils.utils as utils
# Z dynamics LQR Gains and input matrices
K_z = np.matrix([10.0, 2.04709])
Nu_z = np.matrix([0.0])
Nx_z = np.... | 33.747253 | 80 | 0.647672 |
9eb6d344fa70373c54fdc8be12f9c13694870f2c | 917 | py | Python | xblock/__init__.py | edly-io/XBlock | 60d01a32e5bfe1b543f598cbc56ba3f4d736129d | [
"Apache-2.0"
] | null | null | null | xblock/__init__.py | edly-io/XBlock | 60d01a32e5bfe1b543f598cbc56ba3f4d736129d | [
"Apache-2.0"
] | null | null | null | xblock/__init__.py | edly-io/XBlock | 60d01a32e5bfe1b543f598cbc56ba3f4d736129d | [
"Apache-2.0"
] | null | null | null | """
XBlock Courseware Components
"""
# For backwards compatibility, provide the XBlockMixin in xblock.fields
# without causing a circular import
import codecs
import os
import warnings
import xblock.core
import xblock.fields
class XBlockMixin(xblock.core.XBlockMixin):
"""
A wrapper around xblock.core.XBlock... | 26.970588 | 104 | 0.751363 |
9eb6ef523d38abb539539d958ec1183ee35dd3be | 33,595 | py | Python | cogs/config.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 10 | 2020-06-06T13:57:46.000Z | 2021-11-08T09:27:42.000Z | cogs/config.py | HypixelBot/Bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 7 | 2020-06-06T14:04:05.000Z | 2020-07-05T04:05:37.000Z | cogs/config.py | HypixelBot/bot | 672e17c5bbd37b0e7e54581b679051b7e59575d2 | [
"MIT"
] | 14 | 2020-06-09T17:12:52.000Z | 2021-07-21T23:24:30.000Z | from discord import AsyncWebhookAdapter
from discord import Webhook as WebHook
from cogs.utils.webhooks import *
from cogs.utils.checks import *
import logging
import discord
import asyncio
log = logging.getLogger(__name__)
class Config(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.... | 75.1566 | 289 | 0.572049 |
9eb70877071cce1e1add183b932a47e843bcb827 | 721 | py | Python | rls/nn/activations.py | StepNeverStop/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 371 | 2019-04-26T00:37:33.000Z | 2022-03-31T07:33:12.000Z | rls/nn/activations.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 47 | 2019-07-21T11:51:57.000Z | 2021-08-31T08:45:22.000Z | rls/nn/activations.py | BlueFisher/RLs | 25cc97c96cbb19fe859c9387b7547cbada2c89f2 | [
"Apache-2.0"
] | 102 | 2019-06-29T13:11:15.000Z | 2022-03-28T13:51:04.000Z | #!/usr/bin/env python3
# encoding: utf-8
import torch as th
import torch.nn as nn
default_act = 'relu'
Act_REGISTER = {}
Act_REGISTER[None] = lambda: lambda x: x
Act_REGISTER['relu'] = nn.ReLU
Act_REGISTER['elu'] = nn.ELU
Act_REGISTER['gelu'] = nn.GELU
Act_REGISTER['leakyrelu'] = nn.LeakyReLU
Act_REGISTE... | 23.258065 | 56 | 0.660194 |
9eb70c5427eb1573de47b76735c421a3396051d3 | 9,519 | py | Python | data/level/level55.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level55.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level55.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {
'level_index': 55,
'move_count': 26,
'board_info': {
(0, 3): {
'base': (5, 1),
'next': (0, 1),
'prev': (0, -1)
},
(0, 4): {
'base': (4, 1),
'next': (0, 1),
'prev': (0, -1)
},
(0, 5): {
... | 22.397647 | 34 | 0.188675 |
9eb7109d3dcc98a8cd5bea3da453230886cf093d | 16,233 | py | Python | tests/xbeam/modal/rotating_beam/generate_bielawa_baromega2_1e3.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | tests/xbeam/modal/rotating_beam/generate_bielawa_baromega2_1e3.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | tests/xbeam/modal/rotating_beam/generate_bielawa_baromega2_1e3.py | AntonioWR/sharpy | c922be8d5a1831c4624b22f39264e2f417a03deb | [
"BSD-3-Clause"
] | null | null | null | import h5py as h5
import numpy as np
import configparser
import os
import sharpy.utils.algebra as algebra
# Generate errors during execution
import sys
import sharpy.utils.cout_utils as cout
case_name = 'bielawa_baromega2_1e3'
route = os.path.dirname(os.path.realpath(__file__)) + '/'
num_elem = 40
num_node_elem = 3
... | 41.837629 | 152 | 0.547157 |
9eb71b81196fb5b2a2f34fb17aa27d3b699b57f2 | 2,951 | py | Python | model/crfasrnn/cil.crfasrnn.R101/config.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | null | null | null | model/crfasrnn/cil.crfasrnn.R101/config.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | null | null | null | model/crfasrnn/cil.crfasrnn.R101/config.py | fywalter/TorchSeg | 729eb22d8c5d607466055552fd82e0819d5f29e2 | [
"MIT"
] | 2 | 2020-07-31T14:40:49.000Z | 2020-07-31T17:52:30.000Z | # encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path as osp
import sys
import time
import numpy as np
from easydict import EasyDict as edict
import argparse
import torch.utils.model_zoo as model_zoo
C = edict()
config = C
cfg =... | 24.798319 | 75 | 0.70654 |
9eb721da66ac3646f841663efa6cf321e8583dde | 4,357 | py | Python | tests/models/test_ModelsMoCo.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 1,515 | 2020-10-05T13:04:17.000Z | 2022-03-31T16:14:55.000Z | tests/models/test_ModelsMoCo.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 628 | 2020-10-14T11:38:51.000Z | 2022-03-31T14:40:54.000Z | tests/models/test_ModelsMoCo.py | Tekrific/lightly | 75a1d56b4cee77f68e0f3166e3a412711d0dbb2d | [
"MIT"
] | 108 | 2020-10-17T08:31:06.000Z | 2022-03-20T16:44:22.000Z | import unittest
import torch
import torch.nn as nn
import torchvision
import lightly
from lightly.models import ResNetGenerator
from lightly.models import MoCo
def get_backbone(resnet, num_ftrs=64):
last_conv_channels = list(resnet.children())[-1].in_features
backbone = nn.Sequential(
lightly.models... | 36.923729 | 79 | 0.584806 |
9eb724bb926d790e112f60bafd21f6f1e6171ce8 | 8,165 | py | Python | DBFace/common.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | DBFace/common.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | DBFace/common.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z |
import cv2
import random
import numpy as np
import math
import os
class BBox:
def __init__(self, label, xyrb, score=0, landmark=None, rotate = False):
self.label = label
self.score = score
self.landmark = landmark
self.x, self.y, self.r, self.b = xyrb
self.rotate = rotate... | 25.200617 | 121 | 0.548316 |
9eb72ce595d807969d28f32d980dbddb10c8f970 | 250 | py | Python | dj_pagination/tests/settings.py | sampaccoud/dj-pagination | f6d968897feda4d47282922b99fb80296b4f9e30 | [
"BSD-3-Clause"
] | 88 | 2016-08-16T20:37:31.000Z | 2021-11-09T11:06:18.000Z | dj_pagination/tests/settings.py | sampaccoud/dj-pagination | f6d968897feda4d47282922b99fb80296b4f9e30 | [
"BSD-3-Clause"
] | 29 | 2016-09-27T11:18:48.000Z | 2020-11-12T13:59:58.000Z | dj_pagination/tests/settings.py | sampaccoud/dj-pagination | f6d968897feda4d47282922b99fb80296b4f9e30 | [
"BSD-3-Clause"
] | 37 | 2016-09-05T14:22:31.000Z | 2020-11-12T13:03:00.000Z | DATABASES = {"default": {"NAME": ":memory:", "ENGINE": "django.db.backends.sqlite3"}}
SECRET_KEY = "fake-key"
INSTALLED_APPS = ("dj_pagination",)
TEMPLATES = [
{"BACKEND": "django.template.backends.django.DjangoTemplates", "APP_DIRS": True}
]
| 25 | 85 | 0.68 |
9eb75d647392e30279b154f60ba2673e198baec4 | 4,006 | py | Python | examples/auto_sir.py | dwu402/pyDD | e4752f265252a127ee3ced01ae9d679043d74772 | [
"MIT"
] | 2 | 2019-11-29T00:31:29.000Z | 2021-06-11T04:33:57.000Z | examples/auto_sir.py | dwu402/pyDD | e4752f265252a127ee3ced01ae9d679043d74772 | [
"MIT"
] | 6 | 2020-04-21T08:19:17.000Z | 2020-07-29T00:49:58.000Z | examples/auto_sir.py | dwu402/pyDD | e4752f265252a127ee3ced01ae9d679043d74772 | [
"MIT"
] | null | null | null | """
In this example, we solve the classic generalised profiling problem for inference of a deterministic SIR model
In contrast to basic_sir, we also automatically optimise for the covariance matrix
"""
import pypei
import numpy as np
from scipy.integrate import solve_ivp
from scipy import stats
import casadi as ca
... | 26.885906 | 117 | 0.647778 |
9eb7be6961dad93409a38d74365210d694815491 | 33,359 | py | Python | roc_rewriting_main.py | Hannabrahman/Counterfactual-StoryRW | f57b7b629ce9811f01fbc9e0305f33b18ad98ba4 | [
"MIT"
] | null | null | null | roc_rewriting_main.py | Hannabrahman/Counterfactual-StoryRW | f57b7b629ce9811f01fbc9e0305f33b18ad98ba4 | [
"MIT"
] | null | null | null | roc_rewriting_main.py | Hannabrahman/Counterfactual-StoryRW | f57b7b629ce9811f01fbc9e0305f33b18ad98ba4 | [
"MIT"
] | null | null | null | # Copyright 2019 The Texar Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 38.744483 | 142 | 0.589196 |
9eb7dc4861e8cdbf03d8a6c74c2cfdeea68dcb91 | 831 | py | Python | platform/ipython/profile_topo/ipython_config.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 40 | 2015-02-05T14:53:10.000Z | 2020-10-12T06:26:23.000Z | platform/ipython/profile_topo/ipython_config.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 95 | 2015-01-01T16:14:20.000Z | 2022-02-11T22:50:27.000Z | platform/ipython/profile_topo/ipython_config.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | 22 | 2015-05-03T10:24:17.000Z | 2019-11-15T06:34:31.000Z | # Configuration file for ipython.
c = get_config()
import sys, os
profile_dir = os.path.split(__file__)[0]
project_dir = os.path.join(profile_dir, '..', '..', '..')
sys.path = [os.path.abspath(project_dir)] + sys.path
import external
import param
from topo.misc.commandline import default_output_path
param.resolve_p... | 30.777778 | 70 | 0.76775 |
9eb7de45fae38f48d209679e9f6726c7e464e3a8 | 4,648 | py | Python | generated/python/proto-google-cloud-error-reporting-v1beta1/google/cloud/proto/devtools/clouderrorreporting/v1beta1/error_stats_service_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 18 | 2016-12-08T20:47:57.000Z | 2022-01-29T19:36:04.000Z | generated/python/proto-google-cloud-error-reporting-v1beta1/google/cloud/proto/devtools/clouderrorreporting/v1beta1/error_stats_service_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 252 | 2016-09-21T20:51:36.000Z | 2021-03-25T23:02:36.000Z | generated/python/proto-google-cloud-error-reporting-v1beta1/google/cloud/proto/devtools/clouderrorreporting/v1beta1/error_stats_service_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 37 | 2016-09-19T21:13:16.000Z | 2022-01-29T19:36:07.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
import google.cloud.proto.devtools.clouderrorreporting.v1beta1.error_stats_service_pb2 as google_dot_cloud_dot_proto_dot... | 54.682353 | 196 | 0.825301 |
9eb7e0e0b33c04025e467521b019ce4e0b2b8b89 | 6,448 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/selected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/selected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/selected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# color
# -----
@property
def color(self):
"""
Sets the marker color of selected points.
The 'color' property is a color and may ... | 33.409326 | 82 | 0.550713 |
9eb808b6bcc0dfe297a8bdc8ab9e9459af9ad513 | 27,372 | py | Python | fuzzycat/verify.py | miku/fuzzycat | 478d7d06ad9e56145cb94f3461c355b1ba9eb491 | [
"MIT"
] | 3 | 2020-12-24T03:38:38.000Z | 2022-02-07T19:41:33.000Z | fuzzycat/verify.py | miku/fuzzycat | 478d7d06ad9e56145cb94f3461c355b1ba9eb491 | [
"MIT"
] | 1 | 2020-11-12T20:01:40.000Z | 2020-11-12T20:01:40.000Z | fuzzycat/verify.py | miku/fuzzycat | 478d7d06ad9e56145cb94f3461c355b1ba9eb491 | [
"MIT"
] | 1 | 2020-11-11T05:59:47.000Z | 2020-11-11T05:59:47.000Z | """
Verification part of matching.
Clustering results in a documents with keys and values, where values is a list
of entites associated with a cluster.
{
"v": [
{...}, ...
],
"k": "1 Grundlagen",
}
The list of documents will often contain false positives. The `verify` routine
is a w... | 44.291262 | 136 | 0.630206 |
9eb80b7a0f2f53149805b1ed0375dd91745eb53f | 684 | py | Python | tube/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | tube/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | tube/Constants.py | wolongyuan/lift-js | 95b2012a3993e787f07d0ace3acafbd855bc7c45 | [
"MIT"
] | null | null | null | import Memory
string_pool = {}
integer_pool = {}
special_pool = {}
def set_str(string, addr):
string_pool[string] = addr
def get_str(string):
if string in string_pool:
return string_pool[string]
else:
addr = Memory.new_str(string)
string_pool[string] = addr
return addr
... | 16.682927 | 37 | 0.649123 |
9eb815d96dbdd0880a0e6e1eadef898efe0235b7 | 3,923 | py | Python | experiments/ashvin/icml2020/hand/sparse/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/sparse/test1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies import GaussianP... | 30.176923 | 130 | 0.569207 |
9eb83513122221cd75d26f3055b80acc7c735e73 | 10,632 | py | Python | tests/test_config.py | gitter-badger/vcspull | 9584c6d40fca8e9f36970894ce620a891723d9b5 | [
"MIT"
] | null | null | null | tests/test_config.py | gitter-badger/vcspull | 9584c6d40fca8e9f36970894ce620a891723d9b5 | [
"MIT"
] | null | null | null | tests/test_config.py | gitter-badger/vcspull | 9584c6d40fca8e9f36970894ce620a891723d9b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Tests for vcspull config loading."""
from __future__ import absolute_import, print_function, unicode_literals
import os
import pytest
import kaptan
from vcspull import config, exc
from vcspull.config import expand_dir, extract_repos
from .fixtures import example as fixtures
from .fixture... | 30.817391 | 88 | 0.715482 |
9eb8654281eee0a514e642b2efba4f3472f81dca | 1,603 | py | Python | transformer/test_blacklist.py | jsabak/Transformer | c96ff1bed109f114f7c69143c85ee362e5f518d1 | [
"MIT"
] | null | null | null | transformer/test_blacklist.py | jsabak/Transformer | c96ff1bed109f114f7c69143c85ee362e5f518d1 | [
"MIT"
] | null | null | null | transformer/test_blacklist.py | jsabak/Transformer | c96ff1bed109f114f7c69143c85ee362e5f518d1 | [
"MIT"
] | null | null | null | # pylint: skip-file
import io
import os
import logging
from unittest.mock import patch
from transformer.blacklist import on_blacklist
class TestBlacklist:
@patch("builtins.open")
def test_it_returns_false_and_logs_error_if_the_blacklist_does_not_exist(
self, mock_open, caplog
):
mock_op... | 34.847826 | 87 | 0.721772 |
9eb8696d76e193fc4161ab13c49b3db436e0e80c | 11,385 | py | Python | pump_mbf.py | couchbaselabs/couchbase-cli | 596f3564d08881af83f93910ac3d2c53a82b1d64 | [
"Apache-2.0"
] | null | null | null | pump_mbf.py | couchbaselabs/couchbase-cli | 596f3564d08881af83f93910ac3d2c53a82b1d64 | [
"Apache-2.0"
] | null | null | null | pump_mbf.py | couchbaselabs/couchbase-cli | 596f3564d08881af83f93910ac3d2c53a82b1d64 | [
"Apache-2.0"
] | 1 | 2018-08-23T11:14:28.000Z | 2018-08-23T11:14:28.000Z | #!/usr/bin/env python
import glob
import logging
import os
import sys
import socket
import couchbaseConstants
from cbcollections import defaultdict
from pump import EndPoint, Source, Batch
try:
import ctypes
except ImportError:
cb_path = '/opt/couchbase/lib/python'
while cb_path in sys.path:
sys.p... | 35.247678 | 96 | 0.52253 |
9eb86d70dc23ba074f0ef56cb69cd6eda555ddd3 | 2,245 | py | Python | media/create_contact_sheet_custom.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | media/create_contact_sheet_custom.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | media/create_contact_sheet_custom.py | thejoltjoker/python | 4517065e64d83947648e2aad206ac4ec786b166e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
create_contact_sheet.py
Description of create_contact_sheet.py.
"""
import sys
import argparse
from pathlib import Path
import subprocess
def run_montage(input_files, output_path, width):
"""Run exiftool in subprocess and return the output"""
# montage -geomet... | 33.014706 | 103 | 0.62539 |
9eb86e65b10c4047c017d5a356f042f63bedd7ad | 1,403 | py | Python | fitlins/viz/contrasts.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | 1 | 2020-03-13T19:09:53.000Z | 2020-03-13T19:09:53.000Z | fitlins/viz/contrasts.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | 10 | 2017-10-25T20:09:40.000Z | 2019-09-20T18:20:55.000Z | fitlins/viz/contrasts.py | jdkent/fitlins | 575bb589d1a99622f4cc2fb1c04671132d995091 | [
"Apache-2.0"
] | 1 | 2018-02-13T01:52:09.000Z | 2018-02-13T01:52:09.000Z | #!/usr/bin/env python
import seaborn as sns
import numpy as np
from matplotlib import pyplot as plt
sns.set_style('white')
plt.rcParams['svg.fonttype'] = 'none'
def plot_contrast_matrix(contrast_matrix, ornt='vertical', ax=None):
""" Plot correlation matrix
Parameters
----------
mat : DataFrame
... | 26.471698 | 79 | 0.622238 |
9eb878d0ad280ab93392d64d5c3572ade644f49b | 498 | py | Python | xos/synchronizers/openstack/error_mapper.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | null | null | null | xos/synchronizers/openstack/error_mapper.py | xmaruto/mcord | 3678a3d10c3703c2b73f396c293faebf0c82a4f4 | [
"Apache-2.0"
] | 5 | 2020-06-05T17:47:15.000Z | 2021-09-23T23:21:27.000Z | xos/synchronizers/ec2/error_mapper.py | pan2za/xos | c2a4da2ccaa12360b2718be303b247866aefdfe6 | [
"Apache-2.0"
] | null | null | null | from xos.config import Config
from xos.logger import Logger, logging, logger
class ErrorMapper:
def __init__(self, error_map_file):
self.error_map = {}
try:
error_map_lines = open(error_map_file).read().splitlines()
for l in error_map_lines:
if (not l.startswith('#')):
splits = l.split('->')
k... | 19.153846 | 61 | 0.674699 |
9eb8917d9d719acc71fc26ad75d9226de20f0702 | 2,372 | py | Python | refinery/reset_db.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 103 | 2015-01-13T00:48:14.000Z | 2021-11-08T10:53:22.000Z | refinery/reset_db.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 7 | 2015-02-21T04:03:40.000Z | 2021-08-23T20:24:54.000Z | refinery/reset_db.py | csa0001/Refinery | 0d5de8fc3d680a2c79bd0e9384b506229787c74f | [
"MIT"
] | 27 | 2015-01-23T00:54:31.000Z | 2020-12-30T14:30:50.000Z | #!/usr/bin/env python
# encoding: utf-8
import os
from config import basedir
from refinery import app,db
from refinery.data.models import *
import shutil
def create_db_entries():
print "Creating new DB"
userdir = app.config['USER_DIRECTORY']
try:
os.stat(userdir)
except:
os.mkdi... | 25.234043 | 100 | 0.634907 |
9eb8a9efe3a57c1169a5961238de43c97db7eba1 | 7,520 | py | Python | ufora/distributed/S3/S3Interface.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/distributed/S3/S3Interface.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/distributed/S3/S3Interface.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 35.140187 | 98 | 0.652793 |
9eb8e0284a61c596e8df75fa795135b8e437c556 | 4,655 | py | Python | skimage/io/_plugins/fits_plugin.py | jaberg/scikits-image | 2ab3e2dfb341189ef2ff9370c6cf3d33ef6ec88d | [
"BSD-3-Clause"
] | 2 | 2020-02-17T18:54:33.000Z | 2021-09-28T15:18:23.000Z | skimage/io/_plugins/fits_plugin.py | amueller/scikit-image | a8bfc5c5814a3c7fe363cfcad0c68b935706cd3c | [
"BSD-3-Clause"
] | 1 | 2020-03-30T12:31:55.000Z | 2020-03-30T12:31:55.000Z | skimage/io/_plugins/fits_plugin.py | emmanuelle/scikit-image | eccc41907135cf81b99c4be18a480a9bc705485d | [
"BSD-3-Clause"
] | 1 | 2019-12-20T19:19:59.000Z | 2019-12-20T19:19:59.000Z | __all__ = ['imread', 'imread_collection']
import numpy as np
import skimage.io as io
try:
import pyfits
except ImportError:
raise ImportError("PyFITS could not be found. Please refer to\n"
"http://www.stsci.edu/resources/software_hardware/pyfits\n"
"for further instructions.")
def imread(fna... | 31.241611 | 78 | 0.629216 |
9eb92211255fc291d13717b13adc0b1eb8f765aa | 3,098 | py | Python | find_safe_address/find_safe_address.py | dfirpaul/exploit_dev | dacaf282c719bc799fb43bab439f8372d63fa353 | [
"MIT"
] | 13 | 2018-12-31T06:33:38.000Z | 2020-01-25T07:51:50.000Z | find_safe_address/find_safe_address.py | schrodyn/Penetration-Test | a3079362b8950a91f9ea8145852433e82ed4cb34 | [
"MIT"
] | 1 | 2018-12-13T08:55:17.000Z | 2019-04-12T05:38:44.000Z | find_safe_address/find_safe_address.py | schrodyn/Penetration-Test | a3079362b8950a91f9ea8145852433e82ed4cb34 | [
"MIT"
] | 4 | 2019-04-03T12:12:28.000Z | 2019-11-03T19:31:21.000Z | #!/usr/bin/env python3
# author: greyshell
# description: find safe return address
import argparse
import sys
from colorama import Fore
# global constant variable
PROGRAM_LOGO = """
___ __ __ ___ ___ __ __ __ ___ __ __
|__ | |\ | | \ /__` /\ |__ |__ /\ | \ | ... | 26.254237 | 109 | 0.559716 |
9eb92fecd1a202c20c16e8b4af14b4d8efd8c706 | 4,170 | py | Python | diffsynth/modules/harmor.py | hyakuchiki/diffsynth | 4fc64ba04608cbaf8e016e4878fc50bedfca4da3 | [
"MIT"
] | 31 | 2021-11-09T06:08:01.000Z | 2022-03-25T03:08:18.000Z | diffsynth/modules/harmor.py | hyakuchiki/diffsynth | 4fc64ba04608cbaf8e016e4878fc50bedfca4da3 | [
"MIT"
] | null | null | null | diffsynth/modules/harmor.py | hyakuchiki/diffsynth | 4fc64ba04608cbaf8e016e4878fc50bedfca4da3 | [
"MIT"
] | 2 | 2021-11-13T08:55:43.000Z | 2022-01-28T15:30:03.000Z | import torch
import torch.nn as nn
from diffsynth.processor import Gen, FREQ_RANGE
import diffsynth.util as util
import numpy as np
def low_pass(freq, cutoff, q):
ratio = freq/cutoff
s = ratio*1j
freq_response = abs(1/(s**2 + 1/q*s+1))
return freq_response
class Harmor(Gen):
"""
Subtractive sy... | 44.361702 | 111 | 0.615588 |
9eb99f56d00946ecb31973be607a0be12f473b50 | 4,698 | py | Python | mapclientplugins/saveargondocumentstep/ui_configuredialog.py | mapclient-plugins/mapclientplugins.saveargondocumentstep | 0b34cc1541f67b7babb88ef3aef3e157daa0e385 | [
"Apache-2.0"
] | null | null | null | mapclientplugins/saveargondocumentstep/ui_configuredialog.py | mapclient-plugins/mapclientplugins.saveargondocumentstep | 0b34cc1541f67b7babb88ef3aef3e157daa0e385 | [
"Apache-2.0"
] | null | null | null | mapclientplugins/saveargondocumentstep/ui_configuredialog.py | mapclient-plugins/mapclientplugins.saveargondocumentstep | 0b34cc1541f67b7babb88ef3aef3e157daa0e385 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'configuredialog.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
##########... | 45.61165 | 128 | 0.726692 |
9eb9a741da0ea90c0e991c4cc69b134b850e91d5 | 22,427 | py | Python | tests/components/config/test_config_entries.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | tests/components/config/test_config_entries.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | tests/components/config/test_config_entries.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Test config entries API."""
from collections import OrderedDict
from unittest.mock import patch
import pytest
import voluptuous as vol
from homeassistant import config_entries as core_ce, data_entry_flow
from homeassistant.components.config import config_entries
from homeassistant.config_entries import HANDLERS
f... | 32.222701 | 88 | 0.599367 |
9eb9da35670de3b3b1e75b13bc5759ba4c742500 | 18,794 | py | Python | niapy/algorithms/basic/kh.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/algorithms/basic/kh.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | niapy/algorithms/basic/kh.py | chinmay3/NiaPy | b4e5c0f98063e2a9eebd8d750f0922cfca88bc55 | [
"MIT"
] | null | null | null | # encoding=utf8
import logging
import numpy as np
from niapy.algorithms.algorithm import Algorithm
from niapy.util import full_array, euclidean
logging.basicConfig()
logger = logging.getLogger('niapy.algorithms.basic')
logger.setLevel('INFO')
__all__ = ['KrillHerd']
class KrillHerd(Algorithm):
r"""Implementat... | 41.124726 | 285 | 0.625838 |
9eba059549302c61bd8c5b0b83c811da449c7ba8 | 5,675 | py | Python | tensorflow/python/kernel_tests/lrn_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/kernel_tests/lrn_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/lrn_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.46875 | 80 | 0.640881 |
9eba2fd41fbd9439f93849d7d1fb5022ea6b9f61 | 5,537 | py | Python | hdltools/abshdl/concat.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 2 | 2020-02-28T13:02:39.000Z | 2021-06-30T09:15:35.000Z | hdltools/abshdl/concat.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | 1 | 2020-03-22T17:32:45.000Z | 2020-03-23T15:43:39.000Z | hdltools/abshdl/concat.py | brunosmmm/hdltools | a98ca8c4d168740fa229c939a7b1f31ea73eec24 | [
"MIT"
] | null | null | null | """Concatenation."""
from . import HDLObject
from .const import HDLIntegerConstant
import hdltools.abshdl.expr
import hdltools.abshdl.signal
class HDLConcatenation(HDLObject):
"""Concatenation of HDLObjects."""
def __init__(self, value, *args, size=None, direction="rl"):
"""Initialize."""
se... | 30.092391 | 80 | 0.514719 |
9eba89b4e9e4424f1f554d521dc067f3b5be7b66 | 7,125 | py | Python | diayn/diayn_relabelers/diayn_half_cheetah_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | diayn/diayn_relabelers/diayn_half_cheetah_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | diayn/diayn_relabelers/diayn_half_cheetah_relabeler.py | YashBit/generalized-hindsight | 2ba2e1ba0caa20b71d01c8ad70fbc7f47d61bd6c | [
"MIT"
] | null | null | null | import numpy as np
import os.path as osp
from rlkit.torch.multitask.gym_relabelers import ContinuousRelabeler
from rlkit.torch.multitask.reference_latents import HALF_CHEETAH_HARD_LATENT
class HalfCheetahRelabeler(ContinuousRelabeler):
def __init__(self, dim=1, low=0.0, high=np.pi/2.0, **kwargs):
assert di... | 44.811321 | 115 | 0.672982 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.