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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79431f57fea0b57501f0b741fc5525f36deb446e | 15,940 | py | Python | google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 1 | 2022-03-30T05:23:29.000Z | 2022-03-30T05:23:29.000Z | google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 44.901408 | 156 | 0.694981 |
79431f6c8620c5bb789b61127c3482d9a3da4ec4 | 5,620 | py | Python | sprites.py | Alien-X1/demo | 3080bece951dae0ec4c6ae4e5c9c68752c4da849 | [
"MIT"
] | null | null | null | sprites.py | Alien-X1/demo | 3080bece951dae0ec4c6ae4e5c9c68752c4da849 | [
"MIT"
] | null | null | null | sprites.py | Alien-X1/demo | 3080bece951dae0ec4c6ae4e5c9c68752c4da849 | [
"MIT"
] | null | null | null | # sprite classes for game
# i used some ideas from CodePylet https://www.youtube.com/watch?v=osDofIdja6s&t=1038s
# i also borrowed pretty much all of this from kids can code - thanks!
# on acceleration https://www.khanacademy.org/science/physics/one-dimensional-motion/kinematic-formulas/v/average-velocity-for-constant-... | 33.058824 | 149 | 0.551957 |
79432040a1eefbd7c12c5cd2b1ceb7523a9fb53b | 4,004 | py | Python | tests/test_parametric_shapes/test_rotate_circle_shape.py | generein/paramak | cec738b278c285a17eaa69fc1f35ea4788204a8c | [
"MIT"
] | null | null | null | tests/test_parametric_shapes/test_rotate_circle_shape.py | generein/paramak | cec738b278c285a17eaa69fc1f35ea4788204a8c | [
"MIT"
] | null | null | null | tests/test_parametric_shapes/test_rotate_circle_shape.py | generein/paramak | cec738b278c285a17eaa69fc1f35ea4788204a8c | [
"MIT"
] | null | null | null | import math
import os
import unittest
from pathlib import Path
import pytest
from paramak import RotateCircleShape
class TestRotateCircleShape(unittest.TestCase):
def setUp(self):
self.test_shape = RotateCircleShape(points=[(60, 0)], radius=10)
def test_default_parameters(self):
"""Checks t... | 36.072072 | 86 | 0.60964 |
79432095898b506657384b3b2425f76f3e828a0c | 4,513 | py | Python | buildchain/buildchain/lint.py | n1603/metalk8s | 2f337a435380102055d3725f0cc2b6165818e880 | [
"Apache-2.0"
] | null | null | null | buildchain/buildchain/lint.py | n1603/metalk8s | 2f337a435380102055d3725f0cc2b6165818e880 | [
"Apache-2.0"
] | null | null | null | buildchain/buildchain/lint.py | n1603/metalk8s | 2f337a435380102055d3725f0cc2b6165818e880 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""Tasks for the linting.
This module runs the linting tools for several languages.
It provides a top level task to run all the linting tools, and each linting tool
is run in its own sub-task (so that you can run a single one and/or run several
linting tools in parallel).
Overview:
... | 28.031056 | 80 | 0.580545 |
79432095f0357c278ce0a23a4aa66c822b5839ac | 2,365 | py | Python | examples/exs_flw_diff2.py | CALFEM/calfem-py | 26d4082ca6b907c48ad814733c733ae30a959657 | [
"MIT"
] | null | null | null | examples/exs_flw_diff2.py | CALFEM/calfem-py | 26d4082ca6b907c48ad814733c733ae30a959657 | [
"MIT"
] | null | null | null | examples/exs_flw_diff2.py | CALFEM/calfem-py | 26d4082ca6b907c48ad814733c733ae30a959657 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# example exs8
#----------------------------------------------------------------
# PURPOSE
# Analysis of two dimensional diffusion
#----------------------------------------------------------------
# REFERENCES
# Karl-Gunnar Olsson 1995-10-08
# Ola Dahlblom 2004-09-14
#-------------... | 21.898148 | 65 | 0.471882 |
794320e3638bdcbc12a55b3937b8515c351f51ba | 879 | py | Python | algorithms/1360. Number of Days Between Two Dates.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | 1 | 2020-12-02T13:54:30.000Z | 2020-12-02T13:54:30.000Z | algorithms/1360. Number of Days Between Two Dates.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | algorithms/1360. Number of Days Between Two Dates.py | vuzway9132/leetcode | e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf | [
"MIT"
] | null | null | null | class Solution:
def leap_year(self, year):
return ((year % 400 == 0) or (year % 100 != 0 and year % 4 == 0))
def date_to_int(self, year, month, day):
month_length = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
ans = day - 1
while month != 0:
month -= ... | 36.625 | 74 | 0.481229 |
794321123a7ac666ab7a65717825d18a1aad7a85 | 825 | py | Python | server/migrations/versions/0b369a32394d_configuration_table.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/0b369a32394d_configuration_table.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | server/migrations/versions/0b369a32394d_configuration_table.py | momikey/liblio | c7ad4fd8d72369358863b90e34f3ed89ddef753c | [
"MIT"
] | null | null | null | """Configuration table
Revision ID: 0b369a32394d
Revises: e49c6bed4fb4
Create Date: 2019-10-23 19:26:06.737006
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '0b369a32394d'
down_revision = 'e49c6bed4fb4'
branch_labels ... | 25 | 78 | 0.70303 |
7943229625d18914b65d0ea293b9d90220d97914 | 7,287 | py | Python | plaid/model/asset_report_audit_copy_create_response.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | 289 | 2015-01-21T20:13:18.000Z | 2022-03-30T18:33:50.000Z | plaid/model/asset_report_audit_copy_create_response.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | 203 | 2015-01-06T22:00:50.000Z | 2022-03-24T21:28:55.000Z | plaid/model/asset_report_audit_copy_create_response.py | Aky87/plaid-python | af56d445a9e0178b33fb0443f8399dd51c024fe1 | [
"MIT"
] | 144 | 2015-01-02T22:42:05.000Z | 2022-02-18T20:00:58.000Z | """
The Plaid API
The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from plaid.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal... | 40.938202 | 179 | 0.594895 |
794322eec302b2cd4cb3fbced8a58f08d06a7f44 | 1,362 | py | Python | masonite/commands/MigrateStatusCommand.py | w3x10e8/core | d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49 | [
"MIT"
] | null | null | null | masonite/commands/MigrateStatusCommand.py | w3x10e8/core | d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49 | [
"MIT"
] | null | null | null | masonite/commands/MigrateStatusCommand.py | w3x10e8/core | d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49 | [
"MIT"
] | null | null | null | """ Migrate Status Command """
import os
import sys
from subprocess import check_output
from cleo import Command
from masonite.packages import add_venv_site_packages
class MigrateStatusCommand(Command):
"""
Migrate status
migrate:status
"""
def handle(self):
sys.path.append(os.getcwd())... | 28.978723 | 94 | 0.558003 |
7943239c3a5edae204f615f822e15bd1de3f8f70 | 2,646 | py | Python | eve/tests/methods/patch_atomic_concurrency.py | kinuax/eve | c62941992b2f66fa02b822581891bd7c18e76d9c | [
"BSD-3-Clause"
] | null | null | null | eve/tests/methods/patch_atomic_concurrency.py | kinuax/eve | c62941992b2f66fa02b822581891bd7c18e76d9c | [
"BSD-3-Clause"
] | null | null | null | eve/tests/methods/patch_atomic_concurrency.py | kinuax/eve | c62941992b2f66fa02b822581891bd7c18e76d9c | [
"BSD-3-Clause"
] | null | null | null | import simplejson as json
import sys
import eve.methods.common
from eve.tests import TestBase
from eve.utils import config
"""
Atomic Concurrency Checks
Prior to commit 54fd697 from 2016-November, ETags would be verified
twice during a patch. One ETag check would be non-atomic by Eve,
then again atomically by MongoDB... | 35.756757 | 82 | 0.718443 |
79432406f1641a6e666e2c85181b522101dbcfd6 | 18,434 | py | Python | sdk/python/pulumi_google_native/pubsub/v1beta2/subscription_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/pubsub/v1beta2/subscription_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/pubsub/v1beta2/subscription_iam_policy.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # 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... | 84.949309 | 1,118 | 0.713302 |
794325bb871626ee5b889841fc5242524ef39ca1 | 12,861 | py | Python | hubblestack/module_runner/audit_runner.py | mew1033/hubble | 74a8a2ec03ff1497045876c1e0208f4ff9f8bc3b | [
"Apache-2.0"
] | null | null | null | hubblestack/module_runner/audit_runner.py | mew1033/hubble | 74a8a2ec03ff1497045876c1e0208f4ff9f8bc3b | [
"Apache-2.0"
] | null | null | null | hubblestack/module_runner/audit_runner.py | mew1033/hubble | 74a8a2ec03ff1497045876c1e0208f4ff9f8bc3b | [
"Apache-2.0"
] | null | null | null | import os
import logging
import fnmatch
import hubblestack.module_runner.runner
from hubblestack.module_runner.runner import Caller
import hubblestack.module_runner.comparator
from hubblestack.exceptions import HubbleCheckVersionIncompatibleError
from hubblestack.exceptions import HubbleCheckValidationError
log = l... | 45.285211 | 122 | 0.612472 |
7943264c1335bb6e9808dbf21755f0962c30f1da | 1,821 | py | Python | AlgorithmFactories/ClassificationAlgorithmFactories/SVCAlgorithmFactory.py | CzakoZoltan08/AutoAI | 63436d159f0ac5ac1714868f5dad57efdc382ee8 | [
"MIT"
] | 2 | 2020-03-26T02:27:50.000Z | 2021-05-31T18:49:55.000Z | AlgorithmFactories/ClassificationAlgorithmFactories/SVCAlgorithmFactory.py | CzakoZoltan08/COVID-19-patient-filtering-using-AutomaticAI | 87c4cb1d2848a0258b0b6d652316cb69de382ff0 | [
"MIT"
] | null | null | null | AlgorithmFactories/ClassificationAlgorithmFactories/SVCAlgorithmFactory.py | CzakoZoltan08/COVID-19-patient-filtering-using-AutomaticAI | 87c4cb1d2848a0258b0b6d652316cb69de382ff0 | [
"MIT"
] | 3 | 2019-11-11T11:32:46.000Z | 2020-04-26T05:59:33.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 29 22:16:40 2019
@author: Zoltan
"""
from collections import OrderedDict
from sklearn.svm import SVC
from ..Algorithm import Algorithm
const_param = {
"probability": False
}
dicrete_hyper_parameter_list_of_shrinking = [True, False]
dicrete_hyper_parameter_l... | 33.722222 | 109 | 0.724876 |
7943281d7e19ec9f47dd7d704905eb71007755a5 | 13,143 | py | Python | troposphere/autoscaling.py | vasinov/troposphere | db117248dfb0fc500ae9d10db34c42608240bb8d | [
"BSD-2-Clause"
] | null | null | null | troposphere/autoscaling.py | vasinov/troposphere | db117248dfb0fc500ae9d10db34c42608240bb8d | [
"BSD-2-Clause"
] | null | null | null | troposphere/autoscaling.py | vasinov/troposphere | db117248dfb0fc500ae9d10db34c42608240bb8d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from . import AWSHelperFn, AWSObject, AWSProperty, FindInMap, If, Ref, cloudformation
from .validators import boolean, exactly_one, integer, mutually_exclusive
EC2_INSTANCE_LAUNCH = "autoscaling:EC2_INST... | 32.612903 | 121 | 0.610972 |
794328b682bff21ecfb9c543a51b834f02ebd719 | 609 | py | Python | gamer_registration_system/con/migrations/0002_event_creator.py | splummer/gamer_reg | 7cccbbf8e6e52e46594c8128a7e7a523b8202f03 | [
"MIT"
] | null | null | null | gamer_registration_system/con/migrations/0002_event_creator.py | splummer/gamer_reg | 7cccbbf8e6e52e46594c8128a7e7a523b8202f03 | [
"MIT"
] | null | null | null | gamer_registration_system/con/migrations/0002_event_creator.py | splummer/gamer_reg | 7cccbbf8e6e52e46594c8128a7e7a523b8202f03 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.8 on 2018-09-08 04:42
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('con', '0001_initial'),
... | 26.478261 | 121 | 0.663383 |
79432a1e3cd9fe0d8a4ac78b9b1f9009e4ec3049 | 1,237 | py | Python | virtual/lib/python3.8/site-packages/flask_wtf/i18n.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 1,064 | 2015-01-08T09:39:47.000Z | 2021-05-25T09:56:13.000Z | virtual/lib/python3.8/site-packages/flask_wtf/i18n.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 257 | 2015-01-18T12:41:06.000Z | 2021-05-24T17:35:04.000Z | virtual/lib/python3.8/site-packages/flask_wtf/i18n.py | Lenus254/personal_blog | aac38e4b5372c86efa8e24db2e051fef8e5feef8 | [
"Unlicense"
] | 299 | 2015-01-20T20:14:17.000Z | 2021-05-17T10:37:00.000Z | from babel import support
from flask import current_app
from flask import request
from wtforms.i18n import messages_path
try:
from flask_babel import get_locale
except ImportError:
from flask_babelex import get_locale
__all__ = ("Translations", "translations")
def _get_translations():
"""Returns the cor... | 23.788462 | 65 | 0.687146 |
79432ae247d641386b3f81108b336fa966097a0e | 303 | py | Python | ExplicitIntegration/Term/__init__.py | robotsorcerer/LevelSetPy | 54064ee7fd0144e0d658dd4f6121cbc1fda664b9 | [
"MIT"
] | 4 | 2022-03-14T07:04:08.000Z | 2022-03-14T18:08:56.000Z | ExplicitIntegration/Term/__init__.py | robotsorcerer/LevelSetPy | 54064ee7fd0144e0d658dd4f6121cbc1fda664b9 | [
"MIT"
] | null | null | null | ExplicitIntegration/Term/__init__.py | robotsorcerer/LevelSetPy | 54064ee7fd0144e0d658dd4f6121cbc1fda664b9 | [
"MIT"
] | null | null | null | from .term_disc import *
from .term_trace_hess import *
from .term_convection import *
from .term_curvature import *
from .term_forcing import *
from .term_lax_friedrich import *
from .term_normal import *
from .term_sum import *
from .term_reinit import *
from .term_restrict_update import *
| 27.545455 | 36 | 0.768977 |
79432babadfa228f5938116346b39e4329aec745 | 3,101 | py | Python | cereal/services.py | bluetulippon/openpilot | 6c57630941cbcd9c0154790271ac7942c7e6c48d | [
"MIT"
] | 6 | 2020-12-01T06:35:17.000Z | 2022-03-21T09:52:29.000Z | cereal/services.py | bluetulippon/openpilot | 6c57630941cbcd9c0154790271ac7942c7e6c48d | [
"MIT"
] | null | null | null | cereal/services.py | bluetulippon/openpilot | 6c57630941cbcd9c0154790271ac7942c7e6c48d | [
"MIT"
] | 2 | 2021-11-19T02:49:09.000Z | 2021-11-22T17:24:18.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2020-2022 bluetulippon@gmail.com Chad_Peng(Pon).
# All Rights Reserved.
# Confidential and Proprietary - bluetulippon@gmail.com Chad_Peng(Pon).
#
import os
from typing import Optional
TICI = os.path.isfile('/TICI')
RESERVED_PORT = 8022 # sshd
STARTING_PORT = 8001
def new_po... | 30.401961 | 106 | 0.620445 |
79432bbdf56732c3c9e96781c123f1a270e6f5b8 | 6,610 | py | Python | ogr/services/github/pull_request.py | AdarLavi/ogr | fe64b280c0fd5ef15d79991c233c67c9888ae486 | [
"MIT"
] | null | null | null | ogr/services/github/pull_request.py | AdarLavi/ogr | fe64b280c0fd5ef15d79991c233c67c9888ae486 | [
"MIT"
] | null | null | null | ogr/services/github/pull_request.py | AdarLavi/ogr | fe64b280c0fd5ef15d79991c233c67c9888ae486 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, m... | 32.885572 | 85 | 0.657035 |
79432bc180b8ec47405573bf7adc3f4e22b3e9fe | 7,278 | py | Python | nipype/interfaces/tests/test_nilearn.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nipype/interfaces/tests/test_nilearn.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nipype/interfaces/tests/test_nilearn.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 2 | 2017-09-23T16:22:00.000Z | 2019-08-01T14:18:52.000Z | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import os
import numpy as np
from ...testing import utils
from .. import nilearn as iface
from ...pipeline import engine as pe
import pytest
import numpy.testing as npt
no_nilearn = True
try:
__imp... | 36.208955 | 79 | 0.55496 |
79432beb9ea639dbdb09aca51157508eb26315b4 | 42,383 | py | Python | src/openprocurement/tender/belowthreshold/tests/complaint_blanks.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 10 | 2020-02-18T01:56:21.000Z | 2022-03-28T00:32:57.000Z | src/openprocurement/tender/belowthreshold/tests/complaint_blanks.py | quintagroup/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 26 | 2018-07-16T09:30:44.000Z | 2021-02-02T17:51:30.000Z | src/openprocurement/tender/belowthreshold/tests/complaint_blanks.py | ProzorroUKR/openprocurement.api | 2855a99aa8738fb832ee0dbad4e9590bd3643511 | [
"Apache-2.0"
] | 15 | 2019-08-08T10:50:47.000Z | 2022-02-05T14:13:36.000Z | # -*- coding: utf-8 -*-
from openprocurement.api.utils import get_now
from datetime import timedelta
from copy import deepcopy
from mock import patch
from openprocurement.tender.belowthreshold.tests.base import (
test_draft_claim, test_claim, test_author
)
# TenderComplaintResourceTest
def create_tender_complain... | 42.941236 | 120 | 0.647595 |
79432c1b4c88335d74ba18fb0e5549d2d7b2d29e | 409 | py | Python | reo/migrations/0095_chpmodel_cooling_thermal_factor.py | akuam1/REopt_Lite_API | fb5a88ee52351b725fda5c15712b617f6e97ddca | [
"BSD-3-Clause"
] | 41 | 2020-02-21T08:25:17.000Z | 2022-01-14T23:06:42.000Z | reo/migrations/0095_chpmodel_cooling_thermal_factor.py | akuam1/REopt_Lite_API | fb5a88ee52351b725fda5c15712b617f6e97ddca | [
"BSD-3-Clause"
] | 167 | 2020-02-17T17:26:47.000Z | 2022-01-20T20:36:54.000Z | reo/migrations/0095_chpmodel_cooling_thermal_factor.py | akuam1/REopt_Lite_API | fb5a88ee52351b725fda5c15712b617f6e97ddca | [
"BSD-3-Clause"
] | 31 | 2020-02-20T00:22:51.000Z | 2021-12-10T05:48:08.000Z | # Generated by Django 2.2.13 on 2021-01-08 02:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reo', '0094_merge_20210105_1749'),
]
operations = [
migrations.AddField(
model_name='chpmodel',
name='cooling_therm... | 21.526316 | 59 | 0.613692 |
79432c94940c0d15b3bda25427f3464041fa2048 | 1,960 | py | Python | dump_match/sun3d.py | hoverinc/OANet | 51d71ff3f57161e912ec72420cd91cf7db64ab74 | [
"MIT"
] | 209 | 2019-08-13T23:53:03.000Z | 2022-03-24T11:33:07.000Z | dump_match/sun3d.py | hoverinc/OANet | 51d71ff3f57161e912ec72420cd91cf7db64ab74 | [
"MIT"
] | 273 | 2021-01-30T16:45:26.000Z | 2022-03-16T15:02:33.000Z | dump_match/sun3d.py | hoverinc/OANet | 51d71ff3f57161e912ec72420cd91cf7db64ab74 | [
"MIT"
] | 45 | 2019-08-16T08:27:17.000Z | 2022-02-05T00:50:35.000Z | import argparse
from dataset import Dataset
def str2bool(v):
return v.lower() in ("true", "1")
# Parse command line arguments.
parser = argparse.ArgumentParser(description='extract sift.')
parser.add_argument('--raw_data_path', type=str, default='../raw_data/',
help='raw data path. default:../raw_data/')
parser.... | 46.666667 | 122 | 0.646429 |
79432c951b4fdcc10073929821c93bbe684f4f12 | 10,111 | py | Python | config_generator.py | kerkkoh/dayzconfiggen | f2519ce033c85f634e8622c10de3971ce83fb2f9 | [
"MIT"
] | null | null | null | config_generator.py | kerkkoh/dayzconfiggen | f2519ce033c85f634e8622c10de3971ce83fb2f9 | [
"MIT"
] | null | null | null | config_generator.py | kerkkoh/dayzconfiggen | f2519ce033c85f634e8622c10de3971ce83fb2f9 | [
"MIT"
] | null | null | null | #####################################################
### Lazy DayZ config generator 1.0.0 - By Kerkkoh ###
#####################################################
### Prerequisites: - Python >3.0 ###
### License: MIT License ###
### Use at your own discretion! ... | 32.934853 | 183 | 0.55138 |
79432ded82cb8378f0689611a6d609c0012bccba | 7,824 | py | Python | tensorflow_addons/optimizers/moving_average.py | leondgarse/addons | 6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2 | [
"Apache-2.0"
] | 1,560 | 2018-11-26T23:57:34.000Z | 2022-03-27T10:37:34.000Z | tensorflow_addons/optimizers/moving_average.py | leondgarse/addons | 6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2 | [
"Apache-2.0"
] | 2,067 | 2018-11-28T04:40:23.000Z | 2022-03-31T11:36:50.000Z | tensorflow_addons/optimizers/moving_average.py | leondgarse/addons | 6c512e1ec49ae14ca61f1bbf0fd3403204ba21e2 | [
"Apache-2.0"
] | 679 | 2018-11-27T14:39:25.000Z | 2022-03-31T10:09:22.000Z | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.53886 | 89 | 0.627045 |
79432df34cbd7edf5ac9e30a44697c0d28de2fb5 | 3,961 | py | Python | build/lib/tec/ic/ia/pc2/test_astar.py | Fuabioo/Proyecto-Corto-2-3 | 44bdfd5f2774e2d0d8c8af79dc55dac340f6f4b0 | [
"MIT"
] | null | null | null | build/lib/tec/ic/ia/pc2/test_astar.py | Fuabioo/Proyecto-Corto-2-3 | 44bdfd5f2774e2d0d8c8af79dc55dac340f6f4b0 | [
"MIT"
] | null | null | null | build/lib/tec/ic/ia/pc2/test_astar.py | Fuabioo/Proyecto-Corto-2-3 | 44bdfd5f2774e2d0d8c8af79dc55dac340f6f4b0 | [
"MIT"
] | null | null | null | """
Testing module
"""
import pytest
import tec.ic.ia.pc2.g08
def get_rectangle_input():
"""
Obtains pre-defined testing base astar that is assured not to fail
"""
args = g08.get_args()
args.a_estrella = True
args.vision = 2
args.zanahorias = 2
args.tablero_inicial = "5x4.txt"
resu... | 27.506944 | 72 | 0.609695 |
79432eb2ef4f21e777459487f94612b1f6759a8a | 1,448 | py | Python | app/geobox/process/__init__.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | 2 | 2018-10-24T06:32:42.000Z | 2021-01-20T02:25:05.000Z | app/geobox/process/__init__.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | null | null | null | app/geobox/process/__init__.py | omniscale/gbi-client | c8af68ede195150b2aca0516ac8e030fe4ba1f6d | [
"Apache-2.0"
] | 17 | 2018-10-24T06:32:45.000Z | 2022-02-09T13:10:54.000Z | # This file is part of the GBI project.
# Copyright (C) 2012 Omniscale GmbH & Co. KG <http://omniscale.com>
#
# 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/licens... | 36.2 | 74 | 0.773481 |
79432f80dd4cc827a06cde717022fb448395ad01 | 1,283 | py | Python | tests/python/gaia-ui-tests/gaiatest/mixins/imagecompare.py | NickProgramm/gaia | 975a35c0f5010df341e96d6c5ec60217f5347412 | [
"Apache-2.0"
] | 3 | 2016-08-17T08:52:51.000Z | 2020-03-29T04:56:45.000Z | tests/python/gaia-ui-tests/gaiatest/mixins/imagecompare.py | NickProgramm/gaia | 975a35c0f5010df341e96d6c5ec60217f5347412 | [
"Apache-2.0"
] | 1 | 2017-02-21T21:36:12.000Z | 2017-02-21T21:36:30.000Z | tests/python/gaia-ui-tests/gaiatest/mixins/imagecompare.py | NickProgramm/gaia | 975a35c0f5010df341e96d6c5ec60217f5347412 | [
"Apache-2.0"
] | 1 | 2021-11-18T21:21:19.000Z | 2021-11-18T21:21:19.000Z | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class GaiaImageCompareArguments(object):
name = 'Gaia Image Compare'
args = [
[['--store-reference-ima... | 37.735294 | 114 | 0.587685 |
794330e8319f2b979a19cd8b7e79bdc9f111d6b9 | 12,711 | py | Python | src/fuzzylogic/functions.py | amogorkon/fuzzy | 07779ea36c979224dbb6ebd87d19b57fd8e3ed9b | [
"MIT"
] | null | null | null | src/fuzzylogic/functions.py | amogorkon/fuzzy | 07779ea36c979224dbb6ebd87d19b57fd8e3ed9b | [
"MIT"
] | null | null | null | src/fuzzylogic/functions.py | amogorkon/fuzzy | 07779ea36c979224dbb6ebd87d19b57fd8e3ed9b | [
"MIT"
] | null | null | null |
"""
General-purpose functions that map R -> [0,1].
These functions work as closures.
The inner function uses the variables of the outer function.
These functions work in two steps: prime and call.
In the first step the function is constructed, initialized and
constants pre-evaluated. In the second step the actual v... | 24.350575 | 87 | 0.533868 |
7943313b2002f12f4a5cdc2b678f56c9e1ac8252 | 6,539 | py | Python | rackio/api/log_hook.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | rackio/api/log_hook.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | rackio/api/log_hook.py | crivero7/rackio-framework | d3362041b1fc4c3af7eb51ac06b1f0f1b5aa497c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""rackio/api/log_hook.py
This module implements a hook class caller for decorating RackioResources.
"""
import logging
from .hook import rackio_hook
from datetime import datetime
from rackio.events import Event
from rackio.logger import LoggerEngine
class Log(object):
def __call__(self,... | 30.556075 | 102 | 0.57547 |
79433353bf1d88c379ae0df358c3b277bc1dad4b | 1,248 | py | Python | inst/pythonScript/reformatRMgff.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | null | null | null | inst/pythonScript/reformatRMgff.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | null | null | null | inst/pythonScript/reformatRMgff.py | niccw/repeatCraft | 84ac019189a940d884ec61b5aab0b7b87a74ed52 | [
"MIT"
] | 1 | 2022-02-19T13:30:57.000Z | 2022-02-19T13:30:57.000Z | import sys
import re
if len(sys.argv) != 3:
sys.exit("Usage: rmGffAddClass2Attr.py <repeatmasker.gff> <repeatmasker.out> \
\nReformt repeatmasker gff. Type column -> General repeat class; Attribute -> ID:(repeat-family)")
rmgff = sys.argv[1]
rmout = sys.argv[2]
# Find out the repeat:repeatClass pair
cl... | 32 | 111 | 0.604968 |
79433375103ab5b7e74782416681f9bef016ca37 | 1,061 | py | Python | config/urls.py | evangelos-ch/MangAdventure | dab893db0bf93dba279fa9e3b7a01293013bc0f6 | [
"MIT"
] | 2 | 2018-09-24T03:46:55.000Z | 2018-10-12T16:20:25.000Z | config/urls.py | evangelos-ch/MangAdventure | dab893db0bf93dba279fa9e3b7a01293013bc0f6 | [
"MIT"
] | 6 | 2018-10-08T15:59:40.000Z | 2019-02-02T16:35:33.000Z | config/urls.py | evangelos-ch/MangAdventure | dab893db0bf93dba279fa9e3b7a01293013bc0f6 | [
"MIT"
] | null | null | null | """The URLconf of the config app."""
from importlib.util import find_spec
from django.conf import settings
from django.contrib.flatpages.views import flatpage
from django.urls import include, path
info_page = flatpage
if find_spec('csp'): # pragma: no cover
from csp.decorators import csp_update
info_page = ... | 29.472222 | 70 | 0.688973 |
794333c9298b785723c235685257c8252fc0bfe1 | 192 | py | Python | Strings/name_separator_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | Strings/name_separator_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | Strings/name_separator_FIXME.py | lvolkmann/couch-to-coder-python-exercises | afecb696d93eead9ba50613dc0723f2eca92d11a | [
"MIT"
] | null | null | null | """
Write a program to take the list of names below and print
"Hello, {first} {last}"
for each item in the list
"""
names = ["Jobs, Steve", "Gates, Bill", "Musk, Elon", "Hopper, Grace"]
| 14.769231 | 69 | 0.635417 |
794334942e74a338c678f0e4ef05361f3b3b08f9 | 255 | py | Python | PycharmProjects/cursoemvideo/AULA 11 CORES.py | AlexandreSoaresValerio/Pycharm | e2a9d1ae2833bf3e39244393a5bf807f892eaec5 | [
"MIT"
] | null | null | null | PycharmProjects/cursoemvideo/AULA 11 CORES.py | AlexandreSoaresValerio/Pycharm | e2a9d1ae2833bf3e39244393a5bf807f892eaec5 | [
"MIT"
] | null | null | null | PycharmProjects/cursoemvideo/AULA 11 CORES.py | AlexandreSoaresValerio/Pycharm | e2a9d1ae2833bf3e39244393a5bf807f892eaec5 | [
"MIT"
] | null | null | null | #print('\33[7;30móla mundo!\033[m')
#a = 3
#b = 5
#print('Os valores são \033[32m{}\033[m e \033[32m{}\033[m!!!'.format(a,b))
cores = {'limpa':'\033[m',
'azul' : '\033[34m',
'amarelo' : '\033[33m',
'pretoecranco':'\033[7;30m]'}
| 28.333333 | 75 | 0.505882 |
794334bbf984ef1390feb61798a933c2b416c57a | 889 | py | Python | tests/test_unit/test_compound.py | biosustain/multitfa | ab5a9bf6c19a94a221c9a137cccfcacdc2c1cb50 | [
"Apache-2.0"
] | 4 | 2020-11-27T20:25:57.000Z | 2021-03-12T22:01:34.000Z | tests/test_unit/test_compound.py | biosustain/multitfa | ab5a9bf6c19a94a221c9a137cccfcacdc2c1cb50 | [
"Apache-2.0"
] | 8 | 2020-11-29T23:56:31.000Z | 2021-04-09T11:23:17.000Z | tests/test_unit/test_compound.py | biosustain/multitfa | ab5a9bf6c19a94a221c9a137cccfcacdc2c1cb50 | [
"Apache-2.0"
] | 1 | 2021-11-11T09:22:57.000Z | 2021-11-11T09:22:57.000Z | import numpy as np
import pytest
from numpy.testing._private.utils import assert_approx_equal
from multitfa.core import Thermo_met
from .load_test_model import build_test_model
@pytest.fixture
def tfa_met():
tfa_model = build_test_model()
return tfa_model.metabolites.get_by_id("atp_c")
def test_variables(... | 27.78125 | 81 | 0.79865 |
794335b797dd52baf274e28aafd409396ef5ef91 | 15,658 | py | Python | cassis/xmi.py | ArneDefauw/dkpro-cassis | 627687225cab8fae47d386cd50c442e5b239a2f1 | [
"Apache-2.0"
] | null | null | null | cassis/xmi.py | ArneDefauw/dkpro-cassis | 627687225cab8fae47d386cd50c442e5b239a2f1 | [
"Apache-2.0"
] | null | null | null | cassis/xmi.py | ArneDefauw/dkpro-cassis | 627687225cab8fae47d386cd50c442e5b239a2f1 | [
"Apache-2.0"
] | null | null | null | from collections import defaultdict
from io import BytesIO
from typing import Dict, IO, Union, List, Set, Iterable
import attr
from lxml import etree
from cassis.cas import Cas, Sofa, View, IdGenerator
from cassis.typesystem import FeatureStructure, TypeSystem
@attr.s
class ProtoView:
""" A view element from X... | 39.540404 | 120 | 0.551092 |
7943371e32fefe890bc266be3e736f886dbfb4ca | 703 | py | Python | testes/cev/menu/__init__.py | pablocarracci/cev-python | dd6c2db80be84ec732fc5efd895e11d48d298258 | [
"MIT"
] | null | null | null | testes/cev/menu/__init__.py | pablocarracci/cev-python | dd6c2db80be84ec732fc5efd895e11d48d298258 | [
"MIT"
] | null | null | null | testes/cev/menu/__init__.py | pablocarracci/cev-python | dd6c2db80be84ec732fc5efd895e11d48d298258 | [
"MIT"
] | null | null | null | # Módulo menu do pacote cev
from cev.dado import le_int
def exibe_menu(opcoes, texto='MENU PRINCIPAL'):
'''Exibe um menu de opções e retorna a opção selecionada.'''
cabecalho(texto, '-', 25)
exibe_opcoes(opcoes)
print((len(texto) + 25) * '-')
return le_int('Sua Opção: ', 'ERRO: digite um número i... | 27.038462 | 74 | 0.637269 |
79433801958347fa609680befdfa3a1c8b66f958 | 16,074 | py | Python | benchexec/tools/ultimate.py | carolemieux/benchexec | 8e4b999150a6b0e686c1e9cc62d38a05aed6f875 | [
"Apache-2.0"
] | null | null | null | benchexec/tools/ultimate.py | carolemieux/benchexec | 8e4b999150a6b0e686c1e9cc62d38a05aed6f875 | [
"Apache-2.0"
] | null | null | null | benchexec/tools/ultimate.py | carolemieux/benchexec | 8e4b999150a6b0e686c1e9cc62d38a05aed6f875 | [
"Apache-2.0"
] | null | null | null | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2015 Daniel Dietsch
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
... | 42.636605 | 118 | 0.610862 |
794338f37b8e54755950ac8200fc88a1d940442a | 1,957 | py | Python | website.py | MaTachi/html-to-wordpress | a3abf187dd47f3385898563e00a1e2c2d09f5625 | [
"MIT"
] | null | null | null | website.py | MaTachi/html-to-wordpress | a3abf187dd47f3385898563e00a1e2c2d09f5625 | [
"MIT"
] | null | null | null | website.py | MaTachi/html-to-wordpress | a3abf187dd47f3385898563e00a1e2c2d09f5625 | [
"MIT"
] | null | null | null | import sys
from flask import Flask, render_template, request, make_response
from backend import post
app = Flask(__name__)
@app.route('/', methods=['POST', 'GET'])
def index():
if request.method == 'POST':
remove_new_window_link = True if request.form.get(
'remove_new_window_link', False) el... | 42.543478 | 77 | 0.599387 |
79433a2202289ac9cfdcad2627678bd073b7498d | 1,823 | py | Python | petition.py | jemitk/petition-app | 75e6557bd0282f4c23be26ba3b539138ed820ced | [
"MIT"
] | null | null | null | petition.py | jemitk/petition-app | 75e6557bd0282f4c23be26ba3b539138ed820ced | [
"MIT"
] | null | null | null | petition.py | jemitk/petition-app | 75e6557bd0282f4c23be26ba3b539138ed820ced | [
"MIT"
] | null | null | null | from flask import Flask, render_template, flash, redirect, url_for, session
from flask_login import LoginManager, login_required, request, login_user
import MySQLdb
login_manager = LoginManager()
app = Flask(__name__)
app.debug = True
login_manager.init(app)
db = MySQLdb.connect(host = 'localhost',
... | 29.403226 | 98 | 0.659901 |
79433b722f607de29a6b433571be5f75f18404d1 | 1,733 | py | Python | ambari-agent/src/main/python/ambari_agent/AmbariAgent.py | vsosrc/ambari | e3cc898672707bedf7597f2e16d684c8a00bba3b | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-agent/src/main/python/ambari_agent/AmbariAgent.py | vsosrc/ambari | e3cc898672707bedf7597f2e16d684c8a00bba3b | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/main/python/ambari_agent/AmbariAgent.py | vsosrc/ambari | e3cc898672707bedf7597f2e16d684c8a00bba3b | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 32.698113 | 95 | 0.766301 |
79433bbc6c4edcbbffac8eac99fb537ccb5a96c9 | 2,618 | py | Python | tests/unit/test_dg.py | packit-service/packit | eb9e12411c739a94f062cc39c8bd5f657c2eec69 | [
"MIT"
] | 81 | 2019-02-07T15:38:34.000Z | 2020-07-16T06:33:02.000Z | tests/unit/test_dg.py | packit-service/packit | eb9e12411c739a94f062cc39c8bd5f657c2eec69 | [
"MIT"
] | 825 | 2019-02-07T15:08:16.000Z | 2020-08-02T08:11:23.000Z | tests/unit/test_dg.py | packit-service/packit | eb9e12411c739a94f062cc39c8bd5f657c2eec69 | [
"MIT"
] | 51 | 2019-02-08T09:56:29.000Z | 2020-06-17T15:34:00.000Z | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import pytest
from flexmock import flexmock
from packit.config import Config, PackageConfig
from packit.distgit import DistGit
from packit.local_project import LocalProject
@pytest.mark.parametrize(
"title, description, branch, prs, ... | 29.088889 | 85 | 0.484339 |
79433c11b7534d4c963927bb359dbce020ad6a78 | 15,617 | py | Python | bin/pildriver.py | wgcv/Crashphone | eb8145a2695d6c9c344a1776f76d4bdd1647db58 | [
"Apache-2.0"
] | null | null | null | bin/pildriver.py | wgcv/Crashphone | eb8145a2695d6c9c344a1776f76d4bdd1647db58 | [
"Apache-2.0"
] | null | null | null | bin/pildriver.py | wgcv/Crashphone | eb8145a2695d6c9c344a1776f76d4bdd1647db58 | [
"Apache-2.0"
] | null | null | null | #!/home/wgcv/dev/Crashphone/bin/python
"""PILdriver, an image-processing calculator using PIL.
An instance of class PILDriver is essentially a software stack machine
(Polish-notation interpreter) for sequencing PIL image
transformations. The state of the instance is the interpreter stack.
The only method one will no... | 29.521739 | 95 | 0.593136 |
79433c2c64a9ab2c02fd981a102c7df6825fc446 | 8,931 | py | Python | docparser/objdetmetrics_lib/BoundingBox.py | DS3Lab/DocParser | cbff40804dc0b1fd676d5776341a7b0ab20326a8 | [
"MIT"
] | 45 | 2020-05-22T03:44:38.000Z | 2022-03-10T12:43:55.000Z | docparser/objdetmetrics_lib/BoundingBox.py | DS3Lab/DocParser | cbff40804dc0b1fd676d5776341a7b0ab20326a8 | [
"MIT"
] | 24 | 2020-05-26T09:38:31.000Z | 2022-03-12T00:37:55.000Z | docparser/objdetmetrics_lib/BoundingBox.py | DS3Lab/DocParser | cbff40804dc0b1fd676d5776341a7b0ab20326a8 | [
"MIT"
] | 10 | 2020-07-22T16:34:50.000Z | 2022-03-29T11:25:49.000Z | from docparser.objdetmetrics_lib.utils import *
class BoundingBox:
def __init__(self,
imageName,
classId,
x,
y,
w,
h,
typeCoordinates=CoordinatesType.Absolute,
imgSize=None,
... | 39 | 108 | 0.582578 |
79433dc9c760cff3263f0c9c3b298c457cfea208 | 8,579 | py | Python | main.py | WilloIzCitron/Lilliebot-Beta | 4b5fda134b721fefeb6cc4d362a2e391f7bec606 | [
"MIT"
] | null | null | null | main.py | WilloIzCitron/Lilliebot-Beta | 4b5fda134b721fefeb6cc4d362a2e391f7bec606 | [
"MIT"
] | null | null | null | main.py | WilloIzCitron/Lilliebot-Beta | 4b5fda134b721fefeb6cc4d362a2e391f7bec606 | [
"MIT"
] | null | null | null | #dont steal my code
import asyncio
import ast
import inspect
import random
import discord
import webserver
from discord.ext.commands import bot
from webserver import keep_alive
import json
import os
from discord.ext import commands
client = discord.Client()
bot = commands.Bot(command_prefix='l$')
print('Please wait o... | 34.453815 | 240 | 0.667094 |
7943404022d522c613563998b5c434e96bbd7de5 | 2,127 | py | Python | database/message_id.py | Adwaith-Rajesh/Task-Me-Up | ece9033c58e6e5dbd7dc641d872e8d71b1972a17 | [
"MIT"
] | 5 | 2021-03-25T13:50:52.000Z | 2021-07-10T00:57:12.000Z | database/message_id.py | Adwaith-Rajesh/Task-Me-Up | ece9033c58e6e5dbd7dc641d872e8d71b1972a17 | [
"MIT"
] | null | null | null | database/message_id.py | Adwaith-Rajesh/Task-Me-Up | ece9033c58e6e5dbd7dc641d872e8d71b1972a17 | [
"MIT"
] | null | null | null | import os
from typing import List
from pathlib import Path
from meta.logger import Logger, logging
from pysondb import db
from rich.logging import RichHandler
# stop imported loggers
logging.getLogger("pysondb").setLevel(logging.WARNING)
logging.getLogger("filelock").setLevel(logging.WARNING)
logging.getLogger("fil... | 31.279412 | 86 | 0.627645 |
7943411fef8022294a57a718f6082ab43205714c | 757 | py | Python | generated-libraries/python/netapp/lock/break_error.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/lock/break_error.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/lock/break_error.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class BreakError(NetAppObject):
"""
Information about a single error encountered by specific
protocol(s).
"""
_err = None
@property
def err(self):
"""
The error string.
"""
return self._err
@err.setter
... | 21.027778 | 85 | 0.531044 |
794341bfec077e86c0d37d47add5847c029535b4 | 7,943 | py | Python | sdk/python/pulumi_azure_nextgen/policyinsights/v20190701/get_remediation_at_resource.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 31 | 2020-09-21T09:41:01.000Z | 2021-02-26T13:21:59.000Z | sdk/python/pulumi_azure_nextgen/policyinsights/v20190701/get_remediation_at_resource.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 231 | 2020-09-21T09:38:45.000Z | 2021-03-01T11:16:03.000Z | sdk/python/pulumi_azure_nextgen/policyinsights/v20190701/get_remediation_at_resource.py | pulumi/pulumi-azure-nextgen | 452736b0a1cf584c2d4c04666e017af6e9b2c15c | [
"Apache-2.0"
] | 4 | 2020-09-29T14:14:59.000Z | 2021-02-10T20:38:16.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 40.319797 | 254 | 0.681984 |
794341c249e91895d9c1beb31685e52b90ec5cd5 | 236 | py | Python | erpnextturkish/erpnext_turkish/doctype/efatura_ayarlar/test_efatura_ayarlar.py | logedosoft/erpnextturkish | b9e765113c3017119a75aea91a6d6627f9aa1c47 | [
"MIT"
] | 5 | 2020-05-30T15:52:57.000Z | 2021-12-05T11:34:30.000Z | erpnextturkish/erpnext_turkish/doctype/efatura_ayarlar/test_efatura_ayarlar.py | logedosoft/erpnextturkish | b9e765113c3017119a75aea91a6d6627f9aa1c47 | [
"MIT"
] | null | null | null | erpnextturkish/erpnext_turkish/doctype/efatura_ayarlar/test_efatura_ayarlar.py | logedosoft/erpnextturkish | b9e765113c3017119a75aea91a6d6627f9aa1c47 | [
"MIT"
] | 9 | 2020-11-06T12:04:30.000Z | 2022-03-16T05:51:39.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Logedosoft Business Solutions and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestEFaturaAyarlar(unittest.TestCase):
pass
| 21.454545 | 68 | 0.779661 |
794341f8ec561dfbb5336a908759ffdf301387b8 | 2,795 | py | Python | doc/d_sensitivity.py | Assimila/sense | 62dc29a619b7e110f42fe599c20dc1070b812250 | [
"Apache-2.0"
] | 3 | 2018-10-08T13:40:52.000Z | 2021-03-07T07:59:40.000Z | doc/d_sensitivity.py | Assimila/sense | 62dc29a619b7e110f42fe599c20dc1070b812250 | [
"Apache-2.0"
] | 2 | 2017-07-31T12:51:02.000Z | 2017-08-10T22:09:56.000Z | doc/d_sensitivity.py | PMarzahn/sense | 332852bf781620a5cc714efb2d86ffaff5275955 | [
"Apache-2.0"
] | 6 | 2018-06-29T10:10:36.000Z | 2022-03-06T20:24:54.000Z | """
compare results of implemented models
against Fig 11.07 from Ulaby (2014) and
compare own results against references
from the Ulaby example codes provided
http://mrs.eecs.umich.edu/codes/Module11_1/Module11_1.html
Ulaby uses for online code and book figure the reflectivity without the roughness correction factor. ... | 31.404494 | 434 | 0.713059 |
794342fcd1415bee5e85f3fb18ca11f8debfdde3 | 1,199 | py | Python | vendor/packages/translate-toolkit/translate/storage/placeables/interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T17:08:47.000Z | 2019-10-05T11:37:02.000Z | vendor/packages/translate-toolkit/translate/storage/placeables/interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/translate-toolkit/translate/storage/placeables/interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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... | 23.98 | 80 | 0.748123 |
7943437105b3081f8080a256a40e1d6fe8988c52 | 658 | py | Python | lintcode/04MathOrBitOperation/140FastPower.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | lintcode/04MathOrBitOperation/140FastPower.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | lintcode/04MathOrBitOperation/140FastPower.py | zhaoxinlu/leetcode-algorithms | f5e1c94c99628e7fb04ba158f686a55a8093e933 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Editor: Zhao Xinlu
School: BUPT
Date: 2018-03-07
算法思想: 快速幂--分治
"""
class Solution:
"""
@param a: A 32bit integer
@param b: A 32bit integer
@param n: A 32bit integer
@return: An integer
"""
def fastPower(self, a, b, n):
# write your code here
if n =... | 20.5625 | 40 | 0.480243 |
794343f56534997c000bad3f4c9972025f750d1c | 4,805 | py | Python | pypy/module/__pypy__/test/test_special.py | GabriellaUwa/pypy | 2ede3b557a25cb49db969e942ca5a7f8a9eae0d4 | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2018-12-27T20:40:49.000Z | 2018-12-27T20:40:49.000Z | pypy/module/__pypy__/test/test_special.py | GabriellaUwa/pypy | 2ede3b557a25cb49db969e942ca5a7f8a9eae0d4 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/__pypy__/test/test_special.py | GabriellaUwa/pypy | 2ede3b557a25cb49db969e942ca5a7f8a9eae0d4 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | import py
class AppTest(object):
spaceconfig = {"objspace.usemodules.select": False}
def setup_class(cls):
if cls.runappdirect:
py.test.skip("does not make sense on pypy-c")
def test_cpumodel(self):
import __pypy__
assert hasattr(__pypy__, 'cpumodel')
def test_bui... | 30.605096 | 71 | 0.565869 |
7943445f57d2b2868e920183144bfc81ebf1f9e6 | 5,000 | py | Python | tox_conda/plugin.py | drdavella/tox-conda | 8cb9d2f4fed1f7b3e851a2460bbd7756fad7d19c | [
"MIT"
] | 2 | 2018-12-05T18:37:46.000Z | 2018-12-29T02:41:23.000Z | tox_conda/plugin.py | drdavella/tox-conda | 8cb9d2f4fed1f7b3e851a2460bbd7756fad7d19c | [
"MIT"
] | 7 | 2018-11-03T14:55:23.000Z | 2019-03-27T20:26:07.000Z | tox_conda/plugin.py | drdavella/tox-conda | 8cb9d2f4fed1f7b3e851a2460bbd7756fad7d19c | [
"MIT"
] | 1 | 2018-12-28T16:00:19.000Z | 2018-12-28T16:00:19.000Z | import os
import re
import types
import subprocess as sp
import pluggy
import py.path
import tox.venv
from tox.config import DepConfig, DepOption
hookimpl = pluggy.HookimplMarker('tox')
class CondaDepOption(DepOption):
name = 'conda_deps'
help="each line specifies a conda dependency in pip/setuptools form... | 30.487805 | 80 | 0.694 |
7943447bc5f75f817f495ee281b3784ff7264a9c | 4,750 | py | Python | allennlp/scripts/benchmark_iter.py | rahular/joint-coref-srl | cd85fb4e11af1a1ea400ed657d0a4511c1d6c6be | [
"MIT"
] | null | null | null | allennlp/scripts/benchmark_iter.py | rahular/joint-coref-srl | cd85fb4e11af1a1ea400ed657d0a4511c1d6c6be | [
"MIT"
] | null | null | null | allennlp/scripts/benchmark_iter.py | rahular/joint-coref-srl | cd85fb4e11af1a1ea400ed657d0a4511c1d6c6be | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Benchmarks the iterator (and indirectly the dataset reader) for a given config.
#
# Example 1: Log stats every 100 batches. Periodically output internals of
# MultiprocessDatasetReader and MultiprocessIterator.
#
# $ scripts/benchmark_iter.py --config training_config/bidirectional_language_mode... | 32.534247 | 170 | 0.671368 |
794345aa5476b49b3425240a6fbce03e43bc9f1e | 1,035 | py | Python | user.py | Okalll/Password-locker | 8911a7bbd8f5d074731743d9588f8a780671c930 | [
"Unlicense"
] | null | null | null | user.py | Okalll/Password-locker | 8911a7bbd8f5d074731743d9588f8a780671c930 | [
"Unlicense"
] | null | null | null | user.py | Okalll/Password-locker | 8911a7bbd8f5d074731743d9588f8a780671c930 | [
"Unlicense"
] | null | null | null | class User:
"""
class that generates new instances of users
"""
user_list = [] # empty Users list
def save_user(self):
'''
save_user method saves user objects into user_list
'''
User.user_list.append(self)
def __init__(self, username, password, email... | 24.069767 | 98 | 0.577778 |
794346cb6896fd9eff31fa9a9f863aba5aa1ca87 | 2,594 | py | Python | Code/summaryStats.py | gugek/dataBiasUSCourts | bec8a67c92ac3ad72371d77eae6d46972f0210fa | [
"MIT"
] | 1 | 2020-05-19T17:34:14.000Z | 2020-05-19T17:34:14.000Z | Code/summaryStats.py | gugek/dataBiasUSCourts | bec8a67c92ac3ad72371d77eae6d46972f0210fa | [
"MIT"
] | null | null | null | Code/summaryStats.py | gugek/dataBiasUSCourts | bec8a67c92ac3ad72371d77eae6d46972f0210fa | [
"MIT"
] | 1 | 2021-09-16T13:30:19.000Z | 2021-09-16T13:30:19.000Z | import csv
import os
import helpers
#since the text of some cases is so long we need to increase the csv field size limit in order to read it
csv.field_size_limit(3000000)
#This script goes through the processed data and produces summary statistics about it.
#Finds the number of cases which have the United St... | 37.594203 | 152 | 0.69468 |
7943476628f8d301a7ca9fe0380b0c6814cec864 | 796 | py | Python | cinder/units.py | CloudVPS/cinder | 9097b9407b6ce16c7b5678682284a0ad0fcc652d | [
"Apache-2.0"
] | null | null | null | cinder/units.py | CloudVPS/cinder | 9097b9407b6ce16c7b5678682284a0ad0fcc652d | [
"Apache-2.0"
] | null | null | null | cinder/units.py | CloudVPS/cinder | 9097b9407b6ce16c7b5678682284a0ad0fcc652d | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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/LICEN... | 33.166667 | 78 | 0.717337 |
7943477ac4bd2786b06f6dd45a4e0c897d0cb061 | 1,556 | py | Python | jackhammer/cloud/gcp.py | nicocoffo/jackhammer | 614bab06fc81d85c7aae7b14b9175c7426b33b29 | [
"MIT"
] | null | null | null | jackhammer/cloud/gcp.py | nicocoffo/jackhammer | 614bab06fc81d85c7aae7b14b9175c7426b33b29 | [
"MIT"
] | null | null | null | jackhammer/cloud/gcp.py | nicocoffo/jackhammer | 614bab06fc81d85c7aae7b14b9175c7426b33b29 | [
"MIT"
] | null | null | null | import logging
from jackhammer.cloud.cloud import Cloud
# libcloud
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
logger = logging.getLogger("jackhammer.cloud")
class GCP(Cloud):
"""
Wrapper around libcloud's GCP NodeDriver. Creates preemptible
machines, t... | 28.814815 | 77 | 0.595116 |
79434896bc31cd17431670cbc0d0b7cfdd5830a8 | 6,480 | py | Python | Example/Psi4Numpy/13-GeometryOptimization/opt_helper/stre.py | yychuang/109-2-compchem-lite | cbf17e542f9447e89fb48de1b28759419ffff956 | [
"BSD-3-Clause"
] | 214 | 2017-03-01T08:04:48.000Z | 2022-03-23T08:52:04.000Z | Example/Psi4Numpy/13-GeometryOptimization/opt_helper/stre.py | yychuang/109-2-compchem-lite | cbf17e542f9447e89fb48de1b28759419ffff956 | [
"BSD-3-Clause"
] | 100 | 2017-03-03T13:20:20.000Z | 2022-03-05T18:20:27.000Z | Example/Psi4Numpy/13-GeometryOptimization/opt_helper/stre.py | yychuang/109-2-compchem-lite | cbf17e542f9447e89fb48de1b28759419ffff956 | [
"BSD-3-Clause"
] | 150 | 2017-02-17T19:44:47.000Z | 2022-03-22T05:52:43.000Z | import numpy as np
from . import covRadii
from . import optExceptions
from . import v3d
from .misc import delta, ZtoPeriod, HguessLindhRho
from .simple import *
from psi4 import constants
BOHR2ANGSTROMS = constants.bohr2angstroms
HARTREE2AJ = constants.hartree2aJ
class STRE(SIMPLE):
def __init__(self, a, b, froz... | 31.004785 | 89 | 0.495216 |
794349bfc3adeee74c9291a28dbeddcfeb44161e | 757 | py | Python | setup.py | cyy0523xc/vit-pytorch | 8bf0383507d838ac35ac574b11b377058afbf627 | [
"MIT"
] | 1 | 2021-06-24T14:20:52.000Z | 2021-06-24T14:20:52.000Z | setup.py | bshantam97/vit-pytorch | 85314cf0b6c4ab254fed4257d2ed069cf4f8f377 | [
"MIT"
] | null | null | null | setup.py | bshantam97/vit-pytorch | 85314cf0b6c4ab254fed4257d2ed069cf4f8f377 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name = 'vit-pytorch',
packages = find_packages(exclude=['examples']),
version = '0.6.7',
license='MIT',
description = 'Vision Transformer (ViT) - Pytorch',
author = 'Phil Wang',
author_email = 'lucidrains@gmail.com',
url = 'https://github.com/lucidrain... | 26.103448 | 65 | 0.645971 |
794349e248fee845d6303c2d53860a06e1edb9fe | 11,029 | py | Python | tests/test_write_preds.py | YianZhang/jiant-v1-legacy-online-code | b6b1066de7cdbe1b95ca1ae3de6989d07b2e9629 | [
"MIT"
] | 11 | 2020-10-28T07:41:01.000Z | 2021-12-14T20:09:46.000Z | tests/test_write_preds.py | YianZhang/jiant-v1-legacy-online-code | b6b1066de7cdbe1b95ca1ae3de6989d07b2e9629 | [
"MIT"
] | 3 | 2020-10-08T18:09:58.000Z | 2021-07-22T22:24:02.000Z | tests/test_write_preds.py | YianZhang/jiant-v1-legacy-online-code | b6b1066de7cdbe1b95ca1ae3de6989d07b2e9629 | [
"MIT"
] | 12 | 2020-10-23T07:13:45.000Z | 2022-03-29T22:00:58.000Z | import csv
import os
import os.path
import shutil
import tempfile
import unittest
from unittest import mock
import torch
import pandas as pd
from jiant import evaluate
import jiant.tasks.tasks as tasks
from jiant.models import MultiTaskModel
from jiant.__main__ import evaluate_and_write
from jiant.allennlp_mods.numer... | 41 | 99 | 0.429504 |
79434a45414bf5500896163b4730585b5f608439 | 4,720 | py | Python | guiClass.py | arseniiyamnii/PyLearnQt | 48f51530cabb37a993619c3b9f950eb760d7ea3a | [
"MIT"
] | null | null | null | guiClass.py | arseniiyamnii/PyLearnQt | 48f51530cabb37a993619c3b9f950eb760d7ea3a | [
"MIT"
] | null | null | null | guiClass.py | arseniiyamnii/PyLearnQt | 48f51530cabb37a993619c3b9f950eb760d7ea3a | [
"MIT"
] | null | null | null | ##\file guiClass.py
#\author Arsenii Yamnii
#\brief class with qt GUI
#\warning dependence's\n
#module \b PyQt5
from PyQt5 import uic
import random
from PyQt5.QtWidgets import QMainWindow, QPushButton, QTextBrowser, QLineEdit,QMenu,QAction
import sys
import resultClass, settingsClass
from PyQt5.QtCore import QTimer
imp... | 48.163265 | 148 | 0.704237 |
79434a6aecd75e0e7e8a9ba8831739a57654529c | 1,681 | py | Python | dataworkspace/dataworkspace/apps/accounts/backends.py | uktrade/jupyterhub-data-auth-admin | 91544f376209a201531f4dbfb8faad1b8ada18c9 | [
"MIT"
] | 1 | 2019-06-10T08:22:56.000Z | 2019-06-10T08:22:56.000Z | dataworkspace/dataworkspace/apps/accounts/backends.py | uktrade/jupyterhub-data-auth-admin | 91544f376209a201531f4dbfb8faad1b8ada18c9 | [
"MIT"
] | 2 | 2019-05-17T13:10:42.000Z | 2019-06-17T10:48:46.000Z | dataworkspace/dataworkspace/apps/accounts/backends.py | uktrade/jupyterhub-data-auth-admin | 91544f376209a201531f4dbfb8faad1b8ada18c9 | [
"MIT"
] | null | null | null | import logging
from datetime import datetime
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth import get_user_model
from sentry_sdk import set_user
from dataworkspace.apps.applications.utils import create_user_from_sso
logger = logging.getLogger("app")
class AuthbrokerBackendUsernameI... | 34.306122 | 87 | 0.663296 |
79434a7c3f5ee83be36a065d57619d0bcfc0d42f | 543 | py | Python | Topics/Sorting/Bubble-Sort/bubble-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Topics/Sorting/Bubble-Sort/bubble-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Topics/Sorting/Bubble-Sort/bubble-sort.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def bubble_sort(a: list):
"""Optimized Bubble sort that return sorted list with O(n^2) complexity"""
a, n = a.copy(), len(a)
for _ in range(n):
is_swap = False
for i in range(1, n):
if a[i-1] > a[i]:
is_swap = True
a[i-1], a[i] = a[i], a[i-1]
... | 25.857143 | 78 | 0.521179 |
79434a81d3c7096d8562f149cef18c442fbb9e8b | 1,168 | py | Python | setup.py | jayvdb/py2many | 3c6e902da523ff802a3d44b640889f5f29fc5bda | [
"MIT"
] | 1 | 2021-05-14T00:40:10.000Z | 2021-05-14T00:40:10.000Z | setup.py | jayvdb/py2many | 3c6e902da523ff802a3d44b640889f5f29fc5bda | [
"MIT"
] | 1 | 2021-07-07T05:29:15.000Z | 2021-07-07T05:29:15.000Z | setup.py | jayvdb/py2many | 3c6e902da523ff802a3d44b640889f5f29fc5bda | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup, find_packages
__version__ = "0.2.1"
install_requires = ["toposort", "astor; python_version<'3.9'"]
setup_requires = []
tests_require = ["pytest", "unittest-expander", "argparse_dataclass"]
with open("README.md") as readme_file:
readme = readme_file.read()
se... | 29.2 | 76 | 0.664384 |
79434b1cdb760b619f0d8b25e440790721adc249 | 3,992 | py | Python | p6/PipelineCPU/my_files/test/auto_test.py | t0ush1/ComputerOrganization | 8093949bbd3e48678cea832133e9bf8990bbdf27 | [
"MIT"
] | 2 | 2022-03-06T06:05:24.000Z | 2022-03-10T09:08:08.000Z | p6/PipelineCPU/my_files/test/auto_test.py | t0ush1/ComputerOrganization | 8093949bbd3e48678cea832133e9bf8990bbdf27 | [
"MIT"
] | null | null | null | p6/PipelineCPU/my_files/test/auto_test.py | t0ush1/ComputerOrganization | 8093949bbd3e48678cea832133e9bf8990bbdf27 | [
"MIT"
] | null | null | null | #############################################################
# win10 64bit
# python 3.9.6
#
# all args of func are filepath
#
# tools:
# run Mars
# run ISE
# cmp result
#############################################################
import os
import re
# software path
xilinxPath = "G:\\ISE\\ise\... | 35.017544 | 129 | 0.506263 |
79434b37021a31e2e356eec63b4a98506dc6f6af | 4,293 | py | Python | drf_util/utils.py | RodiZaharadji/drf-util | 16789b870263a5c0c86b6b8870b68a4305690b61 | [
"MIT"
] | null | null | null | drf_util/utils.py | RodiZaharadji/drf-util | 16789b870263a5c0c86b6b8870b68a4305690b61 | [
"MIT"
] | null | null | null | drf_util/utils.py | RodiZaharadji/drf-util | 16789b870263a5c0c86b6b8870b68a4305690b61 | [
"MIT"
] | null | null | null | from typing import Any
from dateutil import parser
from django.conf import settings
def dict_merge(a, b, path=None):
if path is None: path = []
for key in b:
if key in a:
if isinstance(a[key], dict) and isinstance(b[key], dict):
dict_merge(a[key], b[key], path + [str(key)]... | 24.959302 | 104 | 0.57652 |
79434d207f8622abb5c1141707095a79cca5ad44 | 2,994 | py | Python | app_forum/models.py | azhari33/website | 841a8e49c5357f63dcf6e5dc3511092c234c0e20 | [
"MIT"
] | 35 | 2017-10-07T16:50:05.000Z | 2020-10-26T13:19:27.000Z | app_forum/models.py | azhari33/website | 841a8e49c5357f63dcf6e5dc3511092c234c0e20 | [
"MIT"
] | 24 | 2017-10-11T08:44:33.000Z | 2022-02-10T07:27:26.000Z | app_forum/models.py | azhari33/website | 841a8e49c5357f63dcf6e5dc3511092c234c0e20 | [
"MIT"
] | 28 | 2017-10-07T16:52:01.000Z | 2020-10-02T11:14:22.000Z | from django.db import models
from markdownx.models import MarkdownxField
from app_author.models import Profile
class Category(models.Model):
"""
Category Model
"""
id = models.AutoField(
primary_key=True
)
category_title = models.CharField(
max_length=200,
verbose_nam... | 20.22973 | 78 | 0.602538 |
79434d53c01522395ad1abd54903758cc2e9017f | 21,091 | py | Python | airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/streams.py | aleia-team/airbyte | 7e25fddd6824fa1d2c8c216b294bc21a2baa1331 | [
"MIT"
] | 1 | 2022-02-05T16:49:37.000Z | 2022-02-05T16:49:37.000Z | airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/streams.py | aleia-team/airbyte | 7e25fddd6824fa1d2c8c216b294bc21a2baa1331 | [
"MIT"
] | 1 | 2022-02-15T11:14:05.000Z | 2022-02-15T11:14:05.000Z | airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/streams.py | aleia-team/airbyte | 7e25fddd6824fa1d2c8c216b294bc21a2baa1331 | [
"MIT"
] | 1 | 2022-03-28T17:22:22.000Z | 2022-03-28T17:22:22.000Z | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
import json
from abc import ABC, abstractmethod
from datetime import datetime
from decimal import Decimal
from enum import Enum
from functools import total_ordering
from typing import (Any, Dict, Iterable, List, Mapping, MutableMapping,
... | 36.363793 | 135 | 0.631312 |
79434d8a44ccef6858e6ccb935c347831429d496 | 6,169 | py | Python | plot_combinedfom_selectsamples_custom.py | johnmgregoire/JCAPdatavis | 6d77a510e00acf31de9665828d27ea33aba6ab78 | [
"BSD-3-Clause"
] | null | null | null | plot_combinedfom_selectsamples_custom.py | johnmgregoire/JCAPdatavis | 6d77a510e00acf31de9665828d27ea33aba6ab78 | [
"BSD-3-Clause"
] | null | null | null | plot_combinedfom_selectsamples_custom.py | johnmgregoire/JCAPdatavis | 6d77a510e00acf31de9665828d27ea33aba6ab78 | [
"BSD-3-Clause"
] | null | null | null | import numpy, pylab, os, sys, csv
from echem_plate_fcns import *
from echem_plate_math import *
PyCodePath=os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
sys.path.append(os.path.join(PyCodePath,'ternaryplot'))
from myternaryutility import TernaryPlot
from myquaternaryutility import QuaternaryPlot
pylab.... | 35.866279 | 291 | 0.714865 |
79434f32db976cadecc0ee3f1361d0dd130bc17e | 23 | py | Python | csimpy/_version.py | dewancse/csimpy | 58c32e40e5d991b4ca98df05e6f61020def475a9 | [
"Apache-2.0"
] | 4 | 2018-10-02T20:20:26.000Z | 2019-07-26T12:57:26.000Z | csimpy/_version.py | dewancse/csimpy | 58c32e40e5d991b4ca98df05e6f61020def475a9 | [
"Apache-2.0"
] | null | null | null | csimpy/_version.py | dewancse/csimpy | 58c32e40e5d991b4ca98df05e6f61020def475a9 | [
"Apache-2.0"
] | 1 | 2020-08-21T02:32:57.000Z | 2020-08-21T02:32:57.000Z | __version__ = '0.0.1a'
| 11.5 | 22 | 0.652174 |
79434fdf09e9dd9b877244adeb3da8eed0b3edd1 | 4,044 | py | Python | regrippy/plugins/env.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | null | null | null | regrippy/plugins/env.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | null | null | null | regrippy/plugins/env.py | simsor/regrippy | 5a4babedb31fc1ac4699a435265da18cc60dca30 | [
"Apache-2.0"
] | null | null | null | from Registry.Registry import RegistryValueNotFoundException
from regrippy import BasePlugin, PluginResult
# Based on the information in libyal/winreg-kb
# https://github.com/libyal/winreg-kb/blob/main/docs/sources/system-keys/Environment-variables.md
class Plugin(BasePlugin):
"""Lists all environment variables... | 29.955556 | 97 | 0.552423 |
7943501859228f4312b61c03bc0891ca0e5d465d | 449 | py | Python | shortest-word-distance/shortest-word-distance.py | QQuinn03/LeetHub | 51ce21d721f0f524a07ed24266fb5fca473fcaa5 | [
"MIT"
] | null | null | null | shortest-word-distance/shortest-word-distance.py | QQuinn03/LeetHub | 51ce21d721f0f524a07ed24266fb5fca473fcaa5 | [
"MIT"
] | null | null | null | shortest-word-distance/shortest-word-distance.py | QQuinn03/LeetHub | 51ce21d721f0f524a07ed24266fb5fca473fcaa5 | [
"MIT"
] | null | null | null | class Solution:
def shortestDistance(self, wordsDict: List[str], word1: str, word2: str) -> int:
w1 = -1
w2 = -1
res = len(wordsDict)
for idx,val in enumerate(wordsDict):
if word1==val:
w1=idx
elif word2==val:
w2=idx
... | 29.933333 | 84 | 0.420935 |
794350cf9d817a15e613d3b55766524c044ac97a | 23,725 | py | Python | pypika/tests/test_functions.py | foggel/pypika | 1f6ab34bada982fe632e5828f87bfbac2e601c5f | [
"Apache-2.0"
] | null | null | null | pypika/tests/test_functions.py | foggel/pypika | 1f6ab34bada982fe632e5828f87bfbac2e601c5f | [
"Apache-2.0"
] | null | null | null | pypika/tests/test_functions.py | foggel/pypika | 1f6ab34bada982fe632e5828f87bfbac2e601c5f | [
"Apache-2.0"
] | null | null | null | import unittest
from pypika import (
Case,
CaseException,
DatePart,
Field as F,
Query,
Query as Q,
Schema,
Table as T,
VerticaQuery,
functions as fn,
)
from pypika.enums import Dialects, SqlTypes
__author__ = "Timothy Heys"
__email__ = "theys@kayak.com"
class FunctionTests(un... | 34.78739 | 104 | 0.598736 |
794350f7aee7713dd9fa9d1e83b3764c22b047ff | 1,277 | py | Python | content_gallery/tests/models.py | jenia0jenia/django-content-gallery | e96c6972fc3a0c4c7b95855d9c3e2af030ce01c1 | [
"BSD-3-Clause"
] | 25 | 2017-07-03T13:58:17.000Z | 2020-10-31T11:44:49.000Z | content_gallery/tests/models.py | jenia0jenia/django-content-gallery | e96c6972fc3a0c4c7b95855d9c3e2af030ce01c1 | [
"BSD-3-Clause"
] | 5 | 2017-07-30T20:34:00.000Z | 2020-08-17T18:52:38.000Z | content_gallery/tests/models.py | jenia0jenia/django-content-gallery | e96c6972fc3a0c4c7b95855d9c3e2af030ce01c1 | [
"BSD-3-Clause"
] | 15 | 2017-07-31T09:29:33.000Z | 2020-10-02T08:23:15.000Z | from django.db import models as django_models
from .. import models
class BaseTestModel(django_models.Model):
"""
An abstract base test model class for test objects that
could be related to Images. Contains just one text field
"""
name = django_models.CharField(max_length=100)
def __str__(sel... | 27.76087 | 69 | 0.694597 |
794351716c4c507f660e9882904d19e8664fa8d0 | 3,467 | py | Python | tests/modules/test_consolidatingAggregator.py | gulraiz14/Taurus | 3fb886092634fd97f38012dc81fb62b1ed20a145 | [
"Apache-2.0"
] | null | null | null | tests/modules/test_consolidatingAggregator.py | gulraiz14/Taurus | 3fb886092634fd97f38012dc81fb62b1ed20a145 | [
"Apache-2.0"
] | null | null | null | tests/modules/test_consolidatingAggregator.py | gulraiz14/Taurus | 3fb886092634fd97f38012dc81fb62b1ed20a145 | [
"Apache-2.0"
] | null | null | null | from bzt.modules.aggregator import ConsolidatingAggregator, DataPoint, KPISet
from tests import BZTestCase, r
from tests.mocks import MockReader
class TestConsolidatingAggregator(BZTestCase):
def test_mock(self):
# check mock reader
reader = self.get_reader()
reader.buffer_scale_idx = '90... | 45.025974 | 84 | 0.582925 |
794351a8cb40479d5d0b31ad2a9ba54a90d566de | 297 | py | Python | cms/plugins/text/forms.py | LUKKIEN/django-cms-2.0 | 0600cc1a3f3636a867faf0afe3719539fee36d69 | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/text/forms.py | LUKKIEN/django-cms-2.0 | 0600cc1a3f3636a867faf0afe3719539fee36d69 | [
"BSD-3-Clause"
] | null | null | null | cms/plugins/text/forms.py | LUKKIEN/django-cms-2.0 | 0600cc1a3f3636a867faf0afe3719539fee36d69 | [
"BSD-3-Clause"
] | null | null | null | from django.forms.models import ModelForm
from cms.plugins.text.models import Text
from django import forms
class TextForm(ModelForm):
body_storage = forms.CharField()
class Meta:
model = Text
exclude = ('page', 'position', 'placeholder', 'language', 'plugin_type')
| 24.75 | 80 | 0.693603 |
794352dbd7e4303aef86369b654dc0fb20e7f36a | 708 | py | Python | protlearn/features/tests/test_cksaap.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 24 | 2020-09-17T10:35:44.000Z | 2022-03-09T19:19:01.000Z | protlearn/features/tests/test_cksaap.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 14 | 2020-08-09T18:23:01.000Z | 2020-11-19T05:48:14.000Z | protlearn/features/tests/test_cksaap.py | tadorfer/ProtClass | da1a01ea9abd3c367b3389dfed683c6a9dfa6afd | [
"MIT"
] | 3 | 2020-03-17T16:43:54.000Z | 2020-08-03T06:10:24.000Z | import pytest
import numpy as np
from ..cksaap import cksaap
import pkg_resources
PATH = pkg_resources.resource_filename(__name__, 'test_data/')
def test_cksaap():
"Test k-spaced amino acid pair composition"
# load data
X_list = open(PATH+'multiple.txt').read().splitlines()
X_err = 'AGT2HT9'
... | 27.230769 | 66 | 0.610169 |
794354284cf499a96a5cc1e64169c6fad04b9768 | 12,837 | py | Python | app/oauth/views/authorize.py | fariszr/app | 932134c2123714cf1d1b7090998fbdf27344cce0 | [
"MIT"
] | 1 | 2020-11-21T11:18:21.000Z | 2020-11-21T11:18:21.000Z | app/oauth/views/authorize.py | fariszr/app | 932134c2123714cf1d1b7090998fbdf27344cce0 | [
"MIT"
] | null | null | null | app/oauth/views/authorize.py | fariszr/app | 932134c2123714cf1d1b7090998fbdf27344cce0 | [
"MIT"
] | null | null | null | from typing import Dict
from urllib.parse import urlparse
from flask import request, render_template, redirect, flash
from flask_login import current_user
from itsdangerous import SignatureExpired
from app.config import EMAIL_DOMAIN
from app.dashboard.views.custom_alias import available_suffixes, signer
from app.exte... | 37.425656 | 101 | 0.580432 |
7943550de261dba65c9eeeecd8083b2e686ef73a | 3,458 | py | Python | plugins/network.py | firecat53/py-multistatus | 90e76ec112dd2ea4c464c4aa3b43515edf26d2a2 | [
"MIT"
] | null | null | null | plugins/network.py | firecat53/py-multistatus | 90e76ec112dd2ea4c464c4aa3b43515edf26d2a2 | [
"MIT"
] | null | null | null | plugins/network.py | firecat53/py-multistatus | 90e76ec112dd2ea4c464c4aa3b43515edf26d2a2 | [
"MIT"
] | null | null | null | from .worker import Worker
from psutil import net_io_counters
from subprocess import Popen, PIPE
import socket
class PluginNetwork(Worker):
"""New plugin
"""
def __init__(self, **kwargs):
Worker.__init__(self, **kwargs)
self.old = net_io_counters(pernic=True)
interfaces = self.cfg... | 36.787234 | 79 | 0.524002 |
794355cf1b3cf44497a3c82c785f1b57f265a9db | 9,277 | py | Python | SUTutorialRoutes.py | soumikmohianuta/PSDoodle | 9edeb40f095beca9ee4016c4938065cd82223b50 | [
"BSD-3-Clause"
] | null | null | null | SUTutorialRoutes.py | soumikmohianuta/PSDoodle | 9edeb40f095beca9ee4016c4938065cd82223b50 | [
"BSD-3-Clause"
] | null | null | null | SUTutorialRoutes.py | soumikmohianuta/PSDoodle | 9edeb40f095beca9ee4016c4938065cd82223b50 | [
"BSD-3-Clause"
] | null | null | null | from flask import Flask, render_template, request, Blueprint,send_from_directory,session,redirect,url_for,jsonify
import os
from random import randint
import binascii
import time
from similarUI import SimilarUIBOW,similarUIUtility
# from similarUI import SimilarUIBOWTest
from helpers import StrokeParse
import pickle
... | 38.334711 | 555 | 0.699041 |
7943567a53929d13279ad637eb046424864dd101 | 1,631 | py | Python | wplay/utils/helpers.py | Neelaksh-Singh/whatsapp-play | ae07d1d1aa7db297853b06bc25cd1e88f471e397 | [
"MIT"
] | 1 | 2020-05-26T13:00:58.000Z | 2020-05-26T13:00:58.000Z | wplay/utils/helpers.py | Neelaksh-Singh/whatsapp-play | ae07d1d1aa7db297853b06bc25cd1e88f471e397 | [
"MIT"
] | null | null | null | wplay/utils/helpers.py | Neelaksh-Singh/whatsapp-play | ae07d1d1aa7db297853b06bc25cd1e88f471e397 | [
"MIT"
] | 1 | 2020-10-31T09:45:38.000Z | 2020-10-31T09:45:38.000Z | # region IMPORTS
from pathlib import Path
from whaaaaat import style_from_dict, Token
# endregion
# region WEBSITES
websites = {'whatsapp': 'https://web.whatsapp.com/'}
# endregion
# region SELECTOR
whatsapp_selectors_dict = {
'login_area':'#app > div > div > div.landing-header',
'new_chat_button': '#side > ... | 36.244444 | 140 | 0.663397 |
794356998607baf63bb20e5f361de26484541e6d | 6,321 | py | Python | Assistant/constants.py | Brodevil/Androme | 068113d71a54c48f1216e09dbe7046492e6de06c | [
"MIT"
] | 5 | 2021-07-21T08:48:10.000Z | 2022-01-22T15:42:04.000Z | Assistant/constants.py | NVS-OS/Alice | 068113d71a54c48f1216e09dbe7046492e6de06c | [
"MIT"
] | null | null | null | Assistant/constants.py | NVS-OS/Alice | 068113d71a54c48f1216e09dbe7046492e6de06c | [
"MIT"
] | 2 | 2021-07-21T12:32:03.000Z | 2022-01-22T15:42:29.000Z | from os import environ
import os
from dotenv import load_dotenv
import pyttsx3
import platform
import shutil
import psutil
import string
from Assistant.exts.networks import localInfo, weather, internetConnection # noqa
from Assistant.exts.workWithFiles import contactInfo # noqa
from Assistant.utils.except... | 30.389423 | 283 | 0.606233 |
794356d16cd37836fceccee06674fd88f677711d | 130 | py | Python | lib/python/kuiseros/utils.py | ArctarusLimited/KuiserOS | 8c56124719009355f2b96700659186088b0e9b5e | [
"MIT"
] | 3 | 2021-07-12T16:23:01.000Z | 2021-07-15T10:41:45.000Z | lib/python/kuiseros/utils.py | ArctarusLimited/KuiserOS | 8c56124719009355f2b96700659186088b0e9b5e | [
"MIT"
] | 1 | 2021-06-12T02:17:34.000Z | 2021-06-12T02:17:34.000Z | lib/python/kuiseros/utils.py | ArctarusLimited/arnix | f42c16ea68e9f762dfd344d8bfbf206b9b392793 | [
"MIT"
] | null | null | null | import logging
import coloredlogs
logger = logging.getLogger("kuiseros")
coloredlogs.install(level=logging.DEBUG, logger=logger)
| 21.666667 | 55 | 0.823077 |
794356f4cd20149982471772b0d6ac6043d087a0 | 5,477 | py | Python | testcases/cloud_user/elb/elb_policy_basics.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | testcases/cloud_user/elb/elb_policy_basics.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | testcases/cloud_user/elb/elb_policy_basics.py | tbeckham/eutester | 1440187150ce284bd87147e71ac7f0fda194b4d9 | [
"BSD-2-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2009-2011, Eucalyptus Systems, Inc.
# All rights reserved.
#
# Redistribution and use of this software in source and binary forms, with or
# without modification, are permitted provided that the following conditions
# are met:
#
# Redistributions of source ... | 44.169355 | 121 | 0.678839 |
794357f87ec719f350c0cb68f7df2a0dbd938fb6 | 10,019 | py | Python | beta/tests/tensorflow/test_sanity_sample.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | beta/tests/tensorflow/test_sanity_sample.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | beta/tests/tensorflow/test_sanity_sample.py | wei1tang/nncf | dcf966e5ffbdababb0e1b39942c9e10193487cbf | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
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 writin... | 34.548276 | 110 | 0.665935 |
7943584b8765e20ec02be1b3647fcfafb4ad394c | 5,532 | py | Python | dvc/ui/prompt.py | lucasalavapena/dvc | 230eb7087df7f063ded7422af7ae45bd04eb794a | [
"Apache-2.0"
] | null | null | null | dvc/ui/prompt.py | lucasalavapena/dvc | 230eb7087df7f063ded7422af7ae45bd04eb794a | [
"Apache-2.0"
] | null | null | null | dvc/ui/prompt.py | lucasalavapena/dvc | 230eb7087df7f063ded7422af7ae45bd04eb794a | [
"Apache-2.0"
] | null | null | null | from typing import TYPE_CHECKING, Any, Callable, Optional, Tuple, Union
import rich.prompt
if TYPE_CHECKING:
from rich.console import Console as RichConsole
from . import RichText
TextType = Union["RichText", str]
class InvalidResponse(rich.prompt.InvalidResponse):
pass
class RichInputMixin:
""... | 29.741935 | 79 | 0.553326 |
79435877b800dfbf140afd5eeffba64f0a934838 | 943 | py | Python | IntroProPython/listagem/capitulo 08/08.10 - Outra forma de calcular o fatorial.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | IntroProPython/listagem/capitulo 08/08.10 - Outra forma de calcular o fatorial.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | IntroProPython/listagem/capitulo 08/08.10 - Outra forma de calcular o fatorial.py | SweydAbdul/estudos-python | b052708d0566a0afb9a1c04d035467d45f820879 | [
"MIT"
] | null | null | null | ##############################################################################
# Parte do livro Introdução à Programação com Python
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2017
# Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8
# Primeira reimpressão - Outubro/2011
# Segunda reimpressão - ... | 34.925926 | 78 | 0.582185 |
794358e22103c19b2229d8aee80dae664a8724f1 | 8,931 | py | Python | starcli/search.py | AkashD-Developer/starcli | 83a6a835fe7d98727bbecfb68d3d42c2b300203e | [
"MIT"
] | 1 | 2020-10-02T09:55:41.000Z | 2020-10-02T09:55:41.000Z | starcli/search.py | ineelshah/starcli | ab999f90d8d9dde9e4cdd6ceee01a81d2a81b524 | [
"MIT"
] | 3 | 2021-03-29T11:02:23.000Z | 2022-03-14T11:04:12.000Z | starcli/search.py | ineelshah/starcli | ab999f90d8d9dde9e4cdd6ceee01a81d2a81b524 | [
"MIT"
] | null | null | null | """ starcli.search """
# Standard library imports
from datetime import datetime, timedelta
from time import sleep
import logging
from random import randint
import re
# Third party imports
import requests
from click import secho
import colorama
from gtrending import fetch_repos
import http.client
from rich.logging imp... | 32.125899 | 162 | 0.612473 |
7943591df8cb69c5278ebfe945b0349d3a132cc2 | 200 | py | Python | cartography/intel/aws/ec2/util.py | Relys/cartography | 0f71b3f0246665d5fa065afa2e3dc46c22d6c689 | [
"Apache-2.0"
] | 1 | 2021-03-26T12:00:26.000Z | 2021-03-26T12:00:26.000Z | cartography/intel/aws/ec2/util.py | srics/cartography | 19a06766e304d657d956246179a2bb01a6d9aef6 | [
"Apache-2.0"
] | 1 | 2021-02-23T18:08:04.000Z | 2021-03-31T08:17:23.000Z | cartography/intel/aws/ec2/util.py | srics/cartography | 19a06766e304d657d956246179a2bb01a6d9aef6 | [
"Apache-2.0"
] | 1 | 2021-03-31T17:55:31.000Z | 2021-03-31T17:55:31.000Z | import botocore.config
# TODO memoize this
def get_botocore_config():
return botocore.config.Config(
read_timeout=360,
retries={
'max_attempts': 10,
},
)
| 16.666667 | 34 | 0.595 |
79435ae2d7523a858e28975e162aa2ee1d09c918 | 17,838 | py | Python | talks/events/views.py | alan-turing-institute/talks.ox | 5e172b7bb7296fcfc2d5c1b5978ec98a6643d90a | [
"Apache-2.0"
] | 5 | 2015-09-03T11:46:07.000Z | 2022-01-12T10:15:50.000Z | talks/events/views.py | alan-turing-institute/talks.ox | 5e172b7bb7296fcfc2d5c1b5978ec98a6643d90a | [
"Apache-2.0"
] | 306 | 2015-01-05T10:16:56.000Z | 2021-06-10T08:00:31.000Z | talks/events/views.py | alan-turing-institute/talks.ox | 5e172b7bb7296fcfc2d5c1b5978ec98a6643d90a | [
"Apache-2.0"
] | 5 | 2016-04-21T10:40:20.000Z | 2021-01-05T09:15:23.000Z | from __future__ import absolute_import
from __future__ import print_function
import logging
import functools
from datetime import date, timedelta, datetime
from django.urls import reverse
from django.http.response import Http404
from django.shortcuts import render, get_object_or_404, redirect
from django.core.paginato... | 36.931677 | 166 | 0.668517 |
79435ae9be8efc8b1a5e5d31b930412e428bd99f | 731 | py | Python | python/phonenumbers/shortdata/region_IM.py | nickhargreaves/python-phonenumbers | df203baa68fc307e5c833c015bee2e15386a8dbe | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_IM.py | nickhargreaves/python-phonenumbers | df203baa68fc307e5c833c015bee2e15386a8dbe | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/shortdata/region_IM.py | nickhargreaves/python-phonenumbers | df203baa68fc307e5c833c015bee2e15386a8dbe | [
"Apache-2.0"
] | 1 | 2020-09-08T14:45:34.000Z | 2020-09-08T14:45:34.000Z | """Auto-generated file, do not edit by hand. IM metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_IM = PhoneMetadata(id='IM', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[189]\\d\\d(?:\\d{2,3})?', possible_len... | 73.1 | 145 | 0.746922 |
79435bf60733961a6580b77aa941a4f2ccc6bd2b | 6,662 | py | Python | lib/rucio/tests/test_transfer.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_transfer.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_transfer.py | justincc/rucio | 95d81403c835d9f43fc30d328a8e2e388617a369 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2021 CERN
#
# 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... | 47.585714 | 130 | 0.633594 |
79435cb6cfdf8d91644de4d574219d43f2b75b8d | 3,182 | py | Python | ports/esp32/modules/menusys.py | oshwabadge2018/micropython | 1c1584fc37a13a3407da341dd443f6d76644c26d | [
"MIT"
] | 3 | 2018-10-02T02:13:11.000Z | 2018-10-08T20:49:56.000Z | ports/esp32/modules/menusys.py | acamilo/micropython | 533d3d0c56ad0e822cb923ef3ff86f09cd5df118 | [
"MIT"
] | 1 | 2018-08-29T18:16:22.000Z | 2018-08-29T18:16:22.000Z | ports/esp32/modules/menusys.py | acamilo/micropython | 533d3d0c56ad0e822cb923ef3ff86f09cd5df118 | [
"MIT"
] | 2 | 2018-08-29T02:55:32.000Z | 2018-09-23T04:44:21.000Z | import gxgde0213b1
import G_FreeSans24pt7b
import font12
import font16
import font20
import font24
import network
import ubinascii
import urandom
import machine
import time
import os
import imagedata
from machine import Pin, TouchPad
from ohsbadge import epd
from ohsbadge import fb
class Menu:
menuitems = []
cur_opt... | 23.397059 | 93 | 0.662476 |
7943610488028d1fa1fadb466b7cbc4aabce4600 | 1,863 | py | Python | nicos_sinq/amor/gui/panels/cmdbuilder.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_sinq/amor/gui/panels/cmdbuilder.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | nicos_sinq/amor/gui/panels/cmdbuilder.py | jkrueger1/nicos | 5f4ce66c312dedd78995f9d91e8a6e3c891b262b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 37.26 | 79 | 0.671498 |
794361c9aced6121d0988e77e51b1feaffc263b4 | 614 | py | Python | YouTubeStats/YTStats/migrations/0001_initial.py | Blizek/youtube-stats | ed2971325a702509c9ec4e0d82aae5c49d28ba4c | [
"MIT"
] | 2 | 2021-08-02T11:14:35.000Z | 2021-08-03T13:39:51.000Z | YouTubeStats/YTStats/migrations/0001_initial.py | Blizek/youtube-stats | ed2971325a702509c9ec4e0d82aae5c49d28ba4c | [
"MIT"
] | null | null | null | YouTubeStats/YTStats/migrations/0001_initial.py | Blizek/youtube-stats | ed2971325a702509c9ec4e0d82aae5c49d28ba4c | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-08-04 20:10
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Channel',
fields=[
('id', models.BigAutoFie... | 25.583333 | 117 | 0.571661 |
794362d66c2ed7cf860d83fe358cda2d62244467 | 1,865 | py | Python | examples/dfp/v201805/publisher_query_language_service/get_all_browsers.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:22.000Z | 2019-10-21T04:10:22.000Z | examples/dfp/v201805/publisher_query_language_service/get_all_browsers.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201805/publisher_query_language_service/get_all_browsers.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:51.000Z | 2019-10-21T04:10:51.000Z | #!/usr/bin/env python
#
# Copyright 2017 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 requir... | 33.303571 | 105 | 0.742627 |
7943636d8c0b15dc7105c752a7cc15f38aa1b75e | 13,751 | py | Python | dynamicgem/embedding/dynAERNN.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null | dynamicgem/embedding/dynAERNN.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null | dynamicgem/embedding/dynAERNN.py | Sujit-O/dyngem | a879bf362d1e9409faa4e1186c345337ad6d0189 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from keras.layers import Input, Subtract
from keras.models import Model, model_from_json
from keras.optimizers import SGD, Adam
from keras.callbacks import TensorBo... | 38.844633 | 114 | 0.547887 |
7943647a8cccac44f557272ada20491bcf3fab88 | 5,249 | py | Python | tests/unitary/LiquidityGaugeV3_1/test_set_rewards_deposit.py | caterpillar1219/hundred-dao | de95e4ade1b50ec64b59e44a53a324a12c4e29df | [
"MIT"
] | null | null | null | tests/unitary/LiquidityGaugeV3_1/test_set_rewards_deposit.py | caterpillar1219/hundred-dao | de95e4ade1b50ec64b59e44a53a324a12c4e29df | [
"MIT"
] | null | null | null | tests/unitary/LiquidityGaugeV3_1/test_set_rewards_deposit.py | caterpillar1219/hundred-dao | de95e4ade1b50ec64b59e44a53a324a12c4e29df | [
"MIT"
] | null | null | null | import brownie
import pytest
from brownie import ZERO_ADDRESS
from tests.conftest import approx
REWARD = 10 ** 20
WEEK = 7 * 86400
LP_AMOUNT = 10 ** 18
@pytest.fixture(scope="module")
def reward_contract_2(CurveRewards, mock_lp_token, accounts, coin_a):
contract = CurveRewards.deploy(mock_lp_token, coin_a, {"fr... | 39.765152 | 102 | 0.710802 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.