hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7f369b8887466dc79fa4bffa55c18561c84d8db | 716 | py | Python | clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-fastapi/generated/src/openapi_server/models/clock_difference.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import annotations
from datetime import date, datetime # noqa: F401
import re # noqa: F401
from typing import Any, Dict, List, Optional # noqa: F401
from pydantic import AnyUrl, BaseModel, EmailStr, validator # noqa: F401
class ClockDifference(BaseModel):
"""NOTE: This class... | 26.518519 | 96 | 0.72067 |
035b112254e8cb6714443790f65bb611375b64a7 | 13,847 | py | Python | tensorflow/contrib/tensorrt/test/tf_trt_integration_test.py | zackers14/CudaTensorflow | db30da95a71c5a94fc4a8511551d454537847f8d | [
"Apache-2.0"
] | 4 | 2018-08-25T12:46:32.000Z | 2020-08-04T23:52:42.000Z | tensorflow/contrib/tensorrt/test/tf_trt_integration_test.py | zackers14/CudaTensorflow | db30da95a71c5a94fc4a8511551d454537847f8d | [
"Apache-2.0"
] | 1 | 2020-11-25T21:29:56.000Z | 2021-06-11T05:31:49.000Z | tensorflow/contrib/tensorrt/test/tf_trt_integration_test.py | zackers14/CudaTensorflow | db30da95a71c5a94fc4a8511551d454537847f8d | [
"Apache-2.0"
] | 1 | 2020-03-31T22:04:40.000Z | 2020-03-31T22:04:40.000Z | # Copyright 2018 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... | 39.115819 | 80 | 0.657832 |
b331d24e6f3194ece7528d8966f875743099ce87 | 89 | py | Python | twitter_sentiment/metrics/__init__.py | MohammadForouhesh/twitter-sentiment-bert | 8182cb42032c86de9477f32dedeee638989a45b0 | [
"Unlicense"
] | null | null | null | twitter_sentiment/metrics/__init__.py | MohammadForouhesh/twitter-sentiment-bert | 8182cb42032c86de9477f32dedeee638989a45b0 | [
"Unlicense"
] | null | null | null | twitter_sentiment/metrics/__init__.py | MohammadForouhesh/twitter-sentiment-bert | 8182cb42032c86de9477f32dedeee638989a45b0 | [
"Unlicense"
] | null | null | null | from twitter_sentiment.metrics.Metrics import categorical_acc, ir_metrics, time_per_epoch | 89 | 89 | 0.898876 |
5136cbd0ee730960e3fde227e8ab02180799a4b7 | 793 | py | Python | Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.13.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | null | null | null | Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.13.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | null | null | null | Python-For-Everyone-Horstmann/Chapter7-Files-and-Exceptions/P7.13.py | islayy/Books-solutions | 5fe05deb4e9f65875284d8af43bd383bf9ae145b | [
"MIT"
] | 1 | 2021-01-30T22:19:07.000Z | 2021-01-30T22:19:07.000Z | # Write a program that asks the user to input a set of floating-point
# values. When the user enters a value that is not a number,
# give the user a second chance to enter the value. After two chances,
# quit reading input. Add all correctly specified values and
# print the sum when the user is done entering data. Us... | 24.030303 | 71 | 0.664565 |
273e78459dc4b74b4a97b1f5ea26b2fd6eae4b5f | 143 | py | Python | bohp/api.py | richlewis42/bohp | 8d9141cd92b0fc8f333e4691d076283c68bf8640 | [
"MIT"
] | null | null | null | bohp/api.py | richlewis42/bohp | 8d9141cd92b0fc8f333e4691d076283c68bf8640 | [
"MIT"
] | null | null | null | bohp/api.py | richlewis42/bohp | 8d9141cd92b0fc8f333e4691d076283c68bf8640 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Rich Lewis <rl403@cam.ac.uk>
# License: MIT
""" bhop's external api. """ | 20.428571 | 49 | 0.601399 |
e7420752f86d55d50b6ec59a2464a16bc41dded4 | 694 | py | Python | draw_noisy_gaussian.py | laserkelvin/nisms-2020 | 29e84df7ae81dca9479c10692626ed651e23301e | [
"MIT"
] | null | null | null | draw_noisy_gaussian.py | laserkelvin/nisms-2020 | 29e84df7ae81dca9479c10692626ed651e23301e | [
"MIT"
] | null | null | null | draw_noisy_gaussian.py | laserkelvin/nisms-2020 | 29e84df7ae81dca9479c10692626ed651e23301e | [
"MIT"
] | null | null | null |
import numpy as np
from matplotlib import pyplot as plt
def gaussian(x, A, x0, sigma):
return A * np.exp(-(x - x0)**2. / (2 * sigma**2.))
np.random.seed(30)
x = np.linspace(0., 20., 10000)
y = np.zeros(x.size)
centers = np.random.rand(6) * 20.
amplitudes = np.random.rand(6)
widths = np.random.rand(6) + 0.3
f... | 21.030303 | 59 | 0.65562 |
26d84c01fc1f7412d4fb622f1d33660bf161774d | 80,672 | py | Python | src/transformers/models/plbart/modeling_plbart.py | OllieBroadhurst/transformers | 12428f0ef15bb3631e7a5f04672ddb05f363de97 | [
"Apache-2.0"
] | 1 | 2019-10-01T17:42:02.000Z | 2019-10-01T17:42:02.000Z | src/transformers/models/plbart/modeling_plbart.py | OllieBroadhurst/transformers | 12428f0ef15bb3631e7a5f04672ddb05f363de97 | [
"Apache-2.0"
] | 1 | 2022-03-23T19:49:13.000Z | 2022-03-23T19:49:13.000Z | src/transformers/models/plbart/modeling_plbart.py | erichan1/transformers | 12428f0ef15bb3631e7a5f04672ddb05f363de97 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022, UCLA NLP, The Facebook AI Research Team and The HuggingFace Inc. team. 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... | 46.712218 | 150 | 0.661927 |
a3a5238b936eaf59acb78f6edaebc6ba599e9b47 | 9,506 | py | Python | conftest.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | conftest.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | conftest.py | jhutchings1/transfer-coronavirus-data-service | fbaa48f87e4413f68b680a9a4e2ae43a8ee13b01 | [
"MIT"
] | null | null | null | """
This isn't used yet but there has to be a conftest file for
the test module includes to resolve successfully
"""
from datetime import datetime
import pytest
from config import load_environment
from main import app
from user import User
def get_standard_download_group():
return {
"preference": 10,
... | 25.015789 | 88 | 0.575321 |
776aeb6ad5f5c7456ea5e4b485f77bc842bb7337 | 5,067 | py | Python | modules/tools/navigation/planning/reference_path.py | seeclong/apollo | 99c8afb5ebcae2a3c9359a156a957ff03944b27b | [
"Apache-2.0"
] | 27 | 2019-04-06T02:27:14.000Z | 2021-11-27T13:47:06.000Z | modules/tools/navigation/planning/reference_path.py | seeclong/apollo | 99c8afb5ebcae2a3c9359a156a957ff03944b27b | [
"Apache-2.0"
] | 7 | 2021-03-10T18:14:25.000Z | 2022-02-27T04:46:46.000Z | modules/tools/navigation/planning/reference_path.py | seeclong/apollo | 99c8afb5ebcae2a3c9359a156a957ff03944b27b | [
"Apache-2.0"
] | 38 | 2019-04-15T10:58:37.000Z | 2022-01-27T08:52:39.000Z | #!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo 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 ... | 38.386364 | 79 | 0.57687 |
ce3054ce159555a8d076dd254984ed864d140a47 | 5,332 | py | Python | src/utilities/config/app_config.py | Yossi1114/valorant-rpc | d7be7f41076992ff9c09f8b326ac0829bf09ed85 | [
"MIT"
] | null | null | null | src/utilities/config/app_config.py | Yossi1114/valorant-rpc | d7be7f41076992ff9c09f8b326ac0829bf09ed85 | [
"MIT"
] | null | null | null | src/utilities/config/app_config.py | Yossi1114/valorant-rpc | d7be7f41076992ff9c09f8b326ac0829bf09ed85 | [
"MIT"
] | null | null | null | import json, os
from valclient.client import Client
from ..filepath import Filepath
from ...localization.locales import Locales
from ...localization.localization import Localizer
default_config = {
"version": "v3.1.3",
"region": ["",Client.fetch_regions()],
"client_id": 811469787657928704,
"presence... | 37.286713 | 108 | 0.536947 |
5ee2ea7b7b145943e30540c4a78f21be78aab6f6 | 7,095 | py | Python | old_logen/pylogen/rox/tasks.py | leuschel/logen | 0ea806f54628162615e25177c3ed98f6b2c27935 | [
"Apache-2.0"
] | 14 | 2015-10-16T11:35:30.000Z | 2021-05-12T15:31:16.000Z | old_logen/pylogen/rox/tasks.py | leuschel/logen | 0ea806f54628162615e25177c3ed98f6b2c27935 | [
"Apache-2.0"
] | null | null | null | old_logen/pylogen/rox/tasks.py | leuschel/logen | 0ea806f54628162615e25177c3ed98f6b2c27935 | [
"Apache-2.0"
] | 5 | 2015-10-16T12:44:41.000Z | 2019-10-02T02:45:38.000Z | """The tasks module provides a simple light-weight alternative to threads.
THIS MODULE IS EXPERIMENTAL. Feedback on the API is appreciated. Things may
change in the next few versions, so watch out!
When you have a long-running job you will want to run it in the background,
while the user does other things. There are ... | 31.118421 | 77 | 0.741085 |
688c5209efde3355748728c56cfccb7757412e4c | 445 | py | Python | snowypushy/settings/__init__.py | belsonheng/snowypushy | 27ce9ee356b22683372bd37a12504c0cf314b4dd | [
"MIT"
] | null | null | null | snowypushy/settings/__init__.py | belsonheng/snowypushy | 27ce9ee356b22683372bd37a12504c0cf314b4dd | [
"MIT"
] | null | null | null | snowypushy/settings/__init__.py | belsonheng/snowypushy | 27ce9ee356b22683372bd37a12504c0cf314b4dd | [
"MIT"
] | null | null | null | import yaml
class Configuration(object):
def __init__(self, file):
with open(file) as configurations:
self._config = yaml.load(configurations, Loader=yaml.FullLoader)
def get(self, property_name):
if property_name not in self._config.keys():
return None
# set de... | 29.666667 | 76 | 0.644944 |
cc74092e19071838aa4925ba22b83d8eeb8a65a1 | 5,707 | py | Python | kubernetes_asyncio/client/models/v1_secret_projection.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | 1 | 2020-03-25T01:24:27.000Z | 2020-03-25T01:24:27.000Z | kubernetes_asyncio/client/models/v1_secret_projection.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_secret_projection.py | olitheolix/kubernetes_asyncio | 344426793e4e4b653bcd8e4a29c6fa4766e1fff7 | [
"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.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 33.180233 | 498 | 0.6075 |
b289eb2e67fd77de93ffccd8cccec115fcdafaef | 51,629 | py | Python | BioSQL/Loader.py | SMassalski/biopython | dcf3de90230b5581305fc68ad5af8b1f85a4eef0 | [
"BSD-3-Clause"
] | null | null | null | BioSQL/Loader.py | SMassalski/biopython | dcf3de90230b5581305fc68ad5af8b1f85a4eef0 | [
"BSD-3-Clause"
] | null | null | null | BioSQL/Loader.py | SMassalski/biopython | dcf3de90230b5581305fc68ad5af8b1f85a4eef0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2002 by Andrew Dalke. All rights reserved.
# Revisions 2007-2016 copyright by Peter Cock. All rights reserved.
# Revisions 2008 copyright by Cymon J. Cox. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BS... | 41.07319 | 126 | 0.580798 |
eda99951efc8858a0a56ff1c99e2d83135ef8f95 | 4,370 | py | Python | pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/tests/test_prefix_list.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 94 | 2018-04-30T20:29:15.000Z | 2022-03-29T13:40:31.000Z | pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/tests/test_prefix_list.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 67 | 2018-12-06T21:08:09.000Z | 2022-03-29T18:00:46.000Z | pkgs/conf-pkg/src/genie/libs/conf/prefix_list/nxos/tests/test_prefix_list.py | jbronikowski/genielibs | 200a34e5fe4838a27b5a80d5973651b2e34ccafb | [
"Apache-2.0"
] | 49 | 2018-06-29T18:59:03.000Z | 2022-03-10T02:07:59.000Z | #!/usr/bin/env python
'''
NXOS unit tests for Genie prefix-list conf using CLI.
'''
# Python
import re
import unittest
from unittest.mock import Mock
# Genie
from genie.conf import Genie
from genie.tests.conf import TestCase
from genie.conf.base import Testbed, Device
from genie.libs.conf.prefix_list.prefix_list imp... | 38.333333 | 79 | 0.594279 |
d4f9760ca36bf69b7e1741a747caa80b89fe8ba9 | 16,035 | py | Python | tyadmin_api/custom.py | baikourin/online-edu-serverless | 6425c2e64da62dd8eace4f5d976eece239f7189c | [
"Apache-2.0"
] | 1 | 2022-01-26T01:52:15.000Z | 2022-01-26T01:52:15.000Z | tyadmin_api/custom.py | baikourin/online-edu-serverless | 6425c2e64da62dd8eace4f5d976eece239f7189c | [
"Apache-2.0"
] | null | null | null | tyadmin_api/custom.py | baikourin/online-edu-serverless | 6425c2e64da62dd8eace4f5d976eece239f7189c | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from django.core.exceptions import ValidationError as DjangoValidationError
from django.conf import settings
from django.core.files.images import ImageFile
from django.db import models
from django.db.models import QuerySet, ManyToManyRel
from django.db.models.fields.files import ImageFieldFile... | 39.690594 | 122 | 0.638042 |
52d43e880230ad397574fc0a92921c3029a0b0cb | 22,069 | py | Python | lvt/utils/afwa/run_ncks.py | KathyNie/LISF | 5c3e8b94494fac5ff76a1a441a237e32af420d06 | [
"Apache-2.0"
] | null | null | null | lvt/utils/afwa/run_ncks.py | KathyNie/LISF | 5c3e8b94494fac5ff76a1a441a237e32af420d06 | [
"Apache-2.0"
] | null | null | null | lvt/utils/afwa/run_ncks.py | KathyNie/LISF | 5c3e8b94494fac5ff76a1a441a237e32af420d06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
# NASA Goddard Space Flight Center
# Land Information System Framework (LISF)
# Version 7.3
#
# Copyright (c) 2020 United States Government as represented by the
# Administrator of the National Aeronautics and Space Admin... | 38.922399 | 79 | 0.558566 |
32282118d39e17c749e13544c243f48e0d1f8bd6 | 2,611 | py | Python | mega/match/types.py | felipead/sqs-mega-python | 82da3b1650a891336c13c80648edda3d3d2967de | [
"MIT"
] | null | null | null | mega/match/types.py | felipead/sqs-mega-python | 82da3b1650a891336c13c80648edda3d3d2967de | [
"MIT"
] | 1 | 2020-05-19T18:57:05.000Z | 2020-05-19T18:57:05.000Z | mega/match/types.py | mega-distributed/sqs-mega-python | 82da3b1650a891336c13c80648edda3d3d2967de | [
"MIT"
] | null | null | null | import inspect
import types
from abc import ABC, abstractmethod
from datetime import date, datetime
from decimal import Decimal
from typing import Union, Dict
NullType = None
StringType = str
BooleanType = bool
NumberType = Union[int, float, Decimal]
DateTimeType = Union[date, datetime]
CollectionType = Union[list, tu... | 25.105769 | 96 | 0.722329 |
17a08a3f1a5ac4c965d37db27d3c44bebf49be8f | 925 | py | Python | tests/test_start_sim.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 270 | 2018-05-17T07:06:06.000Z | 2022-03-28T08:43:54.000Z | tests/test_start_sim.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 91 | 2018-05-24T05:51:50.000Z | 2022-03-26T03:49:50.000Z | tests/test_start_sim.py | xabierolaz/gymfc | 4cb95ac6a890843d5a85dc78bc485be9358b7faf | [
"MIT"
] | 96 | 2018-06-11T07:58:01.000Z | 2022-03-28T08:43:56.000Z | import argparse
from gymfc.envs.fc_env import FlightControlEnv
class Sim(FlightControlEnv):
def __init__(self, aircraft_config, config=None, verbose=False):
super().__init__(aircraft_config, config_filepath=config, verbose=verbose)
def state(self):
pass
def desired_state(self):
p... | 28.030303 | 106 | 0.696216 |
6dece36a89b9558c8ed3319bd1f8d7054150d670 | 14,802 | py | Python | Stopping_distances/SD_Problem_legacy.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 11 | 2017-05-06T17:05:29.000Z | 2020-11-12T09:26:47.000Z | Stopping_distances/SD_Problem_legacy.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 49 | 2017-04-20T11:26:11.000Z | 2020-05-29T13:18:06.000Z | Stopping_distances/SD_Problem_legacy.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 4 | 2017-02-14T12:55:34.000Z | 2022-01-12T15:07:07.000Z | #from string import replace
#from SD_Visualisation import SD_Visualisation
#from SD_Graphs import SD_Graphs
from SD_TestSolutions import isEquation
from random import seed, randrange
from bokeh.layouts import column, row
from bokeh.models.widgets import TextInput, Button, Paragraph, CheckboxGroup, Select#, Slider, Div... | 42.17094 | 125 | 0.550196 |
3dbdbd36920bd70840fbbba99babfff59905ea96 | 329 | py | Python | bddrest/__init__.py | mohammadsheikhian/bddrest | 38058ef73154a701bd03d45e58109f4f11e5016a | [
"MIT"
] | null | null | null | bddrest/__init__.py | mohammadsheikhian/bddrest | 38058ef73154a701bd03d45e58109f4f11e5016a | [
"MIT"
] | null | null | null | bddrest/__init__.py | mohammadsheikhian/bddrest | 38058ef73154a701bd03d45e58109f4f11e5016a | [
"MIT"
] | null | null | null |
from .headerset import HeaderSet
from .response import HTTPStatus, Response
from .specification import Call, FirstCall, AlteredCall
from .authoring import Given, when, story, response, Story, Append, Update, \
Remove, status, given
from .exceptions import InvalidUrlParametersError, CallVerifyError
__version__ = ... | 27.416667 | 77 | 0.790274 |
92ed956ff28e51b8b42fa689db860e1d14997dc6 | 5,729 | py | Python | tests/backend.py | adamlwgriffiths/modelus | 150770d11ec894f83e26d5845025b3677ec4ef0f | [
"BSD-2-Clause"
] | 1 | 2021-01-12T07:08:35.000Z | 2021-01-12T07:08:35.000Z | tests/backend.py | adamlwgriffiths/remodel | 150770d11ec894f83e26d5845025b3677ec4ef0f | [
"BSD-2-Clause"
] | null | null | null | tests/backend.py | adamlwgriffiths/remodel | 150770d11ec894f83e26d5845025b3677ec4ef0f | [
"BSD-2-Clause"
] | null | null | null | import unittest
import string
from secrets import choice
from modelus import *
from models import Complex, ModelA, ModelB, KEY_LENGTH
from ipaddress import IPv4Address
class TestBackend(unittest.TestCase):
'''Generic backend test that only requires a different self.db value in setUp
'''
def setUp(self):
... | 33.7 | 105 | 0.575144 |
fc1aa5feb6cc4fb0a2d9d3bda32cad1762550594 | 1,198 | py | Python | env/lib/python3.4/site-packages/social/tests/backends/test_facebook.py | marto-k/pettify-1 | 6d6ab498b2b53559419fc8b523150ce60d40b081 | [
"MIT"
] | 7 | 2017-11-17T01:21:09.000Z | 2021-03-25T09:55:50.000Z | env/lib/python3.4/site-packages/social/tests/backends/test_facebook.py | marto-k/pettify-1 | 6d6ab498b2b53559419fc8b523150ce60d40b081 | [
"MIT"
] | 7 | 2021-02-08T20:18:35.000Z | 2022-03-11T23:16:41.000Z | lib/python2.7/site-packages/social/tests/backends/test_facebook.py | thumbimigwe/userAuth | ca69f576654d709eac5615270b9570cea943e234 | [
"MIT"
] | 3 | 2017-09-27T22:38:30.000Z | 2018-06-05T15:15:39.000Z | import json
from social.exceptions import AuthUnknownError
from social.tests.backends.oauth import OAuth2Test
class FacebookOAuth2Test(OAuth2Test):
backend_path = 'social.backends.facebook.FacebookOAuth2'
user_data_url = 'https://graph.facebook.com/v2.3/me'
expected_username = 'foobar'
access_token_... | 26.622222 | 60 | 0.645242 |
f2d3eab64b7a476bb25365441f67904c3362ae15 | 152 | py | Python | app/core/settings/production.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 4 | 2019-02-12T07:30:23.000Z | 2019-03-26T09:08:20.000Z | app/core/settings/production.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 26 | 2021-11-14T23:11:45.000Z | 2022-03-01T12:08:52.000Z | app/core/settings/production.py | StanislavRud/api-realword-app-test | 9a49f299b02cec26d237f3bc4b363c8b93520b7b | [
"MIT"
] | 1 | 2021-11-17T18:37:53.000Z | 2021-11-17T18:37:53.000Z | from app.core.settings.app import AppSettings
class ProdAppSettings(AppSettings):
class Config(AppSettings.Config):
env_file = "prod.env"
| 21.714286 | 45 | 0.743421 |
a96eb465177104ffb3adf648169fde66d3551e85 | 16,547 | py | Python | tests/resources/test_applications.py | vaibhav-plivo/plivo-python | e4ae7559ba4647ac0e1af523c94d49a3fd6a24ca | [
"MIT"
] | 42 | 2015-01-16T07:56:16.000Z | 2021-08-20T04:45:39.000Z | tests/resources/test_applications.py | vaibhav-plivo/plivo-python | e4ae7559ba4647ac0e1af523c94d49a3fd6a24ca | [
"MIT"
] | 70 | 2015-01-30T04:11:04.000Z | 2022-03-29T21:04:55.000Z | tests/resources/test_applications.py | HintonB2807/plivo-python | f09a1fc63e378bf17269011a071e093aa83930d0 | [
"MIT"
] | 65 | 2015-04-10T22:17:57.000Z | 2021-06-06T13:09:31.000Z | # -*- coding: utf-8 -*-
import plivo
from tests.base import PlivoResourceTestCase
from tests.decorators import with_response
class ApplicationTest(PlivoResourceTestCase):
def test_application_create_invalid_params(self):
with self.assertRaises(plivo.exceptions.ValidationError):
self.client.ap... | 35.206383 | 132 | 0.576419 |
95a42f5417cee8b654e40191e58f2a4250f66c37 | 2,831 | py | Python | poetry/mixology/contracts/specification_provider.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | poetry/mixology/contracts/specification_provider.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | poetry/mixology/contracts/specification_provider.py | paralax/poetry | 16d49d10f9e333fdb2833b31f012d68c6d5ac0a6 | [
"MIT"
] | null | null | null | from typing import Any
from typing import Dict
from typing import List
from ..conflict import Conflict
from ..dependency_graph import DependencyGraph
class SpecificationProvider:
"""
Provides information about specifcations and dependencies to the resolver,
allowing the Resolver class to remain generic w... | 32.54023 | 78 | 0.602261 |
89fc5194f30e420cc7388a6b6358cc335622a26c | 1,018 | py | Python | migrations/versions/b0463e6772f7_initial_migration.py | edusantana/disk-bode | bb9964326c348dd86eaae239849376d2f43fa9e7 | [
"MIT"
] | null | null | null | migrations/versions/b0463e6772f7_initial_migration.py | edusantana/disk-bode | bb9964326c348dd86eaae239849376d2f43fa9e7 | [
"MIT"
] | 4 | 2019-07-15T16:07:39.000Z | 2019-07-15T16:14:35.000Z | migrations/versions/b0463e6772f7_initial_migration.py | edusantana/disk-bode | bb9964326c348dd86eaae239849376d2f43fa9e7 | [
"MIT"
] | 1 | 2019-06-27T11:10:06.000Z | 2019-06-27T11:10:06.000Z | """initial migration
Revision ID: b0463e6772f7
Revises:
Create Date: 2019-05-20 10:21:33.291294
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b0463e6772f7'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... | 27.513514 | 90 | 0.687623 |
7ff1f2f5510381b96a50632f4e5ea441e1fb1836 | 457 | py | Python | tests/test_read_user_variable.py | rly/cookiecutter | 254da4631ef62bede83f52289fe069b48cb9595c | [
"BSD-3-Clause"
] | null | null | null | tests/test_read_user_variable.py | rly/cookiecutter | 254da4631ef62bede83f52289fe069b48cb9595c | [
"BSD-3-Clause"
] | null | null | null | tests/test_read_user_variable.py | rly/cookiecutter | 254da4631ef62bede83f52289fe069b48cb9595c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""test_read_user_variable"""
from __future__ import unicode_literals
import click
from cookiecutter.prompt import read_user_variable
VARIABLE = "project_name"
DEFAULT = "Kivy Project"
def test_click_invocation(mocker):
prompt = mocker.patch("click.prompt")
prompt.return_value = D... | 20.772727 | 67 | 0.763676 |
b8104e6bb73468459b6a9f1424eec41681b66efe | 654 | py | Python | wwpdb/utils/tests_wf/LocalDbApiTest.py | epeisach/py-wwpdb_utils_wf | 4069bcc6236c99f99a78f2e0dd681d7971df97f8 | [
"Apache-2.0"
] | null | null | null | wwpdb/utils/tests_wf/LocalDbApiTest.py | epeisach/py-wwpdb_utils_wf | 4069bcc6236c99f99a78f2e0dd681d7971df97f8 | [
"Apache-2.0"
] | 1 | 2021-07-06T16:38:16.000Z | 2021-07-06T16:38:16.000Z | wwpdb/utils/tests_wf/LocalDbApiTest.py | epeisach/py-wwpdb_utils_wf | 4069bcc6236c99f99a78f2e0dd681d7971df97f8 | [
"Apache-2.0"
] | 1 | 2021-05-25T15:42:51.000Z | 2021-05-25T15:42:51.000Z | """
File: LocalDbApiTest.py
Some test cases ..
"""
import sys
#
if __package__ is None or __package__ == "":
from os import path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
from commonsetup import TESTOUTPUT, mockTopPath # pylint: disable=import-error,unused-import
else... | 20.4375 | 97 | 0.669725 |
09e13be0942c597edeb4163e84c4b4b69526d285 | 2,058 | py | Python | harness/setup.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | harness/setup.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | harness/setup.py | winding-lines/determined | 231e1ac1df9d77cabc09b724ca2f8070eac0da73 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
setup(
name="determined",
version="0.17.9-dev0",
author="Determined AI",
author_email="hello@determined.ai",
url="https://determined.ai/",
description="Determined Deep Learning Training Platform",
long_description="See https://docs.determined.ai/ ... | 31.181818 | 99 | 0.562196 |
7db67273905da46cc0578aa94c5853d8184caab3 | 3,061 | py | Python | Leetcode-cn/160.相交链表.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | Leetcode-cn/160.相交链表.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | 3 | 2020-08-11T10:18:23.000Z | 2021-05-18T15:25:42.000Z | Leetcode-cn/160.相交链表.py | joey66666/Codeyard | 08fc599baf1d99e39f878386124af854006a3602 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode.cn id=160 lang=python3
#
# [160] 相交链表
#
# https://leetcode-cn.com/problems/intersection-of-two-linked-lists/description/
#
# algorithms
# Easy (60.73%)
# Likes: 1273
# Dislikes: 0
# Total Accepted: 296.1K
# Total Submissions: 486.8K
# Testcase Example: '8\n[4,1,8,4,5]\n[5,6,1,8,4,5]\n2\n3'
#... | 20.965753 | 80 | 0.525972 |
8e3308864d6331c18f73a50e9ef55b569a2d1858 | 2,576 | py | Python | mediasoupclient-ue4/3.1.5/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | null | null | null | mediasoupclient-ue4/3.1.5/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | null | null | null | mediasoupclient-ue4/3.1.5/conanfile.py | jaiber/ue4-conan-recipes | f0ab8e2109135b5abe6f8b80f4fd1a07b1b47ee6 | [
"MIT"
] | 1 | 2021-08-20T00:39:37.000Z | 2021-08-20T00:39:37.000Z | from conans import ConanFile, CMake, tools
import json, os
class MediaSoupClientConan(ConanFile):
name = "mediasoupclient-ue4"
version = "3.1.5"
license = "Apache-2.0"
url = "https://github.com/adamrehn/ue4-conan-recipes/mediasoupclient-ue4"
description = "MediasoupClient custom build for Unreal En... | 36.28169 | 121 | 0.619565 |
c747e42e1e740ab6c62e66ba806bb2900a6268bd | 477 | py | Python | tests/logging/test_multi_stream_handler.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | tests/logging/test_multi_stream_handler.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | tests/logging/test_multi_stream_handler.py | NKPmedia/delira | a10227e30c14c6507a1790813e53572e0d841c21 | [
"BSD-2-Clause"
] | null | null | null | import logging
import sys
import unittest
from delira.logging import MultiStreamHandler
class MultiStreamHandlerTest(unittest.TestCase):
def test_logger(self):
handler = MultiStreamHandler(sys.stdout, sys.stderr)
logging.basicConfig(level=logging.INFO,
handlers=[hand... | 23.85 | 60 | 0.679245 |
495407f66b9115f2f462f9e41dada6e593e89906 | 2,254 | py | Python | koapy/utils/store/sqlalchemy/Snapshot.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 1 | 2021-09-25T22:33:01.000Z | 2021-09-25T22:33:01.000Z | koapy/utils/store/sqlalchemy/Snapshot.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | null | null | null | koapy/utils/store/sqlalchemy/Snapshot.py | resoliwan/koapy | b0616f252bb3588695dfb37c7d9b8580a65649a3 | [
"MIT"
] | 1 | 2021-11-12T15:33:29.000Z | 2021-11-12T15:33:29.000Z | from sqlalchemy import Column, ForeignKey, Integer, String, UniqueConstraint
from sqlalchemy.orm import object_session, relationship
from sqlalchemy.sql.functions import current_timestamp
from .Base import Base
from .SnapshotAssociation import SnapshotAssociation
from .Symbol import Symbol
from .Timestamp import Times... | 35.21875 | 87 | 0.681012 |
6159533227cc4d7b8da07c18f3fea1db4d4576cc | 144,047 | py | Python | tests/python_client/testcases/test_collection.py | NotRyan/milvus | 1bd3205dbf84ee7734e9849d1e3be30ded1aa619 | [
"Apache-2.0"
] | null | null | null | tests/python_client/testcases/test_collection.py | NotRyan/milvus | 1bd3205dbf84ee7734e9849d1e3be30ded1aa619 | [
"Apache-2.0"
] | null | null | null | tests/python_client/testcases/test_collection.py | NotRyan/milvus | 1bd3205dbf84ee7734e9849d1e3be30ded1aa619 | [
"Apache-2.0"
] | null | null | null | import numpy
import pandas as pd
import pytest
from pymilvus import DataType
from base.client_base import TestcaseBase
from utils.util_log import test_log as log
from common import common_func as cf
from common import common_type as ct
from common.common_type import CaseLabel, CheckTasks
from utils.utils import *
from... | 44.431524 | 120 | 0.651711 |
f2111072b1c3befbd703de83bc1455ed3cdef6d1 | 33,340 | py | Python | python/mxnet/gluon/rnn/rnn_cell.py | saurabh3949/mxnet | e25074a469b45f2cbde68e2a0c8963daea93b66b | [
"Apache-2.0"
] | 4 | 2017-11-17T07:28:09.000Z | 2019-07-23T06:24:16.000Z | python/mxnet/gluon/rnn/rnn_cell.py | saurabh3949/mxnet | e25074a469b45f2cbde68e2a0c8963daea93b66b | [
"Apache-2.0"
] | null | null | null | python/mxnet/gluon/rnn/rnn_cell.py | saurabh3949/mxnet | e25074a469b45f2cbde68e2a0c8963daea93b66b | [
"Apache-2.0"
] | 2 | 2019-06-12T12:40:20.000Z | 2020-11-03T14:33:14.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... | 41.364764 | 100 | 0.602699 |
1587f6c99f8f28d387c1f9563b4ef2cc8cef9805 | 239 | py | Python | BAB 8/import.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | BAB 8/import.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | BAB 8/import.py | Myusuft/Alpro-part5 | 24ba5c25feb7ee381acdfcfe62a0982ae8ed259c | [
"MIT"
] | null | null | null | import math
x = int(input())
hasil_akar = math.sqrt(x)
print(int(hasil_akar))
def salam (waktu):
print( "Selamat" , waktu, "!" )
print( "Ini awal program" )
salam( "pagi" )
salam( "malam" )
print( "Ini akhir program" )
| 17.071429 | 36 | 0.60251 |
f419ccc1577da264fb9a0b0d9016710365a4e92d | 1,259 | py | Python | cogs/links.py | haruyuki/fursona-pins | af9fe6b22e0d4a84455490465d523cc098a0e172 | [
"MIT"
] | null | null | null | cogs/links.py | haruyuki/fursona-pins | af9fe6b22e0d4a84455490465d523cc098a0e172 | [
"MIT"
] | null | null | null | cogs/links.py | haruyuki/fursona-pins | af9fe6b22e0d4a84455490465d523cc098a0e172 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
from constants import FursonaPins
class Links(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
@commands.guild_only()
async def links(self, ctx):
embed = discord.Embed(title='Fursona Pins Links', description="A... | 40.612903 | 108 | 0.721207 |
6ed69627b50d27defe801fb03c221fb8858bc594 | 1,647 | py | Python | selfdrive/camerad/test/test_exposure.py | aolin480/openpilot | 9ac00c3e5e111a05a0bb10018ccd190571dfff4d | [
"MIT"
] | 37,508 | 2016-11-30T18:18:49.000Z | 2022-03-31T23:52:00.000Z | selfdrive/camerad/test/test_exposure.py | skyhanil1004/hanilpilot | 102738e4e0dd1702ab01b849e444bd1dfc2ddd1c | [
"MIT"
] | 3,719 | 2016-11-30T19:25:03.000Z | 2022-03-31T22:03:56.000Z | selfdrive/camerad/test/test_exposure.py | skyhanil1004/hanilpilot | 102738e4e0dd1702ab01b849e444bd1dfc2ddd1c | [
"MIT"
] | 7,859 | 2016-11-30T19:03:05.000Z | 2022-03-31T22:56:37.000Z | #!/usr/bin/env python3
import time
import unittest
import numpy as np
from selfdrive.test.helpers import with_processes
from selfdrive.camerad.snapshot.snapshot import get_snapshots
from selfdrive.hardware import EON, TICI
TEST_TIME = 45
REPEAT = 5
class TestCamerad(unittest.TestCase):
@classmethod
def setUpCla... | 28.396552 | 101 | 0.656952 |
18cb6584cefd27a9b4f7851b98775fdee126c41a | 4,613 | py | Python | test/functional/combine_logs.py | adnetcoin/adnetcoin | bf95a2432f82d7d1f07842d1a4cba96736e96abd | [
"MIT"
] | null | null | null | test/functional/combine_logs.py | adnetcoin/adnetcoin | bf95a2432f82d7d1f07842d1a4cba96736e96abd | [
"MIT"
] | null | null | null | test/functional/combine_logs.py | adnetcoin/adnetcoin | bf95a2432f82d7d1f07842d1a4cba96736e96abd | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Combine logs from multiple adnetcoin nodes as well as the test_framework log.
This streams the combined log output to stdout. Use combine_logs.py > outputfile
to write to an outputfile."""
import argparse
from collections import defaultdict, namedtuple
import heapq
import itertools
import os... | 40.113043 | 196 | 0.618253 |
e1979427fa7f1739388b1f5f25ad7e063eb7e3a3 | 3,369 | py | Python | test/functional/test_framework/coverage.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | CryptoDev-Project/peony-1 | 199a879c9c2bdccc2a202366b604fe30aaca552b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 30.627273 | 87 | 0.66073 |
e7d1b1c77f6d560e6b3ab95fd31e1d3f2bc7a797 | 10,809 | py | Python | selfdrive/test/plant/plant.py | UVA-DSA/OpenPilot0.3.5 | b5777bbb075b92b0c11969e56f9fd264bf0ce291 | [
"MIT"
] | null | null | null | selfdrive/test/plant/plant.py | UVA-DSA/OpenPilot0.3.5 | b5777bbb075b92b0c11969e56f9fd264bf0ce291 | [
"MIT"
] | null | null | null | selfdrive/test/plant/plant.py | UVA-DSA/OpenPilot0.3.5 | b5777bbb075b92b0c11969e56f9fd264bf0ce291 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import struct
import zmq
import numpy as np
import random # Hasnat
from opendbc import DBC_PATH
from common.realtime import Ratekeeper
import selfdrive.messaging as messaging
from selfdrive.services import service_list
from selfdrive.config import CruiseButtons
from selfdrive.car.hon... | 31.97929 | 240 | 0.645943 |
18756c6fbec50f03a2039163719c9e1b4befe6cc | 1,846 | py | Python | util/spamservers.py | GalackQSM/Saturne | b60cfdb3c8f10a1a2ba7a63bcd966c25c8928abf | [
"MIT"
] | 9 | 2022-01-25T00:01:10.000Z | 2022-03-23T16:10:58.000Z | util/spamservers.py | GalackQSM/Saturne | b60cfdb3c8f10a1a2ba7a63bcd966c25c8928abf | [
"MIT"
] | null | null | null | util/spamservers.py | GalackQSM/Saturne | b60cfdb3c8f10a1a2ba7a63bcd966c25c8928abf | [
"MIT"
] | 1 | 2022-02-20T16:13:53.000Z | 2022-02-20T16:13:53.000Z | ###############################################################
# ███████╗ █████╗ ████████╗██╗ ██╗██████╗ ███╗ ██╗███████╗
# ██╔════╝██╔══██╗╚══██╔══╝██║ ██║██╔══██╗████╗ ██║██╔════╝
# ███████╗███████║ ██║ ██║ ██║██████╔╝██╔██╗ ██║█████╗
# ╚════██║██╔══██║ ██║ ██║ ██║██╔══██╗██║╚██╗██║██╔══╝
# ██... | 49.891892 | 139 | 0.429577 |
20652aedbd248edaea26f6150a63b5db9312eb53 | 5,007 | py | Python | pysnmp/A3COM-HUAWEI-OBJECT-INFO-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/A3COM-HUAWEI-OBJECT-INFO-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/A3COM-HUAWEI-OBJECT-INFO-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module A3COM-HUAWEI-OBJECT-INFO-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/A3COM-HUAWEI-OBJECT-INFO-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 16:51:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python vers... | 116.44186 | 669 | 0.758937 |
468c547fe89e81144b88a8c99900072603303978 | 3,381 | py | Python | ibis/spark/tests/test_ddl_compilation.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | 1 | 2021-06-15T07:28:59.000Z | 2021-06-15T07:28:59.000Z | ibis/spark/tests/test_ddl_compilation.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | 1 | 2020-10-02T23:51:48.000Z | 2020-10-03T00:54:29.000Z | ibis/spark/tests/test_ddl_compilation.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | 1 | 2020-10-01T18:48:01.000Z | 2020-10-01T18:48:01.000Z | import pytest
import ibis
from ibis.spark.compiler import ( # noqa: E402, isort:skip
SparkDialect,
build_ast,
)
from ibis.spark import ddl # noqa: E402, isort:skip
pytestmark = pytest.mark.spark
def test_drop_table_compile():
statement = ddl.DropTable('foo', database='bar', must_exist=True)
quer... | 21.954545 | 73 | 0.679976 |
ed0426b2f6aa40510710443c5d12f13e9558aa0f | 29,709 | py | Python | sdk/python/tests/test_client.py | avolution/feast | 3fd6c7abfa625aefb6cddc55b5270c27714d62c1 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/test_client.py | avolution/feast | 3fd6c7abfa625aefb6cddc55b5270c27714d62c1 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/test_client.py | avolution/feast | 3fd6c7abfa625aefb6cddc55b5270c27714d62c1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Feast Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 38.988189 | 117 | 0.5945 |
6d572efb0c7580c49ecd61d1f889b17b9db66bd1 | 6,495 | py | Python | homeassistant/generated/config_flows.py | aceindy/core-duepi | 22316b97a09312f571cad2988c9a65ad1cd29894 | [
"Apache-2.0"
] | 1 | 2021-12-28T06:42:18.000Z | 2021-12-28T06:42:18.000Z | homeassistant/generated/config_flows.py | aceindy/core-duepi | 22316b97a09312f571cad2988c9a65ad1cd29894 | [
"Apache-2.0"
] | 9 | 2022-02-07T20:56:24.000Z | 2022-03-31T06:30:20.000Z | homeassistant/generated/config_flows.py | petrfaitl/home-assistant | a8dae9791768a4da56eec5d2f459f618d18748fb | [
"Apache-2.0"
] | 1 | 2022-03-15T20:55:42.000Z | 2022-03-15T20:55:42.000Z | """Automatically generated by hassfest.
To update, run python3 -m script.hassfest
"""
# fmt: off
FLOWS = [
"abode",
"accuweather",
"acmeda",
"adax",
"adguard",
"advantage_air",
"aemet",
"agent_dvr",
"airly",
"airnow",
"airthings",
"airtouch4",
"airvisual",
"air... | 16.319095 | 41 | 0.516705 |
608487e327313205543c67d2e529c0fe9ff67e2f | 1,641 | py | Python | task_set/variable_replace_test.py | egonrian/google-research | 8177adbe9ca0d7e5a9463b54581fe6dd27be0974 | [
"Apache-2.0"
] | 7 | 2020-03-15T12:14:07.000Z | 2021-12-01T07:01:09.000Z | task_set/variable_replace_test.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 25 | 2020-07-25T08:53:09.000Z | 2022-03-12T00:43:02.000Z | task_set/variable_replace_test.py | Alfaxad/google-research | 2c0043ecd507e75e2df9973a3015daf9253e1467 | [
"Apache-2.0"
] | 4 | 2020-06-15T03:06:53.000Z | 2021-08-06T16:38:33.000Z | # coding=utf-8
# Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 28.789474 | 74 | 0.691651 |
61518517fbc30cf0f62370d747a41c5f462e7b40 | 1,283 | py | Python | var/spack/repos/builtin/packages/py-parso/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/py-parso/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/py-parso/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyParso(PythonPackage):
"""Parso is a Python parser that supports error recovery and round... | 47.518519 | 95 | 0.73032 |
b48241d626d7c9dac748d5536a5fd917e4d94efe | 2,338 | py | Python | shop/shop/cms_apphooks.py | vahidrnaderi/django-shop | d239634d919b959110eb9b6c04dccce0a3536dbe | [
"BSD-3-Clause"
] | null | null | null | shop/shop/cms_apphooks.py | vahidrnaderi/django-shop | d239634d919b959110eb9b6c04dccce0a3536dbe | [
"BSD-3-Clause"
] | null | null | null | shop/shop/cms_apphooks.py | vahidrnaderi/django-shop | d239634d919b959110eb9b6c04dccce0a3536dbe | [
"BSD-3-Clause"
] | null | null | null | # from django.utils.translation import gettext_lazy as _
#
# from cms.app_base import CMSApp
#
#
# class CatalogListCMSApp(CMSApp):
# name = _("Catalog List")
#
# def get_urls(self, page=None, language=None, **kwargs):
# raise NotImplementedError("{} must implement method `.get_urls()`.".format(self.__c... | 37.111111 | 113 | 0.609495 |
e7e2dc216c294eaea5acb634a9c88ce923ab684f | 630 | py | Python | habitat_sim/agent/controls/__init__.py | vauduong/habitat-sim | 08f5dcae8cb9e94e0985f8134affdb0e8ce1cc2c | [
"MIT"
] | 1 | 2021-03-03T22:17:53.000Z | 2021-03-03T22:17:53.000Z | habitat_sim/agent/controls/__init__.py | vauduong/habitat-sim | 08f5dcae8cb9e94e0985f8134affdb0e8ce1cc2c | [
"MIT"
] | 1 | 2021-12-20T20:36:46.000Z | 2021-12-20T20:36:46.000Z | habitat_sim/agent/controls/__init__.py | vauduong/habitat-sim | 08f5dcae8cb9e94e0985f8134affdb0e8ce1cc2c | [
"MIT"
] | 3 | 2021-06-16T19:42:39.000Z | 2021-12-16T16:53:38.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from habitat_sim.agent.controls.controls import ActuationSpec, SceneNodeControl
from habitat_sim.agent.controls.default_... | 35 | 87 | 0.796825 |
45ae22708ab750883bbe9f38d75ac0202cf4b692 | 1,075 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_45/rule_2.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_45/rule_2.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/20_features/numtrees_45/rule_2.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Driving_to, obj[1]: Passanger, obj[2]: Weather, obj[3]: Temperature, obj[4]: Time, obj[5]: Coupon, obj[6]: Coupon_validity, obj[7]: Gender, obj[8]: Age, obj[9]: Maritalstatus, obj[10]: Children, obj[11]: Education, obj[12]: Occupation, obj[13]: Income, obj[14]: Bar, obj[15]: Coffeehouse,... | 46.73913 | 421 | 0.627907 |
ff81d23d053117a7cda18e10c9268c0645a4ca6c | 2,083 | py | Python | tests/test_dump.py | graphicore/fontdiffenator | 1c15d22f9056c4fbcaec6c22f3012d99aa9ad85b | [
"Apache-2.0"
] | null | null | null | tests/test_dump.py | graphicore/fontdiffenator | 1c15d22f9056c4fbcaec6c22f3012d99aa9ad85b | [
"Apache-2.0"
] | 1 | 2020-05-18T13:00:08.000Z | 2020-05-18T13:00:08.000Z | tests/test_dump.py | kabisa/fontdiffenator | 1bebdc2e3a3237d55c7797975d07a8a8d2485983 | [
"Apache-2.0"
] | null | null | null | import unittest
from mockfont import mock_font, test_glyph
class TestGposKerningDump(unittest.TestCase):
def test_pair_on_pair_kerns(self):
font = mock_font()
fea="""
feature kern {
pos A V -140;
pos V A -140;} kern;
"""
font.builder.addOpenType... | 26.0375 | 71 | 0.550648 |
2c6aee436ea8c809d46091a6845de961961c5a41 | 65,435 | py | Python | vistrails/core/configuration.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 83 | 2015-01-05T14:50:50.000Z | 2021-09-17T19:45:26.000Z | vistrails/core/configuration.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 254 | 2015-01-02T20:39:19.000Z | 2018-11-28T17:16:44.000Z | vistrails/core/configuration.py | MaritimeResearchInstituteNetherlands/VisTrails | 9b42ca9b3550b599467b0c7dfa56f57bbd97a4f2 | [
"BSD-3-Clause"
] | 40 | 2015-04-17T16:46:36.000Z | 2021-09-28T22:43:24.000Z | ##############################################################################
##
## Copyright (C) 2014-2016, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "... | 35.40855 | 143 | 0.636265 |
f081b46c0f3da640413c5c2596fbdbc2d24b6184 | 13,621 | py | Python | preprocess.py | whn09/sequence-based-recommendations | d746a80906785b1db4a9cb3badeee973c1ab256e | [
"MIT"
] | null | null | null | preprocess.py | whn09/sequence-based-recommendations | d746a80906785b1db4a9cb3badeee973c1ab256e | [
"MIT"
] | null | null | null | preprocess.py | whn09/sequence-based-recommendations | d746a80906785b1db4a9cb3badeee973c1ab256e | [
"MIT"
] | null | null | null | from __future__ import print_function
import numpy as np
import pandas as pd
import random
import argparse
import os
import sys
from shutil import copyfile
def command_parser():
parser = argparse.ArgumentParser()
parser.add_argument('-f', dest='filename', help='Input file', required=True, type=str)
parse... | 42.040123 | 319 | 0.67763 |
130a213e354d3405ad78deb6f31812a767ef9a87 | 181 | py | Python | Python-ElseStatement.py | H2oPtic/Codecademy-Education | 454ecff36a055fa17b4b338e1c6f1e9b3b94ef66 | [
"MIT"
] | null | null | null | Python-ElseStatement.py | H2oPtic/Codecademy-Education | 454ecff36a055fa17b4b338e1c6f1e9b3b94ef66 | [
"MIT"
] | null | null | null | Python-ElseStatement.py | H2oPtic/Codecademy-Education | 454ecff36a055fa17b4b338e1c6f1e9b3b94ef66 | [
"MIT"
] | null | null | null | credits = 120
gpa = 1.9
if (credits >= 120) and (gpa >= 2.0):
print("You meet the requirements to graduate!")
else:
print("You do not meet the requirements to graduate.") | 25.857143 | 56 | 0.651934 |
9a717e82f583d1dfba45c41ddf414aa6e0484dc8 | 1,024 | py | Python | app/controllers/default.py | eduardoyuidy/learning-twitter-python-api | 7a111ae4e798df312be3efe187508e2228ad2215 | [
"MIT"
] | null | null | null | app/controllers/default.py | eduardoyuidy/learning-twitter-python-api | 7a111ae4e798df312be3efe187508e2228ad2215 | [
"MIT"
] | null | null | null | app/controllers/default.py | eduardoyuidy/learning-twitter-python-api | 7a111ae4e798df312be3efe187508e2228ad2215 | [
"MIT"
] | null | null | null | # from flask_wtf import Form
from flask import render_template, request
from app import app
from app.models.forms import LoginForm
@app.route('/index')
@app.route('/')
def index():
return render_template('index.html')
@app.route('/login', methods=["GET", "POST"])
def login():
# form = LoginForm()
form =... | 22.755556 | 72 | 0.639648 |
69189ad36e647eff4194b0dea99237ef796b464e | 3,059 | py | Python | src/connectors/redis/redis_application_system.py | jayvdb/sci-pype | 6bff42ea4eb32d35b9f223db312e4cd0d3911100 | [
"Apache-2.0"
] | 114 | 2016-08-01T05:08:32.000Z | 2022-01-12T07:42:37.000Z | src/connectors/redis/redis_application_system.py | jay-johnson/datanode | 0b491332f8b74478c02c9951a997702db1b79d9e | [
"Apache-2.0"
] | 7 | 2021-02-08T20:23:39.000Z | 2022-03-11T23:25:28.000Z | src/connectors/redis/redis_application_system.py | jay-johnson/datanode | 0b491332f8b74478c02c9951a997702db1b79d9e | [
"Apache-2.0"
] | 20 | 2016-08-05T00:09:18.000Z | 2022-01-13T01:12:31.000Z | import sys, json
sys.path.append("/opt/src")
from logger.logger import Logger
from connectors.redis.redis_pickle_application import RedisPickleApplication
from connectors.redis.redis_json_application import RedisJSONApplication
class RedisApplicationSystem:
def __init__(self, logger, debug=False):
... | 33.615385 | 168 | 0.594312 |
5640b2e3b2e9a1f10ebec9f82199d214761cc993 | 11,456 | py | Python | test/integration/ggrc_workflows/notifications/test_one_time_wf_decline_accept_tasks.py | sbilly/ggrc-core | 59a6825c6a8e15e42ebdb9e08d079cefd1800120 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc_workflows/notifications/test_one_time_wf_decline_accept_tasks.py | sbilly/ggrc-core | 59a6825c6a8e15e42ebdb9e08d079cefd1800120 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | test/integration/ggrc_workflows/notifications/test_one_time_wf_decline_accept_tasks.py | sbilly/ggrc-core | 59a6825c6a8e15e42ebdb9e08d079cefd1800120 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from datetime import date
from datetime import datetime
from freezegun import freeze_time
from mock import patch
from sqlalchemy import and_
from ggrc.app import db
from ggrc.models import Notification
fro... | 34.299401 | 79 | 0.660702 |
13aebeb66be97a5be66787346113fb017e1156ea | 12,871 | py | Python | elastalert/create_index.py | panpetedextra/elastalert | 3b871b4a0a80561f87ce1db3a1c0fdadaeb8782d | [
"Apache-2.0"
] | 2 | 2019-08-05T06:42:40.000Z | 2021-07-15T09:15:15.000Z | elastalert/create_index.py | panpetedextra/elastalert | 3b871b4a0a80561f87ce1db3a1c0fdadaeb8782d | [
"Apache-2.0"
] | null | null | null | elastalert/create_index.py | panpetedextra/elastalert | 3b871b4a0a80561f87ce1db3a1c0fdadaeb8782d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import getpass
import os
import time
import json
import elasticsearch.helpers
import yaml
from auth import Auth
from elasticsearch import RequestsHttpConnection
from elasticsearch.client import Elasticsearch
from elast... | 48.939163 | 130 | 0.645094 |
6c12eb04877825413597e63cc1b64ecf76088e66 | 4,609 | py | Python | grant_ssh_access.py | uk-gov-mirror/hmrc.grant-ssh-access | 77aa00aac00556a3811898343ca779fc3a8019aa | [
"Apache-2.0"
] | null | null | null | grant_ssh_access.py | uk-gov-mirror/hmrc.grant-ssh-access | 77aa00aac00556a3811898343ca779fc3a8019aa | [
"Apache-2.0"
] | null | null | null | grant_ssh_access.py | uk-gov-mirror/hmrc.grant-ssh-access | 77aa00aac00556a3811898343ca779fc3a8019aa | [
"Apache-2.0"
] | 2 | 2019-12-02T16:58:15.000Z | 2021-04-10T23:38:21.000Z | #!/usr/bin/env python3
import os
import traceback
import logging
import boto3
import hvac
import requests
import aws_lambda_logging
DEFAULT_WRAP_TTL = str(60 * 60 * 4)
aws_lambda_logging.setup(level="INFO", boto_level="DEBUG")
def lambda_handler(event, context):
logging.info("function invoked")
return main... | 30.932886 | 88 | 0.685398 |
b201de19b25b28be12d2ae39e4cb95a1ea712240 | 4,290 | py | Python | src/sentry/models/organizationoption.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/sentry/models/organizationoption.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/models/organizationoption.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | """
sentry.models.organizationoption
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
from celery.signals import task_postrun
from django.core.signals imp... | 32.255639 | 90 | 0.659207 |
d2364222606054323bcc7b18dd9e5a8aff983f98 | 2,330 | py | Python | src/cli_prompt.py | leugimmai/salesforce-marketing-cloud-cli | 9bfb25ca19d4c31bd6d2ef8a92332845bfb43903 | [
"MIT"
] | null | null | null | src/cli_prompt.py | leugimmai/salesforce-marketing-cloud-cli | 9bfb25ca19d4c31bd6d2ef8a92332845bfb43903 | [
"MIT"
] | null | null | null | src/cli_prompt.py | leugimmai/salesforce-marketing-cloud-cli | 9bfb25ca19d4c31bd6d2ef8a92332845bfb43903 | [
"MIT"
] | null | null | null | from __future__ import print_function, unicode_literals
from PyInquirer import prompt, print_json
from sfmc.retrieve_accounts import retrieve_accounts
from sfmc.get_object_path import get_object_path
from sfmc.automation_check import automation_check
from sfmc.search_queries import search_queries
class CliPrompt:
... | 26.781609 | 87 | 0.527468 |
cd591eab8c4bdcf0bf88f3ba996ed73502c6297c | 2,071 | py | Python | tbconnect/migrations/0007_tbtest.py | praekeltfoundation/healthcheck | 3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba | [
"BSD-3-Clause"
] | null | null | null | tbconnect/migrations/0007_tbtest.py | praekeltfoundation/healthcheck | 3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba | [
"BSD-3-Clause"
] | 23 | 2020-07-16T15:40:35.000Z | 2021-12-13T13:59:30.000Z | tbconnect/migrations/0007_tbtest.py | praekeltfoundation/healthcheck | 3f8b3722ea41c2d81c706e0f9a3473ba2cb2f2ba | [
"BSD-3-Clause"
] | 1 | 2021-02-24T04:58:40.000Z | 2021-02-24T04:58:40.000Z | # Generated by Django 3.1 on 2020-09-14 13:40
from django.db import migrations, models
import django.utils.timezone
import django_prometheus.models
import functools
import userprofile.validators
import uuid
class Migration(migrations.Migration):
dependencies = [
("tbconnect", "0006_auto_20200908_1655"),... | 30.910448 | 87 | 0.375181 |
8882e19d0ed00fbb7c16d5e5b954442f5b85db0c | 5,013 | py | Python | pinax/projects/zero_project/settings.py | amarandon/pinax | 78bfabff46cd543d13c307082f817d8a92776e74 | [
"MIT"
] | null | null | null | pinax/projects/zero_project/settings.py | amarandon/pinax | 78bfabff46cd543d13c307082f817d8a92776e74 | [
"MIT"
] | null | null | null | pinax/projects/zero_project/settings.py | amarandon/pinax | 78bfabff46cd543d13c307082f817d8a92776e74 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Django settings for zero_project project.
import os.path
import posixpath
import pinax
PINAX_ROOT = os.path.abspath(os.path.dirname(pinax.__file__))
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
# tells Pinax to use the default theme
PINAX_THEME = "default"
DEBUG = True
TEMPLAT... | 30.567073 | 122 | 0.705765 |
86ee20bc9f267808a1654914c91657a34b9d8c61 | 5,189 | py | Python | Service/student_service.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | Service/student_service.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | Service/student_service.py | nuti23/StudentsAssignmentsManagement | ca3cb8a6f38c31cd0544a63179691f139a02612d | [
"Apache-2.0"
] | null | null | null | from Domain.student import Student
from Undo.undo_service import FunctionCall, Operation, CascadedOperation
class StudentService:
"""
This is StudentService class. Here we perform specific functionalities and validate the input.
We raise value errors if something is wrong.
"""
def __init__(self, s... | 46.330357 | 122 | 0.687608 |
4695eec5a8c7f85a801957ba6a864ff5d6afed28 | 2,939 | py | Python | src/utils/filter_patches.py | JAVersteeg/Deep-SAD-PyTorch | 1e92826b33e988cf86216c82889c9a2d6099e38f | [
"MIT"
] | null | null | null | src/utils/filter_patches.py | JAVersteeg/Deep-SAD-PyTorch | 1e92826b33e988cf86216c82889c9a2d6099e38f | [
"MIT"
] | null | null | null | src/utils/filter_patches.py | JAVersteeg/Deep-SAD-PyTorch | 1e92826b33e988cf86216c82889c9a2d6099e38f | [
"MIT"
] | null | null | null | import click
import numpy as np
from PIL import Image
import sys
import time
import os
from shutil import copyfile
import matplotlib.image as mpimg
# for 128x128 patches
# python filter_patches.py ../../../patches_1119/crack/binarylabel ../../../patches_1119/crack/img ../../../patches_1119/crack/crack_ncc ../../../pat... | 40.260274 | 201 | 0.671317 |
453825f0afd970655a452c1cd04140d086e4beb5 | 237 | py | Python | 0070-Climbing-Stairs.py | Sax-Ted/Practicing-with-Leetcode | 51701e128d8233d2df7fcbce34eff1b1435133e6 | [
"MIT"
] | null | null | null | 0070-Climbing-Stairs.py | Sax-Ted/Practicing-with-Leetcode | 51701e128d8233d2df7fcbce34eff1b1435133e6 | [
"MIT"
] | null | null | null | 0070-Climbing-Stairs.py | Sax-Ted/Practicing-with-Leetcode | 51701e128d8233d2df7fcbce34eff1b1435133e6 | [
"MIT"
] | null | null | null | class Solution:
def climbStairs(self, n: int) -> int:
steps = []
steps.append(1)
steps.append(2)
for i in range(2, n):
steps.append(steps[i - 1] + steps[i - 2])
return steps[n - 1]
| 26.333333 | 53 | 0.49789 |
70c61d32e8393d1159cd8719edf97f393945cdd7 | 2,529 | py | Python | tests/integration/test_loci_reapportioning_logic.py | jyucsiro/loci-scripts | 381bb72a6f9b9db36ef3c74e8925006ed23eb93f | [
"Apache-2.0"
] | 1 | 2019-07-16T14:06:01.000Z | 2019-07-16T14:06:01.000Z | tests/integration/test_loci_reapportioning_logic.py | jyucsiro/loci-scripts | 381bb72a6f9b9db36ef3c74e8925006ed23eb93f | [
"Apache-2.0"
] | 4 | 2019-08-22T02:07:34.000Z | 2020-03-02T06:08:00.000Z | tests/integration/test_loci_reapportioning_logic.py | jyucsiro/loci-scripts | 381bb72a6f9b9db36ef3c74e8925006ed23eb93f | [
"Apache-2.0"
] | 1 | 2019-07-11T01:21:21.000Z | 2019-07-11T01:21:21.000Z | import pytest
from SPARQLWrapper import SPARQLWrapper, JSON
import os
import json
from dotenv import load_dotenv, find_dotenv
load_dotenv(find_dotenv())
from pyloci.sparql import util
testdata = [
[ '<http://linked.data.gov.au/dataset/geofabric/contractedcatchment/12202179>' , '<http://linked.data.gov.au/dataset... | 37.191176 | 175 | 0.695927 |
0b7e79ea9fe55a7e2d91a989314b96184e8140fe | 7,844 | py | Python | contrib/bitrpc/bitrpc.py | aissty/xunbaocoin | 8820322012f7a4368210c1621fff4c372412f8a8 | [
"MIT"
] | null | null | null | contrib/bitrpc/bitrpc.py | aissty/xunbaocoin | 8820322012f7a4368210c1621fff4c372412f8a8 | [
"MIT"
] | null | null | null | contrib/bitrpc/bitrpc.py | aissty/xunbaocoin | 8820322012f7a4368210c1621fff4c372412f8a8 | [
"MIT"
] | null | null | null | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:12332")
else:
access = Se... | 24.135385 | 79 | 0.668536 |
bebb8b212f59595d250159cfc972e9d764b50587 | 23,478 | py | Python | pyof/v0x04/controller2switch/common.py | smythtech/python-openflow-legacy | f4ddb06ac8c98f074c04f027df4b52542e41c123 | [
"MIT"
] | null | null | null | pyof/v0x04/controller2switch/common.py | smythtech/python-openflow-legacy | f4ddb06ac8c98f074c04f027df4b52542e41c123 | [
"MIT"
] | null | null | null | pyof/v0x04/controller2switch/common.py | smythtech/python-openflow-legacy | f4ddb06ac8c98f074c04f027df4b52542e41c123 | [
"MIT"
] | null | null | null | """Defines common structures and enums for controller2switch."""
# System imports
from enum import Enum
# Local source tree imports
from pyof.foundation.base import GenericMessage, GenericStruct
from pyof.foundation.basic_types import (Char, FixedTypeList, Pad, UBInt8,
UBInt16... | 35.680851 | 79 | 0.653165 |
92be453ce734d414a365b3959d2ed304bd9e13ae | 1,092 | py | Python | ghostwriter/singleton/templatetags/settings_tags.py | fastlorenzo/Ghostwriter | 8acb2a824fc487d51ff6be845fe874d91ec74bb6 | [
"BSD-3-Clause"
] | null | null | null | ghostwriter/singleton/templatetags/settings_tags.py | fastlorenzo/Ghostwriter | 8acb2a824fc487d51ff6be845fe874d91ec74bb6 | [
"BSD-3-Clause"
] | null | null | null | ghostwriter/singleton/templatetags/settings_tags.py | fastlorenzo/Ghostwriter | 8acb2a824fc487d51ff6be845fe874d91ec74bb6 | [
"BSD-3-Clause"
] | null | null | null | # Django Imports
from django import template
from django.utils.translation import gettext_lazy as _
try:
from django.apps import apps # noqa isort:skip
get_model = apps.get_model
except ImportError:
from django.db.models.loading import get_model # noqa isort:skip
register = template.Library()
@regis... | 27.3 | 85 | 0.582418 |
4ce9d8856e8e6c7d1daa0db85da90cb64b8d6228 | 1,533 | py | Python | Task2G.py | Payton-Zhang/1A-computing-lab-group62 | f4cac324b13e973acac9b45abe531e0533d07fd1 | [
"MIT"
] | null | null | null | Task2G.py | Payton-Zhang/1A-computing-lab-group62 | f4cac324b13e973acac9b45abe531e0533d07fd1 | [
"MIT"
] | null | null | null | Task2G.py | Payton-Zhang/1A-computing-lab-group62 | f4cac324b13e973acac9b45abe531e0533d07fd1 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.dates
from floodsystem.datafetcher import fetch_measure_levels
from floodsystem.stationdata import build_station_list, update_water_levels
import datetime
from floodsystem.analysis import polyfit
from floodsystem.flood import stations_highest_rel_level
from floodsystem.... | 25.983051 | 94 | 0.652968 |
e05ce6aec49a481bb8f1e8a4339c094a7054db52 | 27,715 | py | Python | perfkitbenchmarker/providers/aws/aws_virtual_machine.py | bltb/PerfKitBenchmarker | 903eb82d4e7ee5ed2ac2953cf6ce1b80459497ed | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/providers/aws/aws_virtual_machine.py | bltb/PerfKitBenchmarker | 903eb82d4e7ee5ed2ac2953cf6ce1b80459497ed | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/providers/aws/aws_virtual_machine.py | bltb/PerfKitBenchmarker | 903eb82d4e7ee5ed2ac2953cf6ce1b80459497ed | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 PerfKitBenchmarker 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 appli... | 38.122421 | 80 | 0.668411 |
27532b03f4d093bea77e8901daa5047d06c17583 | 3,006 | py | Python | scripts/plot-allelefreq-recall.py | varlociraptor/prosic-evaluation | f4f1950ba5c10bda0f41df2a8f519d98f779d736 | [
"MIT"
] | 2 | 2020-04-29T00:56:09.000Z | 2021-03-07T19:59:06.000Z | scripts/plot-allelefreq-recall.py | varlociraptor/prosic-evaluation | f4f1950ba5c10bda0f41df2a8f519d98f779d736 | [
"MIT"
] | null | null | null | scripts/plot-allelefreq-recall.py | varlociraptor/prosic-evaluation | f4f1950ba5c10bda0f41df2a8f519d98f779d736 | [
"MIT"
] | 1 | 2022-03-15T12:23:03.000Z | 2022-03-15T12:23:03.000Z | from itertools import product
import matplotlib
matplotlib.use("agg")
from matplotlib import pyplot as plt
import seaborn as sns
import pandas as pd
import common
import numpy as np
import math
from matplotlib.lines import Line2D
MIN_CALLS = 10
vartype = snakemake.wildcards.vartype
colors = common.get_colors(snakemak... | 30.989691 | 83 | 0.58483 |
f9830114b9a57defaf2f02f6b627c7b95ceb0896 | 2,445 | py | Python | src/appclasses/smallscreens.py | jackmuskopf/pet-ct-image-editor | 1ba1342425160e2b351a7671e22e2796d72c8db8 | [
"MIT"
] | 1 | 2019-01-05T01:47:32.000Z | 2019-01-05T01:47:32.000Z | src/appclasses/smallscreens.py | jackmuskopf/preprocessing | 1ba1342425160e2b351a7671e22e2796d72c8db8 | [
"MIT"
] | null | null | null | src/appclasses/smallscreens.py | jackmuskopf/preprocessing | 1ba1342425160e2b351a7671e22e2796d72c8db8 | [
"MIT"
] | null | null | null | from .dependencies import *
class SplashScreen(tk.Toplevel):
def __init__(self, parent, text):
self.__name__ = 'LoadScreen'
tk.Toplevel.__init__(self, parent)
self.parent = parent
w = 530 # width for the Tk root
h = 250 # height for the Tk root
# get screen width an... | 33.958333 | 119 | 0.591002 |
2d05419ef55e068179f28d9ac2e2f4e2781b67f3 | 1,301 | py | Python | Autonomous Robots: Model Predictive Control/assignment2.py | RIT-MESH/Self-Driving-Car-courses-projects | 67188c069f7ec35aef1c0face83fa05ea22a9a17 | [
"MIT"
] | 1 | 2021-12-28T10:08:19.000Z | 2021-12-28T10:08:19.000Z | Autonomous Robots: Model Predictive Control/assignment2.py | RIT-MESH/Self-Driving-Car-courses-projects | 67188c069f7ec35aef1c0face83fa05ea22a9a17 | [
"MIT"
] | null | null | null | Autonomous Robots: Model Predictive Control/assignment2.py | RIT-MESH/Self-Driving-Car-courses-projects | 67188c069f7ec35aef1c0face83fa05ea22a9a17 | [
"MIT"
] | null | null | null | import numpy as np
from sim.sim2d import sim_run
# Simulator options.
options = {}
options['FIG_SIZE'] = [8,8]
options['OBSTACLES'] = False
class ModelPredictiveControl:
def __init__(self):
self.horizon = 2
self.dt = 0.2
self.L = 2.5 # Car base [m]
# Reference or set point the con... | 28.911111 | 74 | 0.51422 |
0fc9b7243aabd05832aebc7ccec38ed221084d35 | 4,359 | py | Python | defusedxml/ElementTree.py | marienz/defusedxml | 72fc4e8496db51cafd16c6c4f4900b2206c1db51 | [
"PSF-2.0"
] | null | null | null | defusedxml/ElementTree.py | marienz/defusedxml | 72fc4e8496db51cafd16c6c4f4900b2206c1db51 | [
"PSF-2.0"
] | null | null | null | defusedxml/ElementTree.py | marienz/defusedxml | 72fc4e8496db51cafd16c6c4f4900b2206c1db51 | [
"PSF-2.0"
] | null | null | null | # defusedxml
#
# Copyright (c) 2013 by Christian Heimes <christian@python.org>
# Licensed to PSF under a Contributor Agreement.
# See https://www.python.org/psf/license for licensing details.
"""Defused xml.etree.ElementTree facade
"""
from __future__ import print_function, absolute_import
import sys
import warnings
f... | 29.856164 | 98 | 0.687543 |
5d0d4137d8132ce62935148847f283d8e586b062 | 4,136 | py | Python | acapy_plugin_toolbox/util.py | lynnbendixsen/aries-acapy-plugin-toolbox | c19c6c26486e8acdc3814b07e620f7a291754089 | [
"Apache-2.0"
] | null | null | null | acapy_plugin_toolbox/util.py | lynnbendixsen/aries-acapy-plugin-toolbox | c19c6c26486e8acdc3814b07e620f7a291754089 | [
"Apache-2.0"
] | null | null | null | acapy_plugin_toolbox/util.py | lynnbendixsen/aries-acapy-plugin-toolbox | c19c6c26486e8acdc3814b07e620f7a291754089 | [
"Apache-2.0"
] | null | null | null | """Utility functions."""
import sys
import logging
import functools
from aries_cloudagent.messaging.agent_message import AgentMessage, AgentMessageSchema
from aries_cloudagent.messaging.base_handler import BaseHandler, BaseResponder, RequestContext
from aries_cloudagent.protocols.problem_report.message import Problem... | 31.097744 | 94 | 0.59647 |
7f008a1f590ae78a4ede6d3c30423e92f5e65ca0 | 17,171 | py | Python | onnxruntime/python/tools/quantization/calibrate.py | jay-karan/onnxruntime | 717a7de12c0c618462129354a46ea21d8a7b3e36 | [
"MIT"
] | null | null | null | onnxruntime/python/tools/quantization/calibrate.py | jay-karan/onnxruntime | 717a7de12c0c618462129354a46ea21d8a7b3e36 | [
"MIT"
] | null | null | null | onnxruntime/python/tools/quantization/calibrate.py | jay-karan/onnxruntime | 717a7de12c0c618462129354a46ea21d8a7b3e36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft, Intel Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ----------------------------------------... | 44.028205 | 142 | 0.614583 |
c1a4cdab90c1ce6a1793766ce519bf39de733ad5 | 14,020 | py | Python | jumpscale11/core/SSHAgent.py | threefoldtech/jumpscaleXI_core | 5d75ec89a624deb8cef8e1262a7f592e22cfcfcb | [
"Apache-2.0"
] | 1 | 2020-03-23T15:32:02.000Z | 2020-03-23T15:32:02.000Z | jumpscale11/core/SSHAgent.py | threefoldtech/jumpscaleXI_core | 5d75ec89a624deb8cef8e1262a7f592e22cfcfcb | [
"Apache-2.0"
] | null | null | null | jumpscale11/core/SSHAgent.py | threefoldtech/jumpscaleXI_core | 5d75ec89a624deb8cef8e1262a7f592e22cfcfcb | [
"Apache-2.0"
] | null | null | null | class SSHAgentKeyError(Exception):
pass
class SSHAgent:
def __init__(self):
self._inited = False
self._default_key = None
self.autostart = True
self.reset()
@property
def ssh_socket_path(self):
if "SSH_AUTH_SOCK" in os.environ:
return os.environ["S... | 36.321244 | 131 | 0.553709 |
5571a41c94001717079f77ee0307da778d7cf18b | 997 | py | Python | migrations/0013_auto_20180320_1626.py | procurator5/tippspiel | 247fd5d28e501cadf0d94e58740747eb42982a49 | [
"MIT"
] | null | null | null | migrations/0013_auto_20180320_1626.py | procurator5/tippspiel | 247fd5d28e501cadf0d94e58740747eb42982a49 | [
"MIT"
] | null | null | null | migrations/0013_auto_20180320_1626.py | procurator5/tippspiel | 247fd5d28e501cadf0d94e58740747eb42982a49 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.3 on 2018-03-20 16:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tippspiel', '0012_auto_20180320_1418'),
]
operations = [
migrations.AddField(
model_name='bettype',
name='max_value'... | 29.323529 | 86 | 0.590772 |
364fc892213d2cecfad69ac1c1e131484fb843b9 | 5,213 | py | Python | tools_webrtc/gtest_parallel_wrapper_test.py | grgustaf/owt-deps-webrtc | 2febf01947a5d74729b15d31b7bb9b9a01be89ae | [
"BSD-3-Clause"
] | 1 | 2018-09-17T08:20:03.000Z | 2018-09-17T08:20:03.000Z | tools_webrtc/gtest_parallel_wrapper_test.py | zhangj1024/webrtc | 3a6b729a8edaabd2fe324e1f6f830869ec38d5ab | [
"BSD-3-Clause"
] | null | null | null | tools_webrtc/gtest_parallel_wrapper_test.py | zhangj1024/webrtc | 3a6b729a8edaabd2fe324e1f6f830869ec38d5ab | [
"BSD-3-Clause"
] | 1 | 2021-05-26T03:19:23.000Z | 2021-05-26T03:19:23.000Z | #!/usr/bin/env python
# Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All ... | 40.410853 | 79 | 0.658162 |
057f96958e4bbe876072e7614e34974e21021fab | 2,252 | py | Python | .history/main_20171106230716.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/main_20171106230716.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | .history/main_20171106230716.py | reecebenson/DADSA-Tennis-PartA | d0763f819b300fcd0ce27041f5bc4ef0519c00bf | [
"MIT"
] | null | null | null | # DADSA - Assignment 1
# Reece Benson
import random
from classes import Menu as Menu
from classes import Handler as Handler
class App():
# Define the variables we will be using
debug = True
handler = None
# Define all of the properties we will need to use
def __init__(self):
# Load our ha... | 31.71831 | 98 | 0.549734 |
50fa5bd1754bb73da778187113f8b89f2c739d94 | 2,308 | py | Python | 0x08-python-more_classes/4-rectangle.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | 0x08-python-more_classes/4-rectangle.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | 0x08-python-more_classes/4-rectangle.py | C-distin/alx-higher_level_programming | ee018135b24ac07d40f2309a4febf21b8a25aee4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Define a rectangle class
"""
class Rectangle:
"""
A class that defines a rectangle
"""
def __init__(self, width=0, height=0):
"""
Initialize a rectangle
Args:
width: width of the rectangle
height: height o... | 23.793814 | 70 | 0.4987 |
39bb835dd36e01fdc98edd9300de07372910a1ee | 8,808 | py | Python | tests/main/views/test_buyer_domains.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 25 | 2015-01-14T10:45:13.000Z | 2021-05-26T17:21:41.000Z | tests/main/views/test_buyer_domains.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 641 | 2015-01-15T11:10:50.000Z | 2021-06-15T22:18:42.000Z | tests/main/views/test_buyer_domains.py | uk-gov-mirror/alphagov.digitalmarketplace-api | 5a1db63691d0c4a435714837196ab6914badaf62 | [
"MIT"
] | 22 | 2015-06-13T15:37:45.000Z | 2021-08-19T23:40:49.000Z | import json
import mock
import pytest
from tests.bases import BaseApplicationTest
from app import db
from app.models import BuyerEmailDomain, AuditEvent
class TestCreateBuyerEmailDomain(BaseApplicationTest):
def test_create_buyer_email_domain_with_no_data(self):
res = self.client.post(
'/buye... | 35.659919 | 110 | 0.610014 |
fd307230419619a6ad42fc1f3e613811e34740fc | 940 | py | Python | src/torspray/modules/ssh_keys.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | 11 | 2022-02-27T22:19:52.000Z | 2022-03-18T19:57:06.000Z | src/torspray/modules/ssh_keys.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | null | null | null | src/torspray/modules/ssh_keys.py | gergelykalman/torspray | a84c903b71da8c87e9e22d9bce123aaf6797abe8 | [
"MIT"
] | null | null | null | import os
import random
import paramiko
def generate_key(privname, pubname, overwrite=False):
if not overwrite:
for name, filename in (
("private", privname),
("public", pubname)):
if os.path.exists(filename):
return filename
... | 27.647059 | 74 | 0.605319 |
c4667df4262595748a1e872bc63f4773ff0b3991 | 4,322 | py | Python | web/transiq/driver/migrations/0015_mahindragpsdevice_mahindragpsdevicelog.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | web/transiq/driver/migrations/0015_mahindragpsdevice_mahindragpsdevicelog.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | 14 | 2020-06-05T23:06:45.000Z | 2022-03-12T00:00:18.000Z | web/transiq/driver/migrations/0015_mahindragpsdevice_mahindragpsdevicelog.py | manibhushan05/transiq | 763fafb271ce07d13ac8ce575f2fee653cf39343 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-12-04 00:16
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('driver', '0014_auto_20171112_1359'),
]
operations ... | 62.637681 | 209 | 0.614762 |
46c8fea8005fca202a30f0d226ac55ba1c82ee79 | 1,863 | py | Python | test/programytest/config/bot/test_redisstorage.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 2 | 2018-06-16T09:32:22.000Z | 2019-07-21T13:16:00.000Z | test/programytest/config/bot/test_redisstorage.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 3 | 2020-07-16T04:00:42.000Z | 2021-03-31T18:52:22.000Z | test/programytest/config/bot/test_redisstorage.py | whackur/chatbot | bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7 | [
"MIT"
] | 4 | 2018-06-29T23:50:44.000Z | 2020-11-05T08:13:47.000Z | import unittest
from programy.config.file.yaml_file import YamlConfigurationFile
from programy.config.bot.redisstorage import BotConversationsRedisStorageConfiguration
from programy.clients.events.console.config import ConsoleConfiguration
class RedisStorageConfigurationTests(unittest.TestCase):
def test_with_da... | 32.684211 | 86 | 0.675255 |
0b838372be46850bfa34c36c37c5079575578795 | 4,155 | py | Python | app/graphql/graphql.py | der-ofenmeister/recommendation-api | e32fb360c5da05df284c3a1e03e5e2e6b993ce66 | [
"Apache-2.0"
] | null | null | null | app/graphql/graphql.py | der-ofenmeister/recommendation-api | e32fb360c5da05df284c3a1e03e5e2e6b993ce66 | [
"Apache-2.0"
] | 176 | 2021-08-05T08:14:07.000Z | 2022-03-31T08:24:24.000Z | app/graphql/graphql.py | der-ofenmeister/recommendation-api | e32fb360c5da05df284c3a1e03e5e2e6b993ce66 | [
"Apache-2.0"
] | null | null | null | from graphene import ObjectType, String, Field, List, Int
from graphene_federation import build_schema
from app.models.topic import TopicModel
from app.models.topic_recommendations import TopicRecommendationsModel
from app.models.slate import SlateModel
from app.models.slate_lineup import SlateLineupModel
from app.gra... | 65.952381 | 129 | 0.586282 |
2af6ab693d314b0e7fc7974660dd501a8afc4065 | 1,012 | py | Python | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/currentusers/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/currentusers/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | null | null | null | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/currentusers/errors.py | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: errors.py
import mcl.status
ERR_SUCCESS = mcl.status.MCL_SUCCESS
ERR_INVALID_PARAM = mcl.status.framework.ERR_START
ERR_NOT_IMPLEMENTED = mcl.status.... | 46 | 70 | 0.781621 |
f3ad87f4eb228ed9e16a3bea489847650b3004f9 | 9,508 | py | Python | packages/syft/src/syft/core/plan/plan.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 1 | 2021-09-14T10:56:43.000Z | 2021-09-14T10:56:43.000Z | packages/syft/src/syft/core/plan/plan.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 2 | 2021-04-02T10:12:44.000Z | 2021-04-02T10:12:50.000Z | packages/syft/src/syft/core/plan/plan.py | callezenwaka/PySyft | 2545c302441cfe727ec095c4f9aa136bff02be32 | [
"Apache-1.1"
] | 1 | 2021-08-19T12:23:01.000Z | 2021-08-19T12:23:01.000Z | """
This is the main Plan class which is responsible for containing a list of Actions
which can be serialized, deserialized, and executed by substituting the run time
pointers with the original traced pointers and replaying the actions against a node.
"""
# stdlib
import re
import sys
from typing import Any
from typing... | 37.581028 | 105 | 0.641144 |
4fe0b833619681b3402305fe9f55c6225a24c68e | 7,102 | py | Python | test/python/common/hdl.py | payes/mayastor | 917c4f7cd8a3d8642307a7ea9165e2403bc4b028 | [
"Apache-2.0"
] | null | null | null | test/python/common/hdl.py | payes/mayastor | 917c4f7cd8a3d8642307a7ea9165e2403bc4b028 | [
"Apache-2.0"
] | null | null | null | test/python/common/hdl.py | payes/mayastor | 917c4f7cd8a3d8642307a7ea9165e2403bc4b028 | [
"Apache-2.0"
] | null | null | null | """Common code that represents a mayastor handle."""
import mayastor_pb2 as pb
import grpc
import mayastor_pb2_grpc as rpc
from pytest_testconfig import config
from functools import partial
pytest_plugins = ["docker_compose"]
class MayastorHandle(object):
"""Mayastor gRPC handle."""
def __init__(self, ip_v4... | 34.475728 | 87 | 0.620389 |
59f5d2b8f870c23cc8b27d01da8eecfe883c51cd | 12,205 | py | Python | train_lstm_crf.py | WenRichard/Event_Identification_NER_Classfication | 2d8614f16c4abcaf267d7d61c68664d2c9a30e36 | [
"Apache-2.0"
] | 5 | 2021-05-15T12:17:49.000Z | 2021-11-29T07:37:59.000Z | train_lstm_crf.py | WenRichard/Event_Identification_NER_Classfication | 2d8614f16c4abcaf267d7d61c68664d2c9a30e36 | [
"Apache-2.0"
] | null | null | null | train_lstm_crf.py | WenRichard/Event_Identification_NER_Classfication | 2d8614f16c4abcaf267d7d61c68664d2c9a30e36 | [
"Apache-2.0"
] | 3 | 2021-05-18T09:24:43.000Z | 2022-03-03T11:43:20.000Z | import logging
import tensorflow as tf
import numpy as np
import os
import pickle
import time
import datetime
from model_lstm_crf import MyModel
from public_tools.data_preprocess import read_corpus, load_vocab, load_tag2label, batch_yield, pad_sequences
from public_tools.tag_evaluating import Metrics
from public_tools... | 45.203704 | 121 | 0.645309 |
c962d58f11cb8a2aa659c23f444c9a41a7948416 | 224,208 | py | Python | Core/dev.asm.py | lb3361/gigatron-rom | 2c7e4305d6e552c1d077bdbd5674e51b5a61fd28 | [
"BSD-2-Clause"
] | 1 | 2022-02-10T11:44:23.000Z | 2022-02-10T11:44:23.000Z | Core/dev.asm.py | lb3361/gigatron-rom | 2c7e4305d6e552c1d077bdbd5674e51b5a61fd28 | [
"BSD-2-Clause"
] | null | null | null | Core/dev.asm.py | lb3361/gigatron-rom | 2c7e4305d6e552c1d077bdbd5674e51b5a61fd28 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#-----------------------------------------------------------------------
#
# Core video, sound and interpreter loop for Gigatron TTL microcomputer
#
#-----------------------------------------------------------------------
#
# Main characteristics:
#
# - 6.25 MHz clock
# - Rendering 160x120 pi... | 37.474177 | 103 | 0.44547 |
358c9c673d89002856aabdc161ced21da9669afc | 7,299 | py | Python | specfem2d/utils/compare_two_images.py | PanIGGCAS/SeisElastic2D_1.1 | 2872dc514b638237771f4071195f7b8f90e0ce3d | [
"MIT"
] | 11 | 2020-10-04T01:55:41.000Z | 2021-11-14T05:20:50.000Z | specfem2d/utils/compare_two_images.py | PanIGGCAS/SeisElastic2D_1.1 | 2872dc514b638237771f4071195f7b8f90e0ce3d | [
"MIT"
] | 2 | 2020-10-31T03:36:34.000Z | 2021-05-27T09:36:13.000Z | specfem2d/utils/compare_two_images.py | PanIGGCAS/SeisElastic2D_1.1 | 2872dc514b638237771f4071195f7b8f90e0ce3d | [
"MIT"
] | 8 | 2020-12-15T02:04:58.000Z | 2022-01-15T21:48:35.000Z | #!/usr/bin/env python
#
# compares two images
# taken from http://www.pyimagesearch.com/2014/09/15/python-compare-two-images in April 2015
# computes the Mean Squared Error (MSE) and the Structural Similarity Index
# (SSIM) between two images (having the exact same size)
# Slightly modified by Dimitri Komatitsch and... | 30.797468 | 112 | 0.626113 |
e3ff3a5566aa67f2e46aaaf6a92861cdbc12de0f | 13,209 | py | Python | pypushwoosh/notification.py | shiratamu/pushwoosh-python-lib | da05d7b72729ebfc65a7ab0b08c9009632a38833 | [
"MIT"
] | null | null | null | pypushwoosh/notification.py | shiratamu/pushwoosh-python-lib | da05d7b72729ebfc65a7ab0b08c9009632a38833 | [
"MIT"
] | null | null | null | pypushwoosh/notification.py | shiratamu/pushwoosh-python-lib | da05d7b72729ebfc65a7ab0b08c9009632a38833 | [
"MIT"
] | null | null | null | # coding=utf-8
from six import string_types, add_metaclass
from . import constants
from .filter import BaseFilter
from .utils import render_attrs
from .exceptions import PushwooshNotificationException
class BaseNotificationMixin(object):
pass
class BaseNotification(object):
_mixed = tuple()
def __init... | 30.226545 | 131 | 0.64933 |
c5bb5dc3f240304856be34bf6eb8079dd2b61a25 | 17,999 | py | Python | pdil/tool/fossil/_lib/space/constraintBased.py | Mikfr83/fossil | 5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf | [
"BSD-3-Clause"
] | null | null | null | pdil/tool/fossil/_lib/space/constraintBased.py | Mikfr83/fossil | 5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf | [
"BSD-3-Clause"
] | null | null | null | pdil/tool/fossil/_lib/space/constraintBased.py | Mikfr83/fossil | 5bba97e6ea05bc59a76dae7f6ea11d09fe09e3bf | [
"BSD-3-Clause"
] | null | null | null | '''
Utilities to manage and use space switching.
.. todo:
TEST rotate only space! Might use same group as position only.
Function to rename enums
'''
from __future__ import print_function, absolute_import
import collections
import logging
import numbers
import operator
from pymel.core import attributeQuery... | 35.500986 | 151 | 0.628313 |
e67d40db7d746a40018c3f03cfc6b727754e2c1c | 1,492 | py | Python | c7n/resources/cognito.py | magnologan/cloud-custodian | 4ce318cfd890edc675c0e6536cc724687e1869af | [
"Apache-2.0"
] | null | null | null | c7n/resources/cognito.py | magnologan/cloud-custodian | 4ce318cfd890edc675c0e6536cc724687e1869af | [
"Apache-2.0"
] | null | null | null | c7n/resources/cognito.py | magnologan/cloud-custodian | 4ce318cfd890edc675c0e6536cc724687e1869af | [
"Apache-2.0"
] | null | null | null |
# Copyright 2016 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 31.744681 | 74 | 0.69571 |
315b4aaa646416ccceffd50ef6df6a49db03aa00 | 5,970 | py | Python | contrib/devtools/check-rpc-mappings.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | contrib/devtools/check-rpc-mappings.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | contrib/devtools/check-rpc-mappings.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Syndicate Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Check RPC argument consistency."""
from collections import defaultdict
import os
import re
import sys
# ... | 37.54717 | 157 | 0.581742 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.