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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0305e1a30583d4b5af720652c7253821328032 | 469 | py | Python | Ar_Script/ar_171_office_读取excel案例.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | Ar_Script/ar_171_office_读取excel案例.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | 1 | 2020-01-19T01:19:57.000Z | 2020-01-19T01:19:57.000Z | Ar_Script/ar_171_office_读取excel案例.py | archerckk/PyTest | 610dd89df8d70c096f4670ca11ed2f0ca3196ca5 | [
"MIT"
] | null | null | null | import openpyxl
'读取已存在的excel文件'
wb=openpyxl.load_workbook('result/豆瓣top250.xlsx')
ws=wb.active
'用一个列表显示所有工作表的名字'
'get_sheet_names不建议使用'
names=wb.sheetnames
print(names)
# '创建工作表'
# wb.create_sheet(index=1,title='新建工作表')
# ws=wb.create_sheet(index=2,title='新建工作表2')
'复制工作表'
wb.copy_worksheet(ws)
# '删除工作表'
# wb.rem... | 16.172414 | 49 | 0.754797 |
4a03060adf7dad940159afc2030edbcbe84c1d86 | 109 | py | Python | turtle1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null | turtle1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null | turtle1.py | abkumarggn/python-learning-1 | df45396cd14f5762053728760953b3806d0069b6 | [
"Apache-2.0"
] | null | null | null |
import turtle
tur=turtle.Turtle()
for i in range(50):
tur.forward(50)
tur.right(144)
turtle.done()
| 12.111111 | 19 | 0.669725 |
4a03063e3e062056324eb86aafef197e28bb815b | 822 | py | Python | Diena_7_functions/fun_scope_g2.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 8 | 2020-08-31T16:10:54.000Z | 2021-11-24T06:37:37.000Z | Diena_7_functions/fun_scope_g2.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 8 | 2021-06-08T22:30:29.000Z | 2022-03-12T00:48:55.000Z | Diena_7_functions/fun_scope_g2.py | edzya/Python_RTU_08_20 | d2921d998c611c18328dd523daf976a27ce858c1 | [
"MIT"
] | 12 | 2020-09-28T17:06:52.000Z | 2022-02-17T12:12:46.000Z | global_var = 500
global_list = [1, 2, 3]
# primitive get assigned a new id upon modification
def my_fun(arg_var):
print("INSIDE my_fun", arg_var, id(arg_var))
arg_var += 20
print("After +=", arg_var, id(arg_var))
return arg_var
# mutable data can be modified inside function and reference stays
def... | 24.909091 | 66 | 0.716545 |
4a03067bc24191307dfdf0f509f78fb0ec99790f | 18,337 | py | Python | pimsclient/client.py | sjoerdk/pimsclient | cb03e326ef87638cc10ae32badf453fed6391028 | [
"MIT"
] | null | null | null | pimsclient/client.py | sjoerdk/pimsclient | cb03e326ef87638cc10ae32badf453fed6391028 | [
"MIT"
] | 224 | 2019-06-03T03:09:40.000Z | 2022-03-28T08:17:17.000Z | pimsclient/client.py | sjoerdk/pimsclient | cb03e326ef87638cc10ae32badf453fed6391028 | [
"MIT"
] | 1 | 2020-05-27T09:52:24.000Z | 2020-05-27T09:52:24.000Z | """Classes and functions for working with the PIMS pseudonym management system.
This module adds one level above the Swagger level, abstracting away details and
making it easy to work with multiple types of pseudonym under a single project
description
"""
from typing import List
from pimsclient.exceptions import PIMS... | 28.651563 | 86 | 0.622785 |
4a030791dc5051de43384e33508514035233227f | 2,280 | py | Python | safe_control_gym/controllers/__init__.py | molumitu/safe-control-gym | 81bec94d278c99e61fbf626ef39ac171e8c6f8c8 | [
"MIT"
] | 1 | 2022-03-01T03:18:05.000Z | 2022-03-01T03:18:05.000Z | safe_control_gym/controllers/__init__.py | molumitu/safe-control-gym | 81bec94d278c99e61fbf626ef39ac171e8c6f8c8 | [
"MIT"
] | null | null | null | safe_control_gym/controllers/__init__.py | molumitu/safe-control-gym | 81bec94d278c99e61fbf626ef39ac171e8c6f8c8 | [
"MIT"
] | null | null | null | """Register controllers.
"""
from safe_control_gym.utils.registration import register
# register(id="cbf",
# entry_point="safe_control_gym.controllers.cbf.cbf_qp:CBF_QP",
# config_entry_point="safe_control_gym.controllers.cbf:cbf_qp.yaml")
# register(id="lqr",
# entry_point="safe_control_g... | 40 | 91 | 0.739474 |
4a03098dd08ac1ba355af08940138870846978ec | 578 | py | Python | recipes/recipes/gerrit_cq_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipes/gerrit_cq_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipes/gerrit_cq_test.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
DEPS = [
'depot_tools/bot_update',
'depot_tools/gclient',
'recipe_engine/properties',
]
REPO = 'https://chromium.googlesource.com/playground/gerrit-cq... | 24.083333 | 74 | 0.740484 |
4a030a3845c7f490303895210afb286d4a581eb7 | 3,502 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/express_route_gateway_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/express_route_gateway_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/express_route_gateway_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.234568 | 144 | 0.653055 |
4a030adafb4f485c6fa491b32a5e44d3f3982f1d | 26,713 | py | Python | town_data/safegraph_processing/210701_safegraph_data_processing.py | atruszkowska/NR-population-revac | 3f35be85755bc7233cd1330ea1fbc0346c8dc04c | [
"MIT"
] | null | null | null | town_data/safegraph_processing/210701_safegraph_data_processing.py | atruszkowska/NR-population-revac | 3f35be85755bc7233cd1330ea1fbc0346c8dc04c | [
"MIT"
] | null | null | null | town_data/safegraph_processing/210701_safegraph_data_processing.py | atruszkowska/NR-population-revac | 3f35be85755bc7233cd1330ea1fbc0346c8dc04c | [
"MIT"
] | 1 | 2021-09-21T18:56:10.000Z | 2021-09-21T18:56:10.000Z | import csv
#
# The original SafeGraph data are uploaded to Google drive due to the size limit of GitHub
# Link:
# The data are in groups by year
# with 1 group (5 files) of 2020 and 3 groups (6 files each) of 2021
#
def convertFile(inFileName, outFileName):
''' Convert the comma separated file to a tab separated... | 48.835466 | 132 | 0.581477 |
4a030b8b7b874f1fddbdd31c4af3371ea716740e | 1,247 | py | Python | src/downhill-0.2.2/test/util.py | masterkeywikz/seq2graph | 745cb09f10c67a77c0ef517f5d58ac45f2ade09d | [
"MIT"
] | 10 | 2017-02-25T17:26:15.000Z | 2022-02-23T06:36:54.000Z | src/downhill-0.2.2/test/util.py | masterkeywikz/seq2graph | 745cb09f10c67a77c0ef517f5d58ac45f2ade09d | [
"MIT"
] | null | null | null | src/downhill-0.2.2/test/util.py | masterkeywikz/seq2graph | 745cb09f10c67a77c0ef517f5d58ac45f2ade09d | [
"MIT"
] | 8 | 2016-12-22T00:36:33.000Z | 2021-05-19T17:55:59.000Z | import downhill
import numpy as np
import theano
import theano.tensor as TT
def build_rosen(algo):
x = theano.shared(-3 + np.zeros((2, ), 'f'), name='x')
return downhill.build(
algo,
loss=(100 * (x[1:] - x[:-1] ** 2) ** 2 + (1 - x[:-1]) ** 2).sum(),
monitors=[('x', x[:-1].sum()), ('y',... | 31.175 | 74 | 0.510024 |
4a030c4bf590165dc99c53d1376e0a1e13ab3167 | 2,987 | py | Python | marltoolbox/utils/policy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | marltoolbox/utils/policy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | marltoolbox/utils/policy.py | tobiasbaumann1/amd | cb6190be92dea54db04ef9202d381b96f6f6218b | [
"MIT"
] | null | null | null | import gym
from ray.rllib.policy.policy import Policy
from ray.rllib.utils.typing import TrainerConfigDict
from marltoolbox.utils.restore import LOAD_FROM_CONFIG_KEY
def get_tune_policy_class(PolicyClass):
"""
Allow to convert a Tune trainer into a frozen RLLib policy (no training possible).
:param Poli... | 40.917808 | 120 | 0.678607 |
4a030c73a99b159ff7b42fb3a5f382b7ddb55615 | 107 | py | Python | qy/main/__init__.py | v2up/queyue | 0e6c034cb9eec8f4ab2f3e8983e78cb609a2af1d | [
"MIT"
] | null | null | null | qy/main/__init__.py | v2up/queyue | 0e6c034cb9eec8f4ab2f3e8983e78cb609a2af1d | [
"MIT"
] | null | null | null | qy/main/__init__.py | v2up/queyue | 0e6c034cb9eec8f4ab2f3e8983e78cb609a2af1d | [
"MIT"
] | null | null | null | from flask import Blueprint #使用蓝本
main = Blueprint('main', __name__) #实例化一个蓝本
from . import views, errors | 21.4 | 43 | 0.757009 |
4a030c821dac217e6b5669158ccb777cedfbf191 | 65,445 | py | Python | test/unit/obj/test_ssync_receiver.py | IPVL/swift-kilo | fe4cdb597f70e40c667b001b446546d75a7a5ab0 | [
"Apache-2.0"
] | null | null | null | test/unit/obj/test_ssync_receiver.py | IPVL/swift-kilo | fe4cdb597f70e40c667b001b446546d75a7a5ab0 | [
"Apache-2.0"
] | null | null | null | test/unit/obj/test_ssync_receiver.py | IPVL/swift-kilo | fe4cdb597f70e40c667b001b446546d75a7a5ab0 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 44.189737 | 79 | 0.548797 |
4a030d0d10693ccc0dc01baebecedeef6667147f | 298 | py | Python | python_to_you/domain/users/user.py | jacksonsr45/python_to_you | f0016e0450f3f2a4ba1f592baff8a9c28ffeaec7 | [
"MIT"
] | 1 | 2021-05-11T12:09:00.000Z | 2021-05-11T12:09:00.000Z | python_to_you/domain/users/user.py | jacksonsr45/python_to_you | f0016e0450f3f2a4ba1f592baff8a9c28ffeaec7 | [
"MIT"
] | null | null | null | python_to_you/domain/users/user.py | jacksonsr45/python_to_you | f0016e0450f3f2a4ba1f592baff8a9c28ffeaec7 | [
"MIT"
] | null | null | null | from python_to_you.models import User
class User():
def __init__(self):
self.user = User
def get(self):
...
def create_account(self):
...
def register_user(self):
...
def update(self):
...
def delete(self):
... | 11.461538 | 37 | 0.489933 |
4a030d39aef78d48d87925f1f271d313d1907fdd | 1,730 | py | Python | utils/auth.py | Misschl/flask-fresh | df17fd377b9e27aaad9fe0c5582c56098d09068c | [
"Apache-2.0"
] | null | null | null | utils/auth.py | Misschl/flask-fresh | df17fd377b9e27aaad9fe0c5582c56098d09068c | [
"Apache-2.0"
] | null | null | null | utils/auth.py | Misschl/flask-fresh | df17fd377b9e27aaad9fe0c5582c56098d09068c | [
"Apache-2.0"
] | 1 | 2020-12-21T14:01:53.000Z | 2020-12-21T14:01:53.000Z | from utils.extentions import db
from functools import wraps
from flask import session, redirect
import flask
from config import LOGIN_URL, AUTH_USER_MODEL
import importlib
def login(user):
session['login'] = user.id
def logout():
session.clear()
def initialize_user_model():
app, user_model_class = AUT... | 21.097561 | 103 | 0.645665 |
4a030e72686480a11173b730a814d96b23f696b3 | 1,607 | py | Python | lintreview/tools/jsonlint.py | esoergel/lint-review | 3c93bee30259825653853b6d2c322d0f92e34e43 | [
"MIT"
] | null | null | null | lintreview/tools/jsonlint.py | esoergel/lint-review | 3c93bee30259825653853b6d2c322d0f92e34e43 | [
"MIT"
] | null | null | null | lintreview/tools/jsonlint.py | esoergel/lint-review | 3c93bee30259825653853b6d2c322d0f92e34e43 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
import logging
from lintreview.tools import Tool
from lintreview.tools import run_command
from lintreview.utils import in_path
log = logging.getLogger(__name__)
class Jsonlint(Tool):
name = 'jsonlint'
def check_dependencies(self):
"""
See if ... | 27.706897 | 68 | 0.579963 |
4a03106f3f23cef732acc3511fc74ad991561d71 | 22,370 | py | Python | contrib/devtools/copyright_header.py | qogecoin/qogecoin | fce42076f1a2746525374f50f35939392f37ca84 | [
"MIT"
] | 9 | 2021-10-30T01:01:50.000Z | 2022-02-10T02:20:44.000Z | contrib/devtools/copyright_header.py | qogecoin/qogecoin | fce42076f1a2746525374f50f35939392f37ca84 | [
"MIT"
] | 4 | 2021-10-17T19:59:16.000Z | 2021-11-04T19:11:25.000Z | contrib/devtools/copyright_header.py | qogecoin/qogecoin | fce42076f1a2746525374f50f35939392f37ca84 | [
"MIT"
] | 7 | 2021-11-01T09:09:41.000Z | 2022-03-23T02:47:30.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2021 The Bitcoin and Qogecoin Core Authors
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
import datetime
import os
##############... | 36.792763 | 121 | 0.601967 |
4a0310a3638b52c69196ebbf03e1ac23b2c28599 | 2,644 | py | Python | app/implementation.py | Anguandia/i-reporter | 61c8236174101a229a72a2a4a01c465062dba893 | [
"MIT"
] | null | null | null | app/implementation.py | Anguandia/i-reporter | 61c8236174101a229a72a2a4a01c465062dba893 | [
"MIT"
] | null | null | null | app/implementation.py | Anguandia/i-reporter | 61c8236174101a229a72a2a4a01c465062dba893 | [
"MIT"
] | null | null | null | from .models import RedFlag
import datetime
red_flags = {}
class Implementation:
def create(self, data):
others = {
'type': 'red-flag', 'status': 'draft', 'videos': '', 'images': '',
'comment': ''}
red_flag = RedFlag(
(len(red_flags)+1), data['location'], data[... | 34.789474 | 78 | 0.496218 |
4a03114d83ccc6d1fa15c69df79ec51c5ef079fc | 2,153 | py | Python | IoT/Distance_sensor/lib/ultraSonicSensor.py | Palmen98/DashboardExJobb | b74defdff529b14cc1ce8a54206af0c71b3ac90c | [
"MIT"
] | null | null | null | IoT/Distance_sensor/lib/ultraSonicSensor.py | Palmen98/DashboardExJobb | b74defdff529b14cc1ce8a54206af0c71b3ac90c | [
"MIT"
] | null | null | null | IoT/Distance_sensor/lib/ultraSonicSensor.py | Palmen98/DashboardExJobb | b74defdff529b14cc1ce8a54206af0c71b3ac90c | [
"MIT"
] | null | null | null | import utime
import pycom
import time
from machine import Pin
import lora
import light_manager
import keys
# initialise Ultrasonic Sensor pins
echo = Pin('P18', mode=Pin.IN)
trigger = Pin('P20', mode=Pin.OUT)
trigger(0)
# Ultrasonic distance measurment
def distance_measure():
# trigger pulse LOW for 2us (just in ... | 25.630952 | 100 | 0.69856 |
4a03116f1dcdb76c39cffbbc627aad796eea561c | 9,259 | py | Python | sympy/physics/optics/waves.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/physics/optics/waves.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | sympy/physics/optics/waves.py | msgoff/sympy | 1e7daef7514902f5e89718fa957b7b36c6669a10 | [
"BSD-3-Clause"
] | null | null | null | """
This module has all the classes and functions related to waves in optics.
**Contains**
* TWave
"""
from __future__ import print_function, division
__all__ = ["TWave"]
from sympy import sympify, pi, sin, cos, sqrt, Symbol, S, symbols, Derivative, atan2
from sympy.core.expr import Expr
from sympy.physics.units i... | 28.489231 | 88 | 0.532779 |
4a0312128c64d1bc08da33e7e2ad816aad56b468 | 20,612 | py | Python | yt/frontends/flash/data_structures.py | dpgrote/yt | 74862c05f9243a674d2b4cc8d6adfa9eee5f2d96 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/flash/data_structures.py | dpgrote/yt | 74862c05f9243a674d2b4cc8d6adfa9eee5f2d96 | [
"BSD-3-Clause-Clear"
] | 8 | 2020-04-02T16:51:49.000Z | 2022-01-11T14:12:44.000Z | yt/frontends/flash/data_structures.py | dpgrote/yt | 74862c05f9243a674d2b4cc8d6adfa9eee5f2d96 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-08-12T15:46:11.000Z | 2021-02-09T13:09:17.000Z | import os
import weakref
import numpy as np
from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch
from yt.data_objects.static_output import Dataset, ParticleFile, validate_index_order
from yt.funcs import mylog, setdefaultattr
from yt.geometry.grid_geometry_handler import GridIndex
from yt.geometry.par... | 38.17037 | 88 | 0.548661 |
4a031251254d73fc99e5900a15a2860deac1dcf3 | 2,907 | py | Python | tests/unit/model/test_base.py | JawboneHealth/jhhalchemy | 68854e1ac5ee959287de70fd156d187c9025703c | [
"Apache-2.0"
] | 2 | 2017-09-21T23:10:25.000Z | 2018-01-20T16:21:29.000Z | tests/unit/model/test_base.py | JawboneHealth/jhhalchemy | 68854e1ac5ee959287de70fd156d187c9025703c | [
"Apache-2.0"
] | 3 | 2018-06-27T16:13:54.000Z | 2018-06-28T20:10:31.000Z | tests/unit/model/test_base.py | JawboneHealth/jhhalchemy | 68854e1ac5ee959287de70fd156d187c9025703c | [
"Apache-2.0"
] | 1 | 2018-01-25T00:09:53.000Z | 2018-01-25T00:09:53.000Z | """
Unit tests for the Base model
"""
import jhhalchemy.model
import mock
import pytest
@pytest.fixture
def base_instance():
return jhhalchemy.model.Base()
def test_base_save(base_instance):
"""
Verify add and commit to DB.
:param base_instance: instance of Base model
"""
session = mock.Moc... | 26.427273 | 93 | 0.719298 |
4a0312bcecb3638e53efa03df91178bab90a5902 | 6,571 | py | Python | homeassistant/components/hassio/handler.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 22,481 | 2020-03-02T13:09:59.000Z | 2022-03-31T23:34:28.000Z | homeassistant/components/hassio/handler.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/hassio/handler.py | andersop91/core | 0e0ef0aa17073609eae7c974cf4c73306b7c414b | [
"Apache-2.0"
] | 11,411 | 2020-03-02T14:19:20.000Z | 2022-03-31T22:46:07.000Z | """Handler for Hass.io."""
import asyncio
from http import HTTPStatus
import logging
import os
import aiohttp
from homeassistant.components.http import (
CONF_SERVER_HOST,
CONF_SERVER_PORT,
CONF_SSL_CERTIFICATE,
)
from homeassistant.const import SERVER_PORT
from .const import X_HASSIO
_LOGGER = logging.... | 27.041152 | 89 | 0.602952 |
4a03132af8619849f94f5e95bea70afca93c1c80 | 693 | py | Python | datasets/publaynet_gscnn.py | LivingSkyTechnologies/Document_Layout_Segmentation | 0db00a18fb39afa1efa8ae183bbd57309a6ebfcf | [
"MIT"
] | 4 | 2021-01-28T23:06:43.000Z | 2022-01-15T19:17:07.000Z | datasets/publaynet_gscnn.py | LivingSkyTechnologies/Document_Layout_Segmentation | 0db00a18fb39afa1efa8ae183bbd57309a6ebfcf | [
"MIT"
] | 2 | 2021-01-25T21:54:05.000Z | 2021-08-23T21:19:21.000Z | datasets/publaynet_gscnn.py | LivingSkyTechnologies/Document_Layout_Segmentation | 0db00a18fb39afa1efa8ae183bbd57309a6ebfcf | [
"MIT"
] | 2 | 2021-01-28T13:39:33.000Z | 2022-01-15T19:17:13.000Z | import os
from models.gated_scnn.gated_shape_cnn.datasets.publaynet.dataset import PubLayNet
class_mapping = {1: 'text', 2: 'title', 3: 'list', 4: 'table', 5: 'figure', 0: 'background'}
def build_gscnn_dataset(dataset_dir, img_size, batch_size, seed):
publaynet_dataset_loader = PubLayNet(
batch_size,
... | 28.875 | 92 | 0.712843 |
4a031332e610bf3529dd32768b8a11ccdf47135e | 9,962 | py | Python | tests/windows_packages/ntttcp_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 3 | 2018-04-28T13:06:14.000Z | 2020-06-09T02:39:44.000Z | tests/windows_packages/ntttcp_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 1 | 2021-09-09T07:43:25.000Z | 2021-09-09T10:47:56.000Z | tests/windows_packages/ntttcp_test.py | Nowasky/PerfKitBenchmarker | cfa88e269eb373780910896ed4bdc8db09469753 | [
"Apache-2.0"
] | 6 | 2019-06-11T18:59:57.000Z | 2021-03-02T19:14:42.000Z | # Copyright 2015 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.490842 | 80 | 0.62367 |
4a0313d5f86a9d6edd0db484fe753aa6f9c30a99 | 2,660 | py | Python | tests/oauth2/rfc6749/grant_types/test_implicit.py | smarie/oauthlib | 6befed7747b27e0673b1fd121dc6897be70fa23a | [
"BSD-3-Clause"
] | null | null | null | tests/oauth2/rfc6749/grant_types/test_implicit.py | smarie/oauthlib | 6befed7747b27e0673b1fd121dc6897be70fa23a | [
"BSD-3-Clause"
] | null | null | null | tests/oauth2/rfc6749/grant_types/test_implicit.py | smarie/oauthlib | 6befed7747b27e0673b1fd121dc6897be70fa23a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest import mock
from oauthlib.common import Request
from oauthlib.oauth2.rfc6749.grant_types import ImplicitGrant
from oauthlib.oauth2.rfc6749.tokens import BearerToken
from ....unittest import TestCase
class ImplicitGrantTest(TestCase):
def setUp(self):
mock_client = ... | 42.222222 | 117 | 0.695113 |
4a03147713d4c9c7c89fafcf14d4a3cc25c50564 | 126 | py | Python | checkpoints/pretrained/get_model.py | worldlife123/maskrcnn-benchmark | 6c8bc908c2b7299ca6ffb292ae2680ac354d0eec | [
"MIT"
] | null | null | null | checkpoints/pretrained/get_model.py | worldlife123/maskrcnn-benchmark | 6c8bc908c2b7299ca6ffb292ae2680ac354d0eec | [
"MIT"
] | null | null | null | checkpoints/pretrained/get_model.py | worldlife123/maskrcnn-benchmark | 6c8bc908c2b7299ca6ffb292ae2680ac354d0eec | [
"MIT"
] | null | null | null | import torch
a = torch.load("model_final.pth")
torch.save(a['model'], "e2e_lr_rpn_mask_rcnn_R_50_FPN_1x_kitti_trained.pth")
| 21 | 76 | 0.785714 |
4a0314a468b076d4e5b4858bd3547ceed43371e5 | 2,027 | py | Python | pony/orm/tests/test_lazy.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 1 | 2019-08-02T12:06:24.000Z | 2019-08-02T12:06:24.000Z | pony/orm/tests/test_lazy.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | null | null | null | pony/orm/tests/test_lazy.py | luckydonald/pony | e733f14ef4e21514b49248b7b72aae0728029852 | [
"Apache-2.0"
] | 1 | 2020-07-20T17:25:48.000Z | 2020-07-20T17:25:48.000Z | from __future__ import absolute_import, print_function, division
import unittest
from pony.orm.core import *
class TestLazy(unittest.TestCase):
def setUp(self):
self.db = Database('sqlite', ':memory:')
class X(self.db.Entity):
a = Required(int)
b = Required(unicode, lazy=T... | 31.184615 | 83 | 0.567341 |
4a03152eea36038c3c16acded48ac3d4c310469d | 2,343 | py | Python | plugins/DDG/test.py | dregad/Limnoria | 986913628929c9018e01b82b53638aced50ab0de | [
"BSD-3-Clause"
] | 2 | 2021-01-02T19:12:23.000Z | 2021-01-21T22:28:51.000Z | plugins/DDG/test.py | dregad/Limnoria | 986913628929c9018e01b82b53638aced50ab0de | [
"BSD-3-Clause"
] | null | null | null | plugins/DDG/test.py | dregad/Limnoria | 986913628929c9018e01b82b53638aced50ab0de | [
"BSD-3-Clause"
] | 1 | 2021-01-02T19:14:23.000Z | 2021-01-02T19:14:23.000Z | ###
# Copyright (c) 2014-2017, James Lu <james@overdrivenetworks.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,... | 45.057692 | 79 | 0.702091 |
4a0315530428e9e876bcb5e89f2b5df1fd566577 | 419 | py | Python | video/rest/rooms/list-rooms-multiple-filters/list-rooms-multiple-filters.6.x.py | azaddeveloper/api-snippets | f88b153cd7186fa70b33733b205886502db0d1f2 | [
"MIT"
] | 3 | 2020-05-05T10:01:02.000Z | 2021-02-06T14:23:13.000Z | video/rest/rooms/list-rooms-multiple-filters/list-rooms-multiple-filters.6.x.py | azaddeveloper/api-snippets | f88b153cd7186fa70b33733b205886502db0d1f2 | [
"MIT"
] | null | null | null | video/rest/rooms/list-rooms-multiple-filters/list-rooms-multiple-filters.6.x.py | azaddeveloper/api-snippets | f88b153cd7186fa70b33733b205886502db0d1f2 | [
"MIT"
] | 1 | 2019-10-02T14:36:36.000Z | 2019-10-02T14:36:36.000Z | # Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)
rooms = client.video.... | 32.230769 | 79 | 0.801909 |
4a031626ae80f13b4d8dd11b6b4a67d27d67318f | 1,360 | py | Python | heroes.py | elinuzum/dungeon-game | d8c80b7776351d73829aca6563cbbffa18a8c8dc | [
"Apache-2.0"
] | null | null | null | heroes.py | elinuzum/dungeon-game | d8c80b7776351d73829aca6563cbbffa18a8c8dc | [
"Apache-2.0"
] | null | null | null | heroes.py | elinuzum/dungeon-game | d8c80b7776351d73829aca6563cbbffa18a8c8dc | [
"Apache-2.0"
] | null | null | null | from base import Person
class Warrior(Person):
hp = 100
strength = 2
accuracy = 5
defense = 4
attacks_by = "swings sword"
class Marksman(Person):
hp = 100
strength = 1
accuracy = 8
defense = 3
attacks_by = "shoots an arrow"
class Madman(Person):
hp = 100
strength = 3... | 16.385542 | 36 | 0.594853 |
4a0317a10ed4fc60f0e71547bf610b09bda9482c | 256 | py | Python | eda5/servisnaknjiga/templatetags.py | vasjapavlovic/eda5 | bc4b387b24239ea1dfb927657f05ddabbf707479 | [
"BSD-3-Clause"
] | null | null | null | eda5/servisnaknjiga/templatetags.py | vasjapavlovic/eda5 | bc4b387b24239ea1dfb927657f05ddabbf707479 | [
"BSD-3-Clause"
] | null | null | null | eda5/servisnaknjiga/templatetags.py | vasjapavlovic/eda5 | bc4b387b24239ea1dfb927657f05ddabbf707479 | [
"BSD-3-Clause"
] | null | null | null | from django import template
register = template.Library()
@register.filter()
def to_int(value):
return int(value)
@register.filter()
def to_msec(value):
vrednost = value*year*365 + value*month*12+value*hours*24*60*3600*1000
return vrednost
| 18.285714 | 74 | 0.726563 |
4a0318c82f1f5fa327728ec19a7d34bca3843a6f | 1,731 | py | Python | examples/edit_config/async_edit_config_iosxr.py | kn-winter/scrapli_netconf | c23893173671351255ce634408c428f7a72550c4 | [
"MIT"
] | null | null | null | examples/edit_config/async_edit_config_iosxr.py | kn-winter/scrapli_netconf | c23893173671351255ce634408c428f7a72550c4 | [
"MIT"
] | null | null | null | examples/edit_config/async_edit_config_iosxr.py | kn-winter/scrapli_netconf | c23893173671351255ce634408c428f7a72550c4 | [
"MIT"
] | null | null | null | """async_edit_config_iosxr"""
import asyncio
from scrapli_netconf.driver import AsyncNetconfScrape
IOSXR_DEVICE = {
"host": "172.18.0.13",
"auth_username": "vrnetlab",
"auth_password": "VR-netlab9",
"auth_strict_key": False,
"transport": "asyncssh",
}
EDIT_INTERFACE_G_0_0_0_0 = """
<config>
<in... | 27.47619 | 84 | 0.674754 |
4a031996e71d862e0d1af52e7acf361d5d2e5834 | 1,879 | py | Python | results/ecc/plot_bitrate_ECC.py | drcut/streamline | 71d221df151dd6bb757d3c609ac904d3f1c56408 | [
"MIT"
] | 7 | 2021-05-03T04:41:31.000Z | 2022-01-09T22:33:07.000Z | results/ecc/plot_bitrate_ECC.py | drcut/streamline | 71d221df151dd6bb757d3c609ac904d3f1c56408 | [
"MIT"
] | 1 | 2021-11-24T15:45:34.000Z | 2021-11-24T20:54:43.000Z | results/ecc/plot_bitrate_ECC.py | drcut/streamline | 71d221df151dd6bb757d3c609ac904d3f1c56408 | [
"MIT"
] | 4 | 2021-08-30T11:29:10.000Z | 2021-10-21T18:34:04.000Z | import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import pandas as pd
## File name with Data Columns
datafile_str="bitrate_ECC_results.txt"
datafile_col_x="Number of Bits"
datafile_col_y1="Bits-Per-Second (bps)"
datafile_col_y3="Bit-Rate (KB/s)"
datafile_col_y2="Bit-Er... | 28.469697 | 125 | 0.704098 |
4a0319bfafd0ff873169b4177d20ab7ca94994d0 | 13,560 | py | Python | climart/utils/utils.py | Venka97/climART | b2246231f3ba8372d33e564700b872c410e33036 | [
"CC-BY-4.0"
] | 2 | 2021-09-28T00:44:00.000Z | 2021-09-28T02:43:20.000Z | climart/utils/utils.py | Venka97/climART | b2246231f3ba8372d33e564700b872c410e33036 | [
"CC-BY-4.0"
] | null | null | null | climart/utils/utils.py | Venka97/climART | b2246231f3ba8372d33e564700b872c410e33036 | [
"CC-BY-4.0"
] | null | null | null | """
Author: Salva Rühling Cachay
"""
import logging
import math
import os
from functools import wraps
from typing import Union, Sequence, List, Dict, Optional, Callable
import numpy as np
import xarray as xr
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from climart.data_... | 39.190751 | 119 | 0.658407 |
4a031b27b42d52239c0c1b9dea3aacbe42f5b814 | 5,994 | py | Python | ml_tools/eolearn/tests/test_train_split.py | mohammadrezabk/eo-learn | 8de3cfd64e74c1e4832e585954cdbf0ee9676eb3 | [
"MIT"
] | null | null | null | ml_tools/eolearn/tests/test_train_split.py | mohammadrezabk/eo-learn | 8de3cfd64e74c1e4832e585954cdbf0ee9676eb3 | [
"MIT"
] | null | null | null | ml_tools/eolearn/tests/test_train_split.py | mohammadrezabk/eo-learn | 8de3cfd64e74c1e4832e585954cdbf0ee9676eb3 | [
"MIT"
] | null | null | null | """
Credits:
Copyright (c) 2017-2019 Matej Aleksandrov, Matej Batič, Andrej Burja (Sinergise)
Copyright (c) 2017-2019 Grega Milčinski, Matic Lubej, Devis Peresutti, Jernej Puc (Sinergise)
Copyright (c) 2017-2019 Jovan Višnjić, Anže Zupanc, Lojze Žust (Sinergise)
This source code is licensed under the MIT license found... | 41.625 | 117 | 0.659493 |
4a031bb14ac4b9180dc2237dbcd4d057957e6152 | 483 | py | Python | server/src/weaverbird/backends/pandas_executor/steps/sort.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 54 | 2019-11-20T15:07:39.000Z | 2022-03-24T22:13:51.000Z | server/src/weaverbird/backends/pandas_executor/steps/sort.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 786 | 2019-10-20T11:48:37.000Z | 2022-03-23T08:58:18.000Z | server/src/weaverbird/backends/pandas_executor/steps/sort.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 10 | 2019-11-21T10:16:16.000Z | 2022-03-21T10:34:06.000Z | from pandas import DataFrame
from weaverbird.backends.pandas_executor.types import DomainRetriever, PipelineExecutor
from weaverbird.pipeline.steps import SortStep
def execute_sort(
step: SortStep,
df: DataFrame,
domain_retriever: DomainRetriever = None,
execute_pipeline: PipelineExecutor = None,
) -... | 28.411765 | 87 | 0.73499 |
4a031c4a0ccd61d66eaf60a5439508d9f456e294 | 264 | py | Python | tests/artificial/transf_Logit/trend_ConstantTrend/cycle_30/ar_/test_artificial_32_Logit_ConstantTrend_30__20.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Logit/trend_ConstantTrend/cycle_30/ar_/test_artificial_32_Logit_ConstantTrend_30__20.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Logit/trend_ConstantTrend/cycle_30/ar_/test_artificial_32_Logit_ConstantTrend_30__20.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 30, transform = "Logit", sigma = 0.0, exog_count = 20, ar_order = 0); | 37.714286 | 164 | 0.731061 |
4a031d1327b560e63a0883fe87332efb22e6305f | 2,294 | py | Python | FocusOnWork_PC/FocusOnWork/bin/Debug/netcoreapp3.1/WikiSearch.py | RokurouIchihara/FocusOnWork | 6a1e0a344f871f4f5fb45f51782185259238e0a2 | [
"Apache-2.0",
"MIT"
] | null | null | null | FocusOnWork_PC/FocusOnWork/bin/Debug/netcoreapp3.1/WikiSearch.py | RokurouIchihara/FocusOnWork | 6a1e0a344f871f4f5fb45f51782185259238e0a2 | [
"Apache-2.0",
"MIT"
] | null | null | null | FocusOnWork_PC/FocusOnWork/bin/Debug/netcoreapp3.1/WikiSearch.py | RokurouIchihara/FocusOnWork | 6a1e0a344f871f4f5fb45f51782185259238e0a2 | [
"Apache-2.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf8 -*-
import requests
from bs4 import BeautifulSoup
class SearchOnGoogle:
# コンストラクタ
def __init__(self):
directoryPath = os.getcwd()
self.__filename_ = 'SearchWordAndResulut.txt'
self.__file_ = open(self.__filename_, mode='r+', enco... | 29.792208 | 75 | 0.516129 |
4a031ea1d7e2e735c95bc04c1eea97c734554f13 | 914 | py | Python | gptchat/chatlm/config.py | noriyukipy/gptchat | 15febcc69cf79ffbca50bd8897447b5804bcef54 | [
"MIT"
] | 18 | 2020-05-10T09:10:01.000Z | 2022-03-22T08:45:43.000Z | gptchat/chatlm/config.py | noriyukipy/gptchat | 15febcc69cf79ffbca50bd8897447b5804bcef54 | [
"MIT"
] | 2 | 2020-08-01T10:32:51.000Z | 2021-07-30T06:04:31.000Z | gptchat/chatlm/config.py | noriyukipy/gptchat | 15febcc69cf79ffbca50bd8897447b5804bcef54 | [
"MIT"
] | 2 | 2020-08-11T07:17:54.000Z | 2020-09-20T10:38:50.000Z | from pydantic import BaseModel
from typing import List, Union
class ConfigInput(BaseModel):
train_file: str
valid_file: str
tokenizer_file: str
pretrained_model_dir: Union[None, str]
class ConfigOutput(BaseModel):
model_dir: str
tensorboard_dir: str
checkpoint_path: str
class ConfigTra... | 17.921569 | 48 | 0.702407 |
4a031f88b29b5f3d7cc3ef7248ff39472bfd51d9 | 3,354 | py | Python | gn4pions/modules/resolution_util.py | atlas-calo-ml/gn4pions_eastbay | e4093b691dcba1d6663464ba55760feb6033f86a | [
"Apache-2.0"
] | 1 | 2021-11-17T03:44:48.000Z | 2021-11-17T03:44:48.000Z | gn4pions/modules/resolution_util.py | atlas-calo-ml/gn4pions_eastbay | e4093b691dcba1d6663464ba55760feb6033f86a | [
"Apache-2.0"
] | null | null | null | gn4pions/modules/resolution_util.py | atlas-calo-ml/gn4pions_eastbay | e4093b691dcba1d6663464ba55760feb6033f86a | [
"Apache-2.0"
] | null | null | null | # Let's define some utility functions we'll want to be using for resolutions
import os
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
import scipy.stats as stats
import seaborn as sns
from matplotlib.colors import ListedColormap
from . import plot_uti... | 34.57732 | 105 | 0.620155 |
4a031febe585837b3d3d2a85d3035b6b76bf9e5f | 7,687 | py | Python | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py | brianherrera/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 1,738 | 2017-09-21T10:59:12.000Z | 2022-03-31T21:05:46.000Z | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 427 | 2017-09-29T22:54:36.000Z | 2022-02-15T19:26:50.000Z | dev/Tools/Python/3.7.10/linux_x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py | ArchitectureStudios/lumberyard | f85344403c1c2e77ec8c75deb2c116e97b713217 | [
"AML"
] | 671 | 2017-09-21T08:04:01.000Z | 2022-03-29T14:30:07.000Z | from pip._vendor.resolvelib.providers import AbstractProvider
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from .base import Constraint
if MYPY_CHECK_RUNNING:
from typing import Any, Dict, Iterable, Optional, Sequence, Set, Tuple, Union
from .base import Candidate, Requirement... | 43.925714 | 83 | 0.623 |
4a03200a6c74349a1c21f67fc53dfbc05c4177dd | 82 | py | Python | tests/ut_repytests_testmemoryallocwithexceptions.py | SeattleTestbed/repy_v1 | f40a02e2e398b1ec67fede84b41a264ae7356d2c | [
"MIT"
] | 1 | 2021-08-18T05:58:17.000Z | 2021-08-18T05:58:17.000Z | tests/ut_repytests_testmemoryallocwithexceptions.py | SeattleTestbed/repy_v1 | f40a02e2e398b1ec67fede84b41a264ae7356d2c | [
"MIT"
] | 3 | 2015-11-17T21:01:03.000Z | 2016-07-14T09:08:04.000Z | tests/ut_repytests_testmemoryallocwithexceptions.py | SeattleTestbed/repy_v1 | f40a02e2e398b1ec67fede84b41a264ae7356d2c | [
"MIT"
] | 5 | 2015-07-02T13:29:23.000Z | 2021-09-25T07:48:30.000Z | import loggingskeleton
loggingskeleton.test("l_testmemoryallocwithexceptions.py") | 27.333333 | 58 | 0.890244 |
4a03212e2fcdb0968b84add8a53b1b339189b5ba | 1,355 | py | Python | rocket/connectors/files.py | Contraz/pyrocket | bc1129ba30b32a3324f8416a698f9d93555f9e35 | [
"Zlib"
] | 19 | 2017-04-14T09:52:16.000Z | 2022-03-20T00:43:57.000Z | rocket/connectors/files.py | Contraz/pyrocket | bc1129ba30b32a3324f8416a698f9d93555f9e35 | [
"Zlib"
] | 2 | 2018-07-03T21:31:01.000Z | 2018-08-14T19:43:56.000Z | rocket/connectors/files.py | Contraz/pyrocket | bc1129ba30b32a3324f8416a698f9d93555f9e35 | [
"Zlib"
] | 5 | 2017-07-29T20:59:34.000Z | 2021-08-21T20:57:18.000Z | """
Connector reading track files in binary format.
Each track is a separate file.
"""
import logging
import os
from .base import Connector
from rocket.tracks import Track
logger = logging.getLogger("rocket")
class FilesConnector(Connector):
"""Loads individual track files in a specific path"""
def __init__(... | 31.511628 | 82 | 0.62583 |
4a0322d9b96e4bcba8c4b24fce00cd49d11bf349 | 12,030 | py | Python | mars/dataframe/base/apply.py | vibhatha/mars | 7a6b78ca4befd1a46d82cfb0163ffcd49293f7b5 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/base/apply.py | vibhatha/mars | 7a6b78ca4befd1a46d82cfb0163ffcd49293f7b5 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/base/apply.py | vibhatha/mars | 7a6b78ca4befd1a46d82cfb0163ffcd49293f7b5 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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... | 38.806452 | 109 | 0.592103 |
4a0323504a247613758402728ad9dffac4131bca | 2,273 | py | Python | config/urls.py | ASU-CodeDevils/codedevils.org | 0f7c62bdad58c9907c903899cd12555f07584d37 | [
"MIT"
] | 2 | 2021-02-19T02:37:01.000Z | 2021-04-18T22:20:22.000Z | config/urls.py | ASU-CodeDevils/codedevils_org | 0f7c62bdad58c9907c903899cd12555f07584d37 | [
"MIT"
] | 4 | 2020-07-10T05:25:24.000Z | 2020-10-07T05:01:01.000Z | config/urls.py | ASU-CodeDevils/codedevils_org | 0f7c62bdad58c9907c903899cd12555f07584d37 | [
"MIT"
] | 1 | 2021-02-19T04:23:46.000Z | 2021-02-19T04:23:46.000Z | from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views import defaults as default_views
from django_cas_ng import views as cas_views
from codedevils_org import p... | 35.515625 | 85 | 0.66344 |
4a032394c32e29440e32a8bbdab78f5296b6caa8 | 10,200 | py | Python | kits19cnn/io/preprocess.py | jchen42703/kits19-cnn | a1c78beaaf981fa039be62a5178fb16e3713bb64 | [
"Apache-2.0"
] | 15 | 2019-08-07T06:27:54.000Z | 2022-03-20T20:20:06.000Z | kits19cnn/io/preprocess.py | jchen42703/kits19-cnn | a1c78beaaf981fa039be62a5178fb16e3713bb64 | [
"Apache-2.0"
] | 14 | 2019-08-05T12:57:26.000Z | 2019-12-09T06:45:45.000Z | kits19cnn/io/preprocess.py | jchen42703/kits19-cnn | a1c78beaaf981fa039be62a5178fb16e3713bb64 | [
"Apache-2.0"
] | 4 | 2019-08-13T08:49:32.000Z | 2022-02-04T14:07:36.000Z | import os
from os.path import join, isdir
from pathlib import Path
from collections import defaultdict
from tqdm import tqdm
import nibabel as nib
import numpy as np
import json
from kits19cnn.io.resample import resample_patient
class Preprocessor(object):
"""
Preprocesses the original dataset (interpolated).... | 42.323651 | 105 | 0.575294 |
4a0323b7e2de46d2f0d2d6af9711b933c9e674b8 | 2,278 | pyt | Python | src/python_boilerplate/templates/setup.pyt | LeticiaISilveira/python-boilerplate | af36891e7c2f0dfe81e64f29d2739ecd7691b4ee | [
"CNRI-Python"
] | 76 | 2016-10-23T14:06:31.000Z | 2022-02-15T14:13:22.000Z | src/python_boilerplate/templates/setup.pyt | saber13812002/python-boilerplate | af36891e7c2f0dfe81e64f29d2739ecd7691b4ee | [
"CNRI-Python"
] | 6 | 2016-08-24T20:02:21.000Z | 2021-07-08T05:49:54.000Z | src/python_boilerplate/templates/setup.pyt | saber13812002/python-boilerplate | af36891e7c2f0dfe81e64f29d2739ecd7691b4ee | [
"CNRI-Python"
] | 34 | 2016-08-24T20:12:12.000Z | 2022-03-03T03:55:52.000Z | # -*- coding: utf-8 -*-
{%- if boilerplate_header|default(True) %}
#
# This file were created by Python Boilerplate. Use boilerplate to start simple
# usable and best-practices compliant Python projects.
#
# Learn more about it at: http://github.com/fabiommendes/python-boilerplate/
#
{% endif %}
import os
import codecs... | 31.205479 | 91 | 0.617208 |
4a032409a5c241647a3b75654c3025943c22cb55 | 6,775 | py | Python | data/dataloader.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 78 | 2020-11-30T09:46:01.000Z | 2022-03-30T02:42:48.000Z | data/dataloader.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 18 | 2020-12-30T10:39:11.000Z | 2022-03-21T07:27:27.000Z | data/dataloader.py | hyperconnect/LADE | cfe96b7ca6520f3410d4cae9cc10919e6114bbb9 | [
"BSD-3-Clause"
] | 8 | 2020-12-02T15:41:23.000Z | 2022-02-26T11:57:37.000Z | """Copyright (c) Hyperconnect, Inc. and its affiliates.
All rights reserved.
Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the license found in the
LICENSE file in the root directory of this source tree.
Portions of the source code are from the OLTR project ... | 37.021858 | 99 | 0.608561 |
4a0324a054444733278a6267fda230d2ac010f07 | 6,436 | py | Python | zerver/tests/test_muting.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | 1 | 2020-03-17T14:58:50.000Z | 2020-03-17T14:58:50.000Z | zerver/tests/test_muting.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_muting.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | null | null | null | from django.utils.timezone import now as timezone_now
from datetime import timedelta
from typing import Any, Dict
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.stream_topic import StreamTopicTarget
from zerver.models import (
get_stream,
UserProfile,
MutedTopic
)
from zerver.lib.topic... | 36.568182 | 98 | 0.611715 |
4a0325441604cfcb1cb6225a18cda4a60a39b9f1 | 1,067 | py | Python | conohadnsclient/tests/test_v1/test_touch.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/test_v1/test_touch.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | conohadnsclient/tests/test_v1/test_touch.py | naototty/python-conohadns-client | 04f360450d2e1a6020d2870272d8125cb112fa01 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 35.566667 | 78 | 0.731022 |
4a03254e907763313c05d154ce60201be3a452c6 | 135 | py | Python | src/config.py | berkaytrhn/Facial-Emotion-API | cbd496e9dea704818e3c9e7682d276cb413f94f2 | [
"MIT"
] | null | null | null | src/config.py | berkaytrhn/Facial-Emotion-API | cbd496e9dea704818e3c9e7682d276cb413f94f2 | [
"MIT"
] | null | null | null | src/config.py | berkaytrhn/Facial-Emotion-API | cbd496e9dea704818e3c9e7682d276cb413f94f2 | [
"MIT"
] | null | null | null | image_size=96
emotions=['Happy', 'Neutral', 'Sad', 'Surprised', 'Fearful']
max_number_of_faces=1
model_name = "5class_emotion_model.h5" | 33.75 | 60 | 0.762963 |
4a032604880a5697beb76f0a298ecc3c07a1bc23 | 5,501 | py | Python | scripts/kuehr1Jy_sources.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 1 | 2019-08-26T06:26:47.000Z | 2019-08-26T06:26:47.000Z | scripts/kuehr1Jy_sources.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 23 | 2018-11-20T15:41:40.000Z | 2021-08-03T20:39:21.000Z | scripts/kuehr1Jy_sources.py | ska-sa/katpoint | 7cbac9c2f461e4209a147bda93572b7f523531d4 | [
"BSD-3-Clause"
] | 4 | 2019-07-22T08:01:03.000Z | 2021-02-23T07:09:04.000Z | #! /usr/bin/python
################################################################################
# Copyright (c) 2009-2021, National Research Foundation (SARAO)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of ... | 46.618644 | 108 | 0.667151 |
4a0329b68604971bdc0082b1a77b9aef47a6b646 | 107 | py | Python | scripts-python/desafio03.py | matheus-rosario/curso-python | ac9ccf7fc4b3f708821e44787a1bdc231d9426ac | [
"MIT"
] | null | null | null | scripts-python/desafio03.py | matheus-rosario/curso-python | ac9ccf7fc4b3f708821e44787a1bdc231d9426ac | [
"MIT"
] | null | null | null | scripts-python/desafio03.py | matheus-rosario/curso-python | ac9ccf7fc4b3f708821e44787a1bdc231d9426ac | [
"MIT"
] | null | null | null | nun1 = int(input('Primeiro número '))
nun2 = int(input('Segundo número '))
print('A soma é ', nun1 + nun2)
| 26.75 | 37 | 0.654206 |
4a0329efedc3b5dd3fd033e4eb2dc9aebf01e2c7 | 2,883 | py | Python | tools/Canvas/tests/case_control/case_control.py | Oshlack/Slinker | 725d2c0861156034ef4d16293e2a3b74ac23c9e7 | [
"MIT"
] | 15 | 2021-08-23T14:36:35.000Z | 2022-03-17T06:56:17.000Z | tools/Canvas/tests/case_control/case_control.py | Oshlack/Slinker | 725d2c0861156034ef4d16293e2a3b74ac23c9e7 | [
"MIT"
] | 2 | 2021-08-17T03:00:23.000Z | 2022-02-08T23:24:16.000Z | tools/Canvas/tests/case_control/case_control.py | Oshlack/Slinker | 725d2c0861156034ef4d16293e2a3b74ac23c9e7 | [
"MIT"
] | null | null | null | #=======================================================================================================================
#
# CASE vs. CONTROL TEST - Build a simple case vs. control plot with some annotation
# Output is both a html file and a png of the resulting plot.
#
# Author: Breon Schmidt
# License: MIT
#
#=... | 28.83 | 120 | 0.42768 |
4a032a35163d1a09bab7acb56f19257a0e3ffcc1 | 259 | py | Python | .history/myblog/admin_20200416030041.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/admin_20200416030041.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | .history/myblog/admin_20200416030041.py | abhinavmarwaha/demo-django-blog | c80a7d825e44d7e1589d9272c3583764562a2515 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Post
class PostAdmin(admin.ModelAdmin):
list_display = ('title', 'slug', 'status', 'created_on')
list_filter = ("status")
search_fields = ['title', 'content']
prepopulated_fields = {'slug'} | 32.375 | 60 | 0.69112 |
4a032ad827fd8f25bdba8c5aa82ea8ad4803fe4c | 10,056 | py | Python | data/od_dataset_from_file.py | eric612/Mobilenet-YOLO-Pytorch | cd8d99425c51c3f37d03633302076bd94738f174 | [
"MIT"
] | 23 | 2021-02-05T10:07:26.000Z | 2022-03-15T15:02:26.000Z | data/od_dataset_from_file.py | eric612/Mobilenet-YOLO-Pytorch | cd8d99425c51c3f37d03633302076bd94738f174 | [
"MIT"
] | 3 | 2021-06-10T04:12:09.000Z | 2021-07-13T06:38:34.000Z | data/od_dataset_from_file.py | eric612/Mobilenet-YOLO-Pytorch | cd8d99425c51c3f37d03633302076bd94738f174 | [
"MIT"
] | 9 | 2021-06-10T03:47:40.000Z | 2022-02-07T08:57:16.000Z | import numpy as np
from PIL import Image
import glob
import os
import torch
from torch.utils.data.dataset import Dataset # For custom datasets
import json
from tqdm import tqdm
import pickle
import xml.etree.ElementTree as ET
#import image_augmentation as img_aug
import cv2
'''
CLASSES = ('__background__',
... | 40.878049 | 226 | 0.512132 |
4a032aefe72b65a44670128ba6b2cc9cf739ed51 | 14,906 | py | Python | ironic/drivers/modules/oneview/deploy_utils.py | NaohiroTamura/ironic | 1fcb6c52a22c9c025dbf27931720ce2eda08704f | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/oneview/deploy_utils.py | NaohiroTamura/ironic | 1fcb6c52a22c9c025dbf27931720ce2eda08704f | [
"Apache-2.0"
] | null | null | null | ironic/drivers/modules/oneview/deploy_utils.py | NaohiroTamura/ironic | 1fcb6c52a22c9c025dbf27931720ce2eda08704f | [
"Apache-2.0"
] | 1 | 2022-03-25T14:26:10.000Z | 2022-03-25T14:26:10.000Z | # Copyright 2016 Hewlett Packard Enterprise Development LP.
# Copyright 2016 Universidade Federal de Campina Grande
# 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 Licens... | 38.817708 | 79 | 0.668456 |
4a032b05087ab63f05c72e8092b39c91ad87cb7d | 811 | py | Python | django2/fuck/django/config/urls.py | Gozeon/code-collections | 7304e2b9c4c91a809125198d22cf40dcbb45a23b | [
"MIT"
] | null | null | null | django2/fuck/django/config/urls.py | Gozeon/code-collections | 7304e2b9c4c91a809125198d22cf40dcbb45a23b | [
"MIT"
] | 1 | 2020-07-17T09:25:42.000Z | 2020-07-17T09:25:42.000Z | django2/fuck/django/config/urls.py | Gozeon/code-collections | 7304e2b9c4c91a809125198d22cf40dcbb45a23b | [
"MIT"
] | null | null | null | """config URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 35.26087 | 77 | 0.701603 |
4a032be5d1b43e725143b0c597cc83f0af62e150 | 10,964 | py | Python | citation_graph.py | Azzaare/multiplex-carbonara | c911bd08aa4120a3ebf099b03eb1fa1670a3a255 | [
"MIT"
] | null | null | null | citation_graph.py | Azzaare/multiplex-carbonara | c911bd08aa4120a3ebf099b03eb1fa1670a3a255 | [
"MIT"
] | null | null | null | citation_graph.py | Azzaare/multiplex-carbonara | c911bd08aa4120a3ebf099b03eb1fa1670a3a255 | [
"MIT"
] | null | null | null | import os
from py2neo import Graph, Node, Relationship, authenticate
#lists and tables required to parse the date
months = {
"jan": 1,
"january": 1,
"feb": 2,
"february": 2,
"mar": 3,
"march": 3,
"apr": 4,
"april": 4,
"may": 5,
"jun": 6,
... | 40.758364 | 225 | 0.513134 |
4a032c60d386df05b4787a3dd41b86c97ad18a30 | 81,980 | py | Python | pandas/core/arrays/datetimes.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/arrays/datetimes.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | pandas/core/arrays/datetimes.py | juliansmidek/pandas | 8945a4267588ec2608bec7be6745f6beff0373da | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from datetime import (
datetime,
time,
timedelta,
tzinfo,
)
from typing import (
TYPE_CHECKING,
Optional,
Union,
cast,
overload,
)
import warnings
import numpy as np
from pandas._libs import (
lib,
tslib,
)
from pandas._libs.tslibs import... | 32.035952 | 88 | 0.564211 |
4a032cda18c46cac59eedbd9061814e94020587e | 220 | py | Python | enci/f2g/doctype/furniture_to_go_product_bullet_points/furniture_to_go_product_bullet_points.py | artykbasar/enci | e65ed17ff3414f04db54ee53b83ddcd3808811d2 | [
"MIT"
] | null | null | null | enci/f2g/doctype/furniture_to_go_product_bullet_points/furniture_to_go_product_bullet_points.py | artykbasar/enci | e65ed17ff3414f04db54ee53b83ddcd3808811d2 | [
"MIT"
] | null | null | null | enci/f2g/doctype/furniture_to_go_product_bullet_points/furniture_to_go_product_bullet_points.py | artykbasar/enci | e65ed17ff3414f04db54ee53b83ddcd3808811d2 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, Artyk Basarov and contributors
# For license information, please see license.txt
# import frappe
from frappe.model.document import Document
class FurnitureToGoProductBulletPoints(Document):
pass
| 24.444444 | 52 | 0.813636 |
4a032f3af30d17334a77c06756682c5207c86f82 | 1,386 | py | Python | plenum/server/quorums.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/server/quorums.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/server/quorums.py | jandayanan/indy-plenum | 2815e994404c77ad87eddcfd09062d5fe6efc1c5 | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | from plenum.common.util import getMaxFailures
class Quorum:
def __init__(self, value: int):
self.value = value
def is_reached(self, msg_count: int) -> bool:
return msg_count >= self.value
def __repr__(self):
return "{}({!r})".format(self.__class__.__name__, self.value)
class Qu... | 31.5 | 69 | 0.583694 |
4a032fc00436361a1665a2a9902862a6256a5d5f | 3,276 | py | Python | Lib/distutils/tests/test_config.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | null | null | null | Lib/distutils/tests/test_config.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | null | null | null | Lib/distutils/tests/test_config.py | hashiqizaizai/hashiqizaizai.github.io | 7217400802f6b944dfd1e29d4b00d268957ff769 | [
"bzip2-1.0.6"
] | null | null | null | """Tests for distutils.pypirc.pypirc."""
import sys
import os
import unittest
import tempfile
import shutil
from distutils.core import PyPIRCCommand
from distutils.core import Distribution
from distutils.log import set_threshold
from distutils.log import WARN
from distutils.tests import support
PYPIRC ... | 26.634146 | 69 | 0.584554 |
4a0331795867bf7c9e53c1b0026b5a3effdd60c1 | 399 | py | Python | Beecrowd/Python/1074.py | felipemsalles/Programming-Studies | 63100fb22a165c4582b10a95d5a583f9bc1e990f | [
"MIT"
] | null | null | null | Beecrowd/Python/1074.py | felipemsalles/Programming-Studies | 63100fb22a165c4582b10a95d5a583f9bc1e990f | [
"MIT"
] | null | null | null | Beecrowd/Python/1074.py | felipemsalles/Programming-Studies | 63100fb22a165c4582b10a95d5a583f9bc1e990f | [
"MIT"
] | null | null | null | n = int(input())
x = ['']
for i in range(1, n + 1):
x.append(int(input()))
for i in range(1, n + 1):
if x[i] == 0:
print('NULL')
if x[i] > 0:
if x[i] % 2 == 0:
print('EVEN POSITIVE')
else:
print('ODD POSITIVE')
if x[i] < 0:
if x[i] % 2 == 0:
... | 19.95 | 34 | 0.408521 |
4a0332ed3e174fca24947c1d21e84ff9e8956d07 | 8,642 | py | Python | keras/layers/preprocessing/category_encoding.py | zhjunqin/keras | f5171d521acbf2ebbb6414352d5792163c41479f | [
"Apache-2.0"
] | 1 | 2022-03-01T20:20:12.000Z | 2022-03-01T20:20:12.000Z | keras/layers/preprocessing/category_encoding.py | sairamadithya/keras | 42bf9972492f47c3d3c249de9c20942ba217937d | [
"Apache-2.0"
] | null | null | null | keras/layers/preprocessing/category_encoding.py | sairamadithya/keras | 42bf9972492f47c3d3c249de9c20942ba217937d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.009259 | 80 | 0.655288 |
4a0334a3d8e6fa8559ec7e11b3fbc903c10cf3cb | 3,418 | py | Python | node_modules/dropbox/generator/stone/stone/backends/swift_helpers.py | dropboxdssd/dropbox2 | 48158eca6747287bdc9012bff9c1b985483a4370 | [
"MIT"
] | 1 | 2021-12-13T02:17:05.000Z | 2021-12-13T02:17:05.000Z | node_modules/dropbox/generator/stone/stone/backends/swift_helpers.py | dropboxdssd/dropbox2 | 48158eca6747287bdc9012bff9c1b985483a4370 | [
"MIT"
] | 2 | 2021-04-16T20:39:33.000Z | 2021-08-04T03:11:54.000Z | node_modules/dropbox/generator/stone/stone/backends/swift_helpers.py | dropboxdssd/dropbox2 | 48158eca6747287bdc9012bff9c1b985483a4370 | [
"MIT"
] | 1 | 2020-11-04T06:01:11.000Z | 2020-11-04T06:01:11.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import pprint
from stone.ir import (
Boolean,
Bytes,
Float32,
Float64,
Int32,
Int64,
List,
String,
Timestamp,
UInt32,
UInt64,
Void,
is_boolean_type,
is_list_type,
is_numeric_t... | 22.194805 | 82 | 0.605325 |
4a03351542876f06426dc30d162b79b726e7e774 | 334,235 | py | Python | code/plyj/parsetab.py | jmflorezff/cs-6301 | 89fe2668af3911f3a112adfdd46a5b649c62ec61 | [
"MIT"
] | null | null | null | code/plyj/parsetab.py | jmflorezff/cs-6301 | 89fe2668af3911f3a112adfdd46a5b649c62ec61 | [
"MIT"
] | null | null | null | code/plyj/parsetab.py | jmflorezff/cs-6301 | 89fe2668af3911f3a112adfdd46a5b649c62ec61 | [
"MIT"
] | 1 | 2021-08-17T09:16:17.000Z | 2021-08-17T09:16:17.000Z |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.8'
_lr_method = 'LALR'
_lr_signature = '8671335849935BC5A722EAB243FC04C0'
_lr_action_items = {'?':([12,31,38,42,44,46,48,51,55,56,57,62,67,72,85,89,101,107,112,133,134,135,136,137,138,139,141,142,143,145,146,148,150,151,152,156,... | 511.845329 | 192,018 | 0.713683 |
4a0335d5bcd9901ccf1a56748962745c2a09cb02 | 570 | py | Python | project/jamo.py | lani009/Naver-Ai-Burning-warmup | beea88b3215d2a00deab3679902aa28918bde1f1 | [
"MIT"
] | 1 | 2020-09-03T02:42:38.000Z | 2020-09-03T02:42:38.000Z | project/jamo.py | lani009/Naver-Ai-Burning-warmup | beea88b3215d2a00deab3679902aa28918bde1f1 | [
"MIT"
] | 17 | 2020-07-07T13:15:39.000Z | 2020-09-03T02:43:26.000Z | project/jamo.py | lani009/Naver-Ai-Burning-warmup | beea88b3215d2a00deab3679902aa28918bde1f1 | [
"MIT"
] | 1 | 2020-07-07T14:10:49.000Z | 2020-07-07T14:10:49.000Z | from soynlp.hangle import decompose
import re
#자음과 모음으로 음절 나누는 코드.
doublespace_pattern = re.compile('\s+')
def jamo_sentence(sent):
cjj = ()
def transform(char):
if char == ' ':
return char
cjj = decompose(char)
if len(cjj) == 1:
return cjj
cjj_ = ''.join... | 25.909091 | 59 | 0.587719 |
4a03378aca1965817895c7bbba141a94a3f00c0a | 180 | py | Python | reverse the number.py | Jeevananthamcse/Python-programs | b7847e25854b3ae95933edffcb141ef71185960a | [
"Unlicense"
] | 2 | 2021-08-30T08:04:15.000Z | 2022-02-27T12:47:25.000Z | reverse the number.py | Jeevananthamcse/Python-programs | b7847e25854b3ae95933edffcb141ef71185960a | [
"Unlicense"
] | null | null | null | reverse the number.py | Jeevananthamcse/Python-programs | b7847e25854b3ae95933edffcb141ef71185960a | [
"Unlicense"
] | null | null | null | n= int(input("Enter the integer number: "))
sum= 0
while (n>0):
r= n%10
sum= (sum * 10) +r
n=n// 10
print("The reverse number is : {}".format(sum))
| 22.5 | 51 | 0.5 |
4a033804e7bb6efbc79d0900a97b110d4fc642f7 | 3,465 | py | Python | claims_hosp/tests/test_load_data.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 8 | 2020-10-12T04:27:04.000Z | 2022-03-08T16:56:57.000Z | claims_hosp/tests/test_load_data.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 666 | 2020-09-30T21:18:41.000Z | 2022-03-31T22:37:12.000Z | claims_hosp/tests/test_load_data.py | jingjtang/covidcast-indicators | 34cb8786f78fbea2710b810a9500ee02c2379241 | [
"MIT"
] | 13 | 2020-10-01T14:25:06.000Z | 2022-02-12T08:31:19.000Z | # third party
import pandas as pd
import pytest
# first party
from delphi_claims_hosp.config import Config, GeoConstants
from delphi_claims_hosp.load_data import load_data, load_claims_data
CONFIG = Config()
CONSTANTS = GeoConstants()
PARAMS = {
"indicator": {
"input_file": "test_data/SYNEDI_AGG_INPATIENT... | 42.256098 | 91 | 0.68658 |
4a03381a31c870c0181c960a9378f6db866ded5e | 6,155 | py | Python | tests/functional/test_yaml.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | 1 | 2021-01-26T12:46:40.000Z | 2021-01-26T12:46:40.000Z | tests/functional/test_yaml.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | 1 | 2021-10-04T12:25:25.000Z | 2021-10-05T07:30:54.000Z | tests/functional/test_yaml.py | NeilBotelho/pip | d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f | [
"MIT"
] | 1 | 2021-09-03T11:41:21.000Z | 2021-09-03T11:41:21.000Z | """
Tests for the resolver
"""
import os
import re
import pytest
import yaml
from tests.lib import DATA_DIR, create_basic_wheel_for_package, path_to_url
_conflict_finder_pat = re.compile(
# Conflicting Requirements: \
# A 1.0.0 requires B == 2.0.0, C 1.0.0 requires B == 1.0.0.
r"""
(?P<package>[... | 30.929648 | 78 | 0.554184 |
4a03388f222362d76f479a8f8ece2fb35a8679cd | 169 | py | Python | Aula 02/ListaDeExerciciosExtra/Lista10.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 02/ListaDeExerciciosExtra/Lista10.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | Aula 02/ListaDeExerciciosExtra/Lista10.py | diegorafaelvieira/Programacao-1 | 657a974f1215cec4aed68603e738d9a135131545 | [
"MIT"
] | null | null | null | ValorCelsius =int(input("Digite a temperatura em Celsius:"))
ValorFahrenheit = (ValorCelsius * 1.8)+32
print ("O valor da temperatura em Fahrenheit é:",ValorFahrenheit)
| 42.25 | 65 | 0.769231 |
4a03389e7d6ee5ae83fab90ea32632228a50dd91 | 5,955 | py | Python | mistletoe/parse_context.py | executablebooks/mistletoe-ebp | 229812436726fd9b1af85c6e66ff8c81b415758d | [
"MIT"
] | 2 | 2020-05-19T02:06:47.000Z | 2020-06-27T10:01:59.000Z | mistletoe/parse_context.py | executablebooks/mistletoe-ebp | 229812436726fd9b1af85c6e66ff8c81b415758d | [
"MIT"
] | 5 | 2020-03-10T22:43:16.000Z | 2020-03-21T22:09:09.000Z | mistletoe/parse_context.py | ExecutableBookProject/mistletoe-ebp | 229812436726fd9b1af85c6e66ff8c81b415758d | [
"MIT"
] | null | null | null | """This module provides a container for global variables of a single parse.
It uses the `threading.local` object to ensure that global variables
are not changed by different threads.
"""
from collections import OrderedDict
from collections.abc import MutableSet
from copy import deepcopy
from importlib import import_mo... | 30.695876 | 84 | 0.654912 |
4a033a10755670557bc5f34c8e8f1f7eab1ec475 | 48 | py | Python | Livro Nilo Ney (Python)/Cap.05/Exe 5.2.py | EduardoOliver25/Python | 626f0f05641ce52ebe5e350d380ac21c3af53aa8 | [
"MIT"
] | null | null | null | Livro Nilo Ney (Python)/Cap.05/Exe 5.2.py | EduardoOliver25/Python | 626f0f05641ce52ebe5e350d380ac21c3af53aa8 | [
"MIT"
] | null | null | null | Livro Nilo Ney (Python)/Cap.05/Exe 5.2.py | EduardoOliver25/Python | 626f0f05641ce52ebe5e350d380ac21c3af53aa8 | [
"MIT"
] | null | null | null | x = 49
while x <= 99:
x = x + 1
print(x) | 12 | 14 | 0.416667 |
4a033a301bd242cec8202aed252780ed44ae5d6a | 2,341 | py | Python | models/malliva_accounts.py | olubiyiontheweb/malliva | b212e6b359eed54c92533f0a02afe3c0042150e2 | [
"MIT"
] | null | null | null | models/malliva_accounts.py | olubiyiontheweb/malliva | b212e6b359eed54c92533f0a02afe3c0042150e2 | [
"MIT"
] | null | null | null | models/malliva_accounts.py | olubiyiontheweb/malliva | b212e6b359eed54c92533f0a02afe3c0042150e2 | [
"MIT"
] | 1 | 2021-07-19T12:15:52.000Z | 2021-07-19T12:15:52.000Z | # Marketplace accounts created on the platform, they have users and settings and databases
from datetime import timedelta, datetime
from enum import Enum
from mongoengine.queryset.base import DO_NOTHING
from .malliva_users import User as UserModel
from mongoengine import Document, EmbeddedDocument, fields
class Plan... | 39.677966 | 100 | 0.747117 |
4a033a3de420194bf1c9827d0b07c6be8a593ebf | 988 | py | Python | pynet/vision/data/iris.py | deep-learning-algorithm/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | 8 | 2020-11-22T02:22:55.000Z | 2022-03-16T12:18:03.000Z | pynet/vision/data/iris.py | zjZSTU/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | null | null | null | pynet/vision/data/iris.py | zjZSTU/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | 4 | 2020-12-10T09:21:56.000Z | 2021-04-19T02:25:01.000Z | # -*- coding: utf-8 -*-
# @Time : 19-6-20 下午4:25
# @Author : zj
import pandas as pd
import numpy as np
from sklearn import utils
from sklearn.model_selection import train_test_split
# iris_path = '/home/zj/data/iris-species/Iris.csv'
def load_iris(iris_path, shuffle=True, tsize=0.8):
"""
加载iris数据
... | 25.333333 | 112 | 0.606275 |
4a033aa51d6858913aa1c250b1cb7768a4ddebc5 | 374 | py | Python | decorator_timer_test.py | pieteradejong/temp | 2dfd4cee58a37c33f5611d274ab9d12534f0c383 | [
"MIT"
] | null | null | null | decorator_timer_test.py | pieteradejong/temp | 2dfd4cee58a37c33f5611d274ab9d12534f0c383 | [
"MIT"
] | null | null | null | decorator_timer_test.py | pieteradejong/temp | 2dfd4cee58a37c33f5611d274ab9d12534f0c383 | [
"MIT"
] | null | null | null | import time
def timer_decorator(fnc):
def wrapper():
t1 = time.time()
fnc()
t2 = time.time()
print "Execution time: ", t2 - t1
return wrapper
class Solution:
# def __init__(self):
#
@timer_decorator
def my_fnc(self):
print sum(xrange(1000))
def main():
sol = Solution(... | 14.96 | 39 | 0.593583 |
4a033aaf869bc22e8b1ef83d835b31677a6cbcfb | 4,977 | py | Python | openstack_dashboard/test/integration_tests/decorators.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 9 | 2016-06-03T03:53:24.000Z | 2017-05-20T16:53:23.000Z | openstack_dashboard/test/integration_tests/decorators.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 1 | 2016-09-08T10:57:46.000Z | 2016-09-08T10:59:06.000Z | openstack_dashboard/test/integration_tests/decorators.py | Mirantis/mos-horizon | d2444220d959c8b921436bd75459c2face0e71d2 | [
"Apache-2.0"
] | 4 | 2016-08-01T10:50:15.000Z | 2017-02-22T12:11:19.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
# d... | 31.5 | 78 | 0.658429 |
4a033ae7b28f42170a8d5e6de7b85be353395626 | 43,550 | py | Python | src/transformers/modeling_t5.py | yuvalpinter/transformers | 9c67196b83a824df577742d32d38e9121d8a9285 | [
"Apache-2.0"
] | null | null | null | src/transformers/modeling_t5.py | yuvalpinter/transformers | 9c67196b83a824df577742d32d38e9121d8a9285 | [
"Apache-2.0"
] | null | null | null | src/transformers/modeling_t5.py | yuvalpinter/transformers | 9c67196b83a824df577742d32d38e9121d8a9285 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Mesh TensorFlow authors, T5 Authors and HuggingFace Inc. 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... | 47.543668 | 169 | 0.650425 |
4a033b4b054ab8c566a8b132d775e3801c9d6346 | 63,365 | py | Python | google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py | LaudateCorpus1/python-vm-migration | bf6760ce5ead26b352a5a89e079fa2ca20c0c3c6 | [
"Apache-2.0"
] | null | null | null | google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py | LaudateCorpus1/python-vm-migration | bf6760ce5ead26b352a5a89e079fa2ca20c0c3c6 | [
"Apache-2.0"
] | null | null | null | google/cloud/vmmigration_v1/services/vm_migration/transports/grpc_asyncio.py | LaudateCorpus1/python-vm-migration | bf6760ce5ead26b352a5a89e079fa2ca20c0c3c6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 42.271514 | 95 | 0.637323 |
4a033b8ce8450acf542173778b7b17a1e21e4348 | 10,574 | py | Python | src/gt4sd/algorithms/generation/molgx/implementation.py | christofid/gt4sd-core | ea4257e8ff24ee7f766d7010ea5955d823eb9ad7 | [
"MIT"
] | 57 | 2022-02-11T22:32:58.000Z | 2022-03-31T23:17:06.000Z | src/gt4sd/algorithms/generation/molgx/implementation.py | christofid/gt4sd-core | ea4257e8ff24ee7f766d7010ea5955d823eb9ad7 | [
"MIT"
] | 31 | 2022-02-11T22:43:22.000Z | 2022-03-31T12:04:00.000Z | src/gt4sd/algorithms/generation/molgx/implementation.py | christofid/gt4sd-core | ea4257e8ff24ee7f766d7010ea5955d823eb9ad7 | [
"MIT"
] | 8 | 2022-02-15T11:13:54.000Z | 2022-03-22T13:56:13.000Z | #
# MIT License
#
# Copyright (c) 2022 GT4SD team
#
# 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, merge,... | 40.358779 | 109 | 0.646302 |
4a033c56fecac4ff5580a0b5a3e39f9c4334098c | 2,287 | py | Python | frontera/utils/managers.py | bomquote/transistor-frontera | 29174a9a04e6ea76cec13890f89fb5fca598ef2d | [
"BSD-3-Clause"
] | null | null | null | frontera/utils/managers.py | bomquote/transistor-frontera | 29174a9a04e6ea76cec13890f89fb5fca598ef2d | [
"BSD-3-Clause"
] | null | null | null | frontera/utils/managers.py | bomquote/transistor-frontera | 29174a9a04e6ea76cec13890f89fb5fca598ef2d | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from frontera.core.manager import LocalFrontierManager, SpiderFrontierManager
from .converters import BaseRequestConverter, BaseResponseConverter
class FrontierManagerWrapper:
def __init__(self, settings, manager=None):
if manager is None:
manager = Local... | 49.717391 | 118 | 0.681242 |
4a033cbcf1d32a55eaacbe9c0f6704e304e127b3 | 3,467 | py | Python | python/paddle_serving_server/web_service.py | wangxicoding/Serving | 508997bbbe88849d5272950639dc7ad62ee35467 | [
"Apache-2.0"
] | null | null | null | python/paddle_serving_server/web_service.py | wangxicoding/Serving | 508997bbbe88849d5272950639dc7ad62ee35467 | [
"Apache-2.0"
] | null | null | null | python/paddle_serving_server/web_service.py | wangxicoding/Serving | 508997bbbe88849d5272950639dc7ad62ee35467 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.098901 | 78 | 0.654745 |
4a033d0d8f26f0b2f7019b1d491896846c28fd98 | 5,906 | py | Python | xenavalkyrie/samples/xena_line_test.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 4 | 2018-07-13T08:09:38.000Z | 2022-02-09T01:36:13.000Z | xenavalkyrie/samples/xena_line_test.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 1 | 2019-07-31T04:56:43.000Z | 2019-08-01T07:11:21.000Z | xenavalkyrie/samples/xena_line_test.py | xenadevel/PyXenaValkyrie | 9bb1d0b058c45dc94a778fd674a679b53f03a34c | [
"Apache-2.0"
] | 3 | 2019-05-30T23:47:02.000Z | 2022-02-04T12:32:14.000Z | #!/usr/bin/env python
# encoding: utf-8
""""
@author: yoram@ignissoft.com
"""
import sys
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter, SUPPRESS
import logging
import time
import json
from trafficgenerator.tgn_utils import ApiType
from xenavalkyrie.xena_app import init_xena
from xenavalkyrie.xena... | 35.578313 | 112 | 0.657806 |
4a033d5ff3bd360fa4536dac93ce6f2aead9bc9e | 3,292 | py | Python | distribution_metrics/patch_coherence_loss.py | ariel415el/GPDM | 50e0a3c3897eb5bbcec81c44a5668d230cdfd26c | [
"Apache-2.0"
] | 18 | 2021-11-16T19:09:09.000Z | 2022-03-31T23:29:39.000Z | distribution_metrics/patch_coherence_loss.py | ariel415el/GPDM | 50e0a3c3897eb5bbcec81c44a5668d230cdfd26c | [
"Apache-2.0"
] | 1 | 2022-03-30T16:36:36.000Z | 2022-03-30T16:42:22.000Z | distribution_metrics/patch_coherence_loss.py | ariel415el/GPDM | 50e0a3c3897eb5bbcec81c44a5668d230cdfd26c | [
"Apache-2.0"
] | 2 | 2022-03-30T15:17:09.000Z | 2022-03-31T23:29:45.000Z | from random import randint
import torch
from distribution_metrics.patch_swd import extract_patches
def efficient_compute_distances(x, y):
dist = (x * x).sum(1)[:, None] + (y * y).sum(1)[None, :] - 2.0 * torch.mm(x, torch.transpose(y, 0, 1))
return dist
def compute_dists(x, y):
dist = torch.sum((x[:, No... | 38.729412 | 141 | 0.639429 |
4a033d87c0993500072b9e5e9c80adf692d0b877 | 14,766 | py | Python | pymatgen/symmetry/bandstructure.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 1 | 2021-11-02T21:10:11.000Z | 2021-11-02T21:10:11.000Z | pymatgen/symmetry/bandstructure.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 5 | 2018-08-07T23:00:23.000Z | 2021-01-05T22:46:23.000Z | pymatgen/symmetry/bandstructure.py | Crivella/pymatgen | dd3737011e76520da1347d5db75db3a3f87e520f | [
"MIT"
] | 6 | 2019-04-26T18:50:41.000Z | 2020-03-29T17:58:34.000Z | # Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""
Provides a class for interacting with KPath classes to
generate high-symmetry k-paths using different conventions.
"""
import itertools
from warnings import warn
import networkx as nx
import numpy as np
from pymatgen.sy... | 36.369458 | 115 | 0.587227 |
4a033dc8f079518a4f0638b47ddcdba51c025bb7 | 3,638 | py | Python | experiment/raug/raug/utils/telegram_bot.py | enkiwang/Portable-Skin-Lesion-Diagnosis | cfd69ba5f32adb946db8c0366b1032055418e0a4 | [
"MIT"
] | 4 | 2021-04-28T08:38:33.000Z | 2022-02-15T19:43:25.000Z | raug/utils/telegram_bot.py | paaatcha/jedy | da733d3e71243c477f243e604e1c2d7bb62462d2 | [
"MIT"
] | null | null | null | raug/utils/telegram_bot.py | paaatcha/jedy | da733d3e71243c477f243e604e1c2d7bb62462d2 | [
"MIT"
] | 2 | 2021-04-20T13:14:03.000Z | 2022-01-22T18:31:26.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Author: André Pacheco
E-mail: pacheco.comp@gmail.com
This file implements a telegram bot to delivery some pieces of information about the training phase.
If you find any bug or have some suggestion, please, email me.
"""
from datetime import date
from telegram.ext ... | 37.895833 | 409 | 0.669874 |
4a033f61b66b57915b211444a8e6764f277b6cea | 107 | py | Python | djongo/dynamic_formsets/apps.py | tanguy-s/djongo | f64c313628de52b836a979aab3a4c2d8638552ab | [
"BSD-3-Clause"
] | null | null | null | djongo/dynamic_formsets/apps.py | tanguy-s/djongo | f64c313628de52b836a979aab3a4c2d8638552ab | [
"BSD-3-Clause"
] | null | null | null | djongo/dynamic_formsets/apps.py | tanguy-s/djongo | f64c313628de52b836a979aab3a4c2d8638552ab | [
"BSD-3-Clause"
] | null | null | null | from django.apps import AppConfig
class DynamicFormsetsConfig(AppConfig):
name = 'dynamic_formsets'
| 15.285714 | 39 | 0.785047 |
4a033fa4fdfaba2d308fb34a9f0e7cf6d1b7925d | 7,069 | py | Python | test/test_prettyxml.py | tonyfast/rdflib | e4fe0fdbd4de7e1183418f302315b51a14602e03 | [
"BSD-3-Clause"
] | 2 | 2021-02-06T17:36:05.000Z | 2021-04-21T07:33:39.000Z | test/test_prettyxml.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | 2 | 2020-05-09T15:03:57.000Z | 2020-05-30T10:51:40.000Z | test/test_prettyxml.py | pragya16067/rdflib | 6b5bd37ccc67bdec62d2e36d174eb7933b5020b2 | [
"BSD-3-Clause"
] | 4 | 2020-05-08T08:36:19.000Z | 2020-05-28T07:23:23.000Z | # -*- coding: UTF-8 -*-
from rdflib.term import URIRef, BNode, Literal
from rdflib.namespace import RDF, RDFS
from io import BytesIO
from rdflib.plugins.serializers.rdfxml import PrettyXMLSerializer
from rdflib.graph import ConjunctiveGraph
class SerializerTestBase(object):
repeats = 8
def setup(self):
... | 32.278539 | 149 | 0.577309 |
4a03418eaa208cdff1026590d19e51c2c88eb367 | 6,483 | py | Python | pysteps/verification/plots.py | AFansGH/pysteps | ee5cd10ed9058808f934cb1992913055fbcbb3d2 | [
"BSD-3-Clause"
] | null | null | null | pysteps/verification/plots.py | AFansGH/pysteps | ee5cd10ed9058808f934cb1992913055fbcbb3d2 | [
"BSD-3-Clause"
] | null | null | null | pysteps/verification/plots.py | AFansGH/pysteps | ee5cd10ed9058808f934cb1992913055fbcbb3d2 | [
"BSD-3-Clause"
] | null | null | null | """
pysteps.verification.plots
==========================
Methods for plotting verification results.
.. autosummary::
:toctree: ../generated/
plot_intensityscale
plot_rankhist
plot_reldiag
plot_ROC
"""
from matplotlib import cm
import matplotlib.pylab as plt
from mpl_toolkits.axes_grid1.inset_lo... | 29.60274 | 86 | 0.622089 |
4a03446f7d00d65d3f64cdae69d1c8264fd1ec63 | 1,136 | py | Python | symcon/querysets.py | lociii/symcon-index | cf5882778bab9f32a1eeccb14e9a79db30a3d1d7 | [
"MIT"
] | null | null | null | symcon/querysets.py | lociii/symcon-index | cf5882778bab9f32a1eeccb14e9a79db30a3d1d7 | [
"MIT"
] | 6 | 2016-12-30T19:52:31.000Z | 2018-08-23T18:48:09.000Z | symcon/querysets.py | lociii/symcon-index | cf5882778bab9f32a1eeccb14e9a79db30a3d1d7 | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from django.db import models
from django.db.models.query_utils import Q
class LibraryQuerySet(models.QuerySet):
def last_updated(self):
return self.order_by('-repository__last_update')
def search(self, search_term):
return self.prefetch_related(
'repository... | 47.333333 | 87 | 0.738556 |
4a03451cb78532bdee875ac3887fc267e8597c6a | 7,471 | py | Python | server/server/organizations/models.py | omert-visiblerisk/connective | c6b81700b35e2d8355ad1535b182093595fff8b7 | [
"MIT"
] | null | null | null | server/server/organizations/models.py | omert-visiblerisk/connective | c6b81700b35e2d8355ad1535b182093595fff8b7 | [
"MIT"
] | null | null | null | server/server/organizations/models.py | omert-visiblerisk/connective | c6b81700b35e2d8355ad1535b182093595fff8b7 | [
"MIT"
] | null | null | null | from django.core.validators import RegexValidator
from django.db import models
from django.utils.translation import gettext_lazy as _
from taggit.managers import TaggableManager
from server.schools.models import School
from server.users.models import Consumer, Instructor, User
from server.utils.model_fields import ran... | 35.407583 | 87 | 0.683576 |
4a03463fffa2f8fcb56821b93766fc637909c3fa | 3,365 | py | Python | tests/aiohttp/schema.py | TheVinhLuong102/Strawberry | 3c442dc19d17bc55c4e26de1db7a9eedc0a228f5 | [
"MIT"
] | 2,062 | 2019-04-07T17:47:30.000Z | 2022-03-31T01:54:16.000Z | tests/aiohttp/schema.py | TheVinhLuong102/Strawberry | 3c442dc19d17bc55c4e26de1db7a9eedc0a228f5 | [
"MIT"
] | 1,582 | 2019-04-07T18:31:33.000Z | 2022-03-31T18:32:13.000Z | tests/aiohttp/schema.py | TheVinhLuong102/Strawberry | 3c442dc19d17bc55c4e26de1db7a9eedc0a228f5 | [
"MIT"
] | 303 | 2019-04-13T08:44:40.000Z | 2022-03-29T09:54:41.000Z | import asyncio
import typing
from enum import Enum
from graphql import GraphQLError
import strawberry
from strawberry.file_uploads import Upload
from strawberry.subscriptions.protocols.graphql_transport_ws.types import PingMessage
@strawberry.enum
class Flavor(Enum):
VANILLA = "vanilla"
STRAWBERRY = "strawb... | 28.516949 | 86 | 0.684695 |
4a0346c1dacc5fdacd11a45f262e16ef3e57ce5e | 31,861 | py | Python | kubernetes_asyncio/client/models/v1_volume.py | dineshsonachalam/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | 1 | 2021-02-25T04:36:18.000Z | 2021-02-25T04:36:18.000Z | kubernetes_asyncio/client/models/v1_volume.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_volume.py | hubo1016/kubernetes_asyncio | d57e9e9be11f6789e1ce8d5b161acb64d29acf35 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.12.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | 36.495991 | 512 | 0.654656 |
4a0346f5527dccec476ae29905b0c28f57507abc | 6,443 | py | Python | Python/walk_the_folders.py | Apop85/Tools | 9f8b8a3d229d2acbede5693a74b75b28620b5f20 | [
"MIT"
] | null | null | null | Python/walk_the_folders.py | Apop85/Tools | 9f8b8a3d229d2acbede5693a74b75b28620b5f20 | [
"MIT"
] | null | null | null | Python/walk_the_folders.py | Apop85/Tools | 9f8b8a3d229d2acbede5693a74b75b28620b5f20 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
####
# File: walk_the_folders.py
# Project: sonstige_uebungen
#-----
# Created Date: Monday 20.04.2020, 12:17
# Author: Apop85
#-----
# Last Modified: Tuesday 21.04.2020, 23:00
#-----
# Copyright (c) 2020 Apop85
# This software is published under the MIT license.
# Check h... | 34.089947 | 140 | 0.629055 |
4a03472beee6237b566ff1b8d0fb564ea4fdef9e | 9,938 | py | Python | train.py | lexical-kenobi/Face-Vision-3D_Pose | 07eee33d09018c99251051a983d3842212177e5a | [
"MIT"
] | 3,276 | 2018-06-30T00:51:46.000Z | 2022-03-31T13:25:50.000Z | train.py | lexical-kenobi/Face-Vision-3D_Pose | 07eee33d09018c99251051a983d3842212177e5a | [
"MIT"
] | 704 | 2020-09-30T10:44:13.000Z | 2022-03-30T07:18:28.000Z | train.py | lexical-kenobi/Face-Vision-3D_Pose | 07eee33d09018c99251051a983d3842212177e5a | [
"MIT"
] | 650 | 2018-07-03T13:44:05.000Z | 2022-03-23T23:30:42.000Z | #!/usr/bin/env python3
# coding: utf-8
import os.path as osp
from pathlib import Path
import numpy as np
import argparse
import time
import logging
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
import mobilenet_v1
import torch.backends.cudnn as ... | 35.241135 | 105 | 0.613604 |
4a03492146f23a55ab09937fdb1fac06d3deac2c | 1,627 | py | Python | core/data/collates/contrib/__init__.py | cjy97/LibFewShot | cffd0f6d9cb9a13cb4eaf0fb69c13f317508591f | [
"MIT"
] | 471 | 2021-09-13T11:28:34.000Z | 2022-03-30T07:26:54.000Z | core/data/collates/contrib/__init__.py | cjy97/LibFewShot | cffd0f6d9cb9a13cb4eaf0fb69c13f317508591f | [
"MIT"
] | 24 | 2021-09-22T02:34:05.000Z | 2022-02-19T07:26:39.000Z | core/data/collates/contrib/__init__.py | cjy97/LibFewShot | cffd0f6d9cb9a13cb4eaf0fb69c13f317508591f | [
"MIT"
] | 82 | 2021-09-16T12:48:01.000Z | 2022-03-28T06:57:47.000Z | # -*- coding: utf-8 -*-
from .autoaugment import ImageNetPolicy
from .cutout import Cutout
from .randaugment import RandAugment
from torchvision import transforms
CJ_DICT = {"brightness": 0.4, "contrast": 0.4, "saturation": 0.4}
def get_augment_method(
config,
):
"""Return the corresponding augmentation meth... | 36.155556 | 158 | 0.676706 |
4a034b9106ec2f00f4c78c5b4a3c286ed87c9dd4 | 9,060 | py | Python | docs/conf.py | ghofranehr/foobar | 0c0baaea8c161d62584298a63f74fb40d867342b | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ghofranehr/foobar | 0c0baaea8c161d62584298a63f74fb40d867342b | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | ghofranehr/foobar | 0c0baaea8c161d62584298a63f74fb40d867342b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# foobar documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 16 15:13:53 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | 32.12766 | 79 | 0.715784 |
4a034bb146e6efb727ee9b741e3d6ccee5a800da | 2,006 | py | Python | create_dataframe.py | MW55/amplicon_snakemake_pipeline | feb30960dca294490bcdff666af885a4b768a429 | [
"MIT"
] | 27 | 2019-10-10T09:21:23.000Z | 2021-12-28T19:10:28.000Z | create_dataframe.py | MW55/amplicon_snakemake_pipeline | feb30960dca294490bcdff666af885a4b768a429 | [
"MIT"
] | 15 | 2019-11-11T11:47:15.000Z | 2021-11-16T13:34:19.000Z | create_dataframe.py | MW55/amplicon_snakemake_pipeline | feb30960dca294490bcdff666af885a4b768a429 | [
"MIT"
] | 7 | 2020-02-16T17:38:55.000Z | 2022-02-08T23:44:48.000Z | import yaml
import pandas as pd
import numpy as np
from glob import glob
import sys
# Create the datatable containing the samples, units and paths of all
# fastq files formatted correctly. This is vital for the snakemake
# pipeline, without it, the wildcards can't be created.
with open(sys.argv[1]) as f_:
config ... | 37.148148 | 84 | 0.547358 |
4a034bbe9e282d968346f3bc09415a5dc008430c | 6,956 | py | Python | train.py | kerengaiger/mnist_autoencoder | 19d7c347897a7f1ced684a04146b052940884e5f | [
"MIT"
] | null | null | null | train.py | kerengaiger/mnist_autoencoder | 19d7c347897a7f1ced684a04146b052940884e5f | [
"MIT"
] | null | null | null | train.py | kerengaiger/mnist_autoencoder | 19d7c347897a7f1ced684a04146b052940884e5f | [
"MIT"
] | null | null | null | import argparse
import os
import pathlib
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torch.utils.data.sampler import SubsetRandomSampler
from torchvision import datasets
from tqdm import tqdm
from model import DeNoiser
from uti... | 38.010929 | 120 | 0.670357 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.