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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794737c2f1e4f82e7101097d981eb921626ef01a | 7,886 | py | Python | dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py | robertoea/airflow | e0389c0d476ebf24ca795962e087f5c678c6c416 | [
"Apache-2.0"
] | null | null | null | dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py | robertoea/airflow | e0389c0d476ebf24ca795962e087f5c678c6c416 | [
"Apache-2.0"
] | null | null | null | dev/breeze/src/airflow_breeze/build_image/prod/build_prod_image.py | robertoea/airflow | e0389c0d476ebf24ca795962e087f5c678c6c416 | [
"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 (the
# "License"); you may not u... | 42.171123 | 110 | 0.731423 |
794738ea585b5a400bc7bbf40914ef2fd1949e3c | 3,000 | py | Python | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | tsungjui/fusionline | 26d5d41e82ac83822ba41df1cd14c54afa112655 | [
"CC-BY-3.0"
] | 1 | 2019-11-03T11:45:43.000Z | 2019-11-03T11:45:43.000Z | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | tsungjui/fusionline | 26d5d41e82ac83822ba41df1cd14c54afa112655 | [
"CC-BY-3.0"
] | 4 | 2017-05-24T19:36:34.000Z | 2019-08-23T02:49:18.000Z | scripts/tool_shed/show_tool_dependency_installation_dir_contents.py | abretaud/galaxy | 1ad89511540e6800cd2d0da5d878c1c77d8ccfe9 | [
"CC-BY-3.0"
] | null | null | null | import argparse
import os
import sys
sys.path.insert(1, os.path.join( os.path.dirname( __file__ ), os.pardir, os.pardir, 'lib' ) )
import galaxy.config as galaxy_config
import galaxy.model
import galaxy.model.tool_shed_install.mapping as install_mapper
class CleanUpDependencyApplication( object ):
"""Applicatio... | 40.540541 | 115 | 0.647667 |
7947390bf4953b970f2f05aec02dce3c55df7142 | 5,061 | py | Python | src/podcastClasses.py | jlhourENSAE/podcast-app | 9d92165f79aed2b87702d30a1ae0cc9d94059d37 | [
"MIT"
] | null | null | null | src/podcastClasses.py | jlhourENSAE/podcast-app | 9d92165f79aed2b87702d30a1ae0cc9d94059d37 | [
"MIT"
] | 3 | 2021-04-11T19:23:45.000Z | 2021-04-18T19:04:05.000Z | src/podcastClasses.py | jlhourENSAE/podcast-app | 9d92165f79aed2b87702d30a1ae0cc9d94059d37 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Define the podcast objects
Created on Sat Apr 10 21:10:06 2021
@author: jeremylhour
"""
import yaml
import feedparser
import time
from datetime import datetime
from tinydb import Query
from src.database import getDataBase
# --------------------------
# Object clas... | 27.356757 | 93 | 0.571429 |
79473978313615c383a995dadf7b25fe16e7ddac | 5,072 | py | Python | extractor.py | jan-gerling/code2vec | 504ad6772f681c09cfe4864624c3553d0ee26dc4 | [
"MIT"
] | null | null | null | extractor.py | jan-gerling/code2vec | 504ad6772f681c09cfe4864624c3553d0ee26dc4 | [
"MIT"
] | null | null | null | extractor.py | jan-gerling/code2vec | 504ad6772f681c09cfe4864624c3553d0ee26dc4 | [
"MIT"
] | null | null | null | import os
import time
from py4j.java_gateway import JavaGateway, GatewayParameters
class Extractor:
def __init__(self, config, jar_path, max_path_length, max_path_width):
self.config = config
self.max_path_length = max_path_length
self.max_path_width = max_path_width
self.jar_path =... | 44.491228 | 126 | 0.558951 |
794739d7b1a17f885cf767d02cf06645ed163c20 | 7,987 | py | Python | docs/conf.py | mirzazulfan/nsupdate.info | fdd12e8f47d084969e23517fce4b8efa3212dd9e | [
"BSD-3-Clause"
] | 774 | 2015-01-01T23:24:50.000Z | 2022-03-29T01:40:41.000Z | docs/conf.py | mirzazulfan/nsupdate.info | fdd12e8f47d084969e23517fce4b8efa3212dd9e | [
"BSD-3-Clause"
] | 272 | 2015-01-02T12:23:41.000Z | 2022-02-21T14:18:11.000Z | docs/conf.py | mirzazulfan/nsupdate.info | fdd12e8f47d084969e23517fce4b8efa3212dd9e | [
"BSD-3-Clause"
] | 100 | 2015-03-05T15:11:09.000Z | 2022-03-09T18:39:39.000Z | # -*- coding: utf-8 -*-
#
# nsupdate.info documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 28 02:21:52 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 32.6 | 100 | 0.718042 |
79473a043b362f23e6ca4da702b57ea2448341fd | 663 | py | Python | adv/xander.py | Zeiin/dl | bce5e239dc751baa9266aa5adbe7c8d078d8a9ac | [
"Apache-2.0"
] | null | null | null | adv/xander.py | Zeiin/dl | bce5e239dc751baa9266aa5adbe7c8d078d8a9ac | [
"Apache-2.0"
] | null | null | null | adv/xander.py | Zeiin/dl | bce5e239dc751baa9266aa5adbe7c8d078d8a9ac | [
"Apache-2.0"
] | null | null | null | from core.advbase import *
from slot.a import *
def module():
return Xander
class Xander(Adv):
comment = 'c2+fs'
a3 = ('fs',0.50)
conf = {}
conf['slots.a'] = TSO()+Primal_Crisis()
conf['slots.frostbite.a'] = conf['slots.a']
conf['acl'] = """
`dragon.act('c3 s end')
`s3, n... | 21.387097 | 89 | 0.564103 |
79473c134741fae3ac0e792d8acc9fd9c32902d7 | 2,691 | py | Python | PlotlyandPython/Lessons/(06) Barcharts/Notebooks/Python Scripts/Barcharts (01) - What is a barchart.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(06) Barcharts/Notebooks/Python Scripts/Barcharts (01) - What is a barchart.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null | PlotlyandPython/Lessons/(06) Barcharts/Notebooks/Python Scripts/Barcharts (01) - What is a barchart.py | peternewman22/Python_Courses | 07a798b6f264fc6069eb1205c9d429f00fb54bc5 | [
"MIT"
] | null | null | null |
# coding: utf-8
# # Barcharts (1) - What is a barchart?
#
# In this section we're going to learn how to create barcharts with Plotly. A barchart is used to display categorical data, with the size of the bar representing the quantity (or sometimes proportion) in that particular category. Barcharts make it easy to com... | 58.5 | 606 | 0.765515 |
79473c6409a3ff5078c77ace43099bb2c09fd454 | 23,355 | py | Python | sdk/python/pulumi_azure_native/compute/v20210301/virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20210301/virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/compute/v20210301/virtual_machine_scale_set_vm_extension.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 50.551948 | 1,361 | 0.687091 |
79473cc112c8fd56d993b405b110361d17972fa7 | 1,888 | py | Python | auth-api/src/auth_api/services/documents.py | bsnopek-freshworks/sbc-auth | 871800922461239c7a09225a3d708c79173410f9 | [
"Apache-2.0"
] | null | null | null | auth-api/src/auth_api/services/documents.py | bsnopek-freshworks/sbc-auth | 871800922461239c7a09225a3d708c79173410f9 | [
"Apache-2.0"
] | null | null | null | auth-api/src/auth_api/services/documents.py | bsnopek-freshworks/sbc-auth | 871800922461239c7a09225a3d708c79173410f9 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 33.714286 | 86 | 0.731992 |
79473d6de561bc2bce3c1571e5aba1a6487bafba | 5,111 | py | Python | tests/attacks/inference/attribute_inference/test_baseline.py | Somanji0520/adversarial-robustness-toolbox | e23a686aea861066e42c793a81ea2d6b1efea872 | [
"MIT"
] | null | null | null | tests/attacks/inference/attribute_inference/test_baseline.py | Somanji0520/adversarial-robustness-toolbox | e23a686aea861066e42c793a81ea2d6b1efea872 | [
"MIT"
] | null | null | null | tests/attacks/inference/attribute_inference/test_baseline.py | Somanji0520/adversarial-robustness-toolbox | e23a686aea861066e42c793a81ea2d6b1efea872 | [
"MIT"
] | 1 | 2022-03-03T14:54:45.000Z | 2022-03-03T14:54:45.000Z | # MIT License
#
# Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2021
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
# r... | 43.313559 | 120 | 0.714537 |
79473de28bb296633be3b8479f7f82aefaa21c94 | 413 | py | Python | python/schuelerpraktika/sascha_mueller/Aufgaben/Aufgabe8.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | python/schuelerpraktika/sascha_mueller/Aufgaben/Aufgabe8.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | python/schuelerpraktika/sascha_mueller/Aufgaben/Aufgabe8.py | maximilianharr/code_snippets | 8b271e6fa9174e24200e88be59e417abd5f2f59a | [
"BSD-3-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
# @todo Auch importieren aus anderen Datei klassen.py
import time
import Printme
Printme.printme ("Max muss 50 Euro an Mr.X überweisen, weil er gegen ihn im Wetten\nin einem Online spiel verloren hat."); time.sleep(0.5)
print
Printme.printme ("Nun will er von seinen 100€ 50€ überweisen und zeig... | 34.416667 | 140 | 0.755448 |
79473e575228b13faaa72bc2b7af372503004e18 | 1,086 | py | Python | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cx_alpha.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cx_alpha.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Flight_Dynamics/Dynamic_Stability/Full_Linearized_Equations/Supporting_Functions/cx_alpha.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | ## @ingroup Methods-Flight_Dynamics-Dynamic_Stability-Full_Linearized_Equations-Supporting_Functions
# cx_alpha.py
#
# Created: Jun 2014, A. Wendorff
# Modified: Jan 2016, E. Botero
# ----------------------------------------------------------------------
# Method
# -------------------------------------------------... | 29.351351 | 100 | 0.558932 |
79473eb7dd90bc16799c8050dcb918c7e97779dc | 3,550 | py | Python | test/functional/p2p_feefilter.py | knotcoin/knotcoin | 3f4ade4e2cabf94acd80bc043deec3d9a4209938 | [
"MIT"
] | null | null | null | test/functional/p2p_feefilter.py | knotcoin/knotcoin | 3f4ade4e2cabf94acd80bc043deec3d9a4209938 | [
"MIT"
] | null | null | null | test/functional/p2p_feefilter.py | knotcoin/knotcoin | 3f4ade4e2cabf94acd80bc043deec3d9a4209938 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2017 The Knotcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test processing of feefilter messages."""
from test_framework.mininode import *
from test_framework.t... | 37.765957 | 81 | 0.66 |
79473f330c3770b4db133819b72165ec99f52f50 | 663 | py | Python | env/Lib/site-packages/tests/test_ImageSequenceClip.py | L0dz/auto-post | 91563235a74336e4326a13b142c05c6755e0cf47 | [
"Apache-2.0"
] | null | null | null | env/Lib/site-packages/tests/test_ImageSequenceClip.py | L0dz/auto-post | 91563235a74336e4326a13b142c05c6755e0cf47 | [
"Apache-2.0"
] | 6 | 2019-12-17T13:32:08.000Z | 2021-06-02T00:49:29.000Z | cineBot/lib/python3.6/site-packages/tests/test_ImageSequenceClip.py | furkanalpereny/cineBot | cb93b6fc6ab25ba0601067f54b6824a8462f470d | [
"MIT"
] | null | null | null | import pytest
from moviepy.editor import *
# must have to work on travis-ci
import sys
sys.path.append("tests")
import download_media
def test_download_media(capsys):
with capsys.disabled():
download_media.download()
def test_1():
images=[]
durations=[]
for i in range(5):
durations.app... | 23.678571 | 63 | 0.693816 |
7947401ac29b70588330be8307246d1b8eaee7b9 | 9,096 | py | Python | fbchat/_threads/_group.py | tulir/fbchat | 476b7b0f1c9dc26ab2e515887febf6afcc6b4e91 | [
"BSD-3-Clause"
] | 42 | 2019-04-29T21:02:49.000Z | 2022-03-24T11:49:33.000Z | fbchat/_threads/_group.py | tulir/fbchat | 476b7b0f1c9dc26ab2e515887febf6afcc6b4e91 | [
"BSD-3-Clause"
] | 27 | 2019-11-21T08:50:05.000Z | 2021-01-07T09:39:38.000Z | fbchat/_threads/_group.py | tulir/fbchat | 476b7b0f1c9dc26ab2e515887febf6afcc6b4e91 | [
"BSD-3-Clause"
] | 13 | 2019-06-26T12:32:02.000Z | 2021-02-03T22:37:19.000Z | import attr
import datetime
from ._abc import ThreadABC
from . import _user
from .._common import attrs_default
from .. import _util, _session, _graphql, _models
from typing import Sequence, Iterable, Set, Mapping, Optional
@attrs_default
class Group(ThreadABC):
"""Represents a Facebook group. Implements `Thread... | 32.485714 | 89 | 0.591139 |
7947425fe2029061b94065f329b2e4e9aed0620a | 108,368 | py | Python | parser/fase2/team01/Grupo1/Instrucciones/DML/select.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team01/Grupo1/Instrucciones/DML/select.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team01/Grupo1/Instrucciones/DML/select.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from Expresiones.Primitivo import Primitive
import sys
sys.path.append('../Grupo1/Instrucciones')
sys.path.append('../Grupo1/Utils')
sys.path.append('../Grupo1/Expresiones')
sys.path.append('../Grupo1/Librerias/storageManager')
sys.path.append('../Grupo1/Librerias/prettytable')
from jsonMode import *
from instruccion ... | 40.180942 | 203 | 0.523928 |
794742828b25648184ba2e9c2ab718ca44b16378 | 397 | py | Python | itchatmp/exceptions.py | yf-ftd/itchatmp | 3c554f4f3e175a66f51edf4b8ff7982d0af378a0 | [
"MIT"
] | 1,504 | 2016-10-06T05:40:59.000Z | 2022-03-18T02:46:48.000Z | itchatmp/exceptions.py | yf-ftd/itchatmp | 3c554f4f3e175a66f51edf4b8ff7982d0af378a0 | [
"MIT"
] | 51 | 2016-12-11T14:21:33.000Z | 2020-01-16T09:00:40.000Z | itchatmp/exceptions.py | yf-ftd/itchatmp | 3c554f4f3e175a66f51edf4b8ff7982d0af378a0 | [
"MIT"
] | 370 | 2016-10-15T02:22:58.000Z | 2022-03-14T08:50:13.000Z | class BaseException(Exception):
''' exception base '''
pass
class ParameterError(BaseException):
def __init__(self, message=''):
self.message = message
def __str__(self):
return self.message
class EnvironmentError(BaseException):
def __init__(self, message=''):
... | 24.8125 | 39 | 0.634761 |
7947437203a11573e9fc5ee31940198793a70b2f | 7,159 | py | Python | pystachio/basic.py | jdxcode/pystachio | 601a2c36d7d67efa8f917e7cbf0ab8dc66c7827f | [
"MIT"
] | null | null | null | pystachio/basic.py | jdxcode/pystachio | 601a2c36d7d67efa8f917e7cbf0ab8dc66c7827f | [
"MIT"
] | null | null | null | pystachio/basic.py | jdxcode/pystachio | 601a2c36d7d67efa8f917e7cbf0ab8dc66c7827f | [
"MIT"
] | null | null | null | from .base import Object
from .compatibility import Compatibility
from .parsing import MustacheParser
from .typing import Type, TypeCheck, TypeFactory, TypeMetaclass
class SimpleObject(Object, Type):
"""
A simply-valued (unnamable) object.
"""
__slots__ = ('_value',)
def __init__(self, value):
self._... | 27.748062 | 98 | 0.684733 |
794743a4cdeb7b19cad80c391484c031ddc3c18a | 1,312 | py | Python | detectron2/modeling/__init__.py | irenecortes/detectron2 | 9c48f7a7b1ff87525dee810006e741bbae0b56eb | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/__init__.py | irenecortes/detectron2 | 9c48f7a7b1ff87525dee810006e741bbae0b56eb | [
"Apache-2.0"
] | null | null | null | detectron2/modeling/__init__.py | irenecortes/detectron2 | 9c48f7a7b1ff87525dee810006e741bbae0b56eb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from detectron2.layers import ShapeSpec
from .anchor_generator import build_anchor_generator, ANCHOR_GENERATOR_REGISTRY
from .backbone import (
BACKBONE_REGISTRY,
FPN,
Backbone,
ResNet,
ResNetBlockBase,
build_backbone,
b... | 24.754717 | 86 | 0.755335 |
7947441c6f92d3f548e39797372e86e679fb589c | 6,715 | py | Python | noxfile.py | tswast/python-bigtable | 3861f6b0552e431a1fc7aa872c4d293ca129c28c | [
"Apache-2.0"
] | null | null | null | noxfile.py | tswast/python-bigtable | 3861f6b0552e431a1fc7aa872c4d293ca129c28c | [
"Apache-2.0"
] | 7 | 2020-09-22T19:29:12.000Z | 2020-10-08T16:11:01.000Z | noxfile.py | tswast/python-bigtable | 3861f6b0552e431a1fc7aa872c4d293ca129c28c | [
"Apache-2.0"
] | 1 | 2020-10-04T12:10:40.000Z | 2020-10-04T12:10:40.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 30.112108 | 84 | 0.627103 |
794744383ecd6fac4684f953717a3b592f048394 | 1,509 | py | Python | user/migrations/0001_initial.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | user/migrations/0001_initial.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | user/migrations/0001_initial.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-10 14:22
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models
class Migration(migrations.Migration):
initial = True
dependenci... | 36.804878 | 118 | 0.616302 |
794744a5c58f8d23651d2531937c8a0cb7c3cc5f | 13,492 | py | Python | atomate/vasp/database.py | dongsenfo/atomate | 01558e8c3e38470c02bc8b50c0ee3aa6198e5206 | [
"BSD-3-Clause-LBNL"
] | 1 | 2019-09-02T00:55:26.000Z | 2019-09-02T00:55:26.000Z | atomate/vasp/database.py | dongsenfo/atomate | 01558e8c3e38470c02bc8b50c0ee3aa6198e5206 | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/database.py | dongsenfo/atomate | 01558e8c3e38470c02bc8b50c0ee3aa6198e5206 | [
"BSD-3-Clause-LBNL"
] | 3 | 2018-09-01T00:08:51.000Z | 2021-11-17T01:32:14.000Z | # coding: utf-8
from __future__ import division, print_function, unicode_literals, absolute_import
from monty.json import MontyEncoder, MontyDecoder
"""
This module defines the database classes.
"""
import zlib
import json
from bson import ObjectId
from pymatgen.electronic_structure.bandstructure import BandStruct... | 45.275168 | 150 | 0.619552 |
7947455a17a425c8a7b20e839f3f3d776fcfe2a0 | 6,903 | py | Python | sonybraviaremote/tv.py | njdavis/py-sony-bravia-remote | a5f0399717326e1aed746b5de4cbe0651384f1d9 | [
"MIT"
] | null | null | null | sonybraviaremote/tv.py | njdavis/py-sony-bravia-remote | a5f0399717326e1aed746b5de4cbe0651384f1d9 | [
"MIT"
] | null | null | null | sonybraviaremote/tv.py | njdavis/py-sony-bravia-remote | a5f0399717326e1aed746b5de4cbe0651384f1d9 | [
"MIT"
] | null | null | null | from typing import Callable
import json
import requests
from .tvconfig import TVConfig
class TV:
"""Represents a Sony Bravia TV that can
be controlled remotely."""
def __init__(self, auth_key: str, config: TVConfig):
"""Initializes a new instance of
:see:TV with the specified configurat... | 26.755814 | 145 | 0.518181 |
794745db3fba859d1d4bf8c6eaafaff746a0f54b | 3,182 | py | Python | photos/tests.py | wanjikuciku/lony-gram | 4a0b4ead09b605b474cdbb8139cfdbdad751d63c | [
"Unlicense"
] | null | null | null | photos/tests.py | wanjikuciku/lony-gram | 4a0b4ead09b605b474cdbb8139cfdbdad751d63c | [
"Unlicense"
] | 5 | 2020-06-05T20:01:07.000Z | 2021-09-08T00:52:27.000Z | photos/tests.py | wanjikuciku/lony-gram | 4a0b4ead09b605b474cdbb8139cfdbdad751d63c | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from .models import Image,Comments,Profile
from django.contrib.auth.models import User
# Create your tests here.
class ImageTestCase(TestCase):
"""
This is the class I will use to test the images
"""
def ... | 27.669565 | 106 | 0.591138 |
7947477bca8d4c6b3b94f6c5ac82714034d8b463 | 159 | py | Python | pyidea/__init__.py | madelyneriksen/PyIdea | 0ed29acc0247c7c6802d17a01f935e6eec9652ed | [
"MIT"
] | null | null | null | pyidea/__init__.py | madelyneriksen/PyIdea | 0ed29acc0247c7c6802d17a01f935e6eec9652ed | [
"MIT"
] | null | null | null | pyidea/__init__.py | madelyneriksen/PyIdea | 0ed29acc0247c7c6802d17a01f935e6eec9652ed | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for PyIdea."""
__author__ = """Madelyn Eriksen"""
__email__ = 'madelyn.eriksen@gmail.com'
__version__ = '0.1.0'
| 19.875 | 39 | 0.647799 |
794747a28490edd4f4f0299e6243b3d70b80e72d | 12,168 | py | Python | script.mrknow.urlresolver/lib/urlresolver9/lib/net.py | mrknow/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 105 | 2015-11-28T00:03:11.000Z | 2021-05-05T20:47:42.000Z | script.mrknow.urlresolver/lib/urlresolver9/lib/net.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 918 | 2015-11-28T14:12:40.000Z | 2022-03-23T20:24:49.000Z | script.mrknow.urlresolver/lib/urlresolver9/lib/net.py | rrosajp/filmkodi | 0162cde9ae25ddbf4a69330948714833ff2f78c9 | [
"Apache-2.0"
] | 111 | 2015-12-01T14:06:10.000Z | 2020-08-01T10:44:39.000Z | '''
common XBMC Module
Copyright (C) 2011 t0mm0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Th... | 35.683284 | 187 | 0.585059 |
7947494fb9f5134af231dfc39bd0cc89046e63fb | 62,136 | py | Python | google/cloud/aiplatform/v1/aiplatform-v1-py/tests/unit/gapic/aiplatform_v1/test_featurestore_online_serving_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/aiplatform/v1/aiplatform-v1-py/tests/unit/gapic/aiplatform_v1/test_featurestore_online_serving_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/aiplatform/v1/aiplatform-v1-py/tests/unit/gapic/aiplatform_v1/test_featurestore_online_serving_service.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.060291 | 275 | 0.720919 |
79474b33e63f653274bd579c21b2b7ebaaefb49c | 1,361 | py | Python | pycasper/decorators.py | dondongwon/CC_NCE_GENEA | c37e187800dbbce8447c0fdf11be1b76e863b4c6 | [
"MIT"
] | 5 | 2021-09-01T18:45:06.000Z | 2021-11-30T15:14:43.000Z | pycasper/decorators.py | dondongwon/CC_NCE_GENEA | c37e187800dbbce8447c0fdf11be1b76e863b4c6 | [
"MIT"
] | null | null | null | pycasper/decorators.py | dondongwon/CC_NCE_GENEA | c37e187800dbbce8447c0fdf11be1b76e863b4c6 | [
"MIT"
] | null | null | null | import time
__all__ = ['calculate_time']
class BaseDecorator():
'''
Build a decorator using before and after execution functions
Must-Implement-Methods::
before_exec(func) - Stuff to do before function execution
after_exec(func, before_values) - Stuff to do after function execution
Methods::
... | 28.957447 | 91 | 0.70169 |
79474b46e30a888b96503516d55c29d9133ee59f | 7,440 | py | Python | clinica/pipelines/t1_volume/t1_volume_cli.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | clinica/pipelines/t1_volume/t1_volume_cli.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | clinica/pipelines/t1_volume/t1_volume_cli.py | Chengwei94/clinica | 0e9d837baf9064a626198422b2a70fe120f227f0 | [
"MIT"
] | null | null | null | # coding: utf8
import clinica.engine as ce
class T1VolumeCLI(ce.CmdParser):
def define_name(self):
"""Define the sub-command name to run this pipeline."""
self._name = "t1-volume"
def define_description(self):
"""Define a description of this pipeline."""
self._description = (... | 38.153846 | 96 | 0.585081 |
79474d0316741883ae7ef61f26cc2b527cd5dd44 | 5,285 | py | Python | test/functional/test_framework/address.py | umkoin/umkoin | ba28fce6f6b22099ba7b900619653f9e342d3cd1 | [
"MIT"
] | 6 | 2018-02-28T22:23:46.000Z | 2020-02-13T13:49:44.000Z | test/functional/test_framework/address.py | umkoin/umkoin | ba28fce6f6b22099ba7b900619653f9e342d3cd1 | [
"MIT"
] | null | null | null | test/functional/test_framework/address.py | umkoin/umkoin | ba28fce6f6b22099ba7b900619653f9e342d3cd1 | [
"MIT"
] | 6 | 2018-02-05T12:51:25.000Z | 2020-04-26T10:42:49.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Encode and decode Umkoin addresses.
- base58 P2PKH and P2SH addresses.
- bech32 segwit v0 P2WPKH and P... | 34.318182 | 120 | 0.698392 |
79474d385abbc13b2d94514a20747da0bd9161f9 | 1,216 | py | Python | nvp/core/process_utils.py | roche-emmanuel/nervproj | f784e88957868a17a40f499bef75cc226cf94e69 | [
"MIT"
] | null | null | null | nvp/core/process_utils.py | roche-emmanuel/nervproj | f784e88957868a17a40f499bef75cc226cf94e69 | [
"MIT"
] | null | null | null | nvp/core/process_utils.py | roche-emmanuel/nervproj | f784e88957868a17a40f499bef75cc226cf94e69 | [
"MIT"
] | null | null | null | """ProcessUtils utility component"""
import logging
import os
import psutil
from nvp.nvp_component import NVPComponent
from nvp.nvp_context import NVPContext
logger = logging.getLogger(__name__)
def create_component(ctx: NVPContext):
"""Create an instance of the component"""
return ProcessUtils(ctx)
class... | 28.952381 | 88 | 0.689967 |
79474d5aa2b130445eec2966caea26fff9a4c29c | 3,493 | py | Python | vendor-local/lib/python/easy_thumbnails/migrations/0012_build_storage_hashes.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | 24 | 2016-08-06T18:10:54.000Z | 2022-03-04T11:47:39.000Z | vendor-local/lib/python/easy_thumbnails/migrations/0012_build_storage_hashes.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T02:36:50.000Z | 2017-03-28T07:18:57.000Z | vendor-local/lib/python/easy_thumbnails/migrations/0012_build_storage_hashes.py | Koenkk/popcorn_maker | 0978b9f98dacd4e8eb753404b24eb584f410aa11 | [
"BSD-3-Clause"
] | 16 | 2015-02-18T21:43:31.000Z | 2021-11-09T22:50:03.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.core.files.storage import default_storage
from django.utils.hashcompat import md5_constructor
import pickle
class Migration(DataMigration):
"""
Migrate storage hashes.
"""
... | 46.573333 | 146 | 0.588892 |
7947519b2f14bb879a21c50a4cfd97f2044d4763 | 798 | py | Python | aim_mt_2d/architectures/controller.py | sisl/neat | 42758d910f453686366eddfd1aed440e34c94828 | [
"MIT"
] | 183 | 2021-08-18T13:22:37.000Z | 2022-03-31T08:40:48.000Z | aim_mt_2d/architectures/controller.py | sisl/neat | 42758d910f453686366eddfd1aed440e34c94828 | [
"MIT"
] | 10 | 2021-09-24T15:30:06.000Z | 2022-03-25T11:19:23.000Z | aim_mt_2d/architectures/controller.py | sisl/neat | 42758d910f453686366eddfd1aed440e34c94828 | [
"MIT"
] | 21 | 2021-09-11T13:32:54.000Z | 2022-03-23T16:55:53.000Z | from collections import deque
import numpy as np
import torch
from torch import nn
class PIDController(object):
def __init__(self, K_P=1.0, K_I=0.0, K_D=0.0, n=20):
self._K_P = K_P
self._K_I = K_I
self._K_D = K_D
self._window = deque([0 for _ in range(n)], maxlen=n)
self... | 25.741935 | 80 | 0.568922 |
794751f645f37119c5beecdd41d0e8222332e297 | 16,212 | py | Python | autotest/test_gwf_sfr_badfactor.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-07-10T21:16:57.000Z | 2021-10-08T00:56:20.000Z | autotest/test_gwf_sfr_badfactor.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwf_sfr_badfactor.py | scharlton2/modflow6 | 83ac72ee3b6f580aaffef6352cf15c1697d3ce66 | [
"CC0-1.0"
] | 3 | 2019-11-28T16:26:50.000Z | 2020-02-05T11:08:37.000Z | import os
import pytest
import sys
import numpy as np
import shutil
import subprocess
try:
import flopy
except:
msg = "Error. FloPy package is not available.\n"
msg += "Try installing using the following command:\n"
msg += " pip install flopy"
raise Exception(msg)
from framework import testing_fra... | 27.524618 | 79 | 0.449914 |
79475227dfe181c428665f6d5e23a6091307ed94 | 2,176 | py | Python | NEW GUI.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | null | null | null | NEW GUI.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | 3 | 2019-05-05T16:30:58.000Z | 2019-05-11T00:23:02.000Z | NEW GUI.py | Hassan0072/CP_HS99 | 365ecd119e19fcf2c69ccaef42b278a1a9256741 | [
"MIT"
] | 1 | 2019-04-21T18:46:01.000Z | 2019-04-21T18:46:01.000Z | from tkinter import *
from tkinter import messagebox
from socket import *
import _thread
root = Tk()
root.title("Remote File Sharing System")
root.geometry("1030x600")
root.minsize(width=500 , height=500)
topFrame = Frame(root)
bottomFrame = Frame(root)
theLabel = Label(root, text="Remote File Sharing System (User Int... | 32 | 121 | 0.702206 |
79475248015ea6699066c9acefca9174448c1bb2 | 400 | py | Python | sols_python/1259.py | souzajackson/Beecrowd | c7323e51cd5132c523a1812be5ad5de1a152a63f | [
"MIT"
] | null | null | null | sols_python/1259.py | souzajackson/Beecrowd | c7323e51cd5132c523a1812be5ad5de1a152a63f | [
"MIT"
] | null | null | null | sols_python/1259.py | souzajackson/Beecrowd | c7323e51cd5132c523a1812be5ad5de1a152a63f | [
"MIT"
] | null | null | null | entrada1 = int(input())
valores = list()
pares = list()
impares = list()
for c in range(entrada1):
entrada = int(input())
valores.append(entrada)
for elemento in valores:
if elemento % 2 == 0:
pares.append(elemento)
else:
impares.append(elemento)
pares.sort()
impares.sort(reverse = True)... | 22.222222 | 32 | 0.66 |
794752801622e84270802dd59d03a6cd2eeb9c3c | 393 | py | Python | setup.py | depaolim/pysrvany | cdb1e6786303192156584545149bb5a8226973c3 | [
"MIT"
] | null | null | null | setup.py | depaolim/pysrvany | cdb1e6786303192156584545149bb5a8226973c3 | [
"MIT"
] | null | null | null | setup.py | depaolim/pysrvany | cdb1e6786303192156584545149bb5a8226973c3 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='pysrvany',
version='0.0.1',
description='Run Windows Executables as Services',
license="MIT",
author='Marco De Paoli',
author_email='depaolim@gmail.com',
url="https://github.com/depaolim/pysrvany",
packages=['pysrvany'],
install_requires=[]... | 24.5625 | 61 | 0.676845 |
794752ad248ac1e49d852f894df16c035754b838 | 294 | py | Python | towers/monkey_village.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | towers/monkey_village.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | towers/monkey_village.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | from tower import Tower
from config import keybinds
class MonkeyVillage(Tower):
name = 'monkey_village'
range = 215
width = 119
height = 103
size = 'xl'
keybind = keybinds[name]
aquatic = False
def __init__(self, **kwargs):
super().__init__(**kwargs)
| 18.375 | 34 | 0.636054 |
794753a918f4eca3894e9ae52a9b382999b3b433 | 101,596 | py | Python | functions_NoiseStudy.py | silviaelisabeth/Noise-vs-Resolution | cc317f52a15263e4abb5cd94c8c524e18a6dfa85 | [
"Apache-2.0"
] | 1 | 2021-07-07T08:24:21.000Z | 2021-07-07T08:24:21.000Z | functions_NoiseStudy.py | silviaelisabeth/Noise-vs-Resolution | cc317f52a15263e4abb5cd94c8c524e18a6dfa85 | [
"Apache-2.0"
] | null | null | null | functions_NoiseStudy.py | silviaelisabeth/Noise-vs-Resolution | cc317f52a15263e4abb5cd94c8c524e18a6dfa85 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Silvia E Zieger'
__project__ = 'noise vs resolution'
"""Copyright 2020. All rights reserved.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable
for any damages arising from the use of this software.
Permission is granted to any... | 46.285194 | 148 | 0.543929 |
794754882dc82ce358425b0be0851743b5c8d2e5 | 5,601 | py | Python | front_end/handlers/ImportCourseHandler.py | zacheliason/CodeBuddy | 18694771ccbb74e6966e08f1247aadda2d5d06f7 | [
"MIT"
] | null | null | null | front_end/handlers/ImportCourseHandler.py | zacheliason/CodeBuddy | 18694771ccbb74e6966e08f1247aadda2d5d06f7 | [
"MIT"
] | 11 | 2020-06-12T19:13:12.000Z | 2021-08-28T23:47:57.000Z | front_end/handlers/ImportCourseHandler.py | zacheliason/CodeBuddy | 18694771ccbb74e6966e08f1247aadda2d5d06f7 | [
"MIT"
] | 3 | 2020-05-12T16:54:16.000Z | 2021-04-30T16:19:46.000Z | from BaseUserHandler import *
class ImportCourseHandler(BaseUserHandler):
def post(self):
try:
if not self.is_administrator():
self.render("permissions.html")
return
result = ""
if "zip_file" in self.request.files and self.request.files[... | 60.880435 | 306 | 0.604178 |
794754db57466ac7cb8e0e539af2d04afe1a7dfc | 39,918 | py | Python | grid_set-2019.py | hheorton/geo_data_group | 7f62cda797d0d7a10c1578f162b35d7f484865ec | [
"MIT"
] | null | null | null | grid_set-2019.py | hheorton/geo_data_group | 7f62cda797d0d7a10c1578f162b35d7f484865ec | [
"MIT"
] | null | null | null | grid_set-2019.py | hheorton/geo_data_group | 7f62cda797d0d7a10c1578f162b35d7f484865ec | [
"MIT"
] | null | null | null | # here is the class that holds all the data days/months
# it has all the gridding scripts needed
# it will save load all the data/days/months as needed
import numpy as np
import pandas as pd
import datetime
import copy
from netCDF4 import Dataset
from numba import jit
from scipy import stats
import data_year as dy
fro... | 38.71775 | 116 | 0.558044 |
79475504127da5cfe10c0a36ebefd305cbf63e99 | 6,965 | py | Python | chrome/test/functional/autotour.py | Gitman1989/chromium | 2b1cceae1075ef012fb225deec8b4c8bbe4bc897 | [
"BSD-3-Clause"
] | 2 | 2017-09-02T19:08:28.000Z | 2021-11-15T15:15:14.000Z | chrome/test/functional/autotour.py | meego-tablet-ux/meego-app-browser | 0f4ef17bd4b399c9c990a2f6ca939099495c2b9c | [
"BSD-3-Clause"
] | null | null | null | chrome/test/functional/autotour.py | meego-tablet-ux/meego-app-browser | 0f4ef17bd4b399c9c990a2f6ca939099495c2b9c | [
"BSD-3-Clause"
] | 1 | 2020-11-04T07:22:28.000Z | 2020-11-04T07:22:28.000Z | #!/usr/bin/python
# Copyright (c) 2010 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import random
import time
"""Autotour is a semi automatic exploratory framework for exploring actions
defined on an ob... | 32.853774 | 79 | 0.684566 |
7947561265bb670f2ff10954a11d9de75a203cb6 | 5,194 | py | Python | GLMAutoNODE.py | BannanaDJoe/golem-node | e145bf94ee41b8241357c0505730c75e7be48593 | [
"MIT"
] | null | null | null | GLMAutoNODE.py | BannanaDJoe/golem-node | e145bf94ee41b8241357c0505730c75e7be48593 | [
"MIT"
] | null | null | null | GLMAutoNODE.py | BannanaDJoe/golem-node | e145bf94ee41b8241357c0505730c75e7be48593 | [
"MIT"
] | 1 | 2022-02-16T17:47:04.000Z | 2022-02-16T17:47:04.000Z | #!/usr/bin/env python3
import time
import platform
from typing import NewType
import shutil, errno
import urllib.request, json
import subprocess
class NodeCreator:
# Raise Amounts
NodeID = 0
RaiseAmount = 1.00
Multi = 1.15
Index = 1
CPU_Hour = 0.1
ENV_Hour = 0.02
StartFee = 0.0
d... | 31.865031 | 85 | 0.576242 |
7947569ed1e044416be4573b63a6890cd453732f | 6,551 | py | Python | configs/fcos/fcos_t_s_full_mask_finetune_halved_from_scratch_good_initial_backbone_adaption_constant_term_dynamic_weight_normalized_pyramid_attention_r50_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | configs/fcos/fcos_t_s_full_mask_finetune_halved_from_scratch_good_initial_backbone_adaption_constant_term_dynamic_weight_normalized_pyramid_attention_r50_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | configs/fcos/fcos_t_s_full_mask_finetune_halved_from_scratch_good_initial_backbone_adaption_constant_term_dynamic_weight_normalized_pyramid_attention_r50_caffe_fpn_gn_1x_4gpu_nvidia.py | Lanselott/mmdetection | 03ce0a87f4d52f4adf4f78fd39ad30b2da394376 | [
"Apache-2.0"
] | null | null | null | # model settings
BLOCK_ALIGN = False
PYRAMID_ALIGN = True
PRI_PYRAMID_ALIGN = False
HEAD_ALIGN = False
FREEZE_TEACHER = False
GOOD_INITIAL = True
BN_TOPK_SELECTION = False
RATIO = 2
model = dict(
type='FCOSTS',
pretrained='open-mmlab://resnet50_caffe',
backbone=dict(
type='ResTSNet',
depth=5... | 31.956098 | 81 | 0.637918 |
794758baeb8e5a1859cb91140c19663379bbf66e | 3,596 | py | Python | application/invoke.py | alexeysp11/sdc-console-python | 237ec357b0883d0d033cd0f5609ac8a4f064f86f | [
"MIT"
] | null | null | null | application/invoke.py | alexeysp11/sdc-console-python | 237ec357b0883d0d033cd0f5609ac8a4f064f86f | [
"MIT"
] | null | null | null | application/invoke.py | alexeysp11/sdc-console-python | 237ec357b0883d0d033cd0f5609ac8a4f064f86f | [
"MIT"
] | null | null | null | import sys, traceback
sys.path.append('../console')
sys.path.append('../physical_models')
sys.path.append('../signal_processing')
sys.path.append('../control_algorithms')
from console.console import Console as console
from physical_models.car import Car
from signal_processing.spa import SignalProcessingAlgorithm as S... | 34.576923 | 78 | 0.544772 |
79475911ed637dbd4bca456efd23639718bbbb5b | 112 | py | Python | django_th/signals.py | Leopere/django-th | 86c999d16bcf30b6224206e5b40824309834ac8c | [
"BSD-3-Clause"
] | 1,069 | 2015-01-07T01:55:57.000Z | 2022-02-17T10:50:57.000Z | django_th/signals.py | barrygolden/django-th | 86c999d16bcf30b6224206e5b40824309834ac8c | [
"BSD-3-Clause"
] | 207 | 2015-01-06T21:41:17.000Z | 2018-02-20T14:10:15.000Z | django_th/signals.py | barrygolden/django-th | 86c999d16bcf30b6224206e5b40824309834ac8c | [
"BSD-3-Clause"
] | 117 | 2015-01-04T16:21:13.000Z | 2022-02-22T06:18:49.000Z | from django.dispatch import Signal
digest_event = Signal(providing_args=["user", "title", "link", "duration"])
| 28 | 75 | 0.741071 |
79475972a57a3b60a04ca4cfd92a07c3483f49cf | 26,713 | py | Python | mypy/util.py | evinism/mypy | d87d468ee80908a865c388a7743c84c1f5c917d7 | [
"PSF-2.0"
] | 2 | 2020-02-13T06:41:07.000Z | 2022-02-14T09:28:02.000Z | mypy/util.py | evinism/mypy | d87d468ee80908a865c388a7743c84c1f5c917d7 | [
"PSF-2.0"
] | 10 | 2021-06-16T20:48:32.000Z | 2021-10-04T18:22:02.000Z | mypy/util.py | evinism/mypy | d87d468ee80908a865c388a7743c84c1f5c917d7 | [
"PSF-2.0"
] | null | null | null | """Utility functions with no non-trivial dependencies."""
import os
import pathlib
import re
import subprocess
import sys
import hashlib
import io
import shutil
from typing import (
TypeVar, List, Tuple, Optional, Dict, Sequence, Iterable, Container, IO, Callable
)
from typing_extensions import Final, Type, Liter... | 36.845517 | 99 | 0.603826 |
79475a09111aafbde7b22e5693ad8680d865e968 | 1,364 | py | Python | setup.py | lucag/sparrow | e6af3f4b5d8d0aa68a1f67d61bb1daadc218a9ba | [
"BSD-3-Clause"
] | null | null | null | setup.py | lucag/sparrow | e6af3f4b5d8d0aa68a1f67d61bb1daadc218a9ba | [
"BSD-3-Clause"
] | 2 | 2020-05-29T00:16:27.000Z | 2021-03-31T19:45:40.000Z | setup.py | lucag/sparrow | e6af3f4b5d8d0aa68a1f67d61bb1daadc218a9ba | [
"BSD-3-Clause"
] | null | null | null | from os.path import join, dirname
from setuptools import setup, find_packages
base = dirname(__file__)
README = join(base, 'README.rst')
def lines(filename):
with open(filename) as lines:
return [line.rstrip() for line in lines]
setup(
name='sparrow',
version='1.0.1-SNAPSHOT',
author='Jasp... | 33.268293 | 80 | 0.63563 |
79475a10dbfb5990bddd0339795091d759fcd705 | 9,851 | py | Python | tests/unit/core/components/test_module_path.py | avosper-intellaegis/runway | 757d4e7db269ec16479b044ac82a69f25fa2a450 | [
"Apache-2.0"
] | 134 | 2018-02-26T21:35:23.000Z | 2022-03-03T00:30:27.000Z | tests/unit/core/components/test_module_path.py | asksmruti/runway | 8aca76df9372e3d13eb35e12f81758f618e89e74 | [
"Apache-2.0"
] | 937 | 2018-03-08T22:04:35.000Z | 2022-03-30T12:21:47.000Z | tests/unit/core/components/test_module_path.py | asksmruti/runway | 8aca76df9372e3d13eb35e12f81758f618e89e74 | [
"Apache-2.0"
] | 70 | 2018-02-26T23:48:11.000Z | 2022-03-02T18:44:30.000Z | """Test runway.core.components._module_path."""
# pylint: disable=no-self-use
# pyright: basic
from __future__ import annotations
from copy import deepcopy
from pathlib import Path
from typing import TYPE_CHECKING, Dict, List, Optional, Union
import pytest
from mock import MagicMock
from typing_extensions import Type... | 33.39322 | 109 | 0.570602 |
79475a83f0e363c5f9f223278c5a3ebdf5f7fad6 | 42,322 | py | Python | src/black/linegen.py | henrikhorluck/black | 5379d4f3f460ec9b7063dd1cc10f437b0edf9ae3 | [
"MIT"
] | null | null | null | src/black/linegen.py | henrikhorluck/black | 5379d4f3f460ec9b7063dd1cc10f437b0edf9ae3 | [
"MIT"
] | null | null | null | src/black/linegen.py | henrikhorluck/black | 5379d4f3f460ec9b7063dd1cc10f437b0edf9ae3 | [
"MIT"
] | null | null | null | """
Generating lines of code.
"""
from functools import partial, wraps
import sys
from typing import Collection, Iterator, List, Optional, Set, Union
from black.nodes import WHITESPACE, RARROW, STATEMENT, STANDALONE_COMMENT
from black.nodes import ASSIGNMENTS, OPENING_BRACKETS, CLOSING_BRACKETS
from black.nodes import... | 39.964117 | 88 | 0.624829 |
79475aec84918fd23d243efb7bb93b2b278317c4 | 8,056 | py | Python | host-software/keyplus/cdata_types.py | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 226 | 2017-08-14T16:11:36.000Z | 2022-03-13T00:58:13.000Z | host-software/keyplus/cdata_types.py | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 90 | 2017-09-12T02:07:39.000Z | 2022-01-27T20:58:19.000Z | host-software/keyplus/cdata_types.py | dpejcha/keyplus | 8d0d4b59e9175295fd5edf0d4fecfced8053460f | [
"MIT"
] | 44 | 2017-09-17T17:31:25.000Z | 2022-02-27T08:19:46.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import cstruct
from cstruct import define, typedef, CStruct
from keyplus.constants import *
class CStructWithBytes(CStruct):
def to_bytes(self):
return bytearray(self.pack())
typedef('uint8', 'uint8_t')
typedef('uint16', 'uint16_t')
typedef('uint32', 'uint32... | 33.016393 | 83 | 0.659384 |
79475b38085f2476af2828a97d01f3ae26f34cf6 | 315 | py | Python | test.py | RapDoodle8080/mooli-milk-tea-management-system | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2021-05-29T09:40:42.000Z | 2021-05-29T09:40:42.000Z | test.py | RapDoodle/Mooli-Ordering-System | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2020-10-28T02:10:24.000Z | 2020-10-28T02:10:24.000Z | test.py | RapDoodle/Mooli-Ordering-System | 9b6e31664529ac70d180da2f219baf0eb902017b | [
"MIT"
] | 1 | 2021-05-29T09:40:41.000Z | 2021-05-29T09:40:41.000Z | from setup import init_test_db
init_test_db()
import tests.test_category
import tests.test_product
import tests.test_user
import tests.test_redeem_card
import tests.test_coupon
import tests.test_cart_item
import tests.test_order
import tests.test_archive
import tests.test_role_permission
import tests.test_staff
| 21 | 33 | 0.87619 |
79475bac62fe1d9dc3a8b9f07b1c041f8d3b051c | 886 | py | Python | isi_sdk_8_1_1/test/test_providers_ldap.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/test/test_providers_ldap.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/test/test_providers_ldap.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_1_1
from i... | 21.609756 | 83 | 0.699774 |
79475bd21aea84e2ce8294c56d924614cb998bbe | 12,960 | py | Python | niftynet/contrib/csv_reader/applications_maybe/label_driven_registration.py | tdml13/NiftyNet | b35fa19ca307e81d229e2fe8269a417724833da2 | [
"Apache-2.0"
] | 1,403 | 2017-08-30T11:49:45.000Z | 2022-03-31T11:44:05.000Z | niftynet/contrib/csv_reader/applications_maybe/label_driven_registration.py | tdml13/NiftyNet | b35fa19ca307e81d229e2fe8269a417724833da2 | [
"Apache-2.0"
] | 360 | 2017-10-03T15:33:53.000Z | 2021-03-17T06:27:38.000Z | niftynet/contrib/csv_reader/applications_maybe/label_driven_registration.py | tdml13/NiftyNet | b35fa19ca307e81d229e2fe8269a417724833da2 | [
"Apache-2.0"
] | 464 | 2017-09-13T20:56:32.000Z | 2022-02-11T20:33:47.000Z | """
A preliminary re-implementation of:
Hu et al., Weakly-Supervised Convolutional Neural Networks for
Multimodal Image Registration, Medical Image Analysis (2018)
https://doi.org/10.1016/j.media.2018.07.002
The original implementation and tutorial is available at:
https://github.com/YipengHu/label-reg... | 41.806452 | 78 | 0.617901 |
79475cd69a115695d9e8eea9aa59b3bf674563d9 | 7,286 | py | Python | jcld/tdir.py | clld/recipes | 947ad0514e08f89cad95cacb448b60c41231b7d6 | [
"Apache-2.0"
] | null | null | null | jcld/tdir.py | clld/recipes | 947ad0514e08f89cad95cacb448b60c41231b7d6 | [
"Apache-2.0"
] | 1 | 2019-05-02T10:14:26.000Z | 2019-05-06T09:16:30.000Z | jcld/tdir.py | clld/recipes | 947ad0514e08f89cad95cacb448b60c41231b7d6 | [
"Apache-2.0"
] | 2 | 2015-12-06T22:04:13.000Z | 2017-10-05T06:44:06.000Z | import sys
import re
from sqlalchemy import create_engine
from xlrd import open_workbook
from path import path
from bs4 import BeautifulSoup as bs
from clld.db.meta import DBSession
from clld.db.models import common
DATA_DIR = path('/home/robert/venvs/clld/data/tdir-data/TDIR')
def read(type_):
assert type_ i... | 33.118182 | 220 | 0.555998 |
79475edd45556a3febc6f5a70464ca8bd2eef3df | 2,030 | py | Python | rediscache/RedisConnector.py | Rizwan-Hasan/Flask-URL-Shortener-Application | 1d5f2209ff74ce14baf79f1757d71221e18b93d3 | [
"MIT"
] | 1 | 2021-11-03T20:46:25.000Z | 2021-11-03T20:46:25.000Z | rediscache/RedisConnector.py | Rizwan-Hasan/Flask-URL-Shortener-Application | 1d5f2209ff74ce14baf79f1757d71221e18b93d3 | [
"MIT"
] | null | null | null | rediscache/RedisConnector.py | Rizwan-Hasan/Flask-URL-Shortener-Application | 1d5f2209ff74ce14baf79f1757d71221e18b93d3 | [
"MIT"
] | null | null | null | import logging
import redis
from rediscache import host, port, password, dbNo
# Redis Connector ↓
class RedisConnect:
def __init__(self, counterName: str, counter: int):
try:
self.__pool = redis.ConnectionPool(
decode_responses=True, host=host, port=port, password=password, d... | 29.42029 | 87 | 0.5133 |
79475f3196a3b160a2d27011119ff916db64ee2a | 3,131 | py | Python | alipay/aop/api/response/AlipayTradeCustomsDeclareResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayTradeCustomsDeclareResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayTradeCustomsDeclareResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayTradeCustomsDeclareResponse(AlipayResponse):
def __init__(self):
super(AlipayTradeCustomsDeclareResponse, self).__init__()
self._alipay_declare_no = None
... | 29.537736 | 106 | 0.66145 |
79475f92fda14c8694d599eb7c742393a726abf5 | 7,216 | py | Python | tools/project-creator/Python2.6.6/Lib/abc.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 81 | 2017-03-13T08:24:01.000Z | 2021-04-02T09:48:38.000Z | tools/project-creator/Python2.6.6/Lib/abc.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 6 | 2017-04-30T08:36:55.000Z | 2017-09-22T01:37:28.000Z | tools/project-creator/Python2.6.6/Lib/abc.py | gohopo/nineck.ca | 9601f5ae4c20f8a3ea27b06551556fa5e1eecce3 | [
"MIT"
] | 41 | 2017-03-18T14:11:58.000Z | 2021-04-14T05:06:09.000Z | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) according to PEP 3119."""
# Instance of old-style class
class _C: pass
_InstanceType = type(_C())
def abstractmethod(funcobj):
"""A decorator indicating abstract metho... | 39.431694 | 80 | 0.617239 |
79476075e83e2165b0a87d4686dcf53e79e3c772 | 6,659 | py | Python | tests/cli/test_rasa_test.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | tests/cli/test_rasa_test.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 46 | 2020-09-26T11:36:38.000Z | 2022-03-01T13:38:02.000Z | tests/cli/test_rasa_test.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import os
from shutil import copyfile
from rasa.core.test import CONFUSION_MATRIX_STORIES_FILE
from rasa.constants import RESULTS_FILE
from rasa.shared.constants import DEFAULT_RESULTS_PATH
from rasa.shared.utils.io import list_files, write_yaml
from typing import Callable
from _pytest.pytester import RunResult
def ... | 31.861244 | 97 | 0.620514 |
794762575f72eaa6e791bc573b8920ff92da10e6 | 19,720 | py | Python | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/backend.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/backend.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/apimanagement/v20210101preview/backend.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 44.514673 | 1,658 | 0.65071 |
794765247ae3c3418e4dd2a34c55ad54a8d44da3 | 7,861 | py | Python | lib_drl/nets/resnet_v1.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_drl/nets/resnet_v1.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | lib_drl/nets/resnet_v1.py | chang010453/GRP-HAI | 60f7c7633e33dbdd852f5df3e0a3d1017b6b2a22 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Tensorflow Faster R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Zheqi He and Xinlei Chen
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __f... | 45.97076 | 120 | 0.547767 |
794766c841fdc48765bf5b2025f60301d9413e6b | 1,411 | py | Python | flow_package_maths/arithmetic/add/add.py | theengineeringco/flow-package-maths | 50ca778a7a88aa0a58b951a6d7ab51950d8864c3 | [
"MIT"
] | null | null | null | flow_package_maths/arithmetic/add/add.py | theengineeringco/flow-package-maths | 50ca778a7a88aa0a58b951a6d7ab51950d8864c3 | [
"MIT"
] | null | null | null | flow_package_maths/arithmetic/add/add.py | theengineeringco/flow-package-maths | 50ca778a7a88aa0a58b951a6d7ab51950d8864c3 | [
"MIT"
] | null | null | null | from typing import List
from flow import Ports, Process, Settings, Setup
from flow_types import base, unions
# Define Settings
settings = Settings()
settings.add_int_setting(id="terms", default=2, minimum=2, maximum=20) # noqa: WPS432
# Define Ports
ports = Ports()
# Add Inports
ports.add_inport(id="value1", type... | 25.654545 | 100 | 0.700921 |
794766cbad7ca3f42703e203935a90fa0b87afa7 | 32,960 | py | Python | dask/dataframe/io/csv.py | SultanOrazbayev/dask | 56eeb06103efbf36cc73e9405bcec42a5b92515a | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/io/csv.py | SultanOrazbayev/dask | 56eeb06103efbf36cc73e9405bcec42a5b92515a | [
"BSD-3-Clause"
] | 1 | 2021-12-01T20:16:41.000Z | 2021-12-02T20:42:37.000Z | dask/dataframe/io/csv.py | scharlottej13/dask | fc1cea9cdb2ea31348204aa51e4f6f7327a2af33 | [
"BSD-3-Clause"
] | null | null | null | import os
from collections.abc import Mapping
from io import BytesIO
from warnings import catch_warnings, simplefilter, warn
try:
import psutil
except ImportError:
psutil = None
import fsspec.implementations.local
import numpy as np
import pandas as pd
from fsspec.compression import compr
from fsspec.core imp... | 34.049587 | 91 | 0.620783 |
79476755617410d1d893aa08547ca5e5bbcf9955 | 29,733 | py | Python | bokeh/tests/test_properties.py | brian15co/bokeh | 6cecb7211277b9d838039d0eb15e50a10f9ac3d1 | [
"BSD-3-Clause"
] | 2 | 2021-09-01T12:36:06.000Z | 2021-11-17T10:48:36.000Z | bokeh/tests/test_properties.py | brian15co/bokeh | 6cecb7211277b9d838039d0eb15e50a10f9ac3d1 | [
"BSD-3-Clause"
] | null | null | null | bokeh/tests/test_properties.py | brian15co/bokeh | 6cecb7211277b9d838039d0eb15e50a10f9ac3d1 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import numpy as np
from bokeh.properties import (
HasProps, Int, Array, String, Enum, Float, DataSpec, ColorSpec, DashPattern
)
class Basictest(unittest.TestCase):
def test_simple_class(self):
class Foo(HasProps):
x = Int(12)
y = String("hello")
z =... | 34.775439 | 96 | 0.592069 |
794767c4371d7b8f6b9bf3ed7baf04e774914ac0 | 4,740 | py | Python | src/MiniMax.py | keivanipchihagh/Tic-Tac-Toe-ML-EXTENDED | 8849bb48d781b11e95d982c34f7bdf6d6998fd63 | [
"MIT"
] | null | null | null | src/MiniMax.py | keivanipchihagh/Tic-Tac-Toe-ML-EXTENDED | 8849bb48d781b11e95d982c34f7bdf6d6998fd63 | [
"MIT"
] | null | null | null | src/MiniMax.py | keivanipchihagh/Tic-Tac-Toe-ML-EXTENDED | 8849bb48d781b11e95d982c34f7bdf6d6998fd63 | [
"MIT"
] | null | null | null | '''
MiniMax implementation of Tic Tac Toe with Python
Author: Keivan Ipchi Hagh
Year: 2020
License: MIT License
Follow me for more (https://github.com/keivanipchihagh)
'''
# Imports
from math import inf as infinity
from random import choice
class MiniMax:
''' Implementation is somewhat Object-Oriented for reusab... | 29.259259 | 145 | 0.558017 |
79476823d72f30f64c58615996b56f45ea235fc4 | 1,180 | py | Python | application/views.py | amarlearning/Footstep | 557beda097834a031fa2f114bad5de261c7daf95 | [
"MIT"
] | null | null | null | application/views.py | amarlearning/Footstep | 557beda097834a031fa2f114bad5de261c7daf95 | [
"MIT"
] | 2 | 2017-05-12T14:38:01.000Z | 2017-05-18T13:25:35.000Z | application/views.py | amarlearning/Footstep | 557beda097834a031fa2f114bad5de261c7daf95 | [
"MIT"
] | null | null | null | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, redirect
from django import forms
import urllib2
import json
class NameForm(forms.Form):
username = forms.CharField(
widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder' : 'GitHub username'}),
... | 27.44186 | 96 | 0.705085 |
79476a8e9a0e10d14e74731e17ac8213a1345b48 | 2,284 | py | Python | openeogeotrellis/cleaner.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 12 | 2018-03-22T15:02:24.000Z | 2022-03-30T20:13:29.000Z | openeogeotrellis/cleaner.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 116 | 2018-09-27T17:17:14.000Z | 2022-03-30T18:32:29.000Z | openeogeotrellis/cleaner.py | Open-EO/openeo-geopyspark-driver | afd5902f426d2aa456d70ed6f2d51b6907de1cab | [
"Apache-2.0"
] | 3 | 2019-06-28T15:44:32.000Z | 2021-10-30T07:05:54.000Z | import argparse
from datetime import datetime, timedelta
import logging
import kazoo.client
from py4j.java_gateway import JavaGateway, JVMView
import openeogeotrellis.backend
from openeogeotrellis.backend import GpsBatchJobs, GpsSecondaryServices
from openeogeotrellis.configparams import ConfigParams
from openeogeotre... | 36.83871 | 122 | 0.721103 |
79476aeeda7b595219e7aa1c9df488b2c5cac563 | 1,567 | py | Python | auth_service/src/AuthService/manage.py | newgene/biothings_oauth | 363a30e43537b38988363d02e9fa7c9016064a72 | [
"Apache-2.0"
] | null | null | null | auth_service/src/AuthService/manage.py | newgene/biothings_oauth | 363a30e43537b38988363d02e9fa7c9016064a72 | [
"Apache-2.0"
] | null | null | null | auth_service/src/AuthService/manage.py | newgene/biothings_oauth | 363a30e43537b38988363d02e9fa7c9016064a72 | [
"Apache-2.0"
] | null | null | null | import sys
from alembic.config import Config
from alembic import command
from AuthService import settings
def drop_all(alembic_conf=None):
"""
Drops all tables in the database.
@:param alembic_conf: Alembic configuration to be used.
"""
if alembic_conf is None:
alembic_conf = initialize... | 21.175676 | 74 | 0.661774 |
79476b35a277ca92d2f619f586748ed591a9671a | 29,133 | py | Python | staircase_bw_new.py | lbeerendonk/blackwhite | 4ec0deced93da59218a90838bf60d10a981da37a | [
"MIT"
] | null | null | null | staircase_bw_new.py | lbeerendonk/blackwhite | 4ec0deced93da59218a90838bf60d10a981da37a | [
"MIT"
] | null | null | null | staircase_bw_new.py | lbeerendonk/blackwhite | 4ec0deced93da59218a90838bf60d10a981da37a | [
"MIT"
] | null | null | null | """
Staircase (3-up, 1-down) for auditory detection or discrimination.
Runs on Python 2.7 because some dependencies (pygaze) do not work with Python 3.
Becomes compatible with Python 3 by changing all instances of "raw_input" to "input".
Created by Lola Beerendonk 28-05-2019
Copyright (c) 2019; All rights reserved.
"... | 48.963025 | 623 | 0.589503 |
79476bf75ad334e7501831c8a945f13d4f3c38a9 | 53 | py | Python | spyder_unittesting/__init__.py | Nodd/spyder.unittesting | 364925f5a029a1ad9fc3ed21380f724a45805a8a | [
"MIT"
] | null | null | null | spyder_unittesting/__init__.py | Nodd/spyder.unittesting | 364925f5a029a1ad9fc3ed21380f724a45805a8a | [
"MIT"
] | null | null | null | spyder_unittesting/__init__.py | Nodd/spyder.unittesting | 364925f5a029a1ad9fc3ed21380f724a45805a8a | [
"MIT"
] | null | null | null | from .unittesting import UnitTesting as PLUGIN_CLASS
| 26.5 | 52 | 0.867925 |
79476ef07a27d73cc740ab6ca2ec97653f0814df | 953 | py | Python | httprunner_x/builtin/functions.py | xinxi1990/httprunner_x | 785e5e6e14a3bfc3cb2b5458e13f478fb2449abb | [
"Apache-2.0"
] | null | null | null | httprunner_x/builtin/functions.py | xinxi1990/httprunner_x | 785e5e6e14a3bfc3cb2b5458e13f478fb2449abb | [
"Apache-2.0"
] | null | null | null | httprunner_x/builtin/functions.py | xinxi1990/httprunner_x | 785e5e6e14a3bfc3cb2b5458e13f478fb2449abb | [
"Apache-2.0"
] | null | null | null | """
Built-in functions used in YAML/JSON testcases.
"""
import datetime
import random
import string
import time
from httprunner_x.compat import builtin_str, integer_types
from httprunner_x.exceptions import ParamsError
def gen_random_string(str_len):
""" generate random string with specified length
"""
... | 23.243902 | 84 | 0.690451 |
79476ef94c3633f780eebd926d354a810310b24a | 849 | py | Python | tests/read_tail_test.py | aescwork/sqliteminor | 83aa4f76a28141b085bbfc7f725531e0b67aeed5 | [
"BSD-2-Clause"
] | 1 | 2020-01-31T11:38:47.000Z | 2020-01-31T11:38:47.000Z | tests/read_tail_test.py | aescwork/sqliteminor | 83aa4f76a28141b085bbfc7f725531e0b67aeed5 | [
"BSD-2-Clause"
] | null | null | null | tests/read_tail_test.py | aescwork/sqliteminor | 83aa4f76a28141b085bbfc7f725531e0b67aeed5 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
import sqlite3
import sys
sys.path.append("../sqliteminor/")
sys.path.append("../temp/")
import sqliteminor
import setup_db
class ReadTailTest(unittest.TestCase):
def setUp(self):
self.conn = setup_db.setup_db()
self.read_tail_comp = [(13, u'Alder Buckthorn'), (14,... | 16.98 | 128 | 0.68669 |
79476f21bcd01ba4dda4c843311ca97e5e2de343 | 317 | py | Python | string-permutations.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | string-permutations.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | string-permutations.py | leaen/Codeeval-solutions | fa83cb4fba3e56f79c0a6b00361c18cd3092c3f0 | [
"MIT"
] | null | null | null | import sys
from itertools import permutations
def find_permutations(s):
return sorted([''.join(p) for p in permutations(s)])
def main():
with open(sys.argv[1]) as input_file:
for line in input_file:
print(','.join(find_permutations(line.strip())))
if __name__ == '__main__':
main()
| 22.642857 | 60 | 0.656151 |
794770a5d9f82714d2710b963ca2c4cb76c7063e | 3,779 | py | Python | src/scripts/lgb_benchmark_kfold.py | arnabbiswas1/k_tab_aug_muticlass_rmse_logloss_weightedf1_stratified_tsfresh_cesium | 13db3cb9d0b2f25181ccf4b1316e12425abfc276 | [
"Apache-2.0"
] | null | null | null | src/scripts/lgb_benchmark_kfold.py | arnabbiswas1/k_tab_aug_muticlass_rmse_logloss_weightedf1_stratified_tsfresh_cesium | 13db3cb9d0b2f25181ccf4b1316e12425abfc276 | [
"Apache-2.0"
] | null | null | null | src/scripts/lgb_benchmark_kfold.py | arnabbiswas1/k_tab_aug_muticlass_rmse_logloss_weightedf1_stratified_tsfresh_cesium | 13db3cb9d0b2f25181ccf4b1316e12425abfc276 | [
"Apache-2.0"
] | null | null | null | """
LGB Benchamrk with KFold
"""
import os
from datetime import datetime
from timeit import default_timer as timer
from sklearn.model_selection import KFold
import src.common as common
import src.config.constants as constants
import src.modeling.train_util as model
import src.munging.process_data_util as process_dat... | 28.413534 | 95 | 0.669754 |
7947717b579a25396a03c87e28eaa2ce361dbaf4 | 213 | py | Python | pytest_suit/routes/uploads/__init__.py | HotMaps/Toolbox | ba1e287dbc63e34bf9feb80b65b02c1db93ce91c | [
"Apache-2.0"
] | 4 | 2020-10-01T10:38:06.000Z | 2021-12-28T03:11:18.000Z | pytest_suit/routes/uploads/__init__.py | HotMaps/Toolbox | ba1e287dbc63e34bf9feb80b65b02c1db93ce91c | [
"Apache-2.0"
] | 9 | 2017-11-08T17:29:10.000Z | 2020-08-31T15:28:31.000Z | pytest_suit/routes/uploads/__init__.py | HotMaps/Toolbox | ba1e287dbc63e34bf9feb80b65b02c1db93ce91c | [
"Apache-2.0"
] | 4 | 2019-03-25T13:24:14.000Z | 2021-07-16T20:52:51.000Z | from .. import BASE_URL, test_csv_file, test_tif_file
from ..user import test_token
import uuid
import os
test_upload_name = 'pytest_upload_csv'
test_export_cm_layer_uuid = '3ef057c3-b65a-448f-9718-d46c33b9ec3b'
| 26.625 | 66 | 0.826291 |
794772e5b8c7b59f8be35d867e5c420464ce94ce | 524 | py | Python | my_shapes.py | goncalo-leal/tetris_ai_agent | ceebf9331bf4e4cafe25a61e1b53ffa20f104825 | [
"MIT"
] | null | null | null | my_shapes.py | goncalo-leal/tetris_ai_agent | ceebf9331bf4e4cafe25a61e1b53ffa20f104825 | [
"MIT"
] | null | null | null | my_shapes.py | goncalo-leal/tetris_ai_agent | ceebf9331bf4e4cafe25a61e1b53ffa20f104825 | [
"MIT"
] | 1 | 2022-02-16T17:53:55.000Z | 2022-02-16T17:53:55.000Z | """
Cada forma deve ter uma classe, no entanto essa classe não deve extender shape.
As classes individuais servirão para definir o número de rotações que cada peça pode
dar e para avaliar se um movimento é possível ou não.
"""
from constants import *
from shape import *
class MyShape:
def __init__(se... | 29.111111 | 89 | 0.685115 |
794773918c3da58b661bd4e442d7e1f68a61572e | 15,149 | py | Python | zabbix_script.py | bmcrosen/zabbix_script | bb846bd2622f219a823ad1a5b291dc54578fa927 | [
"MIT"
] | null | null | null | zabbix_script.py | bmcrosen/zabbix_script | bb846bd2622f219a823ad1a5b291dc54578fa927 | [
"MIT"
] | null | null | null | zabbix_script.py | bmcrosen/zabbix_script | bb846bd2622f219a823ad1a5b291dc54578fa927 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
@Create on: 2016-06-29 12:59
@Author: Rosen
"""
from __future__ import print_function
import argparse
import sys
from pyzabbix.api import ZabbixAPI
class Zabbix_Api:
def __init__(self, idc='qc'):
qc_url = ''
xg_url = ''
qc_auth = ''
xg_... | 44.166181 | 117 | 0.499703 |
794773a0d1c3ba8e292f6f840d46ce911df4def2 | 17,473 | py | Python | elastipy/aggregation/converter.py | defgsus/elastipy | c1144ab39fa70571ba0e02ccf41d380a8a1bd730 | [
"Apache-2.0"
] | 1 | 2021-02-17T17:50:28.000Z | 2021-02-17T17:50:28.000Z | elastipy/aggregation/converter.py | defgsus/elastipy | c1144ab39fa70571ba0e02ccf41d380a8a1bd730 | [
"Apache-2.0"
] | 2 | 2021-03-29T02:09:41.000Z | 2022-03-01T20:09:48.000Z | elastipy/aggregation/converter.py | netzkolchose/elastipy | c1144ab39fa70571ba0e02ccf41d380a8a1bd730 | [
"Apache-2.0"
] | null | null | null | from copy import copy, deepcopy
from itertools import chain
import fnmatch
from typing import Sequence, Union, Optional, Iterable, Tuple, TextIO, Any, Mapping, List
from .helper import dict_rows_to_list_rows, create_matrix, remove_matrix_axis
class ConverterMixin:
"""
Interface that uses Visitor(self) to
... | 34.531621 | 98 | 0.560522 |
794774412f0511a7497860f26e3a10fbf7a4eb28 | 662 | py | Python | old/find_solution.py | SPRACE/track-ml | 3af95fd014e98a5b11261dc5d618f34f82fdf84d | [
"MIT"
] | null | null | null | old/find_solution.py | SPRACE/track-ml | 3af95fd014e98a5b11261dc5d618f34f82fdf84d | [
"MIT"
] | 10 | 2019-04-15T21:44:31.000Z | 2020-08-26T21:05:00.000Z | old/find_solution.py | SPRACE/track-ml | 3af95fd014e98a5b11261dc5d618f34f82fdf84d | [
"MIT"
] | 4 | 2019-04-12T19:04:16.000Z | 2020-01-14T13:30:44.000Z | import random
import sys
sys.path.append('/home/silvio/github/track-ml-1/utils/')
from explorer_fake_tracks import *
err=0.3
for i in range(3):
err=err*0.1
err_string = "%.10f" % err
print(err_string)
with open('/data/ds') as f:
lines = random.sample(f.readlines(),1500)
with open('/data... | 24.518519 | 56 | 0.601208 |
7947744e364c92791793423764444d3e20e4afc2 | 9,444 | py | Python | OPTIMAQS/controller/controller/luigsneumann_SM5_modified.py | jeremyforest/whole_optic_gui | 7af257e739da90b8ce8b2531aa1c520959fa7bff | [
"MIT"
] | null | null | null | OPTIMAQS/controller/controller/luigsneumann_SM5_modified.py | jeremyforest/whole_optic_gui | 7af257e739da90b8ce8b2531aa1c520959fa7bff | [
"MIT"
] | 6 | 2021-02-02T23:09:14.000Z | 2022-03-12T00:52:01.000Z | OPTIMAQS/controller/controller/luigsneumann_SM5_modified.py | jeremyforest/whole_optic_gui | 7af257e739da90b8ce8b2531aa1c520959fa7bff | [
"MIT"
] | null | null | null | """
Luigs And Neumann 5 controller from https://github.com/romainbrette/manipulator
Modified for python3 compatilibility and personnal tweaks as neededself.
Device class for the Luigs and Neumann SM-5 manipulator controller.
Adapted from Michael Graupner's LandNSM5 class.
"""
from serialdevice import SerialDevice
i... | 29.148148 | 103 | 0.567238 |
7947746d6277d3e7b346273a345b775b5093ef54 | 1,024 | py | Python | prova/dashboard/views.py | mary023010/prova_django | a69a37a4f26f21018cef48e5d637dd630ca68877 | [
"MIT"
] | null | null | null | prova/dashboard/views.py | mary023010/prova_django | a69a37a4f26f21018cef48e5d637dd630ca68877 | [
"MIT"
] | null | null | null | prova/dashboard/views.py | mary023010/prova_django | a69a37a4f26f21018cef48e5d637dd630ca68877 | [
"MIT"
] | null | null | null | from django.shortcuts import render, redirect
from django.contrib.auth import authenticate, login
from django.contrib import messages
from django.template import context
from relazioni.models import *
# Create your views here.
'''def login_user(request):
if request.method == 'POST':
username = request.PO... | 32 | 74 | 0.685547 |
794774c266428ad142b3455da8173b54a0414f2f | 69,667 | py | Python | tests/sonic_xcvr/test_cmis.py | sujinmkang/sonic-platform-common | ab5973504c7858759cfd4976b3995f0bc198f56d | [
"Apache-2.0"
] | null | null | null | tests/sonic_xcvr/test_cmis.py | sujinmkang/sonic-platform-common | ab5973504c7858759cfd4976b3995f0bc198f56d | [
"Apache-2.0"
] | null | null | null | tests/sonic_xcvr/test_cmis.py | sujinmkang/sonic-platform-common | ab5973504c7858759cfd4976b3995f0bc198f56d | [
"Apache-2.0"
] | 1 | 2021-06-30T20:53:15.000Z | 2021-06-30T20:53:15.000Z | from mock import MagicMock
import pytest
from sonic_platform_base.sonic_xcvr.api.public.cmis import CmisApi
from sonic_platform_base.sonic_xcvr.mem_maps.public.cmis import CmisMemMap
from sonic_platform_base.sonic_xcvr.xcvr_eeprom import XcvrEeprom
from sonic_platform_base.sonic_xcvr.codes.public.cmis import CmisCodes
... | 45.924192 | 365 | 0.60248 |
794776090c22d0f8791d86196281e9728e81d84b | 1,592 | py | Python | multi_task/loss/build.py | mydkzgj/esm | 2170d436af021188f233fa88a233959c61bd1f23 | [
"MIT"
] | null | null | null | multi_task/loss/build.py | mydkzgj/esm | 2170d436af021188f233fa88a233959c61bd1f23 | [
"MIT"
] | null | null | null | multi_task/loss/build.py | mydkzgj/esm | 2170d436af021188f233fa88a233959c61bd1f23 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
@author: Jiayang Chen
@contact: yjcmydkzgj@gmail.com
"""
# Existing Losses
from torch.nn import CrossEntropyLoss
# Custom Losses (None)
from .secondary_structure_prediction_loss import SecondaryStructurePredictionLoss
from .contact_prediction_loss import ContactPredictionLoss
def build_loss(cf... | 35.377778 | 96 | 0.684673 |
79477611f1ef7d8f1d60080ae44aaa1c7eb4c9be | 2,066 | py | Python | tests/examples/test_examples.py | alvin-chang/lightning-flash | 481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5 | [
"Apache-2.0"
] | null | null | null | tests/examples/test_examples.py | alvin-chang/lightning-flash | 481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5 | [
"Apache-2.0"
] | null | null | null | tests/examples/test_examples.py | alvin-chang/lightning-flash | 481d4d369ff0a5d8c2b2d9e4970c5608a92b3ff5 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.382353 | 81 | 0.684414 |
794776544998bef81e3c6cac4815148976037ea5 | 118,576 | py | Python | tensorflow/python/training/saver_test.py | sorhus/tensorflow | 99de1826646c8d354259187fc9c2330b794c1ac4 | [
"Apache-2.0"
] | 1 | 2018-09-15T21:31:52.000Z | 2018-09-15T21:31:52.000Z | tensorflow/python/training/saver_test.py | sorhus/tensorflow | 99de1826646c8d354259187fc9c2330b794c1ac4 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/saver_test.py | sorhus/tensorflow | 99de1826646c8d354259187fc9c2330b794c1ac4 | [
"Apache-2.0"
] | 1 | 2021-08-30T22:33:25.000Z | 2021-08-30T22:33:25.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.66409 | 80 | 0.673307 |
7947771bed173c96f921d052741742e6078bb873 | 483 | py | Python | tools/telemetry/unittest_data/test_simple_two_page_set.py | shaochangbin/chromium-crosswalk | 634d34e4cf82b4f7400357c53ec12efaffe94add | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-16T03:57:28.000Z | 2021-01-23T15:29:45.000Z | tools/telemetry/unittest_data/test_simple_two_page_set.py | shaochangbin/chromium-crosswalk | 634d34e4cf82b4f7400357c53ec12efaffe94add | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/unittest_data/test_simple_two_page_set.py | shaochangbin/chromium-crosswalk | 634d34e4cf82b4f7400357c53ec12efaffe94add | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2017-03-15T13:21:38.000Z | 2017-03-15T13:21:38.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page.page_set import PageSet
class TestSimpleTwoPageSet(PageSet):
def __init__(self):
super(TestSimpleTwoPageSet, self).__init__(
... | 34.5 | 72 | 0.753623 |
794777f8ea85c1b5f482de2a2c7e1785b079c9fb | 275 | py | Python | blackbox_tests/test_keras_train/serve_model_from_h5.py | shfshf/seq2annotation | d4bf88a869631b43fa2974c2ffa1c5dd6a7623ed | [
"Apache-2.0"
] | 90 | 2018-11-29T07:05:16.000Z | 2021-11-22T11:32:58.000Z | blackbox_tests/test_keras_train/serve_model_from_h5.py | shfshf/seq2annotation | d4bf88a869631b43fa2974c2ffa1c5dd6a7623ed | [
"Apache-2.0"
] | 50 | 2019-06-27T07:11:18.000Z | 2022-02-10T00:01:02.000Z | blackbox_tests/test_keras_train/serve_model_from_h5.py | lanSeFangZhou/seq2annotation | a824520d46f0b3d70268fae422976a5ce1b3f4ce | [
"Apache-2.0"
] | 23 | 2019-01-03T14:57:15.000Z | 2022-03-08T07:50:33.000Z | from seq2annotation.server.tensorflow_keras_h5_inference import Inference
inference = Inference('./results/h5_model/model.h5', './results/h5_model/tag_lookup_table.json', './results/h5_model/vocabulary_lookup_table.json')
result = inference.infer("看一下上海的天气。")
print(result) | 45.833333 | 147 | 0.814545 |
794778467d721a6ae310eff4f32a64d1261f8570 | 3,444 | py | Python | sqlalchemy_media/tests/test_store_manager.py | jpmn/sqlalchemy-media | 7dee4aa70fc8979b6fbb39d04c27d897dd51ae2f | [
"MIT"
] | null | null | null | sqlalchemy_media/tests/test_store_manager.py | jpmn/sqlalchemy-media | 7dee4aa70fc8979b6fbb39d04c27d897dd51ae2f | [
"MIT"
] | 1 | 2020-08-07T14:40:38.000Z | 2020-08-07T14:42:28.000Z | sqlalchemy_media/tests/test_store_manager.py | jpmn/sqlalchemy-media | 7dee4aa70fc8979b6fbb39d04c27d897dd51ae2f | [
"MIT"
] | null | null | null | import unittest
import time
import threading
from sqlalchemy.orm.session import Session
from sqlalchemy_media.stores import StoreManager, Store
from sqlalchemy_media.exceptions import DefaultStoreError, ContextError
# noinspection PyAbstractClass
class DummyStore(Store):
pass
class StoreContextTestCase(unitte... | 29.947826 | 82 | 0.619919 |
7947784f05faac3f1ab8a0b7c5373ab29a86af87 | 599 | py | Python | tests/core.py | Forbear/tagcounter | cb326e2ff83a5743388143189718ad718afbddb3 | [
"MIT"
] | null | null | null | tests/core.py | Forbear/tagcounter | cb326e2ff83a5743388143189718ad718afbddb3 | [
"MIT"
] | null | null | null | tests/core.py | Forbear/tagcounter | cb326e2ff83a5743388143189718ad718afbddb3 | [
"MIT"
] | null | null | null | from tagcounter import TagCounter
def test_counter_command():
c = TagCounter(['sc_list'])
assert c.arguments.command == 'sc_list'
def test_counter_command_args():
c = TagCounter(['synthetic', 'arg1', 'arg2', 'arg3', 'arg4'])
assert c.arguments.command_args == ['arg1', 'arg2', 'arg3', 'arg4']
def t... | 27.227273 | 79 | 0.649416 |
794778537168e35dc5d00c8417b8e9965d218c3a | 2,858 | py | Python | pylibsimba/wallet.py | SIMBAChain/PyLibSIMBA | 8ed76110abc0b49a77c5dcbf94c5087af251c249 | [
"MIT"
] | 6 | 2019-11-04T15:51:31.000Z | 2021-09-09T10:39:37.000Z | pylibsimba/wallet.py | SIMBAChain/PyLibSIMBA | 8ed76110abc0b49a77c5dcbf94c5087af251c249 | [
"MIT"
] | 11 | 2019-10-02T14:17:23.000Z | 2021-05-21T12:41:54.000Z | pylibsimba/wallet.py | SIMBAChain/PyLibSIMBA | 8ed76110abc0b49a77c5dcbf94c5087af251c249 | [
"MIT"
] | 2 | 2020-02-18T13:48:29.000Z | 2021-05-07T20:05:37.000Z |
from hdwallet import BIP44HDWallet
from hdwallet.cryptocurrencies import EthereumMainnet
from hdwallet.utils import generate_mnemonic
from web3.auto import w3
from pylibsimba.base.wallet_base import WalletBase
from pylibsimba.exceptions import WalletNotFoundException
class Wallet(WalletBase):
def unlock_wallet(... | 30.731183 | 85 | 0.635059 |
79477923990a6470ba09990f061aa430bd61d736 | 94,811 | py | Python | sympy/polys/tests/test_polytools.py | josephmisiti/sympy | 683ccf471a826a75235694ae1ba3dd935d5c8e12 | [
"BSD-3-Clause"
] | 1 | 2020-12-27T18:43:22.000Z | 2020-12-27T18:43:22.000Z | sympy/polys/tests/test_polytools.py | josephmisiti/sympy | 683ccf471a826a75235694ae1ba3dd935d5c8e12 | [
"BSD-3-Clause"
] | null | null | null | sympy/polys/tests/test_polytools.py | josephmisiti/sympy | 683ccf471a826a75235694ae1ba3dd935d5c8e12 | [
"BSD-3-Clause"
] | null | null | null | """Tests for user-friendly public interface to polynomial functions. """
from sympy.polys.polytools import (
Poly, PurePoly, poly,
parallel_poly_from_expr,
degree, degree_list,
LC, LM, LT,
pdiv, prem, pquo, pexquo,
div, rem, quo, exquo,
half_gcdex, gcdex, invert,
subresultants,
resu... | 35.509738 | 133 | 0.515984 |
79477928937d76b96e26230c09cd2a208eb87e1e | 4,007 | py | Python | util/dataset.py | shpotes/License-Plate-Recognition | fed40cb1299ec6885bd8bebc47cb1db5d3ccd50a | [
"MIT"
] | null | null | null | util/dataset.py | shpotes/License-Plate-Recognition | fed40cb1299ec6885bd8bebc47cb1db5d3ccd50a | [
"MIT"
] | null | null | null | util/dataset.py | shpotes/License-Plate-Recognition | fed40cb1299ec6885bd8bebc47cb1db5d3ccd50a | [
"MIT"
] | null | null | null | import os, random, cv2
import numpy as np
def one_hot(class_numbers, num_classes=None):
if num_classes is None:
num_classes = np.max(class_numbers) + 1
return np.eye(num_classes, dtype=float)[class_numbers]
class DataSet:
def __init__(self, img_size, train, data_dir='.', validation=True):
... | 36.427273 | 100 | 0.595957 |
79477939c3da5dc986422871422b75299ed34e6d | 1,356 | py | Python | setup.py | Guiorgy/vaksina | 917de581a8fe1b77fa69484d1a88cbf2724c0610 | [
"MIT"
] | 39 | 2022-01-01T19:01:52.000Z | 2022-01-25T03:05:19.000Z | setup.py | Guiorgy/vaksina | 917de581a8fe1b77fa69484d1a88cbf2724c0610 | [
"MIT"
] | 10 | 2022-01-01T19:17:34.000Z | 2022-01-21T16:35:31.000Z | setup.py | Guiorgy/vaksina | 917de581a8fe1b77fa69484d1a88cbf2724c0610 | [
"MIT"
] | 14 | 2022-01-02T11:43:02.000Z | 2022-01-17T20:17:03.000Z | #!/usr/bin/env python3
# Copyright (c) 2022 Michael Casadevall
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | 38.742857 | 80 | 0.753687 |
794779ff5fed2ad99b5eadb8439ca947cf4e6ca9 | 2,604 | py | Python | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-polardb/aliyunsdkpolardb/request/v20170801/ResetAccountRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.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... | 35.189189 | 79 | 0.774962 |
79477bc2b9069f063dda32227e48a0ec9dedad3b | 473 | py | Python | ai_ml_projects/masters_courses/image_and_vision_processing/intensityscale.py | 5aurabhpathak/src | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2021-07-07T06:51:18.000Z | 2021-07-07T06:51:18.000Z | ai_ml_projects/masters_courses/image_and_vision_processing/intensityscale.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | null | null | null | ai_ml_projects/masters_courses/image_and_vision_processing/intensityscale.py | 5aurabhpathak/all-I-ve-done | dda72beba2aaae67542a2f10e89048e86d04cb28 | [
"BSD-3-Clause"
] | 1 | 2020-08-11T09:53:22.000Z | 2020-08-11T09:53:22.000Z | #!/bin/env python3.5
from matplotlib import pyplot as pl
from numpy import max, min
def disp(im, n, t):
pl.subplot(120 + n)
pl.title(t)
pl.axis('off')
pl.imshow(im, pl.get_cmap('Greys_r'))
im = pl.imread('data/cameraman.tif').astype('uint16')
print('In=\n',im)
disp(im,1, 'input')
out = (30 + im * 150... | 24.894737 | 83 | 0.638478 |
79477c512d217ca41158a4712a0d2403fe26c484 | 1,700 | py | Python | ZipFileLearn/zip.file.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | 1 | 2022-01-14T18:03:42.000Z | 2022-01-14T18:03:42.000Z | ZipFileLearn/zip.file.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | null | null | null | ZipFileLearn/zip.file.py | subash-kc/2022-01-04-Python | 5ce51e4265bcd860a4e62423edef6ec9cd1437b4 | [
"MIT"
] | null | null | null | # standard library imports
import os # low-level, operating system agnostic commands (i.e. supports most OSes)
import zipfile # tools to create, read, write, append, and list a ZIP file
# function to search for all files within a directory, and add them to our ZIP
def zipdir(dirpath, zipfileobj):
"""does the... | 50 | 108 | 0.684118 |
79477d323a9ad6facbdf21a306a568159ce97378 | 2,827 | py | Python | splt_panel.py | shachar700/SplatoonImageGenerator | 1b2aefbfac8f7ec6608f64084c01f241895cdaaa | [
"MIT"
] | 1 | 2021-08-25T05:16:10.000Z | 2021-08-25T05:16:10.000Z | splt_panel.py | shachar700/SplatoonImageGenerator | 1b2aefbfac8f7ec6608f64084c01f241895cdaaa | [
"MIT"
] | null | null | null | splt_panel.py | shachar700/SplatoonImageGenerator | 1b2aefbfac8f7ec6608f64084c01f241895cdaaa | [
"MIT"
] | 1 | 2021-08-25T10:24:43.000Z | 2021-08-25T10:24:43.000Z | import bpy
class SPLT_PT_Panel(bpy.types.Panel):
# bl_idname = "splatoonpanel"
bl_label = "Splatoon Tools"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "Splatoon Tools"
def draw(self, context):
layout = self.layout
box = layout.box()
box.label(text="B... | 35.3375 | 117 | 0.611249 |
79477f2450e5cd2dfc0f02eb54afde0b3970bd40 | 1,539 | py | Python | hooks/post_gen_project.py | movadaml/cookiecutter-flask | e2897cd231d5ff3433409e859d12f3838a9f5100 | [
"MIT"
] | null | null | null | hooks/post_gen_project.py | movadaml/cookiecutter-flask | e2897cd231d5ff3433409e859d12f3838a9f5100 | [
"MIT"
] | null | null | null | hooks/post_gen_project.py | movadaml/cookiecutter-flask | e2897cd231d5ff3433409e859d12f3838a9f5100 | [
"MIT"
] | null | null | null | """Post gen hook to ensure that the generated project
has only one package management, either pipenv or pip."""
import logging
import os
import shutil
import sys
_logger = logging.getLogger()
def clean_extra_package_management_files():
"""Removes either requirements files and folder or the Pipfile."""
use_pi... | 30.78 | 79 | 0.640026 |
79477fd0c8ac9b26098445b3efc5f6b23b296c86 | 998 | py | Python | kubernetes_asyncio/test/test_v1_limit_range_item.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | 1 | 2021-01-13T09:28:57.000Z | 2021-01-13T09:28:57.000Z | kubernetes_asyncio/test/test_v1_limit_range_item.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_v1_limit_range_item.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import u... | 24.341463 | 119 | 0.724449 |
794780d5bddf288a820cb853bd9c3e7290707489 | 522 | py | Python | applications/migrations/0024_application_hear_about.py | hackkosice/registration | 086103571638706e80b9215ab9f7d57e18ebf13e | [
"MIT"
] | 4 | 2019-02-04T21:21:34.000Z | 2021-03-25T01:49:21.000Z | applications/migrations/0024_application_hear_about.py | hackkosice/registration | 086103571638706e80b9215ab9f7d57e18ebf13e | [
"MIT"
] | null | null | null | applications/migrations/0024_application_hear_about.py | hackkosice/registration | 086103571638706e80b9215ab9f7d57e18ebf13e | [
"MIT"
] | 1 | 2018-11-19T10:17:19.000Z | 2018-11-19T10:17:19.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2018-11-07 21:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('applications', '0023_remove_application_lennyface'),
]
operations = [
migra... | 23.727273 | 63 | 0.630268 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.