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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fcebc9f17eecf6f68658b4ad13dd86f6792240bb | 30,711 | py | Python | lrs/utils/req_validate.py | learningturf/lt_lrs_docker | acb80cf0a18f3815213d15d39d90a949c7675a27 | [
"Apache-2.0"
] | null | null | null | lrs/utils/req_validate.py | learningturf/lt_lrs_docker | acb80cf0a18f3815213d15d39d90a949c7675a27 | [
"Apache-2.0"
] | null | null | null | lrs/utils/req_validate.py | learningturf/lt_lrs_docker | acb80cf0a18f3815213d15d39d90a949c7675a27 | [
"Apache-2.0"
] | null | null | null | import json
from isodate.isodatetime import parse_datetime
from isodate.isoerror import ISO8601Error
import uuid
from . import get_agent_ifp
from authorization import auth
from StatementValidator import StatementValidator
from ..models import Statement, Agent, Activity, ActivityState, ActivityProfile, AgentProfile
fr... | 43.25493 | 163 | 0.660089 |
01035e4deb6625eacf0cc981b5eb9592c7b70aab | 2,442 | py | Python | bentoml/frameworks/gluon.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | bentoml/frameworks/gluon.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | bentoml/frameworks/gluon.py | alvarogg777/BentoML | 2bb297dca0330228c27b14aeeba0742820c6f0ef | [
"Apache-2.0"
] | null | null | null | import os
from bentoml.exceptions import MissingDependencyException
from bentoml.service.artifacts import BentoServiceArtifact
from bentoml.service.env import BentoServiceEnv
class GluonModelArtifact(BentoServiceArtifact):
"""
Abstraction for saving/loading gluon models
Args:
name (str): Name for ... | 32.56 | 86 | 0.63964 |
af47a58fb66a558149c4d0d488b706ab63601ddf | 2,988 | py | Python | stokepy/helpers.py | bobbywlindsey/stokepy | e7f4ad0c27d8fc22129558db6ae0dbbab0627ace | [
"MIT"
] | 9 | 2017-05-09T20:00:10.000Z | 2020-07-02T18:00:22.000Z | stokepy/helpers.py | bobbywlindsey/stokepy | e7f4ad0c27d8fc22129558db6ae0dbbab0627ace | [
"MIT"
] | null | null | null | stokepy/helpers.py | bobbywlindsey/stokepy | e7f4ad0c27d8fc22129558db6ae0dbbab0627ace | [
"MIT"
] | 2 | 2017-08-10T14:47:07.000Z | 2019-01-25T02:37:34.000Z | from .headers import *
def architecture_check_passed(P, phi):
"""
Make sure columns of the transition matrix, P, (which represent the
number of states) match the number of elements in the initial distribution,
phi, which represents the starting point in each state
"""
num_states = P.shape[0]
... | 37.822785 | 83 | 0.716867 |
3ae224a8a388b3baca41ae2ececfd32f750515de | 9,535 | py | Python | diofant/concrete/delta.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | 57 | 2016-09-13T23:16:26.000Z | 2022-03-29T06:45:51.000Z | diofant/concrete/delta.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | 402 | 2016-05-11T11:11:47.000Z | 2022-03-31T14:27:02.000Z | diofant/concrete/delta.py | rajkk1/diofant | 6b361334569e4ec2e8c7d30dc324387a4ad417c2 | [
"BSD-3-Clause"
] | 20 | 2016-05-11T08:17:37.000Z | 2021-09-10T09:15:51.000Z | """
This module implements sums and products containing the Kronecker Delta function.
"""
from ..core import Add, Dummy, Integer, Mul, cacheit
from ..functions import KroneckerDelta, Piecewise, piecewise_fold
from ..logic import true
from ..polys import factor
from ..sets import Interval
from ..utilities import defaul... | 31.160131 | 81 | 0.575039 |
c5dedc9f0a9a22f03d486696dc8627fe16e90606 | 10,430 | py | Python | theano/misc/check_blas.py | goodfeli/Theano | 0494f6891a326b02d4e135ac7ed9ccf639560212 | [
"BSD-3-Clause"
] | 11 | 2016-12-01T19:49:28.000Z | 2021-11-08T11:12:08.000Z | theano/misc/check_blas.py | goodfeli/Theano | 0494f6891a326b02d4e135ac7ed9ccf639560212 | [
"BSD-3-Clause"
] | null | null | null | theano/misc/check_blas.py | goodfeli/Theano | 0494f6891a326b02d4e135ac7ed9ccf639560212 | [
"BSD-3-Clause"
] | 6 | 2015-06-21T20:55:55.000Z | 2019-04-24T20:03:25.000Z | #!/usr/bin/env python
#print info to check we link with witch version of blas
#test the speed of the blas gemm fct:
#C=a*C+dot(A,B)*b
#A,B,C matrix
#a,b scalar
s = """
result for shapes=(2000,2000) and iters=100
GTX 470 7.22s
GTX 285, 6.84s
GTX 480 5.83s
"""
import os
import sys
import time
from optparse import Opti... | 41.388889 | 114 | 0.488207 |
121abad352cb15a72176824d4c1acc675f270eb8 | 1,703 | py | Python | arabicToRoman.py | thecrimsoncoder/arabicToRoman | 980d6c2cc0771686e051c9ed98b3e3d81589f42c | [
"MIT"
] | null | null | null | arabicToRoman.py | thecrimsoncoder/arabicToRoman | 980d6c2cc0771686e051c9ed98b3e3d81589f42c | [
"MIT"
] | null | null | null | arabicToRoman.py | thecrimsoncoder/arabicToRoman | 980d6c2cc0771686e051c9ed98b3e3d81589f42c | [
"MIT"
] | null | null | null | import time
def title():
print("++++++++++++++++++++++++++++++++++++++++")
print("+ a r a b i c T o R o m a n . p y +")
print("+ Created By: Sean McElhare +")
print("+ github.com/thecrimsoncoder +")
print("++++++++++++++++++++++++++++++++++++++++")
def promptInput():
... | 34.06 | 79 | 0.407516 |
3677ee2fd630c64c9aa744e499e21692112cc1aa | 5,039 | py | Python | workloads/mnist_jax/workload.py | hanlint/algorithmic-efficiency | effe55a0e97c82500861e34f52f7894534be79e3 | [
"Apache-2.0"
] | null | null | null | workloads/mnist_jax/workload.py | hanlint/algorithmic-efficiency | effe55a0e97c82500861e34f52f7894534be79e3 | [
"Apache-2.0"
] | null | null | null | workloads/mnist_jax/workload.py | hanlint/algorithmic-efficiency | effe55a0e97c82500861e34f52f7894534be79e3 | [
"Apache-2.0"
] | null | null | null | """MNIST workload implemented in Jax."""
import struct
import time
from typing import Tuple
from flax import linen as nn
import jax
import jax.numpy as jnp
import spec
import tensorflow_datasets as tfds
class _Model(nn.Module):
@nn.compact
def __call__(self, x: spec.Tensor, train: bool):
del train
x =... | 28.630682 | 80 | 0.673745 |
dbdfda9de4fe2a4d790a60a098e521bbc4538813 | 1,267 | py | Python | tests/core/test_serialization.py | beyondacm/great_expectations | 6977ac9e07c72658c777fec60174db63078b7721 | [
"Apache-2.0"
] | null | null | null | tests/core/test_serialization.py | beyondacm/great_expectations | 6977ac9e07c72658c777fec60174db63078b7721 | [
"Apache-2.0"
] | null | null | null | tests/core/test_serialization.py | beyondacm/great_expectations | 6977ac9e07c72658c777fec60174db63078b7721 | [
"Apache-2.0"
] | null | null | null | import logging
from decimal import Decimal
from great_expectations.core.util import (
convert_to_json_serializable,
requires_lossy_conversion,
)
def test_lossy_serialization_warning(caplog):
caplog.set_level(logging.WARNING, logger="great_expectations.core")
d = Decimal("12345.6789012345678901234567... | 25.857143 | 75 | 0.737964 |
39805bf138b8206844ff5346586048b2e69120db | 9,542 | py | Python | kats/models/stlf.py | sarvex/Kats | ad85dd235a4488f1e65799005efcc9da45f59100 | [
"MIT"
] | 2 | 2021-12-26T14:15:24.000Z | 2022-03-23T21:12:58.000Z | kats/models/stlf.py | sec-js/Kats | 01fbc4febd317dc641c6b0663dff36b545f38992 | [
"MIT"
] | null | null | null | kats/models/stlf.py | sec-js/Kats | 01fbc4febd317dc641c6b0663dff36b545f38992 | [
"MIT"
] | 1 | 2021-09-21T15:41:13.000Z | 2021-09-21T15:41:13.000Z | # 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.
"""STLF forecasting model
This model starts from decomposing the time series data with STL decomposition
then it fits individual foreasting mod... | 35.210332 | 101 | 0.621777 |
deb4f757632313217f20c90abf8c44505fbad81d | 3,703 | py | Python | tests/test_roi_pooling_conv.py | scilicet64/keras-spp | 23da20561fe92c585208af9bf3e0ef8f51bc5dcc | [
"MIT"
] | null | null | null | tests/test_roi_pooling_conv.py | scilicet64/keras-spp | 23da20561fe92c585208af9bf3e0ef8f51bc5dcc | [
"MIT"
] | null | null | null | tests/test_roi_pooling_conv.py | scilicet64/keras-spp | 23da20561fe92c585208af9bf3e0ef8f51bc5dcc | [
"MIT"
] | null | null | null | import pdb
import keras.backend as K
import numpy as np
from keras.layers import Input
from keras.models import Model
from spp.RoiPoolingConv import RoiPoolingConv
dim_ordering = K.image_data_format()
assert dim_ordering in {'channels_last','channels_first'}, 'dim_ordering must be in {channels_last,channels_first}'
... | 39.393617 | 115 | 0.544423 |
0c5bff14424b1a729de58c0df31ab775f6dbdf45 | 2,184 | py | Python | excursion/active_learning/approximations.py | leonoravesterbacka/excursion | 6716a90d8e34656e97fabe3f0cda95348a1711a5 | [
"Apache-2.0"
] | 2 | 2021-07-09T13:19:06.000Z | 2021-08-20T14:30:20.000Z | excursion/active_learning/approximations.py | leonoravesterbacka/excursion | 6716a90d8e34656e97fabe3f0cda95348a1711a5 | [
"Apache-2.0"
] | null | null | null | excursion/active_learning/approximations.py | leonoravesterbacka/excursion | 6716a90d8e34656e97fabe3f0cda95348a1711a5 | [
"Apache-2.0"
] | 4 | 2020-11-02T10:35:02.000Z | 2022-01-14T18:35:05.000Z | from scipy.linalg import cho_solve
from scipy.stats import norm
import gpytorch
import torch
import numpy as np
torch.cuda.set_device(0)
def h_normal_gpytorch(s):
""" Entropy of a normal distribution """
return torch.log(s * (2 * np.e * np.pi) ** 0.5)
def approx_mi_vec_gpytorch(mu, cov, thresholds):
# ... | 27.3 | 84 | 0.512363 |
630aaef30322b13378c5d4ff7b0688006e50c486 | 187 | py | Python | Beginner/odd_or_even.py | man21/IOSD-UIETKUK-HacktoberFest-Meetup-2019 | 8ca1a8bf95ee98d303d3a909c448288fa5992210 | [
"Apache-2.0"
] | 22 | 2019-10-02T16:48:10.000Z | 2020-11-14T23:28:41.000Z | Beginner/odd_or_even.py | man21/IOSD-UIETKUK-HacktoberFest-Meetup-2019 | 8ca1a8bf95ee98d303d3a909c448288fa5992210 | [
"Apache-2.0"
] | 46 | 2019-10-01T03:53:30.000Z | 2020-10-20T16:34:37.000Z | Beginner/odd_or_even.py | man21/IOSD-UIETKUK-HacktoberFest-Meetup-2019 | 8ca1a8bf95ee98d303d3a909c448288fa5992210 | [
"Apache-2.0"
] | 415 | 2019-10-01T03:48:22.000Z | 2021-02-27T04:57:28.000Z | a = int(input("enter integer :"))
if a == 0:
print("zero is neither even nor odd")
elif a % 2 == 0:
print("Given no. is even")
elif a % 2 == 1:
print("Given no. is odd")
| 20.777778 | 41 | 0.545455 |
cca075a91e7c1fdbe0d313c018a86148d7276d99 | 3,265 | py | Python | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/_configuration.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.347222 | 129 | 0.685145 |
aeda54abdc13d82a4672376ad86c45a5cbd74d1f | 415 | py | Python | nominatim/validators/validators.py | StefanMavrodiev/trackhub-nominatim | 56738b7cdc435afe04fe83517bf82cb9f1bf7c53 | [
"MIT"
] | null | null | null | nominatim/validators/validators.py | StefanMavrodiev/trackhub-nominatim | 56738b7cdc435afe04fe83517bf82cb9f1bf7c53 | [
"MIT"
] | null | null | null | nominatim/validators/validators.py | StefanMavrodiev/trackhub-nominatim | 56738b7cdc435afe04fe83517bf82cb9f1bf7c53 | [
"MIT"
] | null | null | null | from .country_code import CountryCode
from .country_exclude import CountryExclude
class Validators(object):
country_code = CountryCode.validate
country_exclude = CountryExclude.validate
@staticmethod
def validate(data: str):
"""
Run all validators
:param data:
:return... | 19.761905 | 45 | 0.66747 |
c85a95b507a665e98443ebd8458d4e1bde2c270a | 75,849 | py | Python | tools/common.py | Moustik06/cats-blender-plugin | ab17a14963c716db5c5cfdb71f3770776b0ddad4 | [
"MIT"
] | null | null | null | tools/common.py | Moustik06/cats-blender-plugin | ab17a14963c716db5c5cfdb71f3770776b0ddad4 | [
"MIT"
] | null | null | null | tools/common.py | Moustik06/cats-blender-plugin | ab17a14963c716db5c5cfdb71f3770776b0ddad4 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2017 GiveMeAllYourCats
# 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, mer... | 33.092932 | 196 | 0.605914 |
f13b61de39c92b7baafe41ea00572547c9293140 | 808 | py | Python | pipeline/__init__.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | 1 | 2020-09-24T07:39:16.000Z | 2020-09-24T07:39:16.000Z | pipeline/__init__.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:46:54.000Z | 2021-06-10T22:54:45.000Z | pipeline/__init__.py | sdgdsffdsfff/bk-sops-tencent | e8aff91f822e79031e12b0f66943830f44ced506 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 47.529412 | 115 | 0.785891 |
79391ab57d5a76f494af11423d7ab0942e0394cb | 6,029 | py | Python | data/dataset_srmd.py | WestCityInstitute/KAIR | 3eb3cc7776fa8c57e8ed7c71bfa8039beb4c6677 | [
"MIT"
] | 3 | 2021-06-24T17:33:44.000Z | 2021-10-13T14:34:25.000Z | data/dataset_srmd.py | WestCityInstitute/KAIR | 3eb3cc7776fa8c57e8ed7c71bfa8039beb4c6677 | [
"MIT"
] | null | null | null | data/dataset_srmd.py | WestCityInstitute/KAIR | 3eb3cc7776fa8c57e8ed7c71bfa8039beb4c6677 | [
"MIT"
] | 1 | 2021-06-08T03:11:15.000Z | 2021-06-08T03:11:15.000Z | import random
import numpy as np
import torch
import torch.utils.data as data
import utils.utils_image as util
from utils import utils_sisr
import hdf5storage
import os
class DatasetSRMD(data.Dataset):
'''
# -----------------------------------------
# Get L/H/M for noisy image SR with Gaussian kernels.
... | 38.647436 | 132 | 0.437718 |
2f3bda07a0b7784467c3ddf9734db7eead86fe0d | 18,098 | py | Python | gokart/task.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | gokart/task.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | gokart/task.py | skmatz/gokart | ba1dc497dca1c7901bc861f49b1f081adc2a1888 | [
"MIT"
] | null | null | null | import hashlib
import os
import sys
from importlib import import_module
from logging import getLogger
from typing import Union, List, Any, Callable, Set, Optional, Dict
import luigi
import pandas as pd
import gokart
from gokart.file_processor import FileProcessor
from gokart.pandas_type_config import PandasTypeConfig... | 47.007792 | 159 | 0.635761 |
8855d0b64aa770a180601c992b3ac029e14c582a | 138 | py | Python | tests/spam.py | pji/imgeaser | e8062ec792479eb18accb2936e73cf42dded1498 | [
"MIT"
] | null | null | null | tests/spam.py | pji/imgeaser | e8062ec792479eb18accb2936e73cf42dded1498 | [
"MIT"
] | null | null | null | tests/spam.py | pji/imgeaser | e8062ec792479eb18accb2936e73cf42dded1498 | [
"MIT"
] | null | null | null | """
spam
~~~~
Toy functions for testing.
"""
def spam_eggs():
pass
def spam_bacon():
pass
def spam_baked_beans():
pass
| 7.263158 | 26 | 0.594203 |
2b6287d867cb35414567ee9a78e50c41c4a1340b | 16,703 | py | Python | gs_api_client/swagger/models/template_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 7 | 2019-07-12T13:59:45.000Z | 2021-03-16T08:46:20.000Z | gs_api_client/swagger/models/template_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 13 | 2020-01-23T07:50:29.000Z | 2022-03-21T14:32:40.000Z | gs_api_client/swagger/models/template_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
API Specification
# Introduction Welcome to gridscales API documentation. A REST API is a programming interface that allows you to access and send data directly to our systems using HTTPS requests, without the need to use a web GUI. All the functionality you are already familiar with in y... | 114.40411 | 12,787 | 0.699994 |
269ddc21d1774042d00fa8fcd2803ede4b31bfdf | 544 | py | Python | plotly/validators/scatterpolargl/marker/line/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/validators/scatterpolargl/marker/line/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | null | null | null | plotly/validators/scatterpolargl/marker/line/_color.py | faezs/plotly.py | 6009b5b9c746e5d2a2849ad255a4eb234b551ed7 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self,
plotly_name='color',
parent_name='scatterpolargl.marker.line',
**kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_na... | 25.904762 | 68 | 0.604779 |
3f164d5256cda3e67d573142dcd0e9421fd54664 | 3,427 | py | Python | dxm/lib/DxAsyncTask/DxAsyncTask.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 5 | 2018-08-23T15:47:05.000Z | 2022-01-19T23:38:18.000Z | dxm/lib/DxAsyncTask/DxAsyncTask.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 59 | 2018-10-15T10:37:00.000Z | 2022-03-22T20:49:25.000Z | dxm/lib/DxAsyncTask/DxAsyncTask.py | experiortec/dxm-toolkit | b2ab6189e163c62fa8d7251cd533d2a36430d44a | [
"Apache-2.0"
] | 12 | 2019-03-08T19:59:13.000Z | 2021-12-16T03:28:04.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under ... | 29.290598 | 90 | 0.600233 |
5ca0ec76f16c6abe6a86cccdf1ff3375f4fcfef7 | 33,571 | py | Python | tests/functional/test_lambda_trigger_events.py | igorlg/aws-lambda-powertools-python | 7addeab6fcc57924a64ccd867caf312d1153b55a | [
"MIT-0"
] | null | null | null | tests/functional/test_lambda_trigger_events.py | igorlg/aws-lambda-powertools-python | 7addeab6fcc57924a64ccd867caf312d1153b55a | [
"MIT-0"
] | null | null | null | tests/functional/test_lambda_trigger_events.py | igorlg/aws-lambda-powertools-python | 7addeab6fcc57924a64ccd867caf312d1153b55a | [
"MIT-0"
] | null | null | null | import base64
import json
import os
from secrets import compare_digest
from urllib.parse import quote_plus
from aws_lambda_powertools.utilities.data_classes import (
ALBEvent,
APIGatewayProxyEvent,
APIGatewayProxyEventV2,
CloudWatchLogsEvent,
EventBridgeEvent,
KinesisStreamEvent,
S3Event,
... | 43.094994 | 120 | 0.74612 |
79c585de7cc78ce12173048f8e6c56889b38f3b9 | 143 | py | Python | tests/conftest.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | tests/conftest.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | tests/conftest.py | kringen/wingnut | 73be4f8393720ff0932ab069543e5f2d2308296d | [
"MIT"
] | null | null | null | import pytest
from ui import ui
@pytest.fixture
def app():
yield ui.app
@pytest.fixture
def client(app):
return app.test_client()
| 10.214286 | 28 | 0.699301 |
8d29967cfc6f4539b5704abf1f9fe67ec40f3e96 | 3,149 | py | Python | sonarqube/measures.py | alexcfpho/python-sonarqube-api | 97a637e3d8083d1d72af0f1ba2e5ab7ec88a7d75 | [
"MIT"
] | null | null | null | sonarqube/measures.py | alexcfpho/python-sonarqube-api | 97a637e3d8083d1d72af0f1ba2e5ab7ec88a7d75 | [
"MIT"
] | null | null | null | sonarqube/measures.py | alexcfpho/python-sonarqube-api | 97a637e3d8083d1d72af0f1ba2e5ab7ec88a7d75 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from sonarqube.config import (
API_MEASURES_COMPONENT_ENDPOINT,
API_MEASURES_SEARCH_HISTORY_ENDPOINT
)
class SonarQubeMeasure:
metricKeys = 'code_smells,bugs,vulnerabilities,new_bugs,new_vulnerabilities,new_code_smells,coverage,\
new_reliability_rating,reliabil... | 32.463918 | 112 | 0.599238 |
106ec863b06ddf2321cd98737b8d3049bac53f8d | 13,688 | py | Python | src/generate.py | mgwein/DeepTreeAttention | 22bd0beb836a570b556baa82b747f69caded05c7 | [
"MIT"
] | null | null | null | src/generate.py | mgwein/DeepTreeAttention | 22bd0beb836a570b556baa82b747f69caded05c7 | [
"MIT"
] | null | null | null | src/generate.py | mgwein/DeepTreeAttention | 22bd0beb836a570b556baa82b747f69caded05c7 | [
"MIT"
] | 1 | 2022-02-28T19:46:03.000Z | 2022-02-28T19:46:03.000Z | #Convert NEON field sample points into bounding boxes of cropped image data for model training
import glob
import geopandas as gpd
import rasterio
import numpy as np
import shapely
import os
import pandas as pd
from src.neon_paths import find_sensor_path, lookup_and_convert, bounds_to_geoindex
from src import patches
f... | 40.859701 | 253 | 0.646698 |
829e207fd7e9b0907a37d0c0a23af8d02281c4e6 | 6,960 | py | Python | exp/train_mask.py | ddz16/query-selector | f90f3003f5027f1d00e8f9494dcfd8e32e253927 | [
"Apache-2.0"
] | null | null | null | exp/train_mask.py | ddz16/query-selector | f90f3003f5027f1d00e8f9494dcfd8e32e253927 | [
"Apache-2.0"
] | null | null | null | exp/train_mask.py | ddz16/query-selector | f90f3003f5027f1d00e8f9494dcfd8e32e253927 | [
"Apache-2.0"
] | null | null | null | # coding=UTF-8
from data_loader import Dataset_ETT_hour, Dataset_ETT_minute, Dataset_Custom
from model import Transformer, Transformer_Mask
from torch.utils.tensorboard import SummaryWriter
from utils.tools import EarlyStopping
from metrics import metric
from metrics import AverageMeter
import numpy as np
import torch... | 33.623188 | 120 | 0.618103 |
660765aca50d2161480def6500a6eafd59c5755b | 1,525 | py | Python | setup.py | jairhenrique/dataclasses-avroschema | 4aceed130765a273ff42a38bf7a800cb6b50e005 | [
"MIT"
] | null | null | null | setup.py | jairhenrique/dataclasses-avroschema | 4aceed130765a273ff42a38bf7a800cb6b50e005 | [
"MIT"
] | 2 | 2022-03-22T20:24:30.000Z | 2022-03-22T20:24:50.000Z | setup.py | jairhenrique/dataclasses-avroschema | 4aceed130765a273ff42a38bf7a800cb6b50e005 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" setup.py for dataclasses-avroschema."""
from setuptools import find_packages, setup
__version__ = "0.27.2"
with open("README.md") as readme_file:
long_description = readme_file.read()
setup(
name="dataclasses-avroschema",
version=__version__,
descr... | 28.773585 | 71 | 0.60918 |
b74cc0e620bba2a639b14bb6adc3276741c0d0a4 | 649 | py | Python | utils/datasets/__init__.py | voldemortX/DeeplabV3_PyTorch1.3_Codebase | d22d23e74800fafb58eeb61d6649008745c1a287 | [
"BSD-3-Clause"
] | 1 | 2020-09-17T06:21:39.000Z | 2020-09-17T06:21:39.000Z | utils/datasets/__init__.py | voldemortX/pytorch-segmentation | 9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda | [
"BSD-3-Clause"
] | null | null | null | utils/datasets/__init__.py | voldemortX/pytorch-segmentation | 9c62c0a721d11c8ea6bf312ecf1c7b238a54dcda | [
"BSD-3-Clause"
] | null | null | null | from .segmentation import PASCAL_VOC_Segmentation, CityscapesSegmentation, SYNTHIA_Segmentation, GTAV_Segmentation
from .lane_as_segmentation import TuSimpleAsSegmentation, CULaneAsSegmentation, LLAMAS_AsSegmentation
from .lane_as_bezier import TuSimpleAsBezier, CULaneAsBezier, LLAMAS_AsBezier, Curvelanes_AsBezier
from... | 46.357143 | 114 | 0.875193 |
d45119bd67ee7f0b89a441fd1b9e20dd77ddc42b | 26,568 | py | Python | comet_core/app.py | efilipsson/comet-core | 2c6477e52aabc350af942b8571e9412720210eec | [
"Apache-2.0"
] | 17 | 2018-11-05T17:00:53.000Z | 2021-12-16T15:56:58.000Z | comet_core/app.py | efilipsson/comet-core | 2c6477e52aabc350af942b8571e9412720210eec | [
"Apache-2.0"
] | 17 | 2018-12-27T16:13:13.000Z | 2021-08-05T12:04:45.000Z | comet_core/app.py | efilipsson/comet-core | 2c6477e52aabc350af942b8571e9412720210eec | [
"Apache-2.0"
] | 17 | 2018-11-13T17:10:13.000Z | 2021-06-03T19:50:51.000Z | # Copyright 2018 Spotify AB. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 41.773585 | 120 | 0.628124 |
7a17aadf39c4b8dedfda8e78d698d2c3967620ea | 917 | py | Python | main_compiling.py | lleonart1984/VAE-modeling | 9e46a758af77bafc603f43aeafc5cd0b7816bbca | [
"MIT"
] | null | null | null | main_compiling.py | lleonart1984/VAE-modeling | 9e46a758af77bafc603f43aeafc5cd0b7816bbca | [
"MIT"
] | null | null | null | main_compiling.py | lleonart1984/VAE-modeling | 9e46a758af77bafc603f43aeafc5cd0b7816bbca | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
import vae.training
import vae.cvae_model
import vae.compiling
def cvae_factory(epochs, batch_size):
print('Creating CVAE model...')
model = vae.cvae_model.CVAEModel(5, 4, 8, 16, 6, activation=lambda: nn.LeakyReLU(negative_slope=0.01))
optimizer = torc... | 32.75 | 106 | 0.745911 |
d0e802503da8c82ae8edda9c993e6974b4368ccd | 1,173 | py | Python | catalyst/rl/__main__.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2019-11-26T06:41:33.000Z | 2019-11-26T06:41:33.000Z | catalyst/rl/__main__.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | null | null | null | catalyst/rl/__main__.py | andrey-avdeev/catalyst | fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3 | [
"Apache-2.0"
] | 1 | 2021-12-20T07:32:25.000Z | 2021-12-20T07:32:25.000Z | from argparse import ArgumentParser, RawTextHelpFormatter
from collections import OrderedDict
from catalyst.__version__ import __version__
from .scripts import dump_db, load_db, run_samplers, run_trainer
COMMANDS = OrderedDict(
[
("run-trainer", run_trainer),
("run-samplers", run_samplers),
... | 23.938776 | 78 | 0.650469 |
01ebb22df2fca25f495fd67a56d1b2ce9a749480 | 315 | py | Python | tests/type_test/statement_test.py | pniedzwiedzinski/pseudo | b27570bd8400b6a51a2958454b31f1ce2e25c4f9 | [
"MIT"
] | 5 | 2019-04-02T07:01:34.000Z | 2019-11-24T02:08:03.000Z | tests/type_test/statement_test.py | pniedzwiedzinski/pseudo | b27570bd8400b6a51a2958454b31f1ce2e25c4f9 | [
"MIT"
] | 11 | 2019-03-20T08:29:30.000Z | 2019-05-21T11:57:03.000Z | tests/type_test/statement_test.py | pniedzwiedzinski/pseudo | b27570bd8400b6a51a2958454b31f1ce2e25c4f9 | [
"MIT"
] | 1 | 2019-04-02T15:24:40.000Z | 2019-04-02T15:24:40.000Z | """This module contains tests for pseudo.type.Statement"""
import pytest
from pseudo.runtime import RunTime
from pseudo.type import Statement
@pytest.mark.timeout(2)
def test_exit():
try:
Statement("koniec").eval(RunTime())
except SystemExit:
pass
else:
raise AssertionError
| 18.529412 | 58 | 0.692063 |
0a8828838f9b5e06aebb5115fd31ea19dfcbd11d | 1,047 | py | Python | benchmark/analyzer/others.py | anyoptimization/pymoo-benchmark | 37460f3bf0159c1113cd48d5698af6493f26ed62 | [
"Apache-2.0"
] | null | null | null | benchmark/analyzer/others.py | anyoptimization/pymoo-benchmark | 37460f3bf0159c1113cd48d5698af6493f26ed62 | [
"Apache-2.0"
] | null | null | null | benchmark/analyzer/others.py | anyoptimization/pymoo-benchmark | 37460f3bf0159c1113cd48d5698af6493f26ed62 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from benchmark.analyzer.analyzer import Analyzer
from benchmark.core.util import fill_forward_if_nan
from pymoo.indicators.igd import IGD
from pymoo.util.misc import from_dict
class MultiObjectiveConvergenceAnalyzer(Analyzer):
def __init__(self, nan_if_not_available=True, **kwargs) -> None:
... | 26.846154 | 68 | 0.585482 |
dad767b45b0b33234808f018b11e38f864935588 | 656 | py | Python | tests/snippets/ast_snippet.py | ZapAnton/RustPython | 61e752e2b014239865c74c6997429a80433ee38a | [
"MIT"
] | null | null | null | tests/snippets/ast_snippet.py | ZapAnton/RustPython | 61e752e2b014239865c74c6997429a80433ee38a | [
"MIT"
] | null | null | null | tests/snippets/ast_snippet.py | ZapAnton/RustPython | 61e752e2b014239865c74c6997429a80433ee38a | [
"MIT"
] | null | null | null |
import ast
print(ast)
source = """
def foo():
print('bar')
pass
"""
n = ast.parse(source)
print(n)
print(n.body)
print(n.body[0].name)
assert n.body[0].name == 'foo'
foo = n.body[0]
assert foo.lineno == 2
print(foo.body)
assert len(foo.body) == 2
print(foo.body[0])
print(foo.body[0].value.func.id)
assert foo.... | 21.16129 | 44 | 0.644817 |
34cec6ef3597d65ad3feedc10c8c2ba6abd02cbf | 1,086 | py | Python | btrfs/datadog_checks/btrfs/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | btrfs/datadog_checks/btrfs/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | btrfs/datadog_checks/btrfs/config_models/defaults.py | kjmadscience/integrations-core | 663bdf44730dd6c9f3565c121318b320bfcb4988 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# This file is autogenerated.
# To change this file you should edit assets/configuration/spec.yaml and then run the following commands:
# ddev -x validate config -s <INTEGRATION_NAME>
# ddev -x va... | 25.255814 | 105 | 0.779926 |
ea09ec02e8ea7b7e01112c03cbc5e1456734108a | 974 | py | Python | src/dispatch/tag/models.py | ZPerling/dispatch | 163ed1d2ae9dec90fdd42bca1d28ae88bf36abb2 | [
"Apache-2.0"
] | null | null | null | src/dispatch/tag/models.py | ZPerling/dispatch | 163ed1d2ae9dec90fdd42bca1d28ae88bf36abb2 | [
"Apache-2.0"
] | null | null | null | src/dispatch/tag/models.py | ZPerling/dispatch | 163ed1d2ae9dec90fdd42bca1d28ae88bf36abb2 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, List
from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship
from sqlalchemy_utils import TSVectorType
from dispatch.database import Base
from dispatch.models import DispatchBase, tags_incidents, TimeStampMixin
class Tag(Base, TimeStampMixin):
id = Co... | 20.723404 | 82 | 0.731006 |
d76a6b6662a4d5ed40c22fc67c83224b1434bf3c | 2,959 | py | Python | train_rnn_gan.py | nicksawhney/world-models | 1f443a50728c9312f7c977afd4deb3ae32aed95f | [
"MIT"
] | null | null | null | train_rnn_gan.py | nicksawhney/world-models | 1f443a50728c9312f7c977afd4deb3ae32aed95f | [
"MIT"
] | null | null | null | train_rnn_gan.py | nicksawhney/world-models | 1f443a50728c9312f7c977afd4deb3ae32aed95f | [
"MIT"
] | null | null | null | #python 04_train_rnn.py --new_model --batch_size 200
# python 04_train_rnn.py --new_model --batch_size 100
from rnn.arch import RNN
import argparse
import numpy as np
import os
ROOT_DIR_NAME = './data/'
SERIES_DIR_NAME = './data/series_gan/'
def get_filelist(N):
filelist = os.listdir(SERIES_DIR_NAME)
fileli... | 23.117188 | 107 | 0.673876 |
ab3ea14a96fb8c546499af9b334654ad2b390a28 | 26,244 | py | Python | torch/_appdirs.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | torch/_appdirs.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | torch/_appdirs.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2005-2010 ActiveState Software Inc.
# Copyright (c) 2013 Eddy Petrișor
# flake8: noqa
"""
This file is directly from
https://github.com/ActiveState/appdirs/blob/3fe6a83776843a46f20c2e5587afcffe05e03b39/appdirs.py
The license of https://github.com/ActiveS... | 40.751553 | 122 | 0.638279 |
095a88927a9ac0498b5c8132e7e64a752e521ed4 | 1,292 | py | Python | tests/unit/test_wpl.py | blairconrad/LibraryHippo | ca74853485c15b06e138f713f6f47cbbfa655127 | [
"MIT"
] | null | null | null | tests/unit/test_wpl.py | blairconrad/LibraryHippo | ca74853485c15b06e138f713f6f47cbbfa655127 | [
"MIT"
] | null | null | null | tests/unit/test_wpl.py | blairconrad/LibraryHippo | ca74853485c15b06e138f713f6f47cbbfa655127 | [
"MIT"
] | null | null | null | from app.libraries.wpl import WPL
from app.models import Card
def test_check_card_finds_holds(requests_mock):
login_url = (
"https://books.kpl.org/iii/cas/login?service="
+ "https://books.kpl.org/patroninfo~S3/"
+ "j_acegi_cas_security_check&lang=eng&scope=3"
)
requests... | 27.489362 | 77 | 0.551084 |
805aca45232a2b42ebd5d161a91cc2941fcd0dd2 | 454 | py | Python | cride/circles/admin.py | dmontoya1/cride | 0667e41edbd237c6ba62657c44034f2a8a7c3754 | [
"MIT"
] | null | null | null | cride/circles/admin.py | dmontoya1/cride | 0667e41edbd237c6ba62657c44034f2a8a7c3754 | [
"MIT"
] | null | null | null | cride/circles/admin.py | dmontoya1/cride | 0667e41edbd237c6ba62657c44034f2a8a7c3754 | [
"MIT"
] | null | null | null | """Circles Admin"""
# Django
from django.contrib import admin
# models
from cride.circles.models import Circle
@admin.register(Circle)
class CircleAdmin(admin.ModelAdmin):
""" Circle admin."""
list_display = (
'name',
'slug_name',
'is_public',
'verified',
'is_limited'... | 19.73913 | 57 | 0.612335 |
4ec34d4ccaeb19e32137cb122eb95a769e1a1953 | 2,481 | py | Python | speakers/forms.py | andyzsf/ConMan | e8d4aa9eeda7a85b39d8d897dbdba43de3cee9c1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 7 | 2015-05-28T19:18:57.000Z | 2021-04-16T04:13:26.000Z | speakers/forms.py | andyzsf/ConMan | e8d4aa9eeda7a85b39d8d897dbdba43de3cee9c1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | speakers/forms.py | andyzsf/ConMan | e8d4aa9eeda7a85b39d8d897dbdba43de3cee9c1 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2018-11-05T09:33:45.000Z | 2022-02-18T14:27:22.000Z | from common.models import UserProfile
from speakers.models import *
from django import forms
from django.forms import ValidationError
class PresentationForm(forms.ModelForm):
cat = forms.ModelChoiceField(Category.objects.all(),label=u'Category', help_text='Choose the closest category')
audiences = forms.ModelM... | 52.787234 | 210 | 0.664248 |
602294c6d90ffc3ca2e688ee25b4e7cd350913c9 | 8,594 | py | Python | magnumclient/osc/v1/quotas.py | gyliu513/python-magnumclient | c0d368360831cd29affa47e77eba4e81e4c6f0f8 | [
"Apache-2.0"
] | 29 | 2015-04-17T12:06:04.000Z | 2019-05-03T06:27:17.000Z | magnumclient/osc/v1/quotas.py | gyliu513/python-magnumclient | c0d368360831cd29affa47e77eba4e81e4c6f0f8 | [
"Apache-2.0"
] | 2 | 2016-01-19T14:45:58.000Z | 2016-11-17T16:30:18.000Z | magnumclient/osc/v1/quotas.py | gyliu513/python-magnumclient | c0d368360831cd29affa47e77eba4e81e4c6f0f8 | [
"Apache-2.0"
] | 26 | 2015-08-17T19:28:56.000Z | 2020-07-10T08:12:07.000Z | # Copyright 2015 NEC Corporation. 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 ... | 39.787037 | 79 | 0.521759 |
0484f519c83af5cd2cbb6faa693f19dc014dd419 | 25,555 | py | Python | zoomrec.py | v1nc/zoomrec | 5b31e25f57697f18c92f698bcf7a20207575bfb0 | [
"MIT"
] | null | null | null | zoomrec.py | v1nc/zoomrec | 5b31e25f57697f18c92f698bcf7a20207575bfb0 | [
"MIT"
] | null | null | null | zoomrec.py | v1nc/zoomrec | 5b31e25f57697f18c92f698bcf7a20207575bfb0 | [
"MIT"
] | null | null | null | import csv
import logging
import os
import psutil
import pyautogui
import random
import schedule
import signal
import subprocess
import threading
import time
import atexit
from datetime import datetime, timedelta
import requests
global ONGOING_MEETING
global VIDEO_PANEL_HIDED
global TELEGRAM_TOKEN
global TELEGRAM_RETR... | 31.164634 | 127 | 0.70632 |
e9cd06d0bca370980037028ed734bf787b37bdf2 | 2,646 | py | Python | tests/test_settings.py | faultyserver/donation-tracker | efd21c1b80c4065eb40cddd7da928727d016cc48 | [
"Apache-2.0"
] | null | null | null | tests/test_settings.py | faultyserver/donation-tracker | efd21c1b80c4065eb40cddd7da928727d016cc48 | [
"Apache-2.0"
] | null | null | null | tests/test_settings.py | faultyserver/donation-tracker | efd21c1b80c4065eb40cddd7da928727d016cc48 | [
"Apache-2.0"
] | null | null | null | import os
from tracker import ajax_lookup_channels
DOMAIN = 'testserver'
SECRET_KEY = 'ForTestingPurposesOnly'
INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.staticfiles',
... | 33.923077 | 86 | 0.65155 |
5614e314da77588614e83d6e53286d8b34dc4cef | 1,599 | py | Python | elastico/search.py | klorenz/python-elastico | 9a39e6cfe33d3081cc52424284c19e9698343006 | [
"MIT"
] | null | null | null | elastico/search.py | klorenz/python-elastico | 9a39e6cfe33d3081cc52424284c19e9698343006 | [
"MIT"
] | null | null | null | elastico/search.py | klorenz/python-elastico | 9a39e6cfe33d3081cc52424284c19e9698343006 | [
"MIT"
] | null | null | null | from .util import to_dt, dt_isoformat
from .util import string
from datetime import datetime, timedelta
def search(es, query=None, index=None):
return es.search(index=index or '*', body=build_query_body(query))
def build_query_body(query):
return {'query': {'query_string': {'query': query}}}
def build_search... | 29.072727 | 76 | 0.610381 |
e07d88c4953cd053365e0ca7976c43a23ee8c0aa | 1,876 | py | Python | src/compas_rhino/geometry/vector.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/vector.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | src/compas_rhino/geometry/vector.py | arpastrana/compas | ed677a162c14dbe562c82d72f370279259faf7da | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas
from compas.geometry import Vector
from compas_rhino.geometry.point import RhinoPoint
if compas.RHINO:
import Rhino
__all__ = ['RhinoVector']
class RhinoVector(RhinoPoint):
"""Wrapper... | 24.684211 | 96 | 0.564499 |
cc6e21544c6aab286b0951dcbf4f7e007d35b4f7 | 372 | py | Python | stockbuddy/migrations/0004_auto_20200612_1330.py | rejuls/stockbuddy | f4a52110510d6e6c745d881620524d2281765d15 | [
"MIT"
] | 1 | 2020-09-08T02:11:10.000Z | 2020-09-08T02:11:10.000Z | stockbuddy/migrations/0004_auto_20200612_1330.py | rejuls/stockbuddy | f4a52110510d6e6c745d881620524d2281765d15 | [
"MIT"
] | 3 | 2020-09-08T13:09:25.000Z | 2021-12-13T20:45:36.000Z | stockbuddy/migrations/0004_auto_20200612_1330.py | rejuls/stockbuddy | f4a52110510d6e6c745d881620524d2281765d15 | [
"MIT"
] | 1 | 2020-11-21T23:24:12.000Z | 2020-11-21T23:24:12.000Z | # Generated by Django 3.0.5 on 2020-06-12 13:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('stockbuddy', '0003_auto_20200612_1325'),
]
operations = [
migrations.RenameField(
model_name='stockdata',
old_name='test',
... | 19.578947 | 50 | 0.594086 |
080c6ce75d7ef888fd1ee1edaea204a82382fd32 | 2,587 | py | Python | arcade/geometry.py | KommentatorForAll/arcade | 88343fe87efc1bd619412261a725a8f04de08fc7 | [
"MIT"
] | null | null | null | arcade/geometry.py | KommentatorForAll/arcade | 88343fe87efc1bd619412261a725a8f04de08fc7 | [
"MIT"
] | null | null | null | arcade/geometry.py | KommentatorForAll/arcade | 88343fe87efc1bd619412261a725a8f04de08fc7 | [
"MIT"
] | null | null | null | """
Functions for calculating geometry.
"""
import math
from shapely import speedups # type: ignore
from shapely.geometry import Polygon, Point # type: ignore
from typing import List
from arcade import PointList
_PRECISION = 2
speedups.enable()
def are_polygons_intersecting(poly_a: PointList,
... | 25.362745 | 75 | 0.660611 |
1d5e880f7c6b8c2ca476af8c65823fab6ed164bd | 1,190 | py | Python | gamesnstuff/scanner/background/send_message.py | LionelNoussi/Games-n-Stuff | 91c4af67d0534a048e324b258eddbb2dc3963c36 | [
"MIT"
] | null | null | null | gamesnstuff/scanner/background/send_message.py | LionelNoussi/Games-n-Stuff | 91c4af67d0534a048e324b258eddbb2dc3963c36 | [
"MIT"
] | null | null | null | gamesnstuff/scanner/background/send_message.py | LionelNoussi/Games-n-Stuff | 91c4af67d0534a048e324b258eddbb2dc3963c36 | [
"MIT"
] | null | null | null | from django.contrib import messages
successfulMessages = ["Success"]
neutralMessages = ["Returned"]
badMessages = ["Invalid student ID", "Invalid item"]
warningMessages = ["Already borrowed something"]
def make_toast(request, message, student_name, item):
message_texts = {"Success": f"{student_name} successfull... | 47.6 | 115 | 0.647899 |
d245175981d44ba43d247335377641db12ed9ce3 | 3,143 | py | Python | cmake/external/onnxruntime-extensions/test/test_onnxprocess.py | fushwLZU/onnxruntime_test | 7ee82dde9150dc0d3014c06a82eabdecb989f2f3 | [
"MIT"
] | null | null | null | cmake/external/onnxruntime-extensions/test/test_onnxprocess.py | fushwLZU/onnxruntime_test | 7ee82dde9150dc0d3014c06a82eabdecb989f2f3 | [
"MIT"
] | null | null | null | cmake/external/onnxruntime-extensions/test/test_onnxprocess.py | fushwLZU/onnxruntime_test | 7ee82dde9150dc0d3014c06a82eabdecb989f2f3 | [
"MIT"
] | 1 | 2021-09-17T04:50:02.000Z | 2021-09-17T04:50:02.000Z | import io
import onnx
import unittest
import torchvision
import numpy as np
from onnxruntime_extensions import PyOrtFunction, hook_model_op, PyOp
from onnxruntime_extensions.onnxprocess import torch_wrapper as torch
from onnxruntime_extensions.onnxprocess import trace_for_onnx, pyfunc_from_model
class TestTorchE2E(un... | 36.126437 | 102 | 0.650016 |
823450f017098b3dc2ab9748a489c3860152387c | 2,844 | py | Python | windowScoreCalculator.py | TheSeeven/home-thermal-management | c3a7856ca9475501f0d8cbace4deb1cb4d0b2fa9 | [
"Unlicense"
] | null | null | null | windowScoreCalculator.py | TheSeeven/home-thermal-management | c3a7856ca9475501f0d8cbace4deb1cb4d0b2fa9 | [
"Unlicense"
] | null | null | null | windowScoreCalculator.py | TheSeeven/home-thermal-management | c3a7856ca9475501f0d8cbace4deb1cb4d0b2fa9 | [
"Unlicense"
] | null | null | null | TEMPERATURE_BIAS = 0.30
AIR_QUALITY_BIAS = 0.65
HUMIDITY_BIAS = 0.05
def getDesirabilityAirQuality(inside, desired, outside):
if inside == None or desired == None or outside == None:
return 0
result = outside - inside
isOutsideBetter = outside > inside
isInsideOk = inside >= desired
if i... | 33.069767 | 72 | 0.638537 |
b46dc1932f2050c6ffe5a28f6d924813fbde7da1 | 9,670 | py | Python | hathor/cli/util.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | 51 | 2019-12-28T03:33:27.000Z | 2022-03-10T14:03:03.000Z | hathor/cli/util.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | 316 | 2019-09-10T09:20:05.000Z | 2022-03-31T20:18:56.000Z | hathor/cli/util.py | mbnunes/hathor-core | e5e0d4a627341e2a37ee46db5c9354ddb7f8dfb8 | [
"Apache-2.0"
] | 19 | 2020-01-04T00:13:18.000Z | 2022-02-08T21:18:46.000Z | # Copyright 2021 Hathor Labs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 34.412811 | 101 | 0.532472 |
1c25cf170b72c6852eeaa64334cf5ded57f7f53a | 14,364 | py | Python | kubric/simulator/pybullet.py | ScottyLectronica/kubric | 31930b4a8517d1fc5987bb1502e47f130209505a | [
"Apache-2.0"
] | null | null | null | kubric/simulator/pybullet.py | ScottyLectronica/kubric | 31930b4a8517d1fc5987bb1502e47f130209505a | [
"Apache-2.0"
] | null | null | null | kubric/simulator/pybullet.py | ScottyLectronica/kubric | 31930b4a8517d1fc5987bb1502e47f130209505a | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Kubric Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 40.461972 | 101 | 0.689432 |
38bc0d8c1961839a88e2c4293f68b634252ae61b | 92 | py | Python | venv/lib/python3.7/site-packages/pywikibot/data/__init__.py | Sanechoic/JoyStory | 8b2f605f56db765292bb77b54d661a1cb8e638d9 | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/pywikibot/data/__init__.py | Sanechoic/JoyStory | 8b2f605f56db765292bb77b54d661a1cb8e638d9 | [
"MIT"
] | null | null | null | venv/lib/python3.7/site-packages/pywikibot/data/__init__.py | Sanechoic/JoyStory | 8b2f605f56db765292bb77b54d661a1cb8e638d9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module providing several layers of data access to the wiki."""
| 30.666667 | 66 | 0.641304 |
c093bf8d7c36c1833811cac6785306a31e7f287e | 5,295 | py | Python | scripts/updatestatistics.py | metakgp/pywikibot | 28e3125167bb3ec521a25ade859d0e0afcfb1262 | [
"MIT"
] | 2 | 2017-06-19T16:48:34.000Z | 2017-07-07T14:15:28.000Z | scripts/updatestatistics.py | metakgp/pywikibot | 28e3125167bb3ec521a25ade859d0e0afcfb1262 | [
"MIT"
] | 11 | 2018-12-07T18:20:05.000Z | 2022-03-11T23:12:42.000Z | scripts/updatestatistics.py | metakgp/pywikibot | 28e3125167bb3ec521a25ade859d0e0afcfb1262 | [
"MIT"
] | 3 | 2018-12-09T10:18:35.000Z | 2020-09-12T13:50:14.000Z | """A simple example of how to access the Google Analytics API."""
import re
from datetime import date
import difflib
from apiclient.discovery import build
from oauth2client.client import SignedJwtAssertionCredentials
import httplib2
import json
import pywikibot
def get_service(api_name, api_version, scope, key_fi... | 30.964912 | 129 | 0.638338 |
ac1f308efebe93d17e95bf216cc2c791e56420f8 | 2,058 | py | Python | shapenet2kubric/urdf_template.py | ritmps/kubric | ef517ccdedeb304a7a9e77ba109552601a2ae98c | [
"Apache-2.0"
] | null | null | null | shapenet2kubric/urdf_template.py | ritmps/kubric | ef517ccdedeb304a7a9e77ba109552601a2ae98c | [
"Apache-2.0"
] | null | null | null | shapenet2kubric/urdf_template.py | ritmps/kubric | ef517ccdedeb304a7a9e77ba109552601a2ae98c | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 The Kubric Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 38.111111 | 79 | 0.635083 |
01d9ee104cb91da9df3cd172f7816bf6eaf703b8 | 4,320 | py | Python | lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_region.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_region.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_region.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
"metadata_ver... | 26.666667 | 97 | 0.653241 |
6c678ab732c4b859e805615a55498d80cbc7b26b | 5,371 | py | Python | homeassistant/components/trafikverket_weatherstation/sensor.py | mhorst314/home-assistant-core | a9bbc42981b4b3188ff696d17379a7d9e083c641 | [
"Apache-2.0"
] | 1 | 2021-09-29T20:33:32.000Z | 2021-09-29T20:33:32.000Z | homeassistant/components/trafikverket_weatherstation/sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/trafikverket_weatherstation/sensor.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Weather information for air and road temperature (by Trafikverket)."""
import asyncio
from datetime import timedelta
import logging
import aiohttp
from pytrafikverket.trafikverket_weather import TrafikverketWeather
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassis... | 27.126263 | 86 | 0.646062 |
5cd7d453680329fe415b01a04bb46193ac50cc1b | 694 | py | Python | test_settings.py | praekeltfoundation/mc-freebasics | ad9b2408aa97402a2be6444e619c4533663118fb | [
"BSD-2-Clause"
] | null | null | null | test_settings.py | praekeltfoundation/mc-freebasics | ad9b2408aa97402a2be6444e619c4533663118fb | [
"BSD-2-Clause"
] | 29 | 2016-02-29T11:53:47.000Z | 2018-04-05T07:46:15.000Z | test_settings.py | praekeltfoundation/mc2-freebasics | ad9b2408aa97402a2be6444e619c4533663118fb | [
"BSD-2-Clause"
] | null | null | null | from freebasics.settings import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'mc2_test.db',
'USER': '',
'PASSWORD': '',
'HOST': '',
'PORT': '',
}
}
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.dummy.D... | 19.828571 | 65 | 0.622478 |
ed8c048aa14438bd6caf04a09c8924c78984e13c | 3,403 | py | Python | pysot/utils/model_load.py | tsingqguo/AttackTracker | 054268d5afa0044675c7acf1ac13e621f1c9549e | [
"Apache-2.0"
] | 11 | 2020-11-25T16:19:23.000Z | 2022-01-12T08:08:47.000Z | pysot/utils/model_load.py | tsingqguo/AttackTracker | 054268d5afa0044675c7acf1ac13e621f1c9549e | [
"Apache-2.0"
] | null | null | null | pysot/utils/model_load.py | tsingqguo/AttackTracker | 054268d5afa0044675c7acf1ac13e621f1c9549e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) SenseTime. All Rights Reserved.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import torch
from pysot.core.config import cfg
logger = logging.getLogger('global')
def check_keys(mod... | 36.202128 | 72 | 0.675287 |
2a03f49875931a410ec6bb7d84764b2b2f88c010 | 6,508 | py | Python | spec_mytextrank.py | jjayd/project | 3bc41502bfad04c7ca447ab30e3041f623059d59 | [
"MIT"
] | null | null | null | spec_mytextrank.py | jjayd/project | 3bc41502bfad04c7ca447ab30e3041f623059d59 | [
"MIT"
] | null | null | null | spec_mytextrank.py | jjayd/project | 3bc41502bfad04c7ca447ab30e3041f623059d59 | [
"MIT"
] | null | null | null | from newspaper import Article
from konlpy.tag import Kkma
from konlpy.tag import Twitter
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.preprocessing import normalize
from datetime import datetime, timedelta
import numpy as np
import ... | 35.178378 | 113 | 0.546865 |
bf728da07918a405b93b293b0cffc1491e3a9d97 | 645 | py | Python | examples/ev3/i2c_basics/main.py | thesynman/pybricks-api | fbbb81caf0703d3d862d5417416adb9295754de0 | [
"MIT"
] | 51 | 2020-04-02T10:03:45.000Z | 2022-03-27T23:49:39.000Z | examples/ev3/i2c_basics/main.py | thesynman/pybricks-api | fbbb81caf0703d3d862d5417416adb9295754de0 | [
"MIT"
] | 77 | 2020-03-22T17:32:14.000Z | 2022-03-28T18:02:43.000Z | examples/ev3/i2c_basics/main.py | thesynman/pybricks-api | fbbb81caf0703d3d862d5417416adb9295754de0 | [
"MIT"
] | 25 | 2020-03-18T23:35:17.000Z | 2022-01-01T12:52:01.000Z | #!/usr/bin/env pybricks-micropython
from pybricks.hubs import EV3Brick
from pybricks.iodevices import I2CDevice
from pybricks.parameters import Port
# Initialize the EV3
ev3 = EV3Brick()
# Initialize I2C Sensor
device = I2CDevice(Port.S2, 0xD2 >> 1)
# Read one byte from the device.
# For this device, we can read the... | 26.875 | 48 | 0.733333 |
82906c96eec6b809bc195fb09900560f35aeb062 | 2,233 | py | Python | pwndbg/commands/misc.py | jakuta-tech/pwndbg | 26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3 | [
"MIT"
] | null | null | null | pwndbg/commands/misc.py | jakuta-tech/pwndbg | 26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3 | [
"MIT"
] | null | null | null | pwndbg/commands/misc.py | jakuta-tech/pwndbg | 26f7321c6049dbc92ba706ecdf5de2d7ad4a75a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import errno as _errno
import struct
import gdb
import pwndbg as _pwndbg
import pwndbg.arch as _arch
import pwndbg.commands
import pwndbg.regs
import pwndbg.symbol
_errno.errorc... | 30.175676 | 129 | 0.678012 |
2f866973d8f3c1c0d74ccee05e0cafb510b1b6c2 | 2,795 | py | Python | newrelic_lambda_cli/utils.py | eeroniemi/newrelic-lambda-cli | 53a62bfcdab13dd356bfb7b5f28628f3b72e92f8 | [
"Apache-2.0"
] | 1 | 2020-11-23T14:07:24.000Z | 2020-11-23T14:07:24.000Z | newrelic_lambda_cli/utils.py | eeroniemi/newrelic-lambda-cli | 53a62bfcdab13dd356bfb7b5f28628f3b72e92f8 | [
"Apache-2.0"
] | null | null | null | newrelic_lambda_cli/utils.py | eeroniemi/newrelic-lambda-cli | 53a62bfcdab13dd356bfb7b5f28628f3b72e92f8 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
import boto3
import botocore
import click
NEW_RELIC_ARN_PREFIX_TEMPLATE = "arn:aws:lambda:%s:451483290750"
RUNTIME_CONFIG = {
"nodejs10.x": {"Handler": "newrelic-lambda-wrapper.handler"},
"nodejs12.x": {"Handler": "newrelic-lambda-wrapper.handler"},
"pyth... | 29.421053 | 88 | 0.683005 |
01983f91b2c64d366d53e3ac5ebc4538e270c5c8 | 853 | py | Python | deep_trainer/model_predictor.py | BMFriedenstein/StringSounds | ab83f928a0d3f563745f0f5a17a7b20b1f14d73c | [
"MIT"
] | 1 | 2020-03-26T04:00:54.000Z | 2020-03-26T04:00:54.000Z | deep_trainer/model_predictor.py | BMFriedenstein/StringSounds | ab83f928a0d3f563745f0f5a17a7b20b1f14d73c | [
"MIT"
] | null | null | null | deep_trainer/model_predictor.py | BMFriedenstein/StringSounds | ab83f928a0d3f563745f0f5a17a7b20b1f14d73c | [
"MIT"
] | 1 | 2020-03-26T04:00:57.000Z | 2020-03-26T04:00:57.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 3 13:04:38 2019
@author: Brandon
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
import tensorflow as tf
from PIL import Image
from cnn_model_trainer import X,BuildModel
... | 29.413793 | 102 | 0.684642 |
ae3a4ed37d1c7b2f041d0b9f5c1b64db46a927d4 | 908 | py | Python | Task1D.py | lhliew/flood-warning | 234bb3f7ec7174fc91963d8b7e64df1893694e1b | [
"MIT"
] | null | null | null | Task1D.py | lhliew/flood-warning | 234bb3f7ec7174fc91963d8b7e64df1893694e1b | [
"MIT"
] | null | null | null | Task1D.py | lhliew/flood-warning | 234bb3f7ec7174fc91963d8b7e64df1893694e1b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 4 10:19:57 2017
@author: user 1
"""
from floodsystem.geo import rivers_with_station
from floodsystem.geo import stations_by_rivers
from floodsystem.stationdata import build_station_list
def run():
stations = build_station_list()
""" Part 1 of Task 1D
"... | 19.319149 | 62 | 0.580396 |
0898149af14a9bb7665b5ab46f3837b0820a49e7 | 241,841 | py | Python | tensorflow/python/framework/ops.py | autoih/tensorflow | 4a1ae31d56c3c7f40232aace615945c29dcf9c38 | [
"Apache-2.0"
] | 1 | 2020-01-18T17:54:05.000Z | 2020-01-18T17:54:05.000Z | tensorflow/python/framework/ops.py | autoih/tensorflow | 4a1ae31d56c3c7f40232aace615945c29dcf9c38 | [
"Apache-2.0"
] | 3 | 2019-07-25T16:55:56.000Z | 2019-08-01T23:44:31.000Z | tensorflow/python/framework/ops.py | autoih/tensorflow | 4a1ae31d56c3c7f40232aace615945c29dcf9c38 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.614837 | 115 | 0.692761 |
0b15bfddf1122edf6aa083e9085c9b49b4878e58 | 1,677 | py | Python | vendor/packages/sqlalchemy/lib/sqlalchemy/connectors/zxJDBC.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T17:08:47.000Z | 2019-10-05T11:37:02.000Z | vendor/packages/sqlalchemy/lib/sqlalchemy/connectors/zxJDBC.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/sqlalchemy/lib/sqlalchemy/connectors/zxJDBC.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | import sys
from sqlalchemy.connectors import Connector
class ZxJDBCConnector(Connector):
driver = 'zxjdbc'
supports_sane_rowcount = False
supports_sane_multi_rowcount = False
supports_unicode_binds = True
supports_unicode_statements = sys.version > '2.5.0+'
description_encoding = None... | 31.641509 | 74 | 0.57901 |
6b21f43f412115563665d6cce034e9b618bdd204 | 193 | py | Python | PyCharm/primer5.py | PervykhDarya/LR3 | 55a4c379c29e167eb3257b4cff4cf9b717906236 | [
"MIT"
] | null | null | null | PyCharm/primer5.py | PervykhDarya/LR3 | 55a4c379c29e167eb3257b4cff4cf9b717906236 | [
"MIT"
] | null | null | null | PyCharm/primer5.py | PervykhDarya/LR3 | 55a4c379c29e167eb3257b4cff4cf9b717906236 | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*- cosing: utf-8 -*-
fileprt = open("file2.txt", "r")
content1 = fileptr.readline()
content2 = fileptr.readline()
print(content1)
print(content2)
fileprt.close() | 14.846154 | 32 | 0.673575 |
044a49513e66f77742231d542f9704d937438308 | 21 | py | Python | texturesynth/snrp.py | tochikuji/pyTextureSynth | 6e1746fa1cc931ea083e3f04004a42a4894c762e | [
"MIT"
] | null | null | null | texturesynth/snrp.py | tochikuji/pyTextureSynth | 6e1746fa1cc931ea083e3f04004a42a4894c762e | [
"MIT"
] | null | null | null | texturesynth/snrp.py | tochikuji/pyTextureSynth | 6e1746fa1cc931ea083e3f04004a42a4894c762e | [
"MIT"
] | null | null | null | class SnrP(object):
| 7 | 19 | 0.714286 |
e7afddbc0d55ec9f37709a252aa680d30008349d | 20,038 | py | Python | tests/test_api.py | eriksp/django-drf-filepond | 518c86e7f75be8bec894f90c0b6bfdcbff58eab2 | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | eriksp/django-drf-filepond | 518c86e7f75be8bec894f90c0b6bfdcbff58eab2 | [
"BSD-3-Clause"
] | null | null | null | tests/test_api.py | eriksp/django-drf-filepond | 518c86e7f75be8bec894f90c0b6bfdcbff58eab2 | [
"BSD-3-Clause"
] | null | null | null | '''
Tests for the store_upload api function provided by django-drf-filepond
THIS SET OF TESTS WILL TEST LOCAL STORAGE FUNCTIONALITY OF THE store_upload
FUNCTION.
store_upload:
Moves a temporary upload to permanent storage at a location on the local
filesystem or to a remote file store via the django-storages ... | 48.168269 | 77 | 0.670276 |
f26d3a5a2c10fa369ad15d0276438bb61ab20007 | 2,354 | py | Python | vertica_python/vertica/messages/backend_messages/parameter_status.py | vinceatbluelabs/vertica-python | 0af888b6b30bc1be2f2b497e564b80cb5220ea87 | [
"Apache-2.0"
] | null | null | null | vertica_python/vertica/messages/backend_messages/parameter_status.py | vinceatbluelabs/vertica-python | 0af888b6b30bc1be2f2b497e564b80cb5220ea87 | [
"Apache-2.0"
] | null | null | null | vertica_python/vertica/messages/backend_messages/parameter_status.py | vinceatbluelabs/vertica-python | 0af888b6b30bc1be2f2b497e564b80cb5220ea87 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Micro Focus or one of its affiliates.
# Copyright (c) 2018 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | 40.586207 | 90 | 0.749363 |
6d3d25a755b90bbd8978e23fd21349cc6e30f129 | 1,377 | py | Python | translator/osc/osc_plugin.py | mail2nsrajesh/heat-translator | 4a37a5680c4159162c6cb44b0059ce003e1f01da | [
"Apache-2.0"
] | 76 | 2015-01-29T20:10:40.000Z | 2021-11-12T06:09:54.000Z | translator/osc/osc_plugin.py | mail2nsrajesh/heat-translator | 4a37a5680c4159162c6cb44b0059ce003e1f01da | [
"Apache-2.0"
] | 2 | 2016-12-22T19:57:47.000Z | 2018-03-26T16:31:59.000Z | translator/osc/osc_plugin.py | mail2nsrajesh/heat-translator | 4a37a5680c4159162c6cb44b0059ce003e1f01da | [
"Apache-2.0"
] | 41 | 2015-01-15T02:42:26.000Z | 2020-08-06T05:09:32.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distrib... | 32.785714 | 77 | 0.702977 |
349afdc7c22541cb74cf3e23aa0c7d471794faf2 | 1,604 | py | Python | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CancelOperationAuditRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CancelOperationAuditRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-domain/aliyunsdkdomain/request/v20180129/CancelOperationAuditRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.454545 | 76 | 0.767456 |
5e24b0ef14da6baf002a0423c25a18152dd0db39 | 625 | py | Python | scrapper.py | AhsanSN/Website-Scrapper | f0589624237c1918a6f7002942d755f99e1724d8 | [
"MIT"
] | null | null | null | scrapper.py | AhsanSN/Website-Scrapper | f0589624237c1918a6f7002942d755f99e1724d8 | [
"MIT"
] | null | null | null | scrapper.py | AhsanSN/Website-Scrapper | f0589624237c1918a6f7002942d755f99e1724d8 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
URL = 'https://www.betexplorer.com/soccer/france/ligue-1/results/'
page = requests.get(URL)
soup = BeautifulSoup(page.content, 'html.parser')
results = soup.find_all('tr')
for tr in results:
tds = tr.find_all('td')
for td in tds:
print(td.text)
print... | 23.148148 | 66 | 0.6592 |
fd62f8cf6d94ca7f92edcd710e2dda6163bf7813 | 13,325 | py | Python | python/filemgmt/compare_utils.py | lsst-dm/FileMgmt | 31c566553b225db934acf6f1e3d54e48be154660 | [
"NCSA"
] | null | null | null | python/filemgmt/compare_utils.py | lsst-dm/FileMgmt | 31c566553b225db934acf6f1e3d54e48be154660 | [
"NCSA"
] | null | null | null | python/filemgmt/compare_utils.py | lsst-dm/FileMgmt | 31c566553b225db934acf6f1e3d54e48be154660 | [
"NCSA"
] | null | null | null | """Compare files from local disk and DB location tracking based upon an
archive path."""
import os
import time
import despydmdb.desdmdbi as desdmdbi
from . import disk_utils_local as diskutils
from . import db_utils_local as dbutils
class Args(object):
def __init__(self, **kw):
for item, val in kw.item... | 38.961988 | 153 | 0.562777 |
fa1d6b6079b248effacfdb48e0dcbd912c243110 | 4,575 | py | Python | src/otpy_func.py | thatswhereurwrongkiddo/otpy | c77fe1982bb3c188b45b33d53cebcd7131397ce3 | [
"MIT"
] | null | null | null | src/otpy_func.py | thatswhereurwrongkiddo/otpy | c77fe1982bb3c188b45b33d53cebcd7131397ce3 | [
"MIT"
] | null | null | null | src/otpy_func.py | thatswhereurwrongkiddo/otpy | c77fe1982bb3c188b45b33d53cebcd7131397ce3 | [
"MIT"
] | 1 | 2022-01-28T02:21:42.000Z | 2022-01-28T02:21:42.000Z | import os
from color_storage import txtc_wb, bgc_wb, resetc_wb
def clearscreen():
os.system('cls' if os.name == 'nt' else 'clear')
vernotice()
def checksys():
import platform
from __init__ import title
platsys = platform.system()
if platsys == "Windows":
os.system("title {0}".format(tit... | 32.21831 | 109 | 0.554317 |
e3285680db4469571c97424c9694d3d27f7ca77e | 1,452 | py | Python | preprocess.py | taxio/photo_mosaic | e298927174a251f272ffe83dc08216fa4deacde4 | [
"MIT"
] | null | null | null | preprocess.py | taxio/photo_mosaic | e298927174a251f272ffe83dc08216fa4deacde4 | [
"MIT"
] | 3 | 2018-03-23T12:35:07.000Z | 2018-03-25T04:15:40.000Z | preprocess.py | taxio/photo_mosaic | e298927174a251f272ffe83dc08216fa4deacde4 | [
"MIT"
] | null | null | null | from PIL import Image, ImageStat
from progressbar import ProgressBar
import photo_mosaic.util
from photo_mosaic import dbmanager
class PreProcess:
def __init__(self, dbname: str):
self._db = dbmanager.DBManager(dbname=dbname)
def drop_table(self):
self._db.drop_table()
def insert_im... | 30.893617 | 109 | 0.657025 |
2ad8f1411d821e4de740bef9dcb488629e138311 | 31 | py | Python | finitediff/_release.py | bjodah/finitediff | bfb1940cf5c7ce5c9a3b440d1efd8f8c4128fed8 | [
"BSD-2-Clause"
] | 27 | 2016-09-14T11:40:35.000Z | 2022-03-05T18:48:26.000Z | finitediff/_release.py | tutoushaonian/finitediff | bfb1940cf5c7ce5c9a3b440d1efd8f8c4128fed8 | [
"BSD-2-Clause"
] | 4 | 2016-04-08T03:55:14.000Z | 2018-06-27T11:18:58.000Z | finitediff/_release.py | tutoushaonian/finitediff | bfb1940cf5c7ce5c9a3b440d1efd8f8c4128fed8 | [
"BSD-2-Clause"
] | 5 | 2017-05-25T06:50:40.000Z | 2021-09-13T14:16:59.000Z | __version__ = "0.6.5.dev0+git"
| 15.5 | 30 | 0.677419 |
037c6fe5f03c29e3d419d70fe4ec74ce634edbea | 2,950 | py | Python | selfdrive/controls/lib/pid.py | LOVEChen/raspberry-pilot | 6223103f72ec5692dab7944bf420c763383b1fe9 | [
"MIT"
] | 1 | 2020-12-04T17:43:50.000Z | 2020-12-04T17:43:50.000Z | selfdrive/controls/lib/pid.py | cryptonome/raspberry-pilot | 4f01dcad4629577bcb268118375fae7473103a53 | [
"MIT"
] | null | null | null | selfdrive/controls/lib/pid.py | cryptonome/raspberry-pilot | 4f01dcad4629577bcb268118375fae7473103a53 | [
"MIT"
] | null | null | null | import numpy as np
from common.numpy_fast import clip, interp
def apply_deadzone(error, deadzone):
if error > deadzone:
error -= deadzone
elif error < - deadzone:
error += deadzone
else:
error = 0.
return error
class PIController(object):
def __init__(self, k_p, k_i, k_f=1., pos_lim... | 31.382979 | 175 | 0.633898 |
fa9bc798d06b5b88177d46f0fa4fc35dba4e98f7 | 785 | py | Python | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716220657.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716220657.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | my_classes/ScopesClosuresAndDecorators/.history/Decoraators2_20210716220657.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ Decorator Parametors
In the previous ideos we saw some built-in decorators that can handle some arguments:
@wraps(fn) @lru_cache(maxsize=256) <\
def inner(): def factorial(n): \
... ... \>function call
This should loo... | 23.088235 | 86 | 0.546497 |
de624e13ae4d09789c2a6e277c569400869fb618 | 10,301 | py | Python | pybda/testing/old/test_bda_03_ave.py | OxfordSKA/bda | 0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d | [
"BSD-3-Clause"
] | 2 | 2019-11-22T18:39:49.000Z | 2020-03-13T04:03:50.000Z | pybda/testing/old/test_bda_03_ave.py | OxfordSKA/bda | 0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d | [
"BSD-3-Clause"
] | null | null | null | pybda/testing/old/test_bda_03_ave.py | OxfordSKA/bda | 0f92bead29a26d18fddaf5eb2ecd6f6d92401c2d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import numpy as np
import pickle
import progressbar
import matplotlib.pyplot as plt
def load_ms(ms):
dtype = [('uu', 'f8'), ('vv', 'f8'), ('ww', 'f8'),
('time', 'f8'), ('time_c', 'f8'),
('a1', 'i4'), ('a2', 'i4'), ('data', 'c16'), ('t', 'f8')]
tb.op... | 38.01107 | 88 | 0.557713 |
2e392c87f1249d3e6f4dd16507348f23c2faeba3 | 6,618 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/network/aci/aci_l3out_route_tag_policy.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/aci/aci_l3out_route_tag_policy.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | venv/lib/python2.7/site-packages/ansible/modules/network/aci/aci_l3out_route_tag_policy.py | haind27/test01 | 7f86c0a33eb0874a6c3f5ff9a923fd0cfc8ef852 | [
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 27.575 | 141 | 0.600937 |
fd41909e98290de237b69a7de04e4eb01dde5e16 | 1,435 | py | Python | app/views.py | texib/costfish | 4cd596cad19200139d8eba1e73c315457a72179a | [
"MIT"
] | null | null | null | app/views.py | texib/costfish | 4cd596cad19200139d8eba1e73c315457a72179a | [
"MIT"
] | null | null | null | app/views.py | texib/costfish | 4cd596cad19200139d8eba1e73c315457a72179a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from app import app
@app.route('/')
@app.route('/index')
def index():
import numpy as np
import json
import gspread
from oauth2client.client import SignedJwtAssertionCredentials
json_key = json.load(open('./costfish-3a4d1968df8f.json'))
scope = ['https://spreadsheets.google.com/feeds'... | 30.531915 | 252 | 0.712892 |
1b4965f826dcb67cc48fc5e721dd651ca21bc880 | 2,375 | py | Python | ros/src/twist_controller/twist_controller.py | OctopusNO1/CarND-Capstone-master | 39f153cb0bf09bfda0a455864bd5a61c6a45501a | [
"MIT"
] | 1 | 2019-12-12T07:25:55.000Z | 2019-12-12T07:25:55.000Z | ros/src/twist_controller/twist_controller.py | OctopusNO1/CarND-Capstone-master | 39f153cb0bf09bfda0a455864bd5a61c6a45501a | [
"MIT"
] | null | null | null | ros/src/twist_controller/twist_controller.py | OctopusNO1/CarND-Capstone-master | 39f153cb0bf09bfda0a455864bd5a61c6a45501a | [
"MIT"
] | null | null | null | from pid import PID
from yaw_controller import YawController
from lowpass import LowPassFilter
GAS_DENSITY = 2.858
ONE_MPH = 0.44704
class Controller(object):
def __init__(self, *args, **kwargs):
# TODO: Implement
self.vehicle_mass = kwargs['vehicle_mass']
self.fuel_capacity = kwargs['fu... | 40.948276 | 155 | 0.704842 |
4cb1012c3869789062ee64ba7cbd542bc8e2c25e | 27,960 | gyp | Python | third_party/mesa/mesa.gyp | gitFreeByte/sky_engine | 05c9048930f8a0d39c2f6385ba691eccbbdabb20 | [
"BSD-3-Clause"
] | 1 | 2021-06-12T00:47:11.000Z | 2021-06-12T00:47:11.000Z | third_party/mesa/mesa.gyp | gitFreeByte/sky_engine | 05c9048930f8a0d39c2f6385ba691eccbbdabb20 | [
"BSD-3-Clause"
] | null | null | null | third_party/mesa/mesa.gyp | gitFreeByte/sky_engine | 05c9048930f8a0d39c2f6385ba691eccbbdabb20 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'variables': {
'generated_src_dir': 'src/chromium_gensrc',
},
'target_defaults': {
'defines': [
'MAPI_ABI_HEADER="glapi_mapi_tmp_sh... | 37.131474 | 87 | 0.573498 |
496f49b82faea16a49cb1c8cc31320056c703887 | 4,192 | py | Python | src/plugins/github/plugins/github_issue/__init__.py | Inetgeek/QQ-GitHub-Bot | 35c20d28aafaedc1813c6213ede9f2f51e56d5a2 | [
"MIT"
] | 1 | 2022-03-28T03:48:31.000Z | 2022-03-28T03:48:31.000Z | src/plugins/github/plugins/github_issue/__init__.py | Inetgeek/QQ-GitHub-Bot | 35c20d28aafaedc1813c6213ede9f2f51e56d5a2 | [
"MIT"
] | null | null | null | src/plugins/github/plugins/github_issue/__init__.py | Inetgeek/QQ-GitHub-Bot | 35c20d28aafaedc1813c6213ede9f2f51e56d5a2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@Author : yanyongyu
@Date : 2021-03-09 15:15:02
@LastEditors : yanyongyu
@LastEditTime : 2021-08-25 17:16:42
@Description : None
@GitHub : https://github.com/yanyongyu
"""
__author__ = "yanyongyu"
import re
import base64
from typing i... | 30.376812 | 88 | 0.641698 |
713ea5fa6db069d30670da5ee1cf875a305194b2 | 6,519 | py | Python | embuilder.py | nmrugg/emscripten | 4840fb3baa6e820dd2a1ba0ec6aeb9bdb3c422b5 | [
"MIT"
] | null | null | null | embuilder.py | nmrugg/emscripten | 4840fb3baa6e820dd2a1ba0ec6aeb9bdb3c422b5 | [
"MIT"
] | null | null | null | embuilder.py | nmrugg/emscripten | 4840fb3baa6e820dd2a1ba0ec6aeb9bdb3c422b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2014 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
"""Tool to manage building of system libraries... | 30.605634 | 202 | 0.681546 |
43a23aba1f95e39c1dd5914830dcab0372b4aad2 | 5,287 | py | Python | behavior_control_patch.py | Moonkrad/Vector | f39701180512a37d17a45e0cbd9d25a5361ef4a3 | [
"Apache-2.0"
] | null | null | null | behavior_control_patch.py | Moonkrad/Vector | f39701180512a37d17a45e0cbd9d25a5361ef4a3 | [
"Apache-2.0"
] | null | null | null | behavior_control_patch.py | Moonkrad/Vector | f39701180512a37d17a45e0cbd9d25a5361ef4a3 | [
"Apache-2.0"
] | null | null | null | --- connection.py Sun Oct 21 18:37:10 2018
+++ connection.py Sun Oct 28 23:04:36 2018
@@ -252,6 +252,22 @@
"""
return self._control_events.lost_event
+ # WV
+ @property
+ def control_granted_event(self) -> asyncio.Event:
+ """This provides an :class:`asyncio.Event` that a us... | 44.428571 | 148 | 0.616418 |
e374e2674d7619f538123df98b45610c453a4e0c | 371 | py | Python | requests_auth/version.py | Colin-b/requests_auth | dc971baf73b8dbc7a1d0465c9717b5a3fe4c80ce | [
"MIT"
] | 24 | 2018-07-23T09:43:00.000Z | 2022-02-07T18:05:21.000Z | requests_auth/version.py | Colin-b/requests_auth | dc971baf73b8dbc7a1d0465c9717b5a3fe4c80ce | [
"MIT"
] | 48 | 2018-09-06T05:29:08.000Z | 2022-02-14T14:28:59.000Z | requests_auth/version.py | Colin-b/requests_auth | dc971baf73b8dbc7a1d0465c9717b5a3fe4c80ce | [
"MIT"
] | 11 | 2018-09-29T16:30:39.000Z | 2022-02-23T13:06:41.000Z | # Version number as Major.Minor.Patch
# The version modification must respect the following rules:
# Major should be incremented in case there is a breaking change. (eg: 2.5.8 -> 3.0.0)
# Minor should be incremented in case there is an enhancement. (eg: 2.5.8 -> 2.6.0)
# Patch should be incremented in case there is a b... | 53 | 86 | 0.71159 |
9360bd1cc67d26e8bc462b0da117ffcabb5f7703 | 1,049 | py | Python | ingenico/direct/sdk/log/sys_out_communicator_logger.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | null | null | null | ingenico/direct/sdk/log/sys_out_communicator_logger.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | 1 | 2021-03-30T12:55:39.000Z | 2021-04-08T08:23:27.000Z | ingenico/direct/sdk/log/sys_out_communicator_logger.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | null | null | null |
from datetime import datetime
from threading import Lock
from ingenico.direct.sdk.log.python_communicator_logger import CommunicatorLogger
class SysOutCommunicatorLogger(CommunicatorLogger):
"""
A communicator logger that prints its message to sys.stdout
It includes a timestamp in yyyy-MM-ddTHH:mm:ss f... | 26.225 | 82 | 0.698761 |
3fbd1d25a3f63845378e6b107365783d11dcd583 | 995 | py | Python | src/scanner/controls/unix/linux/users/system_accounts_secured.py | alex-dya/security_scanner | 7aeb6af863ccdbf6c066d52446318aaf898afe7b | [
"MIT"
] | null | null | null | src/scanner/controls/unix/linux/users/system_accounts_secured.py | alex-dya/security_scanner | 7aeb6af863ccdbf6c066d52446318aaf898afe7b | [
"MIT"
] | 7 | 2021-05-28T14:31:27.000Z | 2022-03-12T00:57:40.000Z | src/scanner/controls/unix/linux/users/system_accounts_secured.py | alex-dya/security_scanner | 7aeb6af863ccdbf6c066d52446318aaf898afe7b | [
"MIT"
] | 1 | 2021-05-15T12:18:49.000Z | 2021-05-15T12:18:49.000Z | from scanner.const import os
from scanner.functions.unix.passwd_parser import PasswdParser
from scanner.transports import get_transport
from scanner.types import BaseContol, is_item_detected
class Control(BaseContol, control_number=10):
def prerequisite(self):
return is_item_detected(os.LINUX)
def ch... | 32.096774 | 99 | 0.623116 |
a66c17131b1131e5873fce39f852c4c9ecb47d4d | 4,397 | py | Python | robot_self_balance_learning/self_balance/envs/robot_env.py | BIDISHA-CHANDA/Hacktoberfest2021-8 | b9dfe2089908b6b6e17a4a2cd2b1be09e6c6f2d8 | [
"MIT"
] | 15 | 2021-10-03T08:27:22.000Z | 2022-01-10T11:20:56.000Z | robot_self_balance_learning/self_balance/envs/robot_env.py | BIDISHA-CHANDA/Hacktoberfest2021-8 | b9dfe2089908b6b6e17a4a2cd2b1be09e6c6f2d8 | [
"MIT"
] | 3 | 2021-10-03T08:23:57.000Z | 2021-10-15T05:21:15.000Z | robot_self_balance_learning/self_balance/envs/robot_env.py | BIDISHA-CHANDA/Hacktoberfest2021-8 | b9dfe2089908b6b6e17a4a2cd2b1be09e6c6f2d8 | [
"MIT"
] | 51 | 2021-10-03T08:20:44.000Z | 2021-10-31T12:51:11.000Z | '''hello everyone! I am Pratyush and below is the code of our 2-wheeled robot environment.
To check different cases, you could change the values of Torque(by changing the values in array whose one value(randomly for bot learning) is assigned to self.tar_vel in bot_practice_action function) and checkout whether it imp... | 32.813433 | 251 | 0.62861 |
0eab9f7f068d0bb8afac10416ea1a2eb4a1a4942 | 5,870 | py | Python | tests/test_original_sa_consistency.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | tests/test_original_sa_consistency.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | tests/test_original_sa_consistency.py | rwiddhic96/apotoma | 4636d6bf72673471b0c022aa4354170fc7b03ac4 | [
"MIT"
] | null | null | null | # TODO in this folder we will implement integration tests.
# Integration tests test larger workflows than unit tests and may thus take longer to implement.
# Integration tests are typically executed only when merging into main or selectively during development.
import os
import shutil
import unittest
import numpy ... | 45.859375 | 117 | 0.687394 |
5d7c21c3eacdcc8b3ee71f1805e54f9e0de55fc4 | 17,977 | py | Python | src/networkx/linalg/algebraicconnectivity.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 184 | 2017-12-20T21:50:06.000Z | 2022-03-19T13:24:58.000Z | src/networkx/linalg/algebraicconnectivity.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 26 | 2020-03-24T18:07:06.000Z | 2022-03-12T00:12:27.000Z | src/networkx/linalg/algebraicconnectivity.py | MarletteFunding/aws-kube-codesuite | ab4e5ce45416b83bffb947ab8d234df5437f4fca | [
"Apache-2.0"
] | 136 | 2018-01-09T22:52:06.000Z | 2022-02-24T13:26:18.000Z | # -*- coding: utf-8 -*-
"""
Algebraic connectivity and Fiedler vectors of undirected graphs.
"""
__author__ = """ysitu <ysitu@users.noreply.github.com>"""
# Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com>
# All rights reserved.
# BSD license.
from functools import partial
import networkx as nx
from networkx... | 32.332734 | 79 | 0.560271 |
3fe5e056df3ad72ba732459970e150ce86d617d0 | 3,276 | py | Python | src/commands/fleet.py | jportner/kibbe | 72d62ba0c1ca206430fc606c72d19eace6329e41 | [
"MIT"
] | 2 | 2021-08-17T15:04:38.000Z | 2021-12-28T15:41:42.000Z | src/commands/fleet.py | jportner/kibbe | 72d62ba0c1ca206430fc606c72d19eace6329e41 | [
"MIT"
] | 7 | 2021-08-24T07:53:19.000Z | 2022-01-26T20:45:24.000Z | src/commands/fleet.py | jportner/kibbe | 72d62ba0c1ca206430fc606c72d19eace6329e41 | [
"MIT"
] | 2 | 2021-07-15T16:19:44.000Z | 2022-01-19T20:25:30.000Z | import subprocess
import ipaddress
from termcolor import colored
from src.util import is_es_running, is_kibana_running
import click
import re
_RE_COMBINE_WHITESPACE = re.compile(r"\s+")
@click.command()
@click.option(
"--snapshot",
default="docker.elastic.co/beats/elastic-agent:8.0.0-SNAPSHOT",
help=(
... | 31.805825 | 86 | 0.583333 |
4885e74cb14b96a97af1ffdead85b338865c28c3 | 45 | py | Python | xtremettt.py | wooky/xtremettt | e8088fce6ddc8a01ce9530a6bb5eb4434328bef5 | [
"WTFPL"
] | null | null | null | xtremettt.py | wooky/xtremettt | e8088fce6ddc8a01ce9530a6bb5eb4434328bef5 | [
"WTFPL"
] | null | null | null | xtremettt.py | wooky/xtremettt | e8088fce6ddc8a01ce9530a6bb5eb4434328bef5 | [
"WTFPL"
] | null | null | null | if __name__ == "__main__":
import logic.main | 22.5 | 26 | 0.733333 |
9b821faf3bc4245c82788bb6e66dc698e6ffb725 | 3,293 | py | Python | nusex/spec/nsc.py | Jonxslays/nusex | 8ec8a628f3ba253b218d966be41e231ed449c264 | [
"BSD-3-Clause"
] | 3 | 2021-07-30T20:47:35.000Z | 2021-07-31T20:18:30.000Z | nusex/spec/nsc.py | Jonxslays/nusex | 8ec8a628f3ba253b218d966be41e231ed449c264 | [
"BSD-3-Clause"
] | 20 | 2021-10-04T21:28:45.000Z | 2021-12-13T17:12:10.000Z | nusex/spec/nsc.py | Jonxslays/nusex | 8ec8a628f3ba253b218d966be41e231ed449c264 | [
"BSD-3-Clause"
] | 2 | 2021-10-08T02:22:30.000Z | 2021-11-05T00:41:35.000Z | # Copyright (c) 2021, Ethan Henderson
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and... | 38.290698 | 80 | 0.633465 |
c673a898e9a307bc3ca5314df30b6501a0f05e8b | 1,897 | py | Python | client/states/playing.py | AndrewIjano/distributed-tic-tac-toe | 8ac050ce45d0ad3a0a7d06c5cea1850b8cdb9f01 | [
"MIT"
] | null | null | null | client/states/playing.py | AndrewIjano/distributed-tic-tac-toe | 8ac050ce45d0ad3a0a7d06c5cea1850b8cdb9f01 | [
"MIT"
] | null | null | null | client/states/playing.py | AndrewIjano/distributed-tic-tac-toe | 8ac050ce45d0ad3a0a7d06c5cea1850b8cdb9f01 | [
"MIT"
] | null | null | null | from client.states import waiting, logged_in
from client.states.base import State
from client.commands import Command
from client.exceptions import MoveAlreadyDone, MoveOutOfBounds
class PlayingState(State):
def __init__(self, client) -> None:
super().__init__(client)
print(f"Your turn. You are {s... | 37.94 | 80 | 0.619399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.