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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a22bdbe4ac1fa1d87f5161538c519627fe16ec1 | 720 | py | Python | source/lambda/es_loader/siem/sf_networkfirewall.py | acsrujan/siem-on-amazon-opensearch-service | 828bd90aa6720a2ce05aa75925a5ad5035d5427a | [
"MIT-0"
] | 64 | 2021-04-18T06:34:40.000Z | 2021-09-13T02:02:05.000Z | source/lambda/es_loader/siem/sf_networkfirewall.py | acsrujan/siem-on-amazon-opensearch-service | 828bd90aa6720a2ce05aa75925a5ad5035d5427a | [
"MIT-0"
] | 73 | 2021-04-28T02:25:09.000Z | 2021-09-13T02:49:38.000Z | source/lambda/es_loader/siem/sf_networkfirewall.py | acsrujan/siem-on-amazon-opensearch-service | 828bd90aa6720a2ce05aa75925a5ad5035d5427a | [
"MIT-0"
] | 31 | 2021-04-20T03:00:39.000Z | 2021-09-09T04:49:58.000Z | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
__copyright__ = ('Copyright Amazon.com, Inc. or its affiliates. '
'All Rights Reserved.')
__version__ = '2.6.0'
__license__ = 'MIT-0'
__author__ = 'Akihiro Nakajima'
__url__ = 'https://github.com/aws-s... | 31.304348 | 76 | 0.645833 |
4a22bf5493f6c27c1cd01d9b5793072997b96a62 | 6,943 | py | Python | azure_monitor/src/azure_monitor/storage.py | yao-cqc/opentelemetry-azure-monitor-python | ecd0cd1d323a510be32cf0b1213e82e6d01e74e4 | [
"MIT"
] | 13 | 2020-04-03T17:17:45.000Z | 2021-06-08T15:23:03.000Z | azure_monitor/src/azure_monitor/storage.py | yao-cqc/opentelemetry-azure-monitor-python | ecd0cd1d323a510be32cf0b1213e82e6d01e74e4 | [
"MIT"
] | 72 | 2020-03-24T10:42:06.000Z | 2021-01-28T23:39:42.000Z | azure_monitor/src/azure_monitor/storage.py | microsoft/azure-monitor-opentelemetry-exporters-python | 3bd8b514ebef803ae622e308f867799cfab9dc5c | [
"MIT"
] | 11 | 2020-04-27T20:01:31.000Z | 2021-11-02T14:54:14.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import datetime
import json
import logging
import os
import random
from azure_monitor.utils import PeriodicTask
logger = logging.getLogger(__name__)
def _fmt(timestamp):
return timestamp.strftime("%Y-%m-%dT%H%M%S.%f")... | 32.75 | 78 | 0.512747 |
4a22bf8e2cf50698c3ba61be499286466de75e27 | 9,090 | py | Python | src/bin/shipyard_airflow/shipyard_airflow/policy.py | att-comdev/shipyard | 14d66afb012025a5289818d8e8d2092ccce19ffa | [
"Apache-2.0"
] | 14 | 2017-07-05T14:12:51.000Z | 2021-05-20T23:31:55.000Z | src/bin/shipyard_airflow/shipyard_airflow/policy.py | att-comdev/shipyard | 14d66afb012025a5289818d8e8d2092ccce19ffa | [
"Apache-2.0"
] | 14 | 2017-06-09T04:33:44.000Z | 2018-05-07T13:07:40.000Z | src/bin/shipyard_airflow/shipyard_airflow/policy.py | att-comdev/shipyard | 14d66afb012025a5289818d8e8d2092ccce19ffa | [
"Apache-2.0"
] | 16 | 2017-05-18T15:22:22.000Z | 2019-06-14T16:43:44.000Z | # Copyright 2017 AT&T Intellectual Property. All other 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... | 33.91791 | 79 | 0.532893 |
4a22bfe4f7b0e633a9583dfa067b497243c59323 | 39,431 | py | Python | tests/unit/synapseclient/core/upload/unit_test_multipart_upload.py | talkdirty/synapsePythonClient | 436504fe72ab1e85737a47a0d8d2eb3cfc563d37 | [
"Apache-2.0"
] | 45 | 2015-01-13T16:42:44.000Z | 2022-03-13T08:51:47.000Z | tests/unit/synapseclient/core/upload/unit_test_multipart_upload.py | talkdirty/synapsePythonClient | 436504fe72ab1e85737a47a0d8d2eb3cfc563d37 | [
"Apache-2.0"
] | 235 | 2015-01-07T23:07:04.000Z | 2022-03-29T20:48:18.000Z | tests/unit/synapseclient/core/upload/unit_test_multipart_upload.py | thomasyu888/synapsePythonClient | e04213d1437bdd0eda9a292e97926a2f566d2d5b | [
"Apache-2.0"
] | 58 | 2015-04-10T16:23:01.000Z | 2022-03-28T20:14:11.000Z | from concurrent.futures import Future
import hashlib
import json
import requests
import pytest
from unittest import mock
from synapseclient import Synapse
from synapseclient.core.exceptions import (
SynapseHTTPError,
SynapseUploadAbortedException,
SynapseUploadFailedException,
)
import synapseclient.core.... | 33.501274 | 110 | 0.569679 |
4a22c03113415ac01f0ff5a2aeea402dba08f7ac | 3,879 | py | Python | evennia/server/throttle.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,544 | 2015-01-01T22:16:31.000Z | 2022-03-31T19:17:45.000Z | evennia/server/throttle.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 1,686 | 2015-01-02T18:26:31.000Z | 2022-03-31T20:12:03.000Z | evennia/server/throttle.py | Jaykingamez/evennia | cf7cab1fea99ede3efecb70a65c3eb0fba1d3745 | [
"BSD-3-Clause"
] | 867 | 2015-01-02T21:01:54.000Z | 2022-03-29T00:28:27.000Z | from collections import defaultdict, deque
from evennia.utils import logger
import time
class Throttle(object):
"""
Keeps a running count of failed actions per IP address.
Available methods indicate whether or not the number of failures exceeds a
particular threshold.
This version of the throttl... | 32.596639 | 92 | 0.59139 |
4a22c03c5951076360456f820f4c169dd564f084 | 1,336 | py | Python | var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/intel-oneapi-advisor/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import platform
from spack import *
class IntelOneapiAdvisor(IntelOneApiPackage):
"""Intel Advisor is a design and ... | 39.294118 | 131 | 0.707335 |
4a22c05d29a8085309b371f2c30ea033abd3c479 | 1,130 | py | Python | backtracking/all_subsequences.py | Pratiyush27/Python | be48a876c7746611099974e572ea82691a7cbb20 | [
"MIT"
] | 12 | 2020-02-11T22:18:10.000Z | 2021-06-23T02:56:07.000Z | backtracking/all_subsequences.py | Pratiyush27/Python | be48a876c7746611099974e572ea82691a7cbb20 | [
"MIT"
] | 11 | 2019-10-04T08:54:03.000Z | 2019-10-19T09:06:10.000Z | backtracking/all_subsequences.py | Pratiyush27/Python | be48a876c7746611099974e572ea82691a7cbb20 | [
"MIT"
] | 18 | 2020-02-09T13:00:11.000Z | 2021-03-11T08:47:36.000Z | """
In this problem, we want to determine all possible subsequences
of the given sequence. We use backtracking to solve this problem.
Time complexity: O(2^n),
where n denotes the length of the given sequence.
"""
def generate_all_subsequences(sequence):
create_state_space_tree(sequence, [], 0)
def create_s... | 26.27907 | 69 | 0.736283 |
4a22c11d06a85cd2b1afc811781defbc0368ca79 | 10,884 | py | Python | aizynthfinder/aizynthfinder.py | MolecularAI/aizynthfinder | 42f83c9eb9fed3fe80dc966bb7b25ccacf1dc022 | [
"MIT"
] | 219 | 2020-06-15T08:04:53.000Z | 2022-03-31T09:02:47.000Z | aizynthfinder/aizynthfinder.py | wangxr0526/aizynthfinder | 42f83c9eb9fed3fe80dc966bb7b25ccacf1dc022 | [
"MIT"
] | 56 | 2020-08-14T14:50:42.000Z | 2022-03-22T12:49:06.000Z | aizynthfinder/aizynthfinder.py | wangxr0526/aizynthfinder | 42f83c9eb9fed3fe80dc966bb7b25ccacf1dc022 | [
"MIT"
] | 58 | 2020-06-15T13:36:42.000Z | 2022-03-21T06:18:02.000Z | """ Module containing a class that is the main interface the retrosynthesis tool.
"""
from __future__ import annotations
import time
from collections import defaultdict
from typing import TYPE_CHECKING
from tqdm import tqdm
# This must be imported first to setup logging for rdkit, tensorflow etc
from aizynthfinder.ut... | 37.273973 | 112 | 0.65215 |
4a22c2b9e76a68df864191f1fa5e82c238d9f370 | 401 | py | Python | src/app/entities/hashing_algorithms/__init__.py | dieisabel/cypherman | 06d8678b79b18aa256a79ec6967d68274f088dbc | [
"MIT"
] | null | null | null | src/app/entities/hashing_algorithms/__init__.py | dieisabel/cypherman | 06d8678b79b18aa256a79ec6967d68274f088dbc | [
"MIT"
] | 43 | 2021-12-02T21:26:01.000Z | 2022-02-21T08:51:06.000Z | src/app/entities/hashing_algorithms/__init__.py | dieisabel/cypherman | 06d8678b79b18aa256a79ec6967d68274f088dbc | [
"MIT"
] | null | null | null | __all__ = [
'IHashingAlgorithm',
'MD5HashingAlgorithm',
'SHA1HashingAlgorithm',
'SHA256HashingAlgorithm',
]
from entities.hashing_algorithms.hashing_algorithm import IHashingAlgorithm
from entities.hashing_algorithms.md5 import MD5HashingAlgorithm
from entities.hashing_algorithms.sha1 import SHA1Hashin... | 33.416667 | 75 | 0.840399 |
4a22c3186892060185c3dba56a52d1ca385d661c | 6,124 | py | Python | projects/pareto/plot.py | energyscope/EnergyScope_multi_criteria | 438ca2d3a8502110ce45ed6a1165eb0ff7c2d57c | [
"Apache-2.0"
] | 1 | 2021-12-13T11:53:45.000Z | 2021-12-13T11:53:45.000Z | projects/pareto/plot.py | energyscope/EnergyScope_multi_criteria | 438ca2d3a8502110ce45ed6a1165eb0ff7c2d57c | [
"Apache-2.0"
] | null | null | null | projects/pareto/plot.py | energyscope/EnergyScope_multi_criteria | 438ca2d3a8502110ce45ed6a1165eb0ff7c2d57c | [
"Apache-2.0"
] | null | null | null | from typing import List
import matplotlib.pyplot as plt
import energyscope as es
def plot_pareto(case_study_path: str, test_case: str, epsilons: List[float]) -> None:
cost_opt_cost = es.get_total_cost(f"{case_study_path}/{test_case}/cost")
einv_opt_cost = es.get_total_einv(f"{case_study_path}/{test_case}/c... | 37.115152 | 96 | 0.590137 |
4a22c39a7a1bb22c7904f59060f73f132eb86a94 | 30,040 | py | Python | ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py | dkhwangbo/ambari | 8fee8ce8429229b587e2227f3fd73db474432459 | [
"Apache-2.0"
] | null | null | null | ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py | dkhwangbo/ambari | 8fee8ce8429229b587e2227f3fd73db474432459 | [
"Apache-2.0"
] | null | null | null | ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py | dkhwangbo/ambari | 8fee8ce8429229b587e2227f3fd73db474432459 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/env python
"""
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")... | 42.072829 | 250 | 0.718842 |
4a22c4937eff8c71a89f280368062755d55fdc9e | 4,500 | py | Python | RELdb/glove.py | mickvanhulst/RELdb | 3c11719ae41dcf6970f0120790572503bfd05136 | [
"MIT"
] | null | null | null | RELdb/glove.py | mickvanhulst/RELdb | 3c11719ae41dcf6970f0120790572503bfd05136 | [
"MIT"
] | null | null | null | RELdb/glove.py | mickvanhulst/RELdb | 3c11719ae41dcf6970f0120790572503bfd05136 | [
"MIT"
] | null | null | null | from collections import namedtuple
import zipfile
from numpy import zeros
from RELdb.base import DB
class GloveEmbedding(DB):
"""
Reference: http://nlp.stanford.edu/projects/glove
"""
GloveSetting = namedtuple('GloveSetting', ['url', 'd_embs', 'size', 'description'])
settings = {
'common_... | 41.284404 | 143 | 0.541333 |
4a22c4a9e83934d6d7f3738c43a419f333a309ff | 5,368 | py | Python | lambdad.py | icfpcontest2019/lambda-client | 662a78b4121465477b6b62e98663a3ceaf759644 | [
"MIT"
] | 1 | 2019-08-02T19:28:43.000Z | 2019-08-02T19:28:43.000Z | lambdad.py | icfpcontest2019/lambda-client | 662a78b4121465477b6b62e98663a3ceaf759644 | [
"MIT"
] | 8 | 2021-03-19T01:35:09.000Z | 2022-03-11T23:50:33.000Z | lambdad.py | icfpcontest2019/lambda-client | 662a78b4121465477b6b62e98663a3ceaf759644 | [
"MIT"
] | 1 | 2019-06-26T05:52:12.000Z | 2019-06-26T05:52:12.000Z | #!/usr/bin/env python3
from werkzeug.wrappers import Request, Response
from werkzeug.serving import run_simple
from jsonrpc import JSONRPCResponseManager, dispatcher
from cachetools import cached, TTLCache
import urllib, urllib.parse
import requests
import json
import argparse
import threading
import os
import configpa... | 29.988827 | 101 | 0.68424 |
4a22c6287ef5248d1c8c7918fb8df2dd92b7be8a | 1,530 | py | Python | ejercicios/repaso_creatividad_proyecto/tarjeta_credito_depredadora.py | carlosviveros/Soluciones | 115f4fa929c7854ca497e4c994352adc64565456 | [
"MIT"
] | 4 | 2021-12-14T23:51:25.000Z | 2022-03-24T11:14:00.000Z | ejercicios/repaso_creatividad_proyecto/tarjeta_credito_depredadora.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | null | null | null | ejercicios/repaso_creatividad_proyecto/tarjeta_credito_depredadora.py | leugimkm/Soluciones | d71601c8d9b5e86e926f48d9e49462af8a956b6d | [
"MIT"
] | 5 | 2021-11-10T06:49:50.000Z | 2022-03-24T01:42:28.000Z | """AyudaEnPython: https://www.facebook.com/groups/ayudapython
NOTE: Al igual que TarjetaCredito, se opta por mejorar la clase.
"""
from tarjetas import TarjetaCredito
class TarjetaCreditoDepredadora(TarjetaCredito):
"""Tarjeta de credito que cobra intereses e impouestos."""
__IMPUESTO = 5
def __init__(... | 29.423077 | 73 | 0.598693 |
4a22c64bf1472fb6c5760d40f9773902290c81e4 | 8,578 | py | Python | src/encoded/ingestion/queue_utils.py | dbmi-bgm/cgap-portal | 1cc2e5574ae38bda9ef29aa4e7ab0daa1195ca05 | [
"MIT"
] | 2 | 2019-07-26T19:17:59.000Z | 2019-09-19T16:58:36.000Z | src/encoded/ingestion/queue_utils.py | dbmi-bgm/cgap-portal | 1cc2e5574ae38bda9ef29aa4e7ab0daa1195ca05 | [
"MIT"
] | 106 | 2019-09-04T14:37:08.000Z | 2022-03-31T18:41:14.000Z | src/encoded/ingestion/queue_utils.py | dbmi-bgm/cgap-portal | 1cc2e5574ae38bda9ef29aa4e7ab0daa1195ca05 | [
"MIT"
] | 2 | 2019-07-01T17:28:56.000Z | 2021-01-12T14:03:53.000Z | import time
import json
import socket
import boto3
import structlog
import datetime
log = structlog.getLogger(__name__)
class IngestionQueueManager:
"""
Similar to QueueManager in snovault in that in manages SQS queues, but that code is not generic
enough to use here, so it is "duplicated" so to speak h... | 41.043062 | 117 | 0.601422 |
4a22c6ec2ed73854b371f2480ef7610517c3c9d7 | 8,333 | py | Python | sdk/python/pulumi_azure_native/azuredata/v20190724preview/sql_managed_instance.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/azuredata/v20190724preview/sql_managed_instance.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/azuredata/v20190724preview/sql_managed_instance.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 39.492891 | 432 | 0.633385 |
4a22c7aa3c3fbca13cfe14d2a36aa1700fe5746b | 6,055 | py | Python | examples/client_with_routing.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | examples/client_with_routing.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | examples/client_with_routing.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | import asyncio
import logging
import sys
from asyncio import Event
from typing import AsyncGenerator, Tuple
from reactivestreams.publisher import Publisher
from reactivestreams.subscriber import Subscriber
from reactivestreams.subscription import Subscription
from rsocket.extensions.helpers import route, composite, au... | 34.403409 | 112 | 0.715442 |
4a22c7f05e3c467c65f5b20991dc3a898992fb02 | 4,168 | py | Python | tests/test_models_t5.py | Cli212/gluon-nlp | 151e1b049aeb0dd0d2a84d928d314fdbfcf8a7f4 | [
"Apache-2.0"
] | null | null | null | tests/test_models_t5.py | Cli212/gluon-nlp | 151e1b049aeb0dd0d2a84d928d314fdbfcf8a7f4 | [
"Apache-2.0"
] | null | null | null | tests/test_models_t5.py | Cli212/gluon-nlp | 151e1b049aeb0dd0d2a84d928d314fdbfcf8a7f4 | [
"Apache-2.0"
] | null | null | null | import pytest
import mxnet as mx
from mxnet import np, npx
from mxnet.gluon import nn, HybridBlock
from gluonnlp.models.t5 import (
T5Model, T5Inference, t5_cfg_reg, list_pretrained_t5, get_pretrained_t5
)
from gluonnlp.utils.testing import verify_nmt_model, verify_nmt_inference
npx.set_np()
def test_list_pretra... | 37.54955 | 102 | 0.620441 |
4a22c856f182ebff2120495d1383569232f230f3 | 2,267 | py | Python | MakeConfounds.py | jbdenniso/general | 14193a77c5d6b58998a91570fcee4e08c28c5753 | [
"MIT"
] | 1 | 2018-07-22T20:19:25.000Z | 2018-07-22T20:19:25.000Z | MakeConfounds.py | jbdenniso/general | 14193a77c5d6b58998a91570fcee4e08c28c5753 | [
"MIT"
] | 3 | 2020-08-17T13:16:44.000Z | 2021-06-25T18:45:28.000Z | MakeConfounds.py | jbdenniso/general | 14193a77c5d6b58998a91570fcee4e08c28c5753 | [
"MIT"
] | 5 | 2020-07-29T16:59:06.000Z | 2021-05-14T23:55:33.000Z |
# coding: utf-8
# E.G. use
#$ python MakeConfounds.py --fmriprepDir="/data/projects/Tensor_game/Data/Raw/NARPS/derivatives/fmriprep"
# TO DO:
# 1. write to subject folders, create if it doesn't exist
# 2. simplify input argument to project name. all paths should be standardized within a project folder
# 3. check for... | 33.338235 | 110 | 0.720335 |
4a22c8900db8285430e22226abc82a11153006ba | 959 | py | Python | expHTS/preprocess/fastq_handling.py | B854414/expHTS | 90f5e73bda094044be9d4f43dc96c7490ea36187 | [
"Apache-2.0"
] | null | null | null | expHTS/preprocess/fastq_handling.py | B854414/expHTS | 90f5e73bda094044be9d4f43dc96c7490ea36187 | [
"Apache-2.0"
] | null | null | null | expHTS/preprocess/fastq_handling.py | B854414/expHTS | 90f5e73bda094044be9d4f43dc96c7490ea36187 | [
"Apache-2.0"
] | null | null | null | # fastq handling
class fastqIter:
" A simple file iterator that returns 4 lines for fast fastq iteration. "
def __init__(self, handle):
self.inf = handle
def __iter__(self):
return self
def next(self):
lines = {'id': self.inf.readline().strip(),
'seq': self.i... | 27.4 | 94 | 0.525547 |
4a22c9a8c54e87a7cf21e00cb0ab40b525ba8a82 | 973 | py | Python | api/migrations/0001_initial.py | macav/ideas-platform | bc65355b9cd5164d6b2d640bf275e55ae8dd843e | [
"MIT"
] | null | null | null | api/migrations/0001_initial.py | macav/ideas-platform | bc65355b9cd5164d6b2d640bf275e55ae8dd843e | [
"MIT"
] | null | null | null | api/migrations/0001_initial.py | macav/ideas-platform | bc65355b9cd5164d6b2d640bf275e55ae8dd843e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-23 08:41
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | 31.387097 | 118 | 0.621788 |
4a22ca3932ae40af1e2925532c943470fca4ccbc | 1,352 | py | Python | weather/weather/pipelines.py | seu-tan/Spiders | 41b622f305fe44538c38676cd40fa719a4657722 | [
"Apache-2.0"
] | null | null | null | weather/weather/pipelines.py | seu-tan/Spiders | 41b622f305fe44538c38676cd40fa719a4657722 | [
"Apache-2.0"
] | null | null | null | weather/weather/pipelines.py | seu-tan/Spiders | 41b622f305fe44538c38676cd40fa719a4657722 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class WeatherPipeline(object):
def __init__(self):
pass
def process_item(self, item, spider):
with o... | 30.727273 | 78 | 0.43713 |
4a22ca692e690dde015e1976acea999e7f01c70d | 3,354 | py | Python | doc/source/conf.py | gaozhengwei/networking-ovn | 4f64542bbbb86e4277d4ad6083e01df86a8248a4 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | gaozhengwei/networking-ovn | 4f64542bbbb86e4277d4ad6083e01df86a8248a4 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | gaozhengwei/networking-ovn | 4f64542bbbb86e4277d4ad6083e01df86a8248a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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... | 33.207921 | 79 | 0.693798 |
4a22cac9c13f13cabb9d92c0ea7eccf84576f7de | 12,218 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/operations/_provider_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.992308 | 142 | 0.651907 |
4a22cce6f8553655a99cab0f83e6515793f254f4 | 21,729 | py | Python | pyxrf/gui_module/wnd_load_quant_calibration.py | andrewmkiss/PyXRF | 61de2029c255f77279ba5bc3896107c1a2e4212f | [
"BSD-3-Clause"
] | 19 | 2016-05-25T21:40:41.000Z | 2022-01-19T01:58:15.000Z | pyxrf/gui_module/wnd_load_quant_calibration.py | andrewmkiss/PyXRF | 61de2029c255f77279ba5bc3896107c1a2e4212f | [
"BSD-3-Clause"
] | 90 | 2016-01-11T17:22:05.000Z | 2021-12-02T15:59:58.000Z | pyxrf/gui_module/wnd_load_quant_calibration.py | andrewmkiss/PyXRF | 61de2029c255f77279ba5bc3896107c1a2e4212f | [
"BSD-3-Clause"
] | 22 | 2016-10-16T17:19:19.000Z | 2022-02-18T21:45:08.000Z | import textwrap
from qtpy.QtWidgets import (
QPushButton,
QHBoxLayout,
QVBoxLayout,
QGroupBox,
QCheckBox,
QLabel,
QComboBox,
QFileDialog,
QRadioButton,
QButtonGroup,
QTableWidget,
QTableWidgetItem,
QHeaderView,
QWidget,
QScrollArea,
QTabWidget,
QFrame... | 40.463687 | 114 | 0.62672 |
4a22cdae3c1e762c5a8ddfea36d3d0c741814c62 | 2,012 | py | Python | tst/trial_backend/main_checkpoint.py | hfurkanbozkurt/syne-tune | 05ee2668f0155b40c3ee3b61e4b3d58f3f9f3c4f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tst/trial_backend/main_checkpoint.py | hfurkanbozkurt/syne-tune | 05ee2668f0155b40c3ee3b61e4b3d58f3f9f3c4f | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-02-25T15:56:36.000Z | 2022-02-25T17:53:10.000Z | tst/trial_backend/main_checkpoint.py | hfurkanbozkurt/syne-tune | 05ee2668f0155b40c3ee3b61e4b3d58f3f9f3c4f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2021 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... | 32.451613 | 117 | 0.742545 |
4a22cdb2399285fb677b2b60d900d4d73da9c3f1 | 6,236 | py | Python | my_tt/SocialApp/logics.py | tanproject/tantan | 9d6653f07be0f6d1d8726cce15789e4fae729725 | [
"Apache-2.0"
] | null | null | null | my_tt/SocialApp/logics.py | tanproject/tantan | 9d6653f07be0f6d1d8726cce15789e4fae729725 | [
"Apache-2.0"
] | 1 | 2020-10-05T07:58:24.000Z | 2020-10-05T07:58:24.000Z | my_tt/SocialApp/logics.py | tanproject/tantan | 9d6653f07be0f6d1d8726cce15789e4fae729725 | [
"Apache-2.0"
] | null | null | null | import datetime
from my_tt import config
from UserApp.models import User, Profile
from SocialApp.models import Swiped, Friend
from libs.cache import rds
from common import keys, errors
from django.db.transaction import atomic
from django.db.models import Q
def rcmd_from_list(user_id):
'''从优先推荐列表取出滑... | 32.14433 | 102 | 0.643682 |
4a22d020e29ccce2f3f43a8b4e9e7485a913e76f | 385 | py | Python | TrackingTools/GsfTracking/python/CkfElectronTrajectoryBuilder_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | TrackingTools/GsfTracking/python/CkfElectronTrajectoryBuilder_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | TrackingTools/GsfTracking/python/CkfElectronTrajectoryBuilder_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
import copy
from RecoTracker.CkfPattern.CkfTrajectoryBuilder_cfi import *
CkfElectronTrajectoryBuilder = copy.deepcopy(CkfTrajectoryBuilder)
CkfElectronTrajectoryBuilder.propagatorAlong = 'fwdElectronPropagator'
CkfElectronTrajectoryBuilder.propagatorOpposite = 'bwdElectronProp... | 38.5 | 73 | 0.883117 |
4a22d0330d7b3d91f5be859f4639fe68a50cba86 | 338 | py | Python | comments/models.py | prettyirrelevant/instagram-api-clone | 1af6066694a7bed60ab1ddd1141c0832efaccaf2 | [
"MIT"
] | null | null | null | comments/models.py | prettyirrelevant/instagram-api-clone | 1af6066694a7bed60ab1ddd1141c0832efaccaf2 | [
"MIT"
] | null | null | null | comments/models.py | prettyirrelevant/instagram-api-clone | 1af6066694a7bed60ab1ddd1141c0832efaccaf2 | [
"MIT"
] | null | null | null | from django.db import models
from posts.models import Posts
# Create your models here.
class Comments(models.Model):
post = models.ForeignKey(Posts, on_delete=models.CASCADE)
comment = models.CharField(max_length=200)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeFie... | 30.727273 | 61 | 0.775148 |
4a22d07bf027675c17bc826bbf22b39c28c62260 | 2,420 | py | Python | scripts/Msm_Design_Runner.py | trenth12/MSM-Design | b78b0c69f612b8451b0f9d15b99a3b68f817ec4e | [
"MIT"
] | 1 | 2017-10-05T06:50:48.000Z | 2017-10-05T06:50:48.000Z | scripts/Msm_Design_Runner.py | trenth12/MSM-Design | b78b0c69f612b8451b0f9d15b99a3b68f817ec4e | [
"MIT"
] | null | null | null | scripts/Msm_Design_Runner.py | trenth12/MSM-Design | b78b0c69f612b8451b0f9d15b99a3b68f817ec4e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 05 22:09:36 2017
@author: Trent
"""
#import matplotlib
#matplotlib.use('Agg')
from msm_design import msm_model
from msm_design import msm_optimization
#trial = msm_model.SGD_Static(pdbfile='C:/Users/Trent/Desktop/PythonFiles/Project/Package/State0.pdb'... | 57.619048 | 187 | 0.788017 |
4a22d20eecb6e710bfcd5e9ce74343876b11714b | 915 | py | Python | conftest.py | pavlovprojects/python_qa_remotes | 7a4401f7e962597c242084467c0cb77e319debf4 | [
"MIT"
] | null | null | null | conftest.py | pavlovprojects/python_qa_remotes | 7a4401f7e962597c242084467c0cb77e319debf4 | [
"MIT"
] | null | null | null | conftest.py | pavlovprojects/python_qa_remotes | 7a4401f7e962597c242084467c0cb77e319debf4 | [
"MIT"
] | null | null | null | import pytest
from selenium import webdriver
def pytest_addoption(parser):
parser.addoption("--browser", action="store", default="opera",
choices=["chrome", "firefox", "opera", "yandex"])
parser.addoption("--executor", action="store", default="192.168.8.112")
@pytest.fixture
def firefo... | 26.142857 | 95 | 0.666667 |
4a22d41c05558f350913d6a3e57ad5148422e5e4 | 6,072 | py | Python | tests/sparse_product/test_clustered_sparse_product_cpu_v2.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 1,171 | 2020-06-30T01:57:19.000Z | 2022-03-31T15:11:25.000Z | tests/sparse_product/test_clustered_sparse_product_cpu_v2.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 105 | 2020-06-30T14:40:56.000Z | 2022-02-08T16:31:45.000Z | tests/sparse_product/test_clustered_sparse_product_cpu_v2.py | SamuelCahyawijaya/fast-transformers | 6ae8ed4cc50bd037968db4f5062e4d328aae73fe | [
"MIT"
] | 127 | 2020-06-26T09:07:48.000Z | 2022-03-25T06:46:37.000Z | #
# Copyright (c) 2020 Idiap Research Institute, http://www.idiap.ch/
# Written by Angelos Katharopoulos <angelos.katharopoulos@idiap.ch>,
# Apoorv Vyas <avyas@idiap.ch>
#
import os
import time
import unittest
import numpy as np
import torch
from torch.nn.init import normal_
from fast_transformers.aggregate import ... | 32.470588 | 76 | 0.524045 |
4a22d5d341309b7eb5ca8fd1df31c2d08e7d7adf | 47,334 | py | Python | registration/tests/models.py | vtemian/django-registration | 1fc1413cce2ef65b77daa5096ea5ca546786586b | [
"BSD-3-Clause"
] | null | null | null | registration/tests/models.py | vtemian/django-registration | 1fc1413cce2ef65b77daa5096ea5ca546786586b | [
"BSD-3-Clause"
] | null | null | null | registration/tests/models.py | vtemian/django-registration | 1fc1413cce2ef65b77daa5096ea5ca546786586b | [
"BSD-3-Clause"
] | null | null | null | import datetime
import hashlib
import random
import re
import string
import warnings
from copy import copy
from datetime import timedelta
import django
from django.apps import apps
from django.conf import settings
from django.core import mail
from django.core import management
from django.core.exceptions import Improp... | 41.962766 | 89 | 0.678561 |
4a22d6a4cc5d149aa0284ffa1730cac226230e96 | 6,975 | py | Python | cordova/cordova-lite-android-tests/res/util.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | cordova/cordova-lite-android-tests/res/util.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | cordova/cordova-lite-android-tests/res/util.py | zhuyongyong/crosswalk-test-suite | 24f3f8cfa663a365b0a22685d5bd096a637f72db | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import commands
import sys
import json
import logging
import urllib2
import stat
import shutil
import fnmatch
import subprocess
import time
import re
from bs4 import BeautifulSoup
from optparse import OptionParser
script_path = os.path.realpath(__file__)
const_path = os.path.dirname(scri... | 34.875 | 120 | 0.614337 |
4a22d6f5b79f5e21b9664858cbd0cdcf54697576 | 1,177 | py | Python | Python/SearchStat/search_new.py | GeorgiyDemo/scrapheap | 1d298eb63e0e6a8fc92ab84a05372d2ed33beba1 | [
"MIT"
] | null | null | null | Python/SearchStat/search_new.py | GeorgiyDemo/scrapheap | 1d298eb63e0e6a8fc92ab84a05372d2ed33beba1 | [
"MIT"
] | null | null | null | Python/SearchStat/search_new.py | GeorgiyDemo/scrapheap | 1d298eb63e0e6a8fc92ab84a05372d2ed33beba1 | [
"MIT"
] | 1 | 2019-03-14T15:48:23.000Z | 2019-03-14T15:48:23.000Z | # -*- coding: utf-8 -*-
from pytils import numeral
import os, xlrd, time
from keras import backend as K
from keras.models import model_from_json
from utils import *
# кол-во ячеек в таблице
count_range = 153
kun = 0
tyan = 0
i = 1
book = xlrd.open_workbook("CONF.xlsx")
first_sheet = book.sheet_by_index(0)
model_dir ... | 22.207547 | 86 | 0.653356 |
4a22d7c8ba849f66ef0d9a237cba4453bbc0e4f8 | 3,342 | py | Python | python/aoc-2020/aoc24_part2.py | brianjgreen/AOC2020 | c5fd4908934371d9f70328cb39c14194baffb126 | [
"MIT"
] | 2 | 2020-12-02T05:31:14.000Z | 2020-12-18T21:00:40.000Z | python/aoc-2020/aoc24_part2.py | brianjgreen/AOC2020 | c5fd4908934371d9f70328cb39c14194baffb126 | [
"MIT"
] | null | null | null | python/aoc-2020/aoc24_part2.py | brianjgreen/AOC2020 | c5fd4908934371d9f70328cb39c14194baffb126 | [
"MIT"
] | null | null | null | #
# Advent of Code 2020 - Day 24 Part 2
# 24 Dec 2020 Brian Green
#
# Problem:
# How many tiles will be black after 100 days?
#
import os
class Aoc24:
def __init__(self):
self.check_white_tiles = []
self.art = {}
self.adj = ((2, 0), (1, -1), (-1, -1), (-2, 0), (-1, 1), (1, 1))
fil... | 30.944444 | 105 | 0.4617 |
4a22d811d15b3fa01e6e71400388f9ad9923cac0 | 158 | py | Python | Python_Advanced_Softuni/Comprehensions_Lab/venv/no_vowels.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | 1 | 2020-12-14T23:25:19.000Z | 2020-12-14T23:25:19.000Z | Python_Advanced_Softuni/Comprehensions_Lab/venv/no_vowels.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | null | null | null | Python_Advanced_Softuni/Comprehensions_Lab/venv/no_vowels.py | borisboychev/SoftUni | 22062312f08e29a1d85377a6d41ef74966d37e99 | [
"MIT"
] | null | null | null | vowels = ['a' , 'o' , 'u' , 'e' , 'i' , 'A' , 'O' , 'U' , 'E' , 'I']
string = input()
result = [s for s in string if s not in vowels]
print(''.join(result)) | 26.333333 | 68 | 0.474684 |
4a22d830f18c2bbdf935d35db8cbafa40577803c | 60,863 | py | Python | src/pyGLMHMM/GLMHMM.py | aslansd/pyGLMHMM | 5930e1322435431c5835b2b3f241b2ca0d2fb887 | [
"MIT"
] | 3 | 2020-08-20T21:35:34.000Z | 2021-04-23T08:02:24.000Z | src/pyGLMHMM/GLMHMM.py | aslansd/pyGLMHMM | 5930e1322435431c5835b2b3f241b2ca0d2fb887 | [
"MIT"
] | null | null | null | src/pyGLMHMM/GLMHMM.py | aslansd/pyGLMHMM | 5930e1322435431c5835b2b3f241b2ca0d2fb887 | [
"MIT"
] | null | null | null | import copy
import warnings
import numpy as np
from sklearn.base import BaseEstimator
from sklearn.exceptions import ConvergenceWarning
from sklearn.utils.validation import check_random_state
from .GLMHMMSymbLik import _GLMHMM_symb_lik
from .GLMHMMAnalogLik import _GLMHMM_analog_lik
from .GLMHMMTransLik import _GLMHM... | 54.439177 | 348 | 0.550088 |
4a22d86eaf7bd6e1b490cce8bf2c293330cbb42c | 6,997 | py | Python | acme/environment_loop.py | ricklentz/acme | 441c44008ba94c9459befa2b2f3a7e806eeb64bf | [
"Apache-2.0"
] | 1 | 2022-03-31T17:24:10.000Z | 2022-03-31T17:24:10.000Z | acme/environment_loop.py | GACWR/acme | 764a92c09673cb826cdaf7ad157c1aab451507df | [
"Apache-2.0"
] | null | null | null | acme/environment_loop.py | GACWR/acme | 764a92c09673cb826cdaf7ad157c1aab451507df | [
"Apache-2.0"
] | null | null | null | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | 37.61828 | 80 | 0.709018 |
4a22da8817cbe098f6b8efd15ae1fed2b04f89c1 | 338 | py | Python | spec/python/test_zlib_surrounded.py | DarkShadow44/kaitai_struct_tests | 4bb13cef82965cca66dda2eb2b77cd64e9f70a12 | [
"MIT"
] | 11 | 2018-04-01T03:58:15.000Z | 2021-08-14T09:04:55.000Z | spec/python/test_zlib_surrounded.py | DarkShadow44/kaitai_struct_tests | 4bb13cef82965cca66dda2eb2b77cd64e9f70a12 | [
"MIT"
] | 73 | 2016-07-20T10:27:15.000Z | 2020-12-17T18:56:46.000Z | spec/python/test_zlib_surrounded.py | DarkShadow44/kaitai_struct_tests | 4bb13cef82965cca66dda2eb2b77cd64e9f70a12 | [
"MIT"
] | 37 | 2016-08-15T08:25:56.000Z | 2021-08-28T14:48:46.000Z | # Autogenerated from KST: please remove this line if doing any edits by hand!
import unittest
from zlib_surrounded import ZlibSurrounded
class TestZlibSurrounded(unittest.TestCase):
def test_zlib_surrounded(self):
with ZlibSurrounded.from_file('src/zlib_surrounded.bin') as r:
self.assertEqua... | 28.166667 | 77 | 0.754438 |
4a22db061c70db549eeaa691be8e0abe7a348fd2 | 5,365 | py | Python | sdk/python/pulumi_azure_native/network/v20190601/get_route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190601/get_route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20190601/get_route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 36.496599 | 150 | 0.658527 |
4a22dc0246908590dbc19d81fcd7497228fb9cb1 | 31,291 | py | Python | tests/fixtures_regress/tests.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 61,676 | 2015-01-01T00:05:13.000Z | 2022-03-31T20:37:54.000Z | tests/fixtures_regress/tests.py | ni-ning/django | 2e7ba6057cfc82a15a22b6021cd60cf307152e2d | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 8,884 | 2015-01-01T00:12:05.000Z | 2022-03-31T19:53:11.000Z | tests/fixtures_regress/tests.py | mustafa0x/django | d7394cfa13a4d1a02356e3a83e10ec100fbb9948 | [
"BSD-3-Clause",
"0BSD"
] | 33,143 | 2015-01-01T02:04:52.000Z | 2022-03-31T19:42:46.000Z | # Unittests for fixtures.
import json
import os
import re
from io import StringIO
from pathlib import Path
from django.core import management, serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.serializers.base import DeserializationError
from django.db import IntegrityError, transact... | 35.317156 | 115 | 0.589914 |
4a22de3ae47e5480aa1e68bbb0abb8639c9fbfce | 296 | py | Python | src/modules/position_appender.py | gmum/LocoGAN | 0200c80cff614ede39cdba6114ab17ef0acc2744 | [
"MIT"
] | 12 | 2020-02-21T08:34:53.000Z | 2021-06-10T13:55:05.000Z | src/modules/position_appender.py | gmum/LocoGAN | 0200c80cff614ede39cdba6114ab17ef0acc2744 | [
"MIT"
] | null | null | null | src/modules/position_appender.py | gmum/LocoGAN | 0200c80cff614ede39cdba6114ab17ef0acc2744 | [
"MIT"
] | 3 | 2021-02-05T07:18:20.000Z | 2021-08-17T03:06:31.000Z | import torch
import torch.nn as nn
class PositionAppender(nn.Module):
def forward(self, tensor_tuple: tuple) -> tuple:
input_data, positions = tensor_tuple
input_with_added_position = torch.cat((input_data, positions), 1)
return input_with_added_position
| 26.909091 | 74 | 0.702703 |
4a22df4694e003d2e92159e315f7563b86875fd4 | 2,252 | py | Python | Logs_Generation/generate_log.py | ericsun95/Real_Time_Logs_Analysis_System | 463ec7a68a669d45dcf07764df0b284232853cd5 | [
"Apache-2.0"
] | null | null | null | Logs_Generation/generate_log.py | ericsun95/Real_Time_Logs_Analysis_System | 463ec7a68a669d45dcf07764df0b284232853cd5 | [
"Apache-2.0"
] | null | null | null | Logs_Generation/generate_log.py | ericsun95/Real_Time_Logs_Analysis_System | 463ec7a68a669d45dcf07764df0b284232853cd5 | [
"Apache-2.0"
] | 1 | 2021-02-17T02:30:46.000Z | 2021-02-17T02:30:46.000Z | # coding=UTF-8
# coding to generate logs
# crontab -e
# */1 * * * * sh /Users/eric_sun/IdeaProjects/SparkProject/log_generator.sh
import random
import time
url_paths = [
"class/112.html",
"class/130.html",
"class/131.html",
"class/145.html",
"class/128.html",
"class/146.html",
"learn/821",... | 26.186047 | 101 | 0.607904 |
4a22df4be7ea2aa5d47270ce9c3cf858a95fcab4 | 10,248 | py | Python | few_shots_clf/triplet_classifier/triplet_classifier.py | delmalih/few-shots-classification | 8b06ff673882fd0d8b99cd705e5e5fab0ec93fb3 | [
"MIT"
] | null | null | null | few_shots_clf/triplet_classifier/triplet_classifier.py | delmalih/few-shots-classification | 8b06ff673882fd0d8b99cd705e5e5fab0ec93fb3 | [
"MIT"
] | null | null | null | few_shots_clf/triplet_classifier/triplet_classifier.py | delmalih/few-shots-classification | 8b06ff673882fd0d8b99cd705e5e5fab0ec93fb3 | [
"MIT"
] | null | null | null | # pylint: disable=attribute-defined-outside-init, no-member, line-too-long, too-many-instance-attributes
##########################
# Imports
##########################
import os
from typing import Dict, List
import pickle
import numpy as np
from tensorflow import keras
from easydict import EasyDict as edict
from ... | 40.03125 | 104 | 0.569672 |
4a22df5817c8df5a2c4e436c1c75cadd0bf76db7 | 743 | py | Python | xdl/xdl/python/training/filter.py | Ru-Xiang/x-deeplearning | 04cc0497150920c64b06bb8c314ef89977a3427a | [
"Apache-2.0"
] | 4,071 | 2018-12-13T04:17:38.000Z | 2022-03-30T03:29:35.000Z | xdl/xdl/python/training/filter.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 359 | 2018-12-21T01:14:57.000Z | 2022-02-15T07:18:02.000Z | xdl/xdl/python/training/filter.py | laozhuang727/x-deeplearning | 781545783a4e2bbbda48fc64318fb2c6d8bbb3cc | [
"Apache-2.0"
] | 1,054 | 2018-12-20T09:57:42.000Z | 2022-03-29T07:16:53.000Z | # Copyright 2018 Alibaba Group. 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 o... | 41.277778 | 80 | 0.671602 |
4a22e03b5638c66a2097c5d987063481f2bbc164 | 4,983 | py | Python | python/ql/test/library-tests/frameworks/rest_framework/taint_test.py | angie1148/codeql | ab3cad749cabe762437d2eb0aab554acea6ce84d | [
"MIT"
] | 643 | 2018-08-03T11:16:54.000Z | 2020-04-27T23:10:55.000Z | python/ql/test/library-tests/frameworks/rest_framework/taint_test.py | angie1148/codeql | ab3cad749cabe762437d2eb0aab554acea6ce84d | [
"MIT"
] | 1,880 | 2018-08-03T11:28:32.000Z | 2020-04-28T13:18:51.000Z | python/ql/test/library-tests/frameworks/rest_framework/taint_test.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 218 | 2018-08-03T11:16:58.000Z | 2020-04-24T02:24:00.000Z | from rest_framework.decorators import api_view, parser_classes
from rest_framework.views import APIView
from rest_framework.request import Request
from rest_framework.response import Response
from rest_framework.parsers import JSONParser
from django.urls import path
ensure_tainted = ensure_not_tainted = print
# func... | 37.75 | 139 | 0.668673 |
4a22e098428fe5d3e75ffa6853f0e1cf6f8e3b3b | 8,518 | py | Python | dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/test/test_integration_shared_resource.py | BadDevCode/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/test/test_integration_shared_resource.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Gems/CloudGemFramework/v1/ResourceManager/resource_manager/test/test_integration_shared_resource.py | olivier-be/lumberyard | 3d688932f919dbf5821f0cb8a210ce24abe39e9e | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 42.59 | 152 | 0.656257 |
4a22e30eff72aa735dba72efdbcfde2525fe2fef | 3,079 | py | Python | connectomics/data/augmentation/cutnoise.py | Shray64/pytorch_connectomics | d6c814f11ac2f8418ede5ae220a93016f50214fc | [
"MIT"
] | null | null | null | connectomics/data/augmentation/cutnoise.py | Shray64/pytorch_connectomics | d6c814f11ac2f8418ede5ae220a93016f50214fc | [
"MIT"
] | null | null | null | connectomics/data/augmentation/cutnoise.py | Shray64/pytorch_connectomics | d6c814f11ac2f8418ede5ae220a93016f50214fc | [
"MIT"
] | null | null | null | from __future__ import print_function, division
from typing import Optional
import numpy as np
from .augmentor import DataAugment
class CutNoise(DataAugment):
r"""3D CutNoise data augmentation.
Randomly add noise to a cuboid region in the volume to force the model
to learn denoising when making... | 37.096386 | 90 | 0.586879 |
4a22e415e248d1db13a91d20dd14b3d3b203dbe6 | 168,966 | py | Python | modules/s3/s3forms.py | JamesGlub/eden-1 | 179073cb011a837494db9f040b23105b34d4c82c | [
"MIT"
] | 1 | 2021-11-08T16:38:22.000Z | 2021-11-08T16:38:22.000Z | modules/s3/s3forms.py | JamesGlub/eden-1 | 179073cb011a837494db9f040b23105b34d4c82c | [
"MIT"
] | null | null | null | modules/s3/s3forms.py | JamesGlub/eden-1 | 179073cb011a837494db9f040b23105b34d4c82c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" S3 SQL Forms
@copyright: 2012-2021 (c) Sahana Software Foundation
@license: MIT
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
restri... | 37.73247 | 147 | 0.453192 |
4a22e430dee519a00d251ae75e9a919bc93891e3 | 430 | py | Python | src/foxdot/sandbox/180619_1908_compo_014.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | 4 | 2018-06-29T18:39:34.000Z | 2021-06-20T16:44:29.000Z | src/foxdot/sandbox/180619_1908_compo_014.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | src/foxdot/sandbox/180619_1908_compo_014.py | Neko250/aisthesis | 1d4a2c3070d10596c28b25ea2170523583e7eff0 | [
"Apache-2.0"
] | null | null | null | Scale.default = "minor"
p1.reset() >> play('X(---[--]---[---])', amp=.5).stop()
p2.reset() >> play('V O ', lpf=800, amp=.25).stop()
p3.reset() >> play('{ ppP[pP][Pp]}', amp=.5, sample=PRand(7), rate=PRand([.5,1,2]), shape=PWhite(0,.5))
s1.reset() >> space(P[0,2,[3,5],4]+(0,var([7,12],8),const(5)), dur=4, oct=4, delay... | 39.090909 | 110 | 0.525581 |
4a22e4d73b67256db494f25462a715479973b5bf | 4,244 | py | Python | allauth/socialaccount/providers/battlenet/views.py | s-tatus/django-allauth | 25fe632acf12571ae2ac9e692e8890019d5a6e7b | [
"MIT"
] | 2 | 2018-02-12T09:54:33.000Z | 2019-03-31T14:32:32.000Z | allauth/socialaccount/providers/battlenet/views.py | s-tatus/django-allauth | 25fe632acf12571ae2ac9e692e8890019d5a6e7b | [
"MIT"
] | 15 | 2020-06-05T19:26:26.000Z | 2022-03-11T23:33:53.000Z | allauth/socialaccount/providers/battlenet/views.py | s-tatus/django-allauth | 25fe632acf12571ae2ac9e692e8890019d5a6e7b | [
"MIT"
] | 1 | 2021-07-24T12:47:00.000Z | 2021-07-24T12:47:00.000Z | """
OAuth2 Adapter for Battle.net
Resources:
* Battle.net OAuth2 documentation:
https://dev.battle.net/docs/read/oauth
* Battle.net API documentation:
https://dev.battle.net/io-docs
* Original announcement:
https://us.battle.net/en/forum/topic/13979297799
* The Battle.net API forum:
https://us.battle.... | 33.15625 | 78 | 0.645853 |
4a22e5233f054615082e480f1b9008287eea36a9 | 3,904 | py | Python | demo.py | wtyhub/University1652-Baseline | 26becc2b73b74bd9e7c7de31f9d7f6baebbd64c8 | [
"MIT"
] | 1 | 2021-06-03T03:06:52.000Z | 2021-06-03T03:06:52.000Z | demo.py | gold-pipe/University1652-Baseline | bad3c7555decf8e5213bfdda85dc317057ff3cc2 | [
"MIT"
] | null | null | null | demo.py | gold-pipe/University1652-Baseline | bad3c7555decf8e5213bfdda85dc317057ff3cc2 | [
"MIT"
] | null | null | null | import argparse
import scipy.io
import torch
import numpy as np
import os
from torchvision import datasets
import matplotlib
#matplotlib.use('agg')
import matplotlib.pyplot as plt
#######################################################################
# Evaluate
parser = argparse.ArgumentParser(description='Demo')
pars... | 32.533333 | 108 | 0.626793 |
4a22e53d19b53b7e5ab4f9092eaba4e78873017d | 19,952 | py | Python | synapse/tests/test_lib_stormhttp.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | synapse/tests/test_lib_stormhttp.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | synapse/tests/test_lib_stormhttp.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | import os
import json
import shutil
import synapse.exc as s_exc
import synapse.common as s_common
import synapse.lib.certdir as s_certdir
import synapse.lib.httpapi as s_httpapi
import synapse.tests.utils as s_test
class TstWebSock(s_httpapi.WebSocket):
def initialize(self):
pass
async def open(se... | 42.632479 | 129 | 0.502656 |
4a22e64eeff285aa265f4098989a131c2234022d | 17 | py | Python | src/__init__.py | algerbrex/Schemey | 4a499054758d33d2f170b0b536f1c1a7372385b7 | [
"Unlicense"
] | 6 | 2017-02-07T19:03:38.000Z | 2021-12-12T01:42:42.000Z | src/__init__.py | algerbrex/Schemey | 4a499054758d33d2f170b0b536f1c1a7372385b7 | [
"Unlicense"
] | 5 | 2017-03-13T23:59:49.000Z | 2017-06-02T03:45:21.000Z | src/__init__.py | algerbrex/Schemey | 4a499054758d33d2f170b0b536f1c1a7372385b7 | [
"Unlicense"
] | null | null | null | """
package.
"""
| 4.25 | 8 | 0.411765 |
4a22e69838edf902fca03d413c168fc1cd7b7d86 | 801 | py | Python | tests/providers/test_memset.py | chibiegg/lexicon | 6230ea1e567a730243dc77c08ff6c4c16f136157 | [
"MIT"
] | null | null | null | tests/providers/test_memset.py | chibiegg/lexicon | 6230ea1e567a730243dc77c08ff6c4c16f136157 | [
"MIT"
] | null | null | null | tests/providers/test_memset.py | chibiegg/lexicon | 6230ea1e567a730243dc77c08ff6c4c16f136157 | [
"MIT"
] | null | null | null | # Test for one implementation of the interface
from lexicon.providers.memset import Provider
from integration_tests import IntegrationTests
from unittest import TestCase
import pytest
# Hook into testing framework by inheriting unittest.TestCase and reuse
# the tests which *each and every* implementation of the inter... | 34.826087 | 91 | 0.787765 |
4a22e69a40fa7ddd01e5347834880dc483439f09 | 10,621 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20191201preview/backend.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20191201preview/backend.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20191201preview/backend.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 47.415179 | 1,638 | 0.660201 |
4a22e6ec890e9c5fd6c4d9b15123685994622609 | 161 | py | Python | read_xnb.py | fesh0r/xnb_parse | cc3aef8fff4be1320068a78001795e7e1c8bd548 | [
"MIT"
] | 31 | 2015-01-15T01:57:48.000Z | 2021-06-26T17:08:56.000Z | read_xnb.py | fesh0r/xnb_parse | cc3aef8fff4be1320068a78001795e7e1c8bd548 | [
"MIT"
] | 1 | 2016-05-11T13:48:30.000Z | 2016-05-11T13:48:30.000Z | read_xnb.py | fesh0r/xnb_parse | cc3aef8fff4be1320068a78001795e7e1c8bd548 | [
"MIT"
] | 5 | 2015-01-26T08:58:20.000Z | 2020-02-25T11:03:33.000Z | #!/usr/bin/python
"""
Dump info from XNB
"""
from __future__ import print_function
from xnb_parse.read_xnb import main
if __name__ == '__main__':
main()
| 12.384615 | 37 | 0.708075 |
4a22e7bf41db1d4cc91f827d69654801815525ff | 633 | py | Python | manage.py | vamshisowdaboina/pythonrestapi | d69352e58bc55ae36182909a26dd49bd45fc0792 | [
"MIT"
] | null | null | null | manage.py | vamshisowdaboina/pythonrestapi | d69352e58bc55ae36182909a26dd49bd45fc0792 | [
"MIT"
] | null | null | null | manage.py | vamshisowdaboina/pythonrestapi | d69352e58bc55ae36182909a26dd49bd45fc0792 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pythonrestapi.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | 28.772727 | 77 | 0.685624 |
4a22e7cd45875e852447e55d7e10a2f8ae710358 | 382 | py | Python | backend/jmeter/studentquestion/_genfolders.py | gh-jsoares/ES20-AL14-Project | 2bc8c212064c13071015699636c2e83edbc61b88 | [
"MIT"
] | null | null | null | backend/jmeter/studentquestion/_genfolders.py | gh-jsoares/ES20-AL14-Project | 2bc8c212064c13071015699636c2e83edbc61b88 | [
"MIT"
] | null | null | null | backend/jmeter/studentquestion/_genfolders.py | gh-jsoares/ES20-AL14-Project | 2bc8c212064c13071015699636c2e83edbc61b88 | [
"MIT"
] | null | null | null | from os import walk, makedirs, path
for r, d, fs in walk('.'):
if r != '.':
break
for f in fs:
s = f.split('.')
name = s[0]
ext = s[1]
if ext == 'jmx':
dirpath = "pictures/{}".format(name)
if not path.exists(dirpath):
makedirs(dirp... | 25.466667 | 56 | 0.431937 |
4a22e819336a61d03e001a1c1b1cd4b657f18408 | 10,498 | py | Python | tests/test_memoryfile.py | mraspaud/rasterio | 474d614e3839bee6a9fa4d9adc7e85936d41f7f1 | [
"BSD-3-Clause"
] | null | null | null | tests/test_memoryfile.py | mraspaud/rasterio | 474d614e3839bee6a9fa4d9adc7e85936d41f7f1 | [
"BSD-3-Clause"
] | null | null | null | tests/test_memoryfile.py | mraspaud/rasterio | 474d614e3839bee6a9fa4d9adc7e85936d41f7f1 | [
"BSD-3-Clause"
] | null | null | null | """MemoryFile tests. MemoryFile requires GDAL 2.0+.
Tests in this file will ONLY run for GDAL >= 2.x"""
from io import BytesIO
import logging
import os.path
from affine import Affine
import numpy
import pytest
import rasterio
from rasterio.io import MemoryFile, ZipMemoryFile
from rasterio.enums import MaskFlags
fro... | 36.964789 | 236 | 0.636216 |
4a22e9efe0e177af5a16467e8e24da5520b89845 | 21,414 | py | Python | gps_pb2.py | djhedges/exit_speed | 86c8a36dd7c53d9f67157c359625b8d33715f917 | [
"Apache-2.0"
] | 10 | 2020-09-25T19:48:50.000Z | 2021-10-13T13:42:56.000Z | gps_pb2.py | djhedges/exit_speed | 86c8a36dd7c53d9f67157c359625b8d33715f917 | [
"Apache-2.0"
] | null | null | null | gps_pb2.py | djhedges/exit_speed | 86c8a36dd7c53d9f67157c359625b8d33715f917 | [
"Apache-2.0"
] | 1 | 2021-02-08T14:50:48.000Z | 2021-02-08T14:50:48.000Z | # pytype: skip-file
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: gps.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_datab... | 46.653595 | 2,244 | 0.736761 |
4a22ea2ade7c81075c3531ffda1732ae18c96732 | 39 | py | Python | src/tuplenet/version.py | darcy-xiao/TupleNet | c44275501b43fbf02da824a21ba60ef1e29a0fbe | [
"Apache-2.0"
] | 1 | 2018-12-07T09:12:30.000Z | 2018-12-07T09:12:30.000Z | src/tuplenet/version.py | darcy-xiao/TupleNet | c44275501b43fbf02da824a21ba60ef1e29a0fbe | [
"Apache-2.0"
] | null | null | null | src/tuplenet/version.py | darcy-xiao/TupleNet | c44275501b43fbf02da824a21ba60ef1e29a0fbe | [
"Apache-2.0"
] | null | null | null | __version__ = '0.1.8'
git_version = ''
| 13 | 21 | 0.641026 |
4a22ea5329c709a72c79a0390da302b927221e6c | 138 | py | Python | src/pyinterp/interpolator/__init__.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | 67 | 2019-07-09T09:10:22.000Z | 2022-03-01T09:46:35.000Z | src/pyinterp/interpolator/__init__.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | 8 | 2019-07-15T13:54:31.000Z | 2021-06-28T05:06:34.000Z | src/pyinterp/interpolator/__init__.py | readthedocs-assistant/pangeo-pyinterp | e9dc18445dce36638d5a90f64c8e2f1b53164f90 | [
"BSD-3-Clause"
] | 7 | 2019-07-15T17:28:16.000Z | 2022-01-19T19:43:47.000Z | from .bicubic import bicubic
from .bivariate import bivariate
from .trivariate import trivariate
from .quadrivariate import quadrivariate
| 27.6 | 40 | 0.855072 |
4a22ea718a336a8f88c2a73ce5801b06be99c203 | 2,069 | py | Python | tests/event_store/test_reading_all_streams.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/event_store/test_reading_all_streams.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | tests/event_store/test_reading_all_streams.py | mpsiva89/protean | 315fa56da3f64178bbbf0edf1995af46d5eb3da7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from datetime import datetime
from uuid import uuid4
import pytest
from protean import BaseEvent, BaseEventSourcedAggregate
from protean.fields import DateTime, Identifier, String, Text
class User(BaseEventSourcedAggregate):
email = String()
name = String(max_length=50)
... | 24.341176 | 73 | 0.724021 |
4a22ebf74d58332a12f012badacfc6df046513fe | 2,412 | py | Python | plot/figure7.py | leelew/AttConvLSTM | 62f614efa8654125014e3e31efd309a946f23b6c | [
"MIT"
] | 4 | 2021-09-26T10:01:43.000Z | 2022-02-08T00:01:45.000Z | plot/figure7.py | leelew/AttConvLSTM | 62f614efa8654125014e3e31efd309a946f23b6c | [
"MIT"
] | null | null | null | plot/figure7.py | leelew/AttConvLSTM | 62f614efa8654125014e3e31efd309a946f23b6c | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.basemap import Basemap
import matplotlib.colors as mcolors
plt.rc('font', family='Times New Roman')
from utils import fillna, gen_meshgrid, gen_metric, gen_tac_sac
def figure7():
tac, sac = gen_tac_sac()
... | 26.217391 | 88 | 0.524046 |
4a22ec26a60275e04101d2a4b69ad0941be966f5 | 317 | py | Python | pdfreader/models.py | vishalagrawal22/JEEMainsMarksCalculator | 4de5c1c510abc19b78fd02532298957e9d243e02 | [
"MIT"
] | 2 | 2020-12-04T18:36:29.000Z | 2021-03-13T15:21:31.000Z | pdfreader/models.py | vishalagrawal22/JEEMainsMarksCalculator | 4de5c1c510abc19b78fd02532298957e9d243e02 | [
"MIT"
] | null | null | null | pdfreader/models.py | vishalagrawal22/JEEMainsMarksCalculator | 4de5c1c510abc19b78fd02532298957e9d243e02 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class MCQQuestion(models.Model):
QuestionId = models.CharField(max_length = 30)
AnswerId = models.CharField(max_length = 30)
class SAQuestion(models.Model):
QuestionId = models.CharField(max_length = 30)
Answer = models.CharField(max_length = 30) | 31.7 | 48 | 0.753943 |
4a22ed029e84b52733035aa3bf29af6dc0e0547f | 21,891 | py | Python | ExtentionPackages/cryptography/x509/base.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | 2 | 2017-04-24T03:04:45.000Z | 2017-09-19T03:38:37.000Z | ExtentionPackages/cryptography/x509/base.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | 4 | 2017-10-24T21:47:53.000Z | 2019-09-22T13:12:57.000Z | ExtentionPackages/cryptography/x509/base.py | hongsofwing/PyQYT-master | 9a112d9adbf9885a8b7535b7ef7759b60a0f9a29 | [
"CNRI-Python"
] | 2 | 2019-06-17T11:51:56.000Z | 2020-07-25T08:29:56.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import datetime
from enum import Enum
import six
from crypto... | 32.051245 | 79 | 0.622722 |
4a22ed4fbc6fcd209e30c27da28e19c136b7180e | 2,830 | py | Python | app/auth/views.py | Leina33/Blog | 743e4d2a8036a74b1406f6f857b4703f014b458d | [
"MIT"
] | null | null | null | app/auth/views.py | Leina33/Blog | 743e4d2a8036a74b1406f6f857b4703f014b458d | [
"MIT"
] | null | null | null | app/auth/views.py | Leina33/Blog | 743e4d2a8036a74b1406f6f857b4703f014b458d | [
"MIT"
] | null | null | null | from flask import render_template,redirect,url_for,flash,request
from . import auth
from flask_login import login_required,current_user, login_user,logout_user
import re
from app.models import User
@auth.route('/login',methods=['GET','POST'])
def login():
if request.method == 'POST':
form = request.form
... | 44.920635 | 96 | 0.625795 |
4a22eddcf632e74b4ad3b31e327a0a7cbb86fc84 | 13,671 | py | Python | tracker/south_migrations/0002_add_upper_name_index_on_alias.py | AB-informatica-service/swat4stats.com | c3a7e83953373b8d876a4ca7055b59168f345442 | [
"MIT"
] | 14 | 2015-04-02T06:50:10.000Z | 2021-02-18T13:26:46.000Z | tracker/south_migrations/0002_add_upper_name_index_on_alias.py | AB-informatica-service/swat4stats.com | c3a7e83953373b8d876a4ca7055b59168f345442 | [
"MIT"
] | 4 | 2016-09-09T19:27:44.000Z | 2020-05-08T17:59:31.000Z | tracker/south_migrations/0002_add_upper_name_index_on_alias.py | AB-informatica-service/swat4stats.com | c3a7e83953373b8d876a4ca7055b59168f345442 | [
"MIT"
] | 8 | 2015-01-03T02:44:04.000Z | 2022-03-23T19:52:00.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.execute('CREATE INDEX tracker_alias_upper_name_isp_id ON tracker_alias (upper(... | 76.803371 | 179 | 0.561773 |
4a22edf0037413fe22b202774ec280dfd0dfbd82 | 6,837 | py | Python | SARS CoV-2/Station C/Old/Thermo Taqpath P20 Multi - 1 input plate/v1_station_c_S14_taqpath_p20multi.py | biogerm-pt/OT-2 | fed24f06db0ee19216a1f793482f588f07e3762a | [
"Apache-2.0"
] | null | null | null | SARS CoV-2/Station C/Old/Thermo Taqpath P20 Multi - 1 input plate/v1_station_c_S14_taqpath_p20multi.py | biogerm-pt/OT-2 | fed24f06db0ee19216a1f793482f588f07e3762a | [
"Apache-2.0"
] | null | null | null | SARS CoV-2/Station C/Old/Thermo Taqpath P20 Multi - 1 input plate/v1_station_c_S14_taqpath_p20multi.py | biogerm-pt/OT-2 | fed24f06db0ee19216a1f793482f588f07e3762a | [
"Apache-2.0"
] | null | null | null | from opentrons import protocol_api
import json
import os
import math
# metadata
metadata = {
'protocolName': 'Version 1 S14 Station C Thermo Taqpath P20 Multi',
'author': 'Nick <protocols@opentrons.com>',
'source': 'Custom Protocol Request',
'apiLevel': '2.3'
}
NUM_SAMPLES = 96 # start with 8 samples... | 37.773481 | 117 | 0.597484 |
4a22ee46cce5939943ba1af4e95a483f16a01b9d | 14,376 | py | Python | applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | null | null | null | applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | null | null | null | applications/ContactStructuralMechanicsApplication/python_scripts/contact_convergence_criteria_factory.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division # makes KM backward compatible with python 2.6 and 2.7
#import kratos core and applications
import KratosMultiphysics as KM
# Import applications
import KratosMultiphysics.ContactStructuralMechanicsApplication as CSMA
# Construction of the class conver... | 65.944954 | 237 | 0.679605 |
4a22ef67d9a8b2f4ebf241c5e29b5eb17f238b2f | 1,694 | py | Python | train.py | bigbang87/NNPathfinder | 89e4283c604224d2b2d2552a8e90c97176f436c9 | [
"Apache-2.0"
] | null | null | null | train.py | bigbang87/NNPathfinder | 89e4283c604224d2b2d2552a8e90c97176f436c9 | [
"Apache-2.0"
] | null | null | null | train.py | bigbang87/NNPathfinder | 89e4283c604224d2b2d2552a8e90c97176f436c9 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import numpy as np
import os
import matplotlib.pyplot as plt
from data_loader import load_3D, load_2D
def create_model():
model = tf.keras.Sequential([
tf.keras.layers.Dense(units=1200, activation=tf.keras.activations.relu, input_shape=[441]),
tf.keras.layers.Dense(units=1200, activation=... | 34.571429 | 112 | 0.747934 |
4a22ef87d0efbf8651f1b55b2b6ff8a552bfe0ef | 892 | py | Python | tests/terraform/runner/extra_checks/S3EnvironmentCheck.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | 1 | 2021-04-26T10:09:52.000Z | 2021-04-26T10:09:52.000Z | tests/terraform/runner/extra_checks/S3EnvironmentCheck.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | null | null | null | tests/terraform/runner/extra_checks/S3EnvironmentCheck.py | kylelaker/checkov | 6eada26030a87f397a6bf1831827b3dc6c5dad2d | [
"Apache-2.0"
] | null | null | null | from checkov.common.models.enums import CheckResult, CheckCategories
from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck
class S3EnvironmentCheck(BaseResourceCheck):
def __init__(self):
name = "Ensure s3 has environment tag of developemnt/staging/production"
id = "C... | 40.545455 | 106 | 0.707399 |
4a22f1018071a54612c0565d76fc85ed2052e978 | 547 | py | Python | src/solution/374_guess_number_higher_or_lo.py | rsj217/leetcode-in-python3 | f5d9fa50e55ce60a159f9a8ccf6080dc86f56852 | [
"MIT"
] | 1 | 2021-03-01T07:33:45.000Z | 2021-03-01T07:33:45.000Z | src/solution/374_guess_number_higher_or_lo.py | rsj217/leetcode-in-python3 | f5d9fa50e55ce60a159f9a8ccf6080dc86f56852 | [
"MIT"
] | null | null | null | src/solution/374_guess_number_higher_or_lo.py | rsj217/leetcode-in-python3 | f5d9fa50e55ce60a159f9a8ccf6080dc86f56852 | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def guessNumber(self, n: int) -> int:
pass
import unittest
class TestSolution(unittest.TestCase):
def setUp(self):
self.test_case = [
(10, 6),
(1, 1),
(2, 1),
(2, 2),
]
self.s = Solution... | 18.233333 | 57 | 0.531993 |
4a22f1833fb5ca549ed3af7d841fbb5da1ea509d | 4,096 | py | Python | reachy_sdk/trajectory/__init__.py | Pandinosaurus/reachy-sdk | c155bc8f56488de305e6fe5bacdb77aad0383295 | [
"Apache-2.0"
] | null | null | null | reachy_sdk/trajectory/__init__.py | Pandinosaurus/reachy-sdk | c155bc8f56488de305e6fe5bacdb77aad0383295 | [
"Apache-2.0"
] | null | null | null | reachy_sdk/trajectory/__init__.py | Pandinosaurus/reachy-sdk | c155bc8f56488de305e6fe5bacdb77aad0383295 | [
"Apache-2.0"
] | null | null | null | """Trajectory utility package.
Provides goto and goto_async functions. They let you easily create and compose movements on joint coordinates.
"""
import asyncio
import numpy as np
import time
from concurrent.futures import ThreadPoolExecutor
from queue import Queue
from typing import Dict, Optional
from .interpolati... | 36.571429 | 122 | 0.698486 |
4a22f1aa5837583d0fe9ffc5d53c5d24ce6efe3a | 410 | py | Python | holmes/migrations/versions/17346cf564bc_renaming_delimiters_table_to_limiters.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | holmes/migrations/versions/17346cf564bc_renaming_delimiters_table_to_limiters.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | holmes/migrations/versions/17346cf564bc_renaming_delimiters_table_to_limiters.py | scorphus/holmes-api | 6b3c76d4299fecf2d8799d7b5c3c6a6442cacd59 | [
"MIT"
] | null | null | null | """Renaming delimiters table to limiters
Revision ID: 17346cf564bc
Revises: 4d45dd3d8ce5
Create Date: 2014-03-07 14:45:27.909631
"""
# revision identifiers, used by Alembic.
revision = '17346cf564bc'
down_revision = '4d45dd3d8ce5'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.rename_table('... | 17.826087 | 45 | 0.746341 |
4a22f1f9f2ecd5152b3c191259d4e3c2df16b533 | 4,010 | py | Python | src/syft/ast/static_attr.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | 1 | 2021-06-06T06:57:36.000Z | 2021-06-06T06:57:36.000Z | src/syft/ast/static_attr.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | null | null | null | src/syft/ast/static_attr.py | dnabanita7/PySyft | ce2510e65f5bad382e88806bcde30fa38c3c76c4 | [
"Apache-2.0"
] | null | null | null | # stdlib
from typing import Any
from typing import Callable as CallableT
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
# syft relative
from .. import ast
from .. import lib
from ..core.common.pointer import AbstractPointer
from ..core.node.common.action.get_or_set... | 33.697479 | 91 | 0.64788 |
4a22f1fba7edb1b7dc99b2d780c024a5e7442570 | 16,354 | py | Python | lib/JumpScale/data/models/Models.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 8 | 2016-04-14T14:04:57.000Z | 2020-06-09T00:24:34.000Z | lib/JumpScale/data/models/Models.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 418 | 2016-01-25T10:30:00.000Z | 2021-09-08T12:29:13.000Z | lib/JumpScale/data/models/Models.py | Jumpscale/jumpscale_core8 | f80ac9b1ab99b833ee7adb17700dcf4ef35f3734 | [
"Apache-2.0"
] | 9 | 2016-04-21T07:21:17.000Z | 2022-01-24T10:35:54.000Z |
from mongoengine.fields import IntField, StringField, ListField, BooleanField, DictField, EmbeddedDocumentField, FloatField
from mongoengine import DoesNotExist, EmbeddedDocument, Document
import hmac
from JumpScale import j
try:
import fcrypt as crypt
except ImportError:
import crypt
DB = 'jumpscale_system'... | 32.708 | 123 | 0.627369 |
4a22f2e6391b07b8691a118b076966ca9efef7b9 | 7,268 | py | Python | benchmarks/benchmarks/stats_sampling.py | drammock/scipy | f1c6b54f51dfc8c3e83d826867a68026f20b243b | [
"BSD-3-Clause"
] | 1 | 2021-05-03T06:55:01.000Z | 2021-05-03T06:55:01.000Z | benchmarks/benchmarks/stats_sampling.py | grlee77/scipy | 7c904a77ad3d239bc35f18222810c9454e5441c3 | [
"BSD-3-Clause"
] | null | null | null | benchmarks/benchmarks/stats_sampling.py | grlee77/scipy | 7c904a77ad3d239bc35f18222810c9454e5441c3 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from .common import Benchmark, safe_import
with safe_import():
from scipy import stats
with safe_import():
from scipy import special
# Beta distribution with a = 2, b = 3
class contdist1:
def pdf(self, x):
return 12 * x * (1-x)**2
def dpdf(self, x):
return 12 * ((1... | 28.390625 | 78 | 0.566731 |
4a22f2f2a082e8cf8acb1e8bb3230fdc1a8e63ab | 654 | py | Python | contacts/app/migrations/0014_auto_20200221_1937.py | Jeevan-Kiran-Lenka/IPARK | 2d1c64672708a21e7b3c4608cbcd63b06996504f | [
"MIT"
] | 5 | 2020-03-04T05:12:35.000Z | 2021-11-17T11:31:40.000Z | contacts/app/migrations/0014_auto_20200221_1937.py | Jeevan-Kiran-Lenka/IPARK | 2d1c64672708a21e7b3c4608cbcd63b06996504f | [
"MIT"
] | null | null | null | contacts/app/migrations/0014_auto_20200221_1937.py | Jeevan-Kiran-Lenka/IPARK | 2d1c64672708a21e7b3c4608cbcd63b06996504f | [
"MIT"
] | 2 | 2020-03-21T17:35:26.000Z | 2021-03-27T16:25:51.000Z | # Generated by Django 2.2.1 on 2020-02-21 14:07
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0013_contact_sl_no'),
]
operations = [
migrations.AlterField(
model_name='contact',
... | 26.16 | 121 | 0.611621 |
4a22f2f39af394a375ee94a1fc3be99e444437e1 | 752 | py | Python | BabaBarghi/BabaBarghi/urls.py | alirahmani93/store | e7218fc4aa9307421af39433c3f113283404132b | [
"MIT"
] | null | null | null | BabaBarghi/BabaBarghi/urls.py | alirahmani93/store | e7218fc4aa9307421af39433c3f113283404132b | [
"MIT"
] | 1 | 2021-08-17T03:13:18.000Z | 2021-08-17T03:24:35.000Z | BabaBarghi/BabaBarghi/urls.py | alirahmani93/store | e7218fc4aa9307421af39433c3f113283404132b | [
"MIT"
] | null | null | null | """BabaBarghi URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/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... | 34.181818 | 77 | 0.710106 |
4a22f307c0b4f352a9ccd638716b0031136c49e4 | 1,349 | py | Python | ingestion/src/metadata/ingestion/source/oracle.py | chaitrarao4/OpenMetadata | c28f7ac22263fd325a1124e9758f97cc9ac9d5d3 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/oracle.py | chaitrarao4/OpenMetadata | c28f7ac22263fd325a1124e9758f97cc9ac9d5d3 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/oracle.py | chaitrarao4/OpenMetadata | c28f7ac22263fd325a1124e9758f97cc9ac9d5d3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# 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... | 37.472222 | 78 | 0.756857 |
4a22f36fe2a0ce639266c92e3bce4c57ec31190b | 196 | py | Python | collect_file_names.py | probably-not-porter/random-item-generator | 74d3d57c8e07e48e6a41e121574fc318df2c8406 | [
"0BSD"
] | null | null | null | collect_file_names.py | probably-not-porter/random-item-generator | 74d3d57c8e07e48e6a41e121574fc318df2c8406 | [
"0BSD"
] | null | null | null | collect_file_names.py | probably-not-porter/random-item-generator | 74d3d57c8e07e48e6a41e121574fc318df2c8406 | [
"0BSD"
] | null | null | null |
#literally make my life so much easier with 4 lines of python
import os
list = os.listdir("images")
for i in range(len(list)):
print("theImages[" + str(i) + "] = 'images/" + list[i] + "';") | 28 | 66 | 0.627551 |
4a22f3a335036de5a6c90960f338bb7f12f05100 | 2,080 | py | Python | app/app/urls.py | maenibreigheth/social_media_app | 242aa570ca41203d4e840a245b556c16158212fe | [
"MIT"
] | null | null | null | app/app/urls.py | maenibreigheth/social_media_app | 242aa570ca41203d4e840a245b556c16158212fe | [
"MIT"
] | null | null | null | app/app/urls.py | maenibreigheth/social_media_app | 242aa570ca41203d4e840a245b556c16158212fe | [
"MIT"
] | null | null | null | """app 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-based vie... | 37.818182 | 108 | 0.699519 |
4a22f3cb82777be318a5c80d67a11d12035d37cc | 8,374 | py | Python | notifications.py | labscript-suite-temp-archive/blacs-fork--rbchip-blacs--forked-from--labscript_suite-blacs | 2f023c6564dee46b555922e949d4bee81de8ca58 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | notifications.py | labscript-suite-temp-archive/blacs-fork--rbchip-blacs--forked-from--labscript_suite-blacs | 2f023c6564dee46b555922e949d4bee81de8ca58 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | notifications.py | labscript-suite-temp-archive/blacs-fork--rbchip-blacs--forked-from--labscript_suite-blacs | 2f023c6564dee46b555922e949d4bee81de8ca58 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #####################################################################
# #
# /notifications.py #
# #
# Copyright 2013, Monash University ... | 52.666667 | 233 | 0.602938 |
4a22f46de4268f659661cfe1031cdad6caf3ee63 | 604 | py | Python | tests/data/python2.py | StarryInternet/black | f90f50a7436ca13517933c290ef007e7cb2e7258 | [
"MIT"
] | 16,110 | 2019-07-22T21:54:54.000Z | 2022-03-31T22:52:39.000Z | tests/data/python2.py | StarryInternet/black | f90f50a7436ca13517933c290ef007e7cb2e7258 | [
"MIT"
] | 1,981 | 2019-07-22T21:26:16.000Z | 2022-03-31T23:14:35.000Z | tests/data/python2.py | StarryInternet/black | f90f50a7436ca13517933c290ef007e7cb2e7258 | [
"MIT"
] | 1,762 | 2019-07-22T21:23:00.000Z | 2022-03-31T06:10:22.000Z | #!/usr/bin/env python2
import sys
print >> sys.stderr , "Warning:" ,
print >> sys.stderr , "this is a blast from the past."
print >> sys.stderr , "Look, a repr:", `sys`
def function((_globals, _locals)):
exec ur"print 'hi from exec!'" in _globals, _locals
function((globals(), locals()))
# output
#!/usr/bi... | 17.764706 | 55 | 0.652318 |
4a22f5b92059905aa858d550edd90b2ce87f2fa5 | 3,921 | py | Python | dbd-course-recommender/course_recommender/course/models.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | 1 | 2020-11-13T12:37:28.000Z | 2020-11-13T12:37:28.000Z | dbd-course-recommender/course_recommender/course/models.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | 1 | 2020-11-17T07:17:29.000Z | 2021-04-23T20:39:59.000Z | dbd-course-recommender/course_recommender/course/models.py | singh-priyank/DBMS_Course | 6538cd7bc2172b8a54c6c71776a2f5ad4daeeb32 | [
"MIT"
] | null | null | null | from django.core.validators import MaxValueValidator
from django.db import models
from django.utils import timezone
from django.db.models import Avg
import math
class Platform(models.Model):
name = name = models.CharField(max_length=80, blank=True, null=True)
image = models.ImageField(upload_to='platform/%Y/%m... | 38.821782 | 112 | 0.674828 |
4a22f5b94471d87380421376ce23fa98b85c7e47 | 57,565 | py | Python | source/NemohImproved/NemohPython/nemoh/preprocessor.py | NREL/OpenWARP | ca49c4cbde17e0cead69bd9e55a81d5c0fafe4df | [
"Apache-2.0"
] | 22 | 2015-06-22T07:35:04.000Z | 2021-07-23T05:10:09.000Z | source/NemohImproved/NemohPython/nemoh/preprocessor.py | NREL/OpenWARP | ca49c4cbde17e0cead69bd9e55a81d5c0fafe4df | [
"Apache-2.0"
] | 9 | 2015-07-30T20:01:35.000Z | 2020-08-28T17:29:18.000Z | source/NemohImproved/NemohPython/nemoh/preprocessor.py | NREL/OpenWARP | ca49c4cbde17e0cead69bd9e55a81d5c0fafe4df | [
"Apache-2.0"
] | 13 | 2016-04-01T07:45:27.000Z | 2021-04-06T08:33:33.000Z | #!/usr/bin/env python
"""
This is the main program for the pre processor. It reads and prepares the Mesh and
calculation cases. (radiation and diffraction; set of body conditions).
Changes in version 1.1:
Added possibility to run the code with custom settings
Changes in version 1.2 (Code Acceleration of the Calc... | 45.722796 | 238 | 0.654026 |
4a22f634d818f8c55b89b8fdec9e092569f20b9c | 3,636 | py | Python | build_analyzer.py | jefflongo/sdmmc-analyzer | bea83fec1de0a86a5bab2cfd9f9e62805e8329d5 | [
"MIT"
] | null | null | null | build_analyzer.py | jefflongo/sdmmc-analyzer | bea83fec1de0a86a5bab2cfd9f9e62805e8329d5 | [
"MIT"
] | null | null | null | build_analyzer.py | jefflongo/sdmmc-analyzer | bea83fec1de0a86a5bab2cfd9f9e62805e8329d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os, glob, platform
#find out if we're running on mac or linux and set the dynamic library extension
dylib_ext = ""
if platform.system().lower() == "darwin":
dylib_ext = ".dylib"
else:
dylib_ext = ".so"
print("Running on " + platform.system())
#make sure the release folder exi... | 30.049587 | 100 | 0.653465 |
4a22f6a2953dc8e36b3bf944f8894db98c6e7d56 | 4,880 | py | Python | cogs/public/User.py | nathanielfernandes/HamoodBot | e22b321e0594360fb427080322ed8731b48cec16 | [
"MIT"
] | 17 | 2020-07-28T19:40:22.000Z | 2022-03-29T16:42:36.000Z | cogs/public/User.py | nathanielfernandes/HamoodBot | e22b321e0594360fb427080322ed8731b48cec16 | [
"MIT"
] | 4 | 2021-05-25T21:46:50.000Z | 2022-03-12T00:39:07.000Z | cogs/public/User.py | nathanielfernandes/HamoodBot | e22b321e0594360fb427080322ed8731b48cec16 | [
"MIT"
] | 6 | 2021-01-14T17:17:02.000Z | 2021-09-14T23:12:13.000Z | import random, json, datetime
import discord
from discord.ext import commands
class User(commands.Cog):
"""Get Users Information"""
def __init__(self, bot):
self.bot = bot
self.Hamood = bot.Hamood
@commands.command()
@commands.bot_has_permissions(embed_links=True)
async def joine... | 39.674797 | 237 | 0.525615 |
4a22f8428d25d16d40c202c7addc556556f73233 | 9,777 | bzl | Python | rust/private/rust_analyzer.bzl | scentini/rules_rust | 0e3593fc5d839e4a74523f07e885b761ee19e662 | [
"Apache-2.0"
] | 349 | 2016-03-15T20:38:00.000Z | 2022-03-28T07:03:02.000Z | rust/private/rust_analyzer.bzl | aproxs/rules_rust | 77285c1aaebc1c55e6e80acc27be4c54aa30076d | [
"Apache-2.0"
] | 872 | 2016-03-18T06:40:26.000Z | 2022-03-31T16:04:04.000Z | rust/private/rust_analyzer.bzl | aproxs/rules_rust | 77285c1aaebc1c55e6e80acc27be4c54aa30076d | [
"Apache-2.0"
] | 231 | 2016-03-16T11:34:47.000Z | 2022-03-25T23:01:35.000Z | # Copyright 2020 Google
#
# 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, softw... | 40.568465 | 140 | 0.689884 |
4a22f8608996ddaca87baae3571633cb1694cc87 | 573 | py | Python | fdk_client/platform/models/SlideshowMedia.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/SlideshowMedia.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | fdk_client/platform/models/SlideshowMedia.py | kavish-d/fdk-client-python | a1023eb530473322cb52e095fc4ceb226c1e6037 | [
"MIT"
] | null | null | null | """Platform Models."""
from marshmallow import fields, Schema
from marshmallow.validate import OneOf
from ..enums import *
from ..models.BaseSchema import BaseSchema
from .Action import Action
class SlideshowMedia(BaseSchema):
# Content swagger.json
type = fields.Str(required=False)
... | 15.078947 | 57 | 0.689354 |
4a22fa29be5ec5f15d08795d60a7d1809dc162fc | 6,124 | py | Python | Products/CMFTopic/DateCriteria.py | zopefoundation/Products.CMFTopic | 634077f393ce95939d4d349e90db10be90754660 | [
"ZPL-2.1"
] | null | null | null | Products/CMFTopic/DateCriteria.py | zopefoundation/Products.CMFTopic | 634077f393ce95939d4d349e90db10be90754660 | [
"ZPL-2.1"
] | null | null | null | Products/CMFTopic/DateCriteria.py | zopefoundation/Products.CMFTopic | 634077f393ce95939d4d349e90db10be90754660 | [
"ZPL-2.1"
] | null | null | null | ##############################################################################
#
# Copyright (c) 2001 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 36.452381 | 78 | 0.522861 |
4a22fab9ea1dec1e1ce62fcb4c34b964fa009b8c | 166,330 | py | Python | airflow/www/views.py | imcecil/incubator-airflow | 461ec4c7e6efb2f6fc0c342afdc44a350469ff1d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/www/views.py | imcecil/incubator-airflow | 461ec4c7e6efb2f6fc0c342afdc44a350469ff1d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | airflow/www/views.py | imcecil/incubator-airflow | 461ec4c7e6efb2f6fc0c342afdc44a350469ff1d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 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... | 35.442148 | 110 | 0.605489 |
4a22fc9b435c9b7ec4c402e09432ead4a4cb60af | 3,353 | py | Python | tests/unit/utils/runtime_whitespace_regex_test.py | d--j/salt | 579f900be67a80e1a77674bc6aa21fec836c1c4c | [
"Apache-2.0"
] | 1 | 2015-06-05T13:47:02.000Z | 2015-06-05T13:47:02.000Z | tests/unit/utils/runtime_whitespace_regex_test.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | tests/unit/utils/runtime_whitespace_regex_test.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
tests.unit.utils.runtime_whitespace_regex_test
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:copyright: © 2012-2013 by the SaltStack Team, see AUTHORS for more details
:license: Apache 2.0, see LICENSE for more d... | 30.761468 | 79 | 0.698181 |
4a22fcc3c8ad1a3e760e61dd35132bec7ac943e6 | 6,735 | py | Python | src/pymap3d/ned.py | ryanpavlick/pymap3d | 968f6837b1550503461f884d8ce2e1b10c0db1f4 | [
"BSD-2-Clause"
] | 116 | 2020-02-23T02:04:18.000Z | 2022-03-29T00:19:37.000Z | src/pymap3d/ned.py | ryanpavlick/pymap3d | 968f6837b1550503461f884d8ce2e1b10c0db1f4 | [
"BSD-2-Clause"
] | 19 | 2020-03-02T08:13:46.000Z | 2022-03-30T17:50:00.000Z | src/pymap3d/ned.py | ryanpavlick/pymap3d | 968f6837b1550503461f884d8ce2e1b10c0db1f4 | [
"BSD-2-Clause"
] | 28 | 2020-02-24T11:56:03.000Z | 2022-03-29T02:29:37.000Z | """ Transforms involving NED North East Down """
from __future__ import annotations
import typing
from .enu import geodetic2enu, aer2enu, enu2aer
from .ecef import ecef2geodetic, ecef2enuv, ecef2enu, enu2ecef
from .ellipsoid import Ellipsoid
if typing.TYPE_CHECKING:
from numpy import ndarray
def aer2ned(
a... | 22.009804 | 86 | 0.585449 |
4a22fd0683c2fef1952b7edad4c2554469ef0a1f | 6,258 | py | Python | soaplib/core/test/wsdl/test_wsdl_ports_services.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/test/wsdl/test_wsdl_ports_services.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | soaplib/core/test/wsdl/test_wsdl_ports_services.py | divaliu1408/overfit | 083dcfaa758391092933e19544462cd831e73ef0 | [
"Apache-2.0"
] | null | null | null | #
# soaplib - Copyright (C) Soaplib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This li... | 31.447236 | 87 | 0.644934 |
4a22fd4c6a34f3f9a486be08d8d38cb615d46752 | 14,005 | py | Python | backend-service/bot_server/api/request_handler.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 1 | 2020-10-06T06:23:04.000Z | 2020-10-06T06:23:04.000Z | backend-service/bot_server/api/request_handler.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 38 | 2020-10-01T00:13:35.000Z | 2020-10-27T03:33:09.000Z | backend-service/bot_server/api/request_handler.py | sravankumarmatta/Classroom-Bot | 2081600c553c003ada4c0dadd2d4715e11c073d2 | [
"MIT"
] | 8 | 2020-10-20T07:00:11.000Z | 2021-09-28T00:23:45.000Z | # TODO: Add Grade table and requests for it using patch
"""
This modules has functions to handle all the supported commands for the
classroom api's.
Author: Ayushi Rajendra Kumar
Date: 2020-09-02
"""
from .models import Course, Group, Student, Assignment, Schedule
import traceback
from rest_framework import exceptions... | 28.93595 | 106 | 0.622278 |
4a22fd6b0fa6efb8d1284cf733622fb9c925fc66 | 292 | py | Python | przyklady/przyklady/0/listing_8-2.py | bitounu/Nauka-Pythona | e02dd239ba2c294d6fdd98958301b3ece44f44d1 | [
"Unlicense"
] | null | null | null | przyklady/przyklady/0/listing_8-2.py | bitounu/Nauka-Pythona | e02dd239ba2c294d6fdd98958301b3ece44f44d1 | [
"Unlicense"
] | null | null | null | przyklady/przyklady/0/listing_8-2.py | bitounu/Nauka-Pythona | e02dd239ba2c294d6fdd98958301b3ece44f44d1 | [
"Unlicense"
] | null | null | null | # Listing_8-2.py
# Copyright Warren & Carter Sande, 2013
# Released under MIT license http://www.opensource.org/licenses/mit-license.php
# Version $version ----------------------------
# Przy każdym przejściu pętli for wykonujemy coś innego
for petla in [1, 2, 3, 4, 5]:
print petla
| 29.2 | 81 | 0.65411 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.