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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e7fcf8eda0cb0f8d063efc52e70b51a37622bef | 1,973 | py | Python | dgpy/systems/Elasticity.py | nilsleiffischer/dgpy | 85d0b85cddb0cf030f35d5043a959b5d23424bc8 | [
"MIT"
] | 1 | 2021-04-12T16:38:58.000Z | 2021-04-12T16:38:58.000Z | dgpy/systems/Elasticity.py | nilsleiffischer/dgpy | 85d0b85cddb0cf030f35d5043a959b5d23424bc8 | [
"MIT"
] | null | null | null | dgpy/systems/Elasticity.py | nilsleiffischer/dgpy | 85d0b85cddb0cf030f35d5043a959b5d23424bc8 | [
"MIT"
] | 1 | 2019-09-24T09:40:33.000Z | 2019-09-24T09:40:33.000Z | import numpy as np
from numpy.lib.function_base import disp
field_valences = (1,)
class IsotropicHomogeneous:
def __init__(self, bulk_modulus, shear_modulus):
self.bulk_modulus = bulk_modulus
self.shear_modulus = shear_modulus
self.youngs_modulus = (9. * self.bulk_modulus * self.shear_mod... | 35.872727 | 77 | 0.584389 |
9e7fe1d547f54f0fda3a223f8f1bba7d4e5ff100 | 2,772 | py | Python | src/networks/VGGnet_train.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 24 | 2019-09-18T09:22:08.000Z | 2022-03-08T06:47:33.000Z | src/networks/VGGnet_train.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 6 | 2019-09-18T09:21:02.000Z | 2022-02-09T23:31:48.000Z | src/networks/VGGnet_train.py | knmac/LCDC_release | f977ca1cda972983cac7e33b324f07f2e1463a19 | [
"MIT"
] | 4 | 2020-08-06T02:05:36.000Z | 2021-12-12T07:19:17.000Z | import tensorflow as tf
from .network import Network
class VGGnetTrain(Network):
def build_graph(self):
""" Build graph for model
"""
n_classes = self.n_classes
# Feature extraction
(self.feed('data')
.conv(3, 3, 64, 1, 1, name='conv1_1', trainable=False)
... | 43.3125 | 78 | 0.523088 |
9e8028d91e9e460f8656963b054da3c51dd9de5f | 1,701 | py | Python | model/roi_layers/roi_align_tv.py | ZhangHanbo/Visual-Manipulation-Relationship-Network-Pytorch | 9dd24947db318f6e404918d4758f1d824eea3748 | [
"MIT"
] | 26 | 2019-10-31T08:21:46.000Z | 2022-03-11T13:58:43.000Z | model/roi_layers/roi_align_tv.py | moli1026/regrad | f66c38c00405b22cb746cc3f5c38d2b49f77d854 | [
"MIT"
] | 12 | 2019-11-07T09:12:50.000Z | 2022-03-12T02:58:18.000Z | model/roi_layers/roi_align_tv.py | moli1026/regrad | f66c38c00405b22cb746cc3f5c38d2b49f77d854 | [
"MIT"
] | 11 | 2019-10-30T08:44:47.000Z | 2022-03-11T13:58:48.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from torch import nn
from torchvision.ops import roi_align
from torch.nn.functional import avg_pool2d, max_pool2d
class ROIAlign(nn.Module):
def __init__(self, output_size, spatial_scale, sampling_ratio):
super(ROIAlign, self).__init__... | 37.8 | 85 | 0.684303 |
9e804234c945c56980051fc8e7562d4980f59d63 | 3,299 | py | Python | src/FunctionApps/python/tests/IntakePipeline/fhir_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-24T18:16:39.000Z | 2022-03-29T20:21:41.000Z | src/FunctionApps/python/tests/IntakePipeline/fhir_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 17 | 2022-02-08T17:13:55.000Z | 2022-03-28T16:49:00.000Z | src/FunctionApps/python/tests/IntakePipeline/fhir_test.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-27T23:12:50.000Z | 2022-03-17T04:51:47.000Z | from datetime import datetime, timezone
import os
from unittest import mock
from IntakePipeline.fhir import (
store_data,
get_fhirserver_cred_manager,
upload_bundle_to_fhir_server,
)
from azure.identity import DefaultAzureCredential
@mock.patch("IntakePipeline.fhir.get_blob_client")
def test_store_bund... | 31.122642 | 88 | 0.664141 |
9e80a77e086cf8d8c00c0030d2bfbf48ef45a9d5 | 7,919 | py | Python | clients/client/python/ory_client/model/generic_error.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/generic_error.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/generic_error.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.17
Contact: support@ory.sh
Generated by: htt... | 41.899471 | 194 | 0.58366 |
9e80bf9f4865339b7f3b6f78b0f964621882e941 | 361 | py | Python | tbonlineproject/story/sitemap.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | null | null | null | tbonlineproject/story/sitemap.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | 3 | 2021-06-08T23:57:13.000Z | 2022-01-13T03:42:01.000Z | tbonlineproject/story/sitemap.py | nathangeffen/tbonline-2 | 0d5869197e66a0057fa07cb99f21dde7f5b47c30 | [
"MIT"
] | null | null | null | '''Creates sitemap for Story.
'''
import datetime
from django.contrib.sitemaps import Sitemap
from models import Story
class StorySitemap(Sitemap):
changefreq = "never"
priority = 0.5
def items(self):
return Story.objects.filter(date_published__lte=datetime.datetime.now())
def lastmod(self,... | 20.055556 | 80 | 0.714681 |
9e80dd92e1a09b4ba8d93c520461b8e666cf8cde | 787 | py | Python | tests/test_provider_poseidon_matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | tests/test_provider_poseidon_matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | tests/test_provider_poseidon_matchbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # tests/test_provider_poseidon_matchbox.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:21:35 UTC)
def test_provider_import():
import terrascript.provider.poseidon.matchbox
def test_resource_import():
from terrascript.resource.poseidon.matchbox import matchbox_group
from terrascript.r... | 29.148148 | 80 | 0.758577 |
9e81343ac67d5eed8d6eb88278c16501ac25a4fe | 4,608 | py | Python | influxdb_client/domain/markdown_view_properties.py | timbeccue/influxdb-client-python | ff136c7990527a87dcf5f8ff39f6f686ce218c98 | [
"MIT"
] | null | null | null | influxdb_client/domain/markdown_view_properties.py | timbeccue/influxdb-client-python | ff136c7990527a87dcf5f8ff39f6f686ce218c98 | [
"MIT"
] | null | null | null | influxdb_client/domain/markdown_view_properties.py | timbeccue/influxdb-client-python | ff136c7990527a87dcf5f8ff39f6f686ce218c98 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxd... | 27.105882 | 124 | 0.567491 |
9e81602cdecc9492ad856a52ba91a8b41c948c8f | 2,660 | py | Python | src/server/tests/integration/graphql/test_graphql_queries.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | 1 | 2021-05-18T07:32:37.000Z | 2021-05-18T07:32:37.000Z | src/server/tests/integration/graphql/test_graphql_queries.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | null | null | null | src/server/tests/integration/graphql/test_graphql_queries.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | null | null | null | from graphene.test import Client
from blueprints.exposable.gql import schema
from tests.stubs.dao_stub import DaoStub
def test_feature_flag(mocker):
"""
Feature flags are queried and returned correctly.
"""
DaoMock = DaoStub({"key": "test-flag", "name": "Test Flag", "is_active": True})
mocker.patc... | 22.931034 | 86 | 0.448496 |
9e816f54b6cf8dee84c6d62406ab3db700054d06 | 37,211 | py | Python | tensorflow/contrib/learn/python/learn/learn_io/graph_io.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/learn/python/learn/learn_io/graph_io.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/learn/python/learn/learn_io/graph_io.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 36 | 2017-07-27T21:12:40.000Z | 2022-02-03T16:45:56.000Z | # Copyright 2016 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... | 42.141563 | 93 | 0.668136 |
9e81739e2cf51069255e517e238f3516239945c8 | 1,101 | py | Python | humvi/pjm.py | ccld/HumVI | 17c7e2a46c8b6524d64ae22462214780e5a7d60e | [
"MIT"
] | 6 | 2015-12-03T08:32:28.000Z | 2021-04-07T12:39:11.000Z | humvi/pjm.py | ccld/HumVI | 17c7e2a46c8b6524d64ae22462214780e5a7d60e | [
"MIT"
] | 7 | 2015-03-05T02:11:04.000Z | 2016-06-21T22:54:58.000Z | humvi/pjm.py | ccld/HumVI | 17c7e2a46c8b6524d64ae22462214780e5a7d60e | [
"MIT"
] | 8 | 2015-11-08T17:13:22.000Z | 2021-12-10T10:46:27.000Z | # ======================================================================
"""
Functions for implementing Phil's tweaks to the Lupton algorithm for
making color composite images.
"""
# ======================================================================
# Globally useful modules:
import numpy
from PIL import Image
... | 25.022727 | 73 | 0.422343 |
9e81b6c2327924042d89202f898eabdf56e47a75 | 12,678 | py | Python | neuralprophet/configure.py | ssattari/neural_prophet | e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0 | [
"MIT"
] | null | null | null | neuralprophet/configure.py | ssattari/neural_prophet | e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0 | [
"MIT"
] | null | null | null | neuralprophet/configure.py | ssattari/neural_prophet | e121234d2f64d2b81f9c53f52b30d21a2cf1c6e0 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from dataclasses import dataclass, field
from typing import List, Generic, Optional, TypeVar, Tuple, Type
import numpy as np
import pandas as pd
import logging
import inspect
import torch
import math
import types
from neuralprophet import utils_torch, utils, df_utils
log = logging.... | 36.536023 | 166 | 0.618079 |
9e81f8bd900912917247b64ab94b388680a4ae76 | 3,967 | py | Python | src/graph_transpiler/webdnn/backend/webgpu/kernels/max_pooling_2d.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/backend/webgpu/kernels/max_pooling_2d.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/backend/webgpu/kernels/max_pooling_2d.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from typing import List
from webdnn.backend.code_generator.allocator import MemoryLayout
from webdnn.backend.code_generator.injectors.buffer_injector import BufferInjector
from webdnn.backend.code_generator.injectors.kernel_name_injector import KernelNameInjector
from webdnn.backend.webgpu.generator import WebGPUDescr... | 38.514563 | 104 | 0.627426 |
9e8205a7a350eaf5cbf76fab3e6067ded7ace82b | 39,085 | py | Python | yt_dlp/__init__.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | 2 | 2021-12-22T18:51:50.000Z | 2021-12-22T18:53:22.000Z | yt_dlp/__init__.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | null | null | null | yt_dlp/__init__.py | Dluke77lnx/ytdl-patched | f8915da042a75596fb072e6656f5204f5eabea35 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
f'You are using an unsupported version of Python. Only Python versions 3.6 and above are supported by yt-dlp' # noqa: F541
__license__ = 'Public Domain'
import codecs
import io
import itertools
import os
import random
import re
import sys
from .options import (
parseOpts,... | 44.668571 | 223 | 0.661021 |
9e826802d853ce9b6ba3c434a252dbced57e2aed | 1,995 | py | Python | src/command_modules/azure-cli-cognitiveservices/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-cognitiveservices/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/command_modules/azure-cli-cognitiveservices/setup.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2017-12-28T04:51:44.000Z | 2017-12-28T04:51:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 32.704918 | 94 | 0.615038 |
9e826d65117ffed960f980ae9660b011620386a8 | 8,967 | py | Python | src/test/HtmlDiff.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/HtmlDiff.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/HtmlDiff.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# Code to difference two text files and output the result as HTML
#
# Programmer: Jeremy Meredith
# Date: June 9, 2003
#
# Note: The core logic was taken from Sean Ahern's xcompare tool
# (then turned into python and r... | 34.891051 | 114 | 0.530166 |
9e8291fa80c59433d0c2d86126a2608ff1a849e2 | 2,539 | py | Python | tests/core/task/test_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | 1 | 2021-08-16T02:38:40.000Z | 2021-08-16T02:38:40.000Z | tests/core/task/test_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | null | null | null | tests/core/task/test_helpers.py | TariqAHassan/alsek | a0d0f44d2eea1538c9d04530ae917695f624d269 | [
"MIT"
] | null | null | null | """
Test Task Helpers
"""
from typing import Any, Callable
import pytest
from alsek.core.broker import Broker
from alsek.core.message import Message
from alsek.core.task import (
_collapse_callbacks,
_expects_message,
_MultiSubmit,
_parse_callback,
task,
)
def _func_with_message_1(message)... | 24.892157 | 75 | 0.695156 |
9e82a0cfd430e529a98bb9163671b4f0454165e8 | 6,882 | py | Python | scripts/generate_srst2_db.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 116 | 2019-11-28T07:54:26.000Z | 2022-03-31T03:20:44.000Z | scripts/generate_srst2_db.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 120 | 2019-12-08T21:01:46.000Z | 2022-03-30T04:11:52.000Z | scripts/generate_srst2_db.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 19 | 2019-12-19T05:34:03.000Z | 2022-03-19T05:54:51.000Z | import os
import tempfile
import argparse
import networkx as nx
from tqdm import tqdm
from collections import defaultdict, Counter
import itertools
from panaroo.cdhit import run_cdhit_est
def generate_db(gene_data_file, graph_file, outdir, min_support, ncpu=1, quiet=False):
G = nx.read_gml(graph_file)
# ru... | 34.582915 | 129 | 0.557832 |
9e82b5906349f1209a3ee12c81e06771ab9ef89e | 725 | py | Python | api/chalicelib/services/sqs_service.py | joseph-behrens/vaccine-availability-notifications | aa8c0be201899c4b789d6599af83959a01c92ad9 | [
"MIT"
] | 9 | 2021-03-31T16:10:19.000Z | 2022-01-20T22:31:30.000Z | api/chalicelib/services/sqs_service.py | joseph-behrens/vaccine-availability-notifications | aa8c0be201899c4b789d6599af83959a01c92ad9 | [
"MIT"
] | 6 | 2021-04-17T02:20:46.000Z | 2021-05-11T03:19:55.000Z | api/chalicelib/services/sqs_service.py | joseph-behrens/vaccine-availability-notifications | aa8c0be201899c4b789d6599af83959a01c92ad9 | [
"MIT"
] | 1 | 2021-04-18T00:23:12.000Z | 2021-04-18T00:23:12.000Z | import json
import os
from typing import List
import boto3
from chalicelib.logs.utils import get_logger
from chalicelib.utils import chunk_list
logger = get_logger(__name__)
sqs_client = boto3.client("sqs")
def send_location_availability_to_queue(locations: List[dict]) -> None:
for chunk in chunk_list(locati... | 24.166667 | 71 | 0.605517 |
9e82c3a602b21a81258c0bd447288ab6d5b3515f | 874 | py | Python | examples/lecture09.py | SeattleCentral/ITC110 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 12 | 2017-01-05T03:43:10.000Z | 2019-01-18T03:39:09.000Z | examples/lecture09.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | null | null | null | examples/lecture09.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 2 | 2019-02-28T05:13:40.000Z | 2019-11-09T05:06:35.000Z | from datetime import date
# JavaScript has zero-indexed months
# So 01 is February (because 00 is January and 11 is December)
# > 0123456789
date_from_web = "2017-01-08"
year = int(date_from_web[0:4])
month = int(date_from_web[5:7]) + 1 # Python has one-indexed MM
day = int(date_from_web[8:])
python... | 14.813559 | 67 | 0.661327 |
9e830fefee26187f4430539172fd59d94f95c9ae | 13,619 | py | Python | multilang/objects.py | scvannost/multilang | 8005ed2449052e895a85db68d6965f2483f7ae85 | [
"MIT"
] | null | null | null | multilang/objects.py | scvannost/multilang | 8005ed2449052e895a85db68d6965f2483f7ae85 | [
"MIT"
] | null | null | null | multilang/objects.py | scvannost/multilang | 8005ed2449052e895a85db68d6965f2483f7ae85 | [
"MIT"
] | null | null | null | """The base environment objects
This is the core of multilang, and provides interfaces for interacting
with the R and Matlab environments using the `pexpect` package.
As pexpect does not support Windows, neither does this subpackge.
Classes
-------
RObject
An interactive R environment
MatlabObject
An interactive M... | 26.090038 | 116 | 0.671268 |
9e832a755f28d574ff5647fd2ce3d4644e919dd5 | 23,600 | py | Python | efficientdet/utils.py | Sankalp679/automl | 57621e8f3eaddd2c0b421c65c0bbd323ebcf8f2d | [
"Apache-2.0"
] | 2 | 2020-06-25T18:51:49.000Z | 2021-07-07T10:41:45.000Z | efficientdet/utils.py | Sankalp679/automl | 57621e8f3eaddd2c0b421c65c0bbd323ebcf8f2d | [
"Apache-2.0"
] | null | null | null | efficientdet/utils.py | Sankalp679/automl | 57621e8f3eaddd2c0b421c65c0bbd323ebcf8f2d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Research. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 37.579618 | 127 | 0.694237 |
9e833757661eee744266310083769c313ed9ff61 | 24,387 | py | Python | gitlab-ci/src/gitlab_config/dfinity_gitlab_config.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 941 | 2021-05-10T08:14:14.000Z | 2022-03-31T11:40:24.000Z | gitlab-ci/src/gitlab_config/dfinity_gitlab_config.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 3 | 2022-02-16T12:24:20.000Z | 2022-03-23T12:05:41.000Z | gitlab-ci/src/gitlab_config/dfinity_gitlab_config.py | 3cL1p5e7/ic | 2b6011291d900454cedcf86ec41c8c1994fdf7d9 | [
"Apache-2.0"
] | 122 | 2021-05-10T08:21:23.000Z | 2022-03-25T20:34:12.000Z | # This file holds the `DfinityGitLabConfig` class, which provides an abstraction
# of the GitLab CI configuration.
# For instance, it provides public functions to:
# - load the CI configuration from a Yaml string
# - load the CI configuration from a file
# - lint the CI configuration
# In the future, other functionalit... | 41.47449 | 114 | 0.595645 |
9e833a91735680d5d73a40442f8b405d23478154 | 2,269 | py | Python | api/fm_api/user/views.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | 1 | 2017-10-22T03:15:58.000Z | 2017-10-22T03:15:58.000Z | api/fm_api/user/views.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | 33 | 2016-06-20T19:43:47.000Z | 2022-01-21T23:19:11.000Z | api/fm_api/user/views.py | nstoik/farm_monitor | 592ab281e6ed364396c1db702f72a81d28080004 | [
"Apache-2.0"
] | null | null | null | """Views for User and Role API."""
from flask import current_app
from flask.views import MethodView
from flask_jwt_extended import jwt_required
from flask_smorest import Blueprint, abort
from fm_database.base import get_session
from fm_database.models.user import User
from .schemas import UserDictSchema, UserSchema
b... | 27.337349 | 68 | 0.65271 |
9e834a76c6d377d00048801593ad8334656eaeac | 277 | py | Python | DjangoTaskManager/account/urls.py | MaxwellCoriell/BackendCapstone | 455125b52055aed17f2cd34f96a833efcb495937 | [
"MIT"
] | null | null | null | DjangoTaskManager/account/urls.py | MaxwellCoriell/BackendCapstone | 455125b52055aed17f2cd34f96a833efcb495937 | [
"MIT"
] | 16 | 2017-06-09T15:21:09.000Z | 2017-06-21T13:56:41.000Z | DjangoTaskManager/account/urls.py | MaxwellCoriell/BackendCapstone | 455125b52055aed17f2cd34f96a833efcb495937 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from DjangoTaskManager.account import views
urlpatterns = [
url(r'^login/', views.account_login, name='login'),
url(r'^logout/', views.account_logout, name='logout'),
url(r'^register/', views.account_register, name='register'),
]
| 27.7 | 64 | 0.711191 |
9e837c93f92121fc59f3f89c6b41d0d8261295df | 1,959 | py | Python | xbbo/search_algorithm/base.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | 2 | 2021-09-06T02:06:22.000Z | 2021-12-09T10:46:56.000Z | xbbo/search_algorithm/base.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | xbbo/search_algorithm/base.py | zhanglei1172/bbobenchmark | 841bffdddc1320ac2676e378d20f8b176a7e6cf7 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
import numpy as np
from xbbo.configspace.space import DenseConfigurationSpace
# from xbbo.configspace.space import Configurations
class AbstractOptimizer(ABC):
"""Abstract base class for the optimizers in the benchmark. This creates a common API across all packages.
"""
... | 33.20339 | 110 | 0.653905 |
9e8382da62a41898f3e2334826cbca1b4c7e6737 | 106 | py | Python | Python/List Comprehensions.py | shivendra90/HackerRank_Solutions | 0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6 | [
"MIT"
] | null | null | null | Python/List Comprehensions.py | shivendra90/HackerRank_Solutions | 0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6 | [
"MIT"
] | null | null | null | Python/List Comprehensions.py | shivendra90/HackerRank_Solutions | 0e6f9b907c5f8ca93b2945787cb1fe7ed172bed6 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
a = int(input())
b = int(input())
print(a // b)
print(a / b)
| 13.25 | 26 | 0.471698 |
9e83f39ae8550582b2c8b766b1cc29e679982a6e | 119,385 | py | Python | tests/unit/gapic/compute_v1/test_resource_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_resource_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_resource_policies.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.610931 | 120 | 0.655493 |
9e83fb2938c41888d44c4c542b7d50efddfe7f77 | 4,066 | py | Python | book/chap21/radialdam/setplot.py | geoflows/geoclaw-4.x | c8879d25405017b38392aa3b1ea422ff3e3604ea | [
"BSD-3-Clause"
] | 7 | 2016-11-13T03:11:51.000Z | 2021-09-07T18:59:48.000Z | book/chap21/radialdam/setplot.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 11 | 2020-01-14T18:00:37.000Z | 2022-03-29T14:25:24.000Z | book/chap21/radialdam/setplot.py | che-wenchao/D-Claw | 8ab5d971c9a7a7130e03a447a4b8642e292f4e88 | [
"BSD-3-Clause"
] | 6 | 2020-01-14T17:15:42.000Z | 2021-12-03T17:28:44.000Z |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to b... | 31.276923 | 74 | 0.636252 |
9e843339ee5ce53ba6bb3e8913bdfe9899540811 | 1,388 | py | Python | utils/xml_to_csv.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | utils/xml_to_csv.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | utils/xml_to_csv.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | import os
import argparse
import pandas as pd
import xml.etree.ElementTree as ET
def xml_to_csv(path):
xml_list = []
for file in os.listdir(path + '/*.xml'):
xml_file = os.path.join(file)
tree = ET.parse(xml_file)
root = tree.getroot()
for member in root.findall('object'):
... | 36.526316 | 104 | 0.590778 |
9e84451f6af77b0f7a0689c102e6eefca49a0eb8 | 13,712 | py | Python | src/sage/combinat/words/alphabet.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/words/alphabet.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/words/alphabet.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Alphabet
AUTHORS:
- Franco Saliola (2008-12-17) : merged into sage
- Vincent Delecroix and Stepan Starosta (2012): remove classes for alphabet and
use other Sage classes otherwise (TotallyOrderedFiniteSet,
FiniteEnumeratedSet, ...). More shortcut to standard alphabets.
EXAMPLES::
... | 37.26087 | 138 | 0.622885 |
9e8464b070f7c6f1ab3b9f582ffe8d2f5cd8252b | 1,113 | py | Python | setup.py | runarbu/bbtornado | f1eb173c63fda2ef22594e6c2ae3e315fcb2fe5f | [
"MIT"
] | 3 | 2017-09-25T12:33:36.000Z | 2018-09-02T20:43:15.000Z | setup.py | runarbu/bbtornado | f1eb173c63fda2ef22594e6c2ae3e315fcb2fe5f | [
"MIT"
] | 2 | 2017-10-24T06:52:45.000Z | 2019-04-29T13:12:53.000Z | setup.py | runarbu/bbtornado | f1eb173c63fda2ef22594e6c2ae3e315fcb2fe5f | [
"MIT"
] | 4 | 2018-08-22T08:59:43.000Z | 2019-10-28T16:25:13.000Z | from setuptools import setup
import re
import io
import os.path
def read(*names, **kwargs):
with io.open(
os.path.join(os.path.dirname(__file__), *names),
encoding=kwargs.get("encoding", "utf8")
) as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_p... | 27.825 | 83 | 0.626235 |
9e846a4a6afce0619435d4b8efc06fd2fe73388f | 270 | py | Python | core/argo/core/network/Sigmoid.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 4 | 2020-12-07T19:13:13.000Z | 2022-01-30T18:52:18.000Z | core/argo/core/network/Sigmoid.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 12 | 2020-09-25T22:41:28.000Z | 2022-02-09T23:46:34.000Z | core/argo/core/network/Sigmoid.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 2 | 2021-03-02T18:31:04.000Z | 2021-03-02T21:56:43.000Z | import tensorflow as tf
from .AbstractModule import AbstractModule
class Sigmoid(AbstractModule):
def __init__(self, name='Sigmoid'):
super().__init__(name = name)
def _build(self, inputs):
return tf.nn.sigmoid(inputs)
| 18 | 42 | 0.640741 |
9e846d9a231c7c52f2d80ab463ea46856fc32c3c | 9,525 | py | Python | twilio/rest/taskrouter/v1/workspace/workspace_statistics.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2021-02-24T04:59:03.000Z | 2021-02-24T04:59:03.000Z | twilio/rest/taskrouter/v1/workspace/workspace_statistics.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | null | null | null | twilio/rest/taskrouter/v1/workspace/workspace_statistics.py | theDrinkMD/twibbage | c0aba60bd2df50f0a5688db4a01048ea1efd1a45 | [
"MIT"
] | 1 | 2018-12-09T00:53:21.000Z | 2018-12-09T00:53:21.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.li... | 32.070707 | 102 | 0.645249 |
9e848c59f75fccdc8d624899f7c5482192742f45 | 4,496 | py | Python | appengine/monorail/sitewide/groupadmin.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/monorail/sitewide/groupadmin.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/monorail/sitewide/groupadmin.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 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 or at
# https://developers.google.com/open-source/licenses/bsd
"""A class to display user group admin page."""
from __future__ import print_function
from __fu... | 36.258065 | 78 | 0.713523 |
9e84bb2314fcdfe7126ca733b0edae5f6ed86655 | 1,352 | py | Python | pydmrs/mapping/paraphrase.py | vishalbelsare/pydmrs | 795b35dba4986fa9084eaa81fb16206cb131a752 | [
"MIT"
] | 14 | 2015-11-27T14:22:26.000Z | 2022-03-02T21:11:28.000Z | pydmrs/mapping/paraphrase.py | vishalbelsare/pydmrs | 795b35dba4986fa9084eaa81fb16206cb131a752 | [
"MIT"
] | 25 | 2015-11-27T16:08:19.000Z | 2019-08-28T10:13:06.000Z | pydmrs/mapping/paraphrase.py | vishalbelsare/pydmrs | 795b35dba4986fa9084eaa81fb16206cb131a752 | [
"MIT"
] | 8 | 2015-11-01T17:57:44.000Z | 2021-06-04T05:33:38.000Z | import sys
from pydmrs.core import Dmrs, ListDmrs
from pydmrs.mapping.mapping import dmrs_mapping
from pydmrs.graphlang.graphlang import parse_graphlang
def read_paraphrases_file(filename):
"""
"""
paraphrases = []
file = open(filename, 'r')
lines = iter(file)
for line in lines:
try:
... | 30.044444 | 93 | 0.650148 |
9e84c18a7b16ab534886ee90a9fab89ad8861b8a | 9,624 | py | Python | alipay/aop/api/domain/PromiseConfig.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/PromiseConfig.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/PromiseConfig.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class PromiseConfig(object):
def __init__(self):
self._action_operation_type = None
self._action_operation_value = None
self._button_buy = None
self._button_end = None
... | 38.342629 | 97 | 0.659809 |
9e8513d34755a1753cbe5789d6df067d89e98e67 | 1,220 | py | Python | buoy.py | svortega/catpy | b4d32f43662b291c64f02edda51f7116818b71bb | [
"MIT"
] | null | null | null | buoy.py | svortega/catpy | b4d32f43662b291c64f02edda51f7116818b71bb | [
"MIT"
] | null | null | null | buoy.py | svortega/catpy | b4d32f43662b291c64f02edda51f7116818b71bb | [
"MIT"
] | null | null | null | # Copyright (c) 2021 CatPy
#
# Python stdlib imports
import math
# package imports
import catpy as cty
#
units = cty.Units()
test = cty.CatBuoy()
#
# caternaries
# 20" hose with 40' length each
# riser = [name, diamtre, unit_weight, upper_cat, lower_cat]
hose_lenght = 40*units.feet
hose_diam = 20*unit... | 24.897959 | 61 | 0.570492 |
9e851a2d3f0c60a601e374be7e28fa4b35ceee00 | 11,969 | py | Python | tests/test_xml_converters.py | soumyajyotih/masci-tools | e4d9ea2fbf6e16378d0cbfb8828a11bdb09c2139 | [
"MIT"
] | null | null | null | tests/test_xml_converters.py | soumyajyotih/masci-tools | e4d9ea2fbf6e16378d0cbfb8828a11bdb09c2139 | [
"MIT"
] | null | null | null | tests/test_xml_converters.py | soumyajyotih/masci-tools | e4d9ea2fbf6e16378d0cbfb8828a11bdb09c2139 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Test of the functions in masci_tools.util.xml.converters
"""
import pytest
import os
from masci_tools.util.constants import FLEUR_DEFINED_CONSTANTS
from pprint import pprint
import logging
TEST_FOLDER = os.path.dirname(os.path.abspath(__file__))
CLEAR_XML_TEST_FILE = os.path.abspath(os.path... | 38.986971 | 120 | 0.605731 |
9e854e39898a1185c379cd34adebdc0d55f85ba6 | 554 | py | Python | run_experiments.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | 1 | 2019-06-27T12:14:38.000Z | 2019-06-27T12:14:38.000Z | run_experiments.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | 18 | 2019-07-14T17:40:22.000Z | 2019-11-11T01:54:07.000Z | run_experiments.py | Atrus619/DeckOfCards | bf0668ea26041e7faab2b88a03d42ba6887d054a | [
"MIT"
] | null | null | null | from config import Config
from copy import deepcopy
from pipeline.experiment import run_full_experiment
import argparse
import util.util as util
parser = argparse.ArgumentParser(description='Enter the filename of the experiment file.')
parser.add_argument('filename', type=str, help='filename of experiment file')
args... | 32.588235 | 91 | 0.801444 |
9e855130e1b2dd166bfcd3e60e3e6e91a58385c5 | 240 | py | Python | src/oop/Driller.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | 2 | 2020-10-08T09:44:12.000Z | 2021-10-08T08:32:19.000Z | src/oop/Driller.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | null | null | null | src/oop/Driller.py | tborzyszkowski/TestAutomationInPython | 843c71df796588e181466d9b9b549f03dd907a6e | [
"MIT"
] | 1 | 2020-10-19T14:08:00.000Z | 2020-10-19T14:08:00.000Z | from .Tool import *
class Driller(Tool):
def __init__(self) -> None:
super().__init__()
def can_drill(self):
return True
def can_cut(self):
return False
def can_sweep(self):
return False
| 15 | 31 | 0.583333 |
9e85849e46258b22d71c05c5fc983f2c3a69afb3 | 7,094 | py | Python | oscar/lib/python2.7/site-packages/django/core/files/uploadhandler.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/files/uploadhandler.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/files/uploadhandler.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
Base file upload handler classes, and the built-in concrete subclasses
"""
from __future__ import unicode_literals
from io import BytesIO
from django.conf import settings
from django.core.files.uploadedfile import (
InMemoryUploadedFile, TemporaryUploadedFile,
)
from django.utils.encoding import ... | 32.392694 | 119 | 0.625599 |
9e85ce3121f6c72e48a0b2309dc3bbd5cc9ed69e | 84 | py | Python | profiles/signals.py | chandru-shane/django-forum-project | 061325ce0234c7e183df7bdb180907fc23acc11e | [
"MIT"
] | null | null | null | profiles/signals.py | chandru-shane/django-forum-project | 061325ce0234c7e183df7bdb180907fc23acc11e | [
"MIT"
] | null | null | null | profiles/signals.py | chandru-shane/django-forum-project | 061325ce0234c7e183df7bdb180907fc23acc11e | [
"MIT"
] | null | null | null | from django import dispatch
follow_notification = dispatch.Signal(use_caching=True) | 28 | 55 | 0.857143 |
9e85d1f01bec31f81735dc17da16c901a0719599 | 114 | py | Python | ephypype/nodes/__init__.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | null | null | null | ephypype/nodes/__init__.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | 1 | 2018-09-03T20:08:46.000Z | 2018-09-03T21:00:55.000Z | ephypype/nodes/__init__.py | EtienneCmb/ephypype | fdc13efb79545f072585d1e180d03702efd9e326 | [
"BSD-3-Clause"
] | null | null | null | from .import_data import (ImportMat, ImportBrainVisionAscii) # noqa
from .ts_tools import (SplitWindows) # noqa
| 38 | 68 | 0.789474 |
9e85e85818d09b3bcd69cb2d76f4eebecbee3697 | 13,297 | py | Python | homeassistant/components/konnected.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | homeassistant/components/konnected.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | homeassistant/components/konnected.py | Natrinicle/home-assistant | 7bb53449428b0787cca1d0c986c93a458401e6fb | [
"Apache-2.0"
] | null | null | null | """
Support for Konnected devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/konnected/
"""
import logging
import hmac
import json
import voluptuous as vol
from aiohttp.hdrs import AUTHORIZATION
from aiohttp.web import Request, Response
from home... | 38.20977 | 79 | 0.609987 |
9e861bcc016b62ef3b68a4aea6abf15dd406ee58 | 2,730 | py | Python | eth/utils/rlp.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | eth/utils/rlp.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | eth/utils/rlp.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 1 | 2019-01-29T21:09:31.000Z | 2019-01-29T21:09:31.000Z | from __future__ import absolute_import
import rlp
from cytoolz import (
curry,
)
from eth_utils import (
to_tuple,
ValidationError,
)
@to_tuple
def diff_rlp_object(left, right):
if left != right:
rlp_type = type(left)
for field_name, field_type in rlp_type._meta.fields:
... | 29.673913 | 89 | 0.515751 |
9e8643943fe7f3c45711c15ba4a5ceffa09227c3 | 2,464 | py | Python | pyrex/__init__.py | abigailbishop/pyrex | 10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5 | [
"MIT"
] | 6 | 2018-06-19T16:01:35.000Z | 2020-05-21T20:02:53.000Z | pyrex/__init__.py | abigailbishop/pyrex | 10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5 | [
"MIT"
] | 4 | 2021-09-02T17:19:25.000Z | 2022-03-08T17:28:03.000Z | pyrex/__init__.py | abigailbishop/pyrex | 10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5 | [
"MIT"
] | 5 | 2018-01-19T14:49:16.000Z | 2021-01-21T12:34:59.000Z | """
PyREx radio neutrino simulation package.
"""
import os
import os.path
from .__about__ import __version__, __long_description__
__doc__ = __long_description__
from .signals import Signal, EmptySignal, FunctionSignal, ThermalNoise
from .askaryan import AskaryanSignal
from .antenna import Antenna, DipoleAntenna
fr... | 34.222222 | 79 | 0.685877 |
9e8655336303e3262fdf608f77cb7d9351f72ece | 31,398 | py | Python | exchangelib/account.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/account.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/account.py | dmcgee/exchangelib | b2f7006835393132bdf2cfb416ba44f847c8bbf2 | [
"BSD-2-Clause"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
from locale import getlocale
from logging import getLogger
from cached_property import threaded_cached_property
from future.utils import python_2_unicode_compatible
from six import string_types
from .autodiscover import discover
from .configuration import Config... | 49.445669 | 120 | 0.693866 |
9e8671c508abb49adbbc023d28a596544f377208 | 551 | py | Python | tests/migrations/0017_auto_20200416_0927.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T00:53:23.000Z | 2020-07-16T07:00:33.000Z | tests/migrations/0017_auto_20200416_0927.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 76 | 2019-12-05T01:15:57.000Z | 2021-09-07T16:47:27.000Z | tests/migrations/0017_auto_20200416_0927.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 1 | 2020-02-05T15:09:47.000Z | 2020-02-05T15:09:47.000Z | # Generated by Django 2.2.12 on 2020-04-16 07:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("tests", "0016_historicalrelatedmodeltest"),
]
operations = [
migrations.AddField(
model_name="historicalrelatedmodeltest",
... | 26.238095 | 98 | 0.627949 |
9e86dc39acb01211eee2746a2a7e843d3e4dce9e | 8,755 | py | Python | back/infolica/views/default.py | rufener/infolica | c50acc89dfe9a677a4e50defba11c7567c7b9cb5 | [
"MIT"
] | null | null | null | back/infolica/views/default.py | rufener/infolica | c50acc89dfe9a677a4e50defba11c7567c7b9cb5 | [
"MIT"
] | null | null | null | back/infolica/views/default.py | rufener/infolica | c50acc89dfe9a677a4e50defba11c7567c7b9cb5 | [
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*--
from pyramid.httpexceptions import HTTPForbidden, HTTPNoContent
from pyramid.view import notfound_view_config, view_config
from sqlalchemy import exc
from infolica.exceptions.custom_error import CustomError
from infolica.models.models import Client
from infolica.scripts.utils import Utils
i... | 41.492891 | 94 | 0.734552 |
9e870625fa77b7a077af525e7a23b43f209a53b0 | 2,774 | py | Python | brdnet/src/dataset.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | brdnet/src/dataset.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | brdnet/src/dataset.py | kingcong/MindSpore_Code | afe6ef9cada6c98f601754197db84ee1c21dbc9d | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 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 or agreed to... | 40.202899 | 99 | 0.658255 |
9e871c4bded203faafacbbf4c37f3b20af98b489 | 2,769 | py | Python | parsl/data_provider/ftp.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/data_provider/ftp.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | parsl/data_provider/ftp.py | aquanauts/parsl | 978bb483a4a41b3cef083aa242b2a78614a02dd0 | [
"Apache-2.0"
] | null | null | null | import ftplib
import logging
import os
from parsl import python_app
from parsl.utils import RepresentationMixin
from parsl.data_provider.staging import Staging
logger = logging.getLogger(__name__)
class FTPSeparateTaskStaging(Staging, RepresentationMixin):
"""Performs FTP staging as a separate parsl level tas... | 32.576471 | 111 | 0.672445 |
9e873a562bdac9f65d15359fd447c64a6ee26054 | 2,564 | py | Python | adb/sign_cryptography.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2019-07-17T18:42:18.000Z | 2019-07-17T18:42:18.000Z | adb/sign_cryptography.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2018-10-04T04:07:23.000Z | 2018-10-04T20:54:16.000Z | adb/sign_cryptography.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2018-10-03T14:11:31.000Z | 2018-10-03T14:11:31.000Z | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 28.488889 | 107 | 0.682527 |
9e875e050962b52d14a96213ad1ad51f28faa485 | 2,776 | py | Python | panoptes_aggregation/tests/extractor_tests/test_shape_extractor_rectangle.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/tests/extractor_tests/test_shape_extractor_rectangle.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/tests/extractor_tests/test_shape_extractor_rectangle.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | from panoptes_aggregation import extractors
from .base_test_class import ExtractorTest
classification = {
'annotations': [
{
'task': 'T0',
'value': [
{
'tool': 0,
'frame': 0,
'x': 0,
'y':... | 23.726496 | 64 | 0.432637 |
9e875f18c597d28e3277885f02fedf567451ca66 | 13,991 | py | Python | CIRI_long/main.py | bioinfo-biols/CIRI-long | 640474e1275dec0d5b6ec556d16e6b118499de60 | [
"MIT"
] | 8 | 2021-03-12T00:39:43.000Z | 2021-11-01T20:06:30.000Z | CIRI_long/main.py | bioinfo-biols/CIRI-long | 640474e1275dec0d5b6ec556d16e6b118499de60 | [
"MIT"
] | 11 | 2021-03-15T10:19:11.000Z | 2022-01-25T03:02:43.000Z | CIRI_long/main.py | bioinfo-biols/CIRI-long | 640474e1275dec0d5b6ec556d16e6b118499de60 | [
"MIT"
] | 3 | 2021-03-12T00:39:49.000Z | 2021-06-03T01:02:32.000Z | #!/home/zhangjy/.virtualenvs/Benchmarking/bin/python
import os
import sys
import pickle
import json
from collections import defaultdict
def call(args):
from CIRI_long.logger import get_logger
from CIRI_long.utils import check_file, check_dir
from CIRI_long.align import index_annotation, index_circ
fro... | 47.588435 | 147 | 0.638196 |
9e876c7d43d006a1dab06add488c88e606eb091a | 11,034 | py | Python | SCRAPE/Lib/site-packages/twisted/web/test/test_domhelpers.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/web/test/test_domhelpers.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/web/test/test_domhelpers.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # -*- test-case-name: twisted.web.test.test_domhelpers -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Specific tests for (some of) the methods in L{twisted.web.domhelpers}.
"""
from typing import Any, Optional
from xml.dom import minidom
from twisted.trial.unittest import TestCase
fr... | 37.530612 | 148 | 0.60948 |
9e87b2906b0d92678b9f11eab45eb5121da6faf3 | 1,334 | py | Python | sites/sandbox/urls.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | 1 | 2015-08-02T05:36:11.000Z | 2015-08-02T05:36:11.000Z | sites/sandbox/urls.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | sites/sandbox/urls.py | elliotthill/django-oscar | 5a71a1f896f2c14f8ed3e68535a36b26118a65c5 | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin
from django.conf.urls.static import static
from oscar.app import shop
# These simply need to be imported into this namespace. Ignore the PEP8
# warning that they aren't used.
from oscar.views import ... | 30.318182 | 72 | 0.67916 |
9e87ca74d8b1d61085f3ea09774037a7c69bcc46 | 26,971 | py | Python | tofu/data/_mesh_bsplines_tri.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 56 | 2017-07-09T10:29:45.000Z | 2022-03-31T02:44:50.000Z | tofu/data/_mesh_bsplines_tri.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 522 | 2017-07-02T21:06:07.000Z | 2022-03-02T08:07:57.000Z | tofu/data/_mesh_bsplines_tri.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | 9 | 2017-07-02T20:38:53.000Z | 2021-12-04T00:12:30.000Z | # -*- coding: utf-8 -*-
# Built-in
# Common
import numpy as np
import scipy.interpolate as scpinterp
import scipy.spatial as scpspace
from matplotlib.tri import Triangulation as mplTri
# specific
from . import _generic_check
from . import _mesh_checks
from . import _mesh_bsplines_operators_tri
# ###############... | 28.124088 | 79 | 0.456305 |
9e87cc7cd1ef18fcc9917853792fe9e4b19568b9 | 17,768 | py | Python | keystone/tests/unit/test_v3_filters.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/test_v3_filters.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/test_v3_filters.py | yanheven/keystone | 417b8941095f40674575ed951b4a03ebcdc91fef | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack LLC
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 39.484444 | 78 | 0.624719 |
9e87e30f604c84e0dbb066cfe83abd7858ece498 | 2,755 | py | Python | tests/test_tree_info.py | chr1st1ank/command | b9447ee8c77ecd472d20552ff710aca0a0b2319e | [
"MIT"
] | 1 | 2020-01-15T22:08:40.000Z | 2020-01-15T22:08:40.000Z | tests/test_tree_info.py | chr1st1ank/command | b9447ee8c77ecd472d20552ff710aca0a0b2319e | [
"MIT"
] | 9 | 2020-01-04T20:47:44.000Z | 2021-06-02T00:59:12.000Z | tests/test_tree_info.py | chr1st1ank/forester | b9447ee8c77ecd472d20552ff710aca0a0b2319e | [
"MIT"
] | null | null | null | """Unit tests for forester.tree_info"""
import os
import re
import pytest
from forester import tree_info
@pytest.fixture
def folder_tree(tmp_path):
"""Create a folder tree with some links"""
# Create empty folders
d1 = tmp_path / "d1"
d1.mkdir()
d2 = tmp_path / "d2"
d3 = d2 / "d3"
d3.mk... | 29.623656 | 80 | 0.607623 |
9e87f1961e336c4a9baccad261f696e602ca1438 | 1,025 | py | Python | screen_state/screen_state.py | Guilhermeasper/motorola-challenge | 43d187a952a7f18c7de54db90e0ab34e5887673c | [
"MIT"
] | null | null | null | screen_state/screen_state.py | Guilhermeasper/motorola-challenge | 43d187a952a7f18c7de54db90e0ab34e5887673c | [
"MIT"
] | null | null | null | screen_state/screen_state.py | Guilhermeasper/motorola-challenge | 43d187a952a7f18c7de54db90e0ab34e5887673c | [
"MIT"
] | null | null | null | class ScreenState(object):
"""Base state class that implements the behavior shared between screens"""
valid_actions = ["BL", "BD", "AD", "PQR", "PNA", "PFC"] # Actions valid to all screens states
def change_state(self, action):
"""Check received action to change the screen state and return the sc... | 42.708333 | 112 | 0.651707 |
9e88178a1db61410ce4963c9f22d938cd8a2325a | 45,090 | py | Python | autotest/pymod/webserver.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2015-04-21T19:52:03.000Z | 2015-04-21T19:52:03.000Z | autotest/pymod/webserver.py | szekerest/gdal | 3abdad0a39c56e8f575569f3fa7a25d5265df047 | [
"MIT"
] | 1 | 2016-04-04T09:14:19.000Z | 2016-04-14T19:17:10.000Z | autotest/pymod/webserver.py | pramsey/gdal | 965421b79fe4d3332b0f2f633b072fdcab2b700a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Fake HTTP server
# Author: Even Rouault <even dot rouault at mines dash paris dot org>
#
##########################################################################... | 45.963303 | 1,042 | 0.558838 |
9e884fcc3a6464e3d9361b9dc2269bd324c95a31 | 1,301 | py | Python | earlier-2020/python_mod_tutorials/mlutiprocess/server_client.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | 1 | 2018-06-18T12:09:33.000Z | 2018-06-18T12:09:33.000Z | earlier-2020/python_mod_tutorials/mlutiprocess/server_client.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | null | null | null | earlier-2020/python_mod_tutorials/mlutiprocess/server_client.py | transcendentsky/py_tutorials | fed8e6c8d79f854a1cebcfd5c37297a163846208 | [
"Apache-2.0"
] | 1 | 2018-06-18T12:13:21.000Z | 2018-06-18T12:13:21.000Z | # -*- coding:utf-8 -*-
"""
进程间通信(IPC,Inter-Process Communication)
>>> 本地socket链接
import socket
import os
if __name__ == '__main__':
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
if os.path.exists("/tmp/test.sock"):
os.unlink("/tmp/test.sock")
server.bind("/tmp/test.sock")
server... | 21.327869 | 62 | 0.660261 |
9e887466a029ab7d0df37a286c71e36352a442f7 | 13,393 | py | Python | readthedocs/embed/v3/views.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,092 | 2019-06-29T07:47:30.000Z | 2022-03-31T14:54:59.000Z | readthedocs/embed/v3/views.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,389 | 2019-06-29T04:22:55.000Z | 2022-03-31T22:57:49.000Z | readthedocs/embed/v3/views.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 1,185 | 2019-06-29T21:49:31.000Z | 2022-03-30T09:57:15.000Z | """Views for the EmbedAPI v3 app."""
import re
from urllib.parse import urlparse
import requests
import structlog
from selectolax.parser import HTMLParser
from django.conf import settings
from django.core.cache import cache
from django.shortcuts import get_object_or_404
from django.utils.functional import cached_pr... | 37.099723 | 120 | 0.546256 |
9e8898fb5920defdfaa361bf45def7666a88beea | 952 | py | Python | python/paddle/v2/framework/tests/test_uniform_random_op.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/framework/tests/test_uniform_random_op.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | null | null | null | python/paddle/v2/framework/tests/test_uniform_random_op.py | AI-books/Paddle | 5b5f4f514047975ac09ec42b31e46dabf235e7dd | [
"Apache-2.0"
] | 1 | 2020-06-04T04:27:15.000Z | 2020-06-04T04:27:15.000Z | import unittest
from paddle.v2.framework.op import Operator
import paddle.v2.framework.core as core
import numpy
class TestUniformRandomOp(unittest.TestCase):
def test_uniform_random_cpu(self):
self.uniform_random_test(place=core.CPUPlace())
def test_uniform_random_gpu(self):
if core.is_compi... | 26.444444 | 62 | 0.621849 |
9e88a02c7ab5cd4dd832a4ff6668c5644be7f0c7 | 1,757 | py | Python | deepracing_py/images_to_video.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | deepracing_py/images_to_video.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | deepracing_py/images_to_video.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | import cv2
import numpy as np
import readline
import os
import argparse
from tqdm import tqdm as tqdm
def sortkey(s: str):
return int(s.split("_")[-1].split(".")[0])
def make_video(images, fps, outimg=None, size=None, is_color=True, format="MJPG", outvid='image_video.avi'):
#from cv2 import VideoWriter, VideoWr... | 45.051282 | 164 | 0.676153 |
9e88b37be05bd7d4c52529fe5cbe090e8b44b93e | 1,330 | py | Python | src/beast/python/beast/util/String_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 58 | 2015-01-07T09:10:59.000Z | 2019-07-15T14:34:01.000Z | src/beast/python/beast/util/String_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 12 | 2015-01-02T00:01:45.000Z | 2018-04-25T12:35:02.000Z | src/beast/python/beast/util/String_test.py | Ziftr/stellard | 626514cbbb2c6c2b6844315ca98a2bfcbca0b43d | [
"BSL-1.0"
] | 23 | 2015-01-04T00:13:27.000Z | 2019-02-15T18:01:17.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from unittest import TestCase
from beast.util import String
from beast.util import Terminal
Terminal.CAN_CHANGE_COLOR = False
class String_test(TestCase):
def test_comments(self):
self.assertEqual(String.remove_comment(''), '')... | 35.945946 | 82 | 0.650376 |
9e88b567d7b249b54f9c1c79aeea6da77734003e | 1,208 | py | Python | panoptes_aggregation/reducers/slider_reducer.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/reducers/slider_reducer.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | panoptes_aggregation/reducers/slider_reducer.py | amyrebecca/aggregation-for-caesar | 5f0d884932312010f9caeb8ebfcfe358f490e41f | [
"Apache-2.0"
] | null | null | null | '''
Slider Reducer
--------------
This module porvides functions to reduce the slider task extracts from
:mod:`panoptes_aggregation.extractors.slider_extractor`.
'''
from .reducer_wrapper import reducer_wrapper
import numpy as np
def process_data(data, pairs=False):
'''Process a list of extracted slider into list... | 25.166667 | 83 | 0.660596 |
9e88c161f55bb8b919b24d0c835a4272c338d467 | 3,819 | py | Python | models/energy_convert_intervals.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 5 | 2019-12-18T15:27:28.000Z | 2020-10-03T09:10:23.000Z | models/energy_convert_intervals.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 11 | 2019-12-18T14:53:03.000Z | 2021-12-30T07:26:46.000Z | models/energy_convert_intervals.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 3 | 2019-12-18T15:27:39.000Z | 2022-02-25T07:04:06.000Z | """Sample 4 weeks of 24*7 hours of energy demand from the 24*365 simulated.
"""
import pandas
from datetime import datetime, timedelta
from smif.data_layer import DataArray
from smif.exception import SmifException
from smif.model import SectorModel
class SampleEnergyIntervals(SectorModel):
"""Adaptor to sample fr... | 38.19 | 95 | 0.626604 |
9e88c23954df17386c0a469b29b71d31d41273e1 | 8,557 | py | Python | ryu/app/load_balancer.py | zspcchinu/-Optimal-routing-using-RL-with-SDN | b7993c7f328ab6bafdcb6dab56f4ecd83ef0fe14 | [
"Apache-2.0"
] | 8 | 2020-09-08T01:34:38.000Z | 2022-02-19T07:46:06.000Z | ryu/app/load_balancer.py | zspcchinu/-Optimal-routing-using-RL-with-SDN | b7993c7f328ab6bafdcb6dab56f4ecd83ef0fe14 | [
"Apache-2.0"
] | null | null | null | ryu/app/load_balancer.py | zspcchinu/-Optimal-routing-using-RL-with-SDN | b7993c7f328ab6bafdcb6dab56f4ecd83ef0fe14 | [
"Apache-2.0"
] | 3 | 2020-12-02T18:30:54.000Z | 2022-03-21T08:02:50.000Z | # Copyright (C) 2014 SDN Hub
#
# Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.
# You may not use this file except in compliance with this License.
# You may obtain a copy of the License at
#
# http://www.gnu.org/licenses/gpl-3.0.txt
#
# Unless required by applicable law or agreed to in writing, software
... | 37.862832 | 89 | 0.655136 |
9e89158ce60e39ee2ea1207479656f1874b04629 | 305 | py | Python | Python279/Scripts/cygdb-script.py | Edeleon4/PoolShark | e59d353b90ae3f6ad2e5995c1fee2a5870a4bf8f | [
"MIT"
] | null | null | null | Python279/Scripts/cygdb-script.py | Edeleon4/PoolShark | e59d353b90ae3f6ad2e5995c1fee2a5870a4bf8f | [
"MIT"
] | null | null | null | Python279/Scripts/cygdb-script.py | Edeleon4/PoolShark | e59d353b90ae3f6ad2e5995c1fee2a5870a4bf8f | [
"MIT"
] | null | null | null | #!c:\Python279\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'Cython==0.23.4','console_scripts','cygdb'
__requires__ = 'Cython==0.23.4'
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.exit(
load_entry_point('Cython==0.23.4', 'console_scripts', 'cygdb')()
)
| 27.727273 | 72 | 0.695082 |
9e89177b04f6a1c9abfd288c2b788c2b74507f4c | 1,927 | py | Python | python/examples/plot_speed_thresholds.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | 1 | 2021-06-03T04:02:49.000Z | 2021-06-03T04:02:49.000Z | python/examples/plot_speed_thresholds.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | null | null | null | python/examples/plot_speed_thresholds.py | Smart-Ag/xviz | 71c4470fdcb5c497793eb53666da6a5feb6832f0 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import matplotlib.pyplot as plt
from scenarios.utils.filesystem import load_config
def get_speed_and_distance_arrays(threshold_config):
speed = []
threshold = []
for pair in threshold_config:
speed.append(pair['speed'])
threshold.append(pair['threshold'])
retu... | 29.19697 | 80 | 0.64712 |
9e89474cbd07dba735ffa3efc2ca47d41195224b | 9,883 | py | Python | sktime/utils/validation/forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-09-02T19:39:59.000Z | 2020-09-02T19:39:59.000Z | sktime/utils/validation/forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/utils/validation/forecasting.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-12-28T15:24:15.000Z | 2020-12-28T15:24:15.000Z | __all__ = [
"check_y",
"check_X",
"check_y_X",
"check_fh",
"check_cv",
"check_window_length",
"check_step_length",
"check_time_index",
"check_equal_time_index",
"check_alpha",
"check_fh_values",
"check_cutoffs",
"check_scoring",
"check_sp",
"check_fh_is_relati... | 26.145503 | 78 | 0.596276 |
9e894d47b86ee905567ead6bae1902a9b0be0c99 | 1,791 | py | Python | src_for_Owen_Land/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | src_for_Owen_Land/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | src_for_Owen_Land/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | """
An opportunity to explore how to make an EV3 Robot move.
Authors: Dave Fisher, David Mutchler, Vibha Alangar,
their colleagues, and Owen Land.
""" # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE.
# ------------------------------------------------------------------------------
# TODO: 2.
# Follow along with the lect... | 30.87931 | 85 | 0.54718 |
9e899508f4d3145942ff10e46bccef3d3834f4ce | 352 | py | Python | boa/json.py | Pythux/PyBoa | 3ca10d4737cba5d747184cbbfef11480a9837991 | [
"MIT"
] | null | null | null | boa/json.py | Pythux/PyBoa | 3ca10d4737cba5d747184cbbfef11480a9837991 | [
"MIT"
] | null | null | null | boa/json.py | Pythux/PyBoa | 3ca10d4737cba5d747184cbbfef11480a9837991 | [
"MIT"
] | null | null | null | import json
from .boa_obj import boa
def load(stream, **kw):
"""
``stream`` is ``string`` or have ``.read()`` like an ``fp``
:return: the corresponding Python object
"""
if hasattr(stream, 'read'):
stream = stream.read()
return boa(json.loads(stream, **kw))
loads = load
dump... | 18.526316 | 67 | 0.588068 |
9e89ce127ac4bc5c680f913e771819b6a74d0781 | 11,521 | py | Python | clients/client/python/ory_client/model/update_project_config_config.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/update_project_config_config.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/update_project_config_config.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.71
Contact: support@ory.sh
Generated by: htt... | 43.806084 | 194 | 0.575384 |
9e89f1f423fa0bd3a5c98b69e19a9685cb1a0d00 | 1,464 | py | Python | DCNN-Pytorch/deepracing_models/data_loading/image_transforms.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 11 | 2020-06-29T15:21:37.000Z | 2021-04-12T00:42:26.000Z | DCNN-Pytorch/deepracing_models/data_loading/image_transforms.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | null | null | null | DCNN-Pytorch/deepracing_models/data_loading/image_transforms.py | linklab-uva/deepracing | fc25c47658277df029e7399d295d97a75fe85216 | [
"Apache-2.0"
] | 4 | 2019-01-23T23:36:57.000Z | 2021-07-02T00:18:37.000Z | import torchvision, torchvision.transforms.functional as F, torch
from PIL.ImageFilter import GaussianBlur as GBPIL
import PIL, PIL.Image
class IdentityTransform(torchvision.transforms.Lambda):
'''
Does nothing, just returns the provided image as-is
'''
def __init__(self):
super(IdentityTr... | 37.538462 | 132 | 0.654372 |
9e8a098cf395769e9550d25e3f167769305e6ec3 | 14,474 | py | Python | sirepo/auth/__init__.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | sirepo/auth/__init__.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | sirepo/auth/__init__.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
u"""Authentication
:copyright: Copyright (c) 2018-2019 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern.pkdebug import pkdc, pkdlog, pkdp
from pykern import pkcollectio... | 29.659836 | 88 | 0.655658 |
9e8a133f8643d474bc7a410573ed85a54c19510b | 9,446 | py | Python | services/web/server/tests/integration-proxy/conftest.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/web/server/tests/integration-proxy/conftest.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/web/server/tests/integration-proxy/conftest.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null |
""" Tests reverse proxy within an environment having a selection of
core and tool services running in a swarm
"""
# pylint:disable=wildcard-import
# pylint:disable=unused-import
# pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
import logging
import os
import ... | 32.020339 | 148 | 0.676159 |
9e8a174405b0165b524c7bcac5aa6dad2c3668cf | 18,971 | py | Python | tests/test_sparkpost_webhooks.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 1,324 | 2016-03-10T04:57:52.000Z | 2022-03-31T15:14:58.000Z | tests/test_sparkpost_webhooks.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 208 | 2016-03-10T03:40:59.000Z | 2022-03-22T23:16:08.000Z | tests/test_sparkpost_webhooks.py | bhumikapahariapuresoftware/django-anymail | 0252010fb3d4652c3c234fc6dba36d11c7602543 | [
"BSD-3-Clause"
] | 129 | 2016-03-10T09:24:52.000Z | 2022-02-07T05:37:24.000Z | import json
from datetime import datetime
from unittest.mock import ANY
from django.test import override_settings, tag
from django.utils.timezone import utc
from anymail.signals import AnymailTrackingEvent
from anymail.webhooks.sparkpost import SparkPostTrackingWebhookView
from .webhook_cases import WebhookBasicAuth... | 53.894886 | 113 | 0.610511 |
9e8a64283cc76c7a7bceda6767c76808d25413c4 | 1,385 | py | Python | delfin/api/views/storages.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 19 | 2020-07-28T00:13:43.000Z | 2022-02-15T16:44:21.000Z | delfin/api/views/storages.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 581 | 2020-06-22T15:20:58.000Z | 2022-03-31T04:06:14.000Z | delfin/api/views/storages.py | noelmcloughlin/delfin | 6dfa9bdb86d850410c82201f6fa621b4e5ea2917 | [
"Apache-2.0"
] | 153 | 2021-03-10T09:32:08.000Z | 2022-02-22T01:32:32.000Z | # Copyright 2020 The SODA Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 29.468085 | 74 | 0.704693 |
9e8a7264143027d1b6d1e20f529d9b14b14cafaa | 1,942 | py | Python | alipay/aop/api/domain/AlipayIserviceCliveConnectCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayIserviceCliveConnectCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayIserviceCliveConnectCloseModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayIserviceCliveConnectCloseModel(object):
def __init__(self):
self._conversation_id = None
self._src = None
self._visitor_token = None
@property
def conversat... | 27.352113 | 81 | 0.599382 |
9e8afccccba45a150fe67e0cbe05023ddeb5251e | 8,449 | py | Python | impacket/testcases/ImpactPacket/test_ICMP6.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/testcases/ImpactPacket/test_ICMP6.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/testcases/ImpactPacket/test_ICMP6.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | #!/usr/bin/env python
# Impact test version
try:
from impacket import IP6_Address, IP6, ImpactDecoder, ICMP6
except:
pass
# Standalone test version
try:
import sys
sys.path.insert(0,"../..")
import IP6_Address, IP6, ImpactDecoder, ICMP6
except:
pass
import unittest
class TestICMP6(unittest.... | 47.734463 | 168 | 0.657593 |
9e8b06c39e3002dff966b06307880018f3b327ec | 617 | py | Python | mkndaq/tests/test_meteo.py | joergklausen/gaw-mkn-daq | ee6ea3e1bd3d5cd559482248050f15183f13f96a | [
"MIT"
] | 1 | 2022-03-21T19:19:32.000Z | 2022-03-21T19:19:32.000Z | mkndaq/tests/test_meteo.py | joergklausen/mkndaq | 0d14db874bc7826d6d28aaad3fe4ad80cf6e9b64 | [
"MIT"
] | 4 | 2021-09-10T12:51:00.000Z | 2021-10-07T06:23:35.000Z | mkndaq/tests/test_meteo.py | joergklausen/gaw-mkn | ee6ea3e1bd3d5cd559482248050f15183f13f96a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from mkndaq.inst.meteo import METEO
if __name__ == '__main__':
cfg = {'logs': 'C:\\Users\\jkl/Documents/mkndaq/logs',
'data': 'C:\\Users\\jkl/Documents/mkndaq/data',
'staging': {'path': 'C:\\Users\\jkl/Documents/mkndaq/staging', 'zip': True},
'met... | 30.85 | 87 | 0.547812 |
9e8b2b43f4bab3504ac141dd1c85a6214fcf341e | 978 | py | Python | permissions.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | 3 | 2021-08-04T08:51:28.000Z | 2022-01-13T01:48:10.000Z | permissions.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | null | null | null | permissions.py | lizard1998myx/MultiBot | 314e15122ed8cd99e231b5d9bfbd853f1b0b2272 | [
"Apache-2.0"
] | 2 | 2021-08-04T08:52:15.000Z | 2022-01-12T14:20:25.000Z | import pandas as pd
from .paths import PATHS
import os
# columns: type, platform, user_id
PERM_FILE = os.path.join(PATHS['data'], 'permissions.xlsx')
PERM_KEYS = {'super': '', # 超级用户密码
'debug': '',
'InfoSession': '',
'WebImgSession': '',
}
def get_per... | 26.432432 | 60 | 0.461145 |
9e8b327ea5f765cf1bc349fed73ca4bc36684a84 | 2,621 | py | Python | amplify/backend/function/projecthandler/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | amplify/backend/function/projecthandler/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | amplify/backend/function/projecthandler/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | from db_project_service import DBService
from put_method import PutMethod, StatusCode, HTTPHelper
from bson.objectid import ObjectId
import os
def handler(event, context):
bad_request = {
"statusCode": 400,
"body": "Bad request."
}
if "http-method" not in event:
return bad_request
db = DBS... | 24.268519 | 102 | 0.634109 |
9e8b340cee26767103ba96cfe97f6252aea11686 | 5,781 | py | Python | components/adapters/dictadapter.py | SrGambiarra/KivyStudioDesigner | 7f617b60aef3d5e99865cb559b9b5ee93a1988f5 | [
"MIT"
] | 3 | 2022-03-05T21:54:34.000Z | 2022-03-15T12:55:45.000Z | components/adapters/dictadapter.py | SrGambiarra/KivyStudioDesigner | 7f617b60aef3d5e99865cb559b9b5ee93a1988f5 | [
"MIT"
] | 2 | 2022-03-13T04:15:47.000Z | 2022-03-30T11:51:41.000Z | components/adapters/dictadapter.py | SrGambiarra/KivyStudioDesigner | 7f617b60aef3d5e99865cb559b9b5ee93a1988f5 | [
"MIT"
] | null | null | null | '''
DictAdapter
===========
.. versionadded:: 1.5
.. warning::
This code is still experimental, and its API is subject to change in a
future version.
:class:`~kivy.adapters.dictadapter.DictAdapter` is an adapter around a python
dictionary of records. It extends the list-like capabilities of
:class:`~kivy.ad... | 37.296774 | 78 | 0.668915 |
9e8b51b673589a781484ca5fcf574fe866ed09a9 | 6,071 | py | Python | sem/tests/test_modules.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/tests/test_modules.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/tests/test_modules.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | #-*- encoding: utf-8 -*-
"""
file: test_modules.py
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
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, includi... | 37.475309 | 123 | 0.588371 |
9e8b8f3e161f4aa4d913cfade764d7d127fa4518 | 5,376 | py | Python | raiden/utils/gas_reserve.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | raiden/utils/gas_reserve.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | 12 | 2019-08-09T19:12:17.000Z | 2019-12-05T15:49:29.000Z | raiden/utils/gas_reserve.py | ExchangeUnion/raiden | 2217bcb698fcfce3499dc1f41ad919ed82e8e45f | [
"MIT"
] | null | null | null | from typing import Dict, Tuple
from raiden.constants import UNLOCK_TX_GAS_LIMIT
from raiden.transfer import views
from raiden_contracts.contract_manager import gas_measurements
GAS_REQUIRED_FOR_CHANNEL_LIFECYCLE_AFTER_SETTLE = UNLOCK_TX_GAS_LIMIT
def gas_required_for_channel_lifecycle_after_close(gas_measurements: ... | 38.676259 | 99 | 0.758185 |
9e8bb14b28926e46a6bcdb2ab087dace74021ade | 4,198 | py | Python | TBWright/day09.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | TBWright/day09.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | TBWright/day09.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | """
--- Day 9: Encoding Error ---
With your neighbor happily enjoying their video game, you turn your attention to an open data port on the little screen
in the seat in front of you.
Though the port is non-standard, you manage to connect it to your computer through the clever use of several paperclips.
Upon connectio... | 33.31746 | 120 | 0.743211 |
9e8bd524bbceede8adfcfcbac17a46c09efd8e1f | 8,873 | py | Python | pandaharvester/harvestercloud/pilots_starter.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercloud/pilots_starter.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | pandaharvester/harvestercloud/pilots_starter.py | tsulaiav/harvester | ca3f78348019dd616738f2da7d50e81700a8e6b9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
This script will be executed at container startup
- It will retrieve the proxy and panda queue from the environment
- It will download the pilot wrapper from github and execute it
- It will upload the pilot logs to panda cache at the end
post-multipart code was taken from: https://github.com... | 37.918803 | 178 | 0.675082 |
9e8c03caa3ca3b94eb9306010cfcf39c8968c6ab | 12,337 | py | Python | h2o-py/tests/testdir_misc/pyunit_metric_json_check.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | 1 | 2017-03-28T09:10:12.000Z | 2017-03-28T09:10:12.000Z | h2o-py/tests/testdir_misc/pyunit_metric_json_check.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_misc/pyunit_metric_json_check.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
# The purpose of this test is to detect a change in the _metric_json of MetricsBase objects. Many of the metric
# accessors require _metric_json to have a particular form.
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
from h... | 56.333333 | 120 | 0.418416 |
9e8c2539c973ee4b4e081c364f478edadff05f1a | 2,948 | py | Python | src/core/exception.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | src/core/exception.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | src/core/exception.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017-present i2CAT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 29.48 | 74 | 0.671303 |
9e8c28c05e56dd46da5063fbe3bb63800ea940bd | 226 | py | Python | run_errdatagene.py | sailist/ASRFrame | 2fd022c3c00af1d5178dee4b367b2269241bc73c | [
"Apache-2.0"
] | 223 | 2019-07-13T06:31:18.000Z | 2022-03-11T08:23:01.000Z | run_errdatagene.py | mayite/ASRFrame | 484cf1ee5beec4c39439de683c5b4c1f1ea3a94a | [
"Apache-2.0"
] | 7 | 2019-12-27T08:48:42.000Z | 2021-09-01T09:45:13.000Z | run_errdatagene.py | mayite/ASRFrame | 484cf1ee5beec4c39439de683c5b4c1f1ea3a94a | [
"Apache-2.0"
] | 71 | 2019-07-14T13:14:13.000Z | 2022-03-18T06:58:54.000Z | from util.scripts import err_count
'''用于控制GPU'''
import os
os.environ["CUDA_VISIBLE_DEVICES"] = ""#不适用GPU
# os.environ["CUDA_VISIBLE_DEVICES"] = "0"#使用一个GPU
# os.environ["CUDA_VISIBLE_DEVICES"] = "0,1"#使用0/1两个GPU
err_count() | 25.111111 | 55 | 0.734513 |
9e8c378cb236534ef670ad727a94ac86d27492b7 | 10,345 | py | Python | tensorflow_datasets/image_classification/imagenet.py | rushabh-v/datasets | eccdf9dd2b8741e1d2500ae7edb0cb7f5cd59da4 | [
"Apache-2.0"
] | 2 | 2020-10-12T07:09:38.000Z | 2021-03-05T12:48:23.000Z | tensorflow_datasets/image_classification/imagenet.py | rushabh-v/datasets | eccdf9dd2b8741e1d2500ae7edb0cb7f5cd59da4 | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/image_classification/imagenet.py | rushabh-v/datasets | eccdf9dd2b8741e1d2500ae7edb0cb7f5cd59da4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 37.755474 | 220 | 0.694635 |
9e8c6375c340ba9d5d0503d3a06f2af9e7adc181 | 1,440 | py | Python | pyntejos/scripts/nt_coadd_cos.py | ntejos/pyntejos | ecac98807c33c58e0ced690231991375b89739c9 | [
"BSD-3-Clause"
] | null | null | null | pyntejos/scripts/nt_coadd_cos.py | ntejos/pyntejos | ecac98807c33c58e0ced690231991375b89739c9 | [
"BSD-3-Clause"
] | null | null | null | pyntejos/scripts/nt_coadd_cos.py | ntejos/pyntejos | ecac98807c33c58e0ced690231991375b89739c9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import (print_function, absolute_import, division, unicode_literals)
import numpy as np
a = np.random.uniform()
try:
ustr = unicode
except NameError:
ustr = str
"""This script reads (ra,dec) coordinates and matches them to
catalogs of known objects.
"""
def parser(options... | 32.727273 | 130 | 0.660417 |
9e8c815d23a203b3e3a022863a528b6792ce6c6b | 7,161 | py | Python | topo/tests/test_map_measurement.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/tests/test_map_measurement.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | topo/tests/test_map_measurement.py | ceball/topographica | ec0eea614409ceb7473e04bc2f6b6c888099160f | [
"BSD-3-Clause"
] | null | null | null | """
Functions to test that map measurements haven't changed.
Use generate() to save data, and test() to check that the data is
unchanged in a later version. Results from generate() are already
checked into svn, so intentional changes to map measurement mean new
data must be generated and committed. E.g.
# ...delibera... | 36.166667 | 121 | 0.622958 |
9e8d0570d516f3563bc8ce9fdfe498e2602b8b29 | 4,146 | py | Python | openapi_client/models/trips.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/trips.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/trips.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... | 27.456954 | 97 | 0.567294 |
9e8d0825acae8cae54de0481190bb4547a6e9dd0 | 911 | py | Python | src_retrieval_hindi/evaluate.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 7 | 2021-12-14T07:12:00.000Z | 2022-02-25T00:23:44.000Z | src_retrieval_hindi/evaluate.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 2 | 2021-11-22T15:27:38.000Z | 2021-12-01T13:29:29.000Z | src_retrieval_hindi/evaluate.py | hyounghk/FixMyPose | 1b31c7f9e25ade6ee929cbbdc56d50162a8c2218 | [
"MIT"
] | null | null | null | import os
import sys
import json
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'langeval'))
from eval import LanguageEval
class LangEvaluator():
def __init__(self, dataset):
self.uid2ref = {}
self.langeval = LanguageEval()
for datum in dataset.da... | 27.606061 | 102 | 0.592755 |
9e8d17feb053a35afa70bee49a3830e0c15205e3 | 4,830 | py | Python | extensions/iocompython/examples/ispy/item.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/iocompython/examples/ispy/item.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/iocompython/examples/ispy/item.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.label import Label
from kivy.uix.checkbox import CheckBox
from kivy.graphics import Color, Rectangle, Line
from kivy.core.window import Window
from kivy.uix.popup import Popup
from kivy.uix.textinput import TextInput
from ... | 34.255319 | 94 | 0.586542 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.