hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7955dfe1a60b85a7b4187b22614ddd49e49992d8 | 2,569 | py | Python | plugins/cpu/taskswitch.py | BH1SCW/lmp | 2c054b22868af07a11439b785dfeb04e01d31c02 | [
"Apache-2.0"
] | 159 | 2020-04-15T16:41:06.000Z | 2022-03-30T08:12:00.000Z | plugins/cpu/taskswitch.py | BH1SCW/lmp | 2c054b22868af07a11439b785dfeb04e01d31c02 | [
"Apache-2.0"
] | 82 | 2020-04-16T10:42:42.000Z | 2022-02-18T13:08:39.000Z | plugins/cpu/taskswitch.py | Teanix/lmp | 94b4be742674f831df22120afe458c98c8349f35 | [
"Apache-2.0"
] | 76 | 2020-04-14T07:39:52.000Z | 2022-02-21T05:43:37.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
from __future__ import print_function
from bcc import BPF
from time import sleep, strftime
# for influxdb
import sys
sys.path.append('./plugins/common/')
from init_db import influx_client
from db_modules import write2db
from const import DatabaseType
from datetime import... | 23.354545 | 90 | 0.632931 |
7955e08b3acd26c15bd695e8550096871ef773e4 | 646 | py | Python | demo.py | jraza19/docopt_demo | c5dff8356759c201204f660b812b250082cc099b | [
"MIT"
] | null | null | null | demo.py | jraza19/docopt_demo | c5dff8356759c201204f660b812b250082cc099b | [
"MIT"
] | null | null | null | demo.py | jraza19/docopt_demo | c5dff8356759c201204f660b812b250082cc099b | [
"MIT"
] | null | null | null | # author: Tiffany Timbers
# modified by: Javairia Raza
# date: 2020-11-19
"""This script prints out docopt args.
Usage: docopt.py <arg1> --arg2=<arg2> [--arg3=<arg3>] [--arg4=<arg4>]
Options:
<arg> Takes any value (this is a required positional argument)
--arg2=<arg2> Takes any value (this is a requir... | 26.916667 | 74 | 0.657895 |
7955e2ff49e99606467342c7563e109fcc8ba4ed | 801 | py | Python | tests/test_docs.py | guillaumegenthial/doc2md | 7ad5b8944e85d88acd76c7d7d2d3550d076d6c56 | [
"Apache-2.0"
] | null | null | null | tests/test_docs.py | guillaumegenthial/doc2md | 7ad5b8944e85d88acd76c7d7d2d3550d076d6c56 | [
"Apache-2.0"
] | 1 | 2019-10-20T01:59:05.000Z | 2019-10-20T01:59:05.000Z | tests/test_docs.py | guillaumegenthial/doc2md | 7ad5b8944e85d88acd76c7d7d2d3550d076d6c56 | [
"Apache-2.0"
] | null | null | null | """Tests that output is the same as expected"""
__author__ = "Guillaume Genthial"
from pathlib import Path
EXPECTED = 'tests/mydummypackage/docs'
GOT = 'tests/mydummypackage/test-docs'
FILES = [
'bar.md',
'foo.bar.md',
]
EXPECTED_NESTED = 'tests/mydummypackage/docs-nested'
GOT_NESTED = 'tests/mydummypackag... | 22.885714 | 62 | 0.637953 |
7955e327c9f7060d3eb18383e4c3ea47f7df4c02 | 6,081 | py | Python | teabag_app.py | alma-frankenstein/Other-projects | ec9972125310c3cdeb353e317a94d1baca287b3a | [
"MIT"
] | null | null | null | teabag_app.py | alma-frankenstein/Other-projects | ec9972125310c3cdeb353e317a94d1baca287b3a | [
"MIT"
] | null | null | null | teabag_app.py | alma-frankenstein/Other-projects | ec9972125310c3cdeb353e317a94d1baca287b3a | [
"MIT"
] | null | null | null | # teabag app
from flask import Flask, render_template
import random as r
import os
app = Flask(__name__)
partsOfSpeech = {'nouns1': ['an aura', 'an accomplishment', 'the love', 'the life', 'the soul'],
'nouns2': ['respect', 'compassion', 'kindness', 'love', 'life', 'knowledge', 'strength',
... | 81.08 | 190 | 0.651866 |
7955e38d68dff0a302b7b39a4363434c879cb672 | 440 | py | Python | aiostorage/providers/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | aiostorage/providers/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | 3 | 2018-12-25T13:53:11.000Z | 2019-02-10T13:52:31.000Z | aiostorage/providers/exceptions.py | grking8/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | """
This module contains exceptions for object storage provider API errors.
"""
class ProviderError(Exception):
"""
Base exception class.
"""
class ProviderGetUploadUrlError(ProviderError):
"""
Unable to get file upload URL.
"""
class ProviderAuthorizationError(ProviderError):
"""
... | 15.714286 | 71 | 0.665909 |
7955e5d155c37b63d920469c60858d14a098f726 | 835 | py | Python | molecule/test/scenarios/driver/podman/molecule/multi-node/tests/test_bar.py | brianhelba/molecule | fbe61c0337c038464b4592ce1904e4880a9b18c1 | [
"MIT"
] | 3 | 2020-05-19T21:20:35.000Z | 2022-03-20T12:11:06.000Z | molecule/test/scenarios/driver/podman/molecule/multi-node/tests/test_bar.py | brianhelba/molecule | fbe61c0337c038464b4592ce1904e4880a9b18c1 | [
"MIT"
] | null | null | null | molecule/test/scenarios/driver/podman/molecule/multi-node/tests/test_bar.py | brianhelba/molecule | fbe61c0337c038464b4592ce1904e4880a9b18c1 | [
"MIT"
] | 3 | 2020-05-22T03:30:50.000Z | 2022-03-19T08:35:31.000Z | """Testinfra tests."""
import os
import re
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ["MOLECULE_INVENTORY_FILE"]
).get_hosts("bar")
def test_hostname(host):
"""Validate hostname."""
assert re.search(r"instance-1.*", host.check_output... | 23.194444 | 78 | 0.68503 |
7955e67be520754f11c02908dd9c90a4e86282ec | 5,115 | py | Python | app.py | SBelkaid/applied_tm | a22e089027f4f1ccd550aca4ae110f5f6833cb76 | [
"BSD-4-Clause-UC"
] | null | null | null | app.py | SBelkaid/applied_tm | a22e089027f4f1ccd550aca4ae110f5f6833cb76 | [
"BSD-4-Clause-UC"
] | 3 | 2021-03-31T19:59:53.000Z | 2021-12-13T20:42:22.000Z | app.py | SBelkaid/applied_tm | a22e089027f4f1ccd550aca4ae110f5f6833cb76 | [
"BSD-4-Clause-UC"
] | null | null | null | from models import db_session, User
from flask import Flask, request, url_for, redirect, render_template
from models import Claim
from models import Document
from models import Attribution
from models import Entity
from models import Perspective
from flask_login import current_user
from vaderSentiment.vaderSentiment im... | 34.795918 | 157 | 0.668231 |
7955e6f7f5f0f71a29b8b421612179b90055e71d | 4,847 | py | Python | tests/pipelines/test_optuna.py | gr33n-made/catalyst | bd413abc908ef7cbdeab42b0e805277a791e3ddb | [
"Apache-2.0"
] | 1 | 2021-09-29T20:30:50.000Z | 2021-09-29T20:30:50.000Z | tests/pipelines/test_optuna.py | gr33n-made/catalyst | bd413abc908ef7cbdeab42b0e805277a791e3ddb | [
"Apache-2.0"
] | null | null | null | tests/pipelines/test_optuna.py | gr33n-made/catalyst | bd413abc908ef7cbdeab42b0e805277a791e3ddb | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
import os
from tempfile import TemporaryDirectory
from pytest import mark
import torch
from torch import nn
from torch.utils.data import DataLoader
from catalyst import dl
from catalyst.contrib.datasets import MNIST
from catalyst.data import ToTensor
from catalyst.settings import IS_CUDA_AVAILABLE, NU... | 28.85119 | 96 | 0.63008 |
7955e8d4373596741b3ba1ef3a5a2eb8af2453a8 | 1,905 | py | Python | pl_bolts/losses/object_detection.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 822 | 2020-04-21T03:30:43.000Z | 2021-03-07T06:41:31.000Z | pl_bolts/losses/object_detection.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 538 | 2020-04-18T01:07:58.000Z | 2021-03-09T13:48:50.000Z | pl_bolts/losses/object_detection.py | lavoiems/lightning-bolts | 208e92ba3dcdbc029afd37e09ec9461fbcf3f293 | [
"Apache-2.0"
] | 162 | 2020-04-17T15:44:54.000Z | 2021-03-09T14:04:02.000Z | """Loss functions for Object Detection task."""
from torch import Tensor
from pl_bolts.metrics.object_detection import giou, iou
def iou_loss(preds: Tensor, target: Tensor) -> Tensor:
"""Calculates the intersection over union loss.
Args:
preds: batch of prediction bounding boxes with representation... | 34.017857 | 109 | 0.650394 |
7955e927b4eaad327fa96b50841bbabf0c762a82 | 1,276 | py | Python | rc_django/decorators.py | uw-it-aca/uw-restclients-django-utils | 1b2e883f422c256a5ef6e3737f4dde65cc3b1e96 | [
"Apache-2.0"
] | null | null | null | rc_django/decorators.py | uw-it-aca/uw-restclients-django-utils | 1b2e883f422c256a5ef6e3737f4dde65cc3b1e96 | [
"Apache-2.0"
] | 119 | 2017-03-22T04:48:56.000Z | 2021-11-12T18:55:40.000Z | rc_django/decorators.py | uw-it-aca/uw-restclients-django-utils | 1b2e883f422c256a5ef6e3737f4dde65cc3b1e96 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.utils.module_loading import import_string
from django.shortcuts import render
def restclient_admin_required(view_func):
"""... | 38.666667 | 77 | 0.695925 |
7955e9a4dd2be386f70bdc5cf60c73999e7ba43d | 13,883 | py | Python | tests/iaas_classic/models/IPReservations/test_iaas_ip_reservations_model.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/iaas_classic/models/IPReservations/test_iaas_ip_reservations_model.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/iaas_classic/models/IPReservations/test_iaas_ip_reservations_model.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gc3-query.test_iaas_ip_reservations_model [9/13/2018 10:49 AM]
~~~~~~~~~~~~~~~~
<DESCR SHORT>
<DESCR>
"""
################################################################################
## Standard Library Imports
import sys, os
######################################################... | 42.197568 | 210 | 0.742779 |
7955e9c510067fa51b80282cca698f2eb849d19a | 1,412 | py | Python | tests/test_matcher_not.py | sanjioh/django-header-filter | d348449619c71bdd6a2c957ee47c1c67a57bdec2 | [
"MIT"
] | 11 | 2016-12-03T21:45:30.000Z | 2022-01-11T08:57:55.000Z | tests/test_matcher_not.py | sanjioh/django-header-filter | d348449619c71bdd6a2c957ee47c1c67a57bdec2 | [
"MIT"
] | 17 | 2019-07-12T20:36:40.000Z | 2020-01-09T15:03:40.000Z | tests/test_matcher_not.py | sanjioh/django-header-filter | d348449619c71bdd6a2c957ee47c1c67a57bdec2 | [
"MIT"
] | null | null | null | from header_filter.matchers import Header
def test_not_matcher_supports_bitwise_not(rf):
h_name, h_value = 'HTTP_X_A', 'val_x'
matcher = ~~Header(h_name, h_value)
request = rf.get('/', **{h_name: h_value})
assert matcher.match(request) is True
def test_not_matcher_supports_bitwise_and(rf):
h_nam... | 37.157895 | 92 | 0.701133 |
7955ea17335a287450b6065b06014de98b658ae3 | 8,876 | py | Python | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | # Copyright 2018 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... | 26.978723 | 75 | 0.590469 |
7955ea5a03cae714b7b6b3bdc38bda8ed7d736f5 | 555 | py | Python | stage/configuration/test_dev_snapshot_replaying_origin.py | Sentienz/datacollector-tests | ca27988351dc3366488098b5db6c85a8be2f7b85 | [
"Apache-2.0"
] | null | null | null | stage/configuration/test_dev_snapshot_replaying_origin.py | Sentienz/datacollector-tests | ca27988351dc3366488098b5db6c85a8be2f7b85 | [
"Apache-2.0"
] | 1 | 2019-04-24T11:06:38.000Z | 2019-04-24T11:06:38.000Z | stage/configuration/test_dev_snapshot_replaying_origin.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 2 | 2019-05-24T06:34:37.000Z | 2020-03-30T11:48:18.000Z | import pytest
from streamsets.testframework.decorators import stub
@stub
@pytest.mark.parametrize('stage_attributes', [{'on_record_error': 'DISCARD'},
{'on_record_error': 'STOP_PIPELINE'},
{'on_record_error': 'TO_ERROR'}])
de... | 24.130435 | 83 | 0.654054 |
7955eb3ac947af5ac70ba7d58aa356679abeac65 | 4,246 | py | Python | dvc/output/local.py | peter-schmidbauer/dvc | 363db9125fa85a8589724501a50a5d361c07a757 | [
"Apache-2.0"
] | null | null | null | dvc/output/local.py | peter-schmidbauer/dvc | 363db9125fa85a8589724501a50a5d361c07a757 | [
"Apache-2.0"
] | null | null | null | dvc/output/local.py | peter-schmidbauer/dvc | 363db9125fa85a8589724501a50a5d361c07a757 | [
"Apache-2.0"
] | null | null | null | import os
from schema import Optional, Or
from dvc.output.base import OutputDoesNotExistError, OutputIsNotFileOrDirError
from dvc.output.base import OutputAlreadyTrackedError
from dvc.dependency.local import DependencyLOCAL
from dvc.exceptions import DvcException
from dvc.istextfile import istextfile
class OutputLOC... | 32.661538 | 79 | 0.618935 |
7955eb745a973df9d6329048fd3e2d65cdb7d4a3 | 3,780 | py | Python | kubernetes/client/models/v1_non_resource_attributes.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | 1 | 2021-06-10T23:44:11.000Z | 2021-06-10T23:44:11.000Z | kubernetes/client/models/v1_non_resource_attributes.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_non_resource_attributes.py | sgwilliams-ebsco/python | 35e6406536c96d4769ff7e2a02bf0fdcb902a509 | [
"Apache-2.0"
] | 1 | 2018-11-06T16:33:43.000Z | 2018-11-06T16:33:43.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 24.387097 | 105 | 0.540476 |
7955eba9268a2c534f6504422fd6ac752ee6ccd9 | 53,707 | py | Python | Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py | znuf/content | 2b530316f76e8051896c91cf927633d5fe182eb8 | [
"MIT"
] | null | null | null | Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py | znuf/content | 2b530316f76e8051896c91cf927633d5fe182eb8 | [
"MIT"
] | null | null | null | Packs/Active_Directory_Query/Integrations/Active_Directory_Query/Active_Directory_Query.py | znuf/content | 2b530316f76e8051896c91cf927633d5fe182eb8 | [
"MIT"
] | null | null | null | import demistomock as demisto
from CommonServerPython import *
from typing import List, Dict, Optional
from ldap3 import Server, Connection, NTLM, SUBTREE, ALL_ATTRIBUTES, Tls, Entry, Reader, ObjectDef
from ldap3.extend import microsoft
import ssl
from datetime import datetime
import traceback
import os
from ldap3.util... | 34.784326 | 120 | 0.628931 |
7955ebb8c5e933ed0f53badffc69d2182f9b1d91 | 1,006 | py | Python | tests/cli_fixtures.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | 1 | 2021-02-21T03:09:17.000Z | 2021-02-21T03:09:17.000Z | tests/cli_fixtures.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | 1 | 2021-02-19T14:24:40.000Z | 2021-02-20T20:06:58.000Z | tests/cli_fixtures.py | matutter/water | b3390b02a53661e84200e0c8f00e19459bc7bc82 | [
"MIT"
] | null | null | null | """
Fixtures specific to Click.
"""
from foremon.display import display_verbose, set_display_verbose
from typing import Any, Callable, List
import pytest
from click.testing import CliRunner, Result
from .fixtures import *
CliProg = Callable[[List[Any]], Result]
@pytest.fixture
def cli(request: SubRequest, output... | 23.952381 | 73 | 0.704771 |
7955ec2bd8a57007f3bab3ab79c71135908db2f7 | 544 | py | Python | Arrays/1472. Design Browser History_M.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | 1 | 2021-06-30T17:51:56.000Z | 2021-06-30T17:51:56.000Z | Arrays/1472. Design Browser History_M.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | null | null | null | Arrays/1472. Design Browser History_M.py | thewires2/Leetcode | a37ff81d60dd9195ba637b970b40aabbea5f4680 | [
"Unlicense"
] | null | null | null | class BrowserHistory:
def __init__(self, homepage: str):
self.current=0
self.history=[homepage]
def visit(self, url: str) -> None:
self.current+=1
self.history=self.history[:self.current]
self.history.append(url)
def back(self, steps: int) -> str:
self.curr... | 28.631579 | 65 | 0.628676 |
7955ee83135c8ed0a2282e0ee89c36aa8cddec8c | 1,005 | py | Python | lib/Variation_Viewer/Utils/genomeutils.py | kbasecollaborations/Variation_Viewer | cd5d590fb742a9df9666c07c0aa3b9e30f791853 | [
"MIT"
] | null | null | null | lib/Variation_Viewer/Utils/genomeutils.py | kbasecollaborations/Variation_Viewer | cd5d590fb742a9df9666c07c0aa3b9e30f791853 | [
"MIT"
] | null | null | null | lib/Variation_Viewer/Utils/genomeutils.py | kbasecollaborations/Variation_Viewer | cd5d590fb742a9df9666c07c0aa3b9e30f791853 | [
"MIT"
] | null | null | null | class genomeutils:
def __init__(self):
pass
def gff2bed(self, gff_file, output_dir):
#awk -F "\t" '{print $1"\t"$4"\t"$5"\t"$9"\t"$6"\t"$7"\t"$2"\t"$8"\t"$9}' GCA_009858895.3_ASM985889v3_genomic.gff
gff_file_name = gff_file.split("/")[-1]
bed_file = gff_file_name.replace(".gff"... | 33.5 | 140 | 0.475622 |
7955f188582ebe840a118754de32516a9885d7f5 | 7,303 | py | Python | xilinx/xilinx7_reader.py | xesscorp/KiCad-Schematic-Symbol-Libraries | ab472c05697d3e3a85ee269e4ad8fa4028dc3cc9 | [
"Unlicense"
] | 66 | 2015-08-27T12:55:01.000Z | 2021-09-03T19:16:01.000Z | xilinx/xilinx7_reader.py | devbisme/KiCad-Schematic-Symbol-Libraries | ab472c05697d3e3a85ee269e4ad8fa4028dc3cc9 | [
"Unlicense"
] | 2 | 2016-12-19T23:51:37.000Z | 2020-05-15T20:58:14.000Z | xilinx/xilinx7_reader.py | xesscorp/KiCad-Schematic-Symbol-Libraries | ab472c05697d3e3a85ee269e4ad8fa4028dc3cc9 | [
"Unlicense"
] | 19 | 2015-08-27T12:55:33.000Z | 2021-09-03T19:16:02.000Z | # MIT license
#
# Copyright (C) 2015 by XESS Corp.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge... | 41.731429 | 117 | 0.579762 |
7955f3c7f7d3f8a2d4ecaace9f823ea817370de0 | 680 | py | Python | src/zenml/integrations/mlflow/experiment_trackers/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | src/zenml/integrations/mlflow/experiment_trackers/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | src/zenml/integrations/mlflow/experiment_trackers/__init__.py | dumpmemory/zenml | ec3f6994ae9666493519d600471c035eb9109ac4 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed ... | 45.333333 | 93 | 0.764706 |
7955f3d4d0e35f761525367eedab2e570bd20637 | 81,777 | py | Python | mesonbuild/compilers/compilers.py | emersion/meson | 76db75328689a7e48ea5862edd333e6f30c681bb | [
"Apache-2.0"
] | null | null | null | mesonbuild/compilers/compilers.py | emersion/meson | 76db75328689a7e48ea5862edd333e6f30c681bb | [
"Apache-2.0"
] | null | null | null | mesonbuild/compilers/compilers.py | emersion/meson | 76db75328689a7e48ea5862edd333e6f30c681bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2017 The Meson development team
# 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 agree... | 38.610482 | 165 | 0.56758 |
7955f47e3d6e3817a1aae782d7214d1799c8cc90 | 28,985 | py | Python | hours/importer/kirjastot.py | Sukriva/hauki | 2ed569d2e4b1f1cf315939aa15c52dcabd52876b | [
"MIT"
] | null | null | null | hours/importer/kirjastot.py | Sukriva/hauki | 2ed569d2e4b1f1cf315939aa15c52dcabd52876b | [
"MIT"
] | null | null | null | hours/importer/kirjastot.py | Sukriva/hauki | 2ed569d2e4b1f1cf315939aa15c52dcabd52876b | [
"MIT"
] | null | null | null | from collections import defaultdict
from datetime import date, datetime, time
from itertools import groupby
from operator import itemgetter
import holidays
from dateutil.parser import parse
from dateutil.relativedelta import relativedelta
from django import db
from django.db.models import Q
from django.utils import ti... | 40.089903 | 88 | 0.513127 |
7955f4f44be847e24200043875087d29b51798d7 | 5,182 | py | Python | samples/mnist/main.py | Sergiodiaz53/tensorflow-layer-library | c4c71b59c034f4ec894580943e161c2971a92035 | [
"MIT"
] | 9 | 2017-06-11T08:48:11.000Z | 2018-09-06T10:06:22.000Z | samples/mnist/main.py | Sergiodiaz53/tensorflow-layer-library | c4c71b59c034f4ec894580943e161c2971a92035 | [
"MIT"
] | 2 | 2018-06-22T08:38:49.000Z | 2018-06-22T09:19:07.000Z | samples/mnist/main.py | Sergiodiaz53/tensorflow-layer-library | c4c71b59c034f4ec894580943e161c2971a92035 | [
"MIT"
] | 6 | 2018-06-15T14:15:52.000Z | 2018-11-19T21:56:51.000Z | """
© Michael Widrich, Markus Hofmarcher, 2017
Example for mnist predictions via dense network
Command-line usage:
>>> python3 samples/mnist/main_convlstm.py --config=samples/mnist/config.json
"""
# Import MNIST data
from tensorflow.examples.tutorials.mnist import input_data
# Import TeLL
from TeLL.config import Con... | 40.484375 | 120 | 0.567349 |
7955f6f65e258d3efa2b9688217674b56ef226af | 2,466 | py | Python | test_czech_sort/test_data.py | jiri-one/czech-sort | c0ab0b3ea65f7c8eedb6973424656ff9ea7f8671 | [
"MIT"
] | 9 | 2015-09-17T10:45:59.000Z | 2021-08-30T20:24:52.000Z | test_czech_sort/test_data.py | jiri-one/czech-sort | c0ab0b3ea65f7c8eedb6973424656ff9ea7f8671 | [
"MIT"
] | 2 | 2020-09-18T14:17:51.000Z | 2021-08-30T14:47:56.000Z | test_czech_sort/test_data.py | jiri-one/czech-sort | c0ab0b3ea65f7c8eedb6973424656ff9ea7f8671 | [
"MIT"
] | 1 | 2021-08-28T10:11:29.000Z | 2021-08-28T10:11:29.000Z | # For Python 2, we need to declare the encoding: UTF-8, of course.
from __future__ import unicode_literals
import sys
import czech_sort
import pytest
inputs = (
# Examples from Wikipedia:
# https://cs.wikipedia.org/wiki/Abecedn%C3%AD_%C5%99azen%C3%AD
[' '] + '-'.split() +
'A B C Č D E F G H Ch I J ... | 30.073171 | 99 | 0.531225 |
7955f7f8b287bfdba53cebebfd311900e3182f72 | 712 | py | Python | python/fate_arch/computing/_util.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | python/fate_arch/computing/_util.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | python/fate_arch/computing/_util.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #
# Copyright 2019 The Eggroll 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 ap... | 30.956522 | 75 | 0.747191 |
7955f8dfdb9f3b1f9bc9eddcfbb91ed300f2f8c3 | 777 | py | Python | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 20 | 2021-04-08T01:28:53.000Z | 2022-03-22T22:26:05.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
import sys
from enum import Enum
from typing import Dict, Union, List
if sys.version_info >= (3, 10):
from typing impor... | 19.923077 | 77 | 0.66538 |
7955fae37481b0976651d008fa07df1feb085364 | 372 | py | Python | app/test/base.py | raekw0n/raspi-mon-api | ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2 | [
"MIT"
] | null | null | null | app/test/base.py | raekw0n/raspi-mon-api | ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2 | [
"MIT"
] | null | null | null | app/test/base.py | raekw0n/raspi-mon-api | ea82f3424a4a5b7ddfe63b37a1a01e5c06c545d2 | [
"MIT"
] | null | null | null | from flask_testing import TestCase
from app.main import db
from manage import app
class BaseTestCase(TestCase):
def create_app(self):
app.config.from_object('app.main.config.TestingConfig')
return app
def setUp(self):
db.create_all()
db.session.commit()
def tearDown(self)... | 20.666667 | 63 | 0.658602 |
7955fb324e8ac97ce16fb73256cc0112e87a8092 | 9,075 | py | Python | examples/vision/anilkfo_cifarfs.py | Brikwerk/learn2learn | 7997c13c26ec627d13ce77ba98427260df78ada8 | [
"MIT"
] | 1,774 | 2019-09-05T20:41:16.000Z | 2022-03-30T09:49:02.000Z | examples/vision/anilkfo_cifarfs.py | Kostis-S-Z/learn2learn | c0b7c088f15986880b136ec27059644ac513db60 | [
"MIT"
] | 196 | 2019-09-05T08:11:31.000Z | 2022-03-31T12:08:25.000Z | examples/vision/anilkfo_cifarfs.py | Kostis-S-Z/learn2learn | c0b7c088f15986880b136ec27059644ac513db60 | [
"MIT"
] | 266 | 2019-09-13T10:17:54.000Z | 2022-03-28T07:17:21.000Z | #!/usr/bin/env python3
"""
File: anilkfo_cifarfs.py
Author: Seb Arnold - seba1511.net
Email: smr.arnold@gmail.com
Github: seba-1511
Description:
Demonstrates how to use the low-level differentiable optimization utilities
to implement ANIL+KFC on CIFAR-FS.
A demonstration of the high-level API is available in:
exa... | 38.948498 | 93 | 0.534215 |
7955fb47fb019a8049ae40c12c69881594cf910e | 303 | py | Python | themissc/Pos/_Pos.py | mattkjames7/themissc | 1e7257d60da1069fffc7fed848ddcf5c780e9250 | [
"MIT"
] | null | null | null | themissc/Pos/_Pos.py | mattkjames7/themissc | 1e7257d60da1069fffc7fed848ddcf5c780e9250 | [
"MIT"
] | null | null | null | themissc/Pos/_Pos.py | mattkjames7/themissc | 1e7257d60da1069fffc7fed848ddcf5c780e9250 | [
"MIT"
] | null | null | null | import numpy as np
from .. import Globals
#this just stores a few variables for this particular instrument
#data path and index file name: format(Prod,L,sc)
idxfname = Globals.DataPath + 'Pos/{:s}.{:s}.{:s}.dat'
datapath = Globals.DataPath + 'Pos/{:s}/{:s}/{:s}/'
#file version format
vfmt = 'v\d\d'
| 25.25 | 64 | 0.686469 |
7955fb638912f1c804652b33a4a31a2601290f0c | 36,305 | py | Python | pytests/test_cphd_consistency.py | khavernathy/sarpy | e0c2bb1a55f153628162ef7be89e9b7de34602df | [
"MIT"
] | 1 | 2021-07-05T15:14:03.000Z | 2021-07-05T15:14:03.000Z | pytests/test_cphd_consistency.py | khavernathy/sarpy | e0c2bb1a55f153628162ef7be89e9b7de34602df | [
"MIT"
] | 1 | 2021-08-31T10:27:15.000Z | 2021-08-31T19:42:04.000Z | pytests/test_cphd_consistency.py | khavernathy/sarpy | e0c2bb1a55f153628162ef7be89e9b7de34602df | [
"MIT"
] | 1 | 2021-07-17T12:49:57.000Z | 2021-07-17T12:49:57.000Z | #
# Copyright 2020-2021 Valkyrie Systems Corporation
#
# Licensed under MIT License. See LICENSE.
#
import copy
import os
import re
import shutil
import tempfile
from lxml import etree
import numpy as np
import pytest
from sarpy.consistency import cphd_consistency
from sarpy.io.phase_history.cphd_schema import get_... | 45.26808 | 115 | 0.602231 |
7955fbff776afc6ea7de166e3a2604ed8bf44815 | 139 | py | Python | inapp_survey/apps.py | jpatel3/django-inapp-survey | f11818f7bbafe1cf38af91f2ec83cb3ad050091e | [
"Apache-2.0"
] | 3 | 2017-12-07T20:02:31.000Z | 2020-10-24T18:35:11.000Z | inapp_survey/apps.py | jpatel3/django-inapp-survey | f11818f7bbafe1cf38af91f2ec83cb3ad050091e | [
"Apache-2.0"
] | 6 | 2017-04-12T20:33:16.000Z | 2017-04-25T18:26:21.000Z | inapp_survey/apps.py | jpatel3/django-inapp-survey | f11818f7bbafe1cf38af91f2ec83cb3ad050091e | [
"Apache-2.0"
] | 2 | 2018-08-27T10:45:32.000Z | 2019-07-25T01:38:50.000Z | from __future__ import unicode_literals
from django.apps import AppConfig
class InappSurveyConfig(AppConfig):
name = 'inapp_survey'
| 17.375 | 39 | 0.805755 |
7955fc57576d3f97db0b8bbdcc2cf5cf6aba174e | 98 | py | Python | schema/token_schema.py | dcshoecousa/MimiWork | fdbb41163ac1216a8854c36ac8328fe8cc61a2d3 | [
"MIT"
] | 6 | 2021-11-11T11:01:21.000Z | 2022-01-06T18:22:04.000Z | services/api_service/schemas/token.py | datnguye/dbt-mssql | 8ecdff93e6dbae967de443a4fd122c54835d6c1f | [
"MIT"
] | null | null | null | services/api_service/schemas/token.py | datnguye/dbt-mssql | 8ecdff93e6dbae967de443a4fd122c54835d6c1f | [
"MIT"
] | 2 | 2021-11-13T11:33:19.000Z | 2021-11-24T05:35:58.000Z | from pydantic import BaseModel
class Token(BaseModel):
access_token: str
token_type: str | 16.333333 | 30 | 0.755102 |
7955fcbba4ca306f9ccacf0313f9808ed99999bd | 30,822 | py | Python | theano/compile/ops.py | brandonwillard/Theano | f375a0e999b950a81824a003f685b0bfd1c4e405 | [
"BSD-3-Clause"
] | null | null | null | theano/compile/ops.py | brandonwillard/Theano | f375a0e999b950a81824a003f685b0bfd1c4e405 | [
"BSD-3-Clause"
] | null | null | null | theano/compile/ops.py | brandonwillard/Theano | f375a0e999b950a81824a003f685b0bfd1c4e405 | [
"BSD-3-Clause"
] | 1 | 2020-08-15T17:09:10.000Z | 2020-08-15T17:09:10.000Z | """
This file contains auxiliary Ops, used during the compilation phase and Ops
building class (:class:`FromFunctionOp`) and decorator (:func:`as_op`) that
help make new Ops more rapidly.
"""
import copy
import warnings
from collections import OrderedDict
import numpy as np
import six.moves.cPickle as pickle
import... | 31.873837 | 86 | 0.588378 |
7955fdc5b6702592b8ad002c268404d44f4d482c | 526 | py | Python | src/event/migrations/0019_alter_workerimage_image.py | Niel-Richards/festival_accreditation | cfc837c29ead7679a30bf52e10ace75e868d4c4b | [
"MIT"
] | null | null | null | src/event/migrations/0019_alter_workerimage_image.py | Niel-Richards/festival_accreditation | cfc837c29ead7679a30bf52e10ace75e868d4c4b | [
"MIT"
] | null | null | null | src/event/migrations/0019_alter_workerimage_image.py | Niel-Richards/festival_accreditation | cfc837c29ead7679a30bf52e10ace75e868d4c4b | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2021-10-20 01:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('event', '0018_alter_workerimage_image'),
]
operations = [
migrations.AlterField(
model_name='workerimage',
name='image... | 27.684211 | 185 | 0.65019 |
7955fef71a5fe52a59524dd43efb2e04e34da1e3 | 3,391 | py | Python | tests/unit/jaml/test_type_parse.py | pete-sk/jina | e09ec8204e2e5a42e744898fb0cd74251e989146 | [
"Apache-2.0"
] | 1 | 2021-04-11T08:06:05.000Z | 2021-04-11T08:06:05.000Z | tests/unit/jaml/test_type_parse.py | pete-sk/jina | e09ec8204e2e5a42e744898fb0cd74251e989146 | [
"Apache-2.0"
] | 1 | 2021-07-16T17:36:22.000Z | 2021-09-22T13:48:18.000Z | tests/unit/jaml/test_type_parse.py | pete-sk/jina | e09ec8204e2e5a42e744898fb0cd74251e989146 | [
"Apache-2.0"
] | null | null | null | import pytest
from jina.executors import BaseExecutor
from jina.jaml import JAML, JAMLCompatible
from jina import __default_executor__, requests
class MyExecutor(BaseExecutor):
pass
def test_non_empty_reg_tags():
assert JAML.registered_tags()
assert __default_executor__ in JAML.registered_tags()
@pyt... | 24.049645 | 87 | 0.558242 |
7955ff1eaeb8fd7c79aafdcade51c599f5cc4d35 | 856 | py | Python | Servus/plugins/arduino_bmp085/widget.py | sug4rok/Servus | 9840d0e275085c08b99fc7662eb22f2ab253d8f8 | [
"MIT"
] | null | null | null | Servus/plugins/arduino_bmp085/widget.py | sug4rok/Servus | 9840d0e275085c08b99fc7662eb22f2ab253d8f8 | [
"MIT"
] | null | null | null | Servus/plugins/arduino_bmp085/widget.py | sug4rok/Servus | 9840d0e275085c08b99fc7662eb22f2ab253d8f8 | [
"MIT"
] | null | null | null | # coding=utf-8
from plugins.utils import get_used_plugins_by, get_latest_sensor_value
from climate.models import PressureValue
def get_widget_data(plan_id):
"""
Функция, предоставляющая данные атмосферного давления для каждого добавленого датчика BMP085/BMP180
:param plan_id: int ID планировки.
:ret... | 37.217391 | 103 | 0.75 |
7955ff72c6e15b2f71f797bb947dc8134e19f3a3 | 2,692 | py | Python | integreat_cms/cms/migrations/0032_region_bounding_box.py | Integreat/cms-django | ab0a89576ae901f4b30aa8e9c65ff43c44654a80 | [
"Apache-2.0"
] | 21 | 2018-10-26T20:10:45.000Z | 2020-10-22T09:41:46.000Z | integreat_cms/cms/migrations/0032_region_bounding_box.py | Integreat/cms-django | ab0a89576ae901f4b30aa8e9c65ff43c44654a80 | [
"Apache-2.0"
] | 392 | 2018-10-25T08:34:07.000Z | 2020-11-19T08:20:30.000Z | integreat_cms/cms/migrations/0032_region_bounding_box.py | digitalfabrik/integreat-cms | ab0a89576ae901f4b30aa8e9c65ff43c44654a80 | [
"Apache-2.0"
] | 23 | 2019-03-06T17:11:35.000Z | 2020-10-16T04:36:41.000Z | # Generated by Django 3.2.13 on 2022-06-15 10:58
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
"""
Add region bounding box fields
"""
dependencies = [
("cms", "0031_unique_version_constraint"),
]
operations = [
... | 32.433735 | 98 | 0.502229 |
7955ff9f43aa0c8a8d8895e74de1a18ac73acee7 | 1,383 | py | Python | boolean2/odict.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | boolean2/odict.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | boolean2/odict.py | AbrahmAB/booleannet | a07124047d18a5b7265e050a234969ac58970c7a | [
"MIT"
] | null | null | null | #
# a dictionary-like class that maintains the order of insertion
#
# based on a recipe by Igor Ghisi located at
#
# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/496761
#
from UserDict import DictMixin
class odict(DictMixin):
"""
>>> o = odict()
>>> o[2]=20 ; o[1]=10
>>> o.keys()
[2, 1]... | 21.609375 | 64 | 0.503254 |
7956006ef76cd0cabd62c3f3889f27d7f942d654 | 19,895 | py | Python | third_party/ros_aarch64/lib/python2.7/dist-packages/tf2_msgs/msg/_LookupTransformActionResult.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 2 | 2018-01-29T03:10:39.000Z | 2020-12-08T09:08:41.000Z | third_party/ros_x86_64/lib/python2.7/dist-packages/tf2_msgs/msg/_LookupTransformActionResult.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | null | null | null | third_party/ros_x86_64/lib/python2.7/dist-packages/tf2_msgs/msg/_LookupTransformActionResult.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 3 | 2018-01-29T12:22:56.000Z | 2020-12-08T09:08:46.000Z | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from tf2_msgs/LookupTransformActionResult.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import geometry_msgs.msg
import genpy
import actionlib_msgs.msg
import tf2_msgs.m... | 39.009804 | 370 | 0.628449 |
7956015004a392bd7649f084effc01bafb8aa254 | 2,661 | py | Python | {{cookiecutter.project_slug}}/controller.py | bingweichen/fic_flask_create_app | e55fb9e53122ff98676e0c622c65a952de50a01c | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/controller.py | bingweichen/fic_flask_create_app | e55fb9e53122ff98676e0c622c65a952de50a01c | [
"MIT"
] | null | null | null | {{cookiecutter.project_slug}}/controller.py | bingweichen/fic_flask_create_app | e55fb9e53122ff98676e0c622c65a952de50a01c | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import g
from flask_restplus import Resource, Namespace, fields
from app.{{cookiecutter.project_slug}} import service as {{cookiecutter.project_slug}}_service
from common.decorators import arguments_parser, catch_error
from common.responses import created, ok
f... | 40.318182 | 171 | 0.71289 |
7956030a2563c04ca3761886ef523e69de13a563 | 2,045 | py | Python | twill/extensions/match_parse.py | rickproza/twill | 7a98e4912a8ff929a94e35d35e7a027472ee4f46 | [
"MIT"
] | 13 | 2020-04-18T15:17:58.000Z | 2022-02-24T13:25:46.000Z | twill/extensions/match_parse.py | rickproza/twill | 7a98e4912a8ff929a94e35d35e7a027472ee4f46 | [
"MIT"
] | 5 | 2020-04-04T21:16:00.000Z | 2022-02-10T00:26:20.000Z | twill/extensions/match_parse.py | rickproza/twill | 7a98e4912a8ff929a94e35d35e7a027472ee4f46 | [
"MIT"
] | 3 | 2020-06-06T17:26:19.000Z | 2022-02-10T00:30:39.000Z | """
Suresh's extension for slicing and dicing variables with regular expressions.
"""
import re
from twill import browser, log
from twill.namespaces import get_twill_glocals
def showvar(which):
""">> showvar var
Shows the value of the variable 'var'.
"""
global_dict, local_dict = get_twill_glocals(... | 22.228261 | 77 | 0.667482 |
79560333320518d11d8277843febb06b082dc082 | 12,622 | py | Python | tests/system/libraries/NvdaLib.py | moyanming/nvda | 78b54ecbbb509e9633f6d5e58a06d67706578dec | [
"bzip2-1.0.6"
] | null | null | null | tests/system/libraries/NvdaLib.py | moyanming/nvda | 78b54ecbbb509e9633f6d5e58a06d67706578dec | [
"bzip2-1.0.6"
] | null | null | null | tests/system/libraries/NvdaLib.py | moyanming/nvda | 78b54ecbbb509e9633f6d5e58a06d67706578dec | [
"bzip2-1.0.6"
] | null | null | null | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2020 NV Access Limited
# This file may be used under the terms of the GNU General Public License, version 2 or later.
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
"""This file provides robot library functions for NVDA system tests.
... | 39.198758 | 106 | 0.744256 |
795603665a621e76ede82a6e21de6af1fa7f8a21 | 902 | py | Python | xchainpy/xchainpy_crypto/xchainpy_crypto/models/KdfParams.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 8 | 2021-02-16T23:14:14.000Z | 2022-03-22T09:35:58.000Z | xchainpy/xchainpy_crypto/xchainpy_crypto/models/KdfParams.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 12 | 2021-04-06T19:31:46.000Z | 2022-03-22T14:34:13.000Z | xchainpy/xchainpy_crypto/xchainpy_crypto/models/KdfParams.py | SLjavad/xchainpy-lib | e79b1fd341adaf9267964f3368500dd48de60917 | [
"MIT"
] | 10 | 2021-03-04T05:45:31.000Z | 2022-03-31T14:44:01.000Z | class KdfParams:
def __init__(self, prf:str , dklen:int , salt:str , c:int):
self._prf = prf
self._dklen = dklen
self._salt = salt
self._c = c
@classmethod
def from_dict(cls, kdfparams):
new_kdfparams = cls.__new__(cls)
for key in kdfparams:
setat... | 20.044444 | 63 | 0.553215 |
79560476da801df9be680f37601283e401ddf943 | 1,281 | py | Python | dtaidistance/clustering/visualization.py | hakimakbarmaulana/dtaidistance | ddf4a8111732d4429686d96c9195a81151be1dd8 | [
"Apache-2.0"
] | 711 | 2017-02-07T07:24:58.000Z | 2022-03-31T07:46:47.000Z | dtaidistance/clustering/visualization.py | hakimakbarmaulana/dtaidistance | ddf4a8111732d4429686d96c9195a81151be1dd8 | [
"Apache-2.0"
] | 142 | 2018-04-09T10:36:11.000Z | 2022-03-31T11:30:26.000Z | dtaidistance/clustering/visualization.py | hakimakbarmaulana/dtaidistance | ddf4a8111732d4429686d96c9195a81151be1dd8 | [
"Apache-2.0"
] | 155 | 2017-06-01T08:37:45.000Z | 2022-03-23T08:50:13.000Z |
from ..exceptions import MatplotlibException
def prepare_plot_options(show_ts_label, show_tr_label):
if show_ts_label is True:
show_ts_label = lambda idx: str(int(idx))
elif show_ts_label is False or show_ts_label is None:
show_ts_label = lambda idx: ""
elif callable(show_ts_label):
... | 37.676471 | 109 | 0.678376 |
795604f9aaf0002baa996f411d96c70a1cf03112 | 1,769 | py | Python | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | 1 | 2018-07-04T18:29:43.000Z | 2018-07-04T18:29:43.000Z | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | 8 | 2018-07-22T03:41:24.000Z | 2022-03-11T23:21:22.000Z | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | null | null | null | """robot_view URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 40.204545 | 77 | 0.75636 |
795605379ac682eb6a4741e36494e7c81d6f8ad3 | 8,046 | py | Python | scrapy_httpcache/downloadermiddlewares/httpcache.py | vuchau/scrapy-httpcache | abef71aafe43b7449469df94101407184bb9d1a6 | [
"BSD-3-Clause"
] | 9 | 2018-03-06T06:42:42.000Z | 2022-01-16T01:56:25.000Z | scrapy_httpcache/downloadermiddlewares/httpcache.py | vuchau/scrapy-httpcache | abef71aafe43b7449469df94101407184bb9d1a6 | [
"BSD-3-Clause"
] | 3 | 2018-03-12T09:48:42.000Z | 2021-04-09T09:07:17.000Z | scrapy_httpcache/downloadermiddlewares/httpcache.py | vuchau/scrapy-httpcache | abef71aafe43b7449469df94101407184bb9d1a6 | [
"BSD-3-Clause"
] | 10 | 2018-06-13T02:46:17.000Z | 2022-01-23T04:37:49.000Z | import logging
import six
from scrapy import Spider, signals
from scrapy.http import Request, Response
from scrapy.downloadermiddlewares.httpcache import HttpCacheMiddleware, load_object, \
NotConfigured, formatdate, IgnoreRequest
from scrapy.settings import Settings
from scrapy.utils.request import request_finger... | 41.90625 | 115 | 0.665051 |
79560588afee14347a26ce4b52ba1ab136883763 | 30,577 | py | Python | khorosjx/core.py | jeffshurtliff/khorosjx | 1530fad25eb8ccefcbb5a9ae63c09a6858cb033d | [
"MIT"
] | 2 | 2019-11-18T03:52:51.000Z | 2020-12-30T04:08:06.000Z | khorosjx/core.py | jeffshurtliff/khorosjx | 1530fad25eb8ccefcbb5a9ae63c09a6858cb033d | [
"MIT"
] | 2 | 2019-12-17T17:02:30.000Z | 2021-06-02T13:56:02.000Z | khorosjx/core.py | jeffshurtliff/khorosjx | 1530fad25eb8ccefcbb5a9ae63c09a6858cb033d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
:Module: khorosjx.core
:Synopsis: Collection of core functions and tools to work with the Jive Core API v3
:Usage: ``import khorosjx.core`` (Imported by default in primary package)
:Example: ``user_info = khorosjx.core.get_data('people', 'john.doe@ex... | 43.495021 | 120 | 0.673742 |
795607511277fd96f6f2ababcdbcf446e0842ce8 | 13,941 | py | Python | deprecated/python/soappy/ncbiblast_soappy.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | null | null | null | deprecated/python/soappy/ncbiblast_soappy.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | null | null | null | deprecated/python/soappy/ncbiblast_soappy.py | SamFent/webservice-clients | b4c1ab0d4e0535cc8e79a0d5e731aaafef3193f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# ======================================================================
#
# Copyright 2008-2018 EMBL - European Bioinformatics Institute
#
# 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 ... | 39.160112 | 149 | 0.681874 |
79560760a9f941e6ec308ffa08f4124ef34c7c8d | 856 | py | Python | line_bot/urls.py | andy89923/Fuelator-Public | 5386f8cc10a4f03cdacdb95eb2eb9eb21a2a3693 | [
"MIT"
] | null | null | null | line_bot/urls.py | andy89923/Fuelator-Public | 5386f8cc10a4f03cdacdb95eb2eb9eb21a2a3693 | [
"MIT"
] | null | null | null | line_bot/urls.py | andy89923/Fuelator-Public | 5386f8cc10a4f03cdacdb95eb2eb9eb21a2a3693 | [
"MIT"
] | null | null | null | """line_bot URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-base... | 32.923077 | 77 | 0.71028 |
795607e5df579f6bfd8589bd8578d8092e56133d | 1,271 | py | Python | parakeet/frontend/normalizer/normalizer.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | 501 | 2020-02-28T12:46:59.000Z | 2022-03-29T19:49:52.000Z | parakeet/frontend/normalizer/normalizer.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | 75 | 2020-03-24T04:40:41.000Z | 2021-11-19T02:18:30.000Z | parakeet/frontend/normalizer/normalizer.py | zh794390558/DeepSpeech | 34178893327ad359cb816e55d7c66a10244fa08a | [
"Apache-2.0"
] | 79 | 2020-03-11T01:50:26.000Z | 2022-03-20T09:37:07.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 36.314286 | 74 | 0.715972 |
795609154b33236b70f10efce21a0c7c6e1856ff | 12,094 | py | Python | tests/test_detection.py | Lucas-Prates/ruptures | 9685818d08ca024c0abb6ecf6121f2f86fb26dba | [
"BSD-2-Clause"
] | 942 | 2018-01-20T20:11:43.000Z | 2022-03-29T09:30:29.000Z | tests/test_detection.py | Lucas-Prates/ruptures | 9685818d08ca024c0abb6ecf6121f2f86fb26dba | [
"BSD-2-Clause"
] | 171 | 2018-03-08T18:15:32.000Z | 2022-03-31T18:36:00.000Z | tests/test_detection.py | Lucas-Prates/ruptures | 9685818d08ca024c0abb6ecf6121f2f86fb26dba | [
"BSD-2-Clause"
] | 144 | 2018-03-05T20:54:36.000Z | 2022-03-31T08:59:54.000Z | from copy import deepcopy
from itertools import product
import numpy as np
import pytest
from ruptures.costs import CostAR
from ruptures.datasets import pw_constant
from ruptures.detection import Binseg, BottomUp, Dynp, Pelt, Window, KernelCPD
from ruptures.exceptions import BadSegmentationParameters
@pytest.fixtur... | 31.250646 | 88 | 0.669257 |
795609d95e6ad8215a945b8c4d1432d8c4b39416 | 1,449 | py | Python | models/body/control_body.py | Mirmik/zippo | 50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c | [
"MIT"
] | null | null | null | models/body/control_body.py | Mirmik/zippo | 50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c | [
"MIT"
] | null | null | null | models/body/control_body.py | Mirmik/zippo | 50097d9b33c165d8f6a8ec65b22db4b1c4e1f61c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#coding: utf-8
from zencad import *
import params
x = params.body_x
y = params.body_y
t = params.bottom_wall_thikness
z = 35
platform_offset = 40
filrad = 5 #Радиус скругления
zh = 4
nhz = 3
nut_holder = linear_extrude(ngon(r=5.5,n=6),(0,0,nhz)) - linear_extrude(ngon(r=3.5,n=6),(0,0,nhz))... | 24.559322 | 106 | 0.668047 |
79560b720cb7d07563bc55bbd6d5e9223ad7b6d3 | 10,129 | py | Python | benchmark/old/dbc/tb/d3_cpu_TensorBayes_v4.2.py | jklopf/tensorbayes | 4b0cb3c565e9603a972135ddf7cfbe28a23b3a4a | [
"MIT"
] | 1 | 2018-11-12T16:58:32.000Z | 2018-11-12T16:58:32.000Z | benchmark/old/dbc/tb/d3_cpu_TensorBayes_v4.2.py | jklopf/tensorbayes | 4b0cb3c565e9603a972135ddf7cfbe28a23b3a4a | [
"MIT"
] | null | null | null | benchmark/old/dbc/tb/d3_cpu_TensorBayes_v4.2.py | jklopf/tensorbayes | 4b0cb3c565e9603a972135ddf7cfbe28a23b3a4a | [
"MIT"
] | null | null | null | ## Imports
import tensorflow as tf
import tensorflow_probability as tfp
import numpy as np
from timeit import repeat
tfd = tfp.distributions
import psutil
from tqdm import tqdm
'''
This version is able to retrieve the simulated parameters and
store the history of the sampling, and implement the tensorflow dataset API ... | 30.601208 | 141 | 0.663145 |
79560ca4df259e8a172e3afa2803dc3a6a104d32 | 27 | py | Python | Hello.py | kscime/MB215LAB1 | bd046ba2948d1a122d0d9e3d57a7247b7488d85e | [
"MIT"
] | null | null | null | Hello.py | kscime/MB215LAB1 | bd046ba2948d1a122d0d9e3d57a7247b7488d85e | [
"MIT"
] | null | null | null | Hello.py | kscime/MB215LAB1 | bd046ba2948d1a122d0d9e3d57a7247b7488d85e | [
"MIT"
] | null | null | null | print("Hello Katelyn!")
| 9 | 24 | 0.62963 |
79560ccae3db95790252e73d9081f4acbe76e4bb | 6,804 | py | Python | tests/test_client.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | tests/test_client.py | xubiuit/jina | 4ab91693c2d51a35eca3cf6c187034e0568b0ac9 | [
"Apache-2.0"
] | null | null | null | import time
import numpy as np
import requests
from jina.clients import py_client
from jina.clients.python import PyClient
from jina.clients.python.io import input_files, input_numpy
from jina.drivers.helper import array2pb
from jina.enums import ClientMode
from jina.flow import Flow
from jina.main.parser import set_g... | 56.7 | 425 | 0.701058 |
79560d28d3666623d2bc2451083c52743b142a9d | 14,718 | py | Python | gibson/core/physics/robot_bases.py | micheleantonazzi/GibsonEnv | 4b9c57712efdf519015f9ba40c85a6b168ed3660 | [
"MIT"
] | null | null | null | gibson/core/physics/robot_bases.py | micheleantonazzi/GibsonEnv | 4b9c57712efdf519015f9ba40c85a6b168ed3660 | [
"MIT"
] | null | null | null | gibson/core/physics/robot_bases.py | micheleantonazzi/GibsonEnv | 4b9c57712efdf519015f9ba40c85a6b168ed3660 | [
"MIT"
] | null | null | null | ## Author: pybullet, Zhiyang He
import pybullet as p
import gym, gym.spaces, gym.utils
import numpy as np
import os, inspect
from gibson.assets.assets_manager import AssetsManager
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
os.sys.pat... | 39.778378 | 188 | 0.633578 |
79560d77721bf3983d8c8c52f9dc5b99f0c14c18 | 25,662 | py | Python | controllers/hrm.py | gnarula/eden | 13b930b6cfa1724a1d7e298aadd51dfb1feb53d6 | [
"MIT"
] | null | null | null | controllers/hrm.py | gnarula/eden | 13b930b6cfa1724a1d7e298aadd51dfb1feb53d6 | [
"MIT"
] | null | null | null | controllers/hrm.py | gnarula/eden | 13b930b6cfa1724a1d7e298aadd51dfb1feb53d6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Human Resource Management
"""
module = request.controller
resourcename = request.function
if not settings.has_module(module):
raise HTTP(404, body="Module disabled: %s" % module)
s3db.hrm_vars()
# =============================================================================
def ... | 33.240933 | 111 | 0.4698 |
79560d7e6af36cc28d450cfa27cc418c04856c31 | 1,983 | py | Python | aioskybell/helpers/models.py | tkdrob/aioskybell | d07a091ecc5cf3122da9ea1f0bbdbfa3bedaac05 | [
"MIT"
] | null | null | null | aioskybell/helpers/models.py | tkdrob/aioskybell | d07a091ecc5cf3122da9ea1f0bbdbfa3bedaac05 | [
"MIT"
] | 3 | 2022-03-01T06:32:55.000Z | 2022-03-08T17:08:16.000Z | aioskybell/helpers/models.py | tkdrob/aioskybell | d07a091ecc5cf3122da9ea1f0bbdbfa3bedaac05 | [
"MIT"
] | null | null | null | """Models for Skybell."""
from __future__ import annotations
from datetime import datetime
class InfoDict(dict):
"""Class for info."""
address: str
checkedInAt: str
clientId: str
deviceId: str
essid: str
firmwareVersion: str
hardwareRevision: str
localHostname: str
mac: str
... | 19.441176 | 52 | 0.648512 |
79560d8edc5b4902fea99693bb953e9f1af7749f | 1,210 | py | Python | note5/std_test.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | note5/std_test.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | note5/std_test.py | icexmoon/python-learning-notes | 838c91d896404290b89992b6517be1b6a79df41f | [
"MIT"
] | null | null | null | import random
print(random.random())
#生成一个随机整数
print(random.randint(1,10))
#在一个list中随机选定多个
print(random.sample([1,2,3,4,5,6],3))
# 0.9078117032490299
# 9
# [3, 2, 1]
import sys
print(sys.argv)
print(sys.path)
sys.path.append("D:\\worksapce\\python\\time_tools")
print(sys.path)
# ['D:\\workspace\\python\\python-learning... | 67.222222 | 450 | 0.696694 |
79560de5ffe8743a70af8f6eabae540ba8ebf82d | 5,835 | py | Python | dash_bio/FornaContainer.py | shday/dash-bio-1 | 81bb6fa257febb59d7841f8c5573e7231f5a9095 | [
"MIT"
] | 2 | 2020-06-30T12:19:53.000Z | 2020-11-18T08:47:29.000Z | dash_bio/FornaContainer.py | shday/dash-bio-1 | 81bb6fa257febb59d7841f8c5573e7231f5a9095 | [
"MIT"
] | 5 | 2020-09-07T22:33:52.000Z | 2022-02-13T05:18:30.000Z | dash_bio/FornaContainer.py | shday/dash-bio-1 | 81bb6fa257febb59d7841f8c5573e7231f5a9095 | [
"MIT"
] | 1 | 2020-06-09T15:29:19.000Z | 2020-06-09T15:29:19.000Z | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class FornaContainer(Component):
"""A FornaContainer component.
FornaContainer is a force-directed graph that is used to visualize
the secondary structure of biomolecules. It is based on the fornac
librar... | 58.939394 | 289 | 0.750129 |
79560f15741b069935a4d3c9c7a5bb3ae369da83 | 2,309 | py | Python | sitemessage/messengers/twitter.py | furins/django-sitemessage | 4cdfa0e78eb122dea835c9c4ef845f44e3a5eb90 | [
"BSD-3-Clause"
] | null | null | null | sitemessage/messengers/twitter.py | furins/django-sitemessage | 4cdfa0e78eb122dea835c9c4ef845f44e3a5eb90 | [
"BSD-3-Clause"
] | null | null | null | sitemessage/messengers/twitter.py | furins/django-sitemessage | 4cdfa0e78eb122dea835c9c4ef845f44e3a5eb90 | [
"BSD-3-Clause"
] | null | null | null | from django.utils.translation import gettext as _
from .base import MessengerBase
from ..exceptions import MessengerWarmupException
class TwitterMessenger(MessengerBase):
"""Implements to Twitter message delivery using `twitter` module.
https://github.com/sixohsix/twitter
"""
alias = 'twitter'
... | 30.786667 | 136 | 0.637505 |
79560fc75693c1e5db85c6f9d05dc5410ac1851c | 59 | py | Python | multacdkrecipies/recipies/utils/__init__.py | u93/multa-cdkrecipies | f9ea04f2c85aa8848d21a3c93f40eaa68c3065a1 | [
"MIT"
] | 2 | 2020-08-02T05:44:32.000Z | 2020-10-02T01:38:18.000Z | multacdkrecipies/recipies/utils/__init__.py | u93/multa-cdkrecipies | f9ea04f2c85aa8848d21a3c93f40eaa68c3065a1 | [
"MIT"
] | 6 | 2021-02-06T21:05:35.000Z | 2021-04-25T18:45:48.000Z | multacdkrecipies/recipies/utils/__init__.py | u93/multa-cdkrecipies | f9ea04f2c85aa8848d21a3c93f40eaa68c3065a1 | [
"MIT"
] | 1 | 2020-10-01T00:42:09.000Z | 2020-10-01T00:42:09.000Z | from .common_functions import *
from .validations import *
| 19.666667 | 31 | 0.79661 |
79561033fdd8596e6ef8548c7992a8510657a8b4 | 9,094 | py | Python | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 8 | 2015-04-27T00:41:03.000Z | 2021-11-14T17:15:26.000Z | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 84 | 2015-04-27T12:15:00.000Z | 2021-11-28T19:06:23.000Z | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 4 | 2015-11-14T16:20:40.000Z | 2017-09-05T00:27:49.000Z | import array
import contextlib
import logging
import mmap
import os
import socket
import struct
from io import FileIO
from typing import Callable, Dict, Generator, List, Optional, Tuple, TypeVar
import pytest
from _pytest.logging import LogCaptureFixture
from hades.leases.server import (
BufferTooSmallError, Bas... | 29.241158 | 98 | 0.609083 |
795611b2643730f5064581ee727f908774de1454 | 841 | py | Python | code-everyday-challenge/n07_day.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null | code-everyday-challenge/n07_day.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null | code-everyday-challenge/n07_day.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null |
#fibonacci pisano period
import sys
def get_fibonacci_huge(n,m):
if n <= 1:
return n
a=pisanoperiod(get_fibonacci(m))
previous=0
current =1
g = n%a
if g <= 1:
return g
for i in range(g-1):
previous,current = current,previous+current
if i%10 ==0:
... | 15.017857 | 51 | 0.51962 |
795611b379557f9804e80ce00bfdbd777f2f116f | 770 | py | Python | resources/discovery.py | fragaria/gap-resources | fdf0084f6cbd014b788209d288ea3793493a8208 | [
"MIT"
] | null | null | null | resources/discovery.py | fragaria/gap-resources | fdf0084f6cbd014b788209d288ea3793493a8208 | [
"MIT"
] | null | null | null | resources/discovery.py | fragaria/gap-resources | fdf0084f6cbd014b788209d288ea3793493a8208 | [
"MIT"
] | null | null | null | from google.appengine.ext import ndb
from gap.utils.imports import import_class
from register import register
from resources.resource import Resource
def discover_models(modules):
for module in modules:
module = import_class(module)
if module.__class__ == 'module':
for model in [m f... | 33.478261 | 127 | 0.675325 |
795611e9f93debce6fea4485ed430f870d89d994 | 1,436 | py | Python | pyramid_debugtoolbar/panels/renderings.py | rollbar/pyramid_debugtoolbar | dab4278eb68b801b1d3e9679cf1308096c3f849f | [
"Apache-2.0"
] | null | null | null | pyramid_debugtoolbar/panels/renderings.py | rollbar/pyramid_debugtoolbar | dab4278eb68b801b1d3e9679cf1308096c3f849f | [
"Apache-2.0"
] | null | null | null | pyramid_debugtoolbar/panels/renderings.py | rollbar/pyramid_debugtoolbar | dab4278eb68b801b1d3e9679cf1308096c3f849f | [
"Apache-2.0"
] | 1 | 2021-02-21T12:18:04.000Z | 2021-02-21T12:18:04.000Z | from pyramid_debugtoolbar.panels import DebugPanel
from pyramid_debugtoolbar.utils import dictrepr
from pyramid_debugtoolbar.compat import text_
_ = lambda x: x
class RenderingsDebugPanel(DebugPanel):
"""
Panel that displays the renderers (templates and 'static' renderers such
as JSON) used during a reque... | 27.615385 | 76 | 0.625348 |
7956120bad327dc93b38b9ba47682f0bac200a70 | 1,437 | py | Python | lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py | tkf/opencilk-project | 48265098754b785d1b06cb08d8e22477a003efcd | [
"MIT"
] | 2 | 2019-05-24T14:10:24.000Z | 2019-05-24T14:27:38.000Z | packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 10 | 2018-05-27T23:16:42.000Z | 2019-09-30T13:28:45.000Z | packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 3 | 2019-12-21T06:35:35.000Z | 2020-06-07T23:18:58.000Z | """
Make sure the !N and !-N commands work properly.
"""
from __future__ import print_function
import os
import time
import re
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
class TestHistoryRecall(TestBase):
mydir = TestBase.compute_mydir(__file__)
# If your... | 31.23913 | 99 | 0.677105 |
795612284446b131d597c5b9d3a1eb79c32b705f | 5,865 | py | Python | experiments/image_experiments.py | kckishan/Depth_and_Dropout | 64bbff9169d588486d92946485e108342daa29b0 | [
"MIT"
] | 1 | 2021-11-19T06:43:12.000Z | 2021-11-19T06:43:12.000Z | experiments/image_experiments.py | kckishan/Depth_and_Dropout | 64bbff9169d588486d92946485e108342daa29b0 | [
"MIT"
] | null | null | null | experiments/image_experiments.py | kckishan/Depth_and_Dropout | 64bbff9169d588486d92946485e108342daa29b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
from tqdm import tqdm
import os
import torch
import torchvision
import torchvision.transforms as transforms
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.style.use("d... | 37.596154 | 122 | 0.619437 |
7956144083ffb2ec2ad5576682871465cb431994 | 10,623 | py | Python | Controller/pesquisa_servico.py | felipezago/ControleEstoque | 229659c4f9888fd01df34375ec92af7a1f734d10 | [
"MIT"
] | null | null | null | Controller/pesquisa_servico.py | felipezago/ControleEstoque | 229659c4f9888fd01df34375ec92af7a1f734d10 | [
"MIT"
] | null | null | null | Controller/pesquisa_servico.py | felipezago/ControleEstoque | 229659c4f9888fd01df34375ec92af7a1f734d10 | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import QMessageBox, QTableWidgetItem, QMainWindow
from PyQt5.QtCore import Qt
from Model.Servicos import Servicos
from PyQt5 import QtGui
from PyQt5 import QtCore
class EventFilter(QtCore.QObject):
def __init__(self, parent=None):
QtCore.QObject.__init__(self, parent)
def eventF... | 38.770073 | 104 | 0.603973 |
7956144c2313bfc249ff2ca11e8932687e81a7a0 | 236 | py | Python | tests/test_pylogging.py | twocucao/YaPyLib | 8fe56f35b9f45d3c7f688ab5842c3a1e50688e01 | [
"MIT"
] | 2 | 2017-05-21T01:58:37.000Z | 2018-02-23T15:35:14.000Z | tests/test_pylogging.py | twocucao/YaPyLib | 8fe56f35b9f45d3c7f688ab5842c3a1e50688e01 | [
"MIT"
] | 1 | 2021-06-08T19:12:08.000Z | 2021-06-08T19:12:08.000Z | tests/test_pylogging.py | twocucao/YaPyLib | 8fe56f35b9f45d3c7f688ab5842c3a1e50688e01 | [
"MIT"
] | null | null | null | from yapylib.logging import get_logger
def test_get_logger():
get_logger().debug("测试 DEBUG ")
get_logger().info("测试 INFO ")
get_logger().critical("测试 CRITICAL ")
get_logger().error("测试 ERROR ")
assert True == True
| 23.6 | 41 | 0.669492 |
795614cd7764f4e566c0653a9fcc2de725de22fe | 121,357 | py | Python | PILasOPENCV.py | bunkahle/PILasOPENCV | 5acfe7279a88ddfb09f431ffec369a527885072e | [
"MIT"
] | 19 | 2019-05-05T07:37:10.000Z | 2021-12-09T15:52:51.000Z | PILasOPENCV.py | bunkahle/PILasOPENCV | 5acfe7279a88ddfb09f431ffec369a527885072e | [
"MIT"
] | 5 | 2019-04-09T23:54:17.000Z | 2021-05-16T08:31:22.000Z | PILasOPENCV.py | bunkahle/PILasOPENCV | 5acfe7279a88ddfb09f431ffec369a527885072e | [
"MIT"
] | 6 | 2019-04-08T12:33:34.000Z | 2021-05-15T14:57:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import numpy as np
import cv2
try:
import gif2numpy
gif2numpy_installed = True
except:
gif2numpy_installed = False
try:
import numpy2gif
numpy2gif_installed = True
except:
numpy2gif_installed = Fa... | 38.946406 | 310 | 0.547426 |
7956151cdba0ab2afd51b433efd4d89206bb2d70 | 22,195 | py | Python | tacker/sol_refactored/infra_drivers/openstack/openstack.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 116 | 2015-10-18T02:57:08.000Z | 2022-03-15T04:09:18.000Z | tacker/sol_refactored/infra_drivers/openstack/openstack.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 6 | 2016-11-07T22:15:54.000Z | 2021-05-09T06:13:08.000Z | tacker/sol_refactored/infra_drivers/openstack/openstack.py | h1r0mu/tacker | 8c69dda51fcfe215c4878a86b82018d2b96e5561 | [
"Apache-2.0"
] | 166 | 2015-10-20T15:31:52.000Z | 2021-11-12T08:39:49.000Z | # Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# 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/LICE... | 41.408582 | 79 | 0.577788 |
7956153f1259f96dd0865165951ff7eca1141bfb | 7,132 | py | Python | src/core/layers/scalable_graphlearn.py | yuanqidu/IDGL | 64d2d73289ca0f6dcab966062d4cb15844236b37 | [
"Apache-2.0"
] | 153 | 2019-12-22T07:26:10.000Z | 2022-03-29T02:03:18.000Z | src/core/layers/scalable_graphlearn.py | yuanqidu/IDGL | 64d2d73289ca0f6dcab966062d4cb15844236b37 | [
"Apache-2.0"
] | 17 | 2020-01-14T15:20:26.000Z | 2022-01-23T06:06:03.000Z | src/core/layers/scalable_graphlearn.py | yuanqidu/IDGL | 64d2d73289ca0f6dcab966062d4cb15844236b37 | [
"Apache-2.0"
] | 21 | 2020-07-27T00:58:37.000Z | 2022-02-02T01:47:37.000Z | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..utils.generic_utils import to_cuda, normalize_adj
from ..utils.constants import VERY_SMALL_NUMBER, INF
def compute_normalized_laplacian(adj):
rowsum = torch.sum(adj, -1)
d_inv_sqrt = torch.pow(rowsum, -0.5)
d_inv_sqrt[t... | 40.988506 | 133 | 0.645121 |
795615caf7840d1211dbecdf54b583eae88e9675 | 2,067 | py | Python | test/test_mutatate_strategies.py | cslotboom/Naturalize | f54beb0baa53f33a66e85660738eb4880419aa1e | [
"MIT"
] | null | null | null | test/test_mutatate_strategies.py | cslotboom/Naturalize | f54beb0baa53f33a66e85660738eb4880419aa1e | [
"MIT"
] | null | null | null | test/test_mutatate_strategies.py | cslotboom/Naturalize | f54beb0baa53f33a66e85660738eb4880419aa1e | [
"MIT"
] | null | null | null |
import naturalize.mutate.strategies as st
# from naturalize.solutionClass import Individual
import numpy as np
# np.random.seed(25)
N = 6
genea = np.linspace(0,5,N)
geneb = np.linspace(0,5,N)*5
Pvector = np.array([0.1, 0.1, 0.4, 0.5, 1, 0.1])
threshold = 0.2
bounds = np.ones([2,N])*np.array([[0,30]]).T
# purtThres... | 26.5 | 81 | 0.670053 |
7956185868f3f5607ec5540020f2d0b1f02fcaaa | 10,606 | py | Python | venv/lib/python2.7/site-packages/alembic/ddl/mysql.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/alembic/ddl/mysql.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/alembic/ddl/mysql.py | jessekl/twiliochallenge | 2bba8bc2e0928880f1e2abe6b53b96dbc67ef34f | [
"MIT"
] | null | null | null | from sqlalchemy.ext.compiler import compiles
from sqlalchemy import types as sqltypes
from sqlalchemy import schema
from ..compat import string_types
from .. import util
from .impl import DefaultImpl
from .base import ColumnNullable, ColumnName, ColumnDefault, \
ColumnType, AlterColumn, format_column_name, \
f... | 36.954704 | 76 | 0.589289 |
7956187d05c0f76baae9f93d2debb11aa99835a9 | 21 | py | Python | projects/flake8-quotes/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 25 | 2021-10-30T19:54:59.000Z | 2022-03-29T06:11:02.000Z | projects/flake8-quotes/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 21 | 2021-10-19T01:09:38.000Z | 2022-03-24T16:08:53.000Z | projects/flake8-quotes/test.py | quinn-dougherty/python-on-nix | 910d3f6554acd4a4ef0425ebccd31104dccb283c | [
"Unlicense"
] | 3 | 2022-01-25T20:25:13.000Z | 2022-03-08T02:58:50.000Z | import flake8_quotes
| 10.5 | 20 | 0.904762 |
79561890e099f681c1377d32704e8676464b3ab8 | 3,909 | py | Python | django_extensions/management/commands/show_template_tags.py | KazakovDenis/django-extensions | ef3b3abe3c3d6563b73633bd25e3ff3ac9716661 | [
"MIT"
] | 4,057 | 2015-01-01T17:56:25.000Z | 2022-03-31T16:32:40.000Z | django_extensions/management/commands/show_template_tags.py | KazakovDenis/django-extensions | ef3b3abe3c3d6563b73633bd25e3ff3ac9716661 | [
"MIT"
] | 1,115 | 2015-01-01T14:59:38.000Z | 2022-03-28T22:05:55.000Z | django_extensions/management/commands/show_template_tags.py | KazakovDenis/django-extensions | ef3b3abe3c3d6563b73633bd25e3ff3ac9716661 | [
"MIT"
] | 951 | 2015-01-02T16:57:26.000Z | 2022-03-28T21:42:22.000Z | # -*- coding: utf-8 -*-
import inspect
import os
import re
from django.apps import apps
from django.core.management import color
from django.core.management import BaseCommand
from django.utils import termcolors
from django.utils.encoding import smart_text
from django_extensions.compat import load_tag_library
from d... | 34.289474 | 97 | 0.601177 |
79561959859aa71c4ed28e1c638fff2be021a6d4 | 23,047 | py | Python | kivy/network/urlrequest.py | VICTORVICKIE/kivy | 55abc963fe9099c078a3a2253397de70c2ee17b1 | [
"MIT"
] | 13,889 | 2015-01-01T06:43:41.000Z | 2022-03-31T17:37:56.000Z | kivy/network/urlrequest.py | VICTORVICKIE/kivy | 55abc963fe9099c078a3a2253397de70c2ee17b1 | [
"MIT"
] | 4,570 | 2015-01-01T17:58:52.000Z | 2022-03-31T18:42:16.000Z | kivy/network/urlrequest.py | VICTORVICKIE/kivy | 55abc963fe9099c078a3a2253397de70c2ee17b1 | [
"MIT"
] | 3,786 | 2015-01-01T09:20:45.000Z | 2022-03-30T21:15:05.000Z | '''
UrlRequest
==========
.. versionadded:: 1.0.8
You can use the :class:`UrlRequest` to make asynchronous requests on the
web and get the result when the request is completed. The spirit is the
same as the XHR object in Javascript.
The content is also decoded if the Content-Type is
application/json and the result a... | 34.972686 | 79 | 0.559465 |
795619686fdfb5131e3c5ae79cd406e379d7047e | 3,011 | py | Python | jarvis/User.py | open-jarvis/jarvis-pip | 96eb11a2a3b4eac0449528095e17302f564b64dd | [
"MIT"
] | null | null | null | jarvis/User.py | open-jarvis/jarvis-pip | 96eb11a2a3b4eac0449528095e17302f564b64dd | [
"MIT"
] | null | null | null | jarvis/User.py | open-jarvis/jarvis-pip | 96eb11a2a3b4eac0449528095e17302f564b64dd | [
"MIT"
] | null | null | null | """
Copyright (c) 2021 Philipp Scheer
"""
import time
import json
import random
import traceback
import jinja2
from jarvis import Database, Security, Config
class User:
def __init__(self, id=None, username=None, password=None, _id=None, **data) -> None:
self.id = id or _id
self.username = userna... | 25.956897 | 96 | 0.524743 |
795619b2b73dab42914746456fe815050ae59836 | 6,860 | py | Python | hp_tune.py | rbiswas143/deep-audioviz-experiments-train | 294c648ca9115efce6127fb242ac3f6f51cdf532 | [
"MIT"
] | 9 | 2018-12-31T08:33:20.000Z | 2020-10-10T21:06:22.000Z | hp_tune.py | rbiswas143/deep-audioviz-experiments-train | 294c648ca9115efce6127fb242ac3f6f51cdf532 | [
"MIT"
] | 10 | 2021-03-08T21:14:13.000Z | 2022-03-11T23:25:12.000Z | hp_tune.py | rbiswas143/deep-audioviz-experiments-train | 294c648ca9115efce6127fb242ac3f6f51cdf532 | [
"MIT"
] | 1 | 2019-10-22T20:13:23.000Z | 2019-10-22T20:13:23.000Z | """CLI and utils for training a batch of models and analysing hyper parameter tuning results"""
import train
import models
import data_processor as dp
import commons
import argparse
import torch
import os
import collections
def train_models(training_configs, email=False):
"""Train a batch of models"""
for i... | 42.875 | 118 | 0.681778 |
79561a7395946fdc7d7ebac69fc6d73578cd9bf6 | 10,400 | py | Python | test/test_visuals.py | zayed22/kepler-mapper | 1224e5d8e64e16ebe9e9ef989556a6ea3e2b214e | [
"MIT"
] | 1 | 2020-01-02T04:28:40.000Z | 2020-01-02T04:28:40.000Z | test/test_visuals.py | zayed22/kepler-mapper | 1224e5d8e64e16ebe9e9ef989556a6ea3e2b214e | [
"MIT"
] | 1 | 2019-07-14T20:30:41.000Z | 2019-07-16T08:17:25.000Z | test/test_visuals.py | zayed22/kepler-mapper | 1224e5d8e64e16ebe9e9ef989556a6ea3e2b214e | [
"MIT"
] | null | null | null | import os
import numbers
import json
import pytest
import numpy as np
from sklearn.datasets import make_circles
from kmapper import KeplerMapper
from kmapper import visuals
from kmapper.visuals import (
init_color_function,
format_meta,
format_mapper_data,
_map_val2color,
build_histogram,
_col... | 32.098765 | 157 | 0.600865 |
79561c740266e0f9327b31e97913957bf2b4a70d | 2,735 | py | Python | app/core/test/test_models.py | HemelAkash/recipe-app-api | 7754f50f9de2889b9f8193e88db4eca99ea06f7b | [
"MIT"
] | null | null | null | app/core/test/test_models.py | HemelAkash/recipe-app-api | 7754f50f9de2889b9f8193e88db4eca99ea06f7b | [
"MIT"
] | null | null | null | app/core/test/test_models.py | HemelAkash/recipe-app-api | 7754f50f9de2889b9f8193e88db4eca99ea06f7b | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
from unittest.mock import patch
class ModelTests(TestCase):
def test_create_user_with_email_successful(self):
"""Test creating a new user with an email is successful"""
email = 'test@londonappd... | 32.559524 | 72 | 0.640219 |
79561c85a52ac7be63a689d8567b6f56f78900dc | 1,464 | py | Python | service/ws_re/register/_base.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 5 | 2019-01-21T19:59:27.000Z | 2021-02-06T12:56:28.000Z | service/ws_re/register/_base.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 697 | 2017-11-19T12:41:11.000Z | 2022-03-31T07:35:04.000Z | service/ws_re/register/_base.py | the-it/WS_THEbotIT | 5630382e697a8b7432e0cf63a05a45fe43064caa | [
"MIT"
] | 1 | 2018-02-18T23:01:13.000Z | 2018-02-18T23:01:13.000Z | from __future__ import annotations
from abc import ABC
from pathlib import Path
from typing import Tuple, List, TYPE_CHECKING
if TYPE_CHECKING:
from service.ws_re.register.lemma import Lemma
_REGISTER_PATH: Path = Path(__file__).parent.joinpath("data")
class RegisterException(Exception):
pass
class Regis... | 27.111111 | 64 | 0.560109 |
79561d548a1b28fe15d9774a4099dac3840c5c36 | 12,702 | py | Python | mne/viz/tests/test_ica.py | rhotter/mne-python | f0ced56fadb369f2542c801d60c4472b2f545721 | [
"BSD-3-Clause"
] | null | null | null | mne/viz/tests/test_ica.py | rhotter/mne-python | f0ced56fadb369f2542c801d60c4472b2f545721 | [
"BSD-3-Clause"
] | null | null | null | mne/viz/tests/test_ica.py | rhotter/mne-python | f0ced56fadb369f2542c801d60c4472b2f545721 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Denis Engemann <denis.engemann@gmail.com>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: Simplified BSD
import os.path as op
import numpy as np
from numpy.testing import assert_equal, assert_array_equal
import pytest
import matplotlib.pyplot as plt
from mne import read_events, Ep... | 36.710983 | 79 | 0.648717 |
79561ea07bc351c7afa874fd926b9c238d8ae3aa | 1,383 | py | Python | src/compas_blender/artists/polyhedronartist.py | duchaoyu/compas | d484500d68d44fd6e227c3bbee20a2edde6e6c96 | [
"MIT"
] | null | null | null | src/compas_blender/artists/polyhedronartist.py | duchaoyu/compas | d484500d68d44fd6e227c3bbee20a2edde6e6c96 | [
"MIT"
] | null | null | null | src/compas_blender/artists/polyhedronartist.py | duchaoyu/compas | d484500d68d44fd6e227c3bbee20a2edde6e6c96 | [
"MIT"
] | null | null | null | from typing import Optional
from typing import Any
from typing import Union
import bpy
import compas_blender
from compas.geometry import Polyhedron
from compas.artists import ShapeArtist
from .artist import BlenderArtist
class PolyhedronArtist(BlenderArtist, ShapeArtist):
"""Artist for drawing polyhedron shapes.... | 29.425532 | 118 | 0.646421 |
79561ead8af94890505d02e8a13ad94d1533d837 | 818 | py | Python | venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/__init__.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/__init__.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | 1 | 2021-06-01T23:32:38.000Z | 2021-06-01T23:32:38.000Z | venv/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/__init__.py | aitoehigie/britecore_flask | eef1873dbe6b2cc21f770bc6dec783007ae4493b | [
"MIT"
] | null | null | null | # sqlite/__init__.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from . import base, pysqlite, pysqlcipher # noqa
from sqlalchemy.dialects.sqlit... | 16.36 | 69 | 0.607579 |
79561f1db9bd9b61e263cd76c06177505345ccb9 | 1,187 | py | Python | scripts/normalize_genes_by_ags.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 20 | 2017-11-02T13:36:16.000Z | 2021-07-23T12:44:28.000Z | scripts/normalize_genes_by_ags.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 30 | 2018-02-22T18:25:02.000Z | 2019-11-06T15:03:34.000Z | scripts/normalize_genes_by_ags.py | dcdanko/MetaSUB_CAP | db5672b0206afb3ffe3204b0577a4a5f84b9bcd4 | [
"MIT"
] | 9 | 2018-04-26T22:12:08.000Z | 2020-08-06T01:04:54.000Z | #! /usr/bin/env python3
import click
'''
Normalize the output of humann2 using
Average Genome Size from microbe census
Gene output from humann2 is already in reads per kilobase (RPK)
In a previous step we normalize by sample depth to get
reads per kilobase millions of reads (RPKM)
Produces output in reads per kil... | 24.729167 | 64 | 0.63353 |
79561f35f7c7633cfa9033565596b4d8b67fb10e | 44,180 | py | Python | qa/rpc-tests/p2p-compactblocks.py | alexandergaldones/bitcoin | 6206252e5073c1cde2e313f2e5a3ca17582c5823 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-compactblocks.py | alexandergaldones/bitcoin | 6206252e5073c1cde2e313f2e5a3ca17582c5823 | [
"MIT"
] | 1 | 2017-03-10T16:37:46.000Z | 2017-03-10T16:37:46.000Z | qa/rpc-tests/p2p-compactblocks.py | PETER-ITPE/bitcoin_pjt | 53c300fb525ab3e21206d47d8353f5246b4f24d1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 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.
"""Test compact blocks (BIP 152).
Version 1 compact blocks are pre-segwit (txids)
Version 2 compact blocks are... | 45.593395 | 124 | 0.665912 |
7956207ffed6ff3498a0f513901172daffcb39cd | 4,075 | py | Python | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation.
# 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 requ... | 32.6 | 78 | 0.617178 |
795620c2e6681f8e5be0df43a1a86977636ea1e9 | 1,056 | py | Python | examples/notify.py | dduong42/aiopg | 3fb3256319de766384b4867c7cc6710397bd1a8c | [
"BSD-2-Clause"
] | 1 | 2021-07-07T15:00:32.000Z | 2021-07-07T15:00:32.000Z | examples/notify.py | dduong42/aiopg | 3fb3256319de766384b4867c7cc6710397bd1a8c | [
"BSD-2-Clause"
] | null | null | null | examples/notify.py | dduong42/aiopg | 3fb3256319de766384b4867c7cc6710397bd1a8c | [
"BSD-2-Clause"
] | null | null | null | import asyncio
import aiopg
dsn = 'dbname=aiopg user=aiopg password=passwd host=127.0.0.1'
async def notify(conn):
async with conn.cursor() as cur:
for i in range(5):
msg = "message {}".format(i)
print('Send ->', msg)
await cur.execute("NOTIFY channel, %s", (msg,))
... | 25.756098 | 62 | 0.574811 |
79562137f33349d4816b7205ab979a8f53068c08 | 1,980 | py | Python | images/spark/outbound-relay/http_sink.py | splunk/deep-learning-toolkit | 84f9c978d9859a96f6ba566737a5c7102738d13c | [
"Apache-2.0"
] | 11 | 2020-10-13T05:27:59.000Z | 2021-09-23T02:56:32.000Z | images/spark/outbound-relay/http_sink.py | splunk/deep-learning-toolkit | 84f9c978d9859a96f6ba566737a5c7102738d13c | [
"Apache-2.0"
] | 48 | 2020-10-15T09:53:36.000Z | 2021-07-05T15:33:24.000Z | images/spark/outbound-relay/http_sink.py | splunk/deep-learning-toolkit | 84f9c978d9859a96f6ba566737a5c7102738d13c | [
"Apache-2.0"
] | 4 | 2020-12-04T08:51:35.000Z | 2022-03-27T09:42:20.000Z | from waitress import serve
from flask import Flask, request
from queue import Empty
import logging
import threading
import http
class HTTPSink(object):
def __init__(self, queue, status):
self.queue = queue
self.status = status
self.total_bytes = 0
self.chunk_count = 0
self... | 30.461538 | 90 | 0.591414 |
795621452f953d45596d63123d768e81b03978d3 | 1,116 | py | Python | LectureNote/06.NonLinearDataStructure/14.Tree/hchang/#14/52.py | minssoj/Study_turtleCoding | 5a1ab3c099311e6417f2a07e87132840fc3c7aed | [
"MIT"
] | null | null | null | LectureNote/06.NonLinearDataStructure/14.Tree/hchang/#14/52.py | minssoj/Study_turtleCoding | 5a1ab3c099311e6417f2a07e87132840fc3c7aed | [
"MIT"
] | null | null | null | LectureNote/06.NonLinearDataStructure/14.Tree/hchang/#14/52.py | minssoj/Study_turtleCoding | 5a1ab3c099311e6417f2a07e87132840fc3c7aed | [
"MIT"
] | 2 | 2021-12-13T08:02:31.000Z | 2021-12-18T08:36:23.000Z | # 이진탐색 트리(BST)가 주어졌을 때, L 이상 R 이하의 값을 지닌 노드의 합을 구하여라.
from BinaryTree import TreeNode
from time import time
null = "null"
tree = [10,5,15,3,7,null,18]
L = 7
R = 15
root=TreeNode(tree)
root.print_tree()
st = time()
lst = root.inorder()
print(lst)
answer = 0
for i in lst:
value = i.val
if type(value) is ... | 18.6 | 56 | 0.575269 |
79562157af423b0fdbb28ceaf93d353102cb7b59 | 27,411 | py | Python | tensorboard/uploader/uploader_main.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | 7 | 2020-04-04T16:25:42.000Z | 2021-10-02T18:26:56.000Z | tensorboard/uploader/uploader_main.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | null | null | null | tensorboard/uploader/uploader_main.py | tjgq/tensorboard | 751c961b90183115e4ab0ae3975d50146c0705b9 | [
"Apache-2.0"
] | 4 | 2020-08-08T18:08:44.000Z | 2021-05-13T05:22:40.000Z | # Copyright 2019 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... | 34.008685 | 83 | 0.646967 |
79562180133e5c5e7a90489257b58192dda3ec57 | 41,039 | py | Python | angr/storage/paged_memory.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 1 | 2021-07-07T11:18:34.000Z | 2021-07-07T11:18:34.000Z | angr/storage/paged_memory.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | null | null | null | angr/storage/paged_memory.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 1 | 2022-02-10T02:29:38.000Z | 2022-02-10T02:29:38.000Z | import cooldict
import claripy
import cffi
import cle
from sortedcontainers import SortedDict
from ..errors import SimMemoryError, SimSegfaultError
from .. import sim_options as options
from .memory_object import SimMemoryObject
from claripy.ast.bv import BV
_ffi = cffi.FFI()
import logging
l = logging.getLogger("an... | 38.534272 | 198 | 0.596798 |
795621ad66c8670b5b95d1930daff7584b423e96 | 1,138 | py | Python | vcorelib/math/__init__.py | vkottler/vcorelib | 97c3b92932d5b2f8c6d9cdca55f34bf167980a21 | [
"MIT"
] | 1 | 2022-03-31T09:26:04.000Z | 2022-03-31T09:26:04.000Z | vcorelib/math/__init__.py | vkottler/vcorelib | 97c3b92932d5b2f8c6d9cdca55f34bf167980a21 | [
"MIT"
] | 2 | 2022-03-31T09:35:06.000Z | 2022-03-31T09:38:07.000Z | vcorelib/math/__init__.py | vkottler/vcorelib | 97c3b92932d5b2f8c6d9cdca55f34bf167980a21 | [
"MIT"
] | null | null | null | """
Math utilities.
"""
# built-in
import typing
class UnitSystem(typing.NamedTuple):
"""
A pairing of prefixes defining a unit, and the amount that indicates the
multiplicative step-size between them.
"""
prefixes: typing.Sequence[str]
divisor: int
SI_UNITS = UnitSystem(["n", "u", "m", ""... | 23.22449 | 76 | 0.626538 |
795622962a2846cc34c80885fed9ff7cbed3d3de | 7,676 | py | Python | ripper/ripper.py | bdunford/ripper | ec5cb3f652ad5dee8b78f0b7d24f79f78442cb02 | [
"MIT"
] | null | null | null | ripper/ripper.py | bdunford/ripper | ec5cb3f652ad5dee8b78f0b7d24f79f78442cb02 | [
"MIT"
] | null | null | null | ripper/ripper.py | bdunford/ripper | ec5cb3f652ad5dee8b78f0b7d24f79f78442cb02 | [
"MIT"
] | null | null | null | import os
import sys
import traceback
import uuid
import time
import copy
from .requester import Requester
from .resources import Resources, Resource
from .writer import Writer
from .window import Window
from .asset import Asset
from .threads import Threader
from .pages import Pages, Page
from .stripper import Stripper... | 35.702326 | 169 | 0.593538 |
795622ea1a9d0a97a116f53672563e473090fdf2 | 42 | py | Python | vehicle/adapt-sysroot/ros_install_isolated/lib/python2.7/dist-packages/rosgraph_msgs/msg/__init__.py | slicht-uri/Sandshark-Beta-Lab- | 6cff36b227b49b776d13187c307e648d2a52bdae | [
"MIT"
] | null | null | null | vehicle/adapt-sysroot/ros_install_isolated/lib/python2.7/dist-packages/rosgraph_msgs/msg/__init__.py | slicht-uri/Sandshark-Beta-Lab- | 6cff36b227b49b776d13187c307e648d2a52bdae | [
"MIT"
] | null | null | null | vehicle/adapt-sysroot/ros_install_isolated/lib/python2.7/dist-packages/rosgraph_msgs/msg/__init__.py | slicht-uri/Sandshark-Beta-Lab- | 6cff36b227b49b776d13187c307e648d2a52bdae | [
"MIT"
] | 1 | 2019-10-18T06:25:14.000Z | 2019-10-18T06:25:14.000Z | from ._Log import *
from ._Clock import *
| 14 | 21 | 0.714286 |
795622f2437de0e09bc095361e60acafc6679d96 | 387 | py | Python | aocpo_backend/aocpo/asgi.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | 7 | 2020-02-17T12:20:26.000Z | 2021-03-15T01:02:34.000Z | aocpo_backend/aocpo/asgi.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | 3 | 2020-04-19T03:01:41.000Z | 2020-04-19T03:02:09.000Z | aocpo_backend/aocpo/asgi.py | CoderChen01/aocpo | 279bfae910a30be762e1954df1a53a6217a6e300 | [
"Apache-2.0"
] | null | null | null | """
ASGI config for aocpo project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.