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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7971ccd5fdbe89d83303268c6c850fd8c06c47d6 | 4,154 | py | Python | hloc/pipelines/Cambridge/pipeline.py | Gatsby23/Hierarchical-Localization | e8ea8a25b297bae2e058abfb294335219d9f55ad | [
"Apache-2.0"
] | 1 | 2022-03-24T05:50:05.000Z | 2022-03-24T05:50:05.000Z | hloc/pipelines/Cambridge/pipeline.py | Gatsby23/Hierarchical-Localization | e8ea8a25b297bae2e058abfb294335219d9f55ad | [
"Apache-2.0"
] | null | null | null | hloc/pipelines/Cambridge/pipeline.py | Gatsby23/Hierarchical-Localization | e8ea8a25b297bae2e058abfb294335219d9f55ad | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
import argparse
from .utils import (
create_query_list_with_intrinsics, scale_sfm_images, evaluate)
from ... import extract_features, match_features, pairs_from_covisibility
from ... import triangulation, localize_sfm, pairs_from_retrieval, logger
SCENES = ['KingsCollege', 'OldHospital', ... | 36.438596 | 83 | 0.635291 |
7971cdabacdf8d03c34b82c627623cbc1e3bce26 | 3,071 | py | Python | compare_sizes.py | PhenomRetroShare/color-fonts | 8dfc286829786fc3026b16b279034c5cf136804e | [
"Apache-2.0"
] | null | null | null | compare_sizes.py | PhenomRetroShare/color-fonts | 8dfc286829786fc3026b16b279034c5cf136804e | [
"Apache-2.0"
] | 2 | 2020-04-06T10:25:18.000Z | 2020-04-07T05:45:44.000Z | compare_sizes.py | rsheeter/color-fonts | 2e94add728bcf119e18cd4f18c7676fdbb9f5e60 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from pathlib import Path
import csv
import fontTools.ttLib.woff2
import functools
import io
import itertools
import logging
import math
import multiprocessing
import sys
import argparse
FONT_BASE_NAMES = {
"noto": "Noto Color Emoji",
"noto_noflags": "Noto Color Emoji except flags",
... | 31.336735 | 83 | 0.668838 |
7971cdbb1e0b11b9382d484cb563bbe314560a99 | 151 | py | Python | Kornislav/main.py | KalawelaLo/Kattis | cbe2cc742f9902f5d325deb04fd39208774070c5 | [
"Unlicense"
] | null | null | null | Kornislav/main.py | KalawelaLo/Kattis | cbe2cc742f9902f5d325deb04fd39208774070c5 | [
"Unlicense"
] | null | null | null | Kornislav/main.py | KalawelaLo/Kattis | cbe2cc742f9902f5d325deb04fd39208774070c5 | [
"Unlicense"
] | null | null | null | import sys as s
def main():
ar = []
for i in s.stdin.readline().split():
ar.append(int(i))
ar.sort()
print(ar[0]*ar[2])
main() | 16.777778 | 40 | 0.523179 |
7971ce337b043f6fc00fdc46c09cd446083fcf0a | 7,684 | py | Python | ops.py | maxorange/surface-to-structure | b7227ea34a6ebc358d491eea70f0fa6cca400265 | [
"MIT"
] | 2 | 2018-04-02T06:49:49.000Z | 2021-06-13T06:38:57.000Z | ops.py | maxorange/surface-to-structure | b7227ea34a6ebc358d491eea70f0fa6cca400265 | [
"MIT"
] | 1 | 2017-12-08T07:36:31.000Z | 2017-12-12T11:33:33.000Z | ops.py | maxorange/surface-to-structure | b7227ea34a6ebc358d491eea70f0fa6cca400265 | [
"MIT"
] | 2 | 2018-07-26T14:15:12.000Z | 2018-08-04T02:43:30.000Z | import tensorflow as tf
import numpy as np
class Model(object):
def __init__(self, vars):
self.saver = tf.train.Saver(vars)
def session(self, sess):
if sess is not None:
self.sess = sess
else:
config_proto = tf.ConfigProto()
config_proto.gpu_options... | 37.120773 | 130 | 0.618428 |
7971ce58c08686fac6089185897469220cb3bd9f | 5,653 | py | Python | waves_litecoin_gateway/test/test_litecoin_chain_query_service.py | jansenmarc/WavesGatewayLTCExample | 14aaf9de5740ce32d175efa413f0060561421c93 | [
"MIT"
] | 8 | 2018-03-04T02:09:04.000Z | 2020-03-01T08:09:27.000Z | waves_litecoin_gateway/test/test_litecoin_chain_query_service.py | jansenmarc/WavesGatewayLTCExample | 14aaf9de5740ce32d175efa413f0060561421c93 | [
"MIT"
] | 6 | 2018-04-22T09:40:02.000Z | 2019-09-16T08:33:51.000Z | waves_litecoin_gateway/test/test_litecoin_chain_query_service.py | jansenmarc/WavesGatewayLTCExample | 14aaf9de5740ce32d175efa413f0060561421c93 | [
"MIT"
] | 12 | 2018-05-02T16:06:25.000Z | 2020-11-25T16:52:02.000Z | import unittest
from decimal import Decimal
from unittest.mock import MagicMock
from waves_gateway import Transaction, TransactionReceiver
from waves_litecoin_gateway.lib import LitecoinChainQueryService
class LitecoinChainQueryServiceTest(unittest.TestCase):
def setUp(self):
self._ltc_proxy = MagicMock... | 39.256944 | 114 | 0.617902 |
7971ce75bd4d1258d6a032f956879ff2609f2247 | 1,592 | py | Python | fractal/L3.py | kandrey99/python-demo | c053cc3ad87efebf0dfb1340c49c603cce75e684 | [
"MIT"
] | null | null | null | fractal/L3.py | kandrey99/python-demo | c053cc3ad87efebf0dfb1340c49c603cce75e684 | [
"MIT"
] | 1 | 2021-01-20T12:53:59.000Z | 2021-01-20T12:53:59.000Z | fractal/L3.py | kandrey99/python-demo | c053cc3ad87efebf0dfb1340c49c603cce75e684 | [
"MIT"
] | null | null | null | import turtle
class L3:
def __init__(self):
# screen settings
self.width, self.height = 800, 800
screen = turtle.Screen()
screen.setup(self.width, self.height)
screen.delay(0)
screen.bgcolor('black')
# pen settings
self.pen = turtle.Turtle()
... | 27.929825 | 71 | 0.513819 |
7971d0199738cd6fd72d3a7c2778968865ee814e | 1,549 | py | Python | Syntax_functions.py | gregmaya/Riyadh_modeling | 9ec048ccc25ad1f69ea76e963a8ada2a95f3c254 | [
"MIT"
] | null | null | null | Syntax_functions.py | gregmaya/Riyadh_modeling | 9ec048ccc25ad1f69ea76e963a8ada2a95f3c254 | [
"MIT"
] | null | null | null | Syntax_functions.py | gregmaya/Riyadh_modeling | 9ec048ccc25ad1f69ea76e963a8ada2a95f3c254 | [
"MIT"
] | null | null | null | import geopandas as gpd
import pandas as pd
from numpy import log
def Syntax_normalizer(df):
"""
This function returns normalised Choice and Integration values based on Space Syntax literature.
NaCH = logCH+1/logTD+3
NaIN = NC^1.2/TD
"""
#extracting the useful columns
useful_cols... | 36.023256 | 104 | 0.661717 |
7971d18bb0a45e722f76c2525e57efebdf974fdf | 402 | py | Python | cardgame/engine/management/commands/clear_sims.py | Tjorriemorrie/cardgame | 892c0a16675f372afff13995035306128c505888 | [
"Apache-2.0"
] | null | null | null | cardgame/engine/management/commands/clear_sims.py | Tjorriemorrie/cardgame | 892c0a16675f372afff13995035306128c505888 | [
"Apache-2.0"
] | null | null | null | cardgame/engine/management/commands/clear_sims.py | Tjorriemorrie/cardgame | 892c0a16675f372afff13995035306128c505888 | [
"Apache-2.0"
] | null | null | null | from django.core.management import BaseCommand
from engine.models import Game
class Command(BaseCommand):
help = 'Clear simulate data in db'
# def add_arguments(self, parser):
# parser.add_argument('max_power', type=int)
def handle(self, *args, **options):
self.stdout.write('Clearing al... | 25.125 | 52 | 0.666667 |
7971d20582d205acbc0f4686ce7bc76a516f77da | 8,195 | py | Python | mmdet/apis/train.py | SKholkin/mmdetection | 52c7616efaeb7375ded8894a26d1fa729e80bed5 | [
"Apache-2.0"
] | 4 | 2020-01-19T08:00:31.000Z | 2020-02-14T03:25:45.000Z | mmdet/apis/train.py | SKholkin/mmdetection | 52c7616efaeb7375ded8894a26d1fa729e80bed5 | [
"Apache-2.0"
] | 3 | 2021-03-12T12:06:37.000Z | 2021-07-28T11:21:33.000Z | mmdet/apis/train.py | SKholkin/mmdetection | 52c7616efaeb7375ded8894a26d1fa729e80bed5 | [
"Apache-2.0"
] | 1 | 2020-04-21T01:44:04.000Z | 2020-04-21T01:44:04.000Z | import warnings
import numpy as np
import random
import torch
from copy import copy
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (HOOKS, DistSamplerSeedHook, EpochBasedRunner, LoggerHook,
Fp16OptimizerHook, OptimizerHook, build_optimizer, load_chec... | 37.081448 | 99 | 0.636242 |
7971d22ab1e52c09af093e430436caea3dd26c2f | 11,618 | py | Python | train_img_model_cent.py | daijucug/Pytorch-person-reid-imglevel-videolevel | b48bc25f21fa10705b12838883f9a4aa257d4ffe | [
"MIT"
] | 2 | 2019-03-17T03:19:06.000Z | 2019-03-17T03:19:09.000Z | train_img_model_cent.py | daijucug/Pytorch-person-reid-imglevel-videolevel | b48bc25f21fa10705b12838883f9a4aa257d4ffe | [
"MIT"
] | null | null | null | train_img_model_cent.py | daijucug/Pytorch-person-reid-imglevel-videolevel | b48bc25f21fa10705b12838883f9a4aa257d4ffe | [
"MIT"
] | 1 | 2018-05-08T03:05:36.000Z | 2018-05-08T03:05:36.000Z | from __future__ import print_function, absolute_import
import os
import sys
import time
import datetime
import argparse
import os.path as osp
import numpy as np
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
from torch.optim import lr_scheduler
import d... | 41.492857 | 114 | 0.645292 |
7971d2a727f5c3c7173c8133cb0a1d4ca5396eb5 | 822 | py | Python | catalog/form.py | deathvn/django_local_library | af95809ee3f24ee57ecc8b68494c9f3f1ab85dae | [
"MIT"
] | null | null | null | catalog/form.py | deathvn/django_local_library | af95809ee3f24ee57ecc8b68494c9f3f1ab85dae | [
"MIT"
] | null | null | null | catalog/form.py | deathvn/django_local_library | af95809ee3f24ee57ecc8b68494c9f3f1ab85dae | [
"MIT"
] | null | null | null | import datetime
from django import forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
class RenewBookForm(forms.Form):
renewal_date = forms.DateField(help_text="Enter a date between now and 4 weeks (default: 3).")
def clean_renewal_date(self):
... | 37.363636 | 98 | 0.692214 |
7971d38b2133012d05d9eb9e0e136aae57af3a93 | 6,158 | py | Python | onlinelinguisticdatabase/controllers/collectionbackups.py | dativebase/old | bcfb856e8a8cccddcab4eaedc1aa107697ceee2f | [
"Apache-2.0"
] | 2 | 2019-11-19T22:39:04.000Z | 2019-11-20T16:13:43.000Z | onlinelinguisticdatabase/controllers/collectionbackups.py | jrwdunham/old | bcfb856e8a8cccddcab4eaedc1aa107697ceee2f | [
"Apache-2.0"
] | 51 | 2015-02-11T21:42:48.000Z | 2016-08-16T18:52:44.000Z | onlinelinguisticdatabase/controllers/collectionbackups.py | jrwdunham/old | bcfb856e8a8cccddcab4eaedc1aa107697ceee2f | [
"Apache-2.0"
] | 1 | 2019-11-19T22:39:07.000Z | 2019-11-19T22:39:07.000Z | # Copyright 2016 Joel Dunham
#
# 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 writi... | 36.223529 | 100 | 0.660279 |
7971d3ec4528e304c84cae17ea3e14e8939d9947 | 7,370 | py | Python | qa/rpc-tests/multikeysporks.py | knight2008/axe | 007bf4ff9605b4552810bcc4df73f4eb4fb011fa | [
"MIT"
] | 1 | 2019-05-16T09:00:00.000Z | 2019-05-16T09:00:00.000Z | qa/rpc-tests/multikeysporks.py | knight2008/axe | 007bf4ff9605b4552810bcc4df73f4eb4fb011fa | [
"MIT"
] | null | null | null | qa/rpc-tests/multikeysporks.py | knight2008/axe | 007bf4ff9605b4552810bcc4df73f4eb4fb011fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Axe Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_fra... | 48.486842 | 112 | 0.601221 |
7971d5f3b77bbc097b28584fe868886a49321641 | 474 | py | Python | PythonBrasil/EstruturaDeDecisao/6.py | rafhaelom/Python | 293c410b460b58b9ffcbadba0f8e5304e04c53be | [
"MIT"
] | null | null | null | PythonBrasil/EstruturaDeDecisao/6.py | rafhaelom/Python | 293c410b460b58b9ffcbadba0f8e5304e04c53be | [
"MIT"
] | 2 | 2021-05-19T01:58:50.000Z | 2021-05-19T02:00:01.000Z | PythonBrasil/EstruturaDeDecisao/6.py | rafhaelom/Python | 293c410b460b58b9ffcbadba0f8e5304e04c53be | [
"MIT"
] | null | null | null | # 6 - Faça um Programa que leia três números e mostre o maior deles.
num1 = int(input("Digite o primeiro número: "))
num2 = int(input("Digite o segundo número: "))
num3 = int(input("Digite o terceiro número: "))
if(num1 > num2 and num1 > num3):
print("O maior é: %d" %num1)
elif(num2 > num1 and num2 > num3):... | 36.461538 | 69 | 0.630802 |
7971d686be2bca83a83d3a0b61167b4c8ef4a306 | 8,754 | py | Python | sdk/python/pulumi_azure_nextgen/web/v20160801/web_app_instance_function_slot.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20160801/web_app_instance_function_slot.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/web/v20160801/web_app_instance_function_slot.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"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
__a... | 39.61086 | 440 | 0.625314 |
7971d6df9f392cf9e039fadeb919ce58b050c325 | 495 | py | Python | test/maskinporten_api/conftest.py | oslokommune/okdata-maskinporten-api | f323f9da977a5b43c18a002ebe8f11b09f20cda8 | [
"MIT"
] | null | null | null | test/maskinporten_api/conftest.py | oslokommune/okdata-maskinporten-api | f323f9da977a5b43c18a002ebe8f11b09f20cda8 | [
"MIT"
] | 3 | 2021-08-31T12:11:44.000Z | 2021-09-17T12:09:45.000Z | test/maskinporten_api/conftest.py | oslokommune/okdata-maskinporten-api | f323f9da977a5b43c18a002ebe8f11b09f20cda8 | [
"MIT"
] | null | null | null | import pytest
from OpenSSL import crypto
from maskinporten_api.jwt_client import JWTConfig, JWTGenerator
@pytest.fixture
def jwt_config():
with open("test/data/test.p12", "rb") as f:
p12 = crypto.load_pkcs12(f.read(), b"test")
return JWTConfig(
issuer="foo-corp",
consumer_org="123",
... | 22.5 | 63 | 0.692929 |
7971d6fec3dc9efa6ab46b7ca1ca5063de4e25f6 | 8,780 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_load_balancer_outbound_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.459459 | 206 | 0.665831 |
7971d7c6f5f995f07149f44f88d00cf6fb1a823f | 7,230 | py | Python | raw_data/nist_data/build_periodic_table.py | coltonbh/QCElemental | b75fb72d7f45c8b605ae1a54773d4a8be6655752 | [
"BSD-3-Clause"
] | 99 | 2018-10-18T18:29:24.000Z | 2022-02-12T14:35:37.000Z | raw_data/nist_data/build_periodic_table.py | coltonbh/QCElemental | b75fb72d7f45c8b605ae1a54773d4a8be6655752 | [
"BSD-3-Clause"
] | 254 | 2018-10-16T21:29:39.000Z | 2022-03-31T23:38:23.000Z | raw_data/nist_data/build_periodic_table.py | Andrew-AbiMansour/QCElemental | 2e84cd686d5fff0fc79accb28ffa985de4684704 | [
"BSD-3-Clause"
] | 67 | 2018-11-05T16:18:39.000Z | 2022-03-25T14:47:36.000Z | """
This file will generate a JSON blob usable by QCElemental for physical constants
"""
import json
import datetime
import requests
from yapf.yapflib.yapf_api import FormatCode
import re
from decimal import Decimal
# from https://www.nist.gov/pml/periodic-table-elements on 30 Aug 2018
# NIST SP 966 (July 2018)
ele... | 24.1 | 113 | 0.587967 |
7971d9a27c0310e2900ff87f2114c8b0ad7ff464 | 33,563 | py | Python | pipenv/vendor/tomlkit/parser.py | devxpy/pipenv | 2af40a8a1ca33c595a3a6557479ee09fc4b87fee | [
"MIT"
] | 2 | 2018-11-06T04:53:13.000Z | 2018-11-08T22:10:20.000Z | pipenv/vendor/tomlkit/parser.py | devxpy/pipenv | 2af40a8a1ca33c595a3a6557479ee09fc4b87fee | [
"MIT"
] | null | null | null | pipenv/vendor/tomlkit/parser.py | devxpy/pipenv | 2af40a8a1ca33c595a3a6557479ee09fc4b87fee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import itertools
import re
import string
from copy import copy
from ._compat import PY2
from ._compat import chr
from ._compat import decode
from ._utils import _escaped
from ._utils import parse_rfc3339
from .container import Container
... | 31.105653 | 88 | 0.506421 |
7971dae506061f9996d959f985135b18e31e13e2 | 2,028 | py | Python | internal/notes/builtin-SAVE/packages/bdw-gc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/bdw-gc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/bdw-gc/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 39 | 78 | 0.657298 |
7971deaaa183dec5af1f148b65c4311c890cd95f | 1,581 | py | Python | dataset/vidor.py | doc-doc/VidVRD-helper | 284808d3d975772689f6acbe5bbcd271b57dc725 | [
"MIT"
] | null | null | null | dataset/vidor.py | doc-doc/VidVRD-helper | 284808d3d975772689f6acbe5bbcd271b57dc725 | [
"MIT"
] | null | null | null | dataset/vidor.py | doc-doc/VidVRD-helper | 284808d3d975772689f6acbe5bbcd271b57dc725 | [
"MIT"
] | null | null | null | import os
import glob
from .dataset import DatasetV1
class VidOR(DatasetV1):
"""
The dataset used in ACM MM'19 Relation Understanding Challenge
"""
def __init__(self, anno_rpath, video_rpath, splits, low_memory=True):
"""
anno_rpath: the root path of annotations
video_rpath: ... | 37.642857 | 111 | 0.657812 |
7971deb27be45ed37ad78be2c0cef0cbfbbaa559 | 2,703 | py | Python | src/compas_ghpython/utilities/sets.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_ghpython/utilities/sets.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_ghpython/utilities/sets.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas
if compas.IPY:
from System import Array
if compas.GH:
from Grasshopper import DataTree as Tree
from Grasshopper.Kernel.Data import GH_Path as Path
__all__ = [
'list... | 27.03 | 84 | 0.54125 |
7971df341803b49a8752bc04ee30c56005230216 | 1,980 | py | Python | escenas/menu.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | escenas/menu.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | null | null | null | escenas/menu.py | hectorpadin1/FICGames | 6d75c3ef74f0d6d2881021833fe06cd67e207ab1 | [
"MIT"
] | 1 | 2022-03-29T15:38:18.000Z | 2022-03-29T15:38:18.000Z | import pygame as pg
from settings import *
from managers.resourcemanager import ResourceManager as GR
from escenas.escena import Escena
"""
Escena que implementa comportamientos de menú
"""
class Menu(Escena):
def __init__(self,director, btns, back, logo=None, logoy=0):
Escena.__init__(self, director)
... | 26.4 | 75 | 0.606566 |
7971df90e443840950cd601e497c8521972f4ae6 | 783 | py | Python | aws_clutter/tools.py | cloudkeep-io/detached-ebs-cost-monitor | 7f5bf1f6527169ac9590c2910a1fd63484d681a7 | [
"MIT"
] | 17 | 2021-12-11T21:32:59.000Z | 2022-03-08T03:46:55.000Z | aws_clutter/tools.py | cloudkeep-io/detached-ebs-cost-monitor | 7f5bf1f6527169ac9590c2910a1fd63484d681a7 | [
"MIT"
] | null | null | null | aws_clutter/tools.py | cloudkeep-io/detached-ebs-cost-monitor | 7f5bf1f6527169ac9590c2910a1fd63484d681a7 | [
"MIT"
] | 1 | 2022-02-11T03:57:24.000Z | 2022-02-11T03:57:24.000Z | import pendulum
import json
import datetime
def boto3_paginate(method, **kwargs):
'''
utility function - use like this:
s3 = session.client('s3')
for key in boto3_paginate(s3.list_objects_v2, Bucket='my-bucket'):
print(key)
'''
client = method.__self__
paginator = client.get_pagina... | 27.964286 | 70 | 0.661558 |
7971df958614474b5fc944137af9cdc60840bbad | 4,006 | py | Python | Examples/Image/Detection/utils/nms_wrapper.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 17,702 | 2016-01-25T14:03:01.000Z | 2019-05-06T09:23:41.000Z | Examples/Image/Detection/utils/nms_wrapper.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 3,489 | 2016-01-25T13:32:09.000Z | 2019-05-03T11:29:15.000Z | Examples/Image/Detection/utils/nms_wrapper.py | shyamalschandra/CNTK | 0e7a6cd4cc174eab28eaf2ffc660c6380b9e4e2d | [
"MIT"
] | 5,180 | 2016-01-25T14:02:12.000Z | 2019-05-06T04:24:28.000Z | # Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
import numpy as np
from utils.cython_modules.cpu_nms import cpu_nms
try:
from u... | 39.27451 | 125 | 0.632052 |
7971e109f04dfc1eefa0f84ddd303e0bfbc21d8e | 75 | py | Python | ice-models/python/angsens_unified/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 1 | 2020-12-24T22:00:01.000Z | 2020-12-24T22:00:01.000Z | ice-models/python/angsens_unified/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | null | null | null | ice-models/python/angsens_unified/__init__.py | hschwane/offline_production | e14a6493782f613b8bbe64217559765d5213dc1e | [
"MIT"
] | 3 | 2020-07-17T09:20:29.000Z | 2021-03-30T16:44:18.000Z | from .unified_angular_acceptance import ang as angular_acceptance_function
| 37.5 | 74 | 0.906667 |
7971e229dfae26f5a05d83b66c1b4cb13e78769c | 887 | py | Python | SignInApp/models.py | Usiteam/SignInApp | 3f9c4a0ddf01b5bf44eafb31a0e37cc232e1c606 | [
"MIT"
] | null | null | null | SignInApp/models.py | Usiteam/SignInApp | 3f9c4a0ddf01b5bf44eafb31a0e37cc232e1c606 | [
"MIT"
] | 1 | 2021-06-01T21:42:38.000Z | 2021-06-01T21:42:38.000Z | SignInApp/models.py | Usiteam/SignInApp | 3f9c4a0ddf01b5bf44eafb31a0e37cc232e1c606 | [
"MIT"
] | null | null | null | from datetime import datetime
from SignInApp import db
from flask_sqlalchemy import SQLAlchemy
import json
import requests
num_gms_semester = 13
num_gms_free = 2
year_dues = 70
semester_dues = 45
class Member(db.Model):
id = db.Column(db.Integer, primary_key = True)
eid = db.Column(db.String(8), unique = True)
fir... | 22.74359 | 48 | 0.736189 |
7971e291be7b9ac0770456e75fb2abd9780168f0 | 724 | py | Python | iHome/utils/commons.py | czl0325/iHome_flask | e6161e92a441c2a9d406530042546585965c8a1c | [
"Apache-2.0"
] | 1 | 2020-05-14T11:34:52.000Z | 2020-05-14T11:34:52.000Z | iHome/utils/commons.py | czl0325/iHome_flask | e6161e92a441c2a9d406530042546585965c8a1c | [
"Apache-2.0"
] | null | null | null | iHome/utils/commons.py | czl0325/iHome_flask | e6161e92a441c2a9d406530042546585965c8a1c | [
"Apache-2.0"
] | 1 | 2020-05-14T11:34:54.000Z | 2020-05-14T11:34:54.000Z | from werkzeug.routing import BaseConverter
from flask import session, g, jsonify
from iHome.utils.response_code import RET, error_map
import functools
# 定义正则转换器
class ReConverter(BaseConverter):
def __init__(self, url_map, regex):
# 调用父类的初始化方法
super(ReConverter, self).__init__(url_map)
# 保... | 26.814815 | 82 | 0.674033 |
7971e361063d36a82e0981676ea70bf0040a707d | 7,616 | py | Python | st2reactor/tests/integration/test_sensor_container.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | st2reactor/tests/integration/test_sensor_container.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | st2reactor/tests/integration/test_sensor_container.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 35.588785 | 98 | 0.69761 |
7971e3bca793b9188b3884713ba5f1758be43133 | 10,530 | py | Python | v4_pos+baseline/find_remove_sample.py | egeersu/Multihop-GNN | 1638eb2408030004112b8c19d4a2f68571eb4011 | [
"MIT"
] | 2 | 2021-09-18T17:59:56.000Z | 2022-03-03T12:26:26.000Z | v4_pos+baseline/find_remove_sample.py | egeersu/Multihop-GNN | 1638eb2408030004112b8c19d4a2f68571eb4011 | [
"MIT"
] | null | null | null | v4_pos+baseline/find_remove_sample.py | egeersu/Multihop-GNN | 1638eb2408030004112b8c19d4a2f68571eb4011 | [
"MIT"
] | null | null | null | # coding: utf-8
import scipy
import json
import re
import allennlp
from allennlp.predictors.predictor import Predictor
from allennlp.commands.elmo import ElmoEmbedder
from torch.nn.utils.rnn import pad_sequence
from spacy.lang.en import English
import numpy as np
# import tensorflow as tf
import os
import sys
import... | 38.856089 | 137 | 0.562108 |
7971e4d4b9aca0e2b5aa6cdc0ddfa71e73752c4c | 17,950 | py | Python | dvc/scm/git/backend/pygit2.py | pwoolvett/dvc | 61fe8bc59c639711b2b8206cd06d6d74cf0167c5 | [
"Apache-2.0"
] | null | null | null | dvc/scm/git/backend/pygit2.py | pwoolvett/dvc | 61fe8bc59c639711b2b8206cd06d6d74cf0167c5 | [
"Apache-2.0"
] | 99 | 2021-03-29T08:59:15.000Z | 2022-03-31T04:10:23.000Z | dvc/scm/git/backend/pygit2.py | hexagon-geo-surv/dvc | 4244e5a4754928315ccc996a005f3ee9d102f962 | [
"Apache-2.0"
] | null | null | null | import locale
import logging
import os
import stat
from contextlib import contextmanager
from io import BytesIO, StringIO
from typing import (
TYPE_CHECKING,
Callable,
Iterable,
List,
Mapping,
Optional,
Tuple,
Union,
)
from funcy import cached_property
from dvc.scm.base import MergeCon... | 30.475382 | 79 | 0.573092 |
7971e55c35b477c3f623b71cb1750558669ddd37 | 963 | py | Python | app/objects/secondclass/c_visibility.py | mihaid-b/caldera | 90af73188a9865757c167efd31cbd87a8e6160b1 | [
"Apache-2.0"
] | 3,385 | 2017-11-29T02:08:31.000Z | 2022-03-31T13:38:11.000Z | app/objects/secondclass/c_visibility.py | mihaid-b/caldera | 90af73188a9865757c167efd31cbd87a8e6160b1 | [
"Apache-2.0"
] | 1,283 | 2017-11-29T16:45:31.000Z | 2022-03-31T20:10:04.000Z | app/objects/secondclass/c_visibility.py | mihaid-b/caldera | 90af73188a9865757c167efd31cbd87a8e6160b1 | [
"Apache-2.0"
] | 800 | 2017-11-29T17:48:43.000Z | 2022-03-30T22:39:40.000Z | import marshmallow as ma
from app.utility.base_object import BaseObject
class VisibilitySchema(ma.Schema):
score = ma.fields.Integer()
adjustments = ma.fields.List(ma.fields.Integer())
@ma.post_load
def build_visibility(self, data, **_):
return Visibility(**data)
class Visibility(BaseObje... | 22.395349 | 77 | 0.64486 |
7971e5bf046ee39b29d13e881cb536f985ba613e | 2,829 | py | Python | prepare_data.py | trirsh/stylegan-jittor | 164455501318641006f461863700cccf17d834bb | [
"BSD-2-Clause"
] | null | null | null | prepare_data.py | trirsh/stylegan-jittor | 164455501318641006f461863700cccf17d834bb | [
"BSD-2-Clause"
] | null | null | null | prepare_data.py | trirsh/stylegan-jittor | 164455501318641006f461863700cccf17d834bb | [
"BSD-2-Clause"
] | null | null | null | import os
import argparse
from io import BytesIO
import multiprocessing
from functools import partial
import numpy as np
from einops import rearrange
import cv2
from PIL import Image
import lmdb
from tqdm import tqdm
import jittor
def resize_and_convert(img, size, quality=100):
img = jittor.transform.resize(img,... | 30.095745 | 77 | 0.622835 |
7971e619263410d7470d7791961278fbbdd9f1fb | 1,067 | py | Python | step_counter_peaks.py | Naman1997/Raspberry_smartwatch | fc883b53ef843dfb8e34da46a35fa88c11e5fa0a | [
"BSD-3-Clause"
] | 4 | 2019-07-09T17:23:01.000Z | 2020-04-23T10:16:03.000Z | step_counter_peaks.py | Naman1997/Raspberry_smartwatch | fc883b53ef843dfb8e34da46a35fa88c11e5fa0a | [
"BSD-3-Clause"
] | null | null | null | step_counter_peaks.py | Naman1997/Raspberry_smartwatch | fc883b53ef843dfb8e34da46a35fa88c11e5fa0a | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
from scipy.misc import electrocardiogram
from scipy.signal import find_peaks
import numpy as np
#*****************************Writing to File**************************
with open("accelerometer.txt", "r") as filestream:
with open("answers.txt", "w") as filestreamtwo:
for line... | 27.358974 | 117 | 0.551078 |
7971e625262757390399e2a9a26bd6e469ca82b1 | 1,695 | py | Python | yolo3/mobilenetv2.py | NewYinbao/keras_yolov3 | e84449faa467b9e540d4e53af6b9ac8f0c031ebb | [
"MIT"
] | 4 | 2020-01-10T09:35:09.000Z | 2020-04-25T00:52:16.000Z | yolo3/mobilenetv2.py | NewYinbao/keras_yolov3 | e84449faa467b9e540d4e53af6b9ac8f0c031ebb | [
"MIT"
] | null | null | null | yolo3/mobilenetv2.py | NewYinbao/keras_yolov3 | e84449faa467b9e540d4e53af6b9ac8f0c031ebb | [
"MIT"
] | 2 | 2019-11-30T13:11:23.000Z | 2020-04-25T00:52:20.000Z | from keras.applications import MobileNetV2
from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate, MaxPooling2D, SeparableConv2D,Input
from yolo3.utils import compose
from yolo3.model import DarknetConv2D, DarknetConv2D_BN_Leaky, DarknetSeparableConv2D_BN_Leaky
from keras.models import Model
def... | 38.522727 | 115 | 0.663717 |
7971e6fe6cc10614a0ec13f63f29e4672357aa13 | 31 | py | Python | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/Attack/Behaviors/RandomPositionBasic/random_position_basic.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/Attack/Behaviors/RandomPositionBasic/random_position_basic.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Simulation/Towers/Behaviors/Attack/Behaviors/RandomPositionBasic/random_position_basic.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class RandomPositionBasic: pass | 31 | 31 | 0.903226 |
7971e7ddde30c887df751a8f0479a94f85510b8b | 4,258 | py | Python | run_Jeffcott_journal_bearing_floating_ring_short.py | ignorama/transient_rotordynamic | 1aaa61f35e19311a499589361c1bb79a6b8c7781 | [
"MIT"
] | 1 | 2022-01-05T16:10:59.000Z | 2022-01-05T16:10:59.000Z | run_Jeffcott_journal_bearing_floating_ring_short.py | ignorama/transient_rotordynamic | 1aaa61f35e19311a499589361c1bb79a6b8c7781 | [
"MIT"
] | null | null | null | run_Jeffcott_journal_bearing_floating_ring_short.py | ignorama/transient_rotordynamic | 1aaa61f35e19311a499589361c1bb79a6b8c7781 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
run-up with constant rotational acceleration
of a Jeffcott rotor in floating ring journal bearings
(analytical short bearing solution)
Created on Jan 25 2022
@author: Gerrit Nowald
"""
import rotordynamic as rd
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate impo... | 32.257576 | 149 | 0.564819 |
7971ea3ab61d7c25b2f0dbb81ff3ee72f2a33439 | 3,634 | py | Python | code/solve_genetic_group.py | pagination-problem/1 | 7a433086e59c1ee2c6006ba2c3c7b657f28518c0 | [
"MIT"
] | 5 | 2019-10-29T01:33:05.000Z | 2022-02-16T20:19:15.000Z | code/solve_genetic_group.py | pagination-problem/1 | 7a433086e59c1ee2c6006ba2c3c7b657f28518c0 | [
"MIT"
] | null | null | null | code/solve_genetic_group.py | pagination-problem/1 | 7a433086e59c1ee2c6006ba2c3c7b657f28518c0 | [
"MIT"
] | 1 | 2020-07-22T21:51:09.000Z | 2020-07-22T21:51:09.000Z | #!/usr/bin/env python
# encoding: utf-8
import genetic
import random
import solver_tools
name = "GeneticGroup"
def firstFit(pages,tiles):
for tile in tiles:
for page in pages:
if tile.canFitIn(page):
page.add(tile)
break
else:
pages.newPage(... | 35.627451 | 123 | 0.610897 |
7971ea5f15d7ee627e9407d44837da0dd8011665 | 1,464 | py | Python | guillotina_hive/interfaces.py | guillotinaweb/guillotina_hive | 0ce9037d0b5deb5012d21055185ab7e48ccd9778 | [
"BSD-2-Clause"
] | null | null | null | guillotina_hive/interfaces.py | guillotinaweb/guillotina_hive | 0ce9037d0b5deb5012d21055185ab7e48ccd9778 | [
"BSD-2-Clause"
] | null | null | null | guillotina_hive/interfaces.py | guillotinaweb/guillotina_hive | 0ce9037d0b5deb5012d21055185ab7e48ccd9778 | [
"BSD-2-Clause"
] | null | null | null | import json
from guillotina.async_util import IAsyncUtility
from guillotina.directives import write_permission
from guillotina.interfaces import IFolder
from guillotina.interfaces import IItem
from guillotina.interfaces import Interface
from guillotina.schema import Int
from guillotina.schema import JSONField
from gui... | 19.263158 | 58 | 0.69194 |
7971ea6d1bd4024d56af172fe6718838828f5622 | 594 | py | Python | tests/test_user.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 2 | 2019-02-21T18:29:09.000Z | 2021-01-27T14:52:46.000Z | tests/test_user.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 3 | 2018-11-22T08:34:04.000Z | 2021-06-01T22:47:19.000Z | tests/test_user.py | enisimsar/watchtower-news | 222d2e52e76ef32ebb78eb325f4c32b64c0ba1a6 | [
"MIT"
] | 1 | 2019-06-13T10:45:46.000Z | 2019-06-13T10:45:46.000Z | from models.User import UserFactory
from tests.base import BaseTestCase
class UserTestCase(BaseTestCase):
def setUp(self):
BaseTestCase.setUp(self)
self.user = UserFactory.create()
self.user.save()
def test_get_profile(self):
url = '/api/user'
response = self.fetch(url... | 29.7 | 89 | 0.664983 |
7971ea9bc13b55f322b61d4de12487291373496b | 1,487 | py | Python | python_code.py | anjan4136/Histogram_equalization | 2986cf77d7699066b7d7219b4288de98ba04e745 | [
"MIT"
] | null | null | null | python_code.py | anjan4136/Histogram_equalization | 2986cf77d7699066b7d7219b4288de98ba04e745 | [
"MIT"
] | null | null | null | python_code.py | anjan4136/Histogram_equalization | 2986cf77d7699066b7d7219b4288de98ba04e745 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt #importing pyplot library from matplotlib, one use of this is it is used here for plotting the images
import numpy as np # It is used for numerical calculations as matrix calculations , data structures
import cv2 #... | 82.611111 | 146 | 0.594486 |
7971eb2f21ea75cf6b281275d9ac91160b1861f4 | 10,246 | py | Python | code/reasoningtool/Q1Solution.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | 2 | 2018-02-26T19:16:26.000Z | 2020-12-16T03:31:58.000Z | code/reasoningtool/Q1Solution.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | 17 | 2017-12-09T01:13:20.000Z | 2018-03-06T02:17:32.000Z | code/reasoningtool/Q1Solution.py | dkoslicki/NCATS | 5d8e38d5868d830d8f8c215b8c649e3979ca03fb | [
"MIT"
] | null | null | null | # Solution to question 1, this assumes the neo4j network has already been populated with the relevant data
import numpy as np
np.warnings.filterwarnings('ignore')
from collections import namedtuple
#from neo4j.v1 import GraphDatabase, basic_auth
import os
import Q1Utils
import argparse
import sys
import json
# Connect... | 38.374532 | 154 | 0.720769 |
7971ec5ba719084f86a32eeca0afa90d82d62023 | 7,845 | py | Python | apps/scheduler/views.py | hito1280/flask_scheduler_app_open | ff2644b6f6a1f9d6b1831ea683d9bd1663c27443 | [
"MIT"
] | null | null | null | apps/scheduler/views.py | hito1280/flask_scheduler_app_open | ff2644b6f6a1f9d6b1831ea683d9bd1663c27443 | [
"MIT"
] | null | null | null | apps/scheduler/views.py | hito1280/flask_scheduler_app_open | ff2644b6f6a1f9d6b1831ea683d9bd1663c27443 | [
"MIT"
] | null | null | null | import os
import tempfile
import zipfile
from datetime import datetime
import pandas as pd
from apps.app import db
from apps.crud.models import User
from apps.scheduler.models import ScheduleLists, Schedules
from apps.scheduler.problem_solving import KandGProblem
from apps.scheduler.read_df import csvtodf, makeical
fr... | 33.241525 | 87 | 0.644232 |
7971ec767cf7dce3c68c569f3e2207112600030b | 2,199 | py | Python | CTFd/uploads/42cacab845b8f1e989e44bda85f3e127/crypto1.py | Tlis-new/CTFd---Broadcast | 418be88eb1dbca9ccf99ab7f8e4bfd98c6764b31 | [
"Apache-2.0"
] | null | null | null | CTFd/uploads/42cacab845b8f1e989e44bda85f3e127/crypto1.py | Tlis-new/CTFd---Broadcast | 418be88eb1dbca9ccf99ab7f8e4bfd98c6764b31 | [
"Apache-2.0"
] | null | null | null | CTFd/uploads/42cacab845b8f1e989e44bda85f3e127/crypto1.py | Tlis-new/CTFd---Broadcast | 418be88eb1dbca9ccf99ab7f8e4bfd98c6764b31 | [
"Apache-2.0"
] | null | null | null | import time
import string
import random
from hashlib import sha256
from urlparse import parse_qsl
money = random.randint(1000000, 5000000)
signkey = ''.join([random.choice(string.letters+string.digits) for _ in xrange(random.randint(8,32))])
items = [
('LAPTOP ASUS 4770', 2000000000),
('SAMSUNG GALAXY', 5730000),
(... | 22.90625 | 160 | 0.638017 |
7971ece1812658dd61fb7131a0e7f5a71f2630e8 | 10,427 | py | Python | vmtkScripts/vmtksurfaceendclipper.py | daron1337/vmtk | df401c88959ccf758b1bc6353786600473187683 | [
"Apache-2.0"
] | 3 | 2016-02-26T17:30:04.000Z | 2017-11-09T03:24:04.000Z | vmtkScripts/vmtksurfaceendclipper.py | ElenaFagg/vmtk | 5c90b786afae3b2d84c79df593e648ada26402e3 | [
"Apache-2.0"
] | null | null | null | vmtkScripts/vmtksurfaceendclipper.py | ElenaFagg/vmtk | 5c90b786afae3b2d84c79df593e648ada26402e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
## Program: VMTK
## Module: $RCSfile: vmtksurfaceendclipper.py,v $
## Language: Python
## Date: $Date: 2015/12/01 14:45:13 $
## Version: $Revision: 1.0 $
## Copyright (c) Luca Antiga, David Steinman. All rights reserved.
## See LICENCE file for details.
## This software is... | 35.587031 | 129 | 0.665963 |
7971ed0045216933d7cd094219ffb82fe09892f7 | 1,201 | py | Python | src/examples/firebase/auth.py | CabraKill/HiHome-API | 52852cc90f661c42596fb89b4d287f8d05de2911 | [
"MIT"
] | null | null | null | src/examples/firebase/auth.py | CabraKill/HiHome-API | 52852cc90f661c42596fb89b4d287f8d05de2911 | [
"MIT"
] | null | null | null | src/examples/firebase/auth.py | CabraKill/HiHome-API | 52852cc90f661c42596fb89b4d287f8d05de2911 | [
"MIT"
] | null | null | null | from google.oauth2 import service_account
from google.auth.transport.requests import AuthorizedSession
import google
# Define the required scopes
scopes = [
# "https://www.googleapis.com/auth/userinfo.email",
# "https://www.googleapis.com/auth/firebase.database"
"https://www.googleapis.com/auth/cloud-platf... | 37.53125 | 110 | 0.762698 |
7971ee1e516201f873ebc7b08435d4e418320527 | 318 | py | Python | tests/staticfiles_tests/test_templatetags.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2015-09-26T13:33:07.000Z | 2020-03-08T07:34:38.000Z | tests/staticfiles_tests/test_templatetags.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-07-02T21:10:44.000Z | 2020-07-02T21:11:21.000Z | tests/staticfiles_tests/test_templatetags.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 15 | 2016-01-08T14:28:41.000Z | 2019-04-19T08:33:31.000Z | from __future__ import unicode_literals
from .cases import StaticFilesTestCase
class TestTemplateTag(StaticFilesTestCase):
def test_template_tag(self):
self.assertStaticRenders("does/not/exist.png", "/static/does/not/exist.png")
self.assertStaticRenders("testfile.txt", "/static/testfile.txt")
| 28.909091 | 84 | 0.764151 |
7971ee7b33ea0c5fd7242c658a1fd526238174e6 | 3,575 | py | Python | library/kafka_acl.py | wcosta/ansible-kafka-admin | 25c9b60c29b5728042e248eac1427ed24df0f74c | [
"Apache-2.0"
] | 89 | 2018-04-05T22:20:49.000Z | 2022-03-24T06:47:50.000Z | library/kafka_acl.py | wcosta/ansible-kafka-admin | 25c9b60c29b5728042e248eac1427ed24df0f74c | [
"Apache-2.0"
] | 74 | 2018-05-16T17:52:31.000Z | 2022-02-24T19:57:12.000Z | library/kafka_acl.py | wcosta/ansible-kafka-admin | 25c9b60c29b5728042e248eac1427ed24df0f74c | [
"Apache-2.0"
] | 43 | 2018-04-15T19:40:16.000Z | 2022-01-19T09:23:42.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module for topic configuration management
"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
# Init logging
import logging
import sys
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.kafka_lib_a... | 25.719424 | 76 | 0.645315 |
7971ef9661fca4eddb9c9adb839d538ebf721050 | 5,161 | py | Python | kubernetes/client/models/v2beta1_cross_version_object_reference.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | 3 | 2019-05-19T05:05:37.000Z | 2020-03-20T04:56:20.000Z | kubernetes/client/models/v2beta1_cross_version_object_reference.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v2beta1_cross_version_object_reference.py | Scalr/kubernetes-client-python | 07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.5
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re... | 27.897297 | 121 | 0.583608 |
7971efc09ce1e6f93f8763c8b46eb42288cc21ed | 2,458 | py | Python | time_difference.py | HarryFindlay03/covid_dashboard | 742c1a3d5101fdd687053b96b9e08c32619ad422 | [
"MIT"
] | null | null | null | time_difference.py | HarryFindlay03/covid_dashboard | 742c1a3d5101fdd687053b96b9e08c32619ad422 | [
"MIT"
] | 2 | 2021-12-05T22:01:31.000Z | 2021-12-05T22:06:01.000Z | time_difference.py | HarryFindlay03/covid_dashboard | 742c1a3d5101fdd687053b96b9e08c32619ad422 | [
"MIT"
] | null | null | null | from datetime import datetime
def time_to_go(input_time:str) -> tuple:
"""Function to compute time delta betweeen time of update and current time
It will find the difference in seconds, then convert this value to hours:minutes:seconds
Args:
input_time ([string]): String taken from front end htm... | 41.661017 | 128 | 0.707893 |
7971f07d32f5f63a834ac47478cf755f9ca87dd9 | 4,397 | py | Python | main.py | Walkline80/micropython-new-fontlib | a8fc21e759ca551f481d4fd3187139399f98455d | [
"MIT"
] | null | null | null | main.py | Walkline80/micropython-new-fontlib | a8fc21e759ca551f481d4fd3187139399f98455d | [
"MIT"
] | null | null | null | main.py | Walkline80/micropython-new-fontlib | a8fc21e759ca551f481d4fd3187139399f98455d | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright © 2021 Walkline Wang (https://walkline.wang)
Gitee: https://gitee.com/walkline/micropython-new-fontlib
"""
from machine import I2C, Pin
from drivers.ssd1306 import SSD1306_I2C
import gc
chars =\
''' 清晨4:50,老刀穿过熙熙攘攘的步行街,去找彭蠡。
从垃圾站下班之后,老刀回家洗了个澡,换了衣服。白色衬衫和褐色裤子,这是他唯一一套体面衣服,衬衫袖口磨了边,他... | 27.829114 | 234 | 0.707983 |
7971f09edd047dedf0015e547ab5c1b69db111c1 | 9,868 | py | Python | rtl_gen.py | robinkjoy/JSON2RTLRegFile | 2c19d2d41cb5adddce01e051d4e77ecdd4ea62b5 | [
"MIT"
] | 2 | 2019-10-01T15:11:54.000Z | 2020-06-28T07:30:43.000Z | rtl_gen.py | robinkjoy/JSON2RTLRegFile | 2c19d2d41cb5adddce01e051d4e77ecdd4ea62b5 | [
"MIT"
] | 1 | 2021-03-06T21:02:42.000Z | 2021-03-08T12:37:03.000Z | rtl_gen.py | robinkjoy/JSON2RTLRegFile | 2c19d2d41cb5adddce01e051d4e77ecdd4ea62b5 | [
"MIT"
] | 3 | 2017-07-05T16:35:23.000Z | 2020-02-21T13:29:29.000Z | from math import log2, ceil
from operator import attrgetter
def import_strings(lang):
global rtl_str
if lang == 'verilog':
import verilog_str as rtl_str
else:
import vhdl_str as rtl_str
def get_max_lengths(regs, axi_clock):
max_all = 0
max_cdc = 0
max_ctrl = 0
axi_clock_nam... | 40.442623 | 122 | 0.601338 |
7971f0c09a3fe0fb45a583afd527795d12a4a687 | 85 | py | Python | __init__.py | JarvisSan22/SensorNetwork2020_DashSever_SDS011_DHT22 | 942187120995d1a5c40cd34138af896a15d5f519 | [
"MIT"
] | null | null | null | __init__.py | JarvisSan22/SensorNetwork2020_DashSever_SDS011_DHT22 | 942187120995d1a5c40cd34138af896a15d5f519 | [
"MIT"
] | null | null | null | __init__.py | JarvisSan22/SensorNetwork2020_DashSever_SDS011_DHT22 | 942187120995d1a5c40cd34138af896a15d5f519 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Sep 18 09:25:18 2021
@author: jarvi
"""
| 10.625 | 35 | 0.564706 |
7971f2d45dfaa3bbcb70bae3d126844060bb38b8 | 3,273 | py | Python | vital/bindings/python/vital/util/array_wrapping.py | judajake/kwiver | 303a11ebb43c020ab8e48b6ef70407b460dba46b | [
"BSD-3-Clause"
] | null | null | null | vital/bindings/python/vital/util/array_wrapping.py | judajake/kwiver | 303a11ebb43c020ab8e48b6ef70407b460dba46b | [
"BSD-3-Clause"
] | 4 | 2021-03-19T00:52:41.000Z | 2022-03-11T23:48:06.000Z | vital/bindings/python/vital/util/py/array_wrapping.py | abutaufique/my_kwiver | 5e2fdba15a8f3362c811f004bd6c309df54d470d | [
"BSD-3-Clause"
] | null | null | null | """
ckwg +31
Copyright 2016 by Kitware, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the ... | 36.366667 | 80 | 0.700581 |
7971f410bf5acff1219682f61bb8a38bbeeff7f0 | 1,720 | py | Python | barni/_paths.py | Thrameos/barni | e5ba76f9bb04a15a272b5159b25e6425733102c4 | [
"MIT"
] | 8 | 2020-03-16T23:21:59.000Z | 2021-08-12T12:26:44.000Z | barni/_paths.py | johnromo04/barni | 3d758f21a9317b8826019261548339c047923b96 | [
"MIT"
] | 6 | 2020-03-17T16:57:14.000Z | 2020-08-04T17:51:45.000Z | barni/_paths.py | johnromo04/barni | 3d758f21a9317b8826019261548339c047923b96 | [
"MIT"
] | 3 | 2020-03-17T00:47:28.000Z | 2020-07-29T18:19:10.000Z | ###############################################################################
# Copyright (c) 2019 Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
#
# Written by M. Monterial, K. Nelson
# monterial1@llnl.gov
#
# LLNL-CODE-805904
#
# All rights reserved.
#
# Permissi... | 41.95122 | 81 | 0.698837 |
7971f46e900e22d7872a4a928ce90bfc9a0c8a27 | 796 | py | Python | sapi_app/migrations/0001_initial.py | calixo888/sapi | a2ff327795a7ea088cb158f7738af9121e465a08 | [
"MIT"
] | null | null | null | sapi_app/migrations/0001_initial.py | calixo888/sapi | a2ff327795a7ea088cb158f7738af9121e465a08 | [
"MIT"
] | 7 | 2020-06-06T01:14:59.000Z | 2022-02-10T09:21:28.000Z | sapi_app/migrations/0001_initial.py | calixo888/sapi | a2ff327795a7ea088cb158f7738af9121e465a08 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2020-02-02 03:29
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='APIKey',
fields=[
('email', models.CharFiel... | 26.533333 | 98 | 0.547739 |
7971f4f1154a696ea3a1072f1a920fd2baf6f8c2 | 12,837 | py | Python | deeplab.py | SyangZ007/deeplabv3-plus-keras | ebbb1f155917807fb7fc70a9fde20593817cd4b2 | [
"MIT"
] | null | null | null | deeplab.py | SyangZ007/deeplabv3-plus-keras | ebbb1f155917807fb7fc70a9fde20593817cd4b2 | [
"MIT"
] | null | null | null | deeplab.py | SyangZ007/deeplabv3-plus-keras | ebbb1f155917807fb7fc70a9fde20593817cd4b2 | [
"MIT"
] | null | null | null | import colorsys
import copy
import time
import cv2
import numpy as np
from PIL import Image
from nets.deeplab import Deeplabv3
from utils.utils import cvtColor, preprocess_input, resize_image
#-----------------------------------------------------------------------------------#
# 使用自己训练好的模型预测需要修改3个参数
... | 50.341176 | 130 | 0.320869 |
7971f562ea22077853a74d58c0e3ee1282d58276 | 3,289 | py | Python | end_to_end_tests/golden-record-custom/custom_e2e/models/model_with_any_json_properties.py | benchling/openapi-python-client | a755ed9dc77b7d7e394057159831fbfa327be113 | [
"MIT"
] | 2 | 2020-10-15T07:25:50.000Z | 2021-09-14T21:29:08.000Z | end_to_end_tests/golden-record-custom/custom_e2e/models/model_with_any_json_properties.py | benchling/openapi-python-client | a755ed9dc77b7d7e394057159831fbfa327be113 | [
"MIT"
] | 79 | 2020-09-10T00:47:21.000Z | 2022-03-25T02:07:31.000Z | end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py | benchling/openapi-python-client | a755ed9dc77b7d7e394057159831fbfa327be113 | [
"MIT"
] | null | null | null | from typing import Any, Dict, List, Union, cast
import attr
from ..models.model_with_any_json_properties_additional_property import ModelWithAnyJsonPropertiesAdditionalProperty
@attr.s(auto_attribs=True)
class ModelWithAnyJsonProperties:
""" """
additional_properties: Dict[
str, Union[ModelWithAny... | 36.142857 | 120 | 0.630891 |
7971f56cd5ecf44e8a22476651a714c9ceee429f | 2,640 | py | Python | noodle/_parser.py | wilfredinni/mary | 47df09a235ce05196ca8f91528694da69210e617 | [
"MIT"
] | 4 | 2020-12-07T13:56:33.000Z | 2022-01-13T06:04:56.000Z | noodle/_parser.py | wilfredinni/mary | 47df09a235ce05196ca8f91528694da69210e617 | [
"MIT"
] | null | null | null | noodle/_parser.py | wilfredinni/mary | 47df09a235ce05196ca8f91528694da69210e617 | [
"MIT"
] | 1 | 2020-12-07T13:56:36.000Z | 2020-12-07T13:56:36.000Z | import sys
from collections import namedtuple
_argv = namedtuple("argvs", ["name", "commands", "options", "arguments"])
_options = namedtuple(
"options", ["name", "long_flag", "short_flag", "description", "default"]
)
class Parser:
def __init__(self, test=False, test_argv=None):
self.test = test
... | 32.195122 | 87 | 0.617803 |
7971f5c9dd7d1b85f51f7f926848632aa14aba84 | 7,240 | py | Python | students/K33401/laboratory_works/Shtreikh_Anna/Lr1/#3/server.py | Dreamshh/ITMO_ICT_WebDevelopment_2021-2022 | 63ce5a4f31de224a674ff11985b351cdec41028c | [
"MIT"
] | null | null | null | students/K33401/laboratory_works/Shtreikh_Anna/Lr1/#3/server.py | Dreamshh/ITMO_ICT_WebDevelopment_2021-2022 | 63ce5a4f31de224a674ff11985b351cdec41028c | [
"MIT"
] | null | null | null | students/K33401/laboratory_works/Shtreikh_Anna/Lr1/#3/server.py | Dreamshh/ITMO_ICT_WebDevelopment_2021-2022 | 63ce5a4f31de224a674ff11985b351cdec41028c | [
"MIT"
] | null | null | null | import sys
import socket
import traceback
from email.parser import Parser
from functools import lru_cache
from urllib.parse import parse_qs, urlparse
MAX_LINE = 64 * 1024
MAX_HEADERS = 100
class MyHTTPServer:
def __init__(self, host, port, server_name):
self._host = host
self._port = port
... | 30.677966 | 83 | 0.548204 |
7971f778a65459678d5da2d7d654cce977175829 | 3,444 | py | Python | beneither.py | swizzard/beneither | 5f7ebb1c8d5f47511c6647fba0e3b2e338292f56 | [
"WTFPL"
] | null | null | null | beneither.py | swizzard/beneither | 5f7ebb1c8d5f47511c6647fba0e3b2e338292f56 | [
"WTFPL"
] | null | null | null | beneither.py | swizzard/beneither | 5f7ebb1c8d5f47511c6647fba0e3b2e338292f56 | [
"WTFPL"
] | null | null | null | #!/home/ubuntu/beneither/venv/bin/python
from datetime import datetime
import json
from random import randrange
import re
import sys
import time
from wordfilter import Wordfilter
from spacy.en import English
from twython import Twython
from twython.exceptions import TwythonError
def get_client(cfg_path):
with o... | 28.46281 | 76 | 0.552555 |
7971f7e06994eba3d36da36120259273aff76544 | 51 | py | Python | docs/architecture/frequency_planning.py | mattvenn/amsat_txrx_ic | cb328d9855ee7070e020b20cd1c9b475ccb70812 | [
"Apache-2.0"
] | 49 | 2020-10-05T21:30:52.000Z | 2022-03-19T05:39:33.000Z | docs/architecture/frequency_planning.py | mattvenn/amsat_txrx_ic | cb328d9855ee7070e020b20cd1c9b475ccb70812 | [
"Apache-2.0"
] | null | null | null | docs/architecture/frequency_planning.py | mattvenn/amsat_txrx_ic | cb328d9855ee7070e020b20cd1c9b475ccb70812 | [
"Apache-2.0"
] | 13 | 2020-10-05T21:30:46.000Z | 2022-02-25T22:56:52.000Z | import matplotlib.pyplot as plt
import numpy as np
| 17 | 31 | 0.823529 |
7971f8d3a1028115b28df8bdc3c0c23f12822107 | 1,656 | py | Python | musmanim/text.py | mscuthbert/musmanim | 3ce0502d44b715e08f6ddca375c3a84d0a4078cf | [
"BSD-3-Clause"
] | null | null | null | musmanim/text.py | mscuthbert/musmanim | 3ce0502d44b715e08f6ddca375c3a84d0a4078cf | [
"BSD-3-Clause"
] | null | null | null | musmanim/text.py | mscuthbert/musmanim | 3ce0502d44b715e08f6ddca375c3a84d0a4078cf | [
"BSD-3-Clause"
] | null | null | null | import manim as m
MAXIMA = ''
LONGA = ''
BREVE = ''
SEMIBREVE = ''
MINIM = ''
class Text(m.Text):
def __init__(self, t, font='Adobe Garamond Pro', color=m.WHITE, **kwargs):
super().__init__(t, font=font, **kwargs)
self.set_color(color)
class Bravura(Text):
def __init__(self, t='', font... | 32.470588 | 83 | 0.536232 |
7971f9a26f27eccc2f4fa1fdb5baf4befe1dca78 | 1,316 | py | Python | catkin_ws/build/catkin_generated/generate_cached_setup.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/build/catkin_generated/generate_cached_setup.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/build/catkin_generated/generate_cached_setup.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/indigo/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.p... | 42.451613 | 102 | 0.737082 |
7971fb8da7e059a4cffadade774d43b60cd3e641 | 3,270 | py | Python | donkeycar/pipeline/types.py | Humatics/donkeycar | e0ce1f7f10ed4f2a1cdc3c5cfb3f868efe93bd68 | [
"MIT"
] | 3 | 2019-01-05T08:16:53.000Z | 2020-10-03T02:13:39.000Z | donkeycar/pipeline/types.py | Humatics/donkeycar | e0ce1f7f10ed4f2a1cdc3c5cfb3f868efe93bd68 | [
"MIT"
] | 6 | 2020-11-07T19:27:10.000Z | 2021-01-23T22:47:37.000Z | donkeycar/pipeline/types.py | Heavy02011/donkeycar | 5a23b0fee170596e29c80826c3db0d3a4c4c5392 | [
"MIT"
] | 2 | 2021-05-30T04:54:29.000Z | 2021-05-30T11:35:31.000Z | import os
from typing import Any, List, Optional, TypeVar, Tuple
import numpy as np
from donkeycar.config import Config
from donkeycar.parts.tub_v2 import Tub
from donkeycar.utils import load_image, load_pil_image, train_test_split
from typing_extensions import TypedDict
X = TypeVar('X', covariant=True)
TubRecordDic... | 33.367347 | 99 | 0.593884 |
7971fd03592e6c4e9567621baad0e1ec2ad9689b | 244 | py | Python | ga2sam_dev.py | ljishen/server | b641df7de19afb67df28d70c9b64b4faa3c56b23 | [
"Apache-2.0"
] | 1 | 2016-12-14T21:05:47.000Z | 2016-12-14T21:05:47.000Z | ga2sam_dev.py | ga4ghpoc/server | 1a46929a9345b2a4e50f903efad3ab3e8c36ba40 | [
"Apache-2.0"
] | null | null | null | ga2sam_dev.py | ga4ghpoc/server | 1a46929a9345b2a4e50f903efad3ab3e8c36ba40 | [
"Apache-2.0"
] | null | null | null | """
Shim for running the ga2sam tool during development
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import ga4gh.cli
if __name__ == "__main__":
ga4gh.cli.ga2sam_main()
| 20.333333 | 51 | 0.790984 |
7971fdc9feeba9cf1bb5e8a86034def9920045da | 103 | py | Python | testsuite/slf-import.py | subutai-attic/launcher | d8397995e18200b12d60781ed485af04f70bff03 | [
"Apache-2.0"
] | 1 | 2021-03-27T10:08:23.000Z | 2021-03-27T10:08:23.000Z | testsuite/slf-import.py | subutai-attic/launcher | d8397995e18200b12d60781ed485af04f70bff03 | [
"Apache-2.0"
] | 199 | 2016-07-28T07:30:48.000Z | 2017-10-14T06:15:40.000Z | testsuite/slf-import.py | subutai-io/launcher | d8397995e18200b12d60781ed485af04f70bff03 | [
"Apache-2.0"
] | 1 | 2021-03-27T10:08:26.000Z | 2021-03-27T10:08:26.000Z | import subutai
import subucotest
def subutaistart():
rc = subucotest.TestFunction()
return rc
| 14.714286 | 34 | 0.737864 |
7971fe62bf3a12ea7d7e961f83b9a3201fddc9b7 | 59,122 | py | Python | src/main.py | hotheat/rnacocktail-0.2.1 | 70d88876e27e7aa37521ed59043aa19612fe110e | [
"Apache-2.0"
] | null | null | null | src/main.py | hotheat/rnacocktail-0.2.1 | 70d88876e27e7aa37521ed59043aa19612fe110e | [
"Apache-2.0"
] | null | null | null | src/main.py | hotheat/rnacocktail-0.2.1 | 70d88876e27e7aa37521ed59043aa19612fe110e | [
"Apache-2.0"
] | null | null | null | #! coding:utf-8
from collections import defaultdict
import sys
import os
from defaults import *
from run_sr_align import run_sr_align
from run_reconstruct import run_reconstruct
from run_quantify import run_quantify
from run_diff import run_diff
from run_dnv_assemebly import run_dnv_assemebly
from run_lr_correct impor... | 69.63722 | 133 | 0.434508 |
7971ff72721a32c01f601eb9350aafb60ed6ddae | 3,037 | py | Python | tests/python/pants_test/tasks/test_eclipse_integration.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/tasks/test_eclipse_integration.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/tasks/test_eclipse_integration.py | WamBamBoozle/pants | 98cadfa1a5d337146903eb66548cfe955f2627b3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... | 44.014493 | 107 | 0.737241 |
797200a56bc60265a9a672fe4af0b4d92438a513 | 6,165 | py | Python | tictactoe_logic.py | coffeeaddict19/tictactoe | e213e59c666b0096bda9b0c2e06de0d563d127b9 | [
"MIT"
] | null | null | null | tictactoe_logic.py | coffeeaddict19/tictactoe | e213e59c666b0096bda9b0c2e06de0d563d127b9 | [
"MIT"
] | null | null | null | tictactoe_logic.py | coffeeaddict19/tictactoe | e213e59c666b0096bda9b0c2e06de0d563d127b9 | [
"MIT"
] | null | null | null | import random
#game state constants
IN_PLAY = 0
WIN = 1
TIE = 2
#player constants
PLAYER1 = 0
PLAYER2 = 1
#state description
GAMESTATE_DESCRIPTIONS = {
0: 'in play',
1: 'win',
2: 'tie',
}
#player description
PLAYER_DESCRIPTIONS = {
0: 'player 1',
1: 'player 2',
}
class tictact... | 38.055556 | 87 | 0.561882 |
7972021ef06a3589975d54243d070ee3254f2cd5 | 7,881 | py | Python | cme/protocols/smb/smbexec.py | justinforbes/CrackMapExec | 7b8473a82dbf3b5268f80451ff516c31fac1eaed | [
"BSD-2-Clause"
] | null | null | null | cme/protocols/smb/smbexec.py | justinforbes/CrackMapExec | 7b8473a82dbf3b5268f80451ff516c31fac1eaed | [
"BSD-2-Clause"
] | null | null | null | cme/protocols/smb/smbexec.py | justinforbes/CrackMapExec | 7b8473a82dbf3b5268f80451ff516c31fac1eaed | [
"BSD-2-Clause"
] | null | null | null | import logging
import os
from time import sleep
from impacket.dcerpc.v5 import transport, scmr
from impacket.smbconnection import *
from cme.helpers.misc import gen_random_string
from impacket.dcerpc.v5.rpcrt import RPC_C_AUTHN_GSS_NEGOTIATE
class SMBEXEC:
def __init__(self, host, share_name, smbconnection, proto... | 40.623711 | 254 | 0.62086 |
797202468ded1824e4366569bc76fb31e8a45826 | 1,436 | py | Python | examples/parse_handshake_cfg.py | alexeyvo/mongo-c-driver | 8a11935d5a9b3db9992dc565b139bf83b0ebd4a7 | [
"Apache-2.0"
] | null | null | null | examples/parse_handshake_cfg.py | alexeyvo/mongo-c-driver | 8a11935d5a9b3db9992dc565b139bf83b0ebd4a7 | [
"Apache-2.0"
] | null | null | null | examples/parse_handshake_cfg.py | alexeyvo/mongo-c-driver | 8a11935d5a9b3db9992dc565b139bf83b0ebd4a7 | [
"Apache-2.0"
] | null | null | null | import sys
# Should be in EXACT same order as from mongoc-handshake-private.h.
# The values are implicit (so we assume 1st entry is 1 << 0,
# second entry is 1 << 1 and so on).
MD_FLAGS = [
"MONGOC_MD_FLAG_ENABLE_CRYPTO",
"MONGOC_MD_FLAG_ENABLE_CRYPTO_CNG",
"MONGOC_MD_FLAG_ENABLE_CRYPTO_COMMON_CRYPTO",
... | 34.190476 | 69 | 0.726323 |
79720296c204e0399302aed9a6a25b1b8baa7885 | 19,455 | py | Python | src/sentry/south_migrations/0050_remove_project_keys_from_members.py | seukjung/sentry-custom | c5f6bb2019aef3caff7f3e2b619f7a70f2b9b963 | [
"BSD-3-Clause"
] | 20 | 2016-10-01T04:29:24.000Z | 2020-10-09T07:23:34.000Z | src/sentry/south_migrations/0050_remove_project_keys_from_members.py | fotinakis/sentry | c5cfa5c5e47475bf5ef41e702548c2dfc7bb8a7c | [
"BSD-3-Clause"
] | 8 | 2019-12-28T23:49:55.000Z | 2022-03-02T04:34:18.000Z | src/sentry/south_migrations/0050_remove_project_keys_from_members.py | fotinakis/sentry | c5cfa5c5e47475bf5ef41e702548c2dfc7bb8a7c | [
"BSD-3-Clause"
] | 7 | 2016-10-27T05:12:45.000Z | 2021-05-01T14:29:53.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'ProjectMember.public_key'
db.delete_column('sentry_projectmember', 'public_key')
# Dele... | 80.392562 | 167 | 0.571113 |
797202fbb0d5b17c90ca5e8d423c29986a658e84 | 5,171 | py | Python | tensorflow_gan/python/eval/inception_metrics.py | nivedwho/gan | 723ce1e3627778b979f048d817f834f253611ff4 | [
"Apache-2.0"
] | 783 | 2019-04-29T16:25:31.000Z | 2022-03-29T08:45:27.000Z | tensorflow_gan/python/eval/inception_metrics.py | nivedwho/gan | 723ce1e3627778b979f048d817f834f253611ff4 | [
"Apache-2.0"
] | 49 | 2019-06-07T09:58:02.000Z | 2022-03-02T11:43:25.000Z | tensorflow_gan/python/eval/inception_metrics.py | nivedwho/gan | 723ce1e3627778b979f048d817f834f253611ff4 | [
"Apache-2.0"
] | 222 | 2019-06-07T09:56:38.000Z | 2022-03-27T02:42:23.000Z | # coding=utf-8
# Copyright 2021 The TensorFlow GAN Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 35.909722 | 80 | 0.782441 |
7972034abe3f671255e122b6468ea331438e1231 | 2,268 | py | Python | graph.py | shawntabrizi/Azure-Health-Partner-Monitor | 2372bc6fe46b42531d30ad0cbb14fb4fa9a75512 | [
"MIT"
] | 1 | 2021-03-17T23:11:21.000Z | 2021-03-17T23:11:21.000Z | graph.py | shawntabrizi/Azure-Health-Partner-Monitor | 2372bc6fe46b42531d30ad0cbb14fb4fa9a75512 | [
"MIT"
] | null | null | null | graph.py | shawntabrizi/Azure-Health-Partner-Monitor | 2372bc6fe46b42531d30ad0cbb14fb4fa9a75512 | [
"MIT"
] | 2 | 2020-02-02T09:09:34.000Z | 2021-08-08T18:20:53.000Z | # External Python Libraries Used:
import requests
# Our Python Functions:
from authentication import create_headers
import appconfig as g
# Query the AAD Graph API to get the Object ID of the Service Principal using the Application's App ID
def get_service_principal_object_id(access_token):
headers = create_heade... | 41.236364 | 156 | 0.72619 |
797203e7f92b007da2853a483b7c2d41526c3925 | 2,921 | py | Python | neoman/u2fh.py | Yubico/yubikey-neo-manager | 94859366f054636acc13f47fa02f2fbd0134da41 | [
"BSD-2-Clause"
] | 49 | 2015-01-07T14:21:06.000Z | 2021-11-16T21:24:11.000Z | neoman/u2fh.py | DalavanCloud/yubikey-neo-manager-dpkg | e671c43020ec0c614bc140bfaf9b185d22a8a5d7 | [
"BSD-2-Clause"
] | 32 | 2015-01-20T21:17:59.000Z | 2018-07-10T22:23:15.000Z | neoman/u2fh.py | DalavanCloud/yubikey-neo-manager-dpkg | e671c43020ec0c614bc140bfaf9b185d22a8a5d7 | [
"BSD-2-Clause"
] | 10 | 2015-03-15T21:06:31.000Z | 2021-11-16T21:24:04.000Z | # Copyright (c) 2013 Yubico AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditi... | 41.140845 | 77 | 0.688463 |
797203ea0d6ccde2683c2c2f4a5e90cdfabba5a6 | 273 | py | Python | calcs/admin.py | willmurnane/Magstock-food-calculations | f1136987b77403400a8759b7b8b70d4afc39ab1e | [
"MIT"
] | 1 | 2015-06-06T22:55:27.000Z | 2015-06-06T22:55:27.000Z | calcs/admin.py | willmurnane/Magstock-food-calculations | f1136987b77403400a8759b7b8b70d4afc39ab1e | [
"MIT"
] | null | null | null | calcs/admin.py | willmurnane/Magstock-food-calculations | f1136987b77403400a8759b7b8b70d4afc39ab1e | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
# Register your models here.
admin.site.register(Unit)
admin.site.register(PurchaseableItem)
admin.site.register(Meal)
admin.site.register(MealComponent)
admin.site.register(Event)
admin.site.register(MealsInEvent)
| 21 | 37 | 0.813187 |
79720425e6e023bbd6f8452120c63d696a3f530e | 3,368 | py | Python | js_search/models.py | compoundpartners/js-search | b6a32fc21971d17af593985bd936cd47b486457a | [
"BSD-3-Clause"
] | null | null | null | js_search/models.py | compoundpartners/js-search | b6a32fc21971d17af593985bd936cd47b486457a | [
"BSD-3-Clause"
] | null | null | null | js_search/models.py | compoundpartners/js-search | b6a32fc21971d17af593985bd936cd47b486457a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext as _
from django.dispatch import receiver
from django.db.models.signals import post_save
from cms.models import CMSP... | 30.071429 | 87 | 0.652019 |
797204483ea231715e6db05b874a6893b964daef | 8,662 | py | Python | GearBot/Cogs/AntiRaid.py | Kitty-Therapist/GearBot | 421da612e76c8a38ac915cabe038f77135811901 | [
"MIT"
] | 20 | 2018-08-15T05:05:33.000Z | 2019-05-02T16:48:59.000Z | GearBot/Cogs/AntiRaid.py | Kitty-Therapist/GearBot | 421da612e76c8a38ac915cabe038f77135811901 | [
"MIT"
] | 137 | 2018-08-12T10:01:30.000Z | 2019-05-03T13:54:47.000Z | GearBot/Cogs/AntiRaid.py | Kitty-Therapist/GearBot | 421da612e76c8a38ac915cabe038f77135811901 | [
"MIT"
] | 42 | 2018-08-23T16:33:35.000Z | 2019-04-24T03:18:50.000Z | import asyncio
import time
from datetime import datetime
import discord
from discord.ext import commands
from Cogs.BaseCog import BaseCog
from Util import Configuration, GearbotLogging, MessageUtils
from Util.RaidHandling.RaidShield import RaidShield
from database.DatabaseConnector import Raid, Raider
class AntiRai... | 45.114583 | 187 | 0.609444 |
797206306a1bf83695e7e1b6e45dfc7e766a8073 | 1,606 | py | Python | src/prefect/tasks/kubernetes/__init__.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 8,633 | 2019-03-23T17:51:03.000Z | 2022-03-31T22:17:42.000Z | src/prefect/tasks/kubernetes/__init__.py | concreted/prefect | dd732f5990ee2b0f3d816adb285168fd63b239e4 | [
"Apache-2.0"
] | 3,903 | 2019-03-23T19:11:21.000Z | 2022-03-31T23:21:23.000Z | src/prefect/tasks/kubernetes/__init__.py | ngriffiths13/prefect | 7f5613abcb182494b7dc12159277c3bc5f3c9898 | [
"Apache-2.0"
] | 937 | 2019-03-23T18:49:44.000Z | 2022-03-31T21:45:13.000Z | """
Tasks for interacting with various Kubernetes API objects.
Note that depending on how you choose to authenticate, tasks in this collection might require
a Prefect Secret called `"KUBERNETES_API_KEY"` that stores your Kubernetes API Key;
this Secret must be a string and in BearerToken format.
"""
try:
from pref... | 32.77551 | 104 | 0.711083 |
797206379282e8dbb0f78892c14d9b62fafd84f8 | 1,152 | py | Python | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_metadata.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-07-23T08:59:24.000Z | 2018-07-23T08:59:24.000Z | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_metadata.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/image_metadata.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 31.135135 | 76 | 0.553819 |
7972071067f3ef62cd9f8d4349aa56a18d406e5f | 2,674 | py | Python | python/dolfinx_contact/meshing/onesided_meshes.py | Wells-Group/asimov-contact | 082e304e1a1078bc001f58b2a03ce7262b3f0db1 | [
"MIT"
] | null | null | null | python/dolfinx_contact/meshing/onesided_meshes.py | Wells-Group/asimov-contact | 082e304e1a1078bc001f58b2a03ce7262b3f0db1 | [
"MIT"
] | 11 | 2021-11-16T12:11:53.000Z | 2022-02-25T16:28:26.000Z | python/dolfinx_contact/meshing/onesided_meshes.py | Wells-Group/asimov-contact | 082e304e1a1078bc001f58b2a03ce7262b3f0db1 | [
"MIT"
] | 2 | 2021-07-21T21:12:32.000Z | 2021-12-21T11:02:39.000Z | # Copyright (C) 2021 Jørgen S. Dokken
#
# SPDX-License-Identifier: MIT
import warnings
import gmsh
from mpi4py import MPI
warnings.filterwarnings("ignore")
__all__ = ["create_disk_mesh", "create_sphere_mesh"]
def create_disk_mesh(LcMin=0.005, LcMax=0.015, filename="disk.msh"):
"""
Create a disk mesh ce... | 33.425 | 82 | 0.633134 |
797208429cc30e641b42fbfc48543b709862bc07 | 21,157 | py | Python | src/utils/data_helper.py | yifan-you-37/omnihang | c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2 | [
"MIT"
] | 1 | 2022-01-16T20:24:09.000Z | 2022-01-16T20:24:09.000Z | src/utils/data_helper.py | yifan-you-37/omnihang | c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2 | [
"MIT"
] | null | null | null | src/utils/data_helper.py | yifan-you-37/omnihang | c80b699b2cf2cf3422201cc8c3fa572d0e01d5a2 | [
"MIT"
] | 1 | 2022-03-16T03:14:37.000Z | 2022-03-16T03:14:37.000Z | import pandas as pd
import numpy as np
import os
import zipfile
import glob
def rep_int(s):
try:
int(s)
return True
except ValueError:
return False
def mkdir_if_not(folder_dir, recurse=False):
if not os.path.exists(folder_dir):
if not recurse:
os.mkdir(folder_dir)
else:
os.makedirs(folder_dir)
def ... | 33.213501 | 168 | 0.713854 |
79720897cd255436b73f6e373936573f11a18af8 | 8,538 | py | Python | tests/python/gpu/test_profiler_gpu.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | 1 | 2021-11-09T01:40:17.000Z | 2021-11-09T01:40:17.000Z | tests/python/gpu/test_profiler_gpu.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | null | null | null | tests/python/gpu/test_profiler_gpu.py | t-triobox/incubator-mxnet | 93aa9e33fcb2f216179c691ed9461bc96e37ae70 | [
"Apache-2.0"
] | 1 | 2018-07-19T00:43:30.000Z | 2018-07-19T00:43:30.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 45.414894 | 95 | 0.659288 |
79720a084044b3637e4764fc4bc9ae5beb1b434b | 2,235 | py | Python | book_figures/chapter5/fig_likelihood_gaussian.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | 1 | 2018-07-03T12:22:22.000Z | 2018-07-03T12:22:22.000Z | book_figures/chapter5/fig_likelihood_gaussian.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | null | null | null | book_figures/chapter5/fig_likelihood_gaussian.py | larsmans/astroML | 01ee67ea6e1c5a8dedc2498ec7397653d65b2c8d | [
"BSD-2-Clause"
] | 1 | 2018-07-03T12:22:24.000Z | 2018-07-03T12:22:24.000Z | """
Log-likelihood for Gaussian Distribution
----------------------------------------
This plot shows the Likelihood as a function of the mean :math:`\mu` and the
error :math:`\sigma` when the posterior is assumed to be gaussian.
"""
# Author: Jake VanderPlas
# License: BSD
# The figure produced by this code is publ... | 33.863636 | 79 | 0.590157 |
79720a5788f57984a35465e534f39dc848a9a9de | 4,356 | py | Python | docker/kubeshare-gemini-scheduler/launcher.py | pint1022/KubeShare | 483a96efa6c9fd0d43e3fea27bb0e6e154b6ca54 | [
"Apache-2.0"
] | null | null | null | docker/kubeshare-gemini-scheduler/launcher.py | pint1022/KubeShare | 483a96efa6c9fd0d43e3fea27bb0e6e154b6ca54 | [
"Apache-2.0"
] | null | null | null | docker/kubeshare-gemini-scheduler/launcher.py | pint1022/KubeShare | 483a96efa6c9fd0d43e3fea27bb0e6e154b6ca54 | [
"Apache-2.0"
] | null | null | null | import argparse
import inotify.adapters
import os
import sys
import signal
import shlex
import subprocess as sp
import time
args = None
podlist = {}
def prepare_env(name, port, schd_port, sampling, uuid):
client_env = os.environ.copy()
client_env['SCHEDULER_IP'] = '127.0.0.1'
client_env['SCHEDULER_PORT'] ... | 36.915254 | 121 | 0.614096 |
79720b0f93b7bb83b3549e7b454de85c778df6d0 | 4,354 | py | Python | pointcloud/validate/ValidateQuery.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | 1 | 2019-03-18T05:50:41.000Z | 2019-03-18T05:50:41.000Z | pointcloud/validate/ValidateQuery.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | null | null | null | pointcloud/validate/ValidateQuery.py | stpsomad/thesis | e7ef1d1ab2118e95cfda7e98a0e952c8d1c393d0 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon May 23 11:13:39 2016
@author: Stella Psomadaki
"""
from pointcloud.validate.Validator import Validate
from ConfigParser import ConfigParser
import pointcloud.oracleTools as ora
import time
import os
class Querier(Validate):
def __init__(self, configuration):... | 39.225225 | 143 | 0.545705 |
79720bcc68d0cc82997b1ed991d292ebec2541f8 | 413 | py | Python | openghg/dataobjects/_basedata.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 5 | 2021-03-02T09:04:07.000Z | 2022-01-25T09:58:16.000Z | openghg/dataobjects/_basedata.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | 229 | 2020-09-30T15:08:39.000Z | 2022-03-31T14:23:55.000Z | openghg/dataobjects/_basedata.py | openghg/openghg | 9a05dd6fe3cee6123898b8f390cfaded08dbb408 | [
"Apache-2.0"
] | null | null | null | """
This is used as a base for the other dataclasses and shouldn't be used directly.
"""
from dataclasses import dataclass
from xarray import Dataset
from typing import Dict
@dataclass(frozen=True)
class _BaseData:
data: Dataset
metadata: Dict
def __bool__(self) -> bool:
return bool(self.data)
... | 21.736842 | 80 | 0.694915 |
79720c2ed71e18fbacb00fdfa535cb64ab54d63f | 3,973 | py | Python | htdocs/geojson/huc12.py | akrherz/depbackend | d43053319227a3aaaf7553c823e8e2e748fbe95d | [
"Apache-2.0"
] | null | null | null | htdocs/geojson/huc12.py | akrherz/depbackend | d43053319227a3aaaf7553c823e8e2e748fbe95d | [
"Apache-2.0"
] | null | null | null | htdocs/geojson/huc12.py | akrherz/depbackend | d43053319227a3aaaf7553c823e8e2e748fbe95d | [
"Apache-2.0"
] | null | null | null | """GeoJSON service for HUC12 data"""
import datetime
from pymemcache.client import Client
# needed for Decimal formatting to work
import simplejson as json
from paste.request import parse_formvars
from pyiem.dep import RAMPS
from pyiem.util import get_dbconn
def do(ts, ts2, domain):
"""Do work"""
pgconn = g... | 31.039063 | 79 | 0.550717 |
79720c9ec2c937fb2f931c8d8fe4e36bf7d33ed4 | 7,510 | py | Python | test/test_tae/test_parallel_runner.py | dengdifan/SMAC3 | 4739741fe9f6b0b92d419bac8f0a6252858a55dc | [
"BSD-3-Clause"
] | 1 | 2021-05-12T10:11:59.000Z | 2021-05-12T10:11:59.000Z | test/test_tae/test_parallel_runner.py | dengdifan/SMAC3 | 4739741fe9f6b0b92d419bac8f0a6252858a55dc | [
"BSD-3-Clause"
] | 1 | 2021-06-17T07:57:05.000Z | 2021-06-17T07:57:05.000Z | test/test_tae/test_parallel_runner.py | dengdifan/SMAC3 | 4739741fe9f6b0b92d419bac8f0a6252858a55dc | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import tempfile
import time
import unittest
import unittest.mock
from dask.distributed import Client
from smac.configspace import ConfigurationSpace
from smac.runhistory.runhistory import RunInfo, RunValue
from smac.scenario.scenario import Scenario
from smac.stats.stats import Stats
from smac.ta... | 41.038251 | 103 | 0.659254 |
79720cf56024067ded077166a8803a571a6ddd23 | 13,170 | py | Python | dediti_alerts.py | Francisco9620/mrc-monitoring-py | 6c2de5a6cf2e48cf916ed341f354eef9529f535a | [
"MIT"
] | 1 | 2021-12-03T06:02:53.000Z | 2021-12-03T06:02:53.000Z | dediti_alerts.py | rafael9620/mrc-monitoring-py | 6c2de5a6cf2e48cf916ed341f354eef9529f535a | [
"MIT"
] | null | null | null | dediti_alerts.py | rafael9620/mrc-monitoring-py | 6c2de5a6cf2e48cf916ed341f354eef9529f535a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from datetime import datetime
import schedule
import requests
from emoji import emojize
import psutil
import MySQLdb
import logging
logger = logging.getLogger('dediti-scripts')
hdlr = logging.FileHandler('/opt/logs/dediti-scripts.log')
formatter = logging.For... | 39.909091 | 215 | 0.57874 |
79720df1f859ad39c94e823fcbc70418425743e3 | 2,010 | py | Python | debug.py | alexandrefch/APA-Website-Database-Filler | 5727d4a1fd97381d5c1c4f40abc0ca51fbdee003 | [
"MIT"
] | null | null | null | debug.py | alexandrefch/APA-Website-Database-Filler | 5727d4a1fd97381d5c1c4f40abc0ca51fbdee003 | [
"MIT"
] | null | null | null | debug.py | alexandrefch/APA-Website-Database-Filler | 5727d4a1fd97381d5c1c4f40abc0ca51fbdee003 | [
"MIT"
] | null | null | null | import time
PROGRESS_BAR_SIZE = 15
class Task:
def __init__(self, task_name):
self.name = task_name
self.start_time = time.time()
self.is_progressive_task = False
self.is_done = False
def get_execution_time(self):
return round(time.time() - self.start_time, 2)
curre... | 30 | 110 | 0.677612 |
79720e6787e7c02b27579b61fa43fee437308cfc | 1,125 | py | Python | ust_integration_test/__init__.py | adobe-dmeservices/user-sync-integration-test | 2f13d11003b2b80c8d1dc8d5509b32ca6d70513f | [
"MIT"
] | null | null | null | ust_integration_test/__init__.py | adobe-dmeservices/user-sync-integration-test | 2f13d11003b2b80c8d1dc8d5509b32ca6d70513f | [
"MIT"
] | null | null | null | ust_integration_test/__init__.py | adobe-dmeservices/user-sync-integration-test | 2f13d11003b2b80c8d1dc8d5509b32ca6d70513f | [
"MIT"
] | 2 | 2021-01-13T14:50:42.000Z | 2021-06-06T10:55:53.000Z | import logging
import logging.config
import os
def init_logger(level=logging.DEBUG):
results_dir = "results"
log_file = os.path.join(results_dir, 'test.log')
test_out_file = os.path.join(results_dir, 'test_output.log')
cfg = {
"version": 1.0,
"handlers": {
"console": {
... | 25.568182 | 64 | 0.442667 |
79720e77557077a6f5ac4f63a9523de96b73257c | 610 | py | Python | setup.py | ConnectedSystems/restful-wos | 47c33087b74e40a5b22a26531bee894d36b11e05 | [
"ISC"
] | null | null | null | setup.py | ConnectedSystems/restful-wos | 47c33087b74e40a5b22a26531bee894d36b11e05 | [
"ISC"
] | 1 | 2020-09-04T08:21:00.000Z | 2020-09-04T12:10:53.000Z | setup.py | ConnectedSystems/restful-wos | 47c33087b74e40a5b22a26531bee894d36b11e05 | [
"ISC"
] | null | null | null | #! /usr/bin/env python
from setuptools import setup
if __name__ == "__main__":
setup(
name='restful-wos',
version='0.1',
description='Python package simplifies access to the WoS RESTful API',
long_description_content_type="text/markdown",
long_description=open('README.md').r... | 27.727273 | 78 | 0.570492 |
79720e9b3f9f25f2220aa21e07122949a7088f87 | 5,051 | py | Python | billy/web/admin/views/matching.py | paultag/billy | 70f4c55d760552829a86b30baa6d6eac3f6dc47f | [
"BSD-3-Clause"
] | null | null | null | billy/web/admin/views/matching.py | paultag/billy | 70f4c55d760552829a86b30baa6d6eac3f6dc47f | [
"BSD-3-Clause"
] | null | null | null | billy/web/admin/views/matching.py | paultag/billy | 70f4c55d760552829a86b30baa6d6eac3f6dc47f | [
"BSD-3-Clause"
] | null | null | null | from collections import defaultdict, OrderedDict
from bson import ObjectId
from django.shortcuts import render, redirect
from django.http import Http404
from django.views.decorators.http import require_http_methods
from billy.core import db, settings
from billy.utils import metadata
from billy.web.admin.decorators i... | 32.378205 | 78 | 0.584637 |
79720efaa71a1e7bcea49fdb456d8602490f3c04 | 10,517 | py | Python | core/google/cloud/_http.py | jo2y/google-cloud-python | 1b76727be16bc4335276f793340bb72d32be7166 | [
"Apache-2.0"
] | 4 | 2018-02-25T22:18:33.000Z | 2021-02-03T05:00:43.000Z | core/google/cloud/_http.py | jo2y/google-cloud-python | 1b76727be16bc4335276f793340bb72d32be7166 | [
"Apache-2.0"
] | 7 | 2020-03-24T15:50:06.000Z | 2021-06-08T19:57:39.000Z | core/google/cloud/_http.py | jo2y/google-cloud-python | 1b76727be16bc4335276f793340bb72d32be7166 | [
"Apache-2.0"
] | 1 | 2021-06-30T11:44:03.000Z | 2021-06-30T11:44:03.000Z | # Copyright 2014 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 35.173913 | 79 | 0.61529 |
79720f3fed22bea99570ce74312071c47aadef4a | 324 | py | Python | Selection Sort/selection_sort.py | Tomin-Joy/Sorting-Algorithms | 34de451059a317d94d14b6618200e4c19de34641 | [
"MIT"
] | null | null | null | Selection Sort/selection_sort.py | Tomin-Joy/Sorting-Algorithms | 34de451059a317d94d14b6618200e4c19de34641 | [
"MIT"
] | null | null | null | Selection Sort/selection_sort.py | Tomin-Joy/Sorting-Algorithms | 34de451059a317d94d14b6618200e4c19de34641 | [
"MIT"
] | 1 | 2021-12-29T13:12:55.000Z | 2021-12-29T13:12:55.000Z | def selection_sort(arr):
for k in range(len(arr)):
min_index = k # smallest element
for j in range(k + 1, len(arr)):
if arr[min_index] > arr[j]:
min_index = j
arr[k], arr[min_index] = arr[min_index], arr[k]
nums = [85, 45, 12, 23, 41]
selection_sort(nums)
print(n... | 29.454545 | 55 | 0.561728 |
7972102ab11eac288c5d168decf55f7a1dae0eed | 15,871 | py | Python | smpp/pdu/constants.py | eagafonov/smpp.pdu | 0536276ecd8c18db8939a3e0de6bb7a89f0768c9 | [
"Apache-2.0"
] | 33 | 2015-01-28T09:20:03.000Z | 2021-05-28T15:54:45.000Z | smpp/pdu/constants.py | eagafonov/smpp.pdu | 0536276ecd8c18db8939a3e0de6bb7a89f0768c9 | [
"Apache-2.0"
] | 7 | 2015-01-08T08:59:27.000Z | 2020-09-04T17:10:55.000Z | smpp/pdu/constants.py | eagafonov/smpp.pdu | 0536276ecd8c18db8939a3e0de6bb7a89f0768c9 | [
"Apache-2.0"
] | 17 | 2015-11-19T11:02:26.000Z | 2021-07-31T18:20:44.000Z | """
Copyright 2009-2010 Mozes, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 30.34608 | 145 | 0.651314 |
7972120c122cfe599b3805ad9ef82afbd6b2e1f3 | 730 | py | Python | menu.py | davidhawkes11/tkinter | bd3fe7e17ccd811eed79c4f33dce120ca47d0186 | [
"MIT"
] | null | null | null | menu.py | davidhawkes11/tkinter | bd3fe7e17ccd811eed79c4f33dce120ca47d0186 | [
"MIT"
] | null | null | null | menu.py | davidhawkes11/tkinter | bd3fe7e17ccd811eed79c4f33dce120ca47d0186 | [
"MIT"
] | null | null | null | import tkinter
def NewFile():
print ("New File!")
def OpenFile():
name = tkinter.askopenfilename()
print (name)
def About():
print ("This is a simple example of a menu")
root = tkinter.Tk()
menu = tkinter.Menu(root)
root.config(menu=menu)
filemenu = tkinter.Menu(menu)
menu.ad... | 21.470588 | 56 | 0.686301 |
79721239025d7b1b4f0fc1bf35ec386948cb8a1c | 750 | py | Python | larq/constraints_test.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/constraints_test.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | larq/constraints_test.py | sbrugman/larq | b080d9452847e9403b3d2fafd9425b488be71567 | [
"Apache-2.0"
] | null | null | null | import pytest
import numpy as np
import tensorflow as tf
import larq as lq
@pytest.mark.parametrize("name", ["weight_clip"])
def test_serialization(name):
fn = tf.keras.constraints.get(name)
ref_fn = getattr(lq.constraints, name)()
assert fn.__class__ == ref_fn.__class__
config = tf.keras.constraints.... | 32.608696 | 73 | 0.725333 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.