hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6f4dd13eb9793de1f5ddc3c3d0ed020e3706db67 | 4,248 | py | Python | pipeline/core/pipeline.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | pipeline/core/pipeline.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | pipeline/core/pipeline.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 30.12766 | 115 | 0.642185 |
87b1444ae17065d0cfc78b5576e94c9a0a24c129 | 6,606 | py | Python | main/game/player/Pathfinding.py | MrDrache333/InformatiCup2021-spe_ed-Python-Bot | 6eb0fdd443468787692c30ebc75698724535e001 | [
"Apache-2.0"
] | null | null | null | main/game/player/Pathfinding.py | MrDrache333/InformatiCup2021-spe_ed-Python-Bot | 6eb0fdd443468787692c30ebc75698724535e001 | [
"Apache-2.0"
] | null | null | null | main/game/player/Pathfinding.py | MrDrache333/InformatiCup2021-spe_ed-Python-Bot | 6eb0fdd443468787692c30ebc75698724535e001 | [
"Apache-2.0"
] | null | null | null | import copy
import heapq
class Cell(object):
"""
A rectangle in the gamefield, adressed by a x and y coordinate
"""
def __init__(self, x, y, reachable):
self.reachable = reachable
self.x = x
self.y = y
self.parent = None
self.turn = 0
self.g = 0
... | 35.902174 | 119 | 0.550409 |
8cfa8c1aebb652f466cd729991c67043f535e2f4 | 2,505 | py | Python | kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_init_configuration_bootstrap_tokens.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_init_configuration_bootstrap_tokens.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_io_xk8s_cluster_bootstrap_v1alpha3_kubeadm_config_spec_init_configuration_bootstrap_tokens.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitte... | 39.761905 | 229 | 0.714172 |
3906df695cf234c2fef79c0ceb2a93493b4302ec | 1,321 | py | Python | paypal_integration/utils.py | gavindsouza/paypal_integration | 519b85ea9d1566088a9f70a41917c929fb3d8aa7 | [
"MIT"
] | 17 | 2015-09-19T17:00:45.000Z | 2022-03-11T16:58:22.000Z | paypal_integration/utils.py | gavindsouza/paypal_integration | 519b85ea9d1566088a9f70a41917c929fb3d8aa7 | [
"MIT"
] | 6 | 2015-12-24T12:57:56.000Z | 2016-06-20T21:25:00.000Z | paypal_integration/utils.py | gavindsouza/paypal_integration | 519b85ea9d1566088a9f70a41917c929fb3d8aa7 | [
"MIT"
] | 29 | 2015-06-12T04:01:30.000Z | 2022-03-15T07:19:17.000Z | import frappe
from frappe import _
from .express_checkout import set_express_checkout, validate_transaction_currency
def get_payment_url(doc, method):
if doc.docstatus == 1:
if doc.payment_gateway == "PayPal":
set_express_checkout(doc.grand_total, doc.currency, {"doctype": doc.doctype, "docname": doc.name})
els... | 44.033333 | 235 | 0.786525 |
a9c269f813f98c16f180efb64b95bd1c5c2b9854 | 7,240 | py | Python | conda/install.py | areading314/conda | c9aa50360af308048f57bc2d1c9ae5707e057e3b | [
"BSD-3-Clause"
] | null | null | null | conda/install.py | areading314/conda | c9aa50360af308048f57bc2d1c9ae5707e057e3b | [
"BSD-3-Clause"
] | null | null | null | conda/install.py | areading314/conda | c9aa50360af308048f57bc2d1c9ae5707e057e3b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
""" This module contains:
* all low-level code for extracting, linking and unlinking packages
* a very simple CLI
These API functions have argument names referring to:
dist: canonical package name (e.g. '... | 37.128205 | 99 | 0.64116 |
8a2dfbd6a71fd5072adc2d5378c7f970eac27e2e | 139 | py | Python | InvenTree/common/api.py | ArakniD/InvenTree | 0ebf2ebd832b2d736e895abe054ca56bfd1cc477 | [
"MIT"
] | 656 | 2017-03-29T22:06:14.000Z | 2022-03-30T11:23:52.000Z | InvenTree/common/api.py | ArakniD/InvenTree | 0ebf2ebd832b2d736e895abe054ca56bfd1cc477 | [
"MIT"
] | 1,545 | 2017-04-10T23:26:04.000Z | 2022-03-31T18:32:10.000Z | InvenTree/common/api.py | fablabbcn/InvenTree | 1d7ea7716cc96c6ffd151c822b01cd1fb5dcfecd | [
"MIT"
] | 196 | 2017-03-28T03:06:21.000Z | 2022-03-28T11:53:29.000Z | """
Provides a JSON API for common components.
"""
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
common_api_urls = [
]
| 13.9 | 42 | 0.690647 |
e2ae6abb1ea75aff48d22297fa249f3a0d1876ee | 2,351 | py | Python | cvpods/modeling/meta_arch/imagenet.py | lxtGH/BorderDet | ff425172a35a25e733d0facd79c2fd6f378052b0 | [
"Apache-2.0"
] | null | null | null | cvpods/modeling/meta_arch/imagenet.py | lxtGH/BorderDet | ff425172a35a25e733d0facd79c2fd6f378052b0 | [
"Apache-2.0"
] | null | null | null | cvpods/modeling/meta_arch/imagenet.py | lxtGH/BorderDet | ff425172a35a25e733d0facd79c2fd6f378052b0 | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from cvpods.layers import ShapeSpec
from cvpods.structures import ImageList
def accuracy(output, target, topk=(1,)):
"""Computes the accuracy over the k top predictions for the specified values of k"""
with torch.no_grad():
maxk = max(topk)
batch_size = targ... | 31.346667 | 88 | 0.605274 |
7f3ecda5e96e69407982e17bedb4f9d87856852b | 11,527 | py | Python | dask/array/numpy_compat.py | thedimlebowski/dask | 7c5ab2150962ad7c56514687b1a89742c099b5aa | [
"BSD-3-Clause"
] | null | null | null | dask/array/numpy_compat.py | thedimlebowski/dask | 7c5ab2150962ad7c56514687b1a89742c099b5aa | [
"BSD-3-Clause"
] | null | null | null | dask/array/numpy_compat.py | thedimlebowski/dask | 7c5ab2150962ad7c56514687b1a89742c099b5aa | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
from distutils.version import LooseVersion
import numpy as np
import warnings
from ..utils import derived_from
_numpy_116 = LooseVersion(np.__version__) >= "1.16.0"
_numpy_117 = LooseVersion(np.__version__) >= "1.17.0"
_numpy_118 = LooseVersion(np.__v... | 34.00295 | 112 | 0.556866 |
55ba9c2a8d707693bc08d1c820dd35e8aea4cccd | 686 | py | Python | src/environment.py | zwilling/plutus-integration-testing-toolkit | 50f954d2977b6d41fb5d910fe465401bd8d37f86 | [
"Apache-2.0"
] | 2 | 2021-09-30T19:23:32.000Z | 2021-10-01T05:59:37.000Z | src/environment.py | zwilling/plutus-integration-testing-toolkit | 50f954d2977b6d41fb5d910fe465401bd8d37f86 | [
"Apache-2.0"
] | null | null | null | src/environment.py | zwilling/plutus-integration-testing-toolkit | 50f954d2977b6d41fb5d910fe465401bd8d37f86 | [
"Apache-2.0"
] | null | null | null | import os
class TestkitEnvironment:
"""
Loading and handling the environment variables for using cardano
"""
def __init__(self):
self.__env = os.environ
self.repository_path = os.getcwd()
@property
def socket(self):
return self.__env.get("CARDANO_NODE_SOCKET_PATH")
... | 21.4375 | 68 | 0.655977 |
05f25e6c64a3f2f401ad579970b8a6a3794d8475 | 3,164 | py | Python | tests/unit/test_model.py | FinnStutzenstein/openslides-backend | fffc152f79d3446591e07a6913d9fdf30b46f577 | [
"MIT"
] | null | null | null | tests/unit/test_model.py | FinnStutzenstein/openslides-backend | fffc152f79d3446591e07a6913d9fdf30b46f577 | [
"MIT"
] | null | null | null | tests/unit/test_model.py | FinnStutzenstein/openslides-backend | fffc152f79d3446591e07a6913d9fdf30b46f577 | [
"MIT"
] | null | null | null | from typing import cast
from unittest import TestCase
from openslides_backend.models import fields
from openslides_backend.models.base import Model
from openslides_backend.shared.exceptions import ActionException
from openslides_backend.shared.patterns import Collection
class FakeModel(Model):
"""
Fake Model... | 32.958333 | 88 | 0.655183 |
5b4ea480ccf35e294d19606368cc6c8c6f01af6e | 20,628 | py | Python | lldb/examples/python/x86_64_qemu_target_definition.py | bytesnake/Enzyme | 247606c279920d476645d2e319e574bf8be10fc9 | [
"Apache-2.0"
] | 427 | 2018-05-29T14:21:02.000Z | 2022-03-16T03:17:54.000Z | SymbolExtractorAndRenamer/lldb/examples/python/x86_64_qemu_target_definition.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 25 | 2018-07-23T08:34:15.000Z | 2021-11-05T07:13:36.000Z | SymbolExtractorAndRenamer/lldb/examples/python/x86_64_qemu_target_definition.py | PolideaPlayground/SiriusObfuscator | b0e590d8130e97856afe578869b83a209e2b19be | [
"Apache-2.0"
] | 52 | 2018-07-19T19:57:32.000Z | 2022-03-11T16:05:38.000Z | #!/usr/bin/python
#===-- x86_64_qemu_target_definition.py -----------------------------*- C++ -*-===//
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===----------------------------------------... | 26.651163 | 112 | 0.527875 |
a60ae0f38f422e84b0f806512b0e1e4c5610cb32 | 2,344 | py | Python | upwork-devs/MaNe2020/docker-icap-jmeter-testdata/file_distribution/src/rpc/file_pb2_grpc.py | faisaladnanpeltops/p-k8-jmeter-test-engine-v1 | 45dee8fce8a84ea8e126e370c6ef279a5c6b646d | [
"Apache-2.0"
] | null | null | null | upwork-devs/MaNe2020/docker-icap-jmeter-testdata/file_distribution/src/rpc/file_pb2_grpc.py | faisaladnanpeltops/p-k8-jmeter-test-engine-v1 | 45dee8fce8a84ea8e126e370c6ef279a5c6b646d | [
"Apache-2.0"
] | null | null | null | upwork-devs/MaNe2020/docker-icap-jmeter-testdata/file_distribution/src/rpc/file_pb2_grpc.py | faisaladnanpeltops/p-k8-jmeter-test-engine-v1 | 45dee8fce8a84ea8e126e370c6ef279a5c6b646d | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import src.rpc.file_pb2 as file__pb2
class FileStub(object):
"""Missing associated documentation comment in .proto file."""
def __init__(self, channel... | 30.051282 | 87 | 0.647611 |
5ccf654f4f9747c716c00fb93afef565828dd46d | 11,080 | py | Python | evennia/server/portal/webclient.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,544 | 2015-01-01T22:16:31.000Z | 2022-03-31T19:17:45.000Z | evennia/server/portal/webclient.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,686 | 2015-01-02T18:26:31.000Z | 2022-03-31T20:12:03.000Z | evennia/server/portal/webclient.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 867 | 2015-01-02T21:01:54.000Z | 2022-03-29T00:28:27.000Z | """
Webclient based on websockets.
This implements a webclient with WebSockets (http://en.wikipedia.org/wiki/WebSocket)
by use of the autobahn-python package's implementation (https://github.com/crossbario/autobahn-python).
It is used together with evennia/web/media/javascript/evennia_websocket_webclient.js.
All data... | 35.512821 | 103 | 0.620668 |
0332214fb9747014f1a0686d9d833afd627865d1 | 5,902 | py | Python | ckan/config/routing.py | LukeTully/ckan | 687afafd54631a52801b3f00c9b50a7532390202 | [
"Apache-2.0"
] | null | null | null | ckan/config/routing.py | LukeTully/ckan | 687afafd54631a52801b3f00c9b50a7532390202 | [
"Apache-2.0"
] | 135 | 2019-07-03T19:58:12.000Z | 2020-02-14T19:57:33.000Z | ckan/config/routing.py | LukeTully/ckan | 687afafd54631a52801b3f00c9b50a7532390202 | [
"Apache-2.0"
] | 1 | 2019-06-25T23:15:14.000Z | 2019-06-25T23:15:14.000Z | # encoding: utf-8
"""Routes configuration
The more specific and detailed routes should be defined first so they
may take precedent over the more generic routes. For more information
refer to the routes manual at http://routes.groovie.org/docs/
"""
import re
from routes.mapper import SubMapper, Mapper as _Mapper
imp... | 35.341317 | 79 | 0.629617 |
4097455ef9925338ac47ab41098e206ea07c8750 | 8,411 | py | Python | applications/tensorflow/contrastive_divergence_vae/experiments/generative.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/contrastive_divergence_vae/experiments/generative.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/contrastive_divergence_vae/experiments/generative.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
# coding=utf-8
"""
Generic functionality for generative modelling experiments
"""
import datetime as dt
from functools import partial
import numpy as np # Necessary for parsing dtypes
import os
import tensorflow as tf # Necessary for parsing dtypes
from machinable.dot_dict im... | 44.502646 | 114 | 0.614315 |
ed397ee4ad3913afe8ae6278cf58c0f3594c36b6 | 5,808 | py | Python | tfx/orchestration/airflow/airflow_dag_runner_test.py | JibranKalia/tfx | 05ce31aa71ed38f7978f6cb7c7571202f8283e93 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/airflow/airflow_dag_runner_test.py | JibranKalia/tfx | 05ce31aa71ed38f7978f6cb7c7571202f8283e93 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/airflow/airflow_dag_runner_test.py | JibranKalia/tfx | 05ce31aa71ed38f7978f6cb7c7571202f8283e93 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. 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... | 35.631902 | 79 | 0.704201 |
7991fc14d56d3bce48520de69fff112d8ebb311f | 1,443 | py | Python | utilities/metrics/coco.py | saiabinesh/EdgeNets | 2b232d3f7fb60658755dad1ebca0ffc895cc795e | [
"MIT"
] | 392 | 2019-06-08T00:34:58.000Z | 2022-03-26T18:46:44.000Z | utilities/metrics/coco.py | saiabinesh/EdgeNets | 2b232d3f7fb60658755dad1ebca0ffc895cc795e | [
"MIT"
] | 37 | 2019-06-23T07:37:36.000Z | 2022-03-02T17:24:30.000Z | utilities/metrics/coco.py | saiabinesh/EdgeNets | 2b232d3f7fb60658755dad1ebca0ffc895cc795e | [
"MIT"
] | 87 | 2019-06-11T16:32:07.000Z | 2022-01-30T14:44:29.000Z | #============================================
__author__ = "Sachin Mehta"
__maintainer__ = "Sachin Mehta"
#============================================
import json
import os
def coco_evaluation(dataset, predictions, output_dir):
coco_results = []
for i, (boxes, labels, scores) in enumerate(predictions):
... | 32.066667 | 97 | 0.54262 |
762f2f658604dc48e5dff605278efd4b86f2f0e7 | 5,901 | py | Python | ddtrace/pin.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | ddtrace/pin.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | ddtrace/pin.py | tophatmonocle/dd-trace-py | 7db12f1c398c07cd5baf91c571aed672dbb6496d | [
"BSD-3-Clause"
] | null | null | null | import logging
import wrapt
import ddtrace
log = logging.getLogger(__name__)
# To set attributes on wrapt proxy objects use this prefix:
# http://wrapt.readthedocs.io/en/latest/wrappers.html
_DD_PIN_NAME = '_datadog_pin'
_DD_PIN_PROXY_NAME = '_self_' + _DD_PIN_NAME
class Pin(object):
"""Pin (a.k.a Patch INfo... | 35.981707 | 97 | 0.611761 |
b11b45a3c9afc2393610ae432d1fe479677181df | 31,487 | py | Python | mintapi/api.py | apiology/mintapi | a4ff1bff5ca8f990aa044c9d28a0888f5109c96b | [
"MIT"
] | null | null | null | mintapi/api.py | apiology/mintapi | a4ff1bff5ca8f990aa044c9d28a0888f5109c96b | [
"MIT"
] | null | null | null | mintapi/api.py | apiology/mintapi | a4ff1bff5ca8f990aa044c9d28a0888f5109c96b | [
"MIT"
] | null | null | null | import atexit
from datetime import date, datetime, timedelta
import io
import json
import os
import os.path
import random
import re
import requests
from sys import platform as _platform
import time
import warnings
import zipfile
try:
from StringIO import StringIO # Python 2
except ImportError:
from io import ... | 35.259798 | 103 | 0.582844 |
15e8457ccd080bb7afefe50d0ae9bacd6c804177 | 1,785 | py | Python | facebook_business/adobjects/pagethreadowner.py | MyrikLD/facebook-python-business-sdk | a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814 | [
"CNRI-Python"
] | 576 | 2018-05-01T19:09:32.000Z | 2022-03-31T11:45:11.000Z | facebook_business/adobjects/pagethreadowner.py | MyrikLD/facebook-python-business-sdk | a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814 | [
"CNRI-Python"
] | 217 | 2018-05-03T07:31:59.000Z | 2022-03-29T14:19:52.000Z | facebook_business/adobjects/pagethreadowner.py | MyrikLD/facebook-python-business-sdk | a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814 | [
"CNRI-Python"
] | 323 | 2018-05-01T20:32:26.000Z | 2022-03-29T07:05:12.000Z | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | 34.326923 | 79 | 0.745658 |
cdee49580f885fe95d044d05aa21426c6e139b72 | 273 | py | Python | drawing/drawer/mesh/group/__init__.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | drawing/drawer/mesh/group/__init__.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | drawing/drawer/mesh/group/__init__.py | akyruu/blender-cartography-addon | 4f34b029d9b6a72619227ab3ceaed9393506934e | [
"Apache-2.0"
] | null | null | null | from .common import CartographyMeshGroupContext, CartographyMeshGroupDrawer, CartographyMeshGroupGeometry
from .extruded import CartographyMeshExtrudedGroupDrawer
from .leveled import CartographyMeshLeveledGroupDrawer
from .outline import CartographyMeshOutlineGroupDrawer
| 54.6 | 105 | 0.912088 |
f24f7d0ddf5aab71cb33a9856a7b4a14408b7414 | 796 | py | Python | mmfashion/models/feature_extractor/feature_correlation.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 952 | 2019-10-31T01:49:07.000Z | 2022-03-29T11:33:27.000Z | mmfashion/models/feature_extractor/feature_correlation.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 135 | 2019-11-02T07:09:04.000Z | 2022-03-17T06:08:11.000Z | mmfashion/models/feature_extractor/feature_correlation.py | RyanJiang0416/mmfashion | 89f56e3e631b4f5c1403f7e8897396cc02b5aa91 | [
"Apache-2.0"
] | 239 | 2019-10-31T02:08:40.000Z | 2022-03-22T03:14:38.000Z | import torch
import torch.nn as nn
from ..registry import FEATURECORRELATION
@FEATURECORRELATION.register_module
class FeatureCorrelation(nn.Module):
def __init__(self):
super(FeatureCorrelation, self).__init__()
def forward(self, feat_a, feat_b):
bs, c, h, w = feat_a.size()
# resha... | 31.84 | 76 | 0.582915 |
023eaff4c3d45abd245bb98c2c77bbbe362e3c97 | 4,160 | py | Python | tests/ecdsa/generator_test.py | jaschadub/pycoin | 1e8d0d9fe20ce0347b97847bb529cd1bd84c7442 | [
"MIT"
] | 1,210 | 2015-01-02T13:36:28.000Z | 2022-03-30T00:52:22.000Z | tests/ecdsa/generator_test.py | impactog/pycoin | 3db6f82afa3054d8d07caca4909e1aed3de2fceb | [
"MIT"
] | 280 | 2015-01-05T23:16:47.000Z | 2022-02-22T22:02:17.000Z | tests/ecdsa/generator_test.py | impactog/pycoin | 3db6f82afa3054d8d07caca4909e1aed3de2fceb | [
"MIT"
] | 459 | 2015-01-10T00:15:57.000Z | 2022-03-16T12:04:40.000Z | import unittest
from pycoin.ecdsa.Point import Point
from pycoin.ecdsa.Generator import Generator
from pycoin.ecdsa.Curve import Curve
class GeneratorTestCase(unittest.TestCase):
c23 = Curve(23, 1, 1)
def do_test_add(self, c, x1, y1, x2, y2, x3, y3):
"""We expect that on curve c, (x1,y1) + (x2, y2)... | 37.477477 | 87 | 0.576202 |
0acf859406fad14d0b42774226b212f3e6c529ae | 4,698 | py | Python | cflearn/models/multimodal/clip.py | carefree0910/carefree-learn | 2043812afbe9c56f01ec1639961736313ee062ba | [
"MIT"
] | 400 | 2020-07-05T18:55:49.000Z | 2022-02-21T02:33:08.000Z | cflearn/models/multimodal/clip.py | carefree0910/carefree-learn | 2043812afbe9c56f01ec1639961736313ee062ba | [
"MIT"
] | 82 | 2020-08-01T13:29:38.000Z | 2021-10-09T07:13:44.000Z | cflearn/models/multimodal/clip.py | carefree0910/carefree-learn | 2043812afbe9c56f01ec1639961736313ee062ba | [
"MIT"
] | 34 | 2020-07-05T21:15:34.000Z | 2021-12-20T08:45:17.000Z | import torch
from PIL import Image
from torch import nn
from torch import Tensor
from torchvision.transforms import Resize
from torchvision.transforms import Compose
from torchvision.transforms import ToTensor
from torchvision.transforms import Normalize
from torchvision.transforms import CenterCrop
from torchvision.t... | 37.285714 | 88 | 0.636228 |
9f5624a67c69368583a31b58e7d66674b673ee08 | 877 | py | Python | scripts/examples/07-Face-Detection/face_recognition.py | jibonaronno/OpenMV-openmv | ec7bca0a3d0407f632d86b57ac2bdc6dc84f0252 | [
"MIT"
] | 2 | 2021-03-23T21:47:34.000Z | 2022-02-14T15:23:01.000Z | usr/examples/07-Face-Detection/face_recognition.py | guohuijiang1234/openmv | 9c3e9109ec1a2b68bb34107557945bfa379d3a0e | [
"MIT"
] | 2 | 2018-11-13T06:47:24.000Z | 2019-05-15T06:21:55.000Z | usr/examples/07-Face-Detection/face_recognition.py | guohuijiang1234/openmv | 9c3e9109ec1a2b68bb34107557945bfa379d3a0e | [
"MIT"
] | 11 | 2020-06-03T10:12:28.000Z | 2020-06-05T16:02:40.000Z | # Face recognition with LBP descriptors.
# See Timo Ahonen's "Face Recognition with Local Binary Patterns".
#
# Before running the example:
# 1) Download the AT&T faces database http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip
# 2) Exract and copy the orl_faces directory to the SD card root.
impo... | 33.730769 | 108 | 0.68301 |
aa2ea296673ab92c5268998268bb64c89d0f60b0 | 6,314 | py | Python | test/features/tensors_test.py | t0kk35/d373c7 | 7780b97545e581244fb4fb74347bb1b052b9ec3f | [
"Apache-2.0"
] | 1 | 2021-07-23T18:04:55.000Z | 2021-07-23T18:04:55.000Z | test/features/tensors_test.py | t0kk35/d373c7 | 7780b97545e581244fb4fb74347bb1b052b9ec3f | [
"Apache-2.0"
] | null | null | null | test/features/tensors_test.py | t0kk35/d373c7 | 7780b97545e581244fb4fb74347bb1b052b9ec3f | [
"Apache-2.0"
] | null | null | null | """
Unit Tests for TensorDefinition Creation
(c) 2020 d373c7
"""
import unittest
import d373c7.features as ft
class TestTensorCreate(unittest.TestCase):
def test_creation(self):
name_t = 'test-tensor'
f1 = ft.FeatureSource('test-feature-1', ft.FEATURE_TYPE_STRING)
f2 = ft.FeatureSource('te... | 49.328125 | 119 | 0.671999 |
82394606629cbc487b4dfc51249db4561db32362 | 4,762 | py | Python | Homework 1/crack_zip.py | Sma-Das/CSEC-201 | 0a1b2db0fb5d5aea43c3eb811c1b3094f806ad0d | [
"MIT"
] | null | null | null | Homework 1/crack_zip.py | Sma-Das/CSEC-201 | 0a1b2db0fb5d5aea43c3eb811c1b3094f806ad0d | [
"MIT"
] | null | null | null | Homework 1/crack_zip.py | Sma-Das/CSEC-201 | 0a1b2db0fb5d5aea43c3eb811c1b3094f806ad0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Enumerate given directories for potential password files and crack a given zip
Using generator techniques to mitigate the amount of IO Wrappers and Memory Usage of the program when dealing with large password banks
'''
import re
import sys
import zipfile
from glob import iglob
from os impo... | 35.537313 | 135 | 0.606258 |
d3f598ca99d057baa56e202abf1c38b1aa30288a | 432 | py | Python | web/producers/migrations/0024_productionsite_address.py | MTES-MCT/biocarburants | ff084916e18cdbdc41400f36fa6cc76a5e05900e | [
"MIT"
] | 4 | 2020-03-22T18:13:12.000Z | 2021-01-25T10:33:31.000Z | web/producers/migrations/0024_productionsite_address.py | MTES-MCT/carbure | 2876756b760ab4866fa783bb40e61a046eebb1ab | [
"MIT"
] | 20 | 2020-07-06T14:33:14.000Z | 2022-03-15T16:54:17.000Z | web/producers/migrations/0024_productionsite_address.py | MTES-MCT/biocarburants | ff084916e18cdbdc41400f36fa6cc76a5e05900e | [
"MIT"
] | 4 | 2020-04-03T12:19:12.000Z | 2021-06-15T12:20:57.000Z | # Generated by Django 3.2.4 on 2021-10-06 13:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('producers', '0023_productionsite_gps_coordinates'),
]
operations = [
migrations.AddField(
model_name='productionsite',
... | 22.736842 | 75 | 0.622685 |
52c3a129a975443c8c811849ab2d556e2d24429f | 1,049 | py | Python | unshortenit/modules/meta_refresh.py | animeshxd/unshortenit | 31e2772d5de0de5bda222e1b5437d114a1c483d6 | [
"MIT"
] | 55 | 2015-04-13T20:44:35.000Z | 2021-11-15T11:26:25.000Z | unshortenit/modules/meta_refresh.py | DorHayun/URL-expander | 8bd550d5371db4ae53a32a688ef7ca698e82c527 | [
"MIT"
] | 24 | 2015-09-13T15:14:12.000Z | 2021-11-04T14:59:30.000Z | unshortenit/modules/meta_refresh.py | DorHayun/get-license-by-url | b5ace7c63ba4b9c906fac90245e6e7103abbeb69 | [
"MIT"
] | 20 | 2015-02-19T07:10:16.000Z | 2022-02-21T00:07:35.000Z | from lxml import html
from urllib.parse import urljoin
from unshortenit.module import UnshortenModule
from unshortenit.exceptions import UnshortenFailed
class MetaRefresh(UnshortenModule):
name = 'meta-refresh'
domains = [
'href.li',
'anonymz.com'
]
def __init__(self, headers: dict ... | 27.605263 | 83 | 0.593899 |
154f54b34b2fc8caa7fa6196d06a0d9f28b3934d | 34 | py | Python | view/__init__.py | madeindjs/pomodore_manager | 34cbdcde3bcdf2942a4f62077406e08ccd9c1ed7 | [
"Apache-2.0"
] | 1 | 2017-03-22T11:07:12.000Z | 2017-03-22T11:07:12.000Z | view/__init__.py | madeindjs/pomodore_manager | 34cbdcde3bcdf2942a4f62077406e08ccd9c1ed7 | [
"Apache-2.0"
] | null | null | null | view/__init__.py | madeindjs/pomodore_manager | 34cbdcde3bcdf2942a4f62077406e08ccd9c1ed7 | [
"Apache-2.0"
] | null | null | null | __all__ = ['interface', 'setting'] | 34 | 34 | 0.676471 |
84bfc05edfe91d066f203fb04fecca0d682e70c9 | 5,738 | py | Python | app/gul/data/session.py | yellow-sem/yellow | 96c3f7f4db1d9cb0be38a8a3933aa38cab3bd887 | [
"MIT"
] | null | null | null | app/gul/data/session.py | yellow-sem/yellow | 96c3f7f4db1d9cb0be38a8a3933aa38cab3bd887 | [
"MIT"
] | null | null | null | app/gul/data/session.py | yellow-sem/yellow | 96c3f7f4db1d9cb0be38a8a3933aa38cab3bd887 | [
"MIT"
] | null | null | null | from urllib.parse import urljoin, urlparse, parse_qs, urlencode
import re
import requests
import bs4
from gul.data.utils import data_from_cookiejar, cookiejar_from_data
class Credentials(object):
"""Auth credentials."""
def __init__(self, username=None, password=None):
self.username = username
... | 25.616071 | 78 | 0.58679 |
f71ace2c76abb44e4261efab937f353dece55020 | 418 | py | Python | mrp_system/migrations/0037_billofmaterials_amount.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | 1 | 2018-11-09T02:09:14.000Z | 2018-11-09T02:09:14.000Z | mrp_system/migrations/0037_billofmaterials_amount.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | mrp_system/migrations/0037_billofmaterials_amount.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2019-01-11 14:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mrp_system', '0036_auto_20190111_1357'),
]
operations = [
migrations.AddField(
model_name='billofmaterials',
name='a... | 22 | 72 | 0.614833 |
e4f4eef969e93fd7068c64fe1f254c1893531e5d | 2,041 | py | Python | test/ffmpeg-qsv/vpp/saturation.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 19 | 2019-03-05T01:59:05.000Z | 2022-01-11T15:31:49.000Z | test/ffmpeg-qsv/vpp/saturation.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 213 | 2019-01-29T18:44:05.000Z | 2022-03-30T05:57:04.000Z | test/ffmpeg-qsv/vpp/saturation.py | Bin-CI/vaapi-fits | 9c43ea65f7fe99f11fa3c49bb14d30f5de09f010 | [
"BSD-3-Clause"
] | 26 | 2019-01-29T05:21:22.000Z | 2022-02-09T00:57:35.000Z | ###
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from ....lib.ffmpeg.qsv.util import *
from ....lib.ffmpeg.qsv.vpp import VppTest
spec = load_test_spec("vpp", "saturation")
spec_r2r = load_test_spec("vpp", "saturation", "r2r")
@slash.requ... | 31.890625 | 82 | 0.625184 |
27375651023a6b69cf870a1f2d685384317197c1 | 4,968 | py | Python | dwa_planer.py | tt1248163264/2d_car | 0251584dad3322a69de070374245ca3be0d2ab6c | [
"MIT"
] | null | null | null | dwa_planer.py | tt1248163264/2d_car | 0251584dad3322a69de070374245ca3be0d2ab6c | [
"MIT"
] | null | null | null | dwa_planer.py | tt1248163264/2d_car | 0251584dad3322a69de070374245ca3be0d2ab6c | [
"MIT"
] | null | null | null | '''
给出当前机器人的:观测状态、目标点信息、机器人状态
计算出给定时间内的预测轨迹、目标代价、障碍物代价等,选择最合适的动作
TODO 需要有一个策略:
- 当距离障碍物较近时(被多个障碍物困住时,适当降低)
- 改变整体框架,使之能够适应临时的路径规划
'''
import math
import numpy as np
import matplotlib.pyplot as plt
import time
import pygame
from pygame_car_env import CarEnv, liner_velocity, angular_velocity
#Config information
MIN_SPE... | 26.709677 | 88 | 0.57649 |
f689dd24daa81ac7755e17783d5b6d9a6581b9e2 | 1,189 | py | Python | src/pandas_profiling/report/structure/variables/render_generic.py | anurag-gandhi/pandas-profiling | 2373f3a299264f7b312dbe4b92edc14d36e8140e | [
"MIT"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | src/pandas_profiling/report/structure/variables/render_generic.py | anurag-gandhi/pandas-profiling | 2373f3a299264f7b312dbe4b92edc14d36e8140e | [
"MIT"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | src/pandas_profiling/report/structure/variables/render_generic.py | anurag-gandhi/pandas-profiling | 2373f3a299264f7b312dbe4b92edc14d36e8140e | [
"MIT"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | from pandas_profiling.report.presentation.core import (
HTML,
Container,
Table,
VariableInfo,
)
def render_generic(summary):
template_variables = {} # render_common(summary)
info = VariableInfo(
anchor_id=summary["varid"],
warnings=summary["warnings"],
var_type="Unsup... | 25.297872 | 72 | 0.464256 |
b01f53046481f51713d500681ac6ab77bbf88071 | 6,806 | py | Python | stable_baselines3/common/evaluation.py | bstee615/stable-baselines3 | 943023bb2fdd47263f027bf59b5b6d4f3e0784c3 | [
"MIT"
] | null | null | null | stable_baselines3/common/evaluation.py | bstee615/stable-baselines3 | 943023bb2fdd47263f027bf59b5b6d4f3e0784c3 | [
"MIT"
] | null | null | null | stable_baselines3/common/evaluation.py | bstee615/stable-baselines3 | 943023bb2fdd47263f027bf59b5b6d4f3e0784c3 | [
"MIT"
] | null | null | null | import time
import warnings
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import gym
import numpy as np
from stable_baselines3.common import base_class
from stable_baselines3.common.vec_env import VecEnv
def unwrap_adv_action_space(env):
if not hasattr(env, 'adv_action_space'):
if ... | 44.48366 | 124 | 0.653541 |
feb3303117e25a30e3855bad87b67cb749eaaad8 | 2,918 | py | Python | CRNN100/code/run_experiments.py | tisssu10086/Gibbon_call_detection | bb795594f2b8d526621fcb445018d648d56b6dc9 | [
"MIT"
] | null | null | null | CRNN100/code/run_experiments.py | tisssu10086/Gibbon_call_detection | bb795594f2b8d526621fcb445018d648d56b6dc9 | [
"MIT"
] | null | null | null | CRNN100/code/run_experiments.py | tisssu10086/Gibbon_call_detection | bb795594f2b8d526621fcb445018d648d56b6dc9 | [
"MIT"
] | null | null | null |
import matplotlib.pyplot as plt
import gc
import os
import pickle
import numpy as np
from pathlib import Path
import time
import nn_function
import dataset
import label_matching
import post_process
import cnn_gru_structure
import nn_cv
##############################################
#load file dictionary
file_dic =... | 29.474747 | 145 | 0.60281 |
2204f13c172d0ec1296af09e95fe09debfeae767 | 82,188 | py | Python | test/ext/test_associationproxy.py | seddonym/sqlalchemy | 7405392299492c83e6fa1546d3b36f52042e3c5e | [
"MIT"
] | null | null | null | test/ext/test_associationproxy.py | seddonym/sqlalchemy | 7405392299492c83e6fa1546d3b36f52042e3c5e | [
"MIT"
] | null | null | null | test/ext/test_associationproxy.py | seddonym/sqlalchemy | 7405392299492c83e6fa1546d3b36f52042e3c5e | [
"MIT"
] | null | null | null | from sqlalchemy.testing import eq_, assert_raises, is_
import copy
import pickle
from sqlalchemy import Integer, ForeignKey, String, or_, MetaData
from sqlalchemy.orm import relationship, configure_mappers, mapper, Session,\
collections, sessionmaker, aliased, clear_mappers, create_session
from sqlalchemy import e... | 31.647285 | 79 | 0.538497 |
703a39382adaa5e2f2f43c97326956f31a51a125 | 774 | py | Python | setup.py | atlasacademy/hcapy | 758a208c551da3e1688971aa828e9e4a3d6a3e6f | [
"MIT"
] | null | null | null | setup.py | atlasacademy/hcapy | 758a208c551da3e1688971aa828e9e4a3d6a3e6f | [
"MIT"
] | null | null | null | setup.py | atlasacademy/hcapy | 758a208c551da3e1688971aa828e9e4a3d6a3e6f | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages, Extension
from Cython.Build import build_ext, cythonize
with open('README.md', encoding='utf8') as f:
readme = f.read()
with open('LICENSE', encoding='utf8') as f:
li = f.read()
setup(
name='hcapy',
version='0.0.2',
description='hca2wav wrapper working... | 27.642857 | 91 | 0.664083 |
e0cedb6669e0ad2b1ca41f5f048dcc719101304c | 4,940 | py | Python | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/update_member_vmr_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/update_member_vmr_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/update_member_vmr_request.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class UpdateMemberVmrRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the v... | 26.137566 | 84 | 0.573279 |
bc6c0b5cec05cfa221a53e955061b1a5b2ea731a | 1,294 | py | Python | frontier/presets/Vue.py | oboynitro/django-frontier | 89bec0199aadcc5e976a1cc42ad9284603f6439a | [
"MIT"
] | 16 | 2020-11-14T15:51:26.000Z | 2021-06-29T19:43:35.000Z | frontier/presets/Vue.py | oboynitro/django-frontier | 89bec0199aadcc5e976a1cc42ad9284603f6439a | [
"MIT"
] | null | null | null | frontier/presets/Vue.py | oboynitro/django-frontier | 89bec0199aadcc5e976a1cc42ad9284603f6439a | [
"MIT"
] | 1 | 2020-11-19T05:14:16.000Z | 2020-11-19T05:14:16.000Z | from pathlib import Path
import shutil
from frontier.utils import prepare_scaffold
from .Preset import update_packages
class Vue():
def install(self, resource_path, base_dir):
prepare_scaffold(base_dir, resource_path)
components_dir = resource_path / "js"
base_packages_path = Path.joinpath... | 35.944444 | 66 | 0.583462 |
81170b0f8eacd2667e1f72e270b44bd90d3d5084 | 21,645 | py | Python | test/functional/test_framework/util.py | ankur-maximos/JattCoin | 0e053d1e7a46d2906c7b643cc8ef0fc73b927690 | [
"MIT"
] | null | null | null | test/functional/test_framework/util.py | ankur-maximos/JattCoin | 0e053d1e7a46d2906c7b643cc8ef0fc73b927690 | [
"MIT"
] | null | null | null | test/functional/test_framework/util.py | ankur-maximos/JattCoin | 0e053d1e7a46d2906c7b643cc8ef0fc73b927690 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from base64 import b64encode
from binascii import hexlify,... | 38.040422 | 119 | 0.650866 |
fffe52fbc9cb8085298239e829366a00b70a6a3d | 21,849 | py | Python | _BACKUPS_V4/v4_1/LightPicture.py | nagame/LightPicture | f9b00a39bc16aea4abac60c0dd0aab2acac5adcf | [
"Unlicense"
] | null | null | null | _BACKUPS_V4/v4_1/LightPicture.py | nagame/LightPicture | f9b00a39bc16aea4abac60c0dd0aab2acac5adcf | [
"Unlicense"
] | null | null | null | _BACKUPS_V4/v4_1/LightPicture.py | nagame/LightPicture | f9b00a39bc16aea4abac60c0dd0aab2acac5adcf | [
"Unlicense"
] | null | null | null | """ VERSION INFO
Current:
v_4_1
Added TriangleMeshBuilder class
Integrated TriangleMesh and 3mfFileWriter classes into the TriangleMeshBuilder
!! see test_create_sample_file in unit test file
!! for a quick reference and wirking example
History:... | 36.11405 | 120 | 0.547851 |
5b0a28be82714169ec7779f1c8d5a3ee112203bb | 1,086 | py | Python | lib/fmd/getaction.py | GonzaloAlvarez/py-ga-sysadmin | fbbbbcad36df9f1b3e40328ff48c22bad13a56f4 | [
"MIT"
] | 2 | 2018-01-05T15:32:06.000Z | 2021-06-02T13:15:05.000Z | lib/fmd/getaction.py | GonzaloAlvarez/devops-tools | fbbbbcad36df9f1b3e40328ff48c22bad13a56f4 | [
"MIT"
] | 67 | 2017-01-09T19:39:19.000Z | 2018-02-28T05:33:40.000Z | lib/fmd/getaction.py | GonzaloAlvarez/devops-tools | fbbbbcad36df9f1b3e40328ff48c22bad13a56f4 | [
"MIT"
] | null | null | null | import os
from lib.fmd.workflow import FileManagementWorkflow
from lib.fmd.decorators import GetStage, ListStage
from lib.file.tmpfile import TemporaryFile
class GetAction(object):
def execute(self, context):
fadm = FileManagementWorkflow()
if context.fid == "all":
context.log.status('G... | 41.769231 | 113 | 0.621547 |
c6f1d9577c9f0850dfcdb25806cae6e1b5775ae3 | 6,479 | py | Python | test/test_random_tester.py | nbremond/agilkia | 64b8f863b04189331bf69653a4e1ecdef802954b | [
"MIT"
] | null | null | null | test/test_random_tester.py | nbremond/agilkia | 64b8f863b04189331bf69653a4e1ecdef802954b | [
"MIT"
] | null | null | null | test/test_random_tester.py | nbremond/agilkia | 64b8f863b04189331bf69653a4e1ecdef802954b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Unit tests for the RandomTester class.
TODO:
* test the ML test generator
@author: utting@usc.edu.au
"""
import unittest
import random
from pathlib import Path
import sklearn.utils.estimator_checks
import agilkia
THIS_DIR = Path(__file__).parent
WSDL_EG = "http://www.soapclient.com/... | 40.748428 | 91 | 0.611514 |
18d2cd8a6097497dced6dafa231ac7fdfcdafb28 | 1,957 | py | Python | _CNDB/_OMP/Wireless_Channel.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | _CNDB/_OMP/Wireless_Channel.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | _CNDB/_OMP/Wireless_Channel.py | CNDB/CNDB | 2e3a41111f604cf2f4f22a7c9370bb3f753e3e88 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2012 Mag. Christian Tanzer All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# #*** <License> ************************************************************#
# This module is part of the package CNDB.OMP.
#
# This module is licensed under the terms ... | 27.180556 | 85 | 0.579969 |
50b4cc1af3c424878d1a642e0caa0e4db12fd633 | 19,547 | py | Python | bowling.py | haliphax/pybowl | 716f811ba02b5d83d429fc713643d6ce14c77350 | [
"MIT"
] | 6 | 2016-04-07T00:30:30.000Z | 2022-03-14T05:25:25.000Z | bowling.py | haliphax/pybowl | 716f811ba02b5d83d429fc713643d6ce14c77350 | [
"MIT"
] | 2 | 2020-07-03T17:32:30.000Z | 2022-03-03T14:24:46.000Z | bowling.py | haliphax/pybowl | 716f811ba02b5d83d429fc713643d6ce14c77350 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"haliphax's crappy bowling game"
__author__ = 'haliphax <todd@roadha.us>'
def echo(text, flush=True):
"helper function for output"
from sys import stdout
stdout.write(text.encode('cp437'))
if flush:
stdout.flush()
class Bowling(object):
"class definition"
def... | 33.018581 | 80 | 0.406405 |
9d3ca0e05516190bfc355f79dbec4ed40cef28e7 | 1,761 | py | Python | interaction/vehicle.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | interaction/vehicle.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | interaction/vehicle.py | VictorDebray/RoadBuddy | 9c62e2acd2d540caa0ebefc50af5446c0d4f864f | [
"MIT"
] | null | null | null | # Author: DINDIN Meryll
# Date: 20 July 2019
# Project: RoadBuddy
import json
import argparse
import smartcar
class CarStatus:
def __init__(self, credentials='credentials/key_SMARTCAR.json'):
prm = ['read_odometer', 'read_location', 'read_battery']
with open(credentials) as raw: crd = json.l... | 29.847458 | 91 | 0.618399 |
3d9777903374ed66ca00f87a2c007792030d3279 | 17,420 | py | Python | ucscsdk/mometa/ident/IdentMetaSystem.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 9 | 2016-12-22T08:39:25.000Z | 2019-09-10T15:36:19.000Z | ucscsdk/mometa/ident/IdentMetaSystem.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 10 | 2017-01-31T06:59:56.000Z | 2021-11-09T09:14:37.000Z | ucscsdk/mometa/ident/IdentMetaSystem.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | 13 | 2016-11-14T07:42:58.000Z | 2022-02-10T17:32:05.000Z | """This module contains the general information for IdentMetaSystem ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class IdentMetaSystemConsts():
FSM_PREV_NOP = "nop"
FSM_PREV_SYNC_BEGIN = "syncBegin"
... | 88.877551 | 2,742 | 0.756315 |
68e2608856ccb6c805e68e62c781b4ea6769633c | 4,200 | py | Python | flask_sketch/handlers/config_handler.py | ericsouza/flask-sketch | 65625a567e5492b3787c5da3ba5e12b1473783c4 | [
"MIT"
] | 11 | 2020-08-19T14:33:00.000Z | 2021-05-29T17:12:47.000Z | flask_sketch/handlers/config_handler.py | ericsouza/flask-sketch | 65625a567e5492b3787c5da3ba5e12b1473783c4 | [
"MIT"
] | 3 | 2021-03-16T19:33:39.000Z | 2021-03-18T18:53:55.000Z | flask_sketch/handlers/config_handler.py | ericsouza/flask-sketch | 65625a567e5492b3787c5da3ba5e12b1473783c4 | [
"MIT"
] | 2 | 2020-08-19T14:33:11.000Z | 2020-09-16T19:34:16.000Z | from collections import OrderedDict
import toml
from os.path import join as pjoin
from flask_sketch import templates
from flask_sketch.sketch import Sketch, FlaskSketchTomlEncoder
from flask_sketch.const import requirements as reqs
from flask_sketch.utils import GenericHandler
def sort_settings(settings: dict):
s... | 32.307692 | 79 | 0.619762 |
79169e0bf793347defdbd2b590a3fa3f6da3d575 | 1,287 | py | Python | quantum-ugly-duckling-main/discord_bot.py | rochisha0/quantum-ugly-duckling | 9cd3164b49240a2342172c8c09950f1f51904793 | [
"Apache-2.0"
] | 11 | 2020-10-08T15:26:11.000Z | 2021-05-02T21:25:26.000Z | quantum-ugly-duckling-main/discord_bot.py | rochisha0/quantum-ugly-duckling | 9cd3164b49240a2342172c8c09950f1f51904793 | [
"Apache-2.0"
] | null | null | null | quantum-ugly-duckling-main/discord_bot.py | rochisha0/quantum-ugly-duckling | 9cd3164b49240a2342172c8c09950f1f51904793 | [
"Apache-2.0"
] | 4 | 2020-10-08T17:44:32.000Z | 2022-01-29T22:35:16.000Z | import discord
import json
import CloudDB
import nqrng
from cloudant.result import Result
global CONFIG
client = discord.Client()
token = ""
#import config file
with open('config.json', 'r') as f:
getFile = json.load(f)
global CONFIG
CONFIG = getFile["services"]["discord"][0]
token = CONFIG["token"]
#... | 22.982143 | 67 | 0.648796 |
4f673a3bb2893f29cf73eb9ec7ac7ab3df6fd623 | 4,335 | py | Python | utils/deformerutils.py | scott-techart/flottitools | b4e0aecfd50d26ed26059e046ed64973f5fca5bf | [
"MIT"
] | null | null | null | utils/deformerutils.py | scott-techart/flottitools | b4e0aecfd50d26ed26059e046ed64973f5fca5bf | [
"MIT"
] | null | null | null | utils/deformerutils.py | scott-techart/flottitools | b4e0aecfd50d26ed26059e046ed64973f5fca5bf | [
"MIT"
] | null | null | null | import pymel.core as pm
def create_wrap_deformer(influence_mesh, target_mesh, **kwargs):
"""
Ryan Roberts - Wrap Deformer
rr_wrap.py
Description:
Ryan Robers created a simple function to create a wrap deformer.
The wrap deformer needs a little more than the deform command to get workin... | 42.5 | 118 | 0.704268 |
e79f7526402c6f45ed7c899dcaf7c8427f5d7a62 | 209 | py | Python | map/urls.py | frenos/gpxmap | 1185b6a4fe0be35bcbeeb41758aaedaa1147827e | [
"MIT"
] | null | null | null | map/urls.py | frenos/gpxmap | 1185b6a4fe0be35bcbeeb41758aaedaa1147827e | [
"MIT"
] | null | null | null | map/urls.py | frenos/gpxmap | 1185b6a4fe0be35bcbeeb41758aaedaa1147827e | [
"MIT"
] | null | null | null | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.MapView.as_view(), name='Map'),
url(r'^(?P<gpxid>\d+)$', views.SpecificMapView.as_view(), name='specificMap'),
] | 23.222222 | 82 | 0.650718 |
f5193d6bded4dd676d0935e0c6d529a37be3fef0 | 6,580 | py | Python | pymdownx/__meta__.py | rkeulemans/pymdown-extensions | e809f20f672cc350e2cb2c6c2d86e8438f329765 | [
"MIT"
] | null | null | null | pymdownx/__meta__.py | rkeulemans/pymdown-extensions | e809f20f672cc350e2cb2c6c2d86e8438f329765 | [
"MIT"
] | 1 | 2021-02-07T05:27:54.000Z | 2021-02-07T05:27:54.000Z | pymdownx/__meta__.py | rkeulemans/pymdown-extensions | e809f20f672cc350e2cb2c6c2d86e8438f329765 | [
"MIT"
] | null | null | null | """Meta related things."""
from collections import namedtuple
import re
RE_VER = re.compile(
r'''(?x)
(?P<major>\d+)(?:\.(?P<minor>\d+))?(?:\.(?P<micro>\d+))?
(?:(?P<type>a|b|rc)(?P<pre>\d+))?
(?:\.post(?P<post>\d+))?
(?:\.dev(?P<dev>\d+))?
'''
)
REL_MAP = {
".dev": "",
".dev-alpha": "... | 34.631579 | 118 | 0.578723 |
0125586ef3957f8b0dc6510f4c05a1c04891095d | 1,197 | py | Python | customSDK/servicefabric/models/chaos_context.py | leikong/service-fabric-cli | 6ec1b1c8445b7cc5a889f3b172b47a6017c8888c | [
"MIT"
] | 1 | 2020-06-16T22:32:27.000Z | 2020-06-16T22:32:27.000Z | customSDK/servicefabric/models/chaos_context.py | leikong/service-fabric-cli | 6ec1b1c8445b7cc5a889f3b172b47a6017c8888c | [
"MIT"
] | null | null | null | customSDK/servicefabric/models/chaos_context.py | leikong/service-fabric-cli | 6ec1b1c8445b7cc5a889f3b172b47a6017c8888c | [
"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 ... | 34.2 | 80 | 0.607352 |
fcd5e39a7727013f7f307cde27292af4b4d8b5eb | 10,054 | py | Python | graphql/utilities/schema_printer.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | graphql/utilities/schema_printer.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | graphql/utilities/schema_printer.py | dfee/graphql-core-next | 1ada7146bd0510171ae931b68f6c77dbdf5d5c63 | [
"MIT"
] | null | null | null | import re
from itertools import chain
from typing import Any, Callable, Dict, List, Optional, Union, cast
from ..language import print_ast
from ..pyutils import is_invalid, is_nullish
from ..type import (
DEFAULT_DEPRECATION_REASON, GraphQLArgument,
GraphQLDirective, GraphQLEnumType, GraphQLEnumValue, GraphQLF... | 35.031359 | 79 | 0.658842 |
4726b4db1a5bf178af7fc2f71eb1a0498a77cd03 | 2,081 | py | Python | notebooks/cuIndicator/viz/keltner_channel.py | msadang/gQuant | d1449c4882dbcd723632553c0ad1573080c60d4c | [
"Apache-2.0"
] | 1 | 2021-07-09T14:49:08.000Z | 2021-07-09T14:49:08.000Z | notebooks/cuIndicator/viz/keltner_channel.py | msadang/gQuant | d1449c4882dbcd723632553c0ad1573080c60d4c | [
"Apache-2.0"
] | null | null | null | notebooks/cuIndicator/viz/keltner_channel.py | msadang/gQuant | d1449c4882dbcd723632553c0ad1573080c60d4c | [
"Apache-2.0"
] | 2 | 2021-11-02T09:14:59.000Z | 2022-01-05T21:43:47.000Z | import ipywidgets as widgets
from bqplot import Axis, Figure, LinearScale, Lines
from gquant.cuindicator import keltner_channel as indicator_fun # noqa #F401
def get_para_widgets():
para_selector = widgets.IntSlider(min=2, max=60,
description="Keltner Channel")
para_sele... | 36.508772 | 79 | 0.620855 |
35350273c6aae8e207c3c56b7f0d19a15cb7f1f4 | 1,299 | py | Python | models/windows_information_protection_resource_collection.py | MIchaelMainer/msgraph-v10-models-python | adad66363ebe151be2332f3ef74a664584385748 | [
"MIT"
] | 1 | 2021-03-07T07:02:22.000Z | 2021-03-07T07:02:22.000Z | models/windows_information_protection_resource_collection.py | MIchaelMainer/msgraph-v10-models-python | adad66363ebe151be2332f3ef74a664584385748 | [
"MIT"
] | null | null | null | models/windows_information_protection_resource_collection.py | MIchaelMainer/msgraph-v10-models-python | adad66363ebe151be2332f3ef74a664584385748 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
# Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
#
# This file was generated and any changes will be overwritten.
'''
from __future__ import unicode_literals
from ..one_drive_object_bas... | 25.470588 | 151 | 0.614319 |
9c6e7e29da28cdd9c887ab327c33ad426860187e | 1,571 | py | Python | examples/demo.py | sofroniewn/napari-detectron2 | c45839e0729825e8c1943446bfd51590ec1fb8f5 | [
"BSD-3-Clause"
] | null | null | null | examples/demo.py | sofroniewn/napari-detectron2 | c45839e0729825e8c1943446bfd51590ec1fb8f5 | [
"BSD-3-Clause"
] | null | null | null | examples/demo.py | sofroniewn/napari-detectron2 | c45839e0729825e8c1943446bfd51590ec1fb8f5 | [
"BSD-3-Clause"
] | null | null | null | import napari
from cv2 import imread
# import some common detectron2 utilities
from detectron2 import model_zoo
from detectron2.engine import DefaultPredictor
from detectron2.config import get_cfg
from detectron2.data import MetadataCatalog
USE_DETECTRON = False
if USE_DETECTRON:
from detectron2.utils.visualizer... | 34.911111 | 120 | 0.779758 |
82e6ab16bd2547a36e6035a5320b5b0d3aed9624 | 399 | py | Python | tests/test_models.py | mcldev/django-connected | 7ec1f042786fef2eb6c00b1479ce47c90341ba81 | [
"BSD-3-Clause"
] | 36 | 2015-06-01T12:42:56.000Z | 2020-02-13T21:06:20.000Z | tests/test_models.py | mcldev/django-connected | 7ec1f042786fef2eb6c00b1479ce47c90341ba81 | [
"BSD-3-Clause"
] | 4 | 2015-12-14T13:33:38.000Z | 2017-01-31T12:22:58.000Z | tests/test_models.py | mcldev/django-connected | 7ec1f042786fef2eb6c00b1479ce47c90341ba81 | [
"BSD-3-Clause"
] | 7 | 2015-12-14T11:14:41.000Z | 2020-05-21T08:25:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_django-connected
------------
Tests for `django-connected` models module.
"""
import os
import shutil
from django.test import TestCase
from connected_accounts.models import Account
class TestConnectedAccounts(TestCase):
def setUp(self):
pass
... | 13.758621 | 45 | 0.659148 |
39ab18e54993487c465832baa08496d3102e5df0 | 8,650 | py | Python | src/robot/parsing/populators.py | vandofb/robotframework-fork | 7eba3f9899c00de3cfeee3e770edd149c33804b0 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2018-04-20T09:34:31.000Z | 2018-08-10T15:10:18.000Z | src/robot/parsing/populators.py | vandofb/robotframework-fork | 7eba3f9899c00de3cfeee3e770edd149c33804b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/parsing/populators.py | vandofb/robotframework-fork | 7eba3f9899c00de3cfeee3e770edd149c33804b0 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2016-02-29T15:42:22.000Z | 2018-05-08T08:58:18.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 38.963964 | 91 | 0.630751 |
a8fad888e1a29dc846c125e6756d76580829fc5a | 1,177 | py | Python | make_ph_kernel_list_dk.py | OminiaVincit/scale-variant-topo | 6945bc42aacd0d71a6fb472c87e09da223821e1e | [
"MIT"
] | 8 | 2018-11-09T21:59:59.000Z | 2020-07-22T19:02:10.000Z | make_ph_kernel_list_dk.py | OminiaVincit/scale-variant-topo | 6945bc42aacd0d71a6fb472c87e09da223821e1e | [
"MIT"
] | null | null | null | make_ph_kernel_list_dk.py | OminiaVincit/scale-variant-topo | 6945bc42aacd0d71a6fb472c87e09da223821e1e | [
"MIT"
] | null | null | null | import numpy as np
import glob
import os
import argparse
import re
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--parent', '-p', type=str, required=True)
parser.add_argument('--data', '-d', type=str, default='BA')
parser.add_argument('--midx', '-m', type=int, defa... | 34.617647 | 96 | 0.551402 |
8d0fa39f833b2655bbadc295e56f53a6aaa0aabf | 258 | py | Python | discountitem/config/desktop.py | Ridhosribumi/discountitem | fc582bf0cfc4c3676f7b94363436ad5131e91a33 | [
"MIT"
] | null | null | null | discountitem/config/desktop.py | Ridhosribumi/discountitem | fc582bf0cfc4c3676f7b94363436ad5131e91a33 | [
"MIT"
] | null | null | null | discountitem/config/desktop.py | Ridhosribumi/discountitem | fc582bf0cfc4c3676f7b94363436ad5131e91a33 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"module_name": "Discount Item",
"color": "#B10DC9",
"icon": "fa fa-plus",
"type": "module",
"label": _("Discount Item")
}
]
| 17.2 | 39 | 0.596899 |
a966ac26d6febd445c762318044f00e6caa7be0b | 20,875 | py | Python | LayoutIO.py | yjleeeeee/laygo | 6f1dd1f63e877a95a4df1c03ce506408a393c29c | [
"BSD-2-Clause"
] | 26 | 2017-07-07T08:06:31.000Z | 2021-11-25T06:41:24.000Z | LayoutIO.py | yjleeeeee/laygo | 6f1dd1f63e877a95a4df1c03ce506408a393c29c | [
"BSD-2-Clause"
] | 9 | 2016-12-28T03:08:29.000Z | 2019-01-30T16:00:28.000Z | LayoutIO.py | yjleeeeee/laygo | 6f1dd1f63e877a95a4df1c03ce506408a393c29c | [
"BSD-2-Clause"
] | 10 | 2018-07-14T01:31:28.000Z | 2021-08-21T10:18:30.000Z | #!/usr/bin/python
########################################################################################################################
#
# Copyright (c) 2014, Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permi... | 44.040084 | 130 | 0.543377 |
4511ca398c8cc48c495b02f1346770593d5bfbc8 | 7,096 | py | Python | src/sentry/runner/commands/run.py | seukjung/sentry-custom | c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963 | [
"BSD-3-Clause"
] | 1 | 2021-08-10T06:07:13.000Z | 2021-08-10T06:07:13.000Z | src/sentry/runner/commands/run.py | seukjung/sentry-custom | c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963 | [
"BSD-3-Clause"
] | 8 | 2019-12-28T23:49:55.000Z | 2022-03-02T04:34:18.000Z | src/sentry/runner/commands/run.py | seukjung/sentry-custom | c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963 | [
"BSD-3-Clause"
] | 1 | 2017-04-08T04:09:18.000Z | 2017-04-08T04:09:18.000Z | """
sentry.runner.commands.run
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import sys
from multiprocessing import cpu_count
import click
from sentry.runner.de... | 34.446602 | 109 | 0.638247 |
33184141b1470aac5366d076482c328330296029 | 1,023 | py | Python | flare/md.py | jonpvandermause/flare | 494e02395b250ae9052575e0e60aefb33bea1243 | [
"MIT"
] | null | null | null | flare/md.py | jonpvandermause/flare | 494e02395b250ae9052575e0e60aefb33bea1243 | [
"MIT"
] | null | null | null | flare/md.py | jonpvandermause/flare | 494e02395b250ae9052575e0e60aefb33bea1243 | [
"MIT"
] | null | null | null | import numpy as np
def update_positions(dt, noa, structure):
dtdt = dt ** 2
new_pos = np.zeros((noa, 3))
for i, pre_pos in enumerate(structure.prev_positions):
mass = structure.mass_dict[structure.species_labels[i]]
pos = structure.positions[i]
forces = structure.forces[i]
... | 27.648649 | 68 | 0.610948 |
13af89f654b7f91d311010e82c7a36862914011a | 10,857 | py | Python | ietf/ydk/models/ietf/ietf_restconf_monitoring.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | ietf/ydk/models/ietf/ietf_restconf_monitoring.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | ietf/ydk/models/ietf/ietf_restconf_monitoring.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ ietf_restconf_monitoring
This module contains monitoring information for the
RESTCONF protocol.
Copyright (c) 2016 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and su... | 36.069767 | 250 | 0.561665 |
2bfb1ddf7a4d3c201a2f1eb4fb9317913ffa2e88 | 10,005 | py | Python | setup.py | pexip/os-python-autobahn | 783a6132a6767e6ac958926ffa98e239af7c010a | [
"MIT"
] | 1 | 2021-07-07T11:19:49.000Z | 2021-07-07T11:19:49.000Z | setup.py | gruns/autobahn-python | 3dbea62675247a9d15626aebe9cafc4b1182d8d9 | [
"MIT"
] | null | null | null | setup.py | gruns/autobahn-python | 3dbea62675247a9d15626aebe9cafc4b1182d8d9 | [
"MIT"
] | 1 | 2020-11-24T10:13:29.000Z | 2020-11-24T10:13:29.000Z | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# 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 ... | 36.514599 | 109 | 0.613593 |
a83aa2b61cb726ad1474cc0c7469ec38ecc7a499 | 10,752 | py | Python | lib/binutils/disasm.py | sudachen/python-tool-legacy | f371f49ff09bed1a4e519e300a290f4e548be1ce | [
"MIT"
] | 1 | 2016-05-08T06:07:48.000Z | 2016-05-08T06:07:48.000Z | lib/binutils/disasm.py | alexeysudachen/python-tool-legacy | f371f49ff09bed1a4e519e300a290f4e548be1ce | [
"MIT"
] | null | null | null | lib/binutils/disasm.py | alexeysudachen/python-tool-legacy | f371f49ff09bed1a4e519e300a290f4e548be1ce | [
"MIT"
] | 3 | 2020-10-16T10:11:51.000Z | 2021-07-13T19:16:59.000Z | # -*- coding: cp1251 -*-
"""
(c)2008, Alexey Sudachen, alexey@sudachen.name
http://www.ethical-hacker.info/
The part of binutils package
There is front-end to the udi86 library
http://sourceforge.net/projects/udis86
"""
import _udis86
class x86_Instruction(object):
__slots__ = [
'mnemonic',
'op... | 16.490798 | 95 | 0.738932 |
cb753fb272433e7f28f4b7e517fa622cfc648bc5 | 4,624 | py | Python | test/functional/mempool_reorg.py | raymaker/deft | 8d5d3f65828b52f5df6661786a271b6144b2cc32 | [
"MIT"
] | 7 | 2018-06-02T06:48:59.000Z | 2018-10-27T15:51:38.000Z | test/functional/mempool_reorg.py | raymaker/deft | 8d5d3f65828b52f5df6661786a271b6144b2cc32 | [
"MIT"
] | 6 | 2018-06-01T13:59:13.000Z | 2019-07-27T10:12:19.000Z | test/functional/mempool_reorg.py | deftchain/deft | 8d5d3f65828b52f5df6661786a271b6144b2cc32 | [
"MIT"
] | 5 | 2018-06-21T16:42:45.000Z | 2021-09-23T06:47:17.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Deft developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool re-org scenarios.
Test re-org scenarios with a mempool that contains transactions
that spend (dir... | 47.183673 | 122 | 0.690528 |
888bc2aa6762dd6b98cae8f0c126508314c0fa09 | 403 | py | Python | main.py | chell0veck/planner | c8433f6bf500c3c4dbddbcba7f2b94cbc2868a99 | [
"MIT"
] | 1 | 2019-05-14T07:59:55.000Z | 2019-05-14T07:59:55.000Z | main.py | chell0veck/planner | c8433f6bf500c3c4dbddbcba7f2b94cbc2868a99 | [
"MIT"
] | 7 | 2019-05-13T16:46:53.000Z | 2019-05-28T21:48:32.000Z | main.py | chell0veck/planner | c8433f6bf500c3c4dbddbcba7f2b94cbc2868a99 | [
"MIT"
] | null | null | null | from utils import load_artist_from_file
from config import ARTISTS, SKIP_COUNTRIES
import songkick as sk
from datatypes import Event, EventProcessor
from models import view_by_group
artists = load_artist_from_file(ARTISTS)
events = [Event(**event) for event in sk.load_events()]
#
e = EventProcessor(events).process()
#... | 28.785714 | 55 | 0.789082 |
cdf0a493971d98161654e00c0e2aacb132328794 | 8,575 | py | Python | docs/conf.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | 4 | 2018-04-25T15:12:46.000Z | 2018-06-28T11:30:43.000Z | docs/conf.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | 1 | 2020-03-02T14:52:32.000Z | 2020-03-02T14:52:32.000Z | docs/conf.py | hbmartin/pex | a4c5d96e16dac892a6d84b02bdb3c0b8e14e9e1b | [
"Apache-2.0"
] | 6 | 2017-06-19T23:23:18.000Z | 2021-12-20T21:39:43.000Z | # -*- coding: utf-8 -*-
#
# pex documentation build configuration file, created by
# sphinx-quickstart on Fri Jul 25 15:16:37 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | 30.845324 | 79 | 0.719417 |
bc0d3c81632cf80267ffbde4f8df4834a58669ce | 797 | py | Python | recipes/Python/502203_Hex_Dumper/recipe-502203.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/502203_Hex_Dumper/recipe-502203.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/502203_Hex_Dumper/recipe-502203.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | import os
import sys
PRINT = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abc\
defghijklmnopqrstuvwxyz{|}~'
def main():
try:
data = open(sys.argv[1], 'rb')
for number in xrange(0, os.path.getsize(sys.argv[1]), 16):
part = data.read(16)
sys.stdout.writ... | 29.518519 | 80 | 0.500627 |
a217af3abded4bdec44416d752c37c09f6b2f6a3 | 1,525 | py | Python | src/server/endpoints/e_auth_login.py | Muck-Man/muck.gg-api | 7a83b41cec17f5dfda6fd89e8952a89d1c36a430 | [
"MIT"
] | null | null | null | src/server/endpoints/e_auth_login.py | Muck-Man/muck.gg-api | 7a83b41cec17f5dfda6fd89e8952a89d1c36a430 | [
"MIT"
] | null | null | null | src/server/endpoints/e_auth_login.py | Muck-Man/muck.gg-api | 7a83b41cec17f5dfda6fd89e8952a89d1c36a430 | [
"MIT"
] | null | null | null | from server.rest.endpoint import Endpoint
from server.rest.invalidusage import InvalidUsage
from server.rest.response import Response
class RestEndpoint(Endpoint):
def __init__(self, server):
super().__init__()
self.server = server
self.path = '/auth/login'
async def post(self, request):
try:
data = sel... | 35.465116 | 102 | 0.676066 |
559b9b190c21ea0a5c2658a5d5a022729c904080 | 17,898 | py | Python | sktime/contrib/vector_classifiers/_rotation_forest.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | 1 | 2019-12-23T16:57:14.000Z | 2019-12-23T16:57:14.000Z | sktime/contrib/vector_classifiers/_rotation_forest.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | sktime/contrib/vector_classifiers/_rotation_forest.py | Rubiel1/sktime | 2fd2290fb438224f11ddf202148917eaf9b73a87 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""RotationForest vector classifier.
Rotation Forest, sktime implementation for continuous values only.
"""
__author__ = ["MatthewMiddlehurst"]
__all__ = ["RotationForest"]
import time
import numpy as np
import pandas as pd
from joblib import Parallel, delayed
from sklearn.base import BaseEs... | 34.753398 | 92 | 0.576545 |
fca69c3f2b0d66208f296aeab04b6f3e42380891 | 5,168 | py | Python | web/config/settings/production.py | rattletat/rattletat.com | 37b92400d6fec40dbeeb355d6e40fc4690a18e81 | [
"CC-BY-4.0"
] | null | null | null | web/config/settings/production.py | rattletat/rattletat.com | 37b92400d6fec40dbeeb355d6e40fc4690a18e81 | [
"CC-BY-4.0"
] | 1 | 2020-07-20T14:35:01.000Z | 2020-07-20T14:35:01.000Z | web/config/settings/production.py | rattletat/rattletat.com | 37b92400d6fec40dbeeb355d6e40fc4690a18e81 | [
"CC-BY-4.0"
] | null | null | null | from .base import * # noqa
from .base import env
# import os
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#secret-key
SECRET_KEY = env("DJANGO_SECRET_KEY")
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-h... | 44.17094 | 89 | 0.637577 |
43093487c023fc4a7fb70a1a5ebe3f123796afc2 | 1,296 | py | Python | dev/archery/archery/release/reports.py | davisusanibar/arrow | 07ac9fd86c6225f493943e4ab0ff35b0fdbfb2ae | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 1 | 2021-11-24T04:43:52.000Z | 2021-11-24T04:43:52.000Z | dev/archery/archery/release/reports.py | davisusanibar/arrow | 07ac9fd86c6225f493943e4ab0ff35b0fdbfb2ae | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 1 | 2022-02-02T04:19:17.000Z | 2022-02-02T04:19:17.000Z | dev/archery/archery/release/reports.py | davisusanibar/arrow | 07ac9fd86c6225f493943e4ab0ff35b0fdbfb2ae | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 28.173913 | 62 | 0.676698 |
1046d5d3fafc6a4d16d229230bd2ef24eb9d1596 | 2,850 | py | Python | caption/model.py | josherich/CSS2Code | 6081cba953d9379581208d4d5d4c51e9baaa7d9d | [
"MIT"
] | 2 | 2018-12-06T08:57:00.000Z | 2019-10-15T07:23:04.000Z | caption/model.py | josherich/CSS2Code | 6081cba953d9379581208d4d5d4c51e9baaa7d9d | [
"MIT"
] | 1 | 2019-09-24T03:42:48.000Z | 2019-09-24T03:42:48.000Z | caption/model.py | josherich/CSS2Code | 6081cba953d9379581208d4d5d4c51e9baaa7d9d | [
"MIT"
] | 1 | 2019-03-18T06:22:21.000Z | 2019-03-18T06:22:21.000Z | import torch
import torch.nn as nn
import torchvision.models as models
from torch.nn.utils.rnn import pack_padded_sequence
class EncoderCNN(nn.Module):
def __init__(self, embed_size):
"""Load the pretrained ResNet-152 and replace top fc layer."""
super(EncoderCNN, self).__init__()
resnet =... | 46.721311 | 108 | 0.635439 |
717ea89e7e224e815d1a09dfe21c53033f3aecd7 | 1,607 | py | Python | tests_functional/tests_messaging/test_link_enrich.py | brailovskiy/grpc-test | 70eeb7e6fb68a6257bf549a7927c270a89cbe6c2 | [
"MIT"
] | null | null | null | tests_functional/tests_messaging/test_link_enrich.py | brailovskiy/grpc-test | 70eeb7e6fb68a6257bf549a7927c270a89cbe6c2 | [
"MIT"
] | null | null | null | tests_functional/tests_messaging/test_link_enrich.py | brailovskiy/grpc-test | 70eeb7e6fb68a6257bf549a7927c270a89cbe6c2 | [
"MIT"
] | null | null | null | import allure
import pytest
from hamcrest import assert_that, is_
@allure.issue("SAN-12", "Link enrich")
@pytest.mark.parametrize('d_user', ["2 users"], indirect=True)
class TestEnrichLink:
""" Tests for enriching links"""
@allure.title("Test for enrich link without picture")
@allure.testcase("XTE-35", "... | 42.289474 | 99 | 0.60921 |
433b0c9687cc5a88bec2ba0d0d1860cb30af0aae | 43,713 | py | Python | bikeshed/boilerplate.py | saschanaz/bikeshed | fb1e763a4f49852a7dabe8d783c6980416b238ef | [
"CC0-1.0"
] | null | null | null | bikeshed/boilerplate.py | saschanaz/bikeshed | fb1e763a4f49852a7dabe8d783c6980416b238ef | [
"CC0-1.0"
] | null | null | null | bikeshed/boilerplate.py | saschanaz/bikeshed | fb1e763a4f49852a7dabe8d783c6980416b238ef | [
"CC0-1.0"
] | null | null | null | import copy
import os
import re
import subprocess
from collections import OrderedDict, defaultdict
from datetime import datetime
from . import biblio, conditional, config, dfnpanels, h, messages as m, refs as r, retrieve
from .DefaultOrderedDict import DefaultOrderedDict
def boilerplateFromHtml(doc, htmlString):
... | 36.186258 | 153 | 0.530003 |
e92b76db641841ccb8b8f3c11eb6ac9830171dcc | 4,432 | py | Python | instagram_scraper.py | diegooguajardoo/instagram-scraper | 764a21ceb3f8724f4a9f721aefa5073617e02aa1 | [
"MIT"
] | null | null | null | instagram_scraper.py | diegooguajardoo/instagram-scraper | 764a21ceb3f8724f4a9f721aefa5073617e02aa1 | [
"MIT"
] | null | null | null | instagram_scraper.py | diegooguajardoo/instagram-scraper | 764a21ceb3f8724f4a9f721aefa5073617e02aa1 | [
"MIT"
] | null | null | null | import argparse
import csv
import os
import re
from typing import List
import requests
from requests_html import HTMLSession
# Source: http://blog.jstassen.com/2016/03/code-regex-for-instagram-username-and-hashtags/
REGEXES = {
'hashtag': re.compile('(?:#)([A-Za-z0-9_](?:(?:[A-Za-z0-9_]|(?:\.(?!\.))){0,28}(?:[A-Z... | 36.933333 | 115 | 0.539711 |
8d6bb53a41148ea43e3154dce02919797b78c695 | 1,868 | py | Python | AS_01/Problem03.py | ngdhuy/SE_01_Python | 459029267d3c866ee916e5aa825682c005e384dc | [
"MIT"
] | null | null | null | AS_01/Problem03.py | ngdhuy/SE_01_Python | 459029267d3c866ee916e5aa825682c005e384dc | [
"MIT"
] | null | null | null | AS_01/Problem03.py | ngdhuy/SE_01_Python | 459029267d3c866ee916e5aa825682c005e384dc | [
"MIT"
] | null | null | null | import math
from data3 import *
def data_check(house_id, no_adult, no_child, no_days, allergies, no_patient):
error_type = []
if no_patient > no_adult:
error_type.append(1)
print('Number of patient cannot larger than number of adult in family!')
if no_adult <= 0 and no_child > 0:
... | 33.963636 | 118 | 0.609208 |
a6e1577318655930428e58dd8da8ac126f9be5df | 909 | py | Python | src/gluonts/core/serde/__init__.py | PascalIversen/gluon-ts | cb6b5145b94f942f7803383a70813363f6953509 | [
"Apache-2.0"
] | 1 | 2020-11-30T18:05:24.000Z | 2020-11-30T18:05:24.000Z | src/gluonts/core/serde/__init__.py | PascalIversen/gluon-ts | cb6b5145b94f942f7803383a70813363f6953509 | [
"Apache-2.0"
] | null | null | null | src/gluonts/core/serde/__init__.py | PascalIversen/gluon-ts | cb6b5145b94f942f7803383a70813363f6953509 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in the "license... | 26.735294 | 75 | 0.715072 |
7dcd7c934147955374c8d6c69f08f32dd7840795 | 125,893 | py | Python | uncertainties/core.py | ep12/uncertainties | 4ff064f9b28c16c68ac312f79628ba767383d267 | [
"BSD-3-Clause"
] | null | null | null | uncertainties/core.py | ep12/uncertainties | 4ff064f9b28c16c68ac312f79628ba767383d267 | [
"BSD-3-Clause"
] | null | null | null | uncertainties/core.py | ep12/uncertainties | 4ff064f9b28c16c68ac312f79628ba767383d267 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
"""
Main module for the uncertainties package, with internal functions.
"""
# The idea behind this module is to replace the result of mathematical
# operations by a local approximation of the defining function. For
# example, sin(0.2+/-0.01) becomes the affine function
# (AffineScalarFunc object) whos... | 38.323592 | 122 | 0.633641 |
1d96b814af9e3ce7d88991d7f398afc2071f8d6b | 12,517 | py | Python | summae/text_encoder_test.py | kiss2u/google-research | 2cd66234656f9e2f4218ed90a2d8aa9cf3139093 | [
"Apache-2.0"
] | 7 | 2020-03-15T12:14:07.000Z | 2021-12-01T07:01:09.000Z | summae/text_encoder_test.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 25 | 2020-07-25T08:53:09.000Z | 2022-03-12T00:43:02.000Z | summae/text_encoder_test.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2020-06-15T03:06:53.000Z | 2021-08-06T16:38:33.000Z | # coding=utf-8
# Copyright 2020 The Google Research 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 applicab... | 38.395706 | 78 | 0.715587 |
da8132e7799546fa52f2f4e62b867e6b99330ad7 | 5,546 | py | Python | src/igvfd/tests/test_access_key.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | 1 | 2022-01-20T23:10:34.000Z | 2022-01-20T23:10:34.000Z | src/igvfd/tests/test_access_key.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | 8 | 2022-02-24T00:34:29.000Z | 2022-03-30T01:02:47.000Z | src/igvfd/tests/test_access_key.py | IGVF-DACC/igvfd | 432d711a3a245182fc797eef21580158c1a713e6 | [
"MIT"
] | null | null | null | import pytest
from webtest import AppError
def basic_auth(username, password):
from base64 import b64encode
from pyramid.compat import ascii_native_
return 'Basic ' + ascii_native_(b64encode(('%s:%s' % (username, password)).encode('utf-8')))
def auth_header(access_key_3):
return basic_auth(access_ke... | 40.188406 | 100 | 0.717093 |
f7e5fd805610a4fbce0e828b71b5a5991711f958 | 953 | py | Python | contracts/migrations/0003_auto_20191226_1856.py | Project-Ellie/Django | b5acf732c15fde78b86e6172992f35f8258c557d | [
"Apache-2.0"
] | null | null | null | contracts/migrations/0003_auto_20191226_1856.py | Project-Ellie/Django | b5acf732c15fde78b86e6172992f35f8258c557d | [
"Apache-2.0"
] | 6 | 2019-12-14T21:02:00.000Z | 2022-01-13T02:02:30.000Z | contracts/migrations/0003_auto_20191226_1856.py | Project-Ellie/Django | b5acf732c15fde78b86e6172992f35f8258c557d | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.6 on 2019-12-26 18:56
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('contracts', '0002_auto_20191226_1847'),
]
operations = [
migrations.AddField(
... | 29.78125 | 128 | 0.637985 |
bfa310feae46366cb3c2e56d39e2f3ba0576ea8e | 49,044 | py | Python | webStorm-APICloud/python_tools/Lib/distutils/dist.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/distutils/dist.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | webStorm-APICloud/python_tools/Lib/distutils/dist.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | null | null | null | """distutils.dist
Provides the Distribution class, which represents the module distribution
being built/installed/distributed.
"""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: dist.py 66181 2008-09-03 11:13:56Z marc-andre.lemburg $"
import sys, os, string, re
from types i... | 39.776156 | 83 | 0.584863 |
225f448dadee7e34124c92cc04b5aecf4cf1b622 | 5,189 | py | Python | metadata_repository_service/dao/data_access_committee.py | ghga-de/metadata-api | 2000c285a0604c7ad658672c2a88ab702c9eb0f0 | [
"Apache-2.0"
] | null | null | null | metadata_repository_service/dao/data_access_committee.py | ghga-de/metadata-api | 2000c285a0604c7ad658672c2a88ab702c9eb0f0 | [
"Apache-2.0"
] | 11 | 2021-12-02T11:59:32.000Z | 2022-03-24T09:11:46.000Z | metadata_repository_service/dao/data_access_committee.py | ghga-de/metadata-repository-service | 2000c285a0604c7ad658672c2a88ab702c9eb0f0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 - 2022 Universität Tübingen, DKFZ and EMBL
# for the German Human Genome-Phenome Archive (GHGA)
#
# 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/... | 34.593333 | 88 | 0.740991 |
cd762f7e85da4955ec87ca527dc7efb1f81f2a62 | 17,609 | py | Python | google/cloud/workflows_v1beta/services/workflows/transports/grpc_asyncio.py | LaudateCorpus1/python-workflows | 9db415fdcc3ac7372e07b060a06751d0c8804ba8 | [
"Apache-2.0"
] | 6 | 2020-12-09T11:21:53.000Z | 2022-03-21T22:13:07.000Z | google/cloud/workflows_v1beta/services/workflows/transports/grpc_asyncio.py | LaudateCorpus1/python-workflows | 9db415fdcc3ac7372e07b060a06751d0c8804ba8 | [
"Apache-2.0"
] | 38 | 2020-09-24T16:49:31.000Z | 2022-03-10T19:52:03.000Z | google/cloud/workflows_v1beta/services/workflows/transports/grpc_asyncio.py | LaudateCorpus1/python-workflows | 9db415fdcc3ac7372e07b060a06751d0c8804ba8 | [
"Apache-2.0"
] | 5 | 2020-09-24T16:46:44.000Z | 2022-02-05T22:00:25.000Z | # -*- 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... | 43.479012 | 87 | 0.63973 |
99286162eb6fecc9f2e8597ce83db507d5b42a52 | 3,516 | py | Python | lib/tinyusb/lib/FreeRTOS/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/misc.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | null | null | null | lib/tinyusb/lib/FreeRTOS/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/misc.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | null | null | null | lib/tinyusb/lib/FreeRTOS/FreeRTOS-Labs/Demo/FreeRTOS_IoT_Libraries/tools/aws_config_quick_start/misc.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import boto3
def describe_endpoint():
client = boto3.client('iot')
endpoint = client.describe_endpoint(endpointType='iot:Data-ATS')
return endpoint['endpointAddress']
def get_account_id():
client = boto3.client('sts')
aws_account_id = client.get_caller_identity()... | 35.16 | 77 | 0.600114 |
2fc49d2ab0740e59fb69c7704745fa9186f34975 | 267 | py | Python | app/blueprints/__init__.py | pkuyouth/pkuyouth-webserver-v2 | bf8ed12269f068db8bb34e9f479f04c093f5e48d | [
"MIT"
] | 2 | 2020-07-30T15:59:40.000Z | 2020-09-09T06:48:52.000Z | app/core/redis/__init__.py | pkuyouth/pkuyouth-webserver-v2 | bf8ed12269f068db8bb34e9f479f04c093f5e48d | [
"MIT"
] | null | null | null | app/core/redis/__init__.py | pkuyouth/pkuyouth-webserver-v2 | bf8ed12269f068db8bb34e9f479f04c093f5e48d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ---------------------------------------
# Project: PKUYouth Webserver v2
# File: __init__.py
# Created Date: 2020-07-27
# Author: Xinghong Zhong
# ---------------------------------------
# Copyright (c) 2020 PKUYouth
| 24.272727 | 41 | 0.47191 |
a59d81887d4518019cfcecb859b56ccd17be445f | 601 | py | Python | plugin/provider-rmccurdy_com.py | maerson/daili | 3179b1c8721b605614777cf9bb233d56de11d01e | [
"MIT"
] | null | null | null | plugin/provider-rmccurdy_com.py | maerson/daili | 3179b1c8721b605614777cf9bb233d56de11d01e | [
"MIT"
] | null | null | null | plugin/provider-rmccurdy_com.py | maerson/daili | 3179b1c8721b605614777cf9bb233d56de11d01e | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, absolute_import, division, print_function
import json
import re
import logging
import os, sys, time
from bs4 import BeautifulSoup
if __name__ == '__main__':
sys.path.append(os.path.dirname(sys.path[0]))
else:
sys.path.append(sys.path[0]+"\\plugin")
from provider import... | 20.724138 | 82 | 0.687188 |
bbc2ced327c0ecbcb6c586541d2a343682aa90e1 | 4,883 | py | Python | fudge/productData/distributions/angularEnergyMC.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 14 | 2019-08-29T23:46:24.000Z | 2022-03-21T10:16:25.000Z | fudge/productData/distributions/angularEnergyMC.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 1 | 2020-08-04T16:14:45.000Z | 2021-12-01T01:54:34.000Z | fudge/productData/distributions/angularEnergyMC.py | brown170/fudge | 4f818b0e0b0de52bc127dd77285b20ce3568c97a | [
"BSD-3-Clause"
] | 2 | 2022-03-03T22:41:41.000Z | 2022-03-03T22:54:43.000Z | # <<BEGIN-copyright>>
# Copyright 2021, Lawrence Livermore National Security, LLC.
# See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
# <<END-copyright>>
"""Angular/Energy double differential distribution classes for Monte Carlo with xs, pdf, and cdf 1d distribtions."""
from xD... | 32.337748 | 133 | 0.645914 |
05fd708270c9454d3ee93eabbe6505693ceb8b72 | 1,570 | py | Python | setup.py | jrief/djangocms-cascade-reveal | 72db7cefa223e5366675dde2089a32e239fef8c6 | [
"MIT"
] | null | null | null | setup.py | jrief/djangocms-cascade-reveal | 72db7cefa223e5366675dde2089a32e239fef8c6 | [
"MIT"
] | null | null | null | setup.py | jrief/djangocms-cascade-reveal | 72db7cefa223e5366675dde2089a32e239fef8c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup, find_packages
from cmsplugin_reveal import __version__
try:
from pypandoc import convert
except ImportError:
import io
def convert(filename, fmt):
with io.open(filename, encoding='ut... | 28.545455 | 60 | 0.642038 |
ca906d8b65cf7eae06e64ede5762ea999072aaa8 | 694 | py | Python | python-leetcode/114.01.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 12 | 2020-01-16T08:55:27.000Z | 2021-12-02T14:52:39.000Z | python-leetcode/114.01.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | null | null | null | python-leetcode/114.01.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 1 | 2019-12-11T12:00:38.000Z | 2019-12-11T12:00:38.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def flatten(self, root: TreeNode) -> None:
"""
Do not return anything, modify root in-place instead.
... | 24.785714 | 57 | 0.612392 |
f33940b90f9d5f1852dc72e74558197999524ae3 | 13,812 | py | Python | tutorials/mobilenetv3_prod/Step1-5/mobilenetv3_ref/train.py | fengxiaoshuai/models | 052fcbfe0234e9b781ea125ffe2b473be8f1530e | [
"Apache-2.0"
] | 7,090 | 2017-04-21T00:22:09.000Z | 2022-03-31T11:52:40.000Z | tutorials/mobilenetv3_prod/Step1-5/mobilenetv3_ref/train.py | fengxiaoshuai/models | 052fcbfe0234e9b781ea125ffe2b473be8f1530e | [
"Apache-2.0"
] | 2,601 | 2017-04-21T02:52:04.000Z | 2022-03-09T08:43:09.000Z | tutorials/mobilenetv3_prod/Step1-5/mobilenetv3_ref/train.py | fengxiaoshuai/models | 052fcbfe0234e9b781ea125ffe2b473be8f1530e | [
"Apache-2.0"
] | 3,391 | 2017-04-21T00:22:19.000Z | 2022-03-30T17:53:25.000Z | import datetime
import os
import time
import torch
import torch.utils.data
from torch import nn
import torchvision
import presets
import utils
try:
from apex import amp
except ImportError:
amp = None
import sys
sys.path.insert(0, ".")
import numpy as np
from reprod_log import ReprodLogger
def train_one_e... | 35.055838 | 97 | 0.615769 |
b2c310d9d7fd8926d0c3fd30d5b573d0c116f7c2 | 1,209 | py | Python | app/core/models.py | lejdiprifti/recipe-app-api | 7c964e13c7b2527ef8ded066a3e97c09efad640b | [
"MIT"
] | null | null | null | app/core/models.py | lejdiprifti/recipe-app-api | 7c964e13c7b2527ef8ded066a3e97c09efad640b | [
"MIT"
] | null | null | null | app/core/models.py | lejdiprifti/recipe-app-api | 7c964e13c7b2527ef8ded066a3e97c09efad640b | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import AbstractBaseUser,BaseUserManager, \
PermissionsMixin
class UserManager(BaseUserManager):
def create_user(self, email, password=None, **extra_fields):
'''Creates and saves a new user'''
... | 32.675676 | 78 | 0.658395 |
612429398342bd61a396326f127efdd8a96b4440 | 6,150 | py | Python | tensorflow/python/compat/compat.py | weikhor/tensorflow | ce047fc05c7b5ff54868ba53d724d9c171c4adbb | [
"Apache-2.0"
] | null | null | null | tensorflow/python/compat/compat.py | weikhor/tensorflow | ce047fc05c7b5ff54868ba53d724d9c171c4adbb | [
"Apache-2.0"
] | null | null | null | tensorflow/python/compat/compat.py | weikhor/tensorflow | ce047fc05c7b5ff54868ba53d724d9c171c4adbb | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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.549133 | 82 | 0.745854 |
63cd5dbc5a47ac249902cabdaea892f74e66ffc7 | 2,225 | py | Python | python/100/100.py | HymEric/LeetCode | e32439a76968d67f99881b6d07fb16e21c979c9e | [
"Apache-2.0"
] | 2 | 2019-09-27T11:41:02.000Z | 2019-10-17T21:50:23.000Z | python/100/100.py | HymEric/LeetCode | e32439a76968d67f99881b6d07fb16e21c979c9e | [
"Apache-2.0"
] | null | null | null | python/100/100.py | HymEric/LeetCode | e32439a76968d67f99881b6d07fb16e21c979c9e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Time : 2020/1/28 0028 18:52
# @Author : Erichym
# @Email : 951523291@qq.com
# @File : 100.py
# @Software: PyCharm
"""
给定两个二叉树,编写一个函数来检验它们是否相同。
如果两个树在结构上相同,并且节点具有相同的值,则认为它们是相同的。
示例 1:
输入: 1 1
/ \ / \
2 3 2 3
[... | 23.177083 | 63 | 0.450787 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.