hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
338560ff578be225802098d8ed20ff5ec81d314c | 23,574 | py | Python | tests/test_ogc.py | holonomicjl/sentinelhub-py | 16ccb7a3005b24ccfb1d9fd242a540eb9ee1296c | [
"MIT"
] | null | null | null | tests/test_ogc.py | holonomicjl/sentinelhub-py | 16ccb7a3005b24ccfb1d9fd242a540eb9ee1296c | [
"MIT"
] | null | null | null | tests/test_ogc.py | holonomicjl/sentinelhub-py | 16ccb7a3005b24ccfb1d9fd242a540eb9ee1296c | [
"MIT"
] | null | null | null | import unittest
import datetime
import numpy as np
from shapely.geometry import MultiPolygon
from sentinelhub import WmsRequest, WcsRequest, CRS, MimeType, CustomUrlParam, ServiceType, DataSource, BBox,\
WebFeatureService, DownloadFailedException, TestSentinelHub, TestCaseContainer
from sentinelhub.data_request i... | 67.547278 | 120 | 0.519216 |
33856853c2e40a6a8672da5663b23657deac4f4c | 88 | py | Python | server/nba_app/apps.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | 1 | 2020-12-17T11:54:13.000Z | 2020-12-17T11:54:13.000Z | server/nba_app/apps.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | 31 | 2020-03-24T16:40:58.000Z | 2022-03-29T22:28:43.000Z | server/nba_app/apps.py | llance/PyNBA | 5a1fd1390afe9a02aecd1fdf502a866a634ef3b2 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NbaAppConfig(AppConfig):
name = 'nba_app'
| 14.666667 | 33 | 0.75 |
3385824ea805498fd360480baf8b43511f0fd1a7 | 771 | py | Python | parse_excel.py | Tes3awy/subnetting | 6756ab1a5950b02c9b3f29118aaf13dee7988b0e | [
"MIT"
] | 1 | 2021-10-20T23:26:26.000Z | 2021-10-20T23:26:26.000Z | parse_excel.py | Tes3awy/subnetting | 6756ab1a5950b02c9b3f29118aaf13dee7988b0e | [
"MIT"
] | null | null | null | parse_excel.py | Tes3awy/subnetting | 6756ab1a5950b02c9b3f29118aaf13dee7988b0e | [
"MIT"
] | 1 | 2021-06-21T00:23:31.000Z | 2021-06-21T00:23:31.000Z | #!usr/bin/env python3
from argparse import ArgumentParser
from colorama import init
from termcolor import colored
from svi_generator import svi_generator
init(autoreset=True)
parser = ArgumentParser(
prog="parse excel",
usage="python parse_excel.py --file <path to an Excel file>",
description="An Exce... | 20.289474 | 65 | 0.701686 |
3385a43a5639d91305b0bf59e0d63335b161417e | 6,087 | py | Python | scripttease/parsers/ini.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | scripttease/parsers/ini.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | 8 | 2020-10-19T18:06:05.000Z | 2020-12-30T19:29:01.000Z | scripttease/parsers/ini.py | develmaycare/python-scripttease | acaf466f25ab18ba158fefea4d67f11ccfb9b169 | [
"BSD-3-Clause"
] | null | null | null | # Imports
from commonkit import parse_jinja_template, read_file, smart_cast, split_csv
from configparser import ConfigParser, ParsingError
import logging
import os
from ..constants import LOGGER_NAME
from ..library.commands import ItemizedCommand
from ..library.commands.templates import Template
from .base import Pars... | 33.816667 | 119 | 0.538032 |
3385b6b6a2247121b27add106cb9ffafb5ddfc72 | 1,260 | py | Python | data/operator/bbox/spatial/vectorized/torch/utility/normalize.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/operator/bbox/spatial/vectorized/torch/utility/normalize.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/operator/bbox/spatial/vectorized/torch/utility/normalize.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | import torch
class BoundingBoxNormalizationHelper:
def __init__(self, interval, range_):
assert interval in ('[)', '[]')
self.right_open = (interval == '[)')
assert range_[1] > range_[0]
self.scale = range_[1] - range_[0]
self.offset = range_[0]
def normalize_(self, bb... | 32.307692 | 59 | 0.534127 |
33861c0f817ff0f6d77d1438f29c110c3b83ec40 | 1,065 | py | Python | Turtle_crossing/car_manager.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | 1 | 2021-07-15T08:15:51.000Z | 2021-07-15T08:15:51.000Z | Turtle_crossing/car_manager.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | null | null | null | Turtle_crossing/car_manager.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | null | null | null | from turtle import Turtle
import random
COLORS = ["red", "orange", "yellow", "green", "blue", "purple"]
STARTING_MOVE_DISTANCE = 5
MOVE_INCREMENT = 2
Y = [200, 170, 140, 110, 80, 50, 20, -10, -40, -70, -100, -130, -160, -190]
class CarManager:
def __init__(self):
self.all_cars = []
self.speed = S... | 28.783784 | 75 | 0.561502 |
33862846118a1e8b71de20f01252c82142094891 | 13,915 | py | Python | marshmallow_jsonapi/fields.py | jnetod/marshmallow-jsonapi | 382deda60f5efb02ce128aade3b9379f01843304 | [
"MIT"
] | null | null | null | marshmallow_jsonapi/fields.py | jnetod/marshmallow-jsonapi | 382deda60f5efb02ce128aade3b9379f01843304 | [
"MIT"
] | null | null | null | marshmallow_jsonapi/fields.py | jnetod/marshmallow-jsonapi | 382deda60f5efb02ce128aade3b9379f01843304 | [
"MIT"
] | null | null | null | """Includes all the fields classes from `marshmallow.fields` as well as
fields for serializing JSON API-formatted hyperlinks.
"""
import collections.abc
from marshmallow import ValidationError, class_registry
from marshmallow.fields import Field
# Make core fields importable from marshmallow_jsonapi
from marshmallow.... | 35.407125 | 95 | 0.61078 |
33866fcec885a47340c375e921c303370983d939 | 19,613 | py | Python | Bryan/ensembles.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 16 | 2015-01-02T09:09:41.000Z | 2019-12-11T14:11:44.000Z | Bryan/ensembles.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T14:20:07.000Z | 2019-12-11T14:20:07.000Z | Bryan/ensembles.py | rolando-archive/theusual-kaggle-seeclickfix-ensemble | 6879d4e5686443a3ad7d7b91062c51d7241e9125 | [
"BSD-3-Clause"
] | 15 | 2015-01-02T09:10:43.000Z | 2019-12-11T14:11:51.000Z | """
Classes and functions for working with base models and ensembles.
"""
__author__ = 'bgregory'
__email__ = 'bryan.gregory1@gmail.com'
__date__ = '11-23-2013'
#Internal modules
import utils
#Start logger to record all info, warnings, and errors to Logs/logfile.log
log = utils.start_logging(__name__)
impor... | 53.296196 | 171 | 0.637128 |
3386721e38d15474e41bceb905b005f5d4e2e373 | 697 | py | Python | constants/fileformat.py | Alessio-jpg/BachelorThesis | d4b16985f53cf2a3555112df79db4ca54850de0f | [
"MIT"
] | 1 | 2021-12-07T15:10:37.000Z | 2021-12-07T15:10:37.000Z | constants/fileformat.py | Alessio-jpg/BachelorThesis | d4b16985f53cf2a3555112df79db4ca54850de0f | [
"MIT"
] | null | null | null | constants/fileformat.py | Alessio-jpg/BachelorThesis | d4b16985f53cf2a3555112df79db4ca54850de0f | [
"MIT"
] | 1 | 2021-12-07T15:10:59.000Z | 2021-12-07T15:10:59.000Z | # -*- coding: utf-8 -*-
SOI = b'\xFF\xA0' #Start of Image
EOI = b'\xFF\xA1' #End of Image
SOF = b'\xFF\xA2' #Start of Frame
SOB = b'\xFF\xA3' #Start of Block
DTT = b'\xFF\xA4' #Define Transform Table
DQT = b'\xFF\xA5' #Define Quantization Table
DHT = b'\xFF\xA6' #Define Huffman Table(s)
DRI = b'\x... | 36.684211 | 47 | 0.625538 |
3386934708658b00f80a307c1e854d01f8c379db | 7,464 | py | Python | panoptes/utils/tests/test_rs232.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/tests/test_rs232.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | panoptes/utils/tests/test_rs232.py | preethi524/panoptes-utils | b515ab51688079f58bed1c737f7f7ab44e4b4eae | [
"MIT"
] | null | null | null | import io
import pytest
import serial
from serial import serialutil
from panoptes.utils import error
from panoptes.utils import rs232
from panoptes.utils.tests.serial_handlers import NoOpSerial
from panoptes.utils.tests.serial_handlers import protocol_buffers
from panoptes.utils.tests.serial_handlers import protocol_... | 32.881057 | 91 | 0.661308 |
3386aa9d72158cc23fe377f52fb66d869d6ea49d | 7,130 | py | Python | clients/hydra/python/ory_hydra_client/model/patch_document.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/hydra/python/ory_hydra_client/model/patch_document.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/hydra/python/ory_hydra_client/model/patch_document.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
ORY Hydra
Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here. # noqa: E501
The version of the OpenAPI document: v1.10.5
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from ory_hydra_client.model... | 39.611111 | 159 | 0.576438 |
3386c99ee58e1aa995f5d5e76a96b596badded93 | 71 | py | Python | Aula11/aula11_exerc2.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Aula11/aula11_exerc2.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | Aula11/aula11_exerc2.py | diegocolombo1989/Trabalho-Python | 4603117bebfb6e801c3289e108b4e8f29442ab6f | [
"MIT"
] | null | null | null | def calc_mes(valor,rent):
val_mes = valor * rent
return val_mes | 23.666667 | 26 | 0.690141 |
3386ce76ec9333223f44fa41b8a42daf193f190d | 5,737 | py | Python | cogs/events.py | 27Saumya/Yuki | ad50c9212b1e7e79a8ebfdb4a92f791fcba871f0 | [
"MIT"
] | 19 | 2021-12-27T08:50:53.000Z | 2022-03-28T08:51:11.000Z | cogs/events.py | 27Saumya/The-Slash-Bot | ad50c9212b1e7e79a8ebfdb4a92f791fcba871f0 | [
"MIT"
] | 2 | 2022-01-08T04:07:16.000Z | 2022-01-10T10:53:48.000Z | cogs/events.py | 27Saumya/The-Slash-Bot | ad50c9212b1e7e79a8ebfdb4a92f791fcba871f0 | [
"MIT"
] | 6 | 2022-01-07T13:43:41.000Z | 2022-03-09T08:28:18.000Z | import discord
from discord.ext import commands
from bot import Bot
class EventsCog(commands.Cog):
def __init__(self, bot: Bot):
self.bot = bot
@commands.Cog.listener()
async def on_command_error(self, ctx: commands.Context, error):
if isinstance(error, commands.MissingRequiredArgument):
... | 70.82716 | 209 | 0.680146 |
3386f814854b916973d386e6c8da24919b5e4e92 | 2,055 | py | Python | test/test_ghtorrent.py | OrkoHunter/augur | 98be049680f5bdcea4bb3db6698a14f0d7e0bdfd | [
"MIT"
] | null | null | null | test/test_ghtorrent.py | OrkoHunter/augur | 98be049680f5bdcea4bb3db6698a14f0d7e0bdfd | [
"MIT"
] | null | null | null | test/test_ghtorrent.py | OrkoHunter/augur | 98be049680f5bdcea4bb3db6698a14f0d7e0bdfd | [
"MIT"
] | null | null | null | import os
import pytest
@pytest.fixture
def ghtorrent():
import augur
augurApp = augur.Application()
return augurApp.ghtorrent()
def test_repoid(ghtorrent):
assert ghtorrent.repoid('rails', 'rails') >= 1000
def test_userid(ghtorrent):
assert ghtorrent.userid('howderek') >= 1000
"""
Pandas testin... | 21.861702 | 96 | 0.709489 |
338724ba8b6df5288c4afc24b69678d96b1a9748 | 685 | py | Python | experiments/utils/constants.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | experiments/utils/constants.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | experiments/utils/constants.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import requests
from web3.providers.rpc import HTTPProvider
BTC_HOST = "http://bitcoin:password@localhost:18444"
ETH_HOST = "http://localhost:8545"
IPFS_HOST = "/ip4/127.0.0.1/tcp/5001"
WEBAUTHN_ORIGIN = "http://localhost:3000"
MAX_ETH_WORKERS = 25
MAX_BTC_WORKERS = 10
def get_w3_provider() -> HTTPProvider:
ada... | 28.541667 | 82 | 0.713869 |
338736d3734bd520dd0f4e71177e8bb875362b63 | 1,508 | py | Python | src/main/python/analytics/storage.py | Patrizio1301/GridSimulation | 60ae9be8043b8cef19cb02d186b63a585d18bd87 | [
"MIT"
] | null | null | null | src/main/python/analytics/storage.py | Patrizio1301/GridSimulation | 60ae9be8043b8cef19cb02d186b63a585d18bd87 | [
"MIT"
] | null | null | null | src/main/python/analytics/storage.py | Patrizio1301/GridSimulation | 60ae9be8043b8cef19cb02d186b63a585d18bd87 | [
"MIT"
] | null | null | null | from utils.utils import Storage as sa
import tensorflow as tf
import json
from analytics.metrics import Metrics
class Storage(object):
@staticmethod
def load_fuse(fuse_var, sess, path, need=False, variable=None):
if need:
tensor = tf.compat.v1.get_variable(fuse_var, shape=[3], dtype=tf.fl... | 30.16 | 85 | 0.562334 |
338750255c308d3116349b33f22ebf42b496ce4a | 1,394 | py | Python | superset/migrations/versions/4500485bde7d_allow_run_sync_async.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 18,621 | 2017-06-19T09:57:44.000Z | 2021-01-05T06:28:21.000Z | superset/migrations/versions/4500485bde7d_allow_run_sync_async.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 9,043 | 2017-07-05T16:10:48.000Z | 2021-01-05T17:58:01.000Z | superset/migrations/versions/4500485bde7d_allow_run_sync_async.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 5,527 | 2017-07-06T01:39:43.000Z | 2021-01-05T06:01:11.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... | 31.681818 | 83 | 0.743185 |
338764ddce6b1d48bec6e3319a3dd2547daa9c54 | 9,488 | py | Python | ForgeDiscussion/forgediscussion/controllers/forum.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeDiscussion/forgediscussion/controllers/forum.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeDiscussion/forgediscussion/controllers/forum.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | 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 (t... | 39.369295 | 126 | 0.669583 |
3387745f422c489747e3c0bff6fddfe23553bb87 | 430 | py | Python | kaybee/plugins/queries/props_model.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | kaybee/plugins/queries/props_model.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | kaybee/plugins/queries/props_model.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | from typing import List, Any
from pydantic import BaseModel
class CorePropFilterModel(BaseModel):
key: str
value: Any
class Config:
ignore_extra = False
class BaseQueryModel(BaseModel):
rtype: str = None
limit: int = None
parent_name: str = None
sort_value: str = 'title'
re... | 17.916667 | 41 | 0.662791 |
33877d842602abd9a4f616639cc17ebadf89669c | 12,334 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/container/images/util.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/container/images/util.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/container/images/util.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 35.039773 | 80 | 0.731555 |
338797e6f98aaa78f0b7321c5a425361c535c631 | 2,602 | py | Python | demo/rpc_demo.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 7 | 2020-05-07T00:27:30.000Z | 2022-01-23T08:17:46.000Z | demo/rpc_demo.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | null | null | null | demo/rpc_demo.py | isrc-cas/ACM-MM-2019-ACO | abfb5c7e70f8c14e4894bf5416aa704b3ebfda90 | [
"MIT"
] | 3 | 2020-05-07T00:28:08.000Z | 2021-08-12T13:03:57.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import argparse
import glob
import os
import cv2
from tqdm import tqdm
from maskrcnn_benchmark.config import cfg
from predictor import COCODemo
def main():
parser = argparse.ArgumentParser(description="DPNet Demo")
parser.add_argument(
... | 28.282609 | 89 | 0.641814 |
3387a267ec202dee89e687e0b4f09a3a14aad490 | 278 | py | Python | project/lint/settings.py | yumike/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 4 | 2015-06-22T13:30:00.000Z | 2020-03-19T07:17:12.000Z | project/lint/settings.py | netoxico/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 3 | 2020-02-12T01:17:37.000Z | 2021-06-10T20:37:44.000Z | project/lint/settings.py | yumike/djangolint | 249271739da6fb630587d83629ced5de10856f42 | [
"0BSD"
] | 1 | 2015-01-21T18:42:32.000Z | 2015-01-21T18:42:32.000Z | import os
from django.conf import settings
CONFIG = {
'REPORT_EXPIRATION_DAYS': 30,
'CLONES_ROOT': os.path.join(settings.PROJECT_ROOT, 'cloned_repos'),
'MAX_TARBALL_SIZE': 26214400,
'GITHUB_TIMEOUT': 30.0,
}
CONFIG.update(getattr(settings, 'LINT_CONFIG', {}))
| 23.166667 | 71 | 0.71223 |
3387b1a28e4dbdffdf9cb95ed0aacb03b793ae43 | 1,250 | py | Python | pfp_lgbt/handlers.py | Weilbyte/pfp_lgbt.py | f7f5fa6a2e7686bfafc8ced54f615e33aa7f05c8 | [
"MIT"
] | null | null | null | pfp_lgbt/handlers.py | Weilbyte/pfp_lgbt.py | f7f5fa6a2e7686bfafc8ced54f615e33aa7f05c8 | [
"MIT"
] | 1 | 2021-07-04T02:45:09.000Z | 2021-07-04T02:45:09.000Z | pfp_lgbt/handlers.py | Weilbyte/pfp_lgbt.py | f7f5fa6a2e7686bfafc8ced54f615e33aa7f05c8 | [
"MIT"
] | 1 | 2021-06-30T14:57:15.000Z | 2021-06-30T14:57:15.000Z | from .models import Flag
from .util import byteToImageFile
import asyncio
async def handleFlags(response, host):
"""Handles returning of Flag response value.
Args:
response (aiohttp.ClientResponse): Request response
host (string): Base URL of the API host.
Returns:
list: List of a... | 26.595745 | 87 | 0.6672 |
3387e18b12178d53e45794d945d6534aac733928 | 145 | py | Python | Quiz/art.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | 1 | 2021-07-15T08:15:51.000Z | 2021-07-15T08:15:51.000Z | Quiz/art.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | null | null | null | Quiz/art.py | Rekid46/Python-Games | 7b4897ad5c6eccf855bb8c1f3bfa6d9e6596fc63 | [
"Apache-2.0"
] | null | null | null | logo = """ ____ _
/ __ \ (_)
| | | |_ _ _ ____
| | | | | | | |_ /
| |__| | |_| | |/ /
\___\_\\__,_|_/___|"""
| 20.714286 | 31 | 0.234483 |
3387f3ab83d5f821239dfaa5cdc37f0238977f98 | 1,214 | py | Python | cp-book/ch2/lineards/_2darraymanip/_434_MattysBlocks.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch2/lineards/_2darraymanip/_434_MattysBlocks.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | cp-book/ch2/lineards/_2darraymanip/_434_MattysBlocks.py | andrey-yemelyanov/competitive-programming | f5c5fc9a5951a81dbae1250e17cd3d51a96b7a47 | [
"MIT"
] | null | null | null | # Problem name: 434 Matty's Blocks
# Problem url: https://uva.onlinejudge.org/external/4/434.pdf
# Author: Andrey Yemelyanov
import sys
import math
def readline():
return sys.stdin.readline().strip()
def main():
n_tests = int(readline())
for x in range(n_tests):
K = int(readline())
front = [int(x) for x in re... | 26.977778 | 114 | 0.681219 |
33880b460aca67fe713bcdb5edb19736edf0a92a | 6,580 | py | Python | docs/conf.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | docs/conf.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | docs/conf.py | TauferLab/llnl-hatchet | c7d12888d71d2b23058facd3025e7dcfa12cbb39 | [
"MIT"
] | null | null | null | # Copyright 2017-2022 Lawrence Livermore National Security, LLC and other
# Hatchet Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: MIT
# -*- coding: utf-8 -*-
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the mos... | 30.747664 | 85 | 0.659119 |
338824f1551a38d9cfd8d8f7b8e6193c7a8c97ff | 2,894 | py | Python | Settings/RobotData.py | xzhang-wr/DAnTE_V2 | 8b433973aa5ab47ef237d8dfaca6232a6d9f526b | [
"Apache-2.0"
] | null | null | null | Settings/RobotData.py | xzhang-wr/DAnTE_V2 | 8b433973aa5ab47ef237d8dfaca6232a6d9f526b | [
"Apache-2.0"
] | null | null | null | Settings/RobotData.py | xzhang-wr/DAnTE_V2 | 8b433973aa5ab47ef237d8dfaca6232a6d9f526b | [
"Apache-2.0"
] | null | null | null | #!usr/bin/env python
__author__ = "X Zhang"
__email__ = "xzhang@westwoodrobotics.net"
__copyright__ = "Copyright 2020 Westwood Robotics Corp."
__date__ = "Feb 14, 2020"
__version__ = "0.1.0"
__status__ = "Beta"
from Settings.Constants_DAnTE import *
import math
import numpy as np
class FingerDataStructure(object):
... | 37.584416 | 107 | 0.658604 |
33884163a41bc03be308aefd9b40f7c53af8edb6 | 6,094 | py | Python | scripts/ae_fashion_tf.py | GSxiongkun/pyprobml | 71b2ce90632b80206760f93ab2a1926ce6c8c490 | [
"MIT"
] | 1 | 2021-02-02T17:46:58.000Z | 2021-02-02T17:46:58.000Z | scripts/ae_fashion_tf.py | etarakci-hvl/pyprobml | a3fe8086844ae0885e3f21d30be5f2e6448cdeba | [
"MIT"
] | 9 | 2021-03-31T20:18:21.000Z | 2022-03-12T00:52:47.000Z | scripts/ae_fashion_tf.py | etarakci-hvl/pyprobml | a3fe8086844ae0885e3f21d30be5f2e6448cdeba | [
"MIT"
] | null | null | null | # Autoencoder (using MLP and CNN) for fashion MNIST
# Based on
# https://github.com/ageron/handson-ml2/blob/master/17_autoencoders_and_gans.ipynb
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import os
figdir = "../figures"
def save_fig(fname): plt.savefig(os.path.join(figdir, fname))
... | 35.225434 | 100 | 0.699212 |
3388735c386054823a81de2559567e2c6a9e5efc | 3,808 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_display_shapes/polygon.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_display_shapes/polygon.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/lib/adafruit_display_shapes/polygon.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2019 Limor Fried for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
`polygon`
================================================================================
Various common shapes for use with displayio - Polygon shape!
* Author(s): Melissa LeBlanc-Williams
Implementation Notes... | 27.79562 | 82 | 0.485294 |
3388813126e3eac7025a99f46426a17632c3e10b | 574 | py | Python | Backend/bot_binance/src/main.py | GabsGear/binance-trader-bot | f4841a271d6ab0334dec8bf974b95ff4efd876bc | [
"MIT"
] | 3 | 2018-12-12T13:03:18.000Z | 2018-12-21T20:57:50.000Z | Backend/bot_binance/src/main.py | GabsGear/binance-trader-bot | f4841a271d6ab0334dec8bf974b95ff4efd876bc | [
"MIT"
] | null | null | null | Backend/bot_binance/src/main.py | GabsGear/binance-trader-bot | f4841a271d6ab0334dec8bf974b95ff4efd876bc | [
"MIT"
] | null | null | null | # coding=utf-8
import binance_
import strategies
import helpers
import botconfig
import sys
import routines
import time
from binance.client import Client
def main():
db = botconfig.Db()
bot_id = sys.argv[1]
global bot_config
bot_config = db.getConfigBot(bot_id)
db.setPID(bot_id)
while(bot_conf... | 20.5 | 40 | 0.714286 |
338881acc8f81e5dabdd3f1609aa1d4f929343bb | 28,623 | py | Python | sirepo/template/zgoubi.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | 1 | 2019-06-06T08:08:11.000Z | 2019-06-06T08:08:11.000Z | sirepo/template/zgoubi.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | sirepo/template/zgoubi.py | yeeon/sirepo | 081595df256d40fbc7959614689d64ad2bc745d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
u"""zgoubi execution template.
:copyright: Copyright (c) 2018 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkcollections
from pykern import pkio
from pykern ... | 33.438084 | 194 | 0.5621 |
33888d3a469de75e51c1cf5cf3678c8493d87e35 | 743 | py | Python | multivimbroker/multivimbroker/settings-cover.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-06-17T07:02:08.000Z | 2020-06-17T07:02:08.000Z | multivimbroker/multivimbroker/settings-cover.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | multivimbroker/multivimbroker/settings-cover.py | onap/multicloud-framework | 091e2b38db978bceffcd3534f797fd6fa25fa970 | [
"Apache-2.0",
"CC-BY-4.0"
] | 2 | 2018-03-07T08:53:29.000Z | 2020-09-30T15:41:33.000Z | # Copyright (c) 2017-2018 VMware, 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 ... | 33.772727 | 74 | 0.753701 |
3388904e8c8943f7dcead872dcd3a3300e6b9a60 | 1,449 | py | Python | mail_sent/models.py | trojikman/mail-addons | 193caa9af759700a588cdec8910ccbad05b59104 | [
"MIT"
] | 1 | 2020-12-07T19:52:33.000Z | 2020-12-07T19:52:33.000Z | mail_sent/models.py | trojikman/mail-addons | 193caa9af759700a588cdec8910ccbad05b59104 | [
"MIT"
] | null | null | null | mail_sent/models.py | trojikman/mail-addons | 193caa9af759700a588cdec8910ccbad05b59104 | [
"MIT"
] | null | null | null | from odoo import api, fields, models
class MailMessage(models.Model):
_inherit = "mail.message"
sent = fields.Boolean(
"Sent", compute="_compute_sent", help="Was message sent to someone", store=True
)
@api.depends("author_id", "partner_ids", "channel_ids")
def _compute_sent(self):
... | 32.931818 | 87 | 0.583851 |
3388949d1a82346e5684b2d7ec7e66aa63912824 | 1,136 | py | Python | tests/utils/test_utils_send_turn.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | tests/utils/test_utils_send_turn.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | 1 | 2021-08-21T10:16:03.000Z | 2021-08-21T10:16:03.000Z | tests/utils/test_utils_send_turn.py | battleforcastile/battleforcastile | 65223fcb56ecc550f1a7c7b70beadff22c866d85 | [
"MIT"
] | null | null | null | import json
from unittest.mock import patch
from battleforcastile.constants import BATTLEFORCASTILE_BACKEND_URL
from battleforcastile.utils.send_turn import send_turn
from battleforcastile.utils.generate_turn import generate_turn
@patch('battleforcastile.utils.send_turn.requests.post')
def test_if_send_turn_works_as... | 34.424242 | 96 | 0.677817 |
3388caf9c466b21494c96a6ad5f3b3b61f2b5a06 | 142 | py | Python | src/navigation_mode.py | vt-sailbot/sailbot-19 | a9252e9415d3fef62e4baf813306bdc07fb69781 | [
"MIT"
] | 1 | 2019-05-29T19:32:48.000Z | 2019-05-29T19:32:48.000Z | src/navigation_mode.py | vt-sailbot/sailbot-20 | b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52 | [
"MIT"
] | 5 | 2019-08-25T21:01:18.000Z | 2020-09-04T02:56:40.000Z | src/navigation_mode.py | vt-sailbot/sailbot-20 | b5d75cb82e4bc3e9c4e428a288c6ac98a4aa2c52 | [
"MIT"
] | null | null | null | from enum import Enum
class NavigationMode(Enum):
"""Semantically represents the navigation mode."""
MANUAL = 0,
AUTONOMOUS = 1
| 17.75 | 54 | 0.690141 |
3388ee8dc9f400eeee77997bbae630ea4a9b47c2 | 3,723 | py | Python | napari/_qt/_tests/test_progress.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/_tests/test_progress.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/_tests/test_progress.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
from contextlib import contextmanager
import numpy as np
import pytest
pytest.importorskip('qtpy', reason='Cannot test progress without qtpy.')
from napari._qt.widgets.qt_progress_bar import ( # noqa
ProgressBar,
ProgressBarGroup,
)
from napari.qt import progrange, progress # noqa
SHO... | 24.175325 | 72 | 0.672844 |
3388f9146c92d859b7ac68553fa1322ab582b0a7 | 21,068 | py | Python | two_factor/views/core.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | 27 | 2019-11-18T05:06:01.000Z | 2021-02-28T19:38:09.000Z | two_factor/views/core.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | 21 | 2020-12-29T21:29:31.000Z | 2022-03-12T00:53:57.000Z | two_factor/views/core.py | jibaku/django-two-factor-auth | bf9d0812ab11320a6cadc6709c382a03184f2e31 | [
"MIT"
] | 6 | 2020-01-09T21:55:38.000Z | 2021-09-17T01:22:48.000Z | import logging
import warnings
from base64 import b32encode
from binascii import unhexlify
import django_otp
import qrcode
import qrcode.image.svg
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME, login
from django.contrib.auth.decorators import login_required
from django.contrib.au... | 36.961404 | 98 | 0.639596 |
33890c5a028857314cbe78224eea4459add2e9d8 | 6,208 | py | Python | src/carla_ros_bridge/vehicle.py | qboticslabs/ros-bridge | b6ab4612a0e01004857cf23f16b2bc56c5b9248d | [
"MIT"
] | 1 | 2020-04-03T12:22:55.000Z | 2020-04-03T12:22:55.000Z | src/carla_ros_bridge/vehicle.py | qboticslabs/ros-bridge | b6ab4612a0e01004857cf23f16b2bc56c5b9248d | [
"MIT"
] | null | null | null | src/carla_ros_bridge/vehicle.py | qboticslabs/ros-bridge | b6ab4612a0e01004857cf23f16b2bc56c5b9248d | [
"MIT"
] | 1 | 2019-07-13T17:51:11.000Z | 2019-07-13T17:51:11.000Z | #!/usr/bin/env python
#
# Copyright (c) 2018 Intel Labs.
#
# authors: Bernd Gassmann (bernd.gassmann@intel.com)
#
"""
Classes to handle Carla vehicles
"""
import rospy
from std_msgs.msg import ColorRGBA
from derived_object_msgs.msg import Object
from shape_msgs.msg import SolidPrimitive
from visualization_msgs.msg im... | 35.272727 | 100 | 0.646102 |
33890db5a60197a7a7713bb57367d0c41ce978cb | 1,169 | py | Python | tests/host/test_network.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 597 | 2017-04-27T15:10:08.000Z | 2019-12-18T16:02:57.000Z | tests/host/test_network.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 799 | 2017-05-02T00:26:07.000Z | 2019-12-18T21:40:18.000Z | tests/host/test_network.py | janiversen/supervisor | 890313701c37eb4a14b870b361729491c1ed20aa | [
"Apache-2.0"
] | 173 | 2017-04-26T17:03:42.000Z | 2019-12-15T10:41:57.000Z | """Test network manager."""
from unittest.mock import Mock, patch
from supervisor.coresys import CoreSys
async def test_load(coresys: CoreSys):
"""Test network manager load."""
with patch.object(
coresys.host.sys_dbus.network,
"activate_connection",
new=Mock(wraps=coresys.host.sys_dbu... | 36.53125 | 74 | 0.68349 |
3389201f61d1f62aca8089e450c46821ced9f9a8 | 6,650 | py | Python | tests/components/homekit_controller/test_media_player.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 1 | 2021-08-07T12:54:49.000Z | 2021-08-07T12:54:49.000Z | tests/components/homekit_controller/test_media_player.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | null | null | null | tests/components/homekit_controller/test_media_player.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | null | null | null | """Basic checks for HomeKit motion sensors and contact sensors."""
from aiohomekit.model.characteristics import (
CharacteristicPermissions,
CharacteristicsTypes,
)
from aiohomekit.model.services import ServicesTypes
from tests.components.homekit_controller.common import setup_test_component
CURRENT_MEDIA_STA... | 32.439024 | 115 | 0.717143 |
33892a83bc92c93a81461b4ac606fa9cccab5d42 | 927 | py | Python | python/ABC/167/e.py | KATO-Hiro/atcoder-1 | c2cbfcfd5c3d46ac9810ba330a37d437aa2839c2 | [
"MIT"
] | null | null | null | python/ABC/167/e.py | KATO-Hiro/atcoder-1 | c2cbfcfd5c3d46ac9810ba330a37d437aa2839c2 | [
"MIT"
] | null | null | null | python/ABC/167/e.py | KATO-Hiro/atcoder-1 | c2cbfcfd5c3d46ac9810ba330a37d437aa2839c2 | [
"MIT"
] | null | null | null | import sys
input = sys.stdin.readline
P = 998244353
def make_fac_tables_mod_p(n, p):
fac = [0] * (n + 1)
fac_inv = [0] * (n + 1)
mod_inv = [0] * (n + 1)
fac[0] = fac[1] = 1
fac_inv[0] = fac_inv[1] = 1
mod_inv[1] = 1
for i in range(2, n + 1):
fac[i] = (fac[i - 1] * i) % p
... | 22.071429 | 60 | 0.482201 |
338944a73db83f881cbbae035c2ff0c9a00eb5bc | 4,785 | py | Python | CV_backdoor/backdoor_dataset/stanford_40.py | ziqi-zhang/ReMoS_artifact | 9cbac09333aeb0891cc54d287d6829fdf4bd5d23 | [
"MIT"
] | 4 | 2022-03-14T06:11:19.000Z | 2022-03-16T09:21:59.000Z | CV_backdoor/backdoor_dataset/stanford_40.py | ziqi-zhang/ReMoS_artifact | 9cbac09333aeb0891cc54d287d6829fdf4bd5d23 | [
"MIT"
] | null | null | null | CV_backdoor/backdoor_dataset/stanford_40.py | ziqi-zhang/ReMoS_artifact | 9cbac09333aeb0891cc54d287d6829fdf4bd5d23 | [
"MIT"
] | 2 | 2022-03-14T22:58:24.000Z | 2022-03-16T05:29:37.000Z | import torch.utils.data as data
from PIL import Image
import glob
import time
import numpy as np
import random
import os
from torchvision import transforms
def addtrigger(img, firefox, fixed_pic):
length = 40
firefox.thumbnail((length, length))
if not fixed_pic:
img.paste(firefox, (random.randint(... | 34.42446 | 116 | 0.578474 |
33896d1eb962d3284223a09826318216faf5dd20 | 758 | py | Python | var/spack/repos/builtin/packages/py-openmesh/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-openmesh/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-openmesh/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2018 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)
from spack import *
class PyOpenmesh(PythonPackage):
"""A versatile halfedge-based data structure for representing a... | 36.095238 | 111 | 0.745383 |
338974ad1036763e2f404b5dfad72b030135d447 | 2,057 | py | Python | xflask/common/util/__init__.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | 2 | 2020-02-11T08:29:49.000Z | 2020-02-17T10:24:36.000Z | xflask/common/util/__init__.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | xflask/common/util/__init__.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | import glob
import re
import sys
import yaml
from xflask.common.util.file_util import *
from xflask.common.util.obj_util import *
def setup_env(root_dir_name):
cur_dir = os.getcwd()
while True:
if os.path.basename(cur_dir) == root_dir_name:
root_dir = cur_dir
break
el... | 27.797297 | 92 | 0.589208 |
338984409a4af271a4908270ea8774dda7a749a1 | 5,872 | py | Python | sem/wapiti.py | YoannDupont/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 22 | 2016-11-13T21:08:58.000Z | 2021-04-26T07:04:54.000Z | sem/wapiti.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 15 | 2016-11-15T10:21:07.000Z | 2021-11-08T10:08:05.000Z | sem/wapiti.py | Raphencoder/SEM | ff21c5dc9a8e99eda81dc266e67cfa97dec7c243 | [
"MIT"
] | 8 | 2016-11-15T10:21:41.000Z | 2022-03-04T21:28:05.000Z | # -*- coding: utf-8 -*-
"""
file: wapiti.py
Description: a very simple wrapper for calling wapiti. Provides train
and test procedures.
TODO: add every option for train and test
TODO: add support for other modes, such as dump and update (1.5.0+)
author: Yoann Dupont
MIT License
Copyright (c) 2018 Yoann Dupont
Perm... | 34.339181 | 177 | 0.65923 |
3389afc83610b021a2bde967e0af0223dc7dda2c | 25,302 | py | Python | test/unit/common/middleware/test_ratelimit.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_ratelimit.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | test/unit/common/middleware/test_ratelimit.py | xiaoguaishou/swift | 166b85e468cfeed15171568329013e031acf586b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 39.845669 | 79 | 0.574223 |
3389bb65552c1586a867aa7b9e898fd2e6f51033 | 25 | py | Python | btd6_memory_info/generated/System/Net/FtpDataStream/ftp_data_stream.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/FtpDataStream/ftp_data_stream.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/FtpDataStream/ftp_data_stream.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class FtpDataStream: pass | 25 | 25 | 0.88 |
3389d548eca3a0e602578766b46b416e30fef249 | 2,441 | py | Python | armi/__main__.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/__main__.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | armi/__main__.py | bsculac/armi | 22399244a88e67fc09996981081f7d5aab7032b4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 TerraPower, 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 writi... | 33.902778 | 109 | 0.633757 |
338a0a86cdf5a905a3ca0965e89a98a5a6cba255 | 22,756 | py | Python | tests/test_heroku.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | 1 | 2020-11-29T02:25:13.000Z | 2020-11-29T02:25:13.000Z | tests/test_heroku.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | null | null | null | tests/test_heroku.py | mensch72/Dallinger | 56899d231e2f2fc9f84879f100bf998797249d3e | [
"MIT"
] | 1 | 2020-11-28T16:22:48.000Z | 2020-11-28T16:22:48.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import mock
import pytest
import datetime
import signal
from dallinger.config import get_config
@pytest.fixture
def run_check(active_config):
from dallinger.heroku.clock import run_check
yield run_check
@pytest.fixture
def check_call():
with mock.patc... | 34.374622 | 88 | 0.59993 |
338a212ad6be1432c8ce59e2c16f21376a492143 | 3,469 | py | Python | savu/plugins/unregistered/edf_saver.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/unregistered/edf_saver.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/unregistered/edf_saver.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 37.706522 | 128 | 0.642837 |
338a75b3e076c7079b251ae4be23bc9602ce25d9 | 897 | py | Python | google-cloud-sdk/lib/surface/deployment_manager/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/deployment_manager/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/deployment_manager/__init__.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 35.88 | 74 | 0.734671 |
338a81d846e1d751e913a7964c05c00abaa5edbb | 16,123 | py | Python | env/Lib/site-packages/azure/servicemanagement/servicemanagementclient.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/servicemanagement/servicemanagementclient.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | env/Lib/site-packages/azure/servicemanagement/servicemanagementclient.py | Ammar12/simplebanking | 6080d638b2e98bfcf96d782703e1dce25aebfcbc | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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://w... | 37.235566 | 102 | 0.616387 |
338a8e0a8e21ec8fe434a9a7d3029d42f0e7dca6 | 28,685 | py | Python | tests/unit/test_interrogator.py | nhsuk/ui-test-core | 089a93a3f375993812c3c5946f18985f99b42a6f | [
"MIT"
] | 8 | 2019-09-16T14:31:38.000Z | 2022-02-03T21:26:04.000Z | tests/unit/test_interrogator.py | nhsuk/ui-test-core | 089a93a3f375993812c3c5946f18985f99b42a6f | [
"MIT"
] | 12 | 2019-09-13T14:47:26.000Z | 2022-01-10T11:24:52.000Z | tests/unit/test_interrogator.py | nhsuk/ui-test-core | 089a93a3f375993812c3c5946f18985f99b42a6f | [
"MIT"
] | 4 | 2019-09-16T14:49:53.000Z | 2022-02-02T15:42:01.000Z | from unittest import mock
from unittest.mock import MagicMock
import requests
from hamcrest import assert_that, equal_to, is_
from selenium.webdriver.common.by import By
from tests.unit.unit_test_utils import check_mocked_functions_called
from uitestcore.finder import Finder
from uitestcore.interrogator import Interrog... | 37.398957 | 116 | 0.764302 |
338aa956479799942fec2a42a14cb42cb10d25ba | 6,540 | py | Python | zerver/lib/bugdown/testing_mocks.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2021-02-13T20:43:29.000Z | 2021-02-13T20:43:29.000Z | zerver/lib/bugdown/testing_mocks.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 9 | 2021-02-08T20:22:39.000Z | 2022-02-11T03:40:19.000Z | zerver/lib/bugdown/testing_mocks.py | tobby2002/zulip | 66e7c455759f9368bae16b9a604cf63f8e3524cd | [
"Apache-2.0"
] | 1 | 2021-04-09T05:50:23.000Z | 2021-04-09T05:50:23.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from six import text_type
from typing import Any, Dict, Optional
import ujson
NORMAL_TWEET = """{
"created_at": "Sat Sep 10 22:23:38 +0000 2011",
"id_str": "112652479837110273",
"in_reply_to_user_id_str": "783214",
"text": "@twitt... | 33.538462 | 129 | 0.630428 |
338ab3bf4e1b4d892a45de98d6984d1ab936ca64 | 3,630 | py | Python | drivers/measure_gaiaeso_Li_EWs.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | drivers/measure_gaiaeso_Li_EWs.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | drivers/measure_gaiaeso_Li_EWs.py | lgbouma/earhart | 1d2b65d58655725f43c1bf9705b897bf767d4ca1 | [
"MIT"
] | null | null | null | """
Given _manually downloaded_ GAIA ESO DR4 spectra (from
get_gaia_eso_dr4_spectra.py -> running wget), measure the Li EWs.
"""
from earhart.paths import DATADIR, RESULTSDIR
import os
from glob import glob
import pandas as pd, numpy as np, matplotlib.pyplot as plt
from astropy.io import fits
from cdips_followup.spect... | 31.565217 | 111 | 0.686777 |
338acd7ae836254c96f496bfd94a04bfa8fe0c6a | 14,000 | py | Python | MesaModel/model/SimModel.py | DurhamARC/classroom-abm | cc5121e8cbac65fdc79e16c59bcf105365445434 | [
"MIT"
] | 1 | 2022-03-24T20:34:30.000Z | 2022-03-24T20:34:30.000Z | MesaModel/model/SimModel.py | DurhamARC/classroom-abm | cc5121e8cbac65fdc79e16c59bcf105365445434 | [
"MIT"
] | 80 | 2020-10-19T09:14:55.000Z | 2022-03-30T22:21:20.000Z | MesaModel/model/SimModel.py | DurhamARC/classroom-abm | cc5121e8cbac65fdc79e16c59bcf105365445434 | [
"MIT"
] | 2 | 2020-11-05T19:39:32.000Z | 2022-03-04T12:39:18.000Z | import dataclasses
import datetime
import logging
import math
import numpy as np
from mesa import Model
from mesa.datacollection import DataCollector
from mesa.space import SingleGrid
from mesa.time import RandomActivation
from .data_types import PupilLearningState, ModelParamType
from .Pupil import Pupil
from .trunc... | 37.234043 | 110 | 0.609143 |
338ad24052876d1f74cb49c5b1a36c5d0d049e9c | 346 | py | Python | tests/flows/test_timeout.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | 1 | 2022-03-10T03:56:49.000Z | 2022-03-10T03:56:49.000Z | tests/flows/test_timeout.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | tests/flows/test_timeout.py | hohe/siliconcompiler | 497f272c87c8f247dcd29db76c8d6ed0c0939e50 | [
"Apache-2.0"
] | null | null | null | import pytest
@pytest.mark.eda
def test_timeout(gcd_chip):
# 0 seconds guarantees a timeout
gcd_chip.set('flowgraph', 'asicflow', 'import', '0', 'timeout', 0)
# Expect that command exits early
# TODO: automated check that run timed out vs failed for a different reason
with pytest.raises(SystemExit... | 28.833333 | 79 | 0.696532 |
338aecd4d817ba45c8aa779f3776f75344f275ad | 628 | py | Python | netbox_prometheus_sd/tests/utils.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | netbox_prometheus_sd/tests/utils.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | netbox_prometheus_sd/tests/utils.py | feuri/netbox-plugin-prometheus-sd | 0a294748541662cf0ce1dd87e2bc2462476312a4 | [
"MIT"
] | null | null | null | from ipam.models import IPAddress
from virtualization.models import VirtualMachine, VMInterface
from django.contrib.contenttypes.models import ContentType
def create_vm(name, address, cluster, tenant):
vm = VirtualMachine.objects.create(name=name, cluster=cluster, tenant=tenant)
ip = IPAddress.objects.create... | 31.4 | 81 | 0.773885 |
338afc1ae9fab34ed926bb51109b317c30eed77e | 8,377 | py | Python | datawinners/accountmanagement/migrations/0013_auto__del_field_ngouserprofile_office_phone__del_field_ngouserprofile_.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/accountmanagement/migrations/0013_auto__del_field_ngouserprofile_office_phone__del_field_ngouserprofile_.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/accountmanagement/migrations/0013_auto__del_field_ngouserprofile_office_phone__del_field_ngouserprofile_.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # 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 'NGOUserProfile.office_phone'
db.delete_column('accountmanagement_ngouserprofile', 'offic... | 66.484127 | 182 | 0.576937 |
338b06c5698d93f6449c1eae65d363e8d234c949 | 4,926 | py | Python | src/olympia/amo/tests/test_celery.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/amo/tests/test_celery.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/amo/tests/test_celery.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | import importlib
import time
import datetime
from datetime import timedelta
from unittest import mock
from django.conf import settings
from django.core.signals import request_finished, request_started
from django.test.testcases import TransactionTestCase
from post_request_task.task import _discard_tasks, _stop_queui... | 31.780645 | 77 | 0.709704 |
338b1c1343630bf0c81efb4ebe1885c6260ec351 | 102,636 | py | Python | scipy/special/tests/test_basic.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | scipy/special/tests/test_basic.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | scipy/special/tests/test_basic.py | disqus/scipy | 2619f0ca030b2bcf630ddd9a33f48c588cf4fcea | [
"BSD-3-Clause"
] | null | null | null | #this program corresponds to special.py
### Means test is not done yet
#E Means test is giving error (E)
#F Means test is failing (F)
#EF Means test is giving error and Failing
#! Means test is segfaulting
#8 Means test runs forever
### test_besselpoly
### test_mathieu_a
### test_mathieu_even_coef
### te... | 40.29682 | 110 | 0.538378 |
338b52a7c01474ae5d1a8e2692541208522ca112 | 8,069 | py | Python | eegip/path.py | christian-oreilly/eegip | 521a408b65ec99b11ca7903f67288807704015e4 | [
"BSD-3-Clause"
] | null | null | null | eegip/path.py | christian-oreilly/eegip | 521a408b65ec99b11ca7903f67288807704015e4 | [
"BSD-3-Clause"
] | null | null | null | eegip/path.py | christian-oreilly/eegip | 521a408b65ec99b11ca7903f67288807704015e4 | [
"BSD-3-Clause"
] | null | null | null | import os
from eegip.config import eegip_config
from parse import Parser
from parse_type import TypeBuilder
from warnings import warn
class FormatStr(str):
def __format__(self, _):
return self
def format_dict(dic):
return {key: FormatStr(val) for key, val in dic.items()}
def with_zero_or_one(cls, ... | 38.061321 | 119 | 0.65448 |
338b5ec6c9e72406ba16e53738f5fea5c9ae6662 | 3,625 | py | Python | experiments/ashvin/contexts/rig/pusher/pretrained1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/contexts/rig/pusher/pretrained1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/contexts/rig/pusher/pretrained1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.contextual_rig_launcher_util import (
goal_conditioned_sac_experiment, process_args
)
from rlkit.launchers.launcher_util import run_experiment
from rlkit.launchers.arglauncher import run_variants
from multiworld.envs.mujoco.cameras import sawyer_init_cam... | 32.079646 | 80 | 0.582621 |
338b638cbb193f3a894d142315d66d2a49d65633 | 1,090 | py | Python | scripts/export_diet_dataset.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 3 | 2021-03-23T14:23:06.000Z | 2021-12-29T16:54:42.000Z | scripts/export_diet_dataset.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 29 | 2021-02-22T12:12:53.000Z | 2021-09-27T10:52:25.000Z | scripts/export_diet_dataset.py | deng113jie/ExeTeraCovid | ee9ec90983d7c2c711962c7fe9ac25251392e41b | [
"Apache-2.0"
] | 1 | 2021-03-08T15:00:30.000Z | 2021-03-08T15:00:30.000Z | #!/usr/bin/env python
import argparse
from exetera.core.utils import Timer
from exetera.core.session import Session
from exeteracovid.scripts.export_diet_data_to_csv import export_diet_data_to_csv
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', required=Tr... | 47.391304 | 115 | 0.711009 |
338b63e27676b832391253957b9f76c90a02312c | 6,794 | py | Python | services/binary_writer/service.py | FirebirdSQL/saturnin-core | bf6c67acdf70a905da51651041d5ddf2fed0c59f | [
"MIT"
] | 1 | 2021-03-04T21:50:19.000Z | 2021-03-04T21:50:19.000Z | services/binary_writer/service.py | FirebirdSQL/saturnin-core | bf6c67acdf70a905da51651041d5ddf2fed0c59f | [
"MIT"
] | null | null | null | services/binary_writer/service.py | FirebirdSQL/saturnin-core | bf6c67acdf70a905da51651041d5ddf2fed0c59f | [
"MIT"
] | null | null | null | #coding:utf-8
#
# PROGRAM/MODULE: Saturnin microservices
# FILE: binary_writer/service.py
# DESCRIPTION: Binary data file writer microservice
# CREATED: 05.01.2021
#
# The contents of this file are subject to the MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a... | 44.116883 | 115 | 0.664263 |
338b6c0223684ff56d0a0ea9649cdc69cba70601 | 3,638 | py | Python | tests/test_set_zarr_product_extra_dim.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | tests/test_set_zarr_product_extra_dim.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | tests/test_set_zarr_product_extra_dim.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | """Test zarrify cli tool."""
from pathlib import Path
import pytest
import click
from click.testing import CliRunner
from datacube_zarr.tools.set_zarr_product_extra_dim import ZarrPath, cli
def test_zarr_path(zarr_with_group):
"""Test ZarrPath click param."""
p, g = ZarrPath(exists=True).convert(zarr_with_... | 24.748299 | 88 | 0.712754 |
338b92516af241c6a07a427371611e35b227eacf | 9,955 | py | Python | hifi-gan/models.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | 1 | 2022-03-14T13:06:48.000Z | 2022-03-14T13:06:48.000Z | hifi-gan/models.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | hifi-gan/models.py | sarmilaupadhyaya/MultiSpeaker-TTS-V1 | 4b6351f74145f254521e4946e10fa646d6ec197c | [
"MIT"
] | null | null | null | """ from https://github.com/jik876/hifi-gan """
import torch
import torch.nn.functional as F
import torch.nn as nn
from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d
from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm
from xutils import init_weights, get_padding
LRELU_SLOPE = 0.1
... | 34.807692 | 107 | 0.567554 |
338b93b6420f5487a22c8d5f0680abff469c4816 | 475 | py | Python | PedSimulation/gui/drawer/scene_drawer.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | 1 | 2018-08-15T17:42:58.000Z | 2018-08-15T17:42:58.000Z | PedSimulation/gui/drawer/scene_drawer.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | null | null | null | PedSimulation/gui/drawer/scene_drawer.py | HDL951236874/PedSimulation | 153882289477c93306c38f9e3a41f9cfeb53f261 | [
"Apache-2.0"
] | null | null | null | # TODO write docs
class SceneDrawer(object):
def __init__(self, device, register):
self.device = device
self.background_color = "black"
self.entity_register = register
def draw(self, scene):
for entity in scene.entities:
if entity.drawer is not None:
... | 26.388889 | 63 | 0.602105 |
338bab907afbcf6251ce106a2ead078148c93e76 | 892 | py | Python | services/traction/acapy_wrapper/models/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_wrapper/models/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_wrapper/models/get_did_verkey_response.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class GetDIDVerkeyResponse(BaseModel):
"""NOTE: This ... | 26.235294 | 96 | 0.701794 |
338bcb272f43bb180d89a7539ff28dec4b55a8da | 1,135 | py | Python | src/workflows/services/sample_consumer.py | ndevenish/python-workflows | 48cd9f7c6a26e03d73d4d19125910a7f583eba12 | [
"BSD-3-Clause"
] | null | null | null | src/workflows/services/sample_consumer.py | ndevenish/python-workflows | 48cd9f7c6a26e03d73d4d19125910a7f583eba12 | [
"BSD-3-Clause"
] | null | null | null | src/workflows/services/sample_consumer.py | ndevenish/python-workflows | 48cd9f7c6a26e03d73d4d19125910a7f583eba12 | [
"BSD-3-Clause"
] | null | null | null | import json
import time
from workflows.services.common_service import CommonService
class SampleConsumer(CommonService):
"""An example service building on top of the workflow.services architecture,
demonstrating how this architecture can be used.
This service consumes messages off a queue."""
# Huma... | 30.675676 | 86 | 0.605286 |
338c0cf3a3ed8aff8fead21427de315a83f646b5 | 3,950 | py | Python | modules_th/ucfcrimes_unsup.py | ThesisSlayers/thesis | 415645db943103c06dcc17e5349d1d4f8fd365cc | [
"Apache-2.0"
] | null | null | null | modules_th/ucfcrimes_unsup.py | ThesisSlayers/thesis | 415645db943103c06dcc17e5349d1d4f8fd365cc | [
"Apache-2.0"
] | 2 | 2021-05-20T22:03:22.000Z | 2021-09-28T05:38:44.000Z | modules_th/ucfcrimes_unsup.py | ThesisSlayers/thesis | 415645db943103c06dcc17e5349d1d4f8fd365cc | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: UCF_Crimes_Unsupervised.ipynb (unless otherwise specified).
__all__ = ['read_data', 'sometimes', 'wrapVideo', 'unsuplabel', 'get_dsets', 'get_dls', 'setup_log', 'get_learner',
'save_learner']
# Cell
#import torch
import torch.nn as nn
from fastai.vision.all impor... | 28.417266 | 123 | 0.670633 |
338c20b40a68f5d5c334b57cc5c9f713e6ba3deb | 3,027 | py | Python | models/biswal.py | sleepstagingrest/rest | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 18 | 2020-02-03T07:14:40.000Z | 2021-12-20T18:45:43.000Z | models/biswal.py | sleepstagingrest/rest | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 11 | 2020-01-28T23:16:25.000Z | 2022-02-10T01:04:56.000Z | models/biswal.py | sleepstagingrest/REST | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 2 | 2020-08-20T08:15:09.000Z | 2021-02-23T07:30:40.000Z | import torch
import torch.nn as nn
class FilterBlock(nn.Module):
def __init__(self):
super(FilterBlock, self).__init__()
self.conv1 = nn.Conv1d(in_channels=1, out_channels=256, kernel_size=100, stride=1, padding=1)
self.bn1 = nn.BatchNorm1d(256)
self.relu1 = nn.ReLU(inpl... | 29.676471 | 120 | 0.599604 |
338c26e193d49973297c3f570d25e5d37c24082b | 3,882 | py | Python | intersight/models/iam_domain_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_domain_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_domain_group_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamDomainGroupList(object):
"""
NOTE: This cl... | 25.207792 | 83 | 0.553065 |
338c29faea2ae3b96fe313c732bb471358bf86a1 | 3,886 | py | Python | tests/handling/test_retrying_limits.py | ankitdobhal/kopf | 2765eda2a08e7e42195446cc23f02ba91603db53 | [
"MIT"
] | null | null | null | tests/handling/test_retrying_limits.py | ankitdobhal/kopf | 2765eda2a08e7e42195446cc23f02ba91603db53 | [
"MIT"
] | null | null | null | tests/handling/test_retrying_limits.py | ankitdobhal/kopf | 2765eda2a08e7e42195446cc23f02ba91603db53 | [
"MIT"
] | null | null | null | import asyncio
import logging
import freezegun
import pytest
import kopf
from kopf.reactor.processing import process_resource_event
from kopf.structs.containers import ResourceMemories
from kopf.structs.handlers import HANDLER_REASONS, Reason
from kopf.structs.memos import Memo
# The timeout is hard-coded in confte... | 34.087719 | 86 | 0.668039 |
338c2ab5530aee97ec10877d618d12d426ed6b5e | 2,237 | py | Python | my_configs/_base_/datasets/det_visdrone_add_val_p3.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | my_configs/_base_/datasets/det_visdrone_add_val_p3.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | my_configs/_base_/datasets/det_visdrone_add_val_p3.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | dataset_type = 'VisdroneDataset'
classes = ('pedestrian', 'people', 'bicycle', 'car', 'van', 'truck', 'tricycle', 'awning-tricycle', 'bus', 'motor')
data_root = '/data/data1/lishuai/VisDrone2019/'
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
d... | 34.953125 | 115 | 0.618239 |
338c33ce48af0c9915c872c5daf9de795b30f245 | 467 | py | Python | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage0.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 136 | 2020-08-24T08:18:16.000Z | 2022-03-31T13:45:12.000Z | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage0.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 5 | 2020-10-07T08:44:36.000Z | 2021-12-17T06:00:57.000Z | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage0.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 28 | 2020-08-24T11:07:07.000Z | 2022-01-01T13:07:54.000Z | _base_ = [
"../_base_/models/universe_r101_gfl.py",
"../_base_/datasets/wheat_detection_mstrain_hard.py",
"../_base_/schedules/schedule_4x.py",
"../_base_/default_runtime.py",
]
data = dict(samples_per_gpu=6)
optimizer = dict(lr=0.03)
optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=35, n... | 35.923077 | 103 | 0.760171 |
338c4aeb86315ad89adab7db3bc2335006504796 | 611 | py | Python | scvi/compose/__init__.py | jacobhepkema/scvi-tools | 83e312e30515df97fe2d55dea915c3e23bf97563 | [
"BSD-3-Clause"
] | null | null | null | scvi/compose/__init__.py | jacobhepkema/scvi-tools | 83e312e30515df97fe2d55dea915c3e23bf97563 | [
"BSD-3-Clause"
] | null | null | null | scvi/compose/__init__.py | jacobhepkema/scvi-tools | 83e312e30515df97fe2d55dea915c3e23bf97563 | [
"BSD-3-Clause"
] | null | null | null | from ._base_components import (
Decoder,
DecoderSCVI,
DecoderTOTALVI,
Encoder,
EncoderTOTALVI,
FCLayers,
LinearDecoderSCVI,
MultiDecoder,
MultiEncoder,
)
from ._base_module import BaseModuleClass, LossRecorder
from ._decorators import auto_move_data
from ._utils import one_hot # Do ... | 19.709677 | 55 | 0.672668 |
338c8400664ac71fa4af08e0cba072002c9e291c | 32,746 | py | Python | edb/schema/functions.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/schema/functions.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | edb/schema/functions.py | aeros/edgedb | db8c240d1607765799caf124a4b418250e0c0a96 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 34.542194 | 79 | 0.601631 |
338ca5ab44167a3e01dbd4fe331e9f3fc6efdabd | 5,606 | py | Python | asposewordscloud/models/requests/get_table_row_format_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/requests/get_table_row_format_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/requests/get_table_row_format_request.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="get_table_row_format_request.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a... | 43.796875 | 127 | 0.641277 |
338ccfb50801f404d437d929b97daabaefc120d4 | 3,015 | py | Python | artemis/plotting/demo_dbplot.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 235 | 2016-08-26T14:18:51.000Z | 2022-03-13T10:54:39.000Z | artemis/plotting/demo_dbplot.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 112 | 2016-04-30T11:48:38.000Z | 2021-01-12T20:17:32.000Z | artemis/plotting/demo_dbplot.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 31 | 2016-11-05T19:09:19.000Z | 2021-09-13T07:35:40.000Z | from functools import partial
from artemis.plotting.db_plotting import dbplot, hold_dbplots, set_dbplot_figure_size
import numpy as np
from artemis.plotting.matplotlib_backend import MovingPointPlot
from six.moves import input, xrange
import time
__author__ = 'peter'
def demo_dbplot(n_frames = 1000):
"""
Dem... | 45 | 174 | 0.621891 |
338cd5a47befd7dd5f1e6eb0b4cd0395a0cd1af7 | 6,529 | py | Python | alipay/aop/api/domain/AlipayFundTransEntrustTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayFundTransEntrustTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayFundTransEntrustTransferModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.Participant import Participant
from alipay.aop.api.domain.Participant import Participant
class AlipayFundTransEntrustTransferModel(object):
def __init__(self):
self._... | 32.809045 | 83 | 0.608516 |
338d5c40d3da1f39e968d9023854336f2902bee8 | 79 | py | Python | src/nlplib/core/control/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | 1 | 2015-11-18T12:59:52.000Z | 2015-11-18T12:59:52.000Z | src/nlplib/core/control/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | src/nlplib/core/control/__init__.py | rectangletangle/nlplib | 7dcc0daf050a73c03b7d7f0257ad0b862586a6e3 | [
"BSD-2-Clause"
] | null | null | null | ''' This package contains machine learning algorithms specific to the core. ''' | 79 | 79 | 0.772152 |
338d5f95b2eea5fa8dcb9b8f4afc915303898929 | 4,311 | py | Python | lambda_gateway/event_proxy.py | amancevice/python-lambda-gateway | 2dd27c2b80d1c2a8fdb2a9fbf786c8b168190779 | [
"MIT"
] | 7 | 2020-05-15T05:33:08.000Z | 2021-11-12T18:00:29.000Z | lambda_gateway/event_proxy.py | amancevice/python-lambda-gateway | 2dd27c2b80d1c2a8fdb2a9fbf786c8b168190779 | [
"MIT"
] | 6 | 2021-02-02T22:50:19.000Z | 2022-01-21T23:34:48.000Z | lambda_gateway/event_proxy.py | amancevice/python-lambda-gateway | 2dd27c2b80d1c2a8fdb2a9fbf786c8b168190779 | [
"MIT"
] | 2 | 2021-05-10T09:14:01.000Z | 2021-11-12T12:45:47.000Z | import asyncio
import importlib
import json
import os
import sys
from lambda_gateway import (lambda_context, logger)
class EventProxy:
def __init__(self, handler, base_path, timeout=None):
self.base_path = base_path
self.handler = handler
self.timeout = timeout
def get_handler(self):... | 34.766129 | 78 | 0.595685 |
338d6535d92b86cc6c7a72607b750544a6ca2e49 | 1,066 | py | Python | sdks/python/test/test_DistributionGroupWithoutIsLatest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_DistributionGroupWithoutIsLatest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_DistributionGroupWithoutIsLatest.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 26.65 | 127 | 0.756098 |
338dd052c9d289778491939c17105e1171081a5b | 2,378 | py | Python | examples/plots/plot_arrows.py | abhijith-git/mplsoccer | 7359ed83117cb6f191f82c44fe953eb421395695 | [
"MIT"
] | 1 | 2021-05-20T16:31:21.000Z | 2021-05-20T16:31:21.000Z | examples/plots/plot_arrows.py | eddwebster/mplsoccer | eb260bc9ab8a94473b4082d922ed490ce11e7982 | [
"MIT"
] | null | null | null | examples/plots/plot_arrows.py | eddwebster/mplsoccer | eb260bc9ab8a94473b4082d922ed490ce11e7982 | [
"MIT"
] | null | null | null | """
=======================
Pass plot using arrrows
=======================
This example shows how to plot all passes from a team in a match as arrows.
"""
from mplsoccer.pitch import Pitch
from mplsoccer.statsbomb import read_event, EVENT_SLUG
from matplotlib import rcParams
rcParams['text.color'] = '#c7d5cc' # se... | 37.15625 | 105 | 0.608495 |
338df12084193f83cff8c57aee7c1c00128ba9e1 | 3,061 | py | Python | djangocms_versioning/monkeypatch/page.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/monkeypatch/page.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/monkeypatch/page.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | from django.apps import apps
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.dispatch import receiver
from cms import api
from cms.models import pagemodel, titlemodels
from cms.operations import ADD_PAGE_TRANSLATION, CHANGE_PAGE_TRANSLATION
from cms... | 34.011111 | 97 | 0.722313 |
338e0d1181975c4289c63f953117d698f834e7e9 | 8,379 | py | Python | fluidlab/objects/raspberrypi/torque.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | 4 | 2020-01-19T04:12:12.000Z | 2021-11-09T08:30:25.000Z | fluidlab/objects/raspberrypi/torque.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | fluidlab/objects/raspberrypi/torque.py | fluiddyn/fluidlab | 77e7ae3129788089814e38eba93802026a07fcf6 | [
"CECILL-B"
] | null | null | null | """Torque measurements (:mod:`fluidlab.objects.raspberrypi.torque`)
===================================================================
Handle measurement, saving, loading and plotting of torque measured by
a gain strain using a Raspberry Pi.
"""
from __future__ import division, print_function
import os
import num... | 30.032258 | 79 | 0.588495 |
338e2d264703ba579d90b41016a79451a48b5490 | 2,717 | py | Python | business_rules/variables.py | liumanman/business-rules | e8bfece2d6295fe00bdca3b0ba6f54a62e55b69f | [
"MIT"
] | null | null | null | business_rules/variables.py | liumanman/business-rules | e8bfece2d6295fe00bdca3b0ba6f54a62e55b69f | [
"MIT"
] | null | null | null | business_rules/variables.py | liumanman/business-rules | e8bfece2d6295fe00bdca3b0ba6f54a62e55b69f | [
"MIT"
] | null | null | null | import inspect
from functools import wraps
from .utils import fn_name_to_pretty_label
from .operators import (
BaseType,
NumericType,
StringType,
BooleanType,
SelectType,
SelectMultipleType,
JmesPathType,
)
class BaseVariables(object):
""" Classes that hold a collection of variables to... | 31.593023 | 152 | 0.675745 |
338e4cbe12f0c770aad4fdadb6d7d6ffb6e12f8c | 906 | py | Python | cms/old_migrations_21_sep/0012_auto_20170904_1611.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations_21_sep/0012_auto_20170904_1611.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | cms/old_migrations_21_sep/0012_auto_20170904_1611.py | Ibrahem3amer/bala7 | 70638c121ea85ff0e6a650c5f2641b0b3b04d6d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-09-04 16:11
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0011_usercomment_status'),
]
operations = [
migrations.AlterField(
... | 25.166667 | 50 | 0.560706 |
338e692a04860edf2926b1a8e8260048bd81fdc1 | 10,491 | py | Python | rbac/common/sawtooth/batcher.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/sawtooth/batcher.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | null | null | null | rbac/common/sawtooth/batcher.py | knagware9/sawtooth-next-directory | be80852e08d2b27e105d964c727509f2a974002d | [
"Apache-2.0"
] | 1 | 2018-12-07T10:55:08.000Z | 2018-12-07T10:55:08.000Z | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 37.467857 | 88 | 0.691354 |
338e71bf116dc96826f29e69aac725e3097ee7cf | 250 | py | Python | src/unable_to_play_error.py | willjwon/isye6739-project-summer-2021 | 05b6621fb09fa55c5351482d145f196b57321351 | [
"MIT"
] | null | null | null | src/unable_to_play_error.py | willjwon/isye6739-project-summer-2021 | 05b6621fb09fa55c5351482d145f196b57321351 | [
"MIT"
] | null | null | null | src/unable_to_play_error.py | willjwon/isye6739-project-summer-2021 | 05b6621fb09fa55c5351482d145f196b57321351 | [
"MIT"
] | null | null | null | from enum import IntEnum
class PlayErrorCode(IntEnum):
PLAYER_HAS_NOT_ENOUGH_COIN = 1
POT_HAS_NOT_ENOUGH_COIN = 2
class UnableToPlayError(Exception):
def __init__(self, error_code: PlayErrorCode):
self.error_code = error_code
| 20.833333 | 50 | 0.76 |
338e7a362e5fe9872bbae67071905179fc120d6d | 1,782 | py | Python | redash/handlers/static.py | steedos/redash | 46d954843f229d74b5712384e74b4b0fdcef621b | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | redash/handlers/static.py | steedos/redash | 46d954843f229d74b5712384e74b4b0fdcef621b | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | redash/handlers/static.py | steedos/redash | 46d954843f229d74b5712384e74b4b0fdcef621b | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-07-27T06:27:29.000Z | 2021-07-27T06:27:29.000Z | import hashlib
import json
from flask import render_template, send_from_directory, current_app
from flask_login import current_user, login_required
from redash import settings, __version__, redis_connection
from redash.wsgi import app
from redash.version_check import get_latest_version
@app.route('/admin/<anything>... | 29.7 | 98 | 0.687991 |
338ea2a1de6ab6f58dea921a83ee98a8c9476b24 | 2,731 | py | Python | kuryr/lib/opts.py | openstack/kuryr | 5b38e84ef8a0a62ee44d53ddd1cda377b0d9d934 | [
"Apache-2.0"
] | 207 | 2015-07-15T01:46:02.000Z | 2022-03-24T10:06:53.000Z | kuryr/lib/opts.py | openstack/kuryr | 5b38e84ef8a0a62ee44d53ddd1cda377b0d9d934 | [
"Apache-2.0"
] | 1 | 2015-10-29T14:59:06.000Z | 2015-10-29T14:59:06.000Z | kuryr/lib/opts.py | openstack/kuryr | 5b38e84ef8a0a62ee44d53ddd1cda377b0d9d934 | [
"Apache-2.0"
] | 58 | 2015-07-22T08:29:32.000Z | 2021-08-11T08:56:11.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 33.716049 | 77 | 0.737825 |
338eae9c03a7e43158637b5d52c1c79508260d14 | 7,766 | py | Python | vtranscoder3d_1.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | null | null | null | vtranscoder3d_1.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | 2 | 2020-04-16T06:08:33.000Z | 2020-04-16T06:08:33.000Z | vtranscoder3d_1.py | 5g-media/mape-translation | 2cca5b9b0880fa4580597eb02ad6006b9fe835e5 | [
"Apache-2.0"
] | null | null | null | import json
import logging.config
import redis
from kafka import KafkaConsumer, KafkaProducer
from kafka.errors import KafkaError
from settings import KAFKA_SERVER, KAFKA_CLIENT_ID, KAFKA_API_VERSION, KAFKA_MONITORING_TOPICS, \
LOGGING, KAFKA_GROUP_ID, KAFKA_TRANSLATION_TOPIC, REDIS_HOST, REDIS_PORT, REDIS_NFVI_DB,... | 37.516908 | 100 | 0.660185 |
338edc59cd30f3135e59b32024740886fa93c603 | 5,700 | py | Python | category_web_scraping/web_scraping_imdb_data_analytics/imdb_data_analytics.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | 2 | 2020-07-23T19:32:58.000Z | 2020-10-24T20:54:09.000Z | category_web_scraping/web_scraping_imdb_data_analytics/imdb_data_analytics.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | null | null | null | category_web_scraping/web_scraping_imdb_data_analytics/imdb_data_analytics.py | Anshul-GH/upwork_projects | 600c2ccf79e5ed5cf962f1ae05c59f18ad411f63 | [
"MIT"
] | 1 | 2021-07-11T14:41:04.000Z | 2021-07-11T14:41:04.000Z | from requests import get
from bs4 import BeautifulSoup
from config import get_config
from datetime import datetime
import pandas as pd
from time import time
from time import sleep
from random import randint
import matplotlib.pyplot as plt
import os
# setup the default file lookup location to cwd
__location__ = os.path... | 34.545455 | 110 | 0.659825 |
338eebbb25ac492746badbdbfd60ddbc066cb6c9 | 2,154 | py | Python | apps/vdt4/run_wxt_test.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2020-06-03T15:59:50.000Z | 2020-12-21T11:11:57.000Z | apps/vdt4/run_wxt_test.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | null | null | null | apps/vdt4/run_wxt_test.py | OSADP/Pikalert-Vehicle-Data-Translator- | 295da604408f6f13af0301b55476a81311459386 | [
"Apache-2.0"
] | 2 | 2019-10-02T06:47:23.000Z | 2020-02-02T18:32:23.000Z | #!/usr/bin/env python
""""""
import os
import time
import tim
Road_segment_file = "/d1/gerry/wxt_test/20130214/I81_segments.nc"
def wxt_file_parse(fname):
first_period = fname.find(".")
base_name = fname[0:first_period]
second_period = first_period + 9
yyyymmdd = fname[first_period+1:second_period]
... | 39.888889 | 254 | 0.655525 |
338ef08c98d8bf35fc739f20ffe8fba5ab268aeb | 26,255 | py | Python | lib/galaxy/webapps/tool_shed/controllers/upload.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/tool_shed/controllers/upload.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/webapps/tool_shed/controllers/upload.py | bioinfo-center-pasteur-fr/galaxy-pasteur | 0be2c0194ce9615d9efa08affc0e6735b656855a | [
"CC-BY-3.0"
] | null | null | null | import logging
import os
import shutil
import tarfile
import tempfile
import urllib
from galaxy import util
from galaxy import web
from galaxy.datatypes import checkers
from galaxy.web.base.controller import BaseUIController
from tool_shed.util.web_util import escape
from tool_shed.dependencies import attribute_handl... | 63.417874 | 138 | 0.495982 |
338ef0f9278bdcca28ee47762ca99b8e41b8990d | 2,231 | py | Python | tests/test_plots.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 3 | 2020-02-28T10:25:39.000Z | 2021-04-13T07:18:35.000Z | tests/test_plots.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 36 | 2019-12-03T17:33:29.000Z | 2022-02-18T10:39:25.000Z | tests/test_plots.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 6 | 2019-08-22T16:01:34.000Z | 2020-08-25T09:57:17.000Z | """
tests for plotting
"""
#-----------------------------------------------------------------------------
# Copyright (c) ytree development team. All rights reserved.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#------... | 26.247059 | 78 | 0.543254 |
338f1aede046d203a3185e69874f9170ade26647 | 15,291 | py | Python | tests/dopamine/jax/agents/dqn/dqn_agent_test.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | 2 | 2020-06-04T11:40:42.000Z | 2020-06-04T11:40:49.000Z | tests/dopamine/jax/agents/dqn/dqn_agent_test.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | null | null | null | tests/dopamine/jax/agents/dqn/dqn_agent_test.py | h8go/eye_tracking_rl | df84ab585b714ba7ca9cdaf634b066020f9feaf4 | [
"Apache-2.0"
] | 1 | 2020-06-27T15:19:15.000Z | 2020-06-27T15:19:15.000Z | # coding=utf-8
# Copyright 2018 The Dopamine Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 42.240331 | 80 | 0.705251 |
338f2630b3ce7b4caceb8801a21c94d1f131a4d4 | 5,912 | py | Python | tasks/mask_discriminator_task.py | TeodorMoiseev/maskgan-seq2seq | a164726c5aff499ce19a3882139dde246641ed7f | [
"MIT"
] | 2 | 2020-02-05T03:39:15.000Z | 2020-03-04T03:27:56.000Z | tasks/mask_discriminator_task.py | henceforth1984/maskgan-seq2seq | a164726c5aff499ce19a3882139dde246641ed7f | [
"MIT"
] | 1 | 2020-08-11T08:43:31.000Z | 2020-08-11T08:43:31.000Z | tasks/mask_discriminator_task.py | henceforth1984/maskgan-seq2seq | a164726c5aff499ce19a3882139dde246641ed7f | [
"MIT"
] | 1 | 2020-02-05T03:45:54.000Z | 2020-02-05T03:45:54.000Z | from fairseq import utils
from fairseq.tasks import register_task
from fairseq.sequence_generator import SequenceGenerator
import torch
from tasks.mask_mle_task import MaskMLETask
@register_task("mask_discriminator")
class MaskDiscriminatorTask(MaskMLETask):
def __init__(self, *args, **kwargs):
super().... | 38.640523 | 120 | 0.581191 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.