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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2f51beb9590d4b8e11e5a1f72441ffb7a8829482 | 3,276 | py | Python | src/robot/parsing/parser/fileparser.py | Global19/robotframework | c908c15951bf6fcb193828d8b93e0f5bd42382d4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/parsing/parser/fileparser.py | Global19/robotframework | c908c15951bf6fcb193828d8b93e0f5bd42382d4 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-11-06T08:30:26.000Z | 2022-03-02T10:06:51.000Z | src/robot/parsing/parser/fileparser.py | Mattlk13/robotframework | bdd3a303e56050803c02229d8c394a29c3a51362 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-23T03:44:31.000Z | 2020-11-23T03:44:31.000Z | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | 31.2 | 79 | 0.711233 |
bd3af3115e8d49f430758993048a508fe563f588 | 6,002 | py | Python | models/impl/se_vector_fields.py | spetrescu/sesn | 43ecc5da7083364eea2c66742c17231c18465973 | [
"MIT"
] | 55 | 2020-02-13T17:44:25.000Z | 2022-03-08T04:26:34.000Z | models/impl/se_vector_fields.py | spetrescu/sesn | 43ecc5da7083364eea2c66742c17231c18465973 | [
"MIT"
] | 1 | 2021-07-09T21:49:17.000Z | 2021-07-10T15:12:33.000Z | models/impl/se_vector_fields.py | spetrescu/sesn | 43ecc5da7083364eea2c66742c17231c18465973 | [
"MIT"
] | 7 | 2020-02-13T19:41:46.000Z | 2021-09-20T17:23:27.000Z | '''It is a reimplementation of "Scale equavariant CNNs with vector fields"
Paper: https://arxiv.org/pdf/1807.11783.pdf
Code: https://github.com/dmarcosg/ScaleEqNet
This reimplementation is slightly faster than the original one
MIT License
Copyright (c) 2020 Ivan Sosnovik
'''
import torch
import torch.nn as nn
from t... | 37.748428 | 98 | 0.611296 |
4d2090e620433b5a2c806849e43556875786d170 | 8,632 | py | Python | kubernetes_asyncio/client/models/v1_horizontal_pod_autoscaler_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_horizontal_pod_autoscaler_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_horizontal_pod_autoscaler_status.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Horizont... | 37.694323 | 187 | 0.673772 |
b156ed1ceed1ee2291a718d1b04c28870adf6c5f | 1,624 | py | Python | mchgeo/_api.py | nantes-m2-rps-exp/mchgeo | 7c044f3d425fe11e9ee8d9fd3111286fafb8c858 | [
"MIT"
] | null | null | null | mchgeo/_api.py | nantes-m2-rps-exp/mchgeo | 7c044f3d425fe11e9ee8d9fd3111286fafb8c858 | [
"MIT"
] | null | null | null | mchgeo/_api.py | nantes-m2-rps-exp/mchgeo | 7c044f3d425fe11e9ee8d9fd3111286fafb8c858 | [
"MIT"
] | 1 | 2022-02-01T08:57:40.000Z | 2022-02-01T08:57:40.000Z | from ._constants import LIST_OF_DEIDS
import json
import math
from importlib.resources import open_text
def _asJSON():
geomFile= open_text('.'.join((__package__,'data')),'de-geometry.json')
g = json.load(geomFile)
return g
def feature(deid: int):
assert(deid in LIST_OF_DEIDS), "{} is not a valid dete... | 26.193548 | 88 | 0.586207 |
db544f810fcac429cd11422d183eb0a3606e3817 | 3,776 | py | Python | magpie/test.py | FertileFragrance/data_not_scientific | 316495f923277ba1f1f3fe70e15b8688797f644f | [
"Apache-2.0"
] | 6 | 2021-01-25T17:36:17.000Z | 2021-05-18T12:14:02.000Z | magpie/test.py | FertileFragrance/data_not_scientific | 316495f923277ba1f1f3fe70e15b8688797f644f | [
"Apache-2.0"
] | null | null | null | magpie/test.py | FertileFragrance/data_not_scientific | 316495f923277ba1f1f3fe70e15b8688797f644f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
@Author: njuselhx
@Time: 2021/1/21 下午2:04
@File: test.py
@Software: PyCharm
"""
import pymongo
import datetime
from magpie import Magpie
# labels = ['Gravitation and Cosmology', 'Experiment-HEP', 'Theory-HEP']
# labels = ['军事', '旅游', '政治']
# magpie = Magpie(
# keras_mo... | 37.76 | 107 | 0.622617 |
4357046cb7ec870cfe1dff142366f80f2b4f1879 | 34,324 | py | Python | pytorch_lightning/callbacks/model_checkpoint.py | tchaton/pytorch-lightning | e19f7b43192bcd02ae778ee68b196b2284eec848 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/callbacks/model_checkpoint.py | tchaton/pytorch-lightning | e19f7b43192bcd02ae778ee68b196b2284eec848 | [
"Apache-2.0"
] | 1 | 2020-12-08T09:00:55.000Z | 2020-12-08T09:00:55.000Z | pytorch_lightning/callbacks/model_checkpoint.py | tchaton/pytorch-lightning | e19f7b43192bcd02ae778ee68b196b2284eec848 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 45.522546 | 120 | 0.653595 |
8a2127c6408bf2ab24fb1c90d2fa17cd92bab788 | 1,279 | py | Python | leiaapi/helpers/scheduler.py | labinnovationdocapost/leia-api-python-sdk | 6001dce68362d4e836b57e52d4da17710f25ed12 | [
"MIT"
] | null | null | null | leiaapi/helpers/scheduler.py | labinnovationdocapost/leia-api-python-sdk | 6001dce68362d4e836b57e52d4da17710f25ed12 | [
"MIT"
] | null | null | null | leiaapi/helpers/scheduler.py | labinnovationdocapost/leia-api-python-sdk | 6001dce68362d4e836b57e52d4da17710f25ed12 | [
"MIT"
] | null | null | null | import logging
import sched
import time
from threading import Thread, Lock
logger = logging.getLogger(__name__)
class Scheduler:
def __call__(self, func, *args, **kwargs):
logger.info(f'Scheduling method {func.__name__} every {self.interval} seconds')
self.func = func
self.run()
r... | 27.212766 | 90 | 0.64269 |
78fe7180e6b717a45c85ffc1271d81f42f3ab236 | 4,080 | py | Python | frontends/PyCDE/src/pycde/instance.py | jopperm/circt | 56d7fa356d6662111cfc5026c4288e4755ae1393 | [
"Apache-2.0"
] | null | null | null | frontends/PyCDE/src/pycde/instance.py | jopperm/circt | 56d7fa356d6662111cfc5026c4288e4755ae1393 | [
"Apache-2.0"
] | 1 | 2021-11-25T14:12:00.000Z | 2021-11-26T17:09:53.000Z | frontends/PyCDE/src/pycde/instance.py | jopperm/circt | 56d7fa356d6662111cfc5026c4288e4755ae1393 | [
"Apache-2.0"
] | null | null | null | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
from __future__ import annotations
from typing import Union
from pycde.devicedb import PhysLocation, PrimitiveDB, Pla... | 30.676692 | 80 | 0.670588 |
3ca1417f35abd930e43b8586aa2e4965e09b76c8 | 4,197 | py | Python | tools/replay_dir/metrics.py | umn-cris/hfplayer | c35a0d0f4a42b673b8ef78c9e7069da30c69a9c3 | [
"BSD-4-Clause-UC"
] | 16 | 2017-02-13T15:35:20.000Z | 2022-01-26T13:52:05.000Z | tools/replay_dir/metrics.py | umn-cris/hfplayer | c35a0d0f4a42b673b8ef78c9e7069da30c69a9c3 | [
"BSD-4-Clause-UC"
] | 3 | 2017-07-05T02:02:17.000Z | 2017-07-21T03:03:01.000Z | tools/replay_dir/metrics.py | umn-cris/hfplayer | c35a0d0f4a42b673b8ef78c9e7069da30c69a9c3 | [
"BSD-4-Clause-UC"
] | 7 | 2017-03-01T18:26:31.000Z | 2018-11-14T07:08:17.000Z | #!/usr/bin/python
# metrics to claculate:
# - Avg Latency : accumulate latency value, devide it by number of IOs at the end
# - Execution Time: take start time, subtract it from last IO time at the end
# - IOPS: devide number of IOs by execution time
# - Avg queue depth: accumulate queue depth for each request, devide... | 24.54386 | 128 | 0.683584 |
4778ab0d849b3d529e0f5fdc175616d3f416ae48 | 1,240 | py | Python | Jarvis_general.py | VishalShenoy2002/J.A.R.V.I.S-Computer-Automation | f0cc4109f4f34f258e0a2ec2102ff8651b9c308a | [
"MIT"
] | 1 | 2022-01-13T07:28:33.000Z | 2022-01-13T07:28:33.000Z | Jarvis_general.py | VishalShenoy2002/J.A.R.V.I.S-Computer-Automation | f0cc4109f4f34f258e0a2ec2102ff8651b9c308a | [
"MIT"
] | null | null | null | Jarvis_general.py | VishalShenoy2002/J.A.R.V.I.S-Computer-Automation | f0cc4109f4f34f258e0a2ec2102ff8651b9c308a | [
"MIT"
] | null | null | null | import pyautogui
class OS_Functions:
def __init__(self):
pass
def increase_volume(self):
pyautogui.press('volumeup',presses=3)
def decrease_volume(self):
pyautogui.press('volumedown',presses=3)
def mute(self):
pyautogui.press('volumemute',presses=3)
def capslock(... | 19.375 | 47 | 0.595968 |
f5d22f1760ffe14329d633239b5d11fd39faea58 | 1,575 | py | Python | mlflow/entities/experiment.py | drorata/mlflow | dd8610ec9457087eb29c57bbba2f0ddbe3e00f9b | [
"Apache-2.0"
] | 1 | 2019-01-26T22:56:33.000Z | 2019-01-26T22:56:33.000Z | mlflow/entities/experiment.py | drorata/mlflow | dd8610ec9457087eb29c57bbba2f0ddbe3e00f9b | [
"Apache-2.0"
] | null | null | null | mlflow/entities/experiment.py | drorata/mlflow | dd8610ec9457087eb29c57bbba2f0ddbe3e00f9b | [
"Apache-2.0"
] | null | null | null | from mlflow.entities._mlflow_object import _MLflowObject
from mlflow.protos.service_pb2 import Experiment as ProtoExperiment
class Experiment(_MLflowObject):
"""
Experiment object.
"""
DEFAULT_EXPERIMENT_ID = 0
def __init__(self, experiment_id, name, artifact_location, lifecycle_stage):
s... | 30.288462 | 99 | 0.684444 |
c09e1144780641d5f13ece79d3b92aab41ba75bf | 4,200 | py | Python | submit/vec_feat_xgb_test/mt_metrics/bleu.py | ubuntu733/SentencePairs | 367139cdd94be36c04899c3ea01df6f58e796241 | [
"Apache-2.0"
] | null | null | null | submit/vec_feat_xgb_test/mt_metrics/bleu.py | ubuntu733/SentencePairs | 367139cdd94be36c04899c3ea01df6f58e796241 | [
"Apache-2.0"
] | null | null | null | submit/vec_feat_xgb_test/mt_metrics/bleu.py | ubuntu733/SentencePairs | 367139cdd94be36c04899c3ea01df6f58e796241 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 38.888889 | 81 | 0.67381 |
a907ef634dda5de5122ef138a7ff1632cd99d839 | 2,165 | py | Python | abp/examples/open_ai/pong/dqn.py | osu-xai/abp | cd83eaa2810a1c5350c849303d61639576c0bb0d | [
"MIT"
] | null | null | null | abp/examples/open_ai/pong/dqn.py | osu-xai/abp | cd83eaa2810a1c5350c849303d61639576c0bb0d | [
"MIT"
] | 9 | 2018-11-14T23:35:05.000Z | 2019-05-22T18:31:30.000Z | abp/examples/open_ai/pong/dqn.py | osu-xai/abp | cd83eaa2810a1c5350c849303d61639576c0bb0d | [
"MIT"
] | 1 | 2018-11-14T22:34:09.000Z | 2018-11-14T22:34:09.000Z | import gym
import numpy as np
from abp import DQNAdaptive
from tensorboardX import SummaryWriter
from tqdm import tqdm
def run_task(evaluation_config, network_config, reinforce_config):
env = gym.make(evaluation_config.env)
max_episode_steps = env._max_episode_steps
state = env.reset()
UP, DOWN = [2, ... | 32.313433 | 96 | 0.612009 |
18b30a8cc17409205caa77b06e555fab9e053d54 | 1,699 | py | Python | uspy/postprocessing/stack_image_tiles.py | jwarndt/uspy | ab5bb73f9243a1d7978c83ccb63e7189fc18cd8a | [
"MIT"
] | null | null | null | uspy/postprocessing/stack_image_tiles.py | jwarndt/uspy | ab5bb73f9243a1d7978c83ccb63e7189fc18cd8a | [
"MIT"
] | null | null | null | uspy/postprocessing/stack_image_tiles.py | jwarndt/uspy | ab5bb73f9243a1d7978c83ccb63e7189fc18cd8a | [
"MIT"
] | null | null | null | import os
import numpy as np
from osgeo import gdal
from osgeo import osr
from ..utilities.io import *
def get_sorted_tiles(image_dir):
image_names = [os.path.join(image_dir, n) for n in os.listdir(image_dir)]
feature_types = ["_LBP_", "_MBI_", "_GLCM_", "_PANTEX_", "_HOG_", "_GAB_", "_LAC_", "_SIF... | 36.934783 | 98 | 0.563273 |
4ea5611b3b745d51cb2a94a5bd56acfbc1620b8a | 508 | py | Python | app/db/session.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | null | null | null | app/db/session.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | 23 | 2022-03-09T11:31:32.000Z | 2022-03-31T08:53:27.000Z | app/db/session.py | ergo-pad/paideia-api | 7ffc78366567c72722d107f06ad37aa7557b05be | [
"MIT"
] | 2 | 2022-02-16T03:40:05.000Z | 2022-02-16T22:40:15.000Z | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from config import Config, Network # api specific config
CFG = Config[Network]
engine = create_engine(CFG.connectionString)
SessionLocal = sessionmaker(autocommit=False, autoflush=Fals... | 22.086957 | 75 | 0.73622 |
226630f3307dc64459de55d5afca6c92b8238a02 | 21,606 | py | Python | strategies/Treway.py | Mai-Te-Pora/Demex-Trading-Bot | 4b9a034ec00e7aca8cdc9e4ddd0221ebb2820513 | [
"MIT"
] | 6 | 2021-09-17T01:14:23.000Z | 2022-01-16T15:14:30.000Z | strategies/Treway.py | Mai-Te-Pora/Demex-Trading-Bot | 4b9a034ec00e7aca8cdc9e4ddd0221ebb2820513 | [
"MIT"
] | null | null | null | strategies/Treway.py | Mai-Te-Pora/Demex-Trading-Bot | 4b9a034ec00e7aca8cdc9e4ddd0221ebb2820513 | [
"MIT"
] | 2 | 2021-11-25T22:23:45.000Z | 2022-01-16T15:14:33.000Z | import pandas as pd
import json
import itertools
import asyncio
import time
import os, sys, logging
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from authenticated_client import demex_auth
from data_processing import SavingRecords
loop = 0
balances = []
swth_usdc_orderbook... | 41.390805 | 103 | 0.64732 |
1330f6cb4470e2455714e97279e56487075b0280 | 1,315 | py | Python | s3upload/setup.py | chanzuckerberg/miniwdl-s3parcp | fa1baf802bf71b76dbcbc8922ad04d5e16c21b48 | [
"MIT"
] | 1 | 2020-02-14T15:45:57.000Z | 2020-02-14T15:45:57.000Z | s3upload/setup.py | chanzuckerberg/miniwdl-s3parcp | fa1baf802bf71b76dbcbc8922ad04d5e16c21b48 | [
"MIT"
] | 1 | 2020-02-25T06:04:04.000Z | 2020-03-02T19:37:12.000Z | s3upload/setup.py | chanzuckerberg/miniwdl-s3parcp | fa1baf802bf71b76dbcbc8922ad04d5e16c21b48 | [
"MIT"
] | 1 | 2020-02-19T08:05:04.000Z | 2020-02-19T08:05:04.000Z | #!/usr/bin/env python3
from setuptools import setup
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(path.dirname(__file__), "README.md")) as f:
long_description = f.read()
setup(
name="miniwdl-s3upload",
version="0.0.8",
description="miniwdl plugin for pro... | 39.848485 | 114 | 0.719392 |
53de1e7917a8a35854bd254949e100ea5f9465af | 560 | py | Python | resize.py | lorenzoferrante/DeepStar | 90bacede200e1a3b53e779dd0bd07d7e6a4d088e | [
"MIT"
] | null | null | null | resize.py | lorenzoferrante/DeepStar | 90bacede200e1a3b53e779dd0bd07d7e6a4d088e | [
"MIT"
] | null | null | null | resize.py | lorenzoferrante/DeepStar | 90bacede200e1a3b53e779dd0bd07d7e6a4d088e | [
"MIT"
] | null | null | null | from PIL import Image
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('--path', type=str, required=True, help='Path to directory to resize') # example 'data/RaFD/train/clothes/'
parser.add_argument('--new_size', type=int, default=128, help='Size of output image')
args = parser.parse_a... | 35 | 127 | 0.7125 |
c033bf828561bd3f575d9002ed1e02de6900b14f | 32,027 | py | Python | batchapps/test/unittest_config.py | Azure/azure-batch-apps-python | d7edf210d601137ba5ed187a58f4fe49e413ce1e | [
"MIT"
] | 16 | 2015-02-25T23:35:18.000Z | 2021-06-10T23:58:49.000Z | batchapps/test/unittest_config.py | Azure/azure-batch-apps-python | d7edf210d601137ba5ed187a58f4fe49e413ce1e | [
"MIT"
] | 1 | 2021-02-24T04:11:17.000Z | 2021-02-24T04:11:17.000Z | batchapps/test/unittest_config.py | Azure/azure-batch-apps-python | d7edf210d601137ba5ed187a58f4fe49e413ce1e | [
"MIT"
] | 9 | 2015-03-09T15:16:19.000Z | 2021-06-08T19:00:53.000Z | #-------------------------------------------------------------------------
# The Azure Batch Apps Python Client
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docu... | 39.588381 | 105 | 0.604209 |
fe7bf77cb4f9ec979746db8548739de00655f724 | 8,628 | py | Python | installer/dials_installer.py | graeme-winter/dials | 78a696a6591e224e73204846f39771ebac0c2668 | [
"BSD-3-Clause"
] | 2 | 2021-03-17T11:25:46.000Z | 2021-11-18T04:20:54.000Z | installer/dials_installer.py | graeme-winter/dials | 78a696a6591e224e73204846f39771ebac0c2668 | [
"BSD-3-Clause"
] | null | null | null | installer/dials_installer.py | graeme-winter/dials | 78a696a6591e224e73204846f39771ebac0c2668 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import os
import shutil
import sys
import traceback
# This file needs to remain Python 2.7 compatible
# due to the underlying cctbx installer logic
installer_path = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
libtbx_path = os.path.join... | 36.714894 | 100 | 0.540102 |
dbb498b9546347a0ec6943ce26f33b85f416a606 | 2,707 | py | Python | scraper.py | pconwell/covid-scraper | 26b77619ba6c074915270c15e5735ebb4a1dbbe8 | [
"MIT"
] | null | null | null | scraper.py | pconwell/covid-scraper | 26b77619ba6c074915270c15e5735ebb4a1dbbe8 | [
"MIT"
] | null | null | null | scraper.py | pconwell/covid-scraper | 26b77619ba6c074915270c15e5735ebb4a1dbbe8 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
from datetime import datetime, timedelta
import re
today = datetime.today()
today_url = f"https://www.asafenashville.org/updates/mphd-daily-covid-19-update-for-{today.strftime('%B').lower()}-{today.strftime('%d').lstrip('0')}/"
yesterday_url = f"https://www.asafenashville... | 41.015152 | 257 | 0.538604 |
06ce670924b1eb60b293c39cd7a2d01bf9f3229e | 490 | py | Python | web/migrations/0001_initial.py | turing0/cervical-cell-classification | 5d01d7bab62356046e7cb5cc818fd73d00a1ae74 | [
"MIT"
] | null | null | null | web/migrations/0001_initial.py | turing0/cervical-cell-classification | 5d01d7bab62356046e7cb5cc818fd73d00a1ae74 | [
"MIT"
] | null | null | null | web/migrations/0001_initial.py | turing0/cervical-cell-classification | 5d01d7bab62356046e7cb5cc818fd73d00a1ae74 | [
"MIT"
] | null | null | null | # Generated by Django 3.2 on 2022-01-14 07:06
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.BigAutoField(au... | 22.272727 | 117 | 0.573469 |
3cea52da8ac5bc1f024c704bbccfeafdd4f28264 | 2,612 | py | Python | keyboards/inlinekb.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | null | null | null | keyboards/inlinekb.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | null | null | null | keyboards/inlinekb.py | vogelfenx/storagebot | 64ab07b068bf645d7cdf5bb1cd5db91c0e2a9228 | [
"MIT"
] | null | null | null | from aiogram.types import InlineKeyboardMarkup
from aiogram.types import InlineKeyboardButton
from geopy import distance
from utils.get_nearest_storage_boxes import get_nearest_storage_boxes
def select_storage_kb(location):
keyboard = InlineKeyboardMarkup()
for box_id, box_location in get_nearest_storage_box... | 20.092308 | 76 | 0.563553 |
641a960901c93ce060e62d4aa064315e593c4bbb | 7,163 | py | Python | cpo_analysis/cpo_analysis/plot_from_file.py | utiasASRL/cpo | b60a14d641efb6a533322dd12b43bb37ddaacb2a | [
"Apache-2.0"
] | 2 | 2021-09-15T17:06:50.000Z | 2022-03-29T09:32:56.000Z | cpo_analysis/cpo_analysis/plot_from_file.py | utiasASRL/cpo | b60a14d641efb6a533322dd12b43bb37ddaacb2a | [
"Apache-2.0"
] | null | null | null | cpo_analysis/cpo_analysis/plot_from_file.py | utiasASRL/cpo | b60a14d641efb6a533322dd12b43bb37ddaacb2a | [
"Apache-2.0"
] | 2 | 2021-09-15T17:06:37.000Z | 2022-03-29T09:06:55.000Z | #!/usr/bin/env python
import csv
import os.path as osp
import argparse
import math
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from math import sqrt
from pyproj import Proj
import seaborn as sns
sns.set_style("whitegrid")
matplotlib.use("TkAgg") # Can change to 'Agg' for non-interactive mod... | 40.01676 | 120 | 0.582577 |
108c6b821c4b722d5f2c2a204df349419002f76e | 3,398 | py | Python | export/tools.py | sigmacms/django-export | b581090ba35a06be72d93e077961d169f134af2e | [
"BSD-3-Clause"
] | null | null | null | export/tools.py | sigmacms/django-export | b581090ba35a06be72d93e077961d169f134af2e | [
"BSD-3-Clause"
] | null | null | null | export/tools.py | sigmacms/django-export | b581090ba35a06be72d93e077961d169f134af2e | [
"BSD-3-Clause"
] | null | null | null | import mimetypes
from django import template
from django.conf import settings
from django.contrib import messages
from django.contrib.admin import helpers
from django.http import HttpResponse
from django.shortcuts import render
from django.utils.translation import ugettext as _
import object_tools
from export import... | 32.361905 | 80 | 0.633902 |
0f637d1396ca478388d4d7f0a4a7c4599907bd56 | 1,992 | py | Python | boyd_bot/__init__.py | ineshbose/boyd_bot_messenger | 90603a421b1819875672eff75f43c3ea356d5369 | [
"MIT"
] | 7 | 2020-06-22T11:38:23.000Z | 2020-09-02T14:56:15.000Z | boyd_bot/__init__.py | ineshbose/boyd_bot_messenger | 90603a421b1819875672eff75f43c3ea356d5369 | [
"MIT"
] | 24 | 2020-07-05T10:10:06.000Z | 2021-11-17T14:37:14.000Z | boyd_bot/__init__.py | ineshbose/boyd_bot_messenger | 90603a421b1819875672eff75f43c3ea356d5369 | [
"MIT"
] | 2 | 2020-07-05T16:16:00.000Z | 2020-09-21T22:53:18.000Z | # flake8: noqa
import os
import logging
from flask import Flask, Blueprint
app = Flask(__name__)
app.logger.setLevel(logging.INFO)
app_url = os.environ.get("APP_URL", "http://127.0.0.1:5000")
app.config["SECRET_KEY"] = os.environ.get("FLASK_KEY")
app.config["DEBUG"] = "127.0.0.1" in app_url
from . import _config
... | 24 | 83 | 0.730924 |
60fcf6b1131ae1ac025f5ac1def402ad1d0daa0d | 6,805 | py | Python | altair/utils/plugin_registry.py | hugovk/altair | a3c9f06790f7a8c5c7e2c98278d0f69e4630b5be | [
"BSD-3-Clause"
] | 1 | 2022-03-13T21:42:09.000Z | 2022-03-13T21:42:09.000Z | altair/utils/plugin_registry.py | RoyMachineLearning/altair | 74a765b373694776e63d224d99536975cc173810 | [
"BSD-3-Clause"
] | null | null | null | altair/utils/plugin_registry.py | RoyMachineLearning/altair | 74a765b373694776e63d224d99536975cc173810 | [
"BSD-3-Clause"
] | null | null | null | from typing import Generic, TypeVar, cast
import entrypoints
from toolz import curry
PluginType = TypeVar('PluginType')
class PluginEnabler(object):
"""Context manager for enabling plugins
This object lets you use enable() as a context manager to
temporarily enable a given plugin::
with plugi... | 34.025 | 89 | 0.597061 |
04aae694b6d0589ecc374e71bb4a85a32b868254 | 4,040 | py | Python | networks/pose_cnn.py | xdr940/DeepSfM | c5d97fcbc075b80ff9c0117a9f89693707fb32f4 | [
"MIT"
] | null | null | null | networks/pose_cnn.py | xdr940/DeepSfM | c5d97fcbc075b80ff9c0117a9f89693707fb32f4 | [
"MIT"
] | null | null | null | networks/pose_cnn.py | xdr940/DeepSfM | c5d97fcbc075b80ff9c0117a9f89693707fb32f4 | [
"MIT"
] | null | null | null | # Copyright Niantic 2019. Patent Pending. All rights reserved.
#
# This software is licensed under the terms of the Monodepth2 licence
# which allows for non-commercial use only, the full terms of which are made
# available in the LICENSE file.
from __future__ import absolute_import, division, print_function
... | 30.839695 | 99 | 0.52599 |
9fdd77b1c998f941ccfc56122488ac03acd9282e | 293 | py | Python | naeval/log.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 36 | 2020-03-22T09:37:10.000Z | 2022-01-17T14:49:30.000Z | naeval/log.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 11 | 2020-03-25T09:39:45.000Z | 2020-08-16T05:37:02.000Z | naeval/log.py | sdspieg/naeval | 52c4a508bf212b95d4e610cfe1b5e23b8ca94d2f | [
"MIT"
] | 6 | 2020-05-16T05:52:04.000Z | 2022-01-16T06:45:29.000Z |
import sys
from datetime import datetime
def dot():
print('.', end='', file=sys.stderr, flush=True)
def log(format, *args):
message = format % args
now = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
print(
'[%s] %s' % (now, message),
file=sys.stderr
)
| 17.235294 | 54 | 0.552901 |
b2be507ab10eda881408db742029c1a7b1053ac4 | 332 | py | Python | python_modules/dagster-graphql/dagster_graphql/schema/pipelines/status.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 1 | 2021-01-31T19:16:29.000Z | 2021-01-31T19:16:29.000Z | python_modules/dagster-graphql/dagster_graphql/schema/pipelines/status.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster-graphql/dagster_graphql/schema/pipelines/status.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | import graphene
class GrapheneRunStatus(graphene.Enum):
QUEUED = "QUEUED"
NOT_STARTED = "NOT_STARTED"
MANAGED = "MANAGED"
STARTING = "STARTING"
STARTED = "STARTED"
SUCCESS = "SUCCESS"
FAILURE = "FAILURE"
CANCELING = "CANCELING"
CANCELED = "CANCELED"
class Meta:
name = ... | 19.529412 | 39 | 0.63253 |
205859497ab0a81302eb932995eb86626abba718 | 6,446 | py | Python | intropyproject-classify-pet-images/check_images.py | Eyongkevin/AIPND-revision | b28ff7c495726ca39109ba663f2cc75272a44733 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/check_images.py | Eyongkevin/AIPND-revision | b28ff7c495726ca39109ba663f2cc75272a44733 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/check_images.py | Eyongkevin/AIPND-revision | b28ff7c495726ca39109ba663f2cc75272a44733 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/check_images.py
#
# TODO 0: Add your information below for Programmer & Date Created.
# PROGRAMMER: Eyong Kevin Enowanyo
# DATE CREATED: Oct ... | 48.104478 | 144 | 0.727583 |
56a1a4cd84d1cf025dec24e610e672a0b858d8fe | 2,604 | py | Python | test/test_ghidra_capa_features.py | L1NNA/JARV1S-Disassembler | 6bc9d9459bd5142406fdda0ed88ba636934c94c6 | [
"Apache-2.0"
] | 7 | 2020-12-19T18:56:23.000Z | 2021-11-21T20:29:58.000Z | test/test_ghidra_capa_features.py | L1NNA/JARV1S-Disassembler | 6bc9d9459bd5142406fdda0ed88ba636934c94c6 | [
"Apache-2.0"
] | 1 | 2020-12-20T07:57:37.000Z | 2020-12-28T18:10:11.000Z | test/test_ghidra_capa_features.py | L1NNA/JARV1S-Ghidra | 84b551b2a1266b6bcb9454aaa01b97b21d7d4d4f | [
"Apache-2.0"
] | 2 | 2020-12-20T11:32:20.000Z | 2021-03-17T15:36:16.000Z | # Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at: [package root]/LICENSE.txt
# Unless required by applicable law or agreed to in writing,... | 37.73913 | 111 | 0.710061 |
055a37b402b32565af4632a59de778a951268fdf | 10,560 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/cisco/mso/plugins/modules/mso_schema_template_externalepg.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_ve... | 32.293578 | 131 | 0.647064 |
6c189c19845213d5ebddac08cae7004792258682 | 1,061 | py | Python | tag_sentenze/serializers.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 3 | 2021-12-11T12:20:07.000Z | 2022-01-15T14:34:07.000Z | tag_sentenze/serializers.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2021-11-28T22:34:58.000Z | 2021-11-28T22:35:43.000Z | tag_sentenze/serializers.py | AlbertoZerbinati/sentag | 542c10e68372352cf1dcca056452220532ad81ed | [
"MIT"
] | 1 | 2022-01-26T16:41:12.000Z | 2022-01-26T16:41:12.000Z | from rest_framework import serializers
from users.models import Tagging, TaggingTask
class TaggingSerializer(serializers.ModelSerializer):
name = serializers.CharField(source='judgment.name', read_only=True)
initial_text = serializers.CharField(
source='judgment.initial_text', read_only=True)
tags... | 39.296296 | 105 | 0.69934 |
c15267d90bd97ad0221957252924b91865605f86 | 2,233 | py | Python | dev/scripts/app_routes_gen.py | sephrat/mealie | 1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba | [
"MIT"
] | null | null | null | dev/scripts/app_routes_gen.py | sephrat/mealie | 1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba | [
"MIT"
] | 1 | 2021-04-23T01:13:25.000Z | 2021-04-23T01:13:25.000Z | dev/scripts/app_routes_gen.py | sephrat/mealie | 1f35742d8bad8e9066cd40e7bff8f5a41c4cd2ba | [
"MIT"
] | null | null | null | import json
import re
from pathlib import Path
from typing import Optional
import slugify
from jinja2 import Template
from mealie.app import app
from pydantic import BaseModel
CWD = Path(__file__).parent
OUT_FILE = CWD.joinpath("output", "app_routes.py")
code_template = """
class AppRoutes:
def __init__(self) ->... | 26.583333 | 119 | 0.623824 |
9e85b9f05b4fab47d47204543544d59f7847424a | 4,185 | py | Python | mtdata/index/other.py | kpu/mtdata | 22775046b653484b25769ca8c087601a499f48db | [
"Apache-2.0"
] | null | null | null | mtdata/index/other.py | kpu/mtdata | 22775046b653484b25769ca8c087601a499f48db | [
"Apache-2.0"
] | null | null | null | mtdata/index/other.py | kpu/mtdata | 22775046b653484b25769ca8c087601a499f48db | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# All other single corpus
# Author: Thamme Gowda [tg (at) isi (dot) edu]
# Created: 5/23/20
from mtdata.index import Index, Entry
def load_all(index: Index):
# === IITB hin eng http://www.cfilt.iitb.ac.in/iitb_parallel/
cite = index.ref_db.get_bibtex('Kunchukuttan-etal-iitb')
l1, ... | 52.974684 | 285 | 0.605974 |
e1644a0ebf43f674b8250f30b7eec955acaba9b0 | 413 | py | Python | docs/dev.py | healeycodes/adventlang | a894a007434c1c905f20d5697f1a8852406cb1c0 | [
"MIT"
] | 28 | 2021-11-28T14:58:21.000Z | 2022-03-02T04:31:04.000Z | docs/dev.py | healeycodes/adventlang | a894a007434c1c905f20d5697f1a8852406cb1c0 | [
"MIT"
] | null | null | null | docs/dev.py | healeycodes/adventlang | a894a007434c1c905f20d5697f1a8852406cb1c0 | [
"MIT"
] | 1 | 2022-01-01T15:48:40.000Z | 2022-01-01T15:48:40.000Z | import http.server
import socketserver
PORT = 8000
Handler = http.server.SimpleHTTPRequestHandler
Handler.extensions_map.update(
{".wasm": "application/wasm", ".js": "application/javascript"}
)
socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(("", PORT), Handler) as httpd:
httpd.... | 25.8125 | 66 | 0.745763 |
27bc5d838ac7142dea50d53dfb88eaa050589b39 | 4,315 | py | Python | PTML.py | Qkrisi/PTML-Framework | f46ac98a8653de66b18f5bfd740ec6124232fb6e | [
"MIT"
] | 1 | 2020-12-22T16:16:20.000Z | 2020-12-22T16:16:20.000Z | PTML.py | Qkrisi/PTML-Framework | f46ac98a8653de66b18f5bfd740ec6124232fb6e | [
"MIT"
] | null | null | null | PTML.py | Qkrisi/PTML-Framework | f46ac98a8653de66b18f5bfd740ec6124232fb6e | [
"MIT"
] | null | null | null | from flask import Flask
from html.parser import HTMLParser
from os import path, listdir, remove
from PTML_Constants import *
import PTML_Models
import PTML_Tags
import PTML_Sockets
SelfModule = __import__(__name__)
WSPort = -1
def UpdateAttributes(attributes, Route):
attrib = []
PTML_Models.Element_Model.IDC... | 35.368852 | 194 | 0.616454 |
378a66e086f241189af5bd5f1d5c9f0c65c5da63 | 28,315 | py | Python | SEQA/model_graph/predictor.py | nju-websoft/SR3 | bb602926f8a260887326a812e19e23f50e7eb273 | [
"Apache-2.0"
] | null | null | null | SEQA/model_graph/predictor.py | nju-websoft/SR3 | bb602926f8a260887326a812e19e23f50e7eb273 | [
"Apache-2.0"
] | null | null | null | SEQA/model_graph/predictor.py | nju-websoft/SR3 | bb602926f8a260887326a812e19e23f50e7eb273 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
""" Translator Class and builder """
from __future__ import print_function
import codecs
import os
import math
import torch
import torch.nn.functional as F
from tensorboardX import SummaryWriter
from evaluate import *
from others.util import rouge_results_to_str,tile,test_rouge
from translate.bea... | 45.89141 | 184 | 0.525693 |
6119315885d890395f812e01b4258369ec3f2135 | 3,190 | py | Python | src/commcare_cloud/commands/inventory_lookup/getinventory.py | AliRizvi1/commcare-cloud | 312f6c2ea4e97bdda1ae49aec6d114edf0dedb43 | [
"BSD-3-Clause"
] | null | null | null | src/commcare_cloud/commands/inventory_lookup/getinventory.py | AliRizvi1/commcare-cloud | 312f6c2ea4e97bdda1ae49aec6d114edf0dedb43 | [
"BSD-3-Clause"
] | null | null | null | src/commcare_cloud/commands/inventory_lookup/getinventory.py | AliRizvi1/commcare-cloud | 312f6c2ea4e97bdda1ae49aec6d114edf0dedb43 | [
"BSD-3-Clause"
] | null | null | null | """
Utilities to get server hostname or IP address from an inventory file and group.
"""
from __future__ import absolute_import, print_function
import re
import attr
from ansible.utils.display import Display
from commcare_cloud.commands.terraform.aws import get_default_username
from commcare_cloud.environment.main i... | 31.584158 | 103 | 0.651411 |
ca5bbba5eae6295822b9959db4c70f1f2f36074d | 571 | py | Python | scripts/redballprogram.py | TUPilotsClub/TUTello | 965b236866c34d2444afd4813418131438978e13 | [
"MIT"
] | null | null | null | scripts/redballprogram.py | TUPilotsClub/TUTello | 965b236866c34d2444afd4813418131438978e13 | [
"MIT"
] | null | null | null | scripts/redballprogram.py | TUPilotsClub/TUTello | 965b236866c34d2444afd4813418131438978e13 | [
"MIT"
] | null | null | null | from drone.tello import Tello
from gui.simplegui import SimpleGUI
from video.redballvideo import RedBallVideo
from video.facetrackvideo import FaceTrackVideo
from controller.trackcontroller import TrackController
from controller.tracktelemetry import TrackTelemetry
import sys
if sys.argv[1] != "webcam":
tello = Te... | 30.052632 | 54 | 0.791594 |
49395ed517767a5408bee41e8dec2f02a247579b | 4,185 | py | Python | main/main.py | georgekis/gae-init | 7e1eb0160aa8b971b32e902beceb08fc88aec028 | [
"MIT"
] | 1 | 2015-09-12T10:12:16.000Z | 2015-09-12T10:12:16.000Z | main/main.py | georgekis/gae-init | 7e1eb0160aa8b971b32e902beceb08fc88aec028 | [
"MIT"
] | null | null | null | main/main.py | georgekis/gae-init | 7e1eb0160aa8b971b32e902beceb08fc88aec028 | [
"MIT"
] | null | null | null | # coding: utf-8
import logging
from flask.ext import wtf
import flask
import wtforms
import config
import util
app = flask.Flask(__name__)
app.config.from_object(config)
app.jinja_env.line_statement_prefix = '#'
app.jinja_env.line_comment_prefix = '##'
app.jinja_env.globals.update(
check_form_fields=util.check_... | 28.664384 | 79 | 0.560812 |
b1d4a7e94d8076e1a97811df11c052361ad5385d | 21,827 | py | Python | build/windows/WindowsBuilder.py | szywind/DeepFaceLive | 60d867843c323a810352b1a8ac209912dec0acf2 | [
"MIT"
] | 3 | 2021-12-08T08:59:50.000Z | 2022-02-08T02:54:27.000Z | build/windows/WindowsBuilder.py | SandUhrGucker/DeepFaceLive | a897cbb06ee3511c63f10d9fbf2ccb66c3ee9659 | [
"MIT"
] | 1 | 2022-02-08T01:29:03.000Z | 2022-02-08T01:29:03.000Z | build/windows/WindowsBuilder.py | SandUhrGucker/DeepFaceLive | a897cbb06ee3511c63f10d9fbf2ccb66c3ee9659 | [
"MIT"
] | 1 | 2021-12-14T09:18:15.000Z | 2021-12-14T09:18:15.000Z | import argparse
import os
import shutil
import subprocess
import time
import urllib.request
import zipfile
from datetime import datetime
from pathlib import Path
from typing import List
class WindowsFolderBuilder:
"""
Builds stand-alone portable all-in-one python folder for Windows with the project from scrat... | 38.427817 | 242 | 0.644294 |
ef075eb3181552765348093b97f1e2c8d094f5f2 | 11,279 | py | Python | source code/procon.py | kayamalab/Scratch2.0-Chaser-base | c2074d9a17cdfaddbbfce6b0ba4b66d66b9126f7 | [
"MIT"
] | 1 | 2019-07-30T08:22:07.000Z | 2019-07-30T08:22:07.000Z | source code/procon.py | kayamalab/Scratch2.0-Chaser-base | c2074d9a17cdfaddbbfce6b0ba4b66d66b9126f7 | [
"MIT"
] | null | null | null | source code/procon.py | kayamalab/Scratch2.0-Chaser-base | c2074d9a17cdfaddbbfce6b0ba4b66d66b9126f7 | [
"MIT"
] | 1 | 2020-03-02T03:49:19.000Z | 2020-03-02T03:49:19.000Z | from aiohttp import web
import pyclient as pyclient
import time
import os
import subprocess
class Scratch_ex:
###初期設定
def __init__(self):
self.matrices=0
self.gamestatus=0
self.getreadyok=0
self.port=2009
self.ip="127.0.0.1"
self.teamname="team"
... | 38.893103 | 129 | 0.541715 |
b9858130a8563172ee555916c580b06c99c4ccd8 | 6,400 | py | Python | lisp_shell/kernel.py | lisp/lisp_kernel | 203d77e497111ada93b185ec4c92f38b10c73f13 | [
"BSD-3-Clause"
] | null | null | null | lisp_shell/kernel.py | lisp/lisp_kernel | 203d77e497111ada93b185ec4c92f38b10c73f13 | [
"BSD-3-Clause"
] | null | null | null | lisp_shell/kernel.py | lisp/lisp_kernel | 203d77e497111ada93b185ec4c92f38b10c73f13 | [
"BSD-3-Clause"
] | null | null | null | from ipykernel.kernelbase import Kernel
from pexpect import replwrap, EOF
import pexpect
from subprocess import check_output
import os.path
import re
import signal
import syslog
import pprint
__version__ = '0.0.1'
version_pat = re.compile(r'version (\d+(\.\d+)+)')
from .images import (
extract_image_filenames,... | 36.571429 | 132 | 0.583125 |
86f1ddc9f31ed3deed44c4a255ea5b894d68dfda | 1,725 | py | Python | pythonNotes/samplePgms/db/6_mysql-fetchall.py | itsraghz/TechNotes | 1fa87ec2231fa06f8c780a5399d16a0f5c769c94 | [
"CC0-1.0"
] | null | null | null | pythonNotes/samplePgms/db/6_mysql-fetchall.py | itsraghz/TechNotes | 1fa87ec2231fa06f8c780a5399d16a0f5c769c94 | [
"CC0-1.0"
] | 1 | 2020-02-23T16:48:06.000Z | 2020-02-23T16:48:06.000Z | pythonNotes/samplePgms/db/6_mysql-fetchall.py | itsraghz/TechNotes | 1fa87ec2231fa06f8c780a5399d16a0f5c769c94 | [
"CC0-1.0"
] | 1 | 2020-05-09T17:41:46.000Z | 2020-05-09T17:41:46.000Z | # Ref URL : https://www.tutorialspoint.com/python/python_database_access.htm
# Ref URL : https://stackoverflow.com/questions/3595363/properties-file-in-python-similar-to-java-properties
# Direct URL : https://stackoverflow.com/a/8220790/1001242
# Ref URL: https://docs.python.org/3/library/configparser.html
# Ref URL : ... | 30.803571 | 108 | 0.690435 |
6f0a23c408381c8a4cc5b04dfcd02431bc2619d1 | 7,375 | py | Python | gunpowder/provider_spec.py | riels89/gunpowder | e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4 | [
"MIT"
] | null | null | null | gunpowder/provider_spec.py | riels89/gunpowder | e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4 | [
"MIT"
] | null | null | null | gunpowder/provider_spec.py | riels89/gunpowder | e523b49ca846a9fd46ab6fc0dd1040cc4a4d53b4 | [
"MIT"
] | null | null | null | import math
from gunpowder.coordinate import Coordinate
from gunpowder.array import ArrayKey
from gunpowder.array_spec import ArraySpec
from gunpowder.graph import GraphKey
from gunpowder.graph_spec import GraphSpec
from gunpowder.roi import Roi
from .freezable import Freezable
import logging
import warnings
logger =... | 30.475207 | 85 | 0.582915 |
1af6780a23f278a8683cfd6e26da2d59f0abd4d0 | 789 | py | Python | remote_data/update.py | Erhannis/hackerskeyboard | beb8c6b3b34d1b317662aa4b4050943909cb0855 | [
"Apache-2.0"
] | null | null | null | remote_data/update.py | Erhannis/hackerskeyboard | beb8c6b3b34d1b317662aa4b4050943909cb0855 | [
"Apache-2.0"
] | null | null | null | remote_data/update.py | Erhannis/hackerskeyboard | beb8c6b3b34d1b317662aa4b4050943909cb0855 | [
"Apache-2.0"
] | null | null | null | # Prepare the installable schemata list
# Read each URL and download the IMDF file, and add to the downloadable.json file
# Set homeUrl to the directory that contains the IMDF file.
import requests
import json
listFile = "imdf_list.in"
jsonFile = "downloadable.json"
def appendEntry(jsonOut, url):
# ... | 24.65625 | 82 | 0.642586 |
96d93408bc24f38ce8c6e13ac1426f6c2465b173 | 50 | py | Python | virtual/lib/python3.8/site-packages/bootstrap4/models.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 1,810 | 2015-01-01T02:04:55.000Z | 2020-06-15T01:01:06.000Z | virtual/lib/python3.6/site-packages/bootstrap4/models.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 298 | 2017-05-07T15:20:09.000Z | 2022-03-28T09:01:42.000Z | virtual/lib/python3.6/site-packages/bootstrap4/models.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 752 | 2015-01-05T01:27:20.000Z | 2020-05-25T02:48:35.000Z | # Empty models.py, required file for Django tests
| 25 | 49 | 0.78 |
ea300ccc4ba3361e4c0fe9fcdef1a48430ddf4f7 | 1,820 | py | Python | qa/rpc-tests/disablewallet.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 7 | 2018-01-29T18:47:19.000Z | 2019-06-24T13:48:10.000Z | qa/rpc-tests/disablewallet.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | null | null | null | qa/rpc-tests/disablewallet.py | bitmammoth/kekcoin-segwit | ac5ed108fbe3221a68826108bdc5bef725f98849 | [
"MIT"
] | 17 | 2017-11-20T21:20:03.000Z | 2021-01-31T12:43:54.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Exercise API with -disablewallet.
#
from test_framework.test_framework import KekCoinTestFramework
f... | 37.142857 | 97 | 0.682967 |
6b0bee98a361b1d01fa29e833cb29f653168c4a4 | 510 | py | Python | mt/migrations/0012_auto_20190606_1531.py | JahanviNShah/inmt | 730faf6dcd24536bbffd0ec463c61d3b0a7819cd | [
"MIT"
] | 39 | 2020-04-14T09:41:41.000Z | 2022-02-21T14:32:06.000Z | mt/migrations/0012_auto_20190606_1531.py | JahanviNShah/inmt | 730faf6dcd24536bbffd0ec463c61d3b0a7819cd | [
"MIT"
] | 17 | 2020-05-11T23:44:57.000Z | 2021-02-17T10:53:15.000Z | mt/migrations/0012_auto_20190606_1531.py | JahanviNShah/inmt | 730faf6dcd24536bbffd0ec463c61d3b0a7819cd | [
"MIT"
] | 20 | 2020-04-14T11:22:43.000Z | 2021-11-25T03:57:21.000Z | # Generated by Django 2.2 on 2019-06-06 10:01
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mt', '0011_corpus_helpprovision'),
]
operations = [
migrations.AlterField(
model_name='dockeystro... | 25.5 | 133 | 0.658824 |
4e6c6014734e188c165a9aa73d4bd9f1bbdd372f | 662 | py | Python | hwilib/device_ids.py | gabridome/HWI | 21e4122636497e46a8d5d16c3ee01b25a5238aa8 | [
"MIT"
] | null | null | null | hwilib/device_ids.py | gabridome/HWI | 21e4122636497e46a8d5d16c3ee01b25a5238aa8 | [
"MIT"
] | null | null | null | hwilib/device_ids.py | gabridome/HWI | 21e4122636497e46a8d5d16c3ee01b25a5238aa8 | [
"MIT"
] | null | null | null | # Contains the arrays of device IDs. This is to avoid TREZOR and KeepKey
# library incompatibility.
ledger_device_ids = [
(0x2581, 0x2b7c),
(0x2581, 0x3b7c),
(0x2581, 0x4b7c),
(0x2c97, 0x0001),
(0x2581, 0x1807)]
digita... | 23.642857 | 72 | 0.521148 |
ad4869f9eaedafea590b27ab94dc75072c6f41b8 | 14,456 | py | Python | kubernetes/client/models/v1_stateful_set_status.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | 1 | 2022-02-22T23:10:55.000Z | 2022-02-22T23:10:55.000Z | kubernetes/client/models/v1_stateful_set_status.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | 6 | 2021-09-13T19:03:02.000Z | 2022-03-16T18:56:42.000Z | kubernetes/client/models/v1_stateful_set_status.py | philipp-sontag-by/python | 51c481692ab0d9c71b9dd96342bfa93b721b029d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.23
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 38.344828 | 285 | 0.672454 |
a1739e0998979b4cc02ef9839e5ef1ae64eb5f7c | 12,164 | py | Python | steady_state_analyzer.py | javierron/ChaosETH | 02d145d2452fb4989c336a531e084aa501320ab7 | [
"MIT"
] | null | null | null | steady_state_analyzer.py | javierron/ChaosETH | 02d145d2452fb4989c336a531e084aa501320ab7 | [
"MIT"
] | null | null | null | steady_state_analyzer.py | javierron/ChaosETH | 02d145d2452fb4989c336a531e084aa501320ab7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Filename: steady_state_analyzer.py
import csv, requests, sys, argparse, time, calendar, json, numpy
import iso8601
from datetime import datetime
from prettytable import PrettyTable
import logging
def get_args():
parser = argparse.ArgumentParser(
desc... | 47.330739 | 253 | 0.636139 |
68692c83b1eb213d52d51f8dfd6bdda12f8a6400 | 1,429 | py | Python | PYTHON/pythonDesafios/desafio095.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | PYTHON/pythonDesafios/desafio095.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | PYTHON/pythonDesafios/desafio095.py | Santos1000/Curso-Python | 549223a1633f6f619c87554dd8078cf7841bb1df | [
"MIT"
] | null | null | null | gols = list() # INPUT DE DADOS, FORMATAÇAO E SELECAO DE OBJETO DE LISTA
galera = list()
dados = dict()
while True:
dados.clear()
dados['nome'] = str(input('Nome do jogador(a): '))
dados['partidas'] = int(input(f'Quantas partidas {dados["nome"]} fez: '))
gols.clear()
for n in range(1, dados['parti... | 31.065217 | 77 | 0.550735 |
06e5789eb3ea558e6f5f48b67150ca206be1b83a | 276 | py | Python | application/errors.py | ChrisRx/flask-base | cb6a48aa4ddd1b89d2bcc1c34d327a94ce4bad6d | [
"MIT"
] | 1 | 2015-04-22T00:10:51.000Z | 2015-04-22T00:10:51.000Z | application/errors.py | ChrisRx/flask-base | cb6a48aa4ddd1b89d2bcc1c34d327a94ce4bad6d | [
"MIT"
] | null | null | null | application/errors.py | ChrisRx/flask-base | cb6a48aa4ddd1b89d2bcc1c34d327a94ce4bad6d | [
"MIT"
] | null | null | null | class GeneralError(Exception): pass
class ProcessingError(GeneralError): pass
class DatabaseError(GeneralError): pass
class UploadError(GeneralError): pass
class FatalError(Exception): pass
class StartupError(FatalError): pass
class CredentialsNotFound(FatalError): pass | 39.428571 | 43 | 0.82971 |
90aea98258726efb55e128b22611229c5aa5cbd4 | 211 | py | Python | location.py | AnelMusic/fastapi_communication_example | 4f9012fcbf7cf32847d1c771a835723ad80ebe9f | [
"MIT"
] | null | null | null | location.py | AnelMusic/fastapi_communication_example | 4f9012fcbf7cf32847d1c771a835723ad80ebe9f | [
"MIT"
] | null | null | null | location.py | AnelMusic/fastapi_communication_example | 4f9012fcbf7cf32847d1c771a835723ad80ebe9f | [
"MIT"
] | 1 | 2022-02-10T14:10:52.000Z | 2022-02-10T14:10:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 31 22:01:47 2021
@author: anelmusic
"""
from pydantic import BaseModel
class Location(BaseModel):
continent: str
capital: str
| 15.071429 | 35 | 0.658768 |
d722d33b4b7161fd58cb7b5a1a21ff9ba75b7f65 | 7,465 | py | Python | src/dispatch/database.py | Liamvdv/dispatch | 6c1c9cf46bdba468fa48fb66ffffd6b7356e8de5 | [
"Apache-2.0"
] | 1 | 2020-11-19T08:37:05.000Z | 2020-11-19T08:37:05.000Z | src/dispatch/database.py | segmond/dispatch | ab69505334d4689537c7ea0c4d66f6438a6c33b5 | [
"Apache-2.0"
] | null | null | null | src/dispatch/database.py | segmond/dispatch | ab69505334d4689537c7ea0c4d66f6438a6c33b5 | [
"Apache-2.0"
] | null | null | null | import re
import logging
import json
from typing import Any, List
from itertools import groupby
import functools
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base, declared_attr
from sqlalchemy.orm import Query, sessionmaker
from sqlalchemy_filters import apply_pagination, ap... | 31.901709 | 91 | 0.636035 |
65724bacbace96ebf07488e3e137ade94e9bf7e2 | 797 | py | Python | PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | PyInstaller/hooks/hook-scipy.spatial.transform.rotation.py | BearerPipelineTest/pyinstaller | 0de9d6cf1701689c53161610acdab143a76d40b5 | [
"Apache-2.0"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2021-2022, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | 44.277778 | 113 | 0.621079 |
289c17ed0b97c39fe81a231569c10db06fd1c4ef | 1,357 | py | Python | scripts/split.py | mdraw/newsgeneratorbot | 7cceab9fe59ee2dec525a4ff6820a313329c6f69 | [
"MIT"
] | null | null | null | scripts/split.py | mdraw/newsgeneratorbot | 7cceab9fe59ee2dec525a4ff6820a313329c6f69 | [
"MIT"
] | null | null | null | scripts/split.py | mdraw/newsgeneratorbot | 7cceab9fe59ee2dec525a4ff6820a313329c6f69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import os
import random
parser = argparse.ArgumentParser()
parser.add_argument('input', help='File name of the text to split.')
parser.add_argument(
'--ratio',
help='Ratio of training/validation lines',
type=float,
default=0.9)
parser.add_argument('--quiet', acti... | 27.14 | 75 | 0.635225 |
f94e25b2b28cb198766a1b22768f98baa37e5fbf | 26,130 | py | Python | corus/sources/meta.py | natasha/corus | 1bf01284628585b56723b4d024367f88886fb3e5 | [
"MIT"
] | 205 | 2019-05-01T07:38:01.000Z | 2022-03-30T04:02:54.000Z | corus/sources/meta.py | trnkv/corus | 1bf01284628585b56723b4d024367f88886fb3e5 | [
"MIT"
] | 78 | 2019-04-29T06:53:53.000Z | 2021-09-20T14:51:25.000Z | corus/sources/meta.py | trnkv/corus | 1bf01284628585b56723b4d024367f88886fb3e5 | [
"MIT"
] | 18 | 2019-06-19T09:56:10.000Z | 2022-01-30T14:55:14.000Z |
from corus.record import Record
from . import (
load_mokoron,
load_wiki,
load_simlex,
load_omnia,
load_gramru,
load_corpora,
load_ruadrect,
load_factru,
load_gareev,
load_lenta,
load_lenta2,
load_librusec,
load_ne5,
load_wikiner,
load_bsnlp,
load_person... | 30.850059 | 152 | 0.487218 |
69b0c71d3bb8f4cf67474c55884300e34280ea53 | 1,710 | py | Python | stubs.min/System/Windows/__init___parts/DynamicResourceExtensionConverter.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/System/Windows/__init___parts/DynamicResourceExtensionConverter.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/System/Windows/__init___parts/DynamicResourceExtensionConverter.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class DynamicResourceExtensionConverter(TypeConverter):
"""
Converts from parsed XAML to System.Windows.DynamicResourceExtension and supports dynamic resource references made from XAML.
DynamicResourceExtensionConverter()
"""
def CanConvertTo(self,*__args):
"""
CanConvertTo(self: DynamicResourceExt... | 39.767442 | 153 | 0.74386 |
0e5bf6a2eec1f5a78a6dd1060921eb046ccf37ea | 3,076 | py | Python | main.py | SynimSelimi/HorspoolAlgorithm | c20fda244529800b90338f4283cb1a66ca2b1261 | [
"MIT"
] | null | null | null | main.py | SynimSelimi/HorspoolAlgorithm | c20fda244529800b90338f4283cb1a66ca2b1261 | [
"MIT"
] | null | null | null | main.py | SynimSelimi/HorspoolAlgorithm | c20fda244529800b90338f4283cb1a66ca2b1261 | [
"MIT"
] | null | null | null | samples = [{
"text": "Nëse kërkesat e absurdit nuk respektohen në vepër, nëse ajo nuk ilustron divorcin dhe revoltën, nëse ajo u bën lëshime iluzioneve dhe ngjall shpresë, ajo nuk është më e padobi. Nuk mund të shkëputem më prej saj.",
"pattern": "lëshime iluzioneve",
"asserts": True
},
{
"text": "Tani që kisht... | 32.378947 | 253 | 0.676853 |
a60fe1b9b27ad6baf98a5edb4b1f6cbfa28fede0 | 2,415 | py | Python | src/pyAnalytics/gui_raman_maps/raman_pca_window.py | AlexanderSouthan/pyAnalytics | 18038b2cda75a99280d3cdd68d61e601eefa0fe0 | [
"MIT"
] | null | null | null | src/pyAnalytics/gui_raman_maps/raman_pca_window.py | AlexanderSouthan/pyAnalytics | 18038b2cda75a99280d3cdd68d61e601eefa0fe0 | [
"MIT"
] | null | null | null | src/pyAnalytics/gui_raman_maps/raman_pca_window.py | AlexanderSouthan/pyAnalytics | 18038b2cda75a99280d3cdd68d61e601eefa0fe0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PyQt5.QtWidgets import (QMainWindow, QComboBox, QWidget, QGridLayout,
QDesktopWidget, QLabel, QVBoxLayout,
QPushButton, QHBoxLayout)
class raman_pca_window(QMainWindow):
def __init__(self, raman_data):
self.update_data... | 37.153846 | 76 | 0.684886 |
ab7fbb0bb53a8246dc943735adfc8f5a753e4255 | 745 | py | Python | databases/schemas.py | MichaelLan/PracticeFastAPI | aa7fe2167e73b4ab7c2f288db1ae93fd696083f8 | [
"MIT"
] | null | null | null | databases/schemas.py | MichaelLan/PracticeFastAPI | aa7fe2167e73b4ab7c2f288db1ae93fd696083f8 | [
"MIT"
] | null | null | null | databases/schemas.py | MichaelLan/PracticeFastAPI | aa7fe2167e73b4ab7c2f288db1ae93fd696083f8 | [
"MIT"
] | null | null | null | from pydantic import BaseModel, Field
class UserBase(BaseModel):
username: str = Field(..., title='username')
name: str = Field(..., title='Nombre')
email: str = Field(..., title='Correo electrónico', regex='^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})$')
group_id: int = Field(..., title=... | 19.102564 | 123 | 0.601342 |
92fd25fae7251901496169053d15fb8bc6d30a24 | 399 | py | Python | eodashboard/eodashboard/wsgi.py | ArkaprabhaChakraborty/EarthObservationDashboard | 9b1e6d95b24edcf99533ba279b0d95b776be185c | [
"MIT"
] | null | null | null | eodashboard/eodashboard/wsgi.py | ArkaprabhaChakraborty/EarthObservationDashboard | 9b1e6d95b24edcf99533ba279b0d95b776be185c | [
"MIT"
] | null | null | null | eodashboard/eodashboard/wsgi.py | ArkaprabhaChakraborty/EarthObservationDashboard | 9b1e6d95b24edcf99533ba279b0d95b776be185c | [
"MIT"
] | 1 | 2022-03-04T09:13:01.000Z | 2022-03-04T09:13:01.000Z | """
WSGI config for eodashboard project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
55c65ff0f9718cb25373c89631c6e56161db1730 | 10,052 | py | Python | Lab_Dash/models.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | Lab_Dash/models.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | Lab_Dash/models.py | SimonSchubotz/Electronic-Laboratory-Notebook | a5dc3daa76b07370c1ee5b7e74fb6c780c3d3c97 | [
"Apache-2.0"
] | null | null | null | from django.db import models
from datetime import datetime
# Create your models here.
class OCA(models.Model):
"""OCA Saves all dash properties of the OCA measurements
Parameters
----------
models : [type]
[description]
"""
Name = models.TextField(unique=True, blank=True, null=True... | 40.532258 | 154 | 0.679467 |
4c7138b0d464134b2ae4023c02248128887296a4 | 5,365 | py | Python | tests/components/deconz/test_lock.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/deconz/test_lock.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/deconz/test_lock.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """deCONZ lock platform tests."""
from unittest.mock import patch
from openpeerpower.components.lock import (
DOMAIN as LOCK_DOMAIN,
SERVICE_LOCK,
SERVICE_UNLOCK,
)
from openpeerpower.const import (
ATTR_ENTITY_ID,
STATE_LOCKED,
STATE_UNAVAILABLE,
STATE_UNLOCKED,
)
from .test_gateway impo... | 29.478022 | 83 | 0.594781 |
48a26689d5cc1fd3a0d956b83720eaaf69d4966e | 18,282 | py | Python | scripts/tse.py | aassumpcao/tseresearch | 8c46a81fddee1f2a18b35a28a32dfe0a1f294750 | [
"MIT"
] | null | null | null | scripts/tse.py | aassumpcao/tseresearch | 8c46a81fddee1f2a18b35a28a32dfe0a1f294750 | [
"MIT"
] | 1 | 2019-07-09T20:37:06.000Z | 2019-07-09T20:37:06.000Z | scripts/tse.py | aassumpcao/tseresearch | 8c46a81fddee1f2a18b35a28a32dfe0a1f294750 | [
"MIT"
] | null | null | null | ### tse classes and methods
# developed by:
# Andre Assumpcao
# andre.assumpcao@gmail.com
# import standard libraries
import codecs
import math
import os
import re
import time
# import third-party libraries
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.common.exceptions import (
NoSuc... | 34.235955 | 79 | 0.58079 |
b6acef5a6cec12d411cc6506677183b2c43a63a3 | 2,659 | py | Python | roles/openshift_health_checker/test/ovs_version_test.py | KoteikinyDrova/openshift-ansible | 3db2bb10c0ad5e7ed702bfccdec03562533e8539 | [
"Apache-2.0"
] | 1 | 2019-03-13T10:14:35.000Z | 2019-03-13T10:14:35.000Z | roles/openshift_health_checker/test/ovs_version_test.py | KoteikinyDrova/openshift-ansible | 3db2bb10c0ad5e7ed702bfccdec03562533e8539 | [
"Apache-2.0"
] | 1 | 2021-09-23T23:36:29.000Z | 2021-09-23T23:36:29.000Z | roles/openshift_health_checker/test/ovs_version_test.py | KoteikinyDrova/openshift-ansible | 3db2bb10c0ad5e7ed702bfccdec03562533e8539 | [
"Apache-2.0"
] | 4 | 2018-10-27T00:29:24.000Z | 2022-01-07T07:39:51.000Z | import pytest
from openshift_checks.ovs_version import OvsVersion, OpenShiftCheckException
def test_openshift_version_not_supported():
def execute_module(*_):
return {}
openshift_release = '111.7.0'
task_vars = dict(
openshift=dict(common=dict(service_type='origin')),
openshift_... | 30.563218 | 93 | 0.668296 |
3f580dde470f2245e8ee507d4b55a7ef25538f22 | 1,128 | py | Python | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_operations.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | 10,024 | 2015-01-01T13:06:43.000Z | 2022-03-31T12:45:25.000Z | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_operations.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | 3,191 | 2015-01-01T18:13:11.000Z | 2022-03-31T22:06:00.000Z | venv/Lib/site-packages/networkx/algorithms/tree/tests/test_operations.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | 3,272 | 2015-01-01T05:04:53.000Z | 2022-03-31T17:46:35.000Z | """Unit tests for the :mod:`networkx.algorithms.tree.operations` module.
"""
import networkx as nx
from networkx.utils import nodes_equal, edges_equal
class TestJoin:
"""Unit tests for the :func:`networkx.tree.join` function."""
def test_empty_sequence(self):
"""Tests that joining the empty sequenc... | 29.684211 | 73 | 0.609043 |
ddd3b35cf94592edb9a7321bb83b41ff4d23626a | 4,542 | py | Python | support_functions/compute_mAP.py | piyalong/TAMIDS_Traffic_Management | 0dfa3e6ae2ae018a469b5719468021888c5d3ca2 | [
"MIT"
] | null | null | null | support_functions/compute_mAP.py | piyalong/TAMIDS_Traffic_Management | 0dfa3e6ae2ae018a469b5719468021888c5d3ca2 | [
"MIT"
] | null | null | null | support_functions/compute_mAP.py | piyalong/TAMIDS_Traffic_Management | 0dfa3e6ae2ae018a469b5719468021888c5d3ca2 | [
"MIT"
] | null | null | null | import numpy as np
def iou (boxes1, boxes2):
'''
boxes1: m x 4 numpy array
boxes2: n x 4 numpy array
'''
boxes1 = np.array(boxes1, dtype='float32')
boxes2 = np.array(boxes2, dtype='float32')
m = boxes1.shape[0] # number of boxes1
n = boxes2.shape[0] # number of boxes2
boxe... | 33.153285 | 85 | 0.549317 |
848ce1334fc63df1de6c30f5dcd1f0a397f8083e | 153 | py | Python | docassemble_base/docassemble/base/rtfng/exceptions.py | amsclark/docassemble | ae5c194831faabb52681a6c827ec30c106273eb7 | [
"MIT"
] | 5 | 2015-01-27T08:08:08.000Z | 2022-03-30T10:43:31.000Z | docassemble_base/docassemble/base/rtfng/exceptions.py | amsclark/docassemble | ae5c194831faabb52681a6c827ec30c106273eb7 | [
"MIT"
] | null | null | null | docassemble_base/docassemble/base/rtfng/exceptions.py | amsclark/docassemble | ae5c194831faabb52681a6c827ec30c106273eb7 | [
"MIT"
] | 4 | 2015-12-11T07:41:24.000Z | 2022-03-30T09:48:55.000Z | """
pyrtf-ng Errors and Exceptions
"""
class RTFError(Exception):
pass
class ParseError(RTFError):
"""
Unable to parse the RTF data.
"""
| 11.769231 | 32 | 0.640523 |
2ae16b5db00ad76f88b85a2b42480ce6ae441da9 | 140 | py | Python | peeros/peeros.py | crioto/guardian | 386f3f7959e7abf73fddfc62907abb8b308f6ce6 | [
"Apache-2.0"
] | null | null | null | peeros/peeros.py | crioto/guardian | 386f3f7959e7abf73fddfc62907abb8b308f6ce6 | [
"Apache-2.0"
] | null | null | null | peeros/peeros.py | crioto/guardian | 386f3f7959e7abf73fddfc62907abb8b308f6ce6 | [
"Apache-2.0"
] | null | null | null | from guardlib import check as t
from peeros import agent_installed
t.RegisterCheck(agent_installed.Check, "Checking Subutai Installation") | 35 | 71 | 0.842857 |
e014ca208c3bf0d84d2b37fa760e5632df2d4411 | 9,889 | py | Python | uhppote_rfid/controller_socket.py | andrewvaughan/rfid | ff6e78074a3030dbb43b40fa47198f28e38b6026 | [
"Apache-2.0"
] | 6 | 2017-12-06T21:36:05.000Z | 2022-01-10T11:25:44.000Z | uhppote_rfid/controller_socket.py | andrewvaughan/uhppote-rfid | ff6e78074a3030dbb43b40fa47198f28e38b6026 | [
"Apache-2.0"
] | 33 | 2017-09-16T19:01:47.000Z | 2017-12-05T16:15:17.000Z | uhppote_rfid/controller_socket.py | andrewvaughan/rfid | ff6e78074a3030dbb43b40fa47198f28e38b6026 | [
"Apache-2.0"
] | 3 | 2018-01-08T19:05:33.000Z | 2020-09-24T12:58:04.000Z | # -*- coding: utf-8 -*-
"""
Provides socket and communication support for UHPPOTE RFID control boards.
:copyright: (c) 2017 by Andrew Vaughan.
:license: Apache 2.0, see LICENSE for more details.
.. module:: ControllerSocket
"""
import logging
import re
import socket
class ControllerSocket(object):
"""
... | 31.195584 | 142 | 0.586713 |
22a1cdaf5496c0529186c45471bff77025a7eb64 | 1,150 | py | Python | cleaner20200517.py | superlova/WeatherSpider | fa8ed79f780d8ef065a41208ed7e80f94581fac4 | [
"MIT"
] | 1 | 2020-05-26T01:51:13.000Z | 2020-05-26T01:51:13.000Z | cleaner20200517.py | superlova/WeatherSpider | fa8ed79f780d8ef065a41208ed7e80f94581fac4 | [
"MIT"
] | null | null | null | cleaner20200517.py | superlova/WeatherSpider | fa8ed79f780d8ef065a41208ed7e80f94581fac4 | [
"MIT"
] | null | null | null | import pymysql
def connect_sql():
conn = pymysql.connect(host='localhost', user='root', password='xn410a', db='zyt_spiders', charset='utf8')
return conn
def delete_old_items(conn, table_name, time):
cursor = conn.cursor()
sql = 'delete from {} where record_time < "{}";'.format(table_name, time)
#p... | 34.848485 | 110 | 0.568696 |
acb28bfe73ee9b94496cc101fa7c765014855c4e | 163 | py | Python | PyPortal_NeoPixel_Color_Picker/secrets.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 665 | 2017-09-27T21:20:14.000Z | 2022-03-31T09:09:25.000Z | PyPortal_NeoPixel_Color_Picker/secrets.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 641 | 2017-10-03T19:46:37.000Z | 2022-03-30T18:28:46.000Z | PyPortal_NeoPixel_Color_Picker/secrets.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | 734 | 2017-10-02T22:47:38.000Z | 2022-03-30T14:03:51.000Z | # This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it
secrets = {
}
| 27.166667 | 73 | 0.723926 |
03421233341f21e8b5b50f7bb6921e54b5610889 | 1,230 | py | Python | lab_6/GSDLabs-master/lab_5/boards/views.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | lab_6/GSDLabs-master/lab_5/boards/views.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | lab_6/GSDLabs-master/lab_5/boards/views.py | jennifernolan/Software-for-the-Global-Market | 9a219dd0c0ceb284b3458cd7ad3fe103859fbfe8 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.shortcuts import render, redirect, get_object_or_404
from .forms import NewTopicForm
from .models import Board, Topic, Post
def home(request):
boards = Board.objects.all()
#Return the page home.html
return render(request, 'home.html', {'boards': boards})
... | 38.4375 | 100 | 0.635772 |
9f9ab3f3193c9f62980d69cad064630cc878980d | 11,221 | py | Python | django/app/views.py | b3j0f/debate | a77b61a917bb7a2ebfbc16d28211fcb1634089b8 | [
"MIT"
] | 1 | 2017-05-04T13:50:54.000Z | 2017-05-04T13:50:54.000Z | django/app/views.py | b3j0f/debate | a77b61a917bb7a2ebfbc16d28211fcb1634089b8 | [
"MIT"
] | null | null | null | django/app/views.py | b3j0f/debate | a77b61a917bb7a2ebfbc16d28211fcb1634089b8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""View module."""
from __future__ import unicode_literals
from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.conf import settings
from django.contrib.auth import authenticate, login, logout
from core.models import Account, Topic, Space, Vote, Stat, E... | 28.552163 | 78 | 0.586935 |
992ceaaf4fc3d8f4dd9582df934865feb62b5aa4 | 29,527 | py | Python | ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 25 | 2019-12-04T03:09:55.000Z | 2022-03-08T10:52:06.000Z | ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 29 | 2019-12-04T03:00:39.000Z | 2022-03-02T06:25:44.000Z | ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 33 | 2019-12-04T02:51:30.000Z | 2022-03-24T02:47:38.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 use this ... | 50.733677 | 175 | 0.800623 |
2ad7a8d02f5752d4fb18d3e9353f2f7a113fa3ac | 1,556 | py | Python | code/main.py | xp-soaring/cambridge_coffee_pot | 477864aa3a0c0a2d31c2c18342e804109b2e9bbf | [
"Apache-2.0"
] | null | null | null | code/main.py | xp-soaring/cambridge_coffee_pot | 477864aa3a0c0a2d31c2c18342e804109b2e9bbf | [
"Apache-2.0"
] | null | null | null | code/main.py | xp-soaring/cambridge_coffee_pot | 477864aa3a0c0a2d31c2c18342e804109b2e9bbf | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------
#
# Python script to run sensor
#
# -------------------------------------------------------------------
import sys
import time
from sensor import Sensor
from config import Config
from sensor_utils import list_to_string
VERSION = "0.40"
# loads ... | 23.938462 | 94 | 0.410668 |
1454fd34d81a22aa5beb414059aa9947287e24a9 | 1,266 | py | Python | setup.py | careyrp/github-pr-stats | fa8ac73682d428279ec8dd60093e0d2a7f7ed4fd | [
"WTFPL"
] | 63 | 2015-06-08T14:49:41.000Z | 2022-02-25T22:30:29.000Z | setup.py | careyrp/github-pr-stats | fa8ac73682d428279ec8dd60093e0d2a7f7ed4fd | [
"WTFPL"
] | 6 | 2015-01-30T20:49:26.000Z | 2020-04-20T13:03:12.000Z | setup.py | careyrp/github-pr-stats | fa8ac73682d428279ec8dd60093e0d2a7f7ed4fd | [
"WTFPL"
] | 19 | 2015-04-20T18:34:56.000Z | 2021-05-10T19:26:46.000Z | #!/usr/bin/env python
import os
from distutils.core import setup
from github_pr_stats import VERSION
# I really prefer Markdown to reStructuredText. PyPi does not. This allows me
# to have things how I'd like, but not throw complaints when people are trying
# to install the package and they don't have pypandoc or t... | 28.772727 | 79 | 0.655608 |
151cd9dfcc6506351f7c8150cd392262066402b4 | 4,733 | py | Python | cysecuretools/execute/key_reader.py | cypresssemiconductorco/cysecuretools | f27b6a7a5d5829427d746bac046c496bfe2b5898 | [
"Apache-2.0"
] | 9 | 2019-09-16T19:33:20.000Z | 2020-11-05T00:56:20.000Z | cysecuretools/execute/key_reader.py | Infineon/cysecuretools | f27b6a7a5d5829427d746bac046c496bfe2b5898 | [
"Apache-2.0"
] | 1 | 2021-04-16T08:17:16.000Z | 2021-05-21T05:55:58.000Z | cysecuretools/execute/key_reader.py | Infineon/cysecuretools | f27b6a7a5d5829427d746bac046c496bfe2b5898 | [
"Apache-2.0"
] | 1 | 2019-10-03T17:24:24.000Z | 2019-10-03T17:24:24.000Z | """
Copyright (c) 2020 Cypress Semiconductor Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed ... | 33.567376 | 78 | 0.60469 |
2ffdf3c78b080cfb6f9c92b5515620e2a492537c | 199 | py | Python | setup.py | sepandhaghighi/cyjson | 3b7388f56e5db29b4fe3909de8d014eae8a03e0f | [
"MIT"
] | null | null | null | setup.py | sepandhaghighi/cyjson | 3b7388f56e5db29b4fe3909de8d014eae8a03e0f | [
"MIT"
] | null | null | null | setup.py | sepandhaghighi/cyjson | 3b7388f56e5db29b4fe3909de8d014eae8a03e0f | [
"MIT"
] | 1 | 2020-07-13T03:54:17.000Z | 2020-07-13T03:54:17.000Z | from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
setup(
ext_modules = cythonize([Extension("cyj", ["cyj.pyx","./cJSON/cJSON.c"])])
)
| 24.875 | 78 | 0.748744 |
2c9512c531ded0b3229842c2530801017ab19b4c | 3,728 | py | Python | mechroutines/models/_symm.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechroutines/models/_symm.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | null | null | null | mechroutines/models/_symm.py | keceli/mechdriver | 978994ba5c77b6df00078b639c4482dacf269440 | [
"Apache-2.0"
] | 8 | 2019-12-18T20:09:46.000Z | 2020-11-14T16:37:28.000Z | """ Handle symmetry factor stuff
"""
import automol
from autofile import fs
from mechlib.amech_io import printer as ioprinter
def symmetry_factor(pf_filesystems, spc_mod_dct_i, spc_dct_i, rotors,
grxn=None, zma=None):
""" Determines the the overall (internal and external) symmetry factor for
... | 38.040816 | 79 | 0.60515 |
7d8cf4d58e0d5529cfe9f0bf6c80cd0860e5ce79 | 553 | py | Python | env/lib/python3.8/site-packages/plotly/validators/sunburst/hoverlabel/font/_size.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/sunburst/hoverlabel/font/_size.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/sunburst/hoverlabel/font/_size.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class SizeValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(
self, plotly_name="size", parent_name="sunburst.hoverlabel.font", **kwargs
):
super(SizeValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | 32.529412 | 82 | 0.614828 |
4fbdc0b92df7cd9ee7d6feb1f946f90797bd250b | 583 | py | Python | Ago-Dic-2019/ERIK EDUARDO MONTOYA MARTINEZ/PRACTICA 1/CAPITULO 3/YouOwnList.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2019/ERIK EDUARDO MONTOYA MARTINEZ/PRACTICA 1/CAPITULO 3/YouOwnList.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2019/ERIK EDUARDO MONTOYA MARTINEZ/PRACTICA 1/CAPITULO 3/YouOwnList.py | Arbupa/DAS_Sistemas | 52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1 | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | Automoviles=['Dodge Challeger', 'VW Gti', 'Jeep Rubicon', 'Alfa Romeo Quadro', 'Ford ST', 'Dodge RAM', 'Ford FX4']
M1="Me gustaria compar un " + Automoviles[0].title()+"."
M2="Mi vecino choco su nuevo " + Automoviles[1].title() + "."
M3="El nuevo " + Automoviles[2].title()+ " es mucho mas economico."
M4="Hay una gran d... | 41.642857 | 124 | 0.653516 |
68ef67261ce9d4e7339e07eb0166c130725e01f4 | 101 | py | Python | venv/lib/python2.7/_abcoll.py | ubcmist/DeployedModel | d254f998f1d2fc96f4ed9049bff04424e874c943 | [
"MIT"
] | null | null | null | venv/lib/python2.7/_abcoll.py | ubcmist/DeployedModel | d254f998f1d2fc96f4ed9049bff04424e874c943 | [
"MIT"
] | 40 | 2019-05-04T04:46:31.000Z | 2022-02-26T10:37:51.000Z | venv/lib/python2.7/_abcoll.py | ubcmist/DeployedModel | d254f998f1d2fc96f4ed9049bff04424e874c943 | [
"MIT"
] | null | null | null | /usr/local/Cellar/python@2/2.7.15_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_abcoll.py | 101 | 101 | 0.811881 |
eaba70868f481c11c06509971f2d498e367b5fad | 26,535 | py | Python | bauh/gems/snap/controller.py | DN-debug/bauh | 83aeccae87d7fe26f6c5bf24be005288d5d54d84 | [
"Zlib"
] | null | null | null | bauh/gems/snap/controller.py | DN-debug/bauh | 83aeccae87d7fe26f6c5bf24be005288d5d54d84 | [
"Zlib"
] | null | null | null | bauh/gems/snap/controller.py | DN-debug/bauh | 83aeccae87d7fe26f6c5bf24be005288d5d54d84 | [
"Zlib"
] | null | null | null | import re
import time
import traceback
from threading import Thread
from typing import List, Set, Type, Optional, Tuple
from bauh.api.abstract.controller import SoftwareManager, SearchResult, ApplicationContext, UpgradeRequirements, \
TransactionResult, SoftwareAction
from bauh.api.abstract.disk import DiskCacheLo... | 50.160681 | 196 | 0.566723 |
cb547a246bc3d51050b68ca3440223860830862e | 7,325 | py | Python | kubernetes_asyncio/client/models/v1beta1_custom_resource_definition_condition.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_custom_resource_definition_condition.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1beta1_custom_resource_definition_condition.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1beta1Cus... | 31.9869 | 125 | 0.6243 |
e7031f2375ce2016636f2a483e15e759eff2d0de | 7,448 | py | Python | thirdweb/core/sdk.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 30 | 2021-10-31T13:17:58.000Z | 2022-02-04T13:41:13.000Z | thirdweb/core/sdk.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 36 | 2021-11-03T20:30:38.000Z | 2022-02-14T10:15:40.000Z | thirdweb/core/sdk.py | nftlabs/nftlabs-sdk-python | ea533142dc0881872b347cd8ce635dc0bfff3153 | [
"Apache-2.0"
] | 10 | 2021-11-10T19:59:41.000Z | 2022-01-21T21:26:55.000Z | from eth_account import Account
from thirdweb.abi.thirdweb_contract import ThirdwebContract
from thirdweb.common.feature_detection import (
fetch_contract_metadata_from_address,
)
from thirdweb.constants.urls import get_provider_for_network
from thirdweb.contracts import Marketplace
from thirdweb.contracts.custom i... | 31.033333 | 87 | 0.646079 |
800fd44b1e59e239943b5c532dfba1595d4fbf96 | 423 | py | Python | tests/metadata/latest/test_template.py | OpenEnergyPlatform/metadata | b4e10fa57de1a45e7c866df6605015cad0b54957 | [
"MIT"
] | 2 | 2020-05-06T17:20:10.000Z | 2020-05-06T17:20:34.000Z | tests/metadata/latest/test_template.py | OpenEnergyPlatform/metadata | b4e10fa57de1a45e7c866df6605015cad0b54957 | [
"MIT"
] | 21 | 2019-10-31T16:26:59.000Z | 2020-05-13T15:12:41.000Z | tests/metadata/latest/test_template.py | OpenEnergyPlatform/metadata | b4e10fa57de1a45e7c866df6605015cad0b54957 | [
"MIT"
] | null | null | null | def test_if_template_json_loads_successfully():
from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE
def test_template_against_schema_which_should_succeed():
import jsonschema
from metadata.latest.template import OEMETADATA_LATEST_TEMPLATE
from metadata.latest.schema import OEMETADATA_LATES... | 38.454545 | 92 | 0.8487 |
cbf93a6145c3836d313033b4e03e9cd1c06403d4 | 7,543 | py | Python | p1/eightpuzzle.py | Mewzyk/stephen_AI | 9e1cc920619581318c35959a3d888808edf6f959 | [
"MIT"
] | 1 | 2018-01-09T21:53:58.000Z | 2018-01-09T21:53:58.000Z | p1/eightpuzzle.py | Mewzyk/stephen_AI | 9e1cc920619581318c35959a3d888808edf6f959 | [
"MIT"
] | null | null | null | p1/eightpuzzle.py | Mewzyk/stephen_AI | 9e1cc920619581318c35959a3d888808edf6f959 | [
"MIT"
] | null | null | null | # eightpuzzle.py
# --------------
# Licensing Information: Please do not distribute or publish solutions to this
# project. You are free to use and extend these projects for educational
# purposes. The Pacman AI projects were developed at UC Berkeley, primarily by
# John DeNero (denero@cs.berkeley.edu) and Dan Klein (k... | 27.32971 | 95 | 0.592602 |
63c38a70ce4e15c40d02e5f6461b08549020771a | 2,456 | py | Python | openstack/tests/unit/identity/v3/test_trust.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 99 | 2018-03-28T15:41:45.000Z | 2022-01-23T17:22:13.000Z | openstack/tests/unit/identity/v3/test_trust.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 5 | 2018-05-25T16:54:23.000Z | 2021-11-21T02:27:16.000Z | openstack/tests/unit/identity/v3/test_trust.py | NeCTAR-RC/openstacksdk | 60a24f6c4717a1f9a0e545c9a07e68afaedc5a27 | [
"Apache-2.0"
] | 104 | 2018-04-06T14:33:54.000Z | 2022-03-01T01:58:09.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 38.984127 | 79 | 0.690147 |
d996ebeb6dd7dd2012acd0d8518dc8925bf8cc38 | 2,674 | py | Python | onnx2keras/padding_layers.py | mxz297/onnx2keras | 934cf9783b4910c601bb6a7af5c684e0f13d0933 | [
"MIT"
] | 2 | 2021-04-09T04:02:21.000Z | 2022-01-25T17:50:50.000Z | onnx2keras/padding_layers.py | mxz297/onnx2keras | 934cf9783b4910c601bb6a7af5c684e0f13d0933 | [
"MIT"
] | 4 | 2021-03-19T20:12:41.000Z | 2022-01-25T17:43:36.000Z | onnx2keras/padding_layers.py | mxz297/onnx2keras | 934cf9783b4910c601bb6a7af5c684e0f13d0933 | [
"MIT"
] | 2 | 2021-03-17T13:21:01.000Z | 2021-03-19T15:50:51.000Z | from tensorflow import keras
import logging
from .utils import ensure_tf_type
def convert_padding(node, params, layers, node_name, keras_name):
"""
Convert Constant layer
:param node: current operation node
:param params: operation attributes
:param layers: available keras layers
:param node_n... | 37.661972 | 124 | 0.566193 |
d5245be656f76d2dad1df4dc74c990adbac8b1c1 | 134 | py | Python | python/inspectory.py | glennkentwell/code | 874827791b13682b5ae4203fd1a9dcf1b33cc7b3 | [
"Unlicense"
] | null | null | null | python/inspectory.py | glennkentwell/code | 874827791b13682b5ae4203fd1a9dcf1b33cc7b3 | [
"Unlicense"
] | null | null | null | python/inspectory.py | glennkentwell/code | 874827791b13682b5ae4203fd1a9dcf1b33cc7b3 | [
"Unlicense"
] | null | null | null | #!/usr/bin/python
import inspect as i
def ii(obj):
for p in dir(obj):
print p
i.getdoc(obj.__getattribute__(p))
| 14.888889 | 41 | 0.604478 |
9b1f50c67f724d7cd2c8e54a4ed4d9fe72ec4337 | 319 | py | Python | setup.py | gatoravi/guesswho | 68c3213c50709968ba5f172ae080e414101efc02 | [
"MIT"
] | null | null | null | setup.py | gatoravi/guesswho | 68c3213c50709968ba5f172ae080e414101efc02 | [
"MIT"
] | null | null | null | setup.py | gatoravi/guesswho | 68c3213c50709968ba5f172ae080e414101efc02 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='guesswho',
version='0.1',
description='Infer location based on tweets.',
url='http://github.com/gatoravi/guesswho',
author='Avi Ramu',
author_email='avinash3003@yahoo.co.in',
license='MIT',
packages=['guesswho'],
zip_safe=False)
| 26.583333 | 52 | 0.639498 |
ba5ecf460a43519b032abce97923ffcf7b598153 | 13,988 | py | Python | moonv4/moon_utilities/moon_utilities/exceptions.py | hashnfv/hashnfv-moon | daaba34fa2ed4426bc0fde359e54a5e1b872208c | [
"Apache-2.0"
] | null | null | null | moonv4/moon_utilities/moon_utilities/exceptions.py | hashnfv/hashnfv-moon | daaba34fa2ed4426bc0fde359e54a5e1b872208c | [
"Apache-2.0"
] | null | null | null | moonv4/moon_utilities/moon_utilities/exceptions.py | hashnfv/hashnfv-moon | daaba34fa2ed4426bc0fde359e54a5e1b872208c | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
# This software is distributed under the terms and conditions of the 'Apache-2.0'
# license which can be found in the file 'LICENSE' in this package distribution
# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
from oslo_log import log as l... | 25.808118 | 87 | 0.676937 |
3cb1b7ddb69bc45282b9dbb532ebaaaccf5408e7 | 18,186 | py | Python | discpy/invite.py | AryamanSrii/DiscPy | 0ba89da9ca184f0dfaebeedd4e9b7bc3099a0353 | [
"MIT"
] | null | null | null | discpy/invite.py | AryamanSrii/DiscPy | 0ba89da9ca184f0dfaebeedd4e9b7bc3099a0353 | [
"MIT"
] | null | null | null | discpy/invite.py | AryamanSrii/DiscPy | 0ba89da9ca184f0dfaebeedd4e9b7bc3099a0353 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2021 The DiscPy Developers
Copyright (c) 2015-2021 Rapptz
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... | 34.706107 | 103 | 0.584351 |
d1dfc34c725ca6bb2ed614df2838c1c8a8504741 | 772 | py | Python | energyplot.py | Druciaki/Energy | 5f475ff924dbd27ac67f82d5f53575196ac297f3 | [
"BSD-3-Clause"
] | null | null | null | energyplot.py | Druciaki/Energy | 5f475ff924dbd27ac67f82d5f53575196ac297f3 | [
"BSD-3-Clause"
] | null | null | null | energyplot.py | Druciaki/Energy | 5f475ff924dbd27ac67f82d5f53575196ac297f3 | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
from decimal import *
def buildgraphic(guesses,outputfile="output/CargaEletrica.png"):
plt.clf()
for name in guesses:
data = guesses[name]
x ,y = None, None # Hotfix - assure parameter type (TODO:REVIEW)
if type(data[0]) != type(list()):
x = d... | 24.903226 | 72 | 0.544041 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.