hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797f911c0f9550da7c9724058ae192dbe68ec146 | 16,462 | py | Python | rlbot/botmanager/bot_manager.py | danielbairamian/RL-RL | 4fc4ac14bd10088e83e7a15c3319370f74d0a756 | [
"MIT"
] | 3 | 2020-04-30T14:33:10.000Z | 2021-10-11T00:12:35.000Z | rlbot/botmanager/bot_manager.py | danielbairamian/RL-RL | 4fc4ac14bd10088e83e7a15c3319370f74d0a756 | [
"MIT"
] | null | null | null | rlbot/botmanager/bot_manager.py | danielbairamian/RL-RL | 4fc4ac14bd10088e83e7a15c3319370f74d0a756 | [
"MIT"
] | null | null | null | import glob
import os
import time
import traceback
from datetime import datetime, timedelta
from urllib.parse import ParseResult as URL
from run import ENABLE_LOCKSTEP
from src.bot import RLKickoffAgent
from rlbot.agents.base_agent import BaseAgent, BOT_CONFIG_MODULE_HEADER, MAXIMUM_TICK_RATE_PREFERENCE_KEY
from rlbot... | 46.502825 | 156 | 0.679869 |
797f92b49e5e2eed38c4be84ecb11851cdd545ee | 17,973 | py | Python | dask_saturn/core.py | saturncloud/dask-saturn | 9c9733f68fee26e60f544ab9653bc9056b7543e5 | [
"BSD-3-Clause"
] | 12 | 2020-05-19T17:18:06.000Z | 2022-03-24T01:25:57.000Z | dask_saturn/core.py | saturncloud/dask-saturn | 9c9733f68fee26e60f544ab9653bc9056b7543e5 | [
"BSD-3-Clause"
] | 32 | 2020-04-01T13:43:38.000Z | 2021-12-21T18:42:13.000Z | dask_saturn/core.py | saturncloud/dask-saturn | 9c9733f68fee26e60f544ab9653bc9056b7543e5 | [
"BSD-3-Clause"
] | 3 | 2020-04-28T13:52:22.000Z | 2021-09-15T02:03:28.000Z | """
Saturn-specific override of ``dask.distributed.deploy.SpecCluster``
See https://distributed.dask.org/en/latest/_modules/distributed/deploy/spec.html
for details on the parent class.
"""
import os
import json
import logging
import warnings
import weakref
from distutils.version import LooseVersion
from typing impor... | 37.21118 | 100 | 0.608858 |
797f92f589f9bf54612ae3b3718bb45cce6b4f40 | 55,118 | py | Python | python/ccxt/digifinex.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | 1 | 2021-12-21T12:03:43.000Z | 2021-12-21T12:03:43.000Z | python/ccxt/digifinex.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | null | null | null | python/ccxt/digifinex.py | npomfret/ccxt | 55e64d28c1a4a4925353076af9880dc18101fb73 | [
"MIT"
] | 1 | 2022-02-09T12:27:05.000Z | 2022-02-09T12:27:05.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError
from cc... | 39.229893 | 224 | 0.461265 |
797f937149cf67403553626e8082f627a1b50f87 | 803 | py | Python | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | test.py | auyeongwy/TrendCrawler | 5520c969ad7863f23d994a5cf9d711538363f879 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Au Yeong Wing Yau
#
# 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... | 29.740741 | 74 | 0.758406 |
797f93bfddc4cdc0f60285852b465d8ab49fd7e5 | 426 | py | Python | v2/migrations/0007_auto_20201116_2140.py | ll-Eywa-ll/Appointment-API | fe844a1a14ecd4830a4c0ea11b8fab9fac0122b2 | [
"MIT"
] | 1 | 2021-05-11T14:37:48.000Z | 2021-05-11T14:37:48.000Z | v2/migrations/0007_auto_20201116_2140.py | ll-Eywa-ll/Appointment-API | fe844a1a14ecd4830a4c0ea11b8fab9fac0122b2 | [
"MIT"
] | null | null | null | v2/migrations/0007_auto_20201116_2140.py | ll-Eywa-ll/Appointment-API | fe844a1a14ecd4830a4c0ea11b8fab9fac0122b2 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.1 on 2020-11-16 16:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('v2', '0006_auto_20201116_2041'),
]
operations = [
migrations.AlterField(
model_name='samplemodel',
name='image',
... | 22.421053 | 91 | 0.617371 |
797f946e4101c5e239de22c4e7843e552a458f6c | 22,019 | py | Python | Lib/pyreadline/modes/basemode.py | masamitsu-murase/single_binary_stackless_python | 1a601683882bc0a024b1bef3e35719554e44cce1 | [
"CNRI-Python-GPL-Compatible"
] | 5 | 2018-07-02T19:10:39.000Z | 2021-09-27T04:05:10.000Z | Lib/pyreadline/modes/basemode.py | masamitsu-murase/single_binary_stackless_python | 1a601683882bc0a024b1bef3e35719554e44cce1 | [
"CNRI-Python-GPL-Compatible"
] | 3 | 2018-06-10T06:28:06.000Z | 2021-09-24T13:54:19.000Z | Lib/pyreadline/modes/basemode.py | masamitsu-murase/single_binary_stackless_python | 1a601683882bc0a024b1bef3e35719554e44cce1 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | # -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# Distributed under the terms of the BSD License. The full license is in
# the file ... | 39.04078 | 129 | 0.583587 |
797f975cf379893ea4a33226d342d8db2225594d | 2,893 | py | Python | measurer/gdb-7.9/gdb/testsuite/gdb.python/py-pp-maint.py | armoredsoftware/protocol | e3b0c1df8bc1027865caec6d117e5925f71f26d2 | [
"BSD-3-Clause"
] | null | null | null | measurer/gdb-7.9/gdb/testsuite/gdb.python/py-pp-maint.py | armoredsoftware/protocol | e3b0c1df8bc1027865caec6d117e5925f71f26d2 | [
"BSD-3-Clause"
] | null | null | null | measurer/gdb-7.9/gdb/testsuite/gdb.python/py-pp-maint.py | armoredsoftware/protocol | e3b0c1df8bc1027865caec6d117e5925f71f26d2 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (C) 2010-2015 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This progr... | 32.144444 | 78 | 0.677497 |
797f9891cbcd0c29248919604d21822d05e3a1ec | 1,204 | py | Python | sample/datalogger/sample_datalogger.py | jjj999/pisat | be96cfcd4a68ece14cb5f8745ab138e3931eb761 | [
"MIT"
] | 1 | 2020-09-23T08:23:47.000Z | 2020-09-23T08:23:47.000Z | sample/datalogger/sample_datalogger.py | jjj999/pisat | be96cfcd4a68ece14cb5f8745ab138e3931eb761 | [
"MIT"
] | 4 | 2020-07-01T06:31:05.000Z | 2021-05-04T05:53:01.000Z | sample/datalogger/sample_datalogger.py | jjj999/pisat | be96cfcd4a68ece14cb5f8745ab138e3931eb761 | [
"MIT"
] | 2 | 2020-07-01T06:08:00.000Z | 2020-09-20T00:52:43.000Z |
from os import name
import time
import pigpio
from pisat.handler import PigpioI2CHandler
from pisat.sensor import Bme280, Apds9301
from pisat.adapter import BarometerAdapter, AdapterGroup
from pisat.core.logger import DataLogger, SensorController, DictLogQueue
def main():
NUM_LOGGING = 1000
I2C_ADDRES... | 26.755556 | 90 | 0.680233 |
797f98cb74d2272a99a2057aa8a77802681dc787 | 1,080 | py | Python | bad/undeletable.py | seperman/bad_ideas | 0fde67c1aac462f88e88a33342d0f1a54d78827c | [
"MIT"
] | null | null | null | bad/undeletable.py | seperman/bad_ideas | 0fde67c1aac462f88e88a33342d0f1a54d78827c | [
"MIT"
] | null | null | null | bad/undeletable.py | seperman/bad_ideas | 0fde67c1aac462f88e88a33342d0f1a54d78827c | [
"MIT"
] | null | null | null | import ctypes
import inspect
locals_to_fast = ctypes.pythonapi.PyFrame_LocalsToFast
locals_to_fast.restype = None
locals_to_fast.argtypes = [ctypes.py_object, ctypes.c_int]
def set_in_frame(frame, name, value):
frame.f_locals[name] = value
locals_to_fast(frame, 1)
class Undeletable:
def __del__(self):
... | 30.857143 | 86 | 0.681481 |
797f99103cf2961619ddbf2aba712c84f429b100 | 1,397 | py | Python | scripts/adafruit_jetbot_motors.py | alex-ssom/jetbot_ros | 222820e966db51c741b3425a2541cdbd9f870bf1 | [
"MIT"
] | null | null | null | scripts/adafruit_jetbot_motors.py | alex-ssom/jetbot_ros | 222820e966db51c741b3425a2541cdbd9f870bf1 | [
"MIT"
] | null | null | null | scripts/adafruit_jetbot_motors.py | alex-ssom/jetbot_ros | 222820e966db51c741b3425a2541cdbd9f870bf1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
import time
from Adafruit_MotorHAT import Adafruit_MotorHAT
from std_msgs.msg import String
# sets motor speed between [-1.0, 1.0]
def set_speed(motor_ID, value):
max_pwm = 115.0
speed = int(min(max(abs(value * max_pwm), 0), max_pwm))
if motor_ID == 1:
motor = motor_left
elif... | 20.544118 | 87 | 0.751611 |
797f9981a050253414d9d6c53c04cfd7de9d9ad7 | 454 | py | Python | pybb/board/migrations/0014_auto_20180217_1807.py | robilic/pybb | d562d39e1eb8d14cf8abb802ff04abed5e28481c | [
"MIT"
] | null | null | null | pybb/board/migrations/0014_auto_20180217_1807.py | robilic/pybb | d562d39e1eb8d14cf8abb802ff04abed5e28481c | [
"MIT"
] | null | null | null | pybb/board/migrations/0014_auto_20180217_1807.py | robilic/pybb | d562d39e1eb8d14cf8abb802ff04abed5e28481c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-02-17 18:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('board', '0013_privatemessage'),
]
operations = [
migrations.AlterField(
... | 21.619048 | 50 | 0.618943 |
797f9aa3ff24d63c6a2bc20e5d0af3018e0c211a | 14,833 | py | Python | ddv.py | knaggsy2000/ddv | ac885877e7db1a2f185f8902532aae68378c1da6 | [
"BSD-3-Clause"
] | null | null | null | ddv.py | knaggsy2000/ddv | ac885877e7db1a2f185f8902532aae68378c1da6 | [
"BSD-3-Clause"
] | null | null | null | ddv.py | knaggsy2000/ddv | ac885877e7db1a2f185f8902532aae68378c1da6 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#########################################################################
# Copyright/License Notice (BSD License) #
#########################################################################
###################################################... | 32.175705 | 629 | 0.621115 |
797f9ac24625978277385b34afed8c01652150a0 | 3,074 | py | Python | reconcile/quay_permissions.py | mmclanerh/qontract-reconcile | 57f3d5a38e6811843c234754df083d7bb35787bb | [
"Apache-2.0"
] | null | null | null | reconcile/quay_permissions.py | mmclanerh/qontract-reconcile | 57f3d5a38e6811843c234754df083d7bb35787bb | [
"Apache-2.0"
] | null | null | null | reconcile/quay_permissions.py | mmclanerh/qontract-reconcile | 57f3d5a38e6811843c234754df083d7bb35787bb | [
"Apache-2.0"
] | null | null | null | import sys
import logging
import reconcile.utils.gql as gql
from reconcile.status import ExitCodes
from reconcile.quay_base import get_quay_api_store
QUAY_REPOS_QUERY = """
{
apps: apps_v1 {
name
quayRepos {
org {
name
automationToken {
path
field
}
... | 32.020833 | 76 | 0.423227 |
797f9adc54a863c29001d1a9d6f507edc64d069f | 21,914 | py | Python | tests/test_pypi.py | majacQ/grayskull | 0fc0cc725ba6e8a37b901d8d36cf6603b8cd7abc | [
"Apache-2.0"
] | null | null | null | tests/test_pypi.py | majacQ/grayskull | 0fc0cc725ba6e8a37b901d8d36cf6603b8cd7abc | [
"Apache-2.0"
] | null | null | null | tests/test_pypi.py | majacQ/grayskull | 0fc0cc725ba6e8a37b901d8d36cf6603b8cd7abc | [
"Apache-2.0"
] | null | null | null | import hashlib
import json
import os
import sys
import pytest
from colorama import Fore, Style
from grayskull.cli import CLIConfig
from grayskull.pypi import PyPi
from grayskull.pypi.pypi import clean_deps_for_conda_forge
@pytest.fixture
def pypi_metadata():
path_metadata = os.path.join(
os.path.dirname... | 33.558959 | 88 | 0.582869 |
797f9bd1512b954dd81f952ad263b4b3ef897cdf | 11,216 | py | Python | homeassistant/components/blueprint/models.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 11 | 2018-02-16T15:35:47.000Z | 2020-01-14T15:20:00.000Z | homeassistant/components/blueprint/models.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 79 | 2020-07-23T07:13:37.000Z | 2022-03-22T06:02:37.000Z | homeassistant/components/blueprint/models.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Blueprint models."""
from __future__ import annotations
import asyncio
import logging
import pathlib
import shutil
from typing import Any
from awesomeversion import AwesomeVersion
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant import loader
from homeassistant.const impo... | 32.229885 | 92 | 0.624822 |
797f9c35866099ac819d15e163ce4e6fee0c56ed | 1,528 | py | Python | setup.py | KidoThunder/translate-po | 49191e50ff2c19812f1d05496e62135cb4fd9dfe | [
"MIT"
] | 1 | 2021-07-05T09:28:39.000Z | 2021-07-05T09:28:39.000Z | setup.py | KidoThunder/Django-translate-po | 49191e50ff2c19812f1d05496e62135cb4fd9dfe | [
"MIT"
] | null | null | null | setup.py | KidoThunder/Django-translate-po | 49191e50ff2c19812f1d05496e62135cb4fd9dfe | [
"MIT"
] | 1 | 2022-03-31T03:13:35.000Z | 2022-03-31T03:13:35.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="django-translate_po",
version="0.2.1",
author="Kido Zhao",
author_email="zgdisgod@hotmail.com",
description="Automatic PO file translator",
long_description=long_description,
long_... | 29.960784 | 86 | 0.589005 |
797f9c755ec9b6b12988c3a938c0a090d2984984 | 14,308 | py | Python | src/python/pants/testutil/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | src/python/pants/testutil/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | src/python/pants/testutil/task_test_base.py | anthonyjpratti/pants | d98e53af6ddd877861231bce8343f8204da0a9d1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import glob
import os
import subprocess
from abc import abstractmethod
from contextlib import closing, contextmanager
from dataclasses import dataclass
from io import BytesIO
from typing i... | 36.5 | 102 | 0.703523 |
797f9cf8ff0a6fb07cee2e62774b4a2e3c6616f1 | 2,536 | py | Python | fetch/box.py | takuma-yoneda/gym-fetch | d7de5007b832a09dd09b7b38bafea375008f2ac6 | [
"MIT"
] | 24 | 2021-06-10T18:44:11.000Z | 2022-03-11T02:57:09.000Z | fetch/box.py | takuma-yoneda/gym-fetch | d7de5007b832a09dd09b7b38bafea375008f2ac6 | [
"MIT"
] | 1 | 2021-11-23T14:10:18.000Z | 2021-11-23T14:10:18.000Z | fetch/box.py | takuma-yoneda/gym-fetch | d7de5007b832a09dd09b7b38bafea375008f2ac6 | [
"MIT"
] | 2 | 2021-08-28T05:48:57.000Z | 2022-03-30T07:51:31.000Z | from gym import utils
import numpy as np
from . import fetch_env
class BoxEnv(fetch_env.FetchEnv, utils.EzPickle):
def __init__(self, action, reward_type='sparse'):
self.action = action
self.initial_qpos = {
'robot0:slide0': 0.405,
'robot0:slide1': 0.48,
'robot0... | 39.015385 | 88 | 0.563091 |
797f9cfdba8711e25cad51714f17e0dd78da07fc | 3,408 | py | Python | Snake.py | CiaranMallory/Snake | f75cf54de83fb2ca4fed5204198b50b114acce20 | [
"MIT"
] | null | null | null | Snake.py | CiaranMallory/Snake | f75cf54de83fb2ca4fed5204198b50b114acce20 | [
"MIT"
] | null | null | null | Snake.py | CiaranMallory/Snake | f75cf54de83fb2ca4fed5204198b50b114acce20 | [
"MIT"
] | null | null | null | import pygame
import sys
import random2
pygame.init()
clock = pygame.time.Clock()
SCREEN_WIDTH = 480
SCREEN_HEIGHT = 480
GRIDSIZE = 20
GRID_WIDTH = SCREEN_WIDTH/GRIDSIZE
GRID_HEIGHT = SCREEN_WIDTH/GRIDSIZE
# Snake movement
UP = (0,-1)
DOWN = (0,1)
LEFT = (-1,0)
RIGHT = (1,0)
screen = pygame.dis... | 25.62406 | 110 | 0.637324 |
797f9d01a86dc651027b69d88fb8f13a8594056d | 792 | py | Python | 高频120_Lint/20. Valid Parentheses.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | 高频120_Lint/20. Valid Parentheses.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | 高频120_Lint/20. Valid Parentheses.py | lixiaoruiusa/Rui7272 | fbdb87104353138d3af7f3fe2cb3c0f00ff9e449 | [
"MIT"
] | null | null | null | class Solution:
"""
@param s: A string
@return: whether the string is a valid parentheses
@ () round brackets or parentheses,
@ {} called curly brackets or braces,
@ [] are the square brackets,
@ Time: O(n) Space: O(n)
@ 题意:输入一个只包含括号的字符串,判断括号是否匹配
模拟堆栈,读到左括号压栈,读到右括号判断栈顶括号是否匹配
最后r... | 31.68 | 118 | 0.478535 |
797f9dafec39524ccd2afb1fd78c609e1e70b7e1 | 786 | py | Python | engine/engine.py | EemeliSyynimaa/picross | 691d4a8a81656d48239d7fa1fa6b9566728a4a9f | [
"MIT"
] | null | null | null | engine/engine.py | EemeliSyynimaa/picross | 691d4a8a81656d48239d7fa1fa6b9566728a4a9f | [
"MIT"
] | null | null | null | engine/engine.py | EemeliSyynimaa/picross | 691d4a8a81656d48239d7fa1fa6b9566728a4a9f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pyglet
import scene_manager
class Engine(pyglet.window.Window):
""" The main engine class. """
def __init__(self, *args, **kwargs):
super(Engine, self).__init__(*args, **kwargs)
self.scene_manager = scene_manager.SceneManager(engine=self)
self.f... | 26.2 | 68 | 0.605598 |
797f9dd96ee3943141c72ac1cc53896e91e4096f | 44,925 | py | Python | openmmtools/tests/test_integrators.py | yihengwuKP/openmmtools | 8bf446742f75acb4008e51c0a102bb7f314d1da3 | [
"MIT"
] | 1 | 2019-11-01T14:22:57.000Z | 2019-11-01T14:22:57.000Z | openmmtools/tests/test_integrators.py | yihengwuKP/openmmtools | 8bf446742f75acb4008e51c0a102bb7f314d1da3 | [
"MIT"
] | 1 | 2019-06-13T08:27:54.000Z | 2019-06-13T08:27:54.000Z | openmmtools/tests/test_integrators.py | yihengwuKP/openmmtools | 8bf446742f75acb4008e51c0a102bb7f314d1da3 | [
"MIT"
] | null | null | null | #!/usr/local/bin/env python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
Test custom integrators.
"""
#=============================================... | 46.796875 | 212 | 0.679488 |
797f9de9b33b661525641ed4ec8a2894f18509dc | 4,180 | py | Python | autocnet/spatial/surface.py | readthedocs-assistant/autocnet | 579cccd0edc4cd870b5d9671165ebd830f1112b8 | [
"CC0-1.0"
] | 17 | 2016-11-21T17:07:18.000Z | 2022-01-16T06:14:04.000Z | autocnet/spatial/surface.py | readthedocs-assistant/autocnet | 579cccd0edc4cd870b5d9671165ebd830f1112b8 | [
"CC0-1.0"
] | 504 | 2015-12-17T18:46:11.000Z | 2021-12-17T19:19:49.000Z | autocnet/spatial/surface.py | readthedocs-assistant/autocnet | 579cccd0edc4cd870b5d9671165ebd830f1112b8 | [
"CC0-1.0"
] | 42 | 2015-12-09T15:30:15.000Z | 2022-02-24T04:47:46.000Z | """
A set of classes that represent the target surface. Each class implements the
get_height and get_radius functions for computing the height and radius respectively
at a given ground location (geocentric latitude and longitude).
"""
import numpy as np
from plio.io.io_gdal import GeoDataset
class EllipsoidDem:
"... | 29.230769 | 86 | 0.552153 |
797f9f2764ea04c2a5d407e00fe7ee19b28a0d82 | 1,687 | py | Python | wxPython/wxGlade-0.9.1/tests/casefiles/Grid.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | null | null | null | wxPython/wxGlade-0.9.1/tests/casefiles/Grid.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | null | null | null | wxPython/wxGlade-0.9.1/tests/casefiles/Grid.py | DarkShadow4/python | 4cd94e0cf53ee06c9c31e9272572ca9656697c30 | [
"MIT"
] | 1 | 2020-08-19T17:25:22.000Z | 2020-08-19T17:25:22.000Z | # -*- coding: ISO-8859-15 -*-
#
# generated by wxGlade
#
import wx
import wx.grid
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class MyFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: MyFrame.__init__
kwds["style"] = kwds.get("style", ... | 30.125 | 101 | 0.649674 |
797f9f6f6ed109d5426c2be0f620a4cf3be4b245 | 2,077 | py | Python | Model/DeeplearningModel.py | vuthithuhuyen/milk-pasteurization-prediction | 44e0e228f53d61c0a2fa1ed12c4803fd20ac3aad | [
"Apache-2.0"
] | null | null | null | Model/DeeplearningModel.py | vuthithuhuyen/milk-pasteurization-prediction | 44e0e228f53d61c0a2fa1ed12c4803fd20ac3aad | [
"Apache-2.0"
] | null | null | null | Model/DeeplearningModel.py | vuthithuhuyen/milk-pasteurization-prediction | 44e0e228f53d61c0a2fa1ed12c4803fd20ac3aad | [
"Apache-2.0"
] | null | null | null | import pickle
import numpy
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers import RepeatVector
from keras.layers import TimeDistributed
from Model import GlobalVariables
def SaveDictToFile(_dict, _fileName):
pickle_out = open(_fileName, "wb")
... | 30.101449 | 105 | 0.723158 |
797f9ff31051f97befa6de296edad1994585cb2c | 8,968 | py | Python | metaflow/plugins/conda/conda.py | npow/metaflow | e556481f301d954eda00cad381ac33aa08d1c0da | [
"Apache-2.0"
] | null | null | null | metaflow/plugins/conda/conda.py | npow/metaflow | e556481f301d954eda00cad381ac33aa08d1c0da | [
"Apache-2.0"
] | null | null | null | metaflow/plugins/conda/conda.py | npow/metaflow | e556481f301d954eda00cad381ac33aa08d1c0da | [
"Apache-2.0"
] | null | null | null | import errno
import os
import json
import subprocess
import time
from distutils.version import LooseVersion
from metaflow.exception import MetaflowException
from metaflow.metaflow_config import CONDA_DEPENDENCY_RESOLVER
from metaflow.metaflow_environment import InvalidEnvironmentException
from metaflow.util import whi... | 35.872 | 123 | 0.564117 |
797fa0c6f449374522ff220fbe7cd5f3bd907b0d | 8,328 | py | Python | tests/unit/test_reporting.py | csomh/packit-service | d12836284f5e34f54dc6de20279175493b5f5d31 | [
"MIT"
] | null | null | null | tests/unit/test_reporting.py | csomh/packit-service | d12836284f5e34f54dc6de20279175493b5f5d31 | [
"MIT"
] | null | null | null | tests/unit/test_reporting.py | csomh/packit-service | d12836284f5e34f54dc6de20279175493b5f5d31 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2018-2020 Red Hat, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 27.852843 | 87 | 0.568684 |
797fa13fed1748cb2134824e793b11817799438e | 9,762 | py | Python | copyright.py | DongDong-123/zgg_active | 7b7304bc9391e1d370052087d4ad2e6d05db670c | [
"Apache-2.0"
] | null | null | null | copyright.py | DongDong-123/zgg_active | 7b7304bc9391e1d370052087d4ad2e6d05db670c | [
"Apache-2.0"
] | null | null | null | copyright.py | DongDong-123/zgg_active | 7b7304bc9391e1d370052087d4ad2e6d05db670c | [
"Apache-2.0"
] | null | null | null | import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from db import DbOperate
from Common import Common
from mysqldb import conne... | 46.932692 | 132 | 0.529195 |
797fa19fce4b5a4f29008da08d773bca28b4594d | 841 | py | Python | rx/linq/observable/observeon.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/linq/observable/observeon.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | rx/linq/observable/observeon.py | AlexMost/RxPY | 05cb14c72806dc41e243789c05f498dede11cebd | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-04T11:13:49.000Z | 2021-11-04T11:13:49.000Z | from rx import AnonymousObservable, Observable
from rx.internal import extensionmethod
from rx.observeonobserver import ObserveOnObserver
@extensionmethod(Observable)
def observe_on(self, scheduler):
"""Wraps the source sequence in order to run its observer callbacks on
the specified scheduler.
Keyword a... | 29 | 74 | 0.764566 |
797fa3add22ae688324b00fbc46c500faa174e5b | 3,841 | py | Python | async_pool/utils.py | gwy15/async_pool | 088f8c46ab44054591454d866418bb6c00ff868f | [
"MIT"
] | 2 | 2019-10-05T08:02:58.000Z | 2019-12-18T21:00:22.000Z | async_pool/utils.py | gwy15/async_pool | 088f8c46ab44054591454d866418bb6c00ff868f | [
"MIT"
] | null | null | null | async_pool/utils.py | gwy15/async_pool | 088f8c46ab44054591454d866418bb6c00ff868f | [
"MIT"
] | null | null | null | import sys
import asyncio
from asyncio import Queue
def _cancel_all_tasks(loop):
# asyncio.Task.all_tasks will be deprecated in python 3.9,
# but _cancel_all_tasks will only be call for python < 3.7
to_cancel = asyncio.Task.all_tasks(loop)
if not to_cancel:
return
for task in to_cancel:
... | 26.86014 | 79 | 0.554803 |
797fa3dfff04ab2c88abb9764b301549fc088a57 | 168 | py | Python | labext/widgets/__init__.py | binh-vu/ipywidgets_extra | 3ddf46445306b2aa158bf3f696ec33f8ddd499e7 | [
"MIT"
] | 3 | 2020-06-21T22:57:55.000Z | 2021-06-03T23:36:39.000Z | labext/widgets/__init__.py | binh-vu/ipywidgets_extra | 3ddf46445306b2aa158bf3f696ec33f8ddd499e7 | [
"MIT"
] | null | null | null | labext/widgets/__init__.py | binh-vu/ipywidgets_extra | 3ddf46445306b2aa158bf3f696ec33f8ddd499e7 | [
"MIT"
] | 1 | 2020-06-20T19:50:37.000Z | 2020-06-20T19:50:37.000Z | from .selection import *
from .hideable_button import *
from .button import *
from .icon import *
from .html import *
from .data_table import *
from .checkbox import *
| 21 | 30 | 0.75 |
797fa4978b1ac930905341daf1dd9ab4f3d476a2 | 2,134 | py | Python | TestUtilityModule.py | memayukh/ImbalancedRegressioninDataStreams | 0e2935e20c545793d21277e4ccf9b5dec60ea80a | [
"MIT"
] | null | null | null | TestUtilityModule.py | memayukh/ImbalancedRegressioninDataStreams | 0e2935e20c545793d21277e4ccf9b5dec60ea80a | [
"MIT"
] | null | null | null | TestUtilityModule.py | memayukh/ImbalancedRegressioninDataStreams | 0e2935e20c545793d21277e4ccf9b5dec60ea80a | [
"MIT"
] | null | null | null | """
TestUtilityModule.py script tests all cases for PhiRelevance module
imports PhiRelevance module --> Calls functions of PhiUtils script of PhiRelevance module and plots graphs between target continous variable and relevance.
"""
import warnings
warnings.filterwarnings("ignore")
from PhiRelevance.PhiUtils imp... | 31.850746 | 156 | 0.597001 |
797fa4f4feee0e8cd6609826b6101b7f2750de77 | 7,825 | py | Python | pylinex/model/OutputInterpolatedModel.py | CU-NESS/pylinex | b6f342595b6a154e129eb303782e5268088f34d5 | [
"Apache-2.0"
] | null | null | null | pylinex/model/OutputInterpolatedModel.py | CU-NESS/pylinex | b6f342595b6a154e129eb303782e5268088f34d5 | [
"Apache-2.0"
] | null | null | null | pylinex/model/OutputInterpolatedModel.py | CU-NESS/pylinex | b6f342595b6a154e129eb303782e5268088f34d5 | [
"Apache-2.0"
] | null | null | null | """
File: pylinex/model/OutputInterpolatedModel.py
Author: Keith Tauscher
Date: 30 Jul 2019
Description: File containing a class representing a model which is an
interpolated (in the output space) version of an input model.
"""
from __future__ import division
import numpy as np
from scipy.interpolate impo... | 32.878151 | 79 | 0.575847 |
797fa4f6ded794738615be9afabbde0d6daf8402 | 877 | py | Python | Lab5/pubraspi.py | Dman1791/CPE-322-Engineering-Design-6 | a3efbf67bc253f97b5f568eca18b14515ca98148 | [
"MIT"
] | null | null | null | Lab5/pubraspi.py | Dman1791/CPE-322-Engineering-Design-6 | a3efbf67bc253f97b5f568eca18b14515ca98148 | [
"MIT"
] | null | null | null | Lab5/pubraspi.py | Dman1791/CPE-322-Engineering-Design-6 | a3efbf67bc253f97b5f568eca18b14515ca98148 | [
"MIT"
] | null | null | null | import time
import datetime
from system_info import get_temperature
import psutil
import paho.mqtt.client as mqtt
mqttc = mqtt.Client()
mqttc.connect("mqtt.eclipseprojects.io", 1883, 60)
mqttc.loop_start()
while True:
try:
cpu = psutil.cpu_percent()
tmp = get_temperature()
if cpu is None... | 32.481481 | 80 | 0.611174 |
797fa622a1a16dad9f15a372e287ba97ed12d1c3 | 1,170 | py | Python | pyvisdk/do/das_host_failed_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/das_host_failed_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/do/das_host_failed_event.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def DasHostFailedEvent(vim, *args, **kwargs):
'''This event records when a host failure h... | 34.411765 | 124 | 0.605983 |
797fa656cd6e2ba17233b534bd8df324c37913a8 | 894 | py | Python | sync-db.py | rafaeldefazio/data-covid | f1f660d6396a459bd43ffaecdeba7abde195a9e9 | [
"MIT"
] | 1 | 2020-06-29T14:02:53.000Z | 2020-06-29T14:02:53.000Z | sync-db.py | rafaeldefazio/csv-covid | f1f660d6396a459bd43ffaecdeba7abde195a9e9 | [
"MIT"
] | null | null | null | sync-db.py | rafaeldefazio/csv-covid | f1f660d6396a459bd43ffaecdeba7abde195a9e9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import csv
import pymongo
import datetime
myclient = pymongo.MongoClient("mongodb://")
mydb = myclient["covid19"]
mycol = mydb["cidades"]
cidade = "Catanduva"
with open('/home/rafaeldefazio/csv-covid/dados.csv') as f:
reader = csv.DictReader(f, delimiter=',')
data = list(reader)
f... | 19.866667 | 70 | 0.485459 |
797fa69c6c9f70962d636e67513ffce67693b416 | 311 | py | Python | data/multilingual/Cyrl.OSS/Sun-ExtA_16/pdf_to_json_test_Cyrl.OSS_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | 1 | 2021-09-19T19:47:35.000Z | 2021-09-19T19:47:35.000Z | data/multilingual/Cyrl.OSS/Sun-ExtA_16/pdf_to_json_test_Cyrl.OSS_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | data/multilingual/Cyrl.OSS/Sun-ExtA_16/pdf_to_json_test_Cyrl.OSS_Sun-ExtA_16.py | antoinecarme/pdf_to_json_tests | d57a024fde862e698d916a1178f285883d7a3b2f | [
"BSD-3-Clause"
] | null | null | null | import pdf_to_json as p2j
import json
url = "file:data/multilingual/Cyrl.OSS/Sun-ExtA_16/udhr_Cyrl.OSS_Sun-ExtA_16.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
| 31.1 | 81 | 0.810289 |
797fa726932cc68ba409d019832d7749d8de2cc0 | 176 | py | Python | coalaip/__init__.py | bigchaindb/pycoalaip | cecc8f6ff4733f0525fafcee63647753e832f0be | [
"Apache-2.0"
] | 20 | 2016-08-13T15:01:20.000Z | 2018-10-09T21:18:11.000Z | coalaip/__init__.py | imbi7py/pycoalaip | cecc8f6ff4733f0525fafcee63647753e832f0be | [
"Apache-2.0"
] | 57 | 2016-08-04T16:02:05.000Z | 2017-09-15T08:20:06.000Z | coalaip/__init__.py | imbi7py/pycoalaip | cecc8f6ff4733f0525fafcee63647753e832f0be | [
"Apache-2.0"
] | 8 | 2018-11-15T16:34:59.000Z | 2021-07-09T00:20:37.000Z | __author__ = 'BigchainDB'
__email__ = 'dev@bigchaindb.com'
__version__ = '0.0.3'
from coalaip.coalaip import ( # noqa
CoalaIp
)
from coalaip.exceptions import * # noqa
| 17.6 | 40 | 0.710227 |
797fa7272b4869e4728dbabf35eced41b6069776 | 1,595 | py | Python | FacebookHackerCup/2021/Qualification_Round/consistency_chapter.py | Akash671/coding | 4ef047f8e227074b660a2c7b41aefa377fdc0552 | [
"MIT"
] | null | null | null | FacebookHackerCup/2021/Qualification_Round/consistency_chapter.py | Akash671/coding | 4ef047f8e227074b660a2c7b41aefa377fdc0552 | [
"MIT"
] | null | null | null | FacebookHackerCup/2021/Qualification_Round/consistency_chapter.py | Akash671/coding | 4ef047f8e227074b660a2c7b41aefa377fdc0552 | [
"MIT"
] | null | null | null | #author : @Akash_Kumar
for t in range(1,int(input())+1):
s=str(input())
s_len=len(s)
#print(s_len)
if s_len==1:
print("Case #"+str(t)+": "+"0")
else:
vov='AIOUE'
vs=""
cs=""
n=len(s)
for i in range(n):
if s[i] in vov:
vs+=s[i]
else:
cs+=s[i]
AS... | 21.849315 | 65 | 0.432602 |
797fa7f8ccfc93cf6e878c980574a704dc76fb2c | 1,091 | py | Python | openerp/addons/base_report_designer/openerp_sxw2rml/__init__.py | ntiufalara/openerp7 | 903800da0644ec0dd9c1dcd34205541f84d45fe4 | [
"MIT"
] | 3 | 2016-01-29T14:39:49.000Z | 2018-12-29T22:42:00.000Z | odoo/addons/base_report_designer/openerp_sxw2rml/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 2 | 2016-03-23T14:29:41.000Z | 2017-02-20T17:11:30.000Z | odoo/addons/base_report_designer/openerp_sxw2rml/__init__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | 43.64 | 79 | 0.615032 |
797faa6a2107f0f046c76a90cc5bd9d36f6ed863 | 131,444 | py | Python | Packs/CrowdStrikeFalcon/Integrations/CrowdStrikeFalcon/CrowdStrikeFalcon_test.py | AlexMackenzieTANZ/content | 00ab6d4f2ff0bfbd4ea26036c3df446f869ca346 | [
"MIT"
] | null | null | null | Packs/CrowdStrikeFalcon/Integrations/CrowdStrikeFalcon/CrowdStrikeFalcon_test.py | AlexMackenzieTANZ/content | 00ab6d4f2ff0bfbd4ea26036c3df446f869ca346 | [
"MIT"
] | 19 | 2022-02-23T13:30:14.000Z | 2022-03-28T13:42:06.000Z | Packs/CrowdStrikeFalcon/Integrations/CrowdStrikeFalcon/CrowdStrikeFalcon_test.py | cforbes-tw/content | 347b935292bd789871621a52b57cddb51fa14e17 | [
"MIT"
] | null | null | null | import pytest
import os
import json
import demistomock as demisto
from CommonServerPython import outputPaths, entryTypes, DemistoException
RETURN_ERROR_TARGET = 'CrowdStrikeFalcon.return_error'
SERVER_URL = 'https://4.4.4.4'
def load_json(file: str):
with open(file, 'r') as f:
return json.load(f)
@pyt... | 37.555429 | 144 | 0.545974 |
797faa8fb0f763303ee500fda3f13220c380e1bd | 3,178 | py | Python | perma_web/perma/migrations/0016_auto_20150717_1131.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/migrations/0016_auto_20150717_1131.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | perma_web/perma/migrations/0016_auto_20150717_1131.py | leppert/perma | adb0cec29679c3d161d72330e19114f89f8c42ac | [
"MIT",
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from api.validations import get_mime_type
def migrate_assets(apps, schema_editor):
# Update CDXLines to point to Link instead of Asset
CDXLine = apps.get_model("perma", "CDXLine")
print "Migrating CD... | 37.388235 | 182 | 0.59377 |
797faaed4381e94d8834fa7dcfb89e72ad732861 | 1,655 | py | Python | psydac/api/tests/test_quadorder.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | null | null | null | psydac/api/tests/test_quadorder.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | null | null | null | psydac/api/tests/test_quadorder.py | mayuri-dhote/psydac | 01ddbe2d049a599684c45060912d01c2658160a3 | [
"MIT"
] | null | null | null | import pytest
from sympde.topology import Line, Square
from sympde.topology import ScalarFunctionSpace
from sympde.topology import element_of
from sympde.core import Constant
from sympde.expr import BilinearForm
from sympde.expr import LinearForm
from sympde.expr import integral
import numpy as np
fr... | 36.777778 | 107 | 0.687009 |
797fabaf5b6d7f3f31010fdae27483a42d3206c7 | 2,623 | py | Python | tests/extension/stream_/add_tree/stream_add_tree.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/stream_/add_tree/stream_add_tree.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | tests/extension/stream_/add_tree/stream_add_tree.py | akmaru/veriloggen | 74f998139e8cf613f7703fa4cffd571bbf069bbc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import sys
import os
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))))
from veriloggen import *
import ve... | 23.630631 | 67 | 0.618376 |
797fac9e38b395dd182ddc81e3e455ee97cdfca9 | 6,428 | py | Python | bentoml/utils/__init__.py | Shumpei-Kikuta/BentoML | 4fe508934ab431ea5c414ee9d8b84c2104688381 | [
"Apache-2.0"
] | null | null | null | bentoml/utils/__init__.py | Shumpei-Kikuta/BentoML | 4fe508934ab431ea5c414ee9d8b84c2104688381 | [
"Apache-2.0"
] | 1 | 2022-03-15T09:46:11.000Z | 2022-03-25T09:14:13.000Z | bentoml/utils/__init__.py | Shumpei-Kikuta/BentoML | 4fe508934ab431ea5c414ee9d8b84c2104688381 | [
"Apache-2.0"
] | 1 | 2021-03-05T09:09:05.000Z | 2021-03-05T09:09:05.000Z | # Copyright 2019 Atalaya Tech, 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/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, ... | 30.609524 | 84 | 0.692906 |
797fad58f37eb10e0f2940b60f39ace238ce7166 | 785 | py | Python | django_factories/admin_class_factories.py | danie1k/django-factories | fe21a30a9b09f4d5a69312ad912fd5ac989faed0 | [
"BSD-3-Clause"
] | null | null | null | django_factories/admin_class_factories.py | danie1k/django-factories | fe21a30a9b09f4d5a69312ad912fd5ac989faed0 | [
"BSD-3-Clause"
] | null | null | null | django_factories/admin_class_factories.py | danie1k/django-factories | fe21a30a9b09f4d5a69312ad912fd5ac989faed0 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.admin.options import InlineModelAdmin
__all__ = ['inline_model_admin_class_factory']
def inline_model_admin_class_factory(inline_model, admin_class, **fields):
"""
:param inline_model:
:param admin_class:
:param fields:
:return:
"""
if not issubclass(admin_class, Inli... | 26.166667 | 74 | 0.656051 |
797fad95376f48ca47db4c4ef37519563ca8d1af | 173 | py | Python | datastore/shared/di/exceptions.py | FinnStutzenstein/openslides-datastore-service | 07a8022b46683a223cbed0f6a925d81499ee71ba | [
"MIT"
] | 2 | 2020-01-20T13:56:28.000Z | 2020-02-17T10:56:26.000Z | datastore/shared/di/exceptions.py | FinnStutzenstein/openslides-datastore-service | 07a8022b46683a223cbed0f6a925d81499ee71ba | [
"MIT"
] | 122 | 2020-01-16T15:13:37.000Z | 2022-03-17T10:32:47.000Z | datastore/shared/di/exceptions.py | FinnStutzenstein/openslides-datastore-service | 07a8022b46683a223cbed0f6a925d81499ee71ba | [
"MIT"
] | 7 | 2020-02-20T12:04:17.000Z | 2021-11-23T17:54:33.000Z | class DependencyInjectionError(Exception):
pass
class DependencyNotFound(DependencyInjectionError):
def __init__(self, protocol):
self.protocol = protocol
| 21.625 | 51 | 0.763006 |
797fadcef569c8a749c775c30c24f43474cf786a | 1,014 | py | Python | symbols/blimp_util.py | bdzimmer/symbols | d9530d0a6be30bf3ce7c991de6933616c2748136 | [
"BSD-3-Clause"
] | null | null | null | symbols/blimp_util.py | bdzimmer/symbols | d9530d0a6be30bf3ce7c991de6933616c2748136 | [
"BSD-3-Clause"
] | null | null | null | symbols/blimp_util.py | bdzimmer/symbols | d9530d0a6be30bf3ce7c991de6933616c2748136 | [
"BSD-3-Clause"
] | null | null | null | """
Utilities for using blimp programatically
"""
from symbols import blimp
from PIL import Image
import numpy as np
def render_and_composite(layers, resources_dirname, im_bg):
"""render a layer, apply effects, and composite against a background image"""
blimp.DEBUG = False
canvas_height, canvas_wid... | 25.35 | 84 | 0.706114 |
797fae185d06ee72c5db97d318f27acf2288bdab | 21,010 | py | Python | astropy/io/ascii/ipac.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | 4 | 2021-03-25T15:49:56.000Z | 2021-12-15T09:10:04.000Z | astropy/io/ascii/ipac.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | astropy/io/ascii/ipac.py | mehrdad-shokri/astropy | abd73b51277694338c8eca7639da956dcd06f207 | [
"BSD-3-Clause"
] | 3 | 2021-03-28T16:13:00.000Z | 2021-07-16T10:27:25.000Z | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""An extensible ASCII table reader and writer.
ipac.py:
Classes to read IPAC table format
:Copyright: Smithsonian Astrophysical Observatory (2011)
:Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu)
"""
import re
from collections import defaultdic... | 38.979592 | 100 | 0.55821 |
797fae49ac8528331816a7ef30ea8340a7318547 | 4,989 | py | Python | wireshark_audit/network_data.py | spiegel-jpg/SaTC_testbed | a2563dbc0d122d512ebed082bd45c7d81b8e6e75 | [
"Apache-2.0"
] | null | null | null | wireshark_audit/network_data.py | spiegel-jpg/SaTC_testbed | a2563dbc0d122d512ebed082bd45c7d81b8e6e75 | [
"Apache-2.0"
] | null | null | null | wireshark_audit/network_data.py | spiegel-jpg/SaTC_testbed | a2563dbc0d122d512ebed082bd45c7d81b8e6e75 | [
"Apache-2.0"
] | null | null | null | # Updated - ! stdbuf -i0 -oL -e0 tshark -i wlx00c0ca5fb01e -q -T fields -e frame.time_relative -e _ws.col.Protocol -e eth.src -e eth.dst -e frame.len -e ip.src -e ip.dst -e tcp.srcport -e tcp.dstport -e udp.srcport -e udp.dstport | python /home/sensorweb/NetworkData.py
import sys
from datetime import datetime
from thr... | 32.607843 | 269 | 0.522349 |
797fae5fe07f58eee3b5bcae32aee4bcdc106710 | 50,620 | py | Python | wo/cli/plugins/stack.py | xwang0929/WordOps | d608e78bebcfe3041bd86c8cc6d379e4023368a0 | [
"MIT"
] | null | null | null | wo/cli/plugins/stack.py | xwang0929/WordOps | d608e78bebcfe3041bd86c8cc6d379e4023368a0 | [
"MIT"
] | null | null | null | wo/cli/plugins/stack.py | xwang0929/WordOps | d608e78bebcfe3041bd86c8cc6d379e4023368a0 | [
"MIT"
] | null | null | null | """Stack Plugin for WordOps"""
import os
from cement.core.controller import CementBaseController, expose
from wo.cli.plugins.stack_migrate import WOStackMigrateController
from wo.cli.plugins.stack_pref import post_pref, pre_pref, pre_stack
from wo.cli.plugins.stack_services import WOStackStatusController
from wo.cli... | 44.79646 | 79 | 0.481786 |
797fae862a16f7cc7d021d6c8ef821c7b4ee9d39 | 1,031 | py | Python | shunt/shunt/logutils.py | velezj/project-manager | 92e28e5718ca1302f6da0cf8b3d4a3bb5a1a8a72 | [
"MIT"
] | null | null | null | shunt/shunt/logutils.py | velezj/project-manager | 92e28e5718ca1302f6da0cf8b3d4a3bb5a1a8a72 | [
"MIT"
] | null | null | null | shunt/shunt/logutils.py | velezj/project-manager | 92e28e5718ca1302f6da0cf8b3d4a3bb5a1a8a72 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger( __name__ )
import traceback
##============================================================================
class CustomAdapter(logging.LoggerAdapter):
@staticmethod
def indent():
indentation_level = len(traceback.extract_stack())
return indentation_l... | 36.821429 | 78 | 0.319108 |
797faf05779a6aa58cb028d4acf2f2f083a69209 | 5,735 | py | Python | mpm/bin/build.py | mkdryden/mpm | c28a6e91ac1a50bb932bb7b75c1efe973eeb5e88 | [
"BSD-3-Clause"
] | null | null | null | mpm/bin/build.py | mkdryden/mpm | c28a6e91ac1a50bb932bb7b75c1efe973eeb5e88 | [
"BSD-3-Clause"
] | 3 | 2016-10-04T16:07:06.000Z | 2016-11-07T18:03:58.000Z | mpm/bin/build.py | mkdryden/mpm | c28a6e91ac1a50bb932bb7b75c1efe973eeb5e88 | [
"BSD-3-Clause"
] | 1 | 2021-05-27T19:45:24.000Z | 2021-05-27T19:45:24.000Z | import argparse
import logging
import os
import subprocess as sp
import sys
import zipfile
import path_helpers as ph
import yaml
logger = logging.getLogger(__name__)
def parse_args(args=None):
'''
Parses arguments, returns ``(options, args)``.
.. versionchanged:: 0.24.1
Fix ha... | 35.401235 | 80 | 0.620924 |
797faf1e0fe396c1bc88b95ea355be67d3269640 | 137,101 | py | Python | scale/job/models.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | scale/job/models.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | scale/job/models.py | kfconsultant/scale | 28618aee07ceed9e4a6eb7b8d0e6f05b31d8fd6b | [
"Apache-2.0"
] | null | null | null | """Defines the database models for jobs and job types"""
from __future__ import absolute_import
from __future__ import unicode_literals
import copy
import datetime
import logging
import math
import operator
import re
import semver
from collections import namedtuple
import django.contrib.postgres.fields
import django.... | 43.746331 | 136 | 0.667223 |
797faff8b36cf4e1b5a1eb130ccf6945d9623335 | 9,328 | py | Python | mak/libs/ircc/ir_codegen/ircc_generator.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 4 | 2015-05-13T16:28:36.000Z | 2017-05-24T15:34:14.000Z | mak/libs/ircc/ir_codegen/ircc_generator.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | null | null | null | mak/libs/ircc/ir_codegen/ircc_generator.py | bugengine/BugEngine | 1b3831d494ee06b0bd74a8227c939dd774b91226 | [
"BSD-3-Clause"
] | 1 | 2017-03-21T08:28:07.000Z | 2017-03-21T08:28:07.000Z | from be_typing import TYPE_CHECKING
from abc import abstractmethod
class IrccGenerator:
def __init__(self, file):
# type: (TextIO) -> None
self._out_file = file
@abstractmethod
def type_metadata(self):
# type: () -> IrccType
raise NotImplementedError
@abstractmethod
... | 30.785479 | 119 | 0.666488 |
797fb05d1dad77fea6e34a9358bf607453d50416 | 9,768 | py | Python | nuitka/nodes/BuiltinTypeNodes.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | 1 | 2021-05-25T12:48:28.000Z | 2021-05-25T12:48:28.000Z | nuitka/nodes/BuiltinTypeNodes.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | null | null | null | nuitka/nodes/BuiltinTypeNodes.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 29.333333 | 89 | 0.704955 |
797fb0b810836021a4c3545a15927ea13b8b2040 | 236 | py | Python | civbot/commands/cmd_cancel.py | thyjukki/Civi-Botti-2.0 | 7b9ff6bf3e97b90f61286e7688db731f91365e88 | [
"MIT"
] | null | null | null | civbot/commands/cmd_cancel.py | thyjukki/Civi-Botti-2.0 | 7b9ff6bf3e97b90f61286e7688db731f91365e88 | [
"MIT"
] | 3 | 2020-04-28T09:19:11.000Z | 2021-06-01T23:21:32.000Z | civbot/commands/cmd_cancel.py | thyjukki/Civi-Botti-2.0 | 7b9ff6bf3e97b90f61286e7688db731f91365e88 | [
"MIT"
] | null | null | null | import telegram
from telegram.ext import ConversationHandler
def cancel_all(bot, update):
update.message.reply_text(
'Canceled',
reply_markup=telegram.ReplyKeyboardRemove()
)
return ConversationHandler.END
| 21.454545 | 51 | 0.737288 |
797fb12cc5a4233b876336eb5744f143d81acc52 | 2,514 | py | Python | filetransfer/core/scanner.py | Mati365/pyFileSharing | 5e6b13238cc548ebaf129c48a86df8cf921f2f39 | [
"MIT"
] | 2 | 2018-12-25T08:19:11.000Z | 2020-08-19T16:53:28.000Z | filetransfer/core/scanner.py | Mati365/pyFileSharing | 5e6b13238cc548ebaf129c48a86df8cf921f2f39 | [
"MIT"
] | null | null | null | filetransfer/core/scanner.py | Mati365/pyFileSharing | 5e6b13238cc548ebaf129c48a86df8cf921f2f39 | [
"MIT"
] | 1 | 2019-10-30T22:15:24.000Z | 2019-10-30T22:15:24.000Z | import socket
import ipaddress
from threading import Thread
from ..tools import get_milliseconds, create_interval
from ..settings import ports
from .events import EventHandler
# Device visible in device list
class NetworkHost:
def __init__(self, address, last_seen=get_milliseconds()):
self.last_seen = la... | 32.649351 | 98 | 0.618934 |
797fb2b02539535782b40506be04b90d0c008b85 | 11,968 | py | Python | MAPS/autoencoder/ae_metrics.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | null | null | null | MAPS/autoencoder/ae_metrics.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | null | null | null | MAPS/autoencoder/ae_metrics.py | gmooers96/CBRAIN-CAM | c5a26e415c031dea011d7cb0b8b4c1ca00751e2a | [
"MIT"
] | 5 | 2019-09-30T20:17:13.000Z | 2022-03-01T07:03:30.000Z | import argparse
import json
import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt
import keras
from keras import layers
from keras import backend as K
#import tensorflow as tf
#tf.enable_eager_execution()
#tf.compat.v1.disable_eager_execution()
from autoencoder import encoder_gen, decode... | 36.599388 | 122 | 0.674549 |
797fb2de4af5ddcb07ec1128504f59925fdf0160 | 45,574 | py | Python | PRESUBMIT.py | na-g/webrtc-upstream-tracking | 41b5296405e2cc37b838c2f7490d02130387b294 | [
"BSD-3-Clause"
] | 1 | 2020-12-23T00:34:11.000Z | 2020-12-23T00:34:11.000Z | PRESUBMIT.py | na-g/webrtc-upstream-tracking | 41b5296405e2cc37b838c2f7490d02130387b294 | [
"BSD-3-Clause"
] | null | null | null | PRESUBMIT.py | na-g/webrtc-upstream-tracking | 41b5296405e2cc37b838c2f7490d02130387b294 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... | 40.012291 | 80 | 0.678962 |
797fb39ea2f485f3d5638ff0f20911eb8b27e600 | 866 | py | Python | Stream-3/Full-Stack-Development/4.Hello-Django-Administration/4.-Wire-Up-A-Model-To-A-Template/challenge_solution/QuoteOfTheDay/QuoteOfTheDay/urls.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 4 | 2017-10-10T14:00:40.000Z | 2021-01-27T14:08:26.000Z | Stream-3/Full-Stack-Development/4.Hello-Django-Administration/4.-Wire-Up-A-Model-To-A-Template/challenge_solution/QuoteOfTheDay/QuoteOfTheDay/urls.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 115 | 2019-10-24T11:18:33.000Z | 2022-03-11T23:15:42.000Z | Stream-3/Full-Stack-Development/4.Hello-Django-Administration/4.-Wire-Up-A-Model-To-A-Template/challenge_solution/QuoteOfTheDay/QuoteOfTheDay/urls.py | GunnerJnr/_CodeInstitute | efba0984a3dc71558eef97724c85e274a712798c | [
"MIT"
] | 5 | 2017-09-22T21:42:39.000Z | 2020-02-07T02:18:11.000Z | """Quotes URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | 33.307692 | 79 | 0.699769 |
797fb3d77ed780f85fa833f79891a47b59a374d2 | 25,617 | py | Python | test/functional/wallet_send.py | ComputationBenefactorCoin/xcbc | a65b93a2698898d9381821108999af8609760f83 | [
"MIT"
] | null | null | null | test/functional/wallet_send.py | ComputationBenefactorCoin/xcbc | a65b93a2698898d9381821108999af8609760f83 | [
"MIT"
] | null | null | null | test/functional/wallet_send.py | ComputationBenefactorCoin/xcbc | a65b93a2698898d9381821108999af8609760f83 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the send RPC command."""
from decimal import Decimal, getcontext
from itertools import product
from t... | 53.147303 | 157 | 0.624273 |
797fb49a8064a2d3b50869f2b46cef5c6c04f8e3 | 1,772 | py | Python | AzureFunctions.Python/process_batches/__init__.py | Tianyun-G/Serverless-File-Validation | 86f4f20db857eac49f122b65ccc5ac54965b5086 | [
"MIT"
] | 20 | 2020-01-08T13:54:19.000Z | 2022-03-28T06:56:14.000Z | AzureFunctions.Python/process_batches/__init__.py | Tianyun-G/Serverless-File-Validation | 86f4f20db857eac49f122b65ccc5ac54965b5086 | [
"MIT"
] | 4 | 2020-05-06T16:58:09.000Z | 2021-08-02T08:21:16.000Z | AzureFunctions.Python/process_batches/__init__.py | Tianyun-G/Serverless-File-Validation | 86f4f20db857eac49f122b65ccc5ac54965b5086 | [
"MIT"
] | 10 | 2020-01-28T13:43:17.000Z | 2022-02-27T06:44:01.000Z | """
Time triggered Azure Function that processes batches of files from Azure Blob Storage for their
validation.
"""
import datetime
import logging
import os
from typing import List
import azure.functions as func
from azure.storage.blob import BlobServiceClient
from ..common import BlobStorageClient, Batch, Status, TY... | 34.745098 | 96 | 0.696388 |
797fb4fc4866c9d9750dcebca431e6800c3d8a4b | 3,703 | py | Python | tests/chained_nested_tasklet_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | 1 | 2022-03-11T13:36:34.000Z | 2022-03-11T13:36:34.000Z | tests/chained_nested_tasklet_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | tests/chained_nested_tasklet_test.py | Walon1998/dace | 95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import numpy as np
import dace as dp
from dace.sdfg import SDFG
from dace.memlet import Memlet
from dace.data import Scalar
# Constructs an SDFG with two consecutive tasklets
def test_nested_map():
print('SDFG consecutive tasklet (nested... | 35.266667 | 93 | 0.635431 |
797fb527415ea9b1669ede4ede5d75b77e06d0b6 | 82,464 | py | Python | test/test_reassembly.py | hanqianxun/vpp | a8ebb518445a3ee82e7d18858ea6d2f24c780abc | [
"Apache-2.0"
] | null | null | null | test/test_reassembly.py | hanqianxun/vpp | a8ebb518445a3ee82e7d18858ea6d2f24c780abc | [
"Apache-2.0"
] | null | null | null | test/test_reassembly.py | hanqianxun/vpp | a8ebb518445a3ee82e7d18858ea6d2f24c780abc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import unittest
from random import shuffle, choice, randrange
from framework import VppTestCase, VppTestRunner
import scapy.compat
from scapy.packet import Raw
from scapy.layers.l2 import Ether, GRE
from scapy.layers.inet import IP, UDP, ICMP
from scapy.layers.inet6 import HBHOptUnknown, ICMPv... | 39.703418 | 79 | 0.590997 |
797fb8f9881e437889c4ed0e6a6fed91518c669d | 2,296 | py | Python | tools/gen_javadoc.py | math1man/engine | 3a53b28e9503a8df3e0da02f01b2a95f78df6c48 | [
"BSD-3-Clause"
] | 13 | 2020-08-09T10:30:50.000Z | 2021-09-06T18:26:05.000Z | tools/gen_javadoc.py | shoryukenn/engine | 0dc86cda19d55aba8b719231c11306eeaca4b798 | [
"BSD-3-Clause"
] | 3 | 2021-01-11T00:21:02.000Z | 2021-05-26T01:35:54.000Z | tools/gen_javadoc.py | shoryukenn/engine | 0dc86cda19d55aba8b719231c11306eeaca4b798 | [
"BSD-3-Clause"
] | 9 | 2021-03-11T04:52:17.000Z | 2021-12-17T09:19:06.000Z | #!/usr/bin/env python
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import subprocess
import sys
ANDROID_SRC_ROOT = 'flutter/shell/platform/android'
def main():
parser = arg... | 31.452055 | 91 | 0.710366 |
797fbb4014c6ea5e605154d3a444c709c9d226f2 | 2,520 | py | Python | tests/components/nexia/test_climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | tests/components/nexia/test_climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 24,710 | 2016-04-13T08:27:26.000Z | 2020-03-02T12:59:13.000Z | tests/components/nexia/test_climate.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """The lock tests for the august platform."""
from homeassistant.components.climate.const import HVACMode
from .util import async_init_integration
async def test_climate_zones(hass):
"""Test creation climate zones."""
await async_init_integration(hass)
state = hass.states.get("climate.nick_office")
... | 33.6 | 88 | 0.598413 |
797fbc5a167713f7d81b07827071f5f14807619a | 2,865 | py | Python | misc/markov.py | jonathanslenders/cycli | 288f098dd9b96df65d4f0d517a6fe0da4126afe4 | [
"MIT"
] | 3 | 2019-02-07T14:26:11.000Z | 2021-12-15T09:34:34.000Z | misc/markov.py | jonathanslenders/cycli | 288f098dd9b96df65d4f0d517a6fe0da4126afe4 | [
"MIT"
] | 1 | 2018-04-05T21:47:42.000Z | 2018-04-05T22:08:55.000Z | misc/markov.py | jonathanslenders/cycli | 288f098dd9b96df65d4f0d517a6fe0da4126afe4 | [
"MIT"
] | null | null | null | from cycli.cypher import Cypher
from misc.graphgist import get_all_queries
import re
cypher = Cypher()
queries = get_all_queries()
# Each Cypher word is a state in the Markov model. We're also adding a "" state; this means there are no previous words
# (we're at the beginning of the query).
cypher_words = [""] + cyp... | 37.207792 | 126 | 0.663874 |
797fbcae0357d9679f9a0b710735433369ad4bf3 | 118 | py | Python | main.py | kenoss/test-sentry-sdk-socks-transport | 489f6a2ed61050f6ab921dfcd297f37e225c63f7 | [
"MIT"
] | null | null | null | main.py | kenoss/test-sentry-sdk-socks-transport | 489f6a2ed61050f6ab921dfcd297f37e225c63f7 | [
"MIT"
] | null | null | null | main.py | kenoss/test-sentry-sdk-socks-transport | 489f6a2ed61050f6ab921dfcd297f37e225c63f7 | [
"MIT"
] | null | null | null | import sys
sys.path.append("sentry_test")
from sentry_test.main import main
if __name__ == "__main__":
main()
| 11.8 | 33 | 0.711864 |
797fbd32f9505fa76f26d2f3057ac79a0a2608f1 | 19,390 | py | Python | sympy/ntheory/primetest.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | sympy/ntheory/primetest.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | sympy/ntheory/primetest.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | """
Primality testing
"""
from sympy.core.compatibility import as_int
from mpmath.libmp import bitcount as _bitlength
def _int_tuple(*i):
return tuple(int(_) for _ in i)
def is_euler_pseudoprime(n, b):
"""Returns True if n is prime or an Euler pseudoprime to base b, else False.
Euler Pseudoprime : I... | 29.157895 | 120 | 0.574007 |
797fbd53f86c7d94a7a38175672a907492770449 | 100 | py | Python | ampel/contrib/hu/t3/tns/__init__.py | mafn/Ampel-HU-astro | 93cf14874439c1f5d44622407fceff69eef7af2e | [
"BSD-3-Clause"
] | null | null | null | ampel/contrib/hu/t3/tns/__init__.py | mafn/Ampel-HU-astro | 93cf14874439c1f5d44622407fceff69eef7af2e | [
"BSD-3-Clause"
] | 2 | 2022-03-07T07:11:56.000Z | 2022-03-07T07:11:59.000Z | ampel/contrib/hu/t3/tns/__init__.py | mafn/Ampel-HU-astro | 93cf14874439c1f5d44622407fceff69eef7af2e | [
"BSD-3-Clause"
] | 2 | 2022-01-26T13:49:19.000Z | 2022-02-28T12:32:05.000Z |
from .TNSClient import TNSClient
from .TNSName import TNSName
from .TNSMirrorDB import TNSMirrorDB
| 20 | 36 | 0.84 |
797fbd9964c71cb4d4bc8aa661ee988b5a7d630a | 9,574 | py | Python | sdk/python/pulumi_azure_nextgen/storagesync/v20180701/server_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/storagesync/v20180701/server_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/storagesync/v20180701/server_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 44.324074 | 797 | 0.660957 |
797fbdd7958f4ec2abf68c6ffceb44f7f4b2867e | 1,689 | py | Python | 12-2.py | xeno14/advent_of_code2018 | 87d0f4dc76ca9cd82d68618255709e446cf09b37 | [
"MIT"
] | null | null | null | 12-2.py | xeno14/advent_of_code2018 | 87d0f4dc76ca9cd82d68618255709e446cf09b37 | [
"MIT"
] | null | null | null | 12-2.py | xeno14/advent_of_code2018 | 87d0f4dc76ca9cd82d68618255709e446cf09b37 | [
"MIT"
] | null | null | null |
def simulate(ngen, init, rules):
pots = list("..." + init + ("." * 1500))
gens = [ init ]
for n in range(ngen):
npots = list(pots)
for i in range(0, len(pots)-3):
if i == 0:
sub = [".", "."] + pots[:3]
elif i == 1:
sub = ["."] + pots[... | 26.809524 | 194 | 0.410302 |
797fbe7179e3db95d233a6f58d5b645d4fd10849 | 9,645 | py | Python | bddtests/steps/orderer_util.py | liuhuanyuxfq/fabric | 21ce6b23cf9129b98a1c22a3128d30b762f96c81 | [
"Apache-2.0"
] | 2 | 2017-07-11T15:42:03.000Z | 2020-02-27T12:37:48.000Z | bddtests/steps/orderer_util.py | liuhuanyuxfq/fabric | 21ce6b23cf9129b98a1c22a3128d30b762f96c81 | [
"Apache-2.0"
] | null | null | null | bddtests/steps/orderer_util.py | liuhuanyuxfq/fabric | 21ce6b23cf9129b98a1c22a3128d30b762f96c81 | [
"Apache-2.0"
] | null | null | null |
# Copyright IBM Corp. 2016 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 a... | 37.383721 | 148 | 0.667185 |
797fbfb6f3b71e658e4ea10083ddecc7b6673bc8 | 152 | py | Python | validation_tests/analytical_exact/avalanche_wet/produce_results.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 136 | 2015-05-07T05:47:43.000Z | 2022-02-16T03:07:40.000Z | validation_tests/analytical_exact/avalanche_wet/produce_results.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 184 | 2015-05-03T09:27:54.000Z | 2021-12-20T04:22:48.000Z | validation_tests/analytical_exact/avalanche_wet/produce_results.py | samcom12/anuga_core | f4378114dbf02d666fe6423de45798add5c42806 | [
"Python-2.0",
"OLDAP-2.7"
] | 70 | 2015-03-18T07:35:22.000Z | 2021-11-01T07:07:29.000Z |
import anuga
from anuga.validation_utilities import produce_report
args = anuga.get_args()
produce_report('numerical_avalanche_wet.py', args=args)
| 15.2 | 55 | 0.815789 |
797fc0545b08d12fe074c65dbd40e8bf3d02bf24 | 3,522 | py | Python | bindings/python/ensmallen/datasets/string/corynebacteriumsphmsc034a01.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/corynebacteriumsphmsc034a01.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/corynebacteriumsphmsc034a01.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Corynebacterium sp. HMSC034A01.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein-... | 33.542857 | 223 | 0.680579 |
797fc0766df26d9482892bc73107252e0c4efcbf | 7,657 | py | Python | src/harness/reference_models/tools/benchmark/prof_agg_interf.py | nirajankeybridge/Spectrum-Access-System | e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1 | [
"Apache-2.0"
] | null | null | null | src/harness/reference_models/tools/benchmark/prof_agg_interf.py | nirajankeybridge/Spectrum-Access-System | e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1 | [
"Apache-2.0"
] | null | null | null | src/harness/reference_models/tools/benchmark/prof_agg_interf.py | nirajankeybridge/Spectrum-Access-System | e4e157f3b8fc9f29cb6fbb283acc3a7cbb1212e1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 SAS Project 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 requ... | 36.990338 | 81 | 0.67546 |
797fc0804c4b1cbbc50aad4379f1330835025a27 | 519 | py | Python | TransCharactor2Img.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 199 | 2019-09-09T08:44:19.000Z | 2022-03-24T12:42:04.000Z | TransCharactor2Img.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 4 | 2020-08-06T08:03:28.000Z | 2022-01-06T15:14:36.000Z | TransCharactor2Img.py | uuidd/SimilarCharacter | 22e5f4b0b2798d903435aeb989ff2d0a4ad59d70 | [
"MIT"
] | 58 | 2019-10-10T06:56:43.000Z | 2022-03-21T02:58:01.000Z | # coding=utf-8
import os
import pygame
import Character
# 此程序用于将汉字转图片输出,以便利用opencv进行相似度识别
chinese_dir = 'D:/py/chinese/'
if not os.path.exists(chinese_dir):
os.mkdir( chinese_dir)
pygame.init()
for i,word in enumerate(Character.Symbol_lst()):
font = pygame.font.Font("C:\Windows\Fonts\msyh.ttf", ... | 28.833333 | 114 | 0.687861 |
797fc11388d2eaf4590c7f76788f05f1c08b896c | 9,879 | py | Python | src/ape/managers/config.py | mikeshultz/ape | 731b556b88f3830c5a94511bc3ab32c86bd972a8 | [
"Apache-2.0"
] | null | null | null | src/ape/managers/config.py | mikeshultz/ape | 731b556b88f3830c5a94511bc3ab32c86bd972a8 | [
"Apache-2.0"
] | 1 | 2022-03-05T07:08:07.000Z | 2022-03-11T17:05:13.000Z | src/ape/managers/config.py | mikeshultz/ape | 731b556b88f3830c5a94511bc3ab32c86bd972a8 | [
"Apache-2.0"
] | null | null | null | import os
from contextlib import contextmanager
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Union
from hexbytes import HexBytes
from pydantic import root_validator
from ape.api import ConfigDict, DependencyAPI, PluginConfig
from ape.exceptions import ConfigError
fr... | 36.724907 | 100 | 0.63964 |
797fc1c5b7d375926db41d98d991802898c5081f | 975 | py | Python | sample/ch2/api-weather.py | wagase/scraping | 81e886abe0f8a88830507c978f10f92faf4f19c6 | [
"MIT"
] | null | null | null | sample/ch2/api-weather.py | wagase/scraping | 81e886abe0f8a88830507c978f10f92faf4f19c6 | [
"MIT"
] | null | null | null | sample/ch2/api-weather.py | wagase/scraping | 81e886abe0f8a88830507c978f10f92faf4f19c6 | [
"MIT"
] | 2 | 2017-11-21T07:30:01.000Z | 2018-10-18T01:45:58.000Z | import requests
import json
# APIキーの指定 - 以下を書き換えてください★ --- (※1)
apikey = "474d59dd890c4108f62f192e0c6fce01"
# 天気を調べたい都市の一覧 --- (※2)
cities = ["Tokyo,JP", "London,UK", "New York,US"]
# APIのひな型 --- (※3)
api = "http://api.openweathermap.org/data/2.5/weather?q={city}&APPID={key}"
# 温度変換(ケルビン→摂氏) --- (※4)
k2c = lambda k:... | 28.676471 | 75 | 0.572308 |
797fc3323bae66a91f96cafb347f051232fa746b | 67 | py | Python | envs/assets/__init__.py | mirraaj/PlaNet | 1c0c3ac857e08f3ea2c8753f40ccfaad39259ea2 | [
"MIT"
] | null | null | null | envs/assets/__init__.py | mirraaj/PlaNet | 1c0c3ac857e08f3ea2c8753f40ccfaad39259ea2 | [
"MIT"
] | null | null | null | envs/assets/__init__.py | mirraaj/PlaNet | 1c0c3ac857e08f3ea2c8753f40ccfaad39259ea2 | [
"MIT"
] | null | null | null | import os
MODEL_PATH = os.path.abspath(os.path.dirname(__file__))
| 16.75 | 55 | 0.776119 |
797fc34429ce133fb89b9dfe8203067f2bfeacd3 | 824 | py | Python | sheetsite/source/__init__.py | paulfitz/sheetsite | 3ec3226a3d7e9cce7e92e5bcae96acf4d970ab0e | [
"MIT"
] | 33 | 2016-01-17T15:32:56.000Z | 2020-11-30T01:49:32.000Z | sheetsite/source/__init__.py | paulfitz/sheetsite | 3ec3226a3d7e9cce7e92e5bcae96acf4d970ab0e | [
"MIT"
] | null | null | null | sheetsite/source/__init__.py | paulfitz/sheetsite | 3ec3226a3d7e9cce7e92e5bcae96acf4d970ab0e | [
"MIT"
] | 3 | 2018-10-30T08:32:28.000Z | 2020-11-30T02:03:22.000Z | import os
from sheetsite.source.csv import read_source_csv
from sheetsite.source.google import read_source_google
from sheetsite.source.excel import read_source_excel
from sheetsite.source.json import read_source_json
def read_source(params):
readers = {
'.csv': read_source_csv,
'google-sheets': ... | 24.235294 | 63 | 0.663835 |
797fc4ad96b08aec80c92af269110c24ba52e088 | 3,688 | py | Python | vv_kuwamai_apps/scripts/read_master.py | Kuwamai/vv_kuwamai_hanko | 35bb6900d54b43c109e0c62623fa56e5a979b3fe | [
"MIT"
] | 5 | 2020-05-26T02:02:55.000Z | 2020-09-14T12:39:51.000Z | vv_kuwamai_apps/scripts/read_master.py | Kuwamai/vv_kuwamai_hanko | 35bb6900d54b43c109e0c62623fa56e5a979b3fe | [
"MIT"
] | null | null | null | vv_kuwamai_apps/scripts/read_master.py | Kuwamai/vv_kuwamai_hanko | 35bb6900d54b43c109e0c62623fa56e5a979b3fe | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#---------------------------------------------------
#Name : read_master.py
#Author : s-shibata
#Created : 2019 / 10 / 01
#Last Date : 2019 / 11 / 25
#Note : Related to vsearch.py and gene_image.py
#---------------------------------------------------
import shutil
from distut... | 28.369231 | 166 | 0.619577 |
797fc56155519486321db539ffc06e23a2cae8a9 | 251 | py | Python | 36-56/EX0038.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | 1 | 2021-05-02T21:09:17.000Z | 2021-05-02T21:09:17.000Z | 36-56/EX0038.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | null | null | null | 36-56/EX0038.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | null | null | null | pnum = int(input('Primeiro número:'))
snum = int(input('Segundo número:'))
if pnum > snum:
print('O primeiro número é maior')
elif snum > pnum:
print('O segundo número é maior')
elif pnum == snum:
print('os dois valores são IGUAIS')
| 22.818182 | 43 | 0.649402 |
797fc65688ab4f5b38823d4e06d0100ac2beef3c | 2,471 | py | Python | src/abaqus/Interaction/AcousticImpedanceState.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Interaction/AcousticImpedanceState.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Interaction/AcousticImpedanceState.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
from .InteractionState import InteractionState
class AcousticImpedanceState(InteractionState):
"""The AcousticImpedanceState object stores the propagating data of an AcousticImpedance
object in a step. One instance of this object is created internally by the
AcousticImpedanc... | 35.811594 | 147 | 0.700931 |
797fc6c520c7a46861cc303a43d171dd4cd01ef6 | 1,365 | py | Python | anstoss3k/engine/states/match_day_preview.py | ericziethen/anstoss3k-poc | e28424556258b24ad4e513011b7597f150ad9719 | [
"MIT"
] | null | null | null | anstoss3k/engine/states/match_day_preview.py | ericziethen/anstoss3k-poc | e28424556258b24ad4e513011b7597f150ad9719 | [
"MIT"
] | 36 | 2020-02-13T09:23:36.000Z | 2022-03-12T00:16:20.000Z | anstoss3k/engine/states/match_day_preview.py | ericziethen/anstoss3k-poc | e28424556258b24ad4e513011b7597f150ad9719 | [
"MIT"
] | null | null | null |
import random
from anstoss3k.engine.definitions import GameAction, GameState, State
class MatchDayPreviewState(State):
def handle_input(self, action):
# Calculate the Results for the current match day
for match in self.data['match_days'][self.data['current_match_day']]:
match['home_s... | 41.363636 | 85 | 0.586081 |
797fc6d5807b7970bca65576b800adca8575ed56 | 2,982 | py | Python | gb_dots_stock_pipelines/comps_calc_cos_similarity/comp_calc_df_snapshot.py | loopinf/vertex-ai-samples | 5ced566373203eb7301609b763cf6b1de1df4560 | [
"Apache-2.0"
] | null | null | null | gb_dots_stock_pipelines/comps_calc_cos_similarity/comp_calc_df_snapshot.py | loopinf/vertex-ai-samples | 5ced566373203eb7301609b763cf6b1de1df4560 | [
"Apache-2.0"
] | null | null | null | gb_dots_stock_pipelines/comps_calc_cos_similarity/comp_calc_df_snapshot.py | loopinf/vertex-ai-samples | 5ced566373203eb7301609b763cf6b1de1df4560 | [
"Apache-2.0"
] | 1 | 2021-08-12T08:36:19.000Z | 2021-08-12T08:36:19.000Z |
from logging import log
def calc_df_snapshot(
date_ref: str,
)-> str:
############## top30 신호등
import logging
logging.basicConfig(level=logging.DEBUG)
import pandas_gbq # type: ignore
import pandas as pd
import numpy as np
from google.cloud import bigquery
from trading_calendars import get_calend... | 31.389474 | 92 | 0.679745 |
797fc6dcbc17b723d06f66504ba781b42eb358ce | 2,118 | py | Python | modoboa/admin/tests/utils.py | Makakken-Crew/modoboa | faac20fe36e26bd7c01edc2adb12312dda4cfaa2 | [
"ISC"
] | null | null | null | modoboa/admin/tests/utils.py | Makakken-Crew/modoboa | faac20fe36e26bd7c01edc2adb12312dda4cfaa2 | [
"ISC"
] | null | null | null | modoboa/admin/tests/utils.py | Makakken-Crew/modoboa | faac20fe36e26bd7c01edc2adb12312dda4cfaa2 | [
"ISC"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test utilities."""
from __future__ import unicode_literals
import socket
from dns.name import Name
from dns.rdtypes.ANY.MX import MX
from dns.resolver import NXDOMAIN, NoAnswer, NoNameservers, Timeout
_MX_RECORD_1 = MX("IN", "MX", 10, Name("mx.example.com".split(".")))
_MX_RECORD_2 = MX(... | 33.09375 | 80 | 0.675637 |
797fc953ade9bcede0acf0161ee553dda2daee40 | 655 | py | Python | setup.py | vjmiyagi/lambdata_vjmiyagi | 83bd31b2f97bba064e81b46176edff2778e89ed0 | [
"MIT"
] | null | null | null | setup.py | vjmiyagi/lambdata_vjmiyagi | 83bd31b2f97bba064e81b46176edff2778e89ed0 | [
"MIT"
] | null | null | null | setup.py | vjmiyagi/lambdata_vjmiyagi | 83bd31b2f97bba064e81b46176edff2778e89ed0 | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="lambdata_vjmiyagi",
version="0.0.4",
author="VJ Miyagi",
author_email="velmamiyagi@gmail.com",
description="A small example package",
long_description=long_description,
long_desc... | 26.2 | 56 | 0.667176 |
797fc9a5fb9106e3af1f70f3644de5ab8dbce4ac | 5,355 | py | Python | isi_sdk_8_1_1/isi_sdk_8_1_1/api/sync_policies_api.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/api/sync_policies_api.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_1_1/isi_sdk_8_1_1/api/sync_policies_api.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 6
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and pyth... | 37.711268 | 136 | 0.636601 |
797fcaf54eee146fbaad02b9622013732020c7ab | 9,134 | py | Python | src/psd_tools/user_api/bl_support.py | ywaby/blender-layers-image | f921f81698318704413e154976cbf0e06d8e2f76 | [
"MIT"
] | 1 | 2017-03-18T01:31:03.000Z | 2017-03-18T01:31:03.000Z | src/psd_tools/user_api/bl_support.py | ywaby/blender-layers-image | f921f81698318704413e154976cbf0e06d8e2f76 | [
"MIT"
] | null | null | null | src/psd_tools/user_api/bl_support.py | ywaby/blender-layers-image | f921f81698318704413e154976cbf0e06d8e2f76 | [
"MIT"
] | null | null | null | """
"""
import array
import warnings
import collections
import numpy
from psd_tools.utils import fix_byteorder
from psd_tools.constants import Compression, ChannelID, ColorMode
try:
import packbits
import bpy
except ImportError:
pass
class BBox(collections.namedtuple('BBox', 'x1, y1, x2, y2')):
@prope... | 36.102767 | 121 | 0.663565 |
797fcc828a30ff059a4160ebf3006afd678cca7c | 14,648 | py | Python | test/functional/interface_rest.py | Ragginn/bitcoin | da3a2b82af5b4ac65bdb5c8044af9c39ebcf3a00 | [
"MIT"
] | 1 | 2019-12-09T13:00:00.000Z | 2019-12-09T13:00:00.000Z | test/functional/interface_rest.py | osirusgroup/bitcoin | 91559da683dbf5de101b7722cdac341963d2433a | [
"MIT"
] | null | null | null | test/functional/interface_rest.py | osirusgroup/bitcoin | 91559da683dbf5de101b7722cdac341963d2433a | [
"MIT"
] | 1 | 2019-12-09T13:00:30.000Z | 2019-12-09T13:00:30.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the REST API."""
import binascii
from decimal import Decimal
from enum import Enum
from io import... | 44.522796 | 153 | 0.661182 |
797fcea7769143f3074a5f8feaf447cd6dad5a53 | 14,395 | py | Python | slowfast/utils/misc.py | sovan-biswas/MITL | 7ea4a305aae45a58c857ea05102bd491019950f2 | [
"Apache-2.0"
] | null | null | null | slowfast/utils/misc.py | sovan-biswas/MITL | 7ea4a305aae45a58c857ea05102bd491019950f2 | [
"Apache-2.0"
] | 1 | 2021-11-23T11:29:53.000Z | 2021-11-23T11:29:53.000Z | slowfast/utils/misc.py | sovan-biswas/MITL | 7ea4a305aae45a58c857ea05102bd491019950f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import json
import logging
import math
import numpy as np
import os
from datetime import datetime
import psutil
import torch
from fvcore.nn.activation_count import activation_count
from fvcore.nn.flop_count import flop_count... | 34.030733 | 123 | 0.603196 |
797fcfafcc79acf1a13b5d7ca5c70dad67e20c85 | 7,491 | py | Python | homeassistant/components/mysensors/climate.py | sunfirester/core | 9a4f6d0c8018679f84508911d60c2cd1ec3609ce | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mysensors/climate.py | sunfirester/core | 9a4f6d0c8018679f84508911d60c2cd1ec3609ce | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mysensors/climate.py | sunfirester/core | 9a4f6d0c8018679f84508911d60c2cd1ec3609ce | [
"Apache-2.0"
] | null | null | null | """MySensors platform that offers a Climate (MySensors-HVAC) component."""
from homeassistant.components import mysensors
from homeassistant.components.climate import ClimateEntity
from homeassistant.components.climate.const import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
DOMAIN,
HVAC_MODE_AUTO,
... | 34.84186 | 85 | 0.653718 |
797fcfb4429df527f8e9d61a3a2d6566dbd75156 | 6,471 | py | Python | tests/python_binding/test_gate_library.py | e7p/hal | 2a88a8abefe5e2f79a74ec646e5fb3d8e6eb7cc8 | [
"MIT"
] | 407 | 2019-04-26T10:45:52.000Z | 2022-03-31T15:52:30.000Z | tests/python_binding/test_gate_library.py | e7p/hal | 2a88a8abefe5e2f79a74ec646e5fb3d8e6eb7cc8 | [
"MIT"
] | 219 | 2019-04-29T16:42:01.000Z | 2022-03-11T22:57:41.000Z | tests/python_binding/test_gate_library.py | e7p/hal | 2a88a8abefe5e2f79a74ec646e5fb3d8e6eb7cc8 | [
"MIT"
] | 53 | 2019-05-02T21:23:35.000Z | 2022-03-11T19:46:05.000Z | import sys
import os
# Automatically searches for the hal_py.so file and adds its path to the environment variables
dirname = os.path.dirname(__file__)
hal_path = os.path.join(dirname, '../../')
hal_py_path = None
hal_base_path = None
for p in os.listdir(hal_path):
build_path = os.path.join(hal_path, p)
if n... | 33.879581 | 117 | 0.655386 |
797fd000e139328240053c71ad0e5061003b5e90 | 1,426 | py | Python | opsplugins/dhcptftpservervalidations.py | OpenSwitchNOS/openswitch-ops-dhcp-tftp | 5d49e0d63296d9886912a84f031a811f413ba7fd | [
"Apache-2.0"
] | null | null | null | opsplugins/dhcptftpservervalidations.py | OpenSwitchNOS/openswitch-ops-dhcp-tftp | 5d49e0d63296d9886912a84f031a811f413ba7fd | [
"Apache-2.0"
] | null | null | null | opsplugins/dhcptftpservervalidations.py | OpenSwitchNOS/openswitch-ops-dhcp-tftp | 5d49e0d63296d9886912a84f031a811f413ba7fd | [
"Apache-2.0"
] | 1 | 2021-09-10T08:19:13.000Z | 2021-09-10T08:19:13.000Z | #!/usr/bin/env python
# Copyright (C) 2016 Hewlett Packard Enterprise Development LP
# 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/... | 25.927273 | 75 | 0.715288 |
797fd1e588bd04d452b487b63e6ca9db904a21b4 | 5,194 | py | Python | low_level_interface/mixture_impianto_senza_eiettore_sep_x_ottimo.py | gu997/mixture | 551ac3cdc61d0d6f5ca7eb7d912abf2da64a9e3f | [
"MIT"
] | null | null | null | low_level_interface/mixture_impianto_senza_eiettore_sep_x_ottimo.py | gu997/mixture | 551ac3cdc61d0d6f5ca7eb7d912abf2da64a9e3f | [
"MIT"
] | null | null | null | low_level_interface/mixture_impianto_senza_eiettore_sep_x_ottimo.py | gu997/mixture | 551ac3cdc61d0d6f5ca7eb7d912abf2da64a9e3f | [
"MIT"
] | null | null | null | import numpy as np
import CoolProp.CoolProp as CP
#import grafici_termodinamici as gt
import grafici_termodinamici_mixture as gt
from scipy.optimize import fsolve
import compressore as c
#from mixture_impianto_senza_eiettore_sep_function_T7fix import Funz as Funz7
from mixture_impianto_senza_eiettore_sep_function impor... | 27.62766 | 126 | 0.497305 |
797fd32831424894e90c6900373c231b38b21d70 | 4,877 | py | Python | ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py | dilica/ambari | b3f77793cd5b45fc4f01c937ca19bf4387018de7 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py | dilica/ambari | b3f77793cd5b45fc4f01c937ca19bf4387018de7 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/infra_solr.py | dilica/ambari | b3f77793cd5b45fc4f01c937ca19bf4387018de7 | [
"Apache-2.0"
] | null | null | null | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 35.860294 | 182 | 0.720115 |
797fd425723325032e07aee3bcbb8f1ca09c8620 | 10,098 | py | Python | pyblp/results/simulation_results.py | mcaceresb/pyblp | b8c14125402f2fa87c2cd8654118eae438b3c22b | [
"MIT"
] | null | null | null | pyblp/results/simulation_results.py | mcaceresb/pyblp | b8c14125402f2fa87c2cd8654118eae438b3c22b | [
"MIT"
] | null | null | null | pyblp/results/simulation_results.py | mcaceresb/pyblp | b8c14125402f2fa87c2cd8654118eae438b3c22b | [
"MIT"
] | null | null | null | """Economy-level structuring of BLP simulation results."""
import time
from typing import Dict, Hashable, List, Optional, Sequence, Tuple, TYPE_CHECKING, Union
import numpy as np
from .. import exceptions, options
from ..configurations.formulation import Formulation
from ..configurations.integration import Integrati... | 41.900415 | 120 | 0.656566 |
797fd7473838878ebb4cf480da1dd7ccfe0b9796 | 531 | py | Python | tests/test_cudasetup.py | NiftyPET/ninst | ecf0ef6016e5a59a49fdfc5bf2a7b09408acd9d8 | [
"Apache-2.0"
] | null | null | null | tests/test_cudasetup.py | NiftyPET/ninst | ecf0ef6016e5a59a49fdfc5bf2a7b09408acd9d8 | [
"Apache-2.0"
] | 12 | 2020-12-29T02:20:44.000Z | 2021-08-11T11:14:54.000Z | tests/test_cudasetup.py | NiftyPET/NINST | ecf0ef6016e5a59a49fdfc5bf2a7b09408acd9d8 | [
"Apache-2.0"
] | null | null | null | import logging
from niftypet.ninst import cudasetup as cs
def test_find_cuda(caplog):
with caplog.at_level(logging.WARNING):
cuda = cs.find_cuda()
assert cuda or caplog.record_tuples
def test_dev_setup(caplog, nvml):
with caplog.at_level(logging.WARNING):
ccstr = cs.dev_setup()
asse... | 23.086957 | 43 | 0.72693 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.