hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eeaff288c31c17847a9352fd65b53c77842789dc | 7,407 | py | Python | src/models/AGAIN-VC/lightning.py | KimythAnly/PyTorch-Voice-Conversion | a09cb26f3520da7d33595fbf65c3f7020bd49a0b | [
"MIT"
] | null | null | null | src/models/AGAIN-VC/lightning.py | KimythAnly/PyTorch-Voice-Conversion | a09cb26f3520da7d33595fbf65c3f7020bd49a0b | [
"MIT"
] | null | null | null | src/models/AGAIN-VC/lightning.py | KimythAnly/PyTorch-Voice-Conversion | a09cb26f3520da7d33595fbf65c3f7020bd49a0b | [
"MIT"
] | null | null | null | import os
from collections import OrderedDict
import torch
import torch.nn as nn
import numpy as np
from torch.utils.data import DataLoader
import torch.nn.functional as F
from einops import rearrange, reduce
from .model import Encoder, Decoder, Activation
from ..classifier.model import Classifier
from ...vocoder imp... | 34.133641 | 105 | 0.553665 |
19948c95de56e79d17c7a8ac6c62405d4866da55 | 7,695 | py | Python | testing/unit_tests/test_completeness_and_consistency_checker.py | IPASC/DataConversionTool | 88f04c4df97f4a060c566da4bfc0c0e4fe246536 | [
"MIT",
"BSD-3-Clause"
] | 2 | 2021-12-16T04:21:37.000Z | 2022-03-10T03:19:21.000Z | testing/unit_tests/test_completeness_and_consistency_checker.py | IPASC/DataConversionTool | 88f04c4df97f4a060c566da4bfc0c0e4fe246536 | [
"MIT",
"BSD-3-Clause"
] | 12 | 2021-12-20T13:22:45.000Z | 2022-02-17T19:57:03.000Z | testing/unit_tests/test_completeness_and_consistency_checker.py | amasmiller/PACFISH | f9bc912e701df3261a2b9a94df281c664701701d | [
"BSD-3-Clause"
] | 1 | 2022-02-11T21:33:28.000Z | 2022-02-11T21:33:28.000Z | # SPDX-FileCopyrightText: 2021 International Photoacoustics Standardisation Consortium (IPASC)
# SPDX-License-Identifier: BSD 3-Clause License
import unittest
import numpy as np
from unittest.case import TestCase
import pacfish as pf
from testing.unit_tests.utils import create_complete_device_metadata_dictionary, crea... | 42.75 | 129 | 0.721507 |
4f82e7249c7d093d5fdc35f2a184d049b01e3d49 | 882 | py | Python | jtyoui/fractal/KochSnowflake.py | gjh123/Jtyoui | 3fc819a4cebd9f6dc99660214efa92bc7f43eef1 | [
"MIT"
] | 2 | 2019-10-12T06:29:40.000Z | 2019-10-12T06:29:47.000Z | jtyoui/fractal/KochSnowflake.py | yy1244/Jtyoui | d3c212ed9d6ffa6b37a8ca49098ab59c89216f09 | [
"MIT"
] | null | null | null | jtyoui/fractal/KochSnowflake.py | yy1244/Jtyoui | d3c212ed9d6ffa6b37a8ca49098ab59c89216f09 | [
"MIT"
] | null | null | null | #!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2019/2/11
"""
科赫雪花
在一单位长度的线段上对其三等分,将中间段直线换成一个去掉底边的等边三角形,
再在每条直线上重复以上操作,如此进行下去直到无穷,就得到分形Koch曲线。
"""
import turtle
def koch(p, order, size):
if order == 0:
p.forward(size)
else:
for angle in [60, -120, 60, 0]:
koch(p, order - 1,... | 19.173913 | 62 | 0.55102 |
98a9dc36d5d98f43540b1c281bb5dbcd67a38d21 | 1,965 | py | Python | distro/src/bin/cputil.py | chengkaisheng/atlas | 150c7a6949df8517071417f57c3697760da458c8 | [
"Apache-2.0"
] | 123 | 2015-06-23T08:56:10.000Z | 2021-11-10T19:24:57.000Z | distro/src/bin/cputil.py | tomscut/atlas | bb10c16ffe1b3911af3161c74b45069fa8add94d | [
"Apache-2.0"
] | 18 | 2022-03-18T17:06:20.000Z | 2022-03-18T17:06:30.000Z | distro/src/bin/cputil.py | tomscut/atlas | bb10c16ffe1b3911af3161c74b45069fa8add94d | [
"Apache-2.0"
] | 152 | 2015-06-16T06:29:14.000Z | 2022-03-28T10:19:06.000Z | #!/usr/bin/env python
#
# 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 "Li... | 33.305085 | 118 | 0.690585 |
5c8f3c5030198c883c7b3911d86a6007e61565d5 | 410 | py | Python | main.py | xckevin/streamlit-blog | 2d4f8c1c23fd50af88f34245a642c9e9d4e95100 | [
"Apache-2.0"
] | 1 | 2021-12-12T01:13:19.000Z | 2021-12-12T01:13:19.000Z | main.py | xckevin/streamlit-blog | 2d4f8c1c23fd50af88f34245a642c9e9d4e95100 | [
"Apache-2.0"
] | null | null | null | main.py | xckevin/streamlit-blog | 2d4f8c1c23fd50af88f34245a642c9e9d4e95100 | [
"Apache-2.0"
] | null | null | null | import streamlit as st
import os
dir = os.path.join(os.getcwd(), 'files')
def getAllFiles():
return os.listdir(dir)
def readFile(x):
with open(x, 'r', encoding='UTF-8') as f:
d = f.read()
return d
st.sidebar.header('List')
file = st.sidebar.selectbox('', getAllFiles())
if file:
st.... | 19.52381 | 50 | 0.62439 |
acee895c92e08679a70abfa486cf7bad6ea7c82c | 4,988 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeApplySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeApplySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayCommerceEducateTuitioncodeApplySendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.MonitorInfo import MonitorInfo
from alipay.aop.api.domain.PayeeInfo import PayeeInfo
class AlipayCommerceEducateTuitioncodeApplySendModel(object):
def __init__(self):
... | 32.38961 | 97 | 0.61267 |
0c16d56ca458115c2cc33d34e677bdd46dc3ff7f | 638 | py | Python | codeforces_api.py | belkka/codeforces-command-line-tool | 7882159cd5b7719ad747d3fa3bb5747899a93356 | [
"MIT"
] | null | null | null | codeforces_api.py | belkka/codeforces-command-line-tool | 7882159cd5b7719ad747d3fa3bb5747899a93356 | [
"MIT"
] | null | null | null | codeforces_api.py | belkka/codeforces-command-line-tool | 7882159cd5b7719ad747d3fa3bb5747899a93356 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
BASE_URL = 'http://codeforces.com/api/'
def method(name):
def cf_api_method(**kwargs):
headers = { 'Accept-Language': 'ru,en;q=0.9' }
r = requests.get(BASE_URL + name, params=kwargs, headers=headers)
r.raise_for_status()
... | 23.62963 | 73 | 0.601881 |
53fbab7e1ae9968e512b0338d365682e08392d3a | 3,963 | py | Python | kubernetes/client/api/autoscaling_api.py | fooka03/python | 073cf4d89e532f92b57e8955b4efc3d5d5eb80cf | [
"Apache-2.0"
] | 2 | 2020-07-02T05:47:41.000Z | 2020-07-02T05:50:34.000Z | kubernetes/client/api/autoscaling_api.py | fooka03/python | 073cf4d89e532f92b57e8955b4efc3d5d5eb80cf | [
"Apache-2.0"
] | 1 | 2021-03-25T23:44:49.000Z | 2021-03-25T23:44:49.000Z | k8sdeployment/k8sstat/python/kubernetes/client/api/autoscaling_api.py | JeffYFHuang/gpuaccounting | afa934350ebbd0634beb60b9df4a147426ea0006 | [
"MIT"
] | 1 | 2021-10-13T17:45:37.000Z | 2021-10-13T17:45:37.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.15.6
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# p... | 32.483607 | 124 | 0.621751 |
80ddb4bd2a521bbe9be418ca9a023f1561b7b17c | 4,241 | py | Python | bh_modules/bracketselect.py | michaelblyons/BracketHighlighter | 3f21c1948062250db767eb76ba1430d35d9cb862 | [
"Unlicense",
"MIT"
] | null | null | null | bh_modules/bracketselect.py | michaelblyons/BracketHighlighter | 3f21c1948062250db767eb76ba1430d35d9cb862 | [
"Unlicense",
"MIT"
] | null | null | null | bh_modules/bracketselect.py | michaelblyons/BracketHighlighter | 3f21c1948062250db767eb76ba1430d35d9cb862 | [
"Unlicense",
"MIT"
] | null | null | null | """
BracketHighlighter.
Copyright (c) 2013 - 2016 Isaac Muse <isaacmuse@gmail.com>
License: MIT
"""
from BracketHighlighter import bh_plugin
import sublime
DEFAULT_TAGS = ["cfml", "html", "angle"]
class SelectBracket(bh_plugin.BracketPluginCommand):
"""Select Bracket plugin."""
def run(self, edit, name, se... | 39.635514 | 100 | 0.561896 |
8d73e99751e51d742e1fd72bc072313914287e99 | 1,445 | py | Python | lib/django/core/management/commands/sendtestemail.py | bretlowery/snakr | eee58a18df2e194b72b5dc07cc5a27856f49593c | [
"BSD-3-Clause"
] | 1 | 2016-11-27T23:31:33.000Z | 2016-11-27T23:31:33.000Z | lib/django/core/management/commands/sendtestemail.py | bretlowery/snakr | eee58a18df2e194b72b5dc07cc5a27856f49593c | [
"BSD-3-Clause"
] | null | null | null | lib/django/core/management/commands/sendtestemail.py | bretlowery/snakr | eee58a18df2e194b72b5dc07cc5a27856f49593c | [
"BSD-3-Clause"
] | null | null | null | import socket
from django.core.mail import mail_admins, mail_managers, send_mail
from django.core.management.base import BaseCommand
from django.utils import timezone
class Command(BaseCommand):
help = "Sends a test email to the email addresses specified as arguments."
missing_args_message = "You must specif... | 41.285714 | 111 | 0.661592 |
f7836d58d34b585825ffd99dc21e484b39efaef8 | 1,328 | py | Python | aliyun-python-sdk-yundun/aliyunsdkyundun/request/v20150416/SetDdosAutoRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-yundun/aliyunsdkyundun/request/v20150416/SetDdosAutoRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-yundun/aliyunsdkyundun/request/v20150416/SetDdosAutoRequest.py | sdk-team/aliyun-openapi-python-sdk | 384730d707e6720d1676ccb8f552e6a7b330ec86 | [
"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 u... | 36.888889 | 76 | 0.768072 |
ef08cefede659504d68b3a3b01d15cd4ea4b870b | 3,347 | py | Python | petShop/petShop/settings.py | SamZing777/pet_commerce | a1078529b796a8505212a8023fe948cdafecc35a | [
"MIT"
] | 1 | 2022-02-25T00:44:33.000Z | 2022-02-25T00:44:33.000Z | petShop/petShop/settings.py | SamZing777/pet_commerce | a1078529b796a8505212a8023fe948cdafecc35a | [
"MIT"
] | null | null | null | petShop/petShop/settings.py | SamZing777/pet_commerce | a1078529b796a8505212a8023fe948cdafecc35a | [
"MIT"
] | null | null | null | from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
TEMPLATE_DIR = Path(BASE_DIR, 'templates')
STATIC_DIR = Path(BASE_DIR, 'static')
MEDIA_DIR = Path(BASE_DIR, 'media')
# Quick-start development settings - unsuitable for producti... | 24.610294 | 91 | 0.695847 |
54f1a339b69a040f3f96d3e02fe0effd9c70aba0 | 2,680 | py | Python | setup.py | globusonline/oauthenticator-sessions | d2c51d541822009e89609b4addb96c8f4f134a17 | [
"BSD-3-Clause"
] | null | null | null | setup.py | globusonline/oauthenticator-sessions | d2c51d541822009e89609b4addb96c8f4f134a17 | [
"BSD-3-Clause"
] | null | null | null | setup.py | globusonline/oauthenticator-sessions | d2c51d541822009e89609b4addb96c8f4f134a17 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Juptyer Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Minimal Python version sanity check (from IPython/Jupyterhub)
#-----------------------------------... | 31.162791 | 102 | 0.579851 |
6edc617705186e07a25220fed51e0dfbfef5cca2 | 2,169 | py | Python | test/t_nfv/mocked_nfv.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | test/t_nfv/mocked_nfv.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | test/t_nfv/mocked_nfv.py | shield-h2020/nfvo | 1226f3d4824d1e39dd1e986ae541820e0ac9c422 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017-present i2CAT
#
# 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 app... | 38.052632 | 78 | 0.698018 |
c032d237da1cc4073536d0935d86c746ac018bb2 | 2,442 | py | Python | testing/test_basic_api.py | oss-qm/pypy-setuptools-scm | 19e3c8d636dd54d901c684d169655b87887dc990 | [
"MIT"
] | null | null | null | testing/test_basic_api.py | oss-qm/pypy-setuptools-scm | 19e3c8d636dd54d901c684d169655b87887dc990 | [
"MIT"
] | null | null | null | testing/test_basic_api.py | oss-qm/pypy-setuptools-scm | 19e3c8d636dd54d901c684d169655b87887dc990 | [
"MIT"
] | null | null | null | import os
import py
import pytest
import setuptools_scm
from setuptools_scm import dump_version
from setuptools_scm.utils import data_from_mime, do
@pytest.mark.parametrize("cmd", ["ls", "dir"])
def test_do(cmd, tmpdir):
if not py.path.local.sysfind(cmd):
pytest.skip(cmd + " not found")
do(cmd, str(t... | 26.258065 | 87 | 0.706388 |
209e40585483a40e0b1e28a356bc8c74c84c2613 | 617 | py | Python | web/mooctracker/academics/models.py | Jaaga/mooc-tracker | b7be270d24fa2608042064dc87ae13740893bade | [
"MIT"
] | null | null | null | web/mooctracker/academics/models.py | Jaaga/mooc-tracker | b7be270d24fa2608042064dc87ae13740893bade | [
"MIT"
] | 1 | 2020-06-05T17:43:59.000Z | 2020-06-05T17:43:59.000Z | web/mooctracker/academics/models.py | Jaaga/mooc-tracker | b7be270d24fa2608042064dc87ae13740893bade | [
"MIT"
] | 2 | 2015-02-25T10:46:20.000Z | 2016-10-28T11:24:32.000Z | from django.db import models
from students.models import Student
from courses.models import Course
class Academic(models.Model):
student = models.ForeignKey(Student)
course = models.ForeignKey(Course)
start_date = models.DateField(default=None, blank=True, null=True)
end_date = models.DateField(default=None, ... | 36.294118 | 96 | 0.78282 |
d6405948741e1bfd84b10b4af23b579f49a79011 | 2,108 | py | Python | django_lifecycle/utils.py | Amertz08/django-lifecycle | 7e825a1c09a7ff1683d97e6b4840f1dcdd3c72f0 | [
"MIT"
] | null | null | null | django_lifecycle/utils.py | Amertz08/django-lifecycle | 7e825a1c09a7ff1683d97e6b4840f1dcdd3c72f0 | [
"MIT"
] | null | null | null | django_lifecycle/utils.py | Amertz08/django-lifecycle | 7e825a1c09a7ff1683d97e6b4840f1dcdd3c72f0 | [
"MIT"
] | null | null | null | from typing import List
from django.utils.functional import cached_property
from .django_info import DJANGO_RELATED_FIELD_DESCRIPTOR_CLASSES
def _get_model_property_names(instance) -> List[str]:
"""
Gather up properties and cached_properties which may be methods
that were decorated. Need to insp... | 27.736842 | 98 | 0.656072 |
fbef4df52110c4e634aade88e5e5675273c6b2ac | 2,481 | py | Python | z2/part3/updated_part2_batch/jm/parser_errors_2/177002466.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 1 | 2020-04-16T12:13:47.000Z | 2020-04-16T12:13:47.000Z | z2/part3/updated_part2_batch/jm/parser_errors_2/177002466.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:50:15.000Z | 2020-05-19T14:58:30.000Z | z2/part3/updated_part2_batch/jm/parser_errors_2/177002466.py | kozakusek/ipp-2020-testy | 09aa008fa53d159672cc7cbf969a6b237e15a7b8 | [
"MIT"
] | 18 | 2020-03-06T17:45:13.000Z | 2020-06-09T19:18:31.000Z | from part1 import (
gamma_board,
gamma_busy_fields,
gamma_delete,
gamma_free_fields,
gamma_golden_move,
gamma_golden_possible,
gamma_move,
gamma_new,
)
"""
scenario: test_random_actions
uuid: 177002466
"""
"""
random actions, total chaos
"""
board = gamma_new(3, 5, 2, 11)
assert board i... | 31.0125 | 43 | 0.668279 |
5f5e4429a47b941d215ad7877ba878c89e3c21ea | 149 | py | Python | nannyml/drift/model_outputs/__init__.py | SoyGema/NannyML | 323ff404e0e06c479b01d2a63c1c3af9680d95ab | [
"Apache-2.0"
] | null | null | null | nannyml/drift/model_outputs/__init__.py | SoyGema/NannyML | 323ff404e0e06c479b01d2a63c1c3af9680d95ab | [
"Apache-2.0"
] | null | null | null | nannyml/drift/model_outputs/__init__.py | SoyGema/NannyML | 323ff404e0e06c479b01d2a63c1c3af9680d95ab | [
"Apache-2.0"
] | null | null | null | # Author: Niels Nuyttens <niels@nannyml.com>
#
# License: Apache Software License 2.0
"""Drift detection implementations for model outputs."""
| 24.833333 | 56 | 0.724832 |
04020caf9d3b140074351f2dd914375a42893fd6 | 691 | py | Python | qutipy/channels/depolarizing_channel.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | 19 | 2020-11-11T13:00:22.000Z | 2022-03-14T11:18:04.000Z | qutipy/channels/depolarizing_channel.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | null | null | null | qutipy/channels/depolarizing_channel.py | sumeetkhatri/QuTIPy | ca2a3344c1caa818504425496ea37278d80b1c44 | [
"Apache-2.0"
] | 1 | 2022-03-03T15:20:15.000Z | 2022-03-03T15:20:15.000Z | '''
This code is part of QuTIpy.
(c) Copyright Sumeet Khatri, 2021
This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
Any modifications or derivative wor... | 26.576923 | 80 | 0.740955 |
4094a4de2a3de7216b0e8b4045ccde87294d4709 | 552 | py | Python | xmpp_bot/bots/temp.py | arkgil/xmpp_bot | e57ee6dd936112ba2aac735f53e23d3a1f3e83ed | [
"Apache-2.0"
] | null | null | null | xmpp_bot/bots/temp.py | arkgil/xmpp_bot | e57ee6dd936112ba2aac735f53e23d3a1f3e83ed | [
"Apache-2.0"
] | null | null | null | xmpp_bot/bots/temp.py | arkgil/xmpp_bot | e57ee6dd936112ba2aac735f53e23d3a1f3e83ed | [
"Apache-2.0"
] | null | null | null | from ..base import BaseBot
from sense_hat import SenseHat
class TempBot(BaseBot):
def __init__(self, jid, password, nick, room):
BaseBot.__init__(self, jid, password, nick, room)
self.sense = SenseHat()
def handle_message(self, msg):
if msg['body'].strip() == '/temp':
temp ... | 34.5 | 57 | 0.561594 |
be7e767818a34abd79cced0310e514d3737c958e | 1,381 | py | Python | xlsxwriter/test/comparison/test_chart_axis02.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_chart_axis02.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_chart_axis02.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 25.109091 | 79 | 0.556843 |
0eb780a08e84db9a8d4ab5c9ae5f373c0caf9d09 | 120,892 | py | Python | src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py | lastcoolnameleft/azure-cli | 5975b2312d8f990df66c1a75b3e41f7387afb437 | [
"MIT"
] | 7 | 2020-04-26T09:54:05.000Z | 2021-07-22T16:54:41.000Z | src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py | lastcoolnameleft/azure-cli | 5975b2312d8f990df66c1a75b3e41f7387afb437 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/keyvault/tests/latest/test_keyvault_commands.py | lastcoolnameleft/azure-cli | 5975b2312d8f990df66c1a75b3e41f7387afb437 | [
"MIT"
] | 13 | 2020-06-30T16:23:36.000Z | 2022-03-29T17:12:05.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 51.225424 | 196 | 0.583637 |
3e8e67ffdb5978a97cc0ee408fb1ae0faeb5442a | 1,957 | py | Python | aMLpy/fetchAllData.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 15 | 2019-07-31T07:18:49.000Z | 2021-06-03T23:41:59.000Z | aMLpy/fetchAllData.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | null | null | null | aMLpy/fetchAllData.py | dirac-institute/SPSAS2019 | 34781162bb088b17c1b9afb69eee2284dce6bdec | [
"MIT"
] | 6 | 2019-08-01T19:33:16.000Z | 2020-08-27T13:01:15.000Z | """
Fetch all data files needed for examples chosen for SaoPaulo2019 bylectures by ZI, see
Sao Paulo School of Advanced Science on Learning from Data, July 31 - Aug 2, 2019
https://sites.usp.br/datascience/spsas-learning-from-data/
License: BSD; Zeljko Ivezic <ivezic@uw.edu>
"""
# *** SaoPaulo2019 participants: ***
# ... | 35.581818 | 89 | 0.768523 |
e8fb5d0117b0e8d7a9e3ee1486b0da688008aa7c | 161 | py | Python | modules/math-codes/modules/algebra/exponentials-radicals-and-logarithms/src/test_pow.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | 1 | 2020-09-06T22:17:19.000Z | 2020-09-06T22:17:19.000Z | modules/math-codes/modules/algebra/exponentials-radicals-and-logarithms/src/test_pow.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | modules/math-codes/modules/algebra/exponentials-radicals-and-logarithms/src/test_pow.py | drigols/Studies | 9c293156935b491ded24be6b511daac67fd43538 | [
"MIT"
] | null | null | null | def test_pow(b, e):
return b ** e
if __name__ =='__main__':
x = test_pow(2, 2)
print(x)
x = test_pow(2, 3)
print(x)
x = test_pow(4, 7)
print(x)
| 12.384615 | 25 | 0.559006 |
4c092b85496de6ce16e29334ea7cdf7a6994c272 | 477,917 | py | Python | icon/Resources.py | Lovely-XPP/tkzgeom | bf68e139dc05f759542d6611f4dc07f4f2727b92 | [
"MIT"
] | 41 | 2021-11-24T05:54:08.000Z | 2022-03-26T10:19:30.000Z | icon/Resources.py | Lovely-XPP/tkzgeom | bf68e139dc05f759542d6611f4dc07f4f2727b92 | [
"MIT"
] | 1 | 2022-02-28T04:34:51.000Z | 2022-03-07T10:49:27.000Z | icon/Resources.py | Lovely-XPP/tkzgeom | bf68e139dc05f759542d6611f4dc07f4f2727b92 | [
"MIT"
] | 10 | 2021-11-24T07:35:17.000Z | 2022-03-25T18:42:14.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.15.1)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x3c\x37\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x42\x... | 64.767177 | 129 | 0.726948 |
a901c9c65535a44b4f3a121f09180dad3d2bbf62 | 797 | py | Python | heron/common/tests/python/pex_loader/constants.py | zhengyangtean/CG4001_Heron_ElasticBolt | e471593c265088996d485e2dd11c9f2484876568 | [
"Apache-2.0"
] | 1 | 2017-11-06T08:23:43.000Z | 2017-11-06T08:23:43.000Z | heron/common/tests/python/pex_loader/constants.py | zhengyangtean/CG4001_Heron_ElasticBolt | e471593c265088996d485e2dd11c9f2484876568 | [
"Apache-2.0"
] | null | null | null | heron/common/tests/python/pex_loader/constants.py | zhengyangtean/CG4001_Heron_ElasticBolt | e471593c265088996d485e2dd11c9f2484876568 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Twitter. 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 agree... | 44.277778 | 93 | 0.776662 |
0810f1198eb16eec5cb3a9d66abf2f0d0ebe208b | 2,164 | py | Python | ax/modelbridge/tests/test_dispatch_utils.py | liangshi7/Ax | f20d10f619aae504f2e4509b5a786842a6c72e89 | [
"MIT"
] | null | null | null | ax/modelbridge/tests/test_dispatch_utils.py | liangshi7/Ax | f20d10f619aae504f2e4509b5a786842a6c72e89 | [
"MIT"
] | null | null | null | ax/modelbridge/tests/test_dispatch_utils.py | liangshi7/Ax | f20d10f619aae504f2e4509b5a786842a6c72e89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from ax.modelbridge.dispatch_utils import choose_generation_strategy
from ax.utils.common.testutils import TestCase
from ax.utils.testing.core_stubs import (
get_branin_search_space,
get_experiment,
get_factorial... | 40.830189 | 87 | 0.71719 |
4bf7932e2b53389a3daeca150ca91332deb0a70e | 1,372 | py | Python | var/spack/repos/builtin/packages/r-chemometrics/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/r-chemometrics/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/r-chemometrics/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RChemometrics(RPackage):
"""R companion to the book "Introduction to Multivariate Statisti... | 42.875 | 81 | 0.683673 |
3f948653d8d15f9bacc83bfbde7b124cc42468af | 2,032 | py | Python | lib/xos-genx/xos-genx-tests/test_cli.py | iecedge/xos | 566617f676fedcb2602266191c755d191b37018a | [
"Apache-2.0"
] | null | null | null | lib/xos-genx/xos-genx-tests/test_cli.py | iecedge/xos | 566617f676fedcb2602266191c755d191b37018a | [
"Apache-2.0"
] | null | null | null | lib/xos-genx/xos-genx-tests/test_cli.py | iecedge/xos | 566617f676fedcb2602266191c755d191b37018a | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-present Open Networking 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 agr... | 31.75 | 82 | 0.660925 |
05b4607c612fd5acabbd83496dc85cab66938fae | 1,443 | py | Python | attack_features/views.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | 1 | 2021-11-30T19:38:55.000Z | 2021-11-30T19:38:55.000Z | attack_features/views.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | null | null | null | attack_features/views.py | luke-feng/MAP | bc82ec20e2859dd6437d314fc12880f5e6b6aad8 | [
"Apache-2.0"
] | 1 | 2022-02-25T22:48:21.000Z | 2022-02-25T22:48:21.000Z | from django.shortcuts import render
# Create your views here.
from rest_framework import generics, status
from rest_framework.permissions import AllowAny
from rest_framework.views import APIView
from .serializers import AttackfeaturesSerializer
from rest_framework.response import Response
from datetime import datetime... | 34.357143 | 148 | 0.751213 |
1160e458c9058a9eaf527837f33e88d9ec8da63f | 461 | py | Python | src/module.py | l0r3zz/vDeploy | c1f746fd8d6e5de6a0f8260f8e555c07b941c26d | [
"Apache-2.0"
] | null | null | null | src/module.py | l0r3zz/vDeploy | c1f746fd8d6e5de6a0f8260f8e555c07b941c26d | [
"Apache-2.0"
] | null | null | null | src/module.py | l0r3zz/vDeploy | c1f746fd8d6e5de6a0f8260f8e555c07b941c26d | [
"Apache-2.0"
] | 1 | 2021-01-19T16:42:20.000Z | 2021-01-19T16:42:20.000Z | #! /usr/bin/env python
"""module docstring"""
# imports
# constants
# exception classes
# interface functions
log = logging.getLogger('vDeploy.%s' % __name__)
# classes
# internal functions & classes
def main():
# import doctest
# doctest.testmod()
pass
if __name__ == '__main__':
status = main... | 20.043478 | 71 | 0.685466 |
952cf8ece85ecb8b20b263cbae27e44b851fa89a | 7,397 | py | Python | app.py | rileythejones/deploy-mlm-flask-heroku | 1d187aa42faad4f53c6d7e8d85ade8f139524716 | [
"MIT"
] | null | null | null | app.py | rileythejones/deploy-mlm-flask-heroku | 1d187aa42faad4f53c6d7e8d85ade8f139524716 | [
"MIT"
] | null | null | null | app.py | rileythejones/deploy-mlm-flask-heroku | 1d187aa42faad4f53c6d7e8d85ade8f139524716 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import io
import base64
from math import pi
from flask import Flask, jsonify, request
from sklearn.preprocessing import MinMaxScaler
from sklearn.neighbors import NearestNeighbors
from flask_cors import CORS
from sqlalchemy import create_engine
a... | 34.7277 | 377 | 0.639854 |
98bb3ddb637f01d2259e6399cb131ac95c35238a | 2,039 | py | Python | backend/recommends/douban_top250.py | Ladder-Climbers/mayne-code | d355cc56013db4ac2db50fddde3e9d203d965ab6 | [
"MIT"
] | null | null | null | backend/recommends/douban_top250.py | Ladder-Climbers/mayne-code | d355cc56013db4ac2db50fddde3e9d203d965ab6 | [
"MIT"
] | null | null | null | backend/recommends/douban_top250.py | Ladder-Climbers/mayne-code | d355cc56013db4ac2db50fddde3e9d203d965ab6 | [
"MIT"
] | null | null | null | from data.config import Constants
import requests
from bs4 import BeautifulSoup as Soup
class DoubanTop:
URL = "https://book.douban.com/top250?start=%s"
def __init__(self, cookies: str = ''):
self.cookies = cookies
self.cache = None
def get_page(self, page: int = 0) -> int:
if se... | 37.072727 | 106 | 0.530162 |
c5ff1156875d4764f7ce20a656a62d08dbebb7a8 | 61,872 | py | Python | sklearn/linear_model/tests/test_coordinate_descent.py | Tenavi/scikit-learn | 7f61186cbcbc43cd6ccd717abd097f638b786984 | [
"BSD-3-Clause"
] | 1 | 2021-08-28T15:24:23.000Z | 2021-08-28T15:24:23.000Z | sklearn/linear_model/tests/test_coordinate_descent.py | Tenavi/scikit-learn | 7f61186cbcbc43cd6ccd717abd097f638b786984 | [
"BSD-3-Clause"
] | null | null | null | sklearn/linear_model/tests/test_coordinate_descent.py | Tenavi/scikit-learn | 7f61186cbcbc43cd6ccd717abd097f638b786984 | [
"BSD-3-Clause"
] | null | null | null | # Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause
import numpy as np
import pytest
from scipy import interpolate, sparse
from copy import deepcopy
import joblib
from sklearn.base import is_classifier
from sklearn.base import clone
... | 34.857465 | 88 | 0.664727 |
9cb0ff68e7b54a88fdff79691f631aeef3dac15c | 2,805 | py | Python | tests/bhive/test_steemconnect.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 2 | 2020-03-21T23:50:22.000Z | 2020-03-25T19:10:48.000Z | tests/bhive/test_steemconnect.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | null | null | null | tests/bhive/test_steemconnect.py | TheCrazyGM/bhive | 1494e90a99123ecfc5efbd927258f9ba59443e2e | [
"MIT"
] | 1 | 2020-03-21T23:50:25.000Z | 2020-03-21T23:50:25.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import range
from builtins import super
import mock
import string
import unittest
from parameterized import parameterized
import random
import json
from ppri... | 35.961538 | 116 | 0.690196 |
326d7afa3c71a6e31bd2c0055d6bea888bc18e6b | 354 | py | Python | webapp/api/urls.py | NCBI-Hackathons/GeneExpressionAging | e9303ceec304628b87598fc761a1cd4f4be1f2c7 | [
"MIT"
] | 12 | 2017-08-14T02:41:03.000Z | 2022-02-01T21:17:22.000Z | webapp/api/urls.py | basharbme/GeneExpressionAging | e9303ceec304628b87598fc761a1cd4f4be1f2c7 | [
"MIT"
] | 5 | 2017-08-16T17:41:52.000Z | 2017-08-26T20:25:37.000Z | webapp/api/urls.py | NCBI-Hackathons/GeneExpressionAging | e9303ceec304628b87598fc761a1cd4f4be1f2c7 | [
"MIT"
] | 9 | 2017-08-14T15:52:16.000Z | 2020-03-12T10:18:55.000Z | from django.conf.urls import url
import api.views
urlpatterns = [
url(r'^series/detail', api.views.series_detail, name="api_series_detail"),
url(r'^series/find', api.views.series_find, name="api_series_find"),
url(r'^timeseries', api.views.time_series, name="api_time_series"),
url(r'^heatmap', api.vie... | 32.181818 | 78 | 0.720339 |
fb2c1249efb7da8761b68e6600a0655e528e1f11 | 3,890 | py | Python | scaffold/settings.py | JohannaMW/potato | ebc8d7e0fcc910919639fbaaf1a412c4a0fc21ce | [
"Apache-2.0"
] | null | null | null | scaffold/settings.py | JohannaMW/potato | ebc8d7e0fcc910919639fbaaf1a412c4a0fc21ce | [
"Apache-2.0"
] | null | null | null | scaffold/settings.py | JohannaMW/potato | ebc8d7e0fcc910919639fbaaf1a412c4a0fc21ce | [
"Apache-2.0"
] | null | null | null | """
Django settings for scaffold project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from djangae.settings_base import * #Set up some AppEngine specific stuff... | 29.694656 | 132 | 0.756041 |
9ab99d72da3bc4c6c65a9751d49b0e0ed7909148 | 13,683 | py | Python | reinforcement_learning/rl_network_compression_ray_custom/src/tensorflow_resnet/network_compression.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 5 | 2019-01-19T23:53:35.000Z | 2022-01-29T14:04:31.000Z | reinforcement_learning/rl_network_compression_ray_custom/src/tensorflow_resnet/network_compression.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 6 | 2020-01-28T23:08:49.000Z | 2022-02-10T00:27:19.000Z | reinforcement_learning/rl_network_compression_ray_custom/src/tensorflow_resnet/network_compression.py | jpmarques19/tensorflwo-test | 0ff8b06e0415075c7269820d080284a42595bb2e | [
"Apache-2.0"
] | 8 | 2020-12-14T15:49:24.000Z | 2022-03-23T18:38:36.000Z | import numpy as np
import logging
import shutil
import os
import heapq
import sys
from tensorflow_resnet.compressor import ModeKeys
from tensorflow_resnet.compressor.layers import LayerState
from tensorflow_resnet.compressor.layers.ops import get_tf_vars_dict
from tensorflow_resnet.compressor.tf_interface import Tenso... | 39.546243 | 124 | 0.606081 |
473d30731ea1b2526a909737edd639f5e60dac23 | 2,908 | py | Python | sqlalchemy_utils/types/uuid.py | simonschmidt/sqlalchemy-utils | f491aa99514560216bd79985d36651642a951737 | [
"BSD-3-Clause"
] | 879 | 2015-01-01T12:06:35.000Z | 2022-03-27T16:13:05.000Z | sqlalchemy_utils/types/uuid.py | simonschmidt/sqlalchemy-utils | f491aa99514560216bd79985d36651642a951737 | [
"BSD-3-Clause"
] | 418 | 2015-01-02T08:43:43.000Z | 2022-03-25T15:49:21.000Z | sqlalchemy_utils/types/uuid.py | simonschmidt/sqlalchemy-utils | f491aa99514560216bd79985d36651642a951737 | [
"BSD-3-Clause"
] | 295 | 2015-01-06T14:19:33.000Z | 2022-03-26T16:20:50.000Z | from __future__ import absolute_import
import uuid
from sqlalchemy import types, util
from sqlalchemy.dialects import mssql, postgresql
from .scalar_coercible import ScalarCoercible
class UUIDType(ScalarCoercible, types.TypeDecorator):
"""
Stores a UUID in the database natively when it can and falls back t... | 28.792079 | 88 | 0.602476 |
e4b43242f2f7d3c5b662e5b80dc7f9054d0d0cb7 | 458 | py | Python | ex100.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | ex100.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | ex100.py | qnomon/Python-Studies | dbd592cf2a161bb9ddbec66f020c602bddc6d44b | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
lista = list()
def sorteia():
print('Sorteando os 5 Valores da lista: ', end='')
for c in range(0,5):
a = randint(1,10)
lista.append(a)
print(a, end=' ')
sleep(0.3)
print('Pronto')
def somapar():
soma = 0
for c in li... | 17.615385 | 63 | 0.548035 |
3033a0978e2c4474bdd8a8d7282e59240db44a28 | 5,217 | py | Python | vmraid/workflow/doctype/workflow/test_workflow.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/workflow/doctype/workflow/test_workflow.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/workflow/doctype/workflow/test_workflow.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, VMRaid Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import vmraid
import unittest
from vmraid.utils import random_string
from vmraid.model.workflow import apply_workflow, WorkflowTransitionError, WorkflowPermissionError, get_common_transition_a... | 31.239521 | 129 | 0.744489 |
b96a3d0d87eed67b0c69adb3627e7723f80bbd24 | 963 | py | Python | giwerm/model_selection/train_test_split.py | nocotan/IGIWERM | 1179a949625190c892ecc2e231b76dfab54e1529 | [
"MIT"
] | null | null | null | giwerm/model_selection/train_test_split.py | nocotan/IGIWERM | 1179a949625190c892ecc2e231b76dfab54e1529 | [
"MIT"
] | null | null | null | giwerm/model_selection/train_test_split.py | nocotan/IGIWERM | 1179a949625190c892ecc2e231b76dfab54e1529 | [
"MIT"
] | 1 | 2022-01-27T05:26:51.000Z | 2022-01-27T05:26:51.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Model Selection Module
Split arrays or matrices into random train and test subsets as follow:
Cortes, Corinna, Mehryar Mohri, Michael Riley, and Afshin Rostamizadeh. 2008.
“Sample Selection Bias Correction Theory.” In Algorithmic Learning Theory,
38–53. Springer Berlin Heide... | 29.181818 | 77 | 0.607477 |
4736aea61bcc2d04da8f3dae21d57c47cb7fd079 | 1,237 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/cycle_in_directed_graph_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/cycle_in_directed_graph_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-ds-master/data_structures/graphs/cycle_in_directed_graph_iterative.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | from collections import defaultdict
class Graph:
def __init__(self, vertices):
self.graph = defaultdict(list)
self.vertices = vertices
def add_edge(self, u, v):
self.graph[u].append(v)
def dfs(self):
visited = [False] * self.vertices
recursion_stack = [False] ... | 23.339623 | 56 | 0.459984 |
24699562595b9aecf736eebecf0b00983b2e187b | 3,610 | py | Python | src/network_test.py | ss16118/fund-assistant | a121cab6aa668de12af908c12eaecdc7498cf99a | [
"MIT"
] | null | null | null | src/network_test.py | ss16118/fund-assistant | a121cab6aa668de12af908c12eaecdc7498cf99a | [
"MIT"
] | null | null | null | src/network_test.py | ss16118/fund-assistant | a121cab6aa668de12af908c12eaecdc7498cf99a | [
"MIT"
] | null | null | null | import os
import requests
from constants import *
from utils import clear_console
TEST_URL_1 = "https://finance.sina.com.cn/stock/observe/2021-01-26/doc-ikftssap1033658.shtml"
TEST_URL_2 = "http://www.sohu.com/a/447342555_267106"
TEST_URL_3 = "https://stock.stcn.com/djjd/202101/t20210129_2786925.html"
def network_... | 43.493976 | 109 | 0.637119 |
66be24f24ac443ff62e9f5bd40e674d1d090c13c | 1,246 | py | Python | src/wtforms/fields/html5.py | rabinadk1/wtforms | 09e56d69830f806bfc36ad331110bf6b4559e8e2 | [
"BSD-3-Clause"
] | null | null | null | src/wtforms/fields/html5.py | rabinadk1/wtforms | 09e56d69830f806bfc36ad331110bf6b4559e8e2 | [
"BSD-3-Clause"
] | null | null | null | src/wtforms/fields/html5.py | rabinadk1/wtforms | 09e56d69830f806bfc36ad331110bf6b4559e8e2 | [
"BSD-3-Clause"
] | null | null | null | """
Fields to support various HTML5 input types.
"""
from ..widgets import html5 as widgets
from . import core
__all__ = (
"DateTimeLocalField",
"DecimalRangeField",
"EmailField",
"IntegerRangeField",
"SearchField",
"TelField",
"URLField",
)
class SearchField(core.StringField):
"""
... | 17.305556 | 52 | 0.61878 |
43a74836c26c4529e75238c0790e0a52c2eae975 | 99 | py | Python | cw1/zad5.py | BartoszHolubowicz/projekt-psi | e1d753e543ed2676a21ba1d99191e36dbe484ae5 | [
"bzip2-1.0.6"
] | null | null | null | cw1/zad5.py | BartoszHolubowicz/projekt-psi | e1d753e543ed2676a21ba1d99191e36dbe484ae5 | [
"bzip2-1.0.6"
] | null | null | null | cw1/zad5.py | BartoszHolubowicz/projekt-psi | e1d753e543ed2676a21ba1d99191e36dbe484ae5 | [
"bzip2-1.0.6"
] | null | null | null | imie = "Wojciech Gwardjak"[::-1].split()
print(imie[1].capitalize() + ' ' + imie[0].capitalize())
| 33 | 57 | 0.616162 |
029f3f933299164b176e7346c915144d86561008 | 2,553 | py | Python | BeMAp_package/mapping/property_color.py | yusuketsuda/BeMAp | b64608730e5a819f83170e34c72a7b3d609ff12c | [
"MIT"
] | null | null | null | BeMAp_package/mapping/property_color.py | yusuketsuda/BeMAp | b64608730e5a819f83170e34c72a7b3d609ff12c | [
"MIT"
] | null | null | null | BeMAp_package/mapping/property_color.py | yusuketsuda/BeMAp | b64608730e5a819f83170e34c72a7b3d609ff12c | [
"MIT"
] | null | null | null | import pandas as pd
prop_color = {0: 'ffe6e6',
1: 'e6ffff',
2: 'ddeeff',
3: 'ddffdd',
4: 'fff2ff',
5: 'f9ffe6',
6: 'e7e6ff',
7: 'efffe6',
8: 'fff3e6',
9: 'b3c7b6',
10: 'bba9bc',
... | 34.5 | 98 | 0.573051 |
fd1eb2e9b4c35e05c64639cff58d443b10eedf1e | 532 | py | Python | src/gitutils/tests/test_modified.py | scivision/pygitutils | a47d8807ac43d3a58b40cb6fd734a0136b7f17a3 | [
"MIT"
] | 4 | 2019-08-20T13:52:08.000Z | 2021-06-11T07:12:21.000Z | src/gitutils/tests/test_modified.py | scivision/gitutils | a47d8807ac43d3a58b40cb6fd734a0136b7f17a3 | [
"MIT"
] | null | null | null | src/gitutils/tests/test_modified.py | scivision/gitutils | a47d8807ac43d3a58b40cb6fd734a0136b7f17a3 | [
"MIT"
] | 1 | 2020-01-07T08:32:27.000Z | 2020-01-07T08:32:27.000Z | import subprocess
import asyncio
from gitutils.status import git_status
def test_script_modified(git_init):
p = git_init
ret = subprocess.check_output(["gitstat", str(p)], text=True)
assert not ret
(p / "foo.txt").touch()
ret = subprocess.check_output(["gitstat", str(p)], text=True)
assert r... | 21.28 | 65 | 0.659774 |
a7ff6a7e3aa95f5ee32a413e7c78930448391f9e | 30,238 | py | Python | src/transformers/models/encoder_decoder/modeling_encoder_decoder.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 5 | 2020-09-01T09:15:48.000Z | 2020-09-15T03:25:05.000Z | src/transformers/models/encoder_decoder/modeling_encoder_decoder.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 2 | 2022-03-08T04:58:59.000Z | 2022-03-19T03:45:14.000Z | src/transformers/models/encoder_decoder/modeling_encoder_decoder.py | bugface/transformers | ba286fe7d51db12ad663effac83bed8199dd7141 | [
"Apache-2.0"
] | 3 | 2020-08-20T04:46:25.000Z | 2020-10-14T08:39:13.000Z | # coding=utf-8
# Copyright 2018 The 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.0
#
# Unless required by applicable... | 51.777397 | 198 | 0.674648 |
1b4146610e7b33cb2a0b6ceba7ef359e320d9ace | 5,317 | py | Python | pygments_promql/__init__.py | tormath1/pygments-promql | e775c804fd8db908ee214a7d9d35987bb90f9609 | [
"BSD-2-Clause"
] | 4 | 2020-12-20T14:24:48.000Z | 2022-02-08T02:45:01.000Z | pygments_promql/__init__.py | tormath1/pygments-promql | e775c804fd8db908ee214a7d9d35987bb90f9609 | [
"BSD-2-Clause"
] | 5 | 2020-08-04T17:43:33.000Z | 2022-01-17T12:17:56.000Z | pygments_promql/__init__.py | tormath1/pygments-promql | e775c804fd8db908ee214a7d9d35987bb90f9609 | [
"BSD-2-Clause"
] | 1 | 2022-02-15T08:37:00.000Z | 2022-02-15T08:37:00.000Z | # -*- coding: utf-8 -*-
"""
pygments.lexers.promql
~~~~~~~~~~~~~~~~~~~~~~
Lexer for Prometheus Query Language.
:copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, default, words
from pygmen... | 26.452736 | 90 | 0.359977 |
86e556483c5f9378e5606727ca3d5a856c8260d6 | 405 | py | Python | save_restore_model/tf/restore_model_1.py | zlpmichelle/crackingtensorflow | 66c3517b60c3793ef06f904e5d58e4d044628182 | [
"Apache-2.0"
] | 3 | 2017-10-19T23:41:26.000Z | 2019-10-22T08:59:35.000Z | save_restore_model/tf/restore_model_1.py | zlpmichelle/crackingtensorflow | 66c3517b60c3793ef06f904e5d58e4d044628182 | [
"Apache-2.0"
] | null | null | null | save_restore_model/tf/restore_model_1.py | zlpmichelle/crackingtensorflow | 66c3517b60c3793ef06f904e5d58e4d044628182 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
sess = tf.Session()
new_saver = tf.train.import_meta_graph('/Users/lipingzhang/Downloads/model/my_test_model.meta')
new_saver.restore(sess, tf.train.latest_checkpoint('/Users/lipingzhang/Downloads/model/'))
print(sess.run('w1:0'))
print(sess.run('w2:0'))
all_vars = tf.get_collection('vars')
for... | 33.75 | 95 | 0.718519 |
fad6b007d497abffaf82595133db1b0615fed915 | 840 | py | Python | tests/test_api_v1_services_dhcpd_start.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 311 | 2020-04-13T16:38:56.000Z | 2022-03-28T12:56:12.000Z | tests/test_api_v1_services_dhcpd_start.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 171 | 2020-04-23T21:41:06.000Z | 2022-03-31T19:55:12.000Z | tests/test_api_v1_services_dhcpd_start.py | jaredhendrickson13/pfsense-api | 72d85801673eaba66bdc4a698fbed561c61130d6 | [
"Apache-2.0"
] | 48 | 2020-07-19T22:43:42.000Z | 2022-03-25T16:20:17.000Z | # Copyright 2022 Jared Hendrickson
#
# 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 wri... | 35 | 74 | 0.754762 |
f406494f2bc018fe8794eaf35474f2dbe51e49e8 | 8,500 | py | Python | test/unit/test_http.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | 1 | 2018-11-12T02:59:41.000Z | 2018-11-12T02:59:41.000Z | test/unit/test_http.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | null | null | null | test/unit/test_http.py | qupengcheng/py-udfs-api | 182de801c0ca52e5960019cd0cbfef10d5a386f0 | [
"MIT"
] | null | null | null | """Test cases for http.py.
These tests are designed to mock http responses from the udfs daemon. They
are used to determine if the functions in http.py are operating correctly.
Classes:
TestHttp -- A TCP client for interacting with an udfs daemon
"""
import unittest
import json
import tarfile
import os
from httmock... | 35.864979 | 80 | 0.654235 |
142f9e6a42345b2db3d20ab2dd398d0eabb20b97 | 4,192 | py | Python | pgmpy/estimators/ScoreCache.py | echoyi/pgmpy | c37dda4401f23ec73fc5d17d957867cd62e588d3 | [
"MIT"
] | 2,144 | 2015-01-05T21:25:04.000Z | 2022-03-31T08:24:15.000Z | pgmpy/estimators/ScoreCache.py | echoyi/pgmpy | c37dda4401f23ec73fc5d17d957867cd62e588d3 | [
"MIT"
] | 1,181 | 2015-01-04T18:19:44.000Z | 2022-03-30T17:21:19.000Z | pgmpy/estimators/ScoreCache.py | echoyi/pgmpy | c37dda4401f23ec73fc5d17d957867cd62e588d3 | [
"MIT"
] | 777 | 2015-01-01T11:13:27.000Z | 2022-03-28T12:31:57.000Z | #!/usr/bin/env python
from pgmpy.estimators import StructureScore
class ScoreCache(StructureScore):
def __init__(self, base_scorer, data, max_size=10000, **kwargs):
"""
A wrapper class for StructureScore instances, which implement a decomposable score,
that caches local scores.
Bas... | 38.109091 | 115 | 0.618559 |
2b6b3bd4b8eb97a8423831235cb26cf7adb83caa | 26 | py | Python | capirs/__init__.py | ajbradberry96/SeniorDesignAntiNN | c88cbdf699e68102cb705d8a7000616922cb73ee | [
"MIT"
] | null | null | null | capirs/__init__.py | ajbradberry96/SeniorDesignAntiNN | c88cbdf699e68102cb705d8a7000616922cb73ee | [
"MIT"
] | 12 | 2019-12-16T21:30:53.000Z | 2022-03-11T23:40:28.000Z | capirs/__init__.py | ajbradberry96/SeniorDesignAntiNN | c88cbdf699e68102cb705d8a7000616922cb73ee | [
"MIT"
] | null | null | null | from .detect_adv import *
| 13 | 25 | 0.769231 |
b4aa4385b91d405baed8a265c4c9eb54473bce6d | 1,334 | py | Python | allennlp/modules/__init__.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | 1 | 2020-02-24T10:21:37.000Z | 2020-02-24T10:21:37.000Z | allennlp/modules/__init__.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | null | null | null | allennlp/modules/__init__.py | craigbig/allennlp | 3f15a8bdcae366f3ef732eec1e9df26d91521582 | [
"Apache-2.0"
] | null | null | null | """
Custom PyTorch
`Module <https://pytorch.org/docs/master/nn.html#torch.nn.Module>`_ s
that are used as components in AllenNLP `Model` s.
"""
from allennlp.modules.attention import Attention
from allennlp.modules.bimpm_matching import BiMpmMatching
from allennlp.modules.conditional_random_field import ConditionalRan... | 49.407407 | 81 | 0.877811 |
e797b77d6f7a3e09e9ba867336d7bcac69d165e4 | 2,390 | py | Python | fm/models/archivedevent.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | fm/models/archivedevent.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | fm/models/archivedevent.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# ArchivedEvent model
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ------------------------------------------------------------... | 28.452381 | 84 | 0.606695 |
a358c96daac428edc1bce21d91b427ade5108dc7 | 628 | py | Python | qiskit/extensions/standard/rxx.py | coder-mtv/qiskit-terra | ce05ba5efa865315b1fd89777c80abcd413e4b61 | [
"Apache-2.0"
] | 1 | 2020-10-25T17:56:57.000Z | 2020-10-25T17:56:57.000Z | qiskit/extensions/standard/rxx.py | darshRitu/qiskit-terra | ce05ba5efa865315b1fd89777c80abcd413e4b61 | [
"Apache-2.0"
] | null | null | null | qiskit/extensions/standard/rxx.py | darshRitu/qiskit-terra | ce05ba5efa865315b1fd89777c80abcd413e4b61 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 34.888889 | 77 | 0.759554 |
72fc2947ce8ce74a8c125b0440234b652fbe627a | 15,808 | py | Python | alembic/ddl/impl.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 1 | 2021-05-13T19:07:45.000Z | 2021-05-13T19:07:45.000Z | alembic/ddl/impl.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 10 | 2020-03-24T10:47:53.000Z | 2021-04-08T19:51:44.000Z | alembic/ddl/impl.py | shawnzhu/alembic | c7ce93732f334ece460e479cb104856cdd98432b | [
"MIT"
] | 4 | 2020-02-15T22:10:00.000Z | 2020-02-16T15:54:15.000Z | from collections import namedtuple
import re
from sqlalchemy import schema
from sqlalchemy import text
from . import base
from .. import util
from ..util import sqla_compat
from ..util.compat import string_types
from ..util.compat import text_type
from ..util.compat import with_metaclass
class ImplMeta(type):
d... | 33.562633 | 79 | 0.584641 |
c286c77b2101a52f4b3caa05b14e7f55d95fa7d0 | 656 | py | Python | src/Update/update_pyhouse.py | DBrianKimmel/PyHouse_Install | 9c7ff397299e0f2e63782d4a955d2f8bf840ef6f | [
"MIT"
] | 1 | 2015-10-13T15:01:48.000Z | 2015-10-13T15:01:48.000Z | src/Update/update_pyhouse.py | DBrianKimmel/PyHouse_Install | 9c7ff397299e0f2e63782d4a955d2f8bf840ef6f | [
"MIT"
] | null | null | null | src/Update/update_pyhouse.py | DBrianKimmel/PyHouse_Install | 9c7ff397299e0f2e63782d4a955d2f8bf840ef6f | [
"MIT"
] | null | null | null | """
@name: PyHouse_Install/src/Update/update_pyhouse.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2015-2016 by D. Brian Kimmel
@license: MIT License
@note: Created on Oct 20, 2015
@Summary:
"""
__updated__ = '2016-08-26'
# Import system type stuff
# Import PyHouse... | 17.72973 | 56 | 0.635671 |
a93cd0d469240553f6521793c20fe6ebfa7fe6d1 | 9,383 | py | Python | tests/nelder_test.py | bmartins95/NelderMead | b296e4e70230b7f7efd4c9b80139b997809ba977 | [
"MIT"
] | null | null | null | tests/nelder_test.py | bmartins95/NelderMead | b296e4e70230b7f7efd4c9b80139b997809ba977 | [
"MIT"
] | null | null | null | tests/nelder_test.py | bmartins95/NelderMead | b296e4e70230b7f7efd4c9b80139b997809ba977 | [
"MIT"
] | null | null | null | import numpy as np
import unittest
import sys
sys.path.append('../')
from nelder_mead.nelder_mead import NelderMead
class TestNelderMead(NelderMead):
def buildSimplexPoints(self):
self.simplex = np.vstack([np.eye(len(self.f_variables), dtype = float), self.f_variables])
for index, value in enumera... | 45.548544 | 98 | 0.567303 |
296145020cf00edc111726fc99c4c298031ea9b8 | 652 | py | Python | setup.py | justdvnsh/py-error | 2698dd6841a7ed2e11ce50207e102f7d92951a7c | [
"MIT"
] | null | null | null | setup.py | justdvnsh/py-error | 2698dd6841a7ed2e11ce50207e102f7d92951a7c | [
"MIT"
] | null | null | null | setup.py | justdvnsh/py-error | 2698dd6841a7ed2e11ce50207e102f7d92951a7c | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="py-error",
version="0.0.1",
author="Divyansh Dwivedi",
author_email="justdvnsh2208@gmail.com",
description="An easily-extendable error class for use with python classes",
long_descript... | 31.047619 | 79 | 0.67638 |
54047e8920cf0e6f207871ce2ea37ed9285d74fd | 5,437 | py | Python | equation/nnfromscratch_eq_sqrt.py | laputian/dml | d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff | [
"MIT"
] | null | null | null | equation/nnfromscratch_eq_sqrt.py | laputian/dml | d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff | [
"MIT"
] | null | null | null | equation/nnfromscratch_eq_sqrt.py | laputian/dml | d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff | [
"MIT"
] | 3 | 2016-10-25T23:09:40.000Z | 2020-10-17T23:08:14.000Z | import cPickle as pickle
import matplotlib.pyplot as plt
import numpy as np
fact = 10
nr_examples= 50
modelfilename = '../data/nnfromscratch_eq_sqrt_' + str(nr_examples) + '.pkl'
def activation(x):
return np.tanh(x) #1/ (1 + np.exp(-x)) -0.5 #np.tanh(x) # np.log(1 + np.exp(x))
def the_function(x):
return n... | 34.852564 | 109 | 0.635829 |
7fa2cf4e48469f8c33d0daab7f99fc04d467ff2d | 7,216 | py | Python | var/spack/repos/builtin/packages/umpire/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2019-03-29T10:13:11.000Z | 2019-03-29T10:13:11.000Z | var/spack/repos/builtin/packages/umpire/package.py | HigherOrderMethods/spack | 87ed3fcc59fc25ce250042338d082925e3a3610b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 15 | 2021-04-14T12:34:46.000Z | 2022-03-02T19:08:00.000Z | var/spack/repos/builtin/packages/umpire/package.py | AdhocMan/spack | c8f58c5f1d660bfdb5f4f50d1d2a9f294435ee4d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import llnl.util.tty as tty
class Umpire(CMakePackage, CudaPackage, ROCmPackage):
"""An application-focus... | 40.539326 | 80 | 0.590216 |
4686655f95c02af673760170c60c872d37677ee0 | 2,921 | py | Python | nailgun/nailgun/network/nova_network.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/network/nova_network.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/network/nova_network.py | dnikishov/fuel-web | 152c2072cf585fc61d7e157ccf9a7ea1d0377daa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | 33.193182 | 78 | 0.694625 |
6bfde6ec1a880d86d2b4cf52e2dc51f2837830c9 | 14,317 | py | Python | tests/crypro/test_digest.py | TransactPRO/gw3-python-client | 77a9395c13f75467385227461b57ce85f4730ce5 | [
"MIT"
] | 1 | 2018-03-13T00:10:05.000Z | 2018-03-13T00:10:05.000Z | tests/crypro/test_digest.py | TransactPRO/gw3-python-client | 77a9395c13f75467385227461b57ce85f4730ce5 | [
"MIT"
] | 1 | 2020-08-05T08:25:14.000Z | 2020-08-05T08:25:14.000Z | tests/crypro/test_digest.py | TransactPRO/gw3-python-client | 77a9395c13f75467385227461b57ce85f4730ce5 | [
"MIT"
] | null | null | null | # The MIT License
#
# Copyright (c) 2017 Transact Pro.
#
# 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, m... | 63.631111 | 170 | 0.644479 |
d1fcd6e4c25ae24c958b699bab843f39b1ac0626 | 1,630 | py | Python | tests/test_max_pair_distance.py | mas828/htsohm | 2c491073fd81baf52e4051aa809db49658311172 | [
"MIT"
] | 2 | 2020-08-27T16:46:41.000Z | 2022-02-23T14:32:58.000Z | tests/test_max_pair_distance.py | mas828/htsohm | 2c491073fd81baf52e4051aa809db49658311172 | [
"MIT"
] | 22 | 2016-06-13T20:37:56.000Z | 2019-01-16T22:15:32.000Z | tests/test_max_pair_distance.py | mas828/htsohm | 2c491073fd81baf52e4051aa809db49658311172 | [
"MIT"
] | 1 | 2020-09-05T15:26:17.000Z | 2020-09-05T15:26:17.000Z |
import numpy as np
import pytest
from pytest import approx
from htsohm.max_pair_distance import minimum_distance_v, minimum_distance_point, max_pair_distance
def test_minimum_distance_v__within_pbcs():
assert minimum_distance_v(0.6, 0.4) == approx(-0.2)
assert minimum_distance_v(0.4, 0.6) == approx(0.2)
de... | 37.045455 | 98 | 0.669325 |
8e7cf21669ac1b204e94d7fa19790670210f6410 | 2,207 | py | Python | sdk2-src/src/azure-ml/azure/ml/_schema/union_field.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | 1 | 2021-09-27T07:54:40.000Z | 2021-09-27T07:54:40.000Z | sdk2-src/src/azure-ml/azure/ml/_schema/union_field.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | null | null | null | sdk2-src/src/azure-ml/azure/ml/_schema/union_field.py | DamovisaOrg/azureml-v2-preview | 9c5ed1003c19f4d5b19dbea4a7c507e101149139 | [
"MIT"
] | null | null | null | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from typing import List
import copy
from marshmallow import fields, ValidationError
from marshmallow.utils import resolve_field_instance, F... | 40.87037 | 110 | 0.622111 |
5f2bd22c328ca5a865e7ef37f7da8614cc6c8e1a | 67,326 | py | Python | research/object_detection/utils/ops_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/ops_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | research/object_detection/utils/ops_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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... | 38.209989 | 80 | 0.63806 |
62e07077ca7f18f48607996c05476c85b932b05f | 6,070 | py | Python | train_find_character.py | Ikhwansong/ComputerSoftware_OCR | e1664c7fd6081e00e39d9b5fbc48e902bbb5fdfc | [
"MIT"
] | null | null | null | train_find_character.py | Ikhwansong/ComputerSoftware_OCR | e1664c7fd6081e00e39d9b5fbc48e902bbb5fdfc | [
"MIT"
] | null | null | null | train_find_character.py | Ikhwansong/ComputerSoftware_OCR | e1664c7fd6081e00e39d9b5fbc48e902bbb5fdfc | [
"MIT"
] | null | null | null | import argparse
import tensorflow as tf
import os
import sys
import time
import yaml
from tensorflow.keras.optimizers.schedules import PiecewiseConstantDecay
from voc_data import create_batch_generator, create_batch_generator_with_customset
from anchor import generate_default_boxes
from network import create_ssd
from ... | 40.738255 | 114 | 0.6514 |
ba358d91e75d6acea311f84f1c01a3fcfea14c2e | 15,340 | py | Python | examples/melgan.stft/train_melgan_stft.py | MokkeMeguru/TensorflowTTS | 07ad3d179ad39515af59ae3788c338731b87534b | [
"Apache-2.0"
] | 2 | 2020-06-01T07:39:25.000Z | 2021-11-08T09:31:33.000Z | examples/melgan.stft/train_melgan_stft.py | matpg/TensorflowTTS | 4add642af3920a7dd4bc07ec957664d3d1328847 | [
"Apache-2.0"
] | null | null | null | examples/melgan.stft/train_melgan_stft.py | matpg/TensorflowTTS | 4add642af3920a7dd4bc07ec957664d3d1328847 | [
"Apache-2.0"
] | 1 | 2020-10-05T06:06:20.000Z | 2020-10-05T06:06:20.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Minh Nguyen (@dathudeptrai)
#
# 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 ... | 39.844156 | 117 | 0.62425 |
b66e51b6e751a4f23525f3f0b2084fb4640d5664 | 14,029 | py | Python | official/vision/beta/configs/image_classification.py | PradhiptaBagaskara/models | 9da3a08109237162752bea0fd951af849eb13cdc | [
"Apache-2.0"
] | 1 | 2021-08-23T23:52:40.000Z | 2021-08-23T23:52:40.000Z | official/vision/beta/configs/image_classification.py | oyauysalkog/models | 9da3a08109237162752bea0fd951af849eb13cdc | [
"Apache-2.0"
] | null | null | null | official/vision/beta/configs/image_classification.py | oyauysalkog/models | 9da3a08109237162752bea0fd951af849eb13cdc | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# 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 ... | 37.61126 | 80 | 0.577803 |
aac9009b599d6342e12446fb911906b5643ab70f | 2,733 | py | Python | electrum/gui/qt/fee_slider.py | commerceblock/cb-electrum-wallet | a8bb2999ec99fced56311be99a3a4ffabbc14c23 | [
"MIT"
] | 2 | 2020-05-04T05:42:05.000Z | 2020-08-01T11:22:30.000Z | electrum/gui/qt/fee_slider.py | commerceblock/cb-client-wallet | a8bb2999ec99fced56311be99a3a4ffabbc14c23 | [
"MIT"
] | 79 | 2019-04-03T06:56:46.000Z | 2019-10-11T17:56:43.000Z | electrum/gui/qt/fee_slider.py | commerceblock/guardnode-wallet | dc590742697f335637348513a13347bd0974bc1d | [
"MIT"
] | 2 | 2020-05-04T05:48:51.000Z | 2021-03-25T14:46:25.000Z | from electrum.i18n import _
from PyQt5.QtGui import QCursor
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QSlider, QToolTip
import threading
class FeeSlider(QSlider):
def __init__(self, window, config, callback):
QSlider.__init__(self, Qt.Horizontal)
self.config = config
self.wi... | 34.594937 | 123 | 0.56824 |
936e5a5ea6f2dc0f404d17a3db7cc9bd592a8b25 | 440 | py | Python | April/Week4/UncrossedLines.py | nimishbongale/leetcode-30days-solutions-scratchpad | 56aa989907e5c9bb2657292434ef2174b525aeb2 | [
"MIT"
] | null | null | null | April/Week4/UncrossedLines.py | nimishbongale/leetcode-30days-solutions-scratchpad | 56aa989907e5c9bb2657292434ef2174b525aeb2 | [
"MIT"
] | null | null | null | April/Week4/UncrossedLines.py | nimishbongale/leetcode-30days-solutions-scratchpad | 56aa989907e5c9bb2657292434ef2174b525aeb2 | [
"MIT"
] | null | null | null | class Solution:
def maxUncrossedLines(self, A: List[int], B: List[int]) -> int:
dp = [[0] * (len(B) + 1) for i in range(len(A) + 1)]
for i in range(1, len(A) + 1):
for j in range(1, len(B) + 1):
if(A[i - 1] == B[j - 1]):
dp[i][j] = 1 + dp[i - 1][j - 1]... | 40 | 67 | 0.386364 |
0b394903bd7ab644640e9479bd5b67a282ae5b2d | 5,522 | py | Python | libtbx/auto_build/create_cctbx_bundle_for_installer.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | libtbx/auto_build/create_cctbx_bundle_for_installer.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | libtbx/auto_build/create_cctbx_bundle_for_installer.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/python
"""
Package the CCTBX bundle used for various installers (Phenix, etc.) using
sources in the specified repositories directory.
"""
from __future__ import absolute_import, division, print_function
import optparse
import os
import os.path as op
import sys
import time
from . import package_defs
from ... | 37.310811 | 80 | 0.686889 |
a4ac8aacb9ca7c81d24f0ad8305ac19ecfbbb07d | 28,083 | py | Python | simulation_management/simulation.py | storage4grid/DSF-Hybrid-Simulator | 7c40a20f2865bd6edffd08982f35f6ff25d37ce5 | [
"Apache-2.0"
] | null | null | null | simulation_management/simulation.py | storage4grid/DSF-Hybrid-Simulator | 7c40a20f2865bd6edffd08982f35f6ff25d37ce5 | [
"Apache-2.0"
] | null | null | null | simulation_management/simulation.py | storage4grid/DSF-Hybrid-Simulator | 7c40a20f2865bd6edffd08982f35f6ff25d37ce5 | [
"Apache-2.0"
] | null | null | null |
'''
Copyright [2018] [ISMB]
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, sof... | 34.62762 | 212 | 0.597265 |
520b79d93bc1101c95d164efbf1f6cdfb46244c6 | 5,133 | py | Python | ververica_api_sdk/models/license_spec.py | justlikemikezz/ververica-api-sdk | 0eee284b4433f74b35fd2f41d149e619624aaed3 | [
"RSA-MD"
] | null | null | null | ververica_api_sdk/models/license_spec.py | justlikemikezz/ververica-api-sdk | 0eee284b4433f74b35fd2f41d149e619624aaed3 | [
"RSA-MD"
] | null | null | null | ververica_api_sdk/models/license_spec.py | justlikemikezz/ververica-api-sdk | 0eee284b4433f74b35fd2f41d149e619624aaed3 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
Application Manager API
Application Manager APIs to control Apache Flink jobs # noqa: E501
OpenAPI spec version: 2.0.1
Contact: platform@ververica.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
cl... | 26.458763 | 99 | 0.567115 |
b6c63999a2e0f40dd7f6f3ac893815580e350c73 | 8,616 | py | Python | qiskit/aqua/components/neural_networks/pytorch_discriminator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 504 | 2018-12-15T16:34:03.000Z | 2022-03-26T11:24:53.000Z | qiskit/aqua/components/neural_networks/pytorch_discriminator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 746 | 2018-12-16T16:44:42.000Z | 2021-07-10T16:59:43.000Z | qiskit/aqua/components/neural_networks/pytorch_discriminator.py | stefan-woerner/aqua | 12e1b867e254977d9c5992612a7919d8fe016cb4 | [
"Apache-2.0"
] | 421 | 2018-12-22T14:49:00.000Z | 2022-03-04T09:47:07.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 33.788235 | 95 | 0.617572 |
d3f74607bf8b8fade0d6c1ab824448a75603bd23 | 141,952 | py | Python | google/cloud/aiplatform_v1/services/metadata_service/client.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 180 | 2020-09-23T17:21:15.000Z | 2022-03-30T17:25:47.000Z | google/cloud/aiplatform_v1/services/metadata_service/client.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 601 | 2020-09-23T16:23:44.000Z | 2022-03-31T19:08:23.000Z | google/cloud/aiplatform_v1/services/metadata_service/client.py | conankun/python-aiplatform | d6c1bce7e00186aa5ee3cd0e7b8712b21bd06f2a | [
"Apache-2.0"
] | 109 | 2020-09-23T16:22:04.000Z | 2022-03-28T21:18:29.000Z | # -*- 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... | 44.850553 | 182 | 0.624563 |
f98e9775d0fbb8b6802f86e1b1742cbeedd8a7cf | 8,767 | py | Python | gym_pendrogone/envs/pendrogone.py | Raiszo/gym-pendrogone | 29e8fe5c28235acb174b7755047f2051a77b2c46 | [
"MIT"
] | 2 | 2019-03-25T23:09:42.000Z | 2020-05-07T21:25:03.000Z | gym_pendrogone/envs/pendrogone.py | Raiszo/pendrogone-gym | 29e8fe5c28235acb174b7755047f2051a77b2c46 | [
"MIT"
] | null | null | null | gym_pendrogone/envs/pendrogone.py | Raiszo/pendrogone-gym | 29e8fe5c28235acb174b7755047f2051a77b2c46 | [
"MIT"
] | null | null | null | import numpy as np
import gym
from gym import spaces
from gym.utils import seeding
class Pendrogone(gym.Env):
LIMITS = np.array([2.5, 2.5])
T = 0.02
metadata = {
'render.modes': ['human'],
'video.frames_per_second' : 1/T
}
def __init__(self):
self.gravity = 9.81 #: [m/s2] ... | 31.764493 | 118 | 0.539751 |
cfaf1ec37abeb4a13f6d1ddb27789f2e743b78b7 | 1,822 | py | Python | cfg.py | hoefkensj/reroot | 890e6086272577d599ced9fe52ddac1bfce60d85 | [
"Unlicense"
] | null | null | null | cfg.py | hoefkensj/reroot | 890e6086272577d599ced9fe52ddac1bfce60d85 | [
"Unlicense"
] | null | null | null | cfg.py | hoefkensj/reroot | 890e6086272577d599ced9fe52ddac1bfce60d85 | [
"Unlicense"
] | null | null | null | import os
import configparser
def new(*a):
"""
create an empty configparser with: extended interpolation, : for delimiter and allowing empty value's for keys
:return: configerparser obj.
"""
cfg = configparser.ConfigParser( interpolation = configparser.ExtendedInterpolation(),
delimiters = ':... | 22.775 | 111 | 0.670143 |
05fa1871cf73f6c92d2f3a1a486d1e0273d95057 | 12,988 | py | Python | libraries/sort/sort.py | ruidongjr/Aldi | b50101314bcca55994883eb447e30fff71527b6b | [
"MIT"
] | 24 | 2021-01-05T02:23:09.000Z | 2022-03-21T11:39:23.000Z | libraries/sort/sort.py | nathnim/track_and_count | 0d2dad1ab180abb59bee15d9e5e851e4de4e8cd5 | [
"MIT"
] | 7 | 2021-01-25T12:45:03.000Z | 2022-01-12T05:14:05.000Z | libraries/sort/sort.py | nathnim/track_and_count | 0d2dad1ab180abb59bee15d9e5e851e4de4e8cd5 | [
"MIT"
] | 16 | 2021-03-14T04:14:09.000Z | 2022-03-24T06:15:45.000Z | """
SORT: A Simple, Online and Realtime Tracker
Copyright (C) 2016-2020 Alex Bewley alex@bewley.ai
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,... | 39.238671 | 243 | 0.566369 |
65c58689d8d4ff7ce8c7e98c86dc009275e874ec | 238 | py | Python | hanger/__init__.py | SoulSen/Hanger | 286e85cb280e7e9c8c90f7831f1549ce845e9617 | [
"MIT"
] | 6 | 2021-01-08T12:46:13.000Z | 2021-09-28T18:29:24.000Z | hanger/__init__.py | SoulSen/Hanger | 286e85cb280e7e9c8c90f7831f1549ce845e9617 | [
"MIT"
] | null | null | null | hanger/__init__.py | SoulSen/Hanger | 286e85cb280e7e9c8c90f7831f1549ce845e9617 | [
"MIT"
] | null | null | null | from .client import Client
from .conversation import Conversation
from .image import Image
from .location import Location
from .message import Message
__title__ = 'hanger'
__author__ = 'SoulSen'
__license__ = 'MIT'
__version__ = '0.1.2'
| 21.636364 | 38 | 0.781513 |
c51d4c5ec0f99e2cc06bbffae315bda6dfa16554 | 109 | py | Python | python/verkefni1/scramble.py | asgeir/old-school-projects | 96a502589c627e4556f9ee14fc1dc21ed53ce28a | [
"MIT"
] | null | null | null | python/verkefni1/scramble.py | asgeir/old-school-projects | 96a502589c627e4556f9ee14fc1dc21ed53ce28a | [
"MIT"
] | null | null | null | python/verkefni1/scramble.py | asgeir/old-school-projects | 96a502589c627e4556f9ee14fc1dc21ed53ce28a | [
"MIT"
] | null | null | null | def scramble(list, indices):
result = []
for index in indices:
result.append(list[index])
return result
| 18.166667 | 28 | 0.715596 |
4e08f85acb1fd31b2516385ed8b0c202a2f0745a | 2,259 | py | Python | gftool/linalg.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 12 | 2020-10-09T10:05:44.000Z | 2022-02-22T14:04:19.000Z | gftool/linalg.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 20 | 2020-01-28T09:15:27.000Z | 2022-02-06T16:48:30.000Z | gftool/linalg.py | DerWeh/gftools | a123c3d2aa62bcf9c2c7fcc15121cf60d09df020 | [
"MIT"
] | 6 | 2021-03-09T19:10:37.000Z | 2022-02-02T14:29:06.000Z | """Collection of linear algebra algorithms not contained in numpy or scipy."""
from functools import partial
import numpy as np
from scipy import linalg as spla
from gftool._util import _gu_sum
transpose = partial(np.swapaxes, axis1=-2, axis2=-1)
def lstsq_ec(a, b, c, d, rcond=None):
"""Least-squares solution... | 35.857143 | 80 | 0.606463 |
dc5a1bb5c8158d6b7466ff0440fb44d42a5c1a17 | 1,656 | py | Python | pay-api/migrations/versions/f1ed292af77f_name_req_description_changes.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 4 | 2020-03-23T21:37:02.000Z | 2021-06-15T11:25:22.000Z | pay-api/migrations/versions/f1ed292af77f_name_req_description_changes.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 757 | 2019-05-02T17:53:52.000Z | 2022-03-31T22:42:01.000Z | pay-api/migrations/versions/f1ed292af77f_name_req_description_changes.py | thorwolpert/sbc-pay | ea355dfb13e783ed1e86ed92efaa45293463c348 | [
"Apache-2.0"
] | 39 | 2019-01-30T20:05:36.000Z | 2022-03-24T15:07:54.000Z | """name_req_description_changes
Revision ID: f1ed292af77f
Revises: 41f76e6c82eb
Create Date: 2021-01-13 12:02:13.958771
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = 'f1ed292af77f'
down_revision = '41f76e6c82eb'
branch_labels = None
depends_on = None
def upgrade():
# ### comma... | 43.578947 | 174 | 0.746377 |
6ef6badc4ae7e16b64c664008645c12d64fcae51 | 27,687 | py | Python | mypy/test/teststubtest.py | 3ok/mypy | 9c39dea6b96082d1480cc5344a5f266c672f0f75 | [
"PSF-2.0"
] | null | null | null | mypy/test/teststubtest.py | 3ok/mypy | 9c39dea6b96082d1480cc5344a5f266c672f0f75 | [
"PSF-2.0"
] | 10 | 2020-11-25T23:57:22.000Z | 2021-04-21T23:50:19.000Z | mypy/test/teststubtest.py | Vinta-IAAS-Labs/mypy | d326952f88214b36d302c7fcbc92320b3c68fa18 | [
"PSF-2.0"
] | null | null | null | import contextlib
import inspect
import io
import os
import re
import sys
import tempfile
import textwrap
import unittest
from typing import Any, Callable, Iterator, List, Optional
import mypy.stubtest
from mypy.stubtest import parse_options, test_stubs
from mypy.test.data import root_dir
@contextlib.contextmanager
... | 32.156794 | 99 | 0.459241 |
69586763c6bbac0f15a051dfc9a2e51adfc258ee | 194,878 | py | Python | mscreen/autodocktools_prepare_py3k/AutoDockTools/autogpfCommands.py | e-mayo/mscreen | a50f0b2f7104007c730baa51b4ec65c891008c47 | [
"MIT"
] | 9 | 2021-03-06T04:24:28.000Z | 2022-01-03T09:53:07.000Z | AutoDockTools/autogpfCommands.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 3 | 2021-03-07T05:37:16.000Z | 2021-09-19T15:06:54.000Z | AutoDockTools/autogpfCommands.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 4 | 2019-08-28T23:11:39.000Z | 2021-11-27T08:43:36.000Z | #############################################################################
#
# Author: Ruth HUEY, Michel F. SANNER
#
# Copyright: M. Sanner TSRI 2000
#
#############################################################################
# $Header: /opt/cvs/python/packages/share1.5/AutoDockTools/autogpfCommands.py,v 1.132... | 39.069366 | 449 | 0.560381 |
33adaab3e5393a4b9174f03b6bbfc1e40a282bbc | 4,405 | py | Python | catalog/models.py | TaurusCanis/django_local_library | d4051c0dde56f93d9914eec635b8f93797c8976d | [
"MIT"
] | null | null | null | catalog/models.py | TaurusCanis/django_local_library | d4051c0dde56f93d9914eec635b8f93797c8976d | [
"MIT"
] | null | null | null | catalog/models.py | TaurusCanis/django_local_library | d4051c0dde56f93d9914eec635b8f93797c8976d | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from datetime import date
# Create your models here.
class Genre(models.Model):
"""Model representing a book genre."""
name = models.CharField(max_length=200, help_text='Enter a book genre (e.g. Science Fiction)')
def __str__(se... | 38.982301 | 155 | 0.669921 |
c363a83a5f4470bda7b66f5b996541c04d0ccea0 | 1,517 | py | Python | script/lib/config.py | christian-bromann/electron | a1ef09a243a48d24e211eb96e7a9c4b9149ecd45 | [
"MIT"
] | 1 | 2016-11-21T05:29:49.000Z | 2016-11-21T05:29:49.000Z | script/lib/config.py | christian-bromann/electron | a1ef09a243a48d24e211eb96e7a9c4b9149ecd45 | [
"MIT"
] | null | null | null | script/lib/config.py | christian-bromann/electron | a1ef09a243a48d24e211eb96e7a9c4b9149ecd45 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import errno
import os
import platform
import sys
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
'http://github-janky-artifacts.s3.amazonaws.com/libchromiumcontent'
LIBCHROMIUMCONTENT_COMMIT = '42200d8ec0b77c7491d3a09611c23eb771e0862d'
PLATFORM = {
'cygwin': 'win32',
'darwin': ... | 24.079365 | 73 | 0.648649 |
d656eaebf47910753c64ec74b7851595ccb5a91e | 16,157 | py | Python | python/paddle/fluid/tests/unittests/test_imperative_ptb_rnn.py | SunAhong1993/Paddle | 3e1404d2087e4ea52e61ba4273638a4fa00e2928 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_ptb_rnn.py | SunAhong1993/Paddle | 3e1404d2087e4ea52e61ba4273638a4fa00e2928 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_imperative_ptb_rnn.py | SunAhong1993/Paddle | 3e1404d2087e4ea52e61ba4273638a4fa00e2928 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 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 app... | 42.856764 | 80 | 0.572074 |
e330cf0a9469812fed5b15cc20c4e9155453fe5c | 3,501 | py | Python | bindings/python/ensmallen/datasets/string/thioalkalivibrioversutus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/thioalkalivibrioversutus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/thioalkalivibrioversutus.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 Thioalkalivibrio versutus.
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--prot... | 33.342857 | 223 | 0.680377 |
167b0811eeb8c383ee980c190ea1367399717b77 | 41 | py | Python | python3.6/cal.py | gjbr5/python-link-e-learning | ed18f9537af29d7edd75686c9203d31b0a46ae5e | [
"MIT"
] | null | null | null | python3.6/cal.py | gjbr5/python-link-e-learning | ed18f9537af29d7edd75686c9203d31b0a46ae5e | [
"MIT"
] | null | null | null | python3.6/cal.py | gjbr5/python-link-e-learning | ed18f9537af29d7edd75686c9203d31b0a46ae5e | [
"MIT"
] | 6 | 2020-09-04T10:16:59.000Z | 2020-12-03T01:47:03.000Z | import calendar
calendar.prmonth(2020, 9) | 20.5 | 25 | 0.829268 |
552dae07a4b44f7f6b6df107d9a8cc2b48c97aa6 | 2,862 | py | Python | lib/exabgp/configuration/static/mpls.py | bopopescu/exabgpsec | f7f4b97626422ef2c997c359e96c60e7b51291ae | [
"BSD-3-Clause"
] | 2 | 2018-12-15T16:18:34.000Z | 2019-09-02T11:41:18.000Z | lib/exabgp/configuration/static/mpls.py | nembery/exabgp | 53cfff843ddde33bf1c437a1c4ce99de20c6bade | [
"BSD-3-Clause"
] | null | null | null | lib/exabgp/configuration/static/mpls.py | nembery/exabgp | 53cfff843ddde33bf1c437a1c4ce99de20c6bade | [
"BSD-3-Clause"
] | 1 | 2020-07-23T16:53:39.000Z | 2020-07-23T16:53:39.000Z | # encoding: utf-8
"""
inet/parser.py
Created by Thomas Mangin on 2015-06-04.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
from struct import pack
from exabgp.util import character
from exabgp.util import concat_bytes_i
from exabgp.bgp.message.update.... | 24.672414 | 80 | 0.654787 |
7f8032185ddf7d9607a17ead2677396c3b86c9c3 | 5,339 | py | Python | Docker-Compose2UML_nonokawa2019/docker-compose2uml/src/main/resources/Lib/site-packages/setuptools/installer.py | kisolab/astah_plugins_released | e1ed674e998f953ab9becefc9bd9c474b8c569b7 | [
"Apache-2.0"
] | null | null | null | Docker-Compose2UML_nonokawa2019/docker-compose2uml/src/main/resources/Lib/site-packages/setuptools/installer.py | kisolab/astah_plugins_released | e1ed674e998f953ab9becefc9bd9c474b8c569b7 | [
"Apache-2.0"
] | null | null | null | Docker-Compose2UML_nonokawa2019/docker-compose2uml/src/main/resources/Lib/site-packages/setuptools/installer.py | kisolab/astah_plugins_released | e1ed674e998f953ab9becefc9bd9c474b8c569b7 | [
"Apache-2.0"
] | 4 | 2021-02-11T03:51:39.000Z | 2021-02-12T05:10:43.000Z | import glob
import os
import subprocess
import sys
from distutils import log
from distutils.errors import DistutilsError
import pkg_resources
from setuptools.command.easy_install import easy_install
from setuptools.extern import six
from setuptools.wheel import Wheel
from .py31compat import TemporaryDirectory
def _... | 35.357616 | 79 | 0.643754 |
fcda3ae8107b82649b7e4b7e1bfa24a33d8803c4 | 6,208 | py | Python | mmtrack/models/vis/masktrack_rcnn.py | Readpistol/mmtracking | 131b8fb7c632324f88c3240229e411e801380f2a | [
"Apache-2.0"
] | 1 | 2022-03-12T21:36:42.000Z | 2022-03-12T21:36:42.000Z | mmtrack/models/vis/masktrack_rcnn.py | Readpistol/mmtracking | 131b8fb7c632324f88c3240229e411e801380f2a | [
"Apache-2.0"
] | null | null | null | mmtrack/models/vis/masktrack_rcnn.py | Readpistol/mmtracking | 131b8fb7c632324f88c3240229e411e801380f2a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from mmdet.models import build_detector, build_head
from mmtrack.models.mot import BaseMultiObjectTracker
from ..builder import MODELS, build_tracker
@MODELS.register_module()
class MaskTrackRCNN(BaseMultiObjectTracker):
"""Video Instance Segmentation.
This vi... | 40.051613 | 79 | 0.588756 |
0306a6e71d9ce7c0c68e1e42e032b24b34128a14 | 1,112 | py | Python | imgkit/config.py | ijjjmsf/imgkit | 367b74a1de96d8d7be33ce352284c4794ca04b22 | [
"MIT"
] | 1 | 2017-02-07T01:55:58.000Z | 2017-02-07T01:55:58.000Z | imgkit/config.py | ijjjmsf/imgkit | 367b74a1de96d8d7be33ce352284c4794ca04b22 | [
"MIT"
] | null | null | null | imgkit/config.py | ijjjmsf/imgkit | 367b74a1de96d8d7be33ce352284c4794ca04b22 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import subprocess
import sys
class Config(object):
def __init__(self, wkhtmltoimage='', meta_tag_prefix='imgkit-'):
self.meta_tag_prefix = meta_tag_prefix
self.wkhtmltoimage = wkhtmltoimage
if not self.wkhtmltoimage:
if sys.platform == 'win32':
... | 39.714286 | 102 | 0.534173 |
69a7b6ddfe7c2f4bd3c5ff011e7ae7e998a93843 | 10,117 | py | Python | hwb/blots.py | TheDenk/hwb | bcc8f6a780fa26fa23a75909caad47719eb8e198 | [
"MIT"
] | 3 | 2021-10-01T15:12:59.000Z | 2021-12-27T11:03:13.000Z | hwb/blots.py | TheDenk/hwb | bcc8f6a780fa26fa23a75909caad47719eb8e198 | [
"MIT"
] | null | null | null | hwb/blots.py | TheDenk/hwb | bcc8f6a780fa26fa23a75909caad47719eb8e198 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from .utils import unpack_mm_params, generate_parameter
from .configs import blot_rect_config, blot_params
def generate_rect_coordinates(img_h: int, img_w: int,
min_x: int = None, min_y: int = None,
max_x: int = No... | 35.128472 | 112 | 0.571711 |
e70fa83738e16495f36a8a87d6c138b89ba03ebb | 9,441 | py | Python | CPAC/GUI/interface/pages/anatomical.py | danlurie/C-PAC | 5ddc2d4fa71eb13728d6156f73cb6e7621dda69d | [
"BSD-3-Clause"
] | null | null | null | CPAC/GUI/interface/pages/anatomical.py | danlurie/C-PAC | 5ddc2d4fa71eb13728d6156f73cb6e7621dda69d | [
"BSD-3-Clause"
] | null | null | null | CPAC/GUI/interface/pages/anatomical.py | danlurie/C-PAC | 5ddc2d4fa71eb13728d6156f73cb6e7621dda69d | [
"BSD-3-Clause"
] | null | null | null | import wx
import wx.html
from ..utils.generic_class import GenericClass
from ..utils.constants import control, dtype
from ..utils.validator import CharValidator
import os
import pkg_resources as p
class AnatomicalPreprocessing(wx.html.HtmlWindow):
def __init__(self, parent, counter = 0):
from urllib2 imp... | 49.689474 | 308 | 0.577058 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.