hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d781303bdce99fcd412f97fd56258748f1dddb3c | 866 | py | Python | BerlinCheckers/CheckersGame/migrations/0001_initial.py | apmit2704/webster2k21 | e31a1df34f367b8872c3ea615f12a1e00c1a6eab | [
"MIT"
] | null | null | null | BerlinCheckers/CheckersGame/migrations/0001_initial.py | apmit2704/webster2k21 | e31a1df34f367b8872c3ea615f12a1e00c1a6eab | [
"MIT"
] | null | null | null | BerlinCheckers/CheckersGame/migrations/0001_initial.py | apmit2704/webster2k21 | e31a1df34f367b8872c3ea615f12a1e00c1a6eab | [
"MIT"
] | 2 | 2021-12-31T12:24:55.000Z | 2022-03-02T07:55:14.000Z | # Generated by Django 3.2.3 on 2021-10-17 08:54
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Game',
fields=[
('id', models.BigAutoField(... | 33.307692 | 172 | 0.570439 |
a005c9aeb276f7d444ec1647a9cacf899561de69 | 233 | py | Python | backend/code/iep/guests/routing.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | backend/code/iep/guests/routing.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | backend/code/iep/guests/routing.py | socek/iep | 793e35ca5304eef7b7dacb5dd8d486622f497759 | [
"Apache-2.0"
] | null | null | null | def guests_routing(routing):
routing.add("iep.guests.views.GuestsView", "guests", "/conventions/{convention_uid}/guests")
routing.add("iep.guests.views.GuestView", "guest", "/conventions/{convention_uid}/guests/{guest_uid}")
| 58.25 | 106 | 0.742489 |
655fd46e7204fca9770b4180e8e14dd2149488f0 | 6,047 | py | Python | advanced/train/ddp.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 170 | 2019-08-24T07:25:04.000Z | 2022-03-29T01:42:44.000Z | advanced/train/ddp.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 15 | 2019-10-29T01:36:57.000Z | 2022-03-11T23:56:32.000Z | advanced/train/ddp.py | Stillerman/MusicTransformer-pytorch | 73abb7cab271beba042b7b6fc06a6a9aaee82e8c | [
"MIT"
] | 57 | 2019-10-14T07:26:10.000Z | 2022-03-31T14:39:02.000Z | from model import MusicTransformer
import custom
from custom.metrics import *
from custom.criterion import SmoothCrossEntropyLoss, CustomSchedule
from custom.config import config
from data import Data
import utils
import argparse
import datetime
import time
import os
from apex import amp
from apex.parallel import Dis... | 38.272152 | 114 | 0.677526 |
5ac6ecc6d64f85aae9a65050c6237956d854aeab | 2,346 | py | Python | spacy/tests/parser/test_sbd.py | yuukos/spaCy | e4125383ed7221910ea955eae9b623c02bda64d8 | [
"MIT"
] | 1 | 2017-11-18T08:53:26.000Z | 2017-11-18T08:53:26.000Z | spacy/tests/parser/test_sbd.py | yuukos/spaCy | e4125383ed7221910ea955eae9b623c02bda64d8 | [
"MIT"
] | null | null | null | spacy/tests/parser/test_sbd.py | yuukos/spaCy | e4125383ed7221910ea955eae9b623c02bda64d8 | [
"MIT"
] | 1 | 2018-08-25T03:09:50.000Z | 2018-08-25T03:09:50.000Z | # coding: utf-8
from __future__ import unicode_literals
from ...tokens import Doc
from ..util import get_doc, apply_transition_sequence
import pytest
@pytest.mark.parametrize('text', ["A test sentence"])
@pytest.mark.parametrize('punct', ['.', '!', '?', ''])
def test_parser_sbd_single_punct(en_tokenizer, text, punc... | 39.762712 | 81 | 0.633845 |
2c62c9b1779f0f4fd9339c6434e5d9d78244c0b4 | 1,331 | py | Python | UICPC/21/nwerc2020all/dragonballs/submissions/accepted/ragnar-try-all-corners.py | MilladMuhammadi/Competitive-Programming | 9f84a2d2734a5efe0e1fde0062e51782cd5af2c6 | [
"MIT"
] | null | null | null | UICPC/21/nwerc2020all/dragonballs/submissions/accepted/ragnar-try-all-corners.py | MilladMuhammadi/Competitive-Programming | 9f84a2d2734a5efe0e1fde0062e51782cd5af2c6 | [
"MIT"
] | null | null | null | UICPC/21/nwerc2020all/dragonballs/submissions/accepted/ragnar-try-all-corners.py | MilladMuhammadi/Competitive-Programming | 9f84a2d2734a5efe0e1fde0062e51782cd5af2c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from sys import stderr
from math import sqrt
n = int(input())
L, H = 0, 10**6
def query(x, y):
global n
if x < L or x > H or y < L or y > H: return -1
print(x, y, flush=True)
d = int(input())
if d == 0: n -= 1
if n == 0: exit(0)
return d
# Circle-Circle intersection... | 26.098039 | 77 | 0.468069 |
a052bc2603fe132fe28e7f949c83b45db9908856 | 1,417 | py | Python | tutos/calendars/migrations/0001_initial.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | tutos/calendars/migrations/0001_initial.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | tutos/calendars/migrations/0001_initial.py | UVG-Teams/Tutos-System | 230dd9434f745c2e6e69e10f9908e9818c559d03 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.7 on 2020-11-03 21:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 37.289474 | 121 | 0.608327 |
b13c2bd6aca72bb7678154d32a3919df2a8f4449 | 3,294 | py | Python | ubuntu20/projects/libRadtran-2.0.4/examples/GUI/radiance_sentinel/radiance_sentinel_plot.py | AmberCrafter/docker-compose_libRadtran | 0182f991db6a13e0cacb3bf9f43809e6850593e4 | [
"MIT"
] | null | null | null | ubuntu20/projects/libRadtran-2.0.4/examples/GUI/radiance_sentinel/radiance_sentinel_plot.py | AmberCrafter/docker-compose_libRadtran | 0182f991db6a13e0cacb3bf9f43809e6850593e4 | [
"MIT"
] | null | null | null | ubuntu20/projects/libRadtran-2.0.4/examples/GUI/radiance_sentinel/radiance_sentinel_plot.py | AmberCrafter/docker-compose_libRadtran | 0182f991db6a13e0cacb3bf9f43809e6850593e4 | [
"MIT"
] | null | null | null | #
# This file is part of libRadtran.
# Copyright (c) 2010 by Arve Kylling.
#
# libRadtran is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | 25.338462 | 85 | 0.722526 |
e053a65d6a758ee7d6d49bbba3b22ebac554a4a1 | 62,374 | py | Python | tests/mail/tests.py | dadoeyad/django | 802dd1ffc5cfa3d547efeb285dac70884b99e16d | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-21T02:20:06.000Z | 2020-10-21T02:20:06.000Z | tests/mail/tests.py | dadoeyad/django | 802dd1ffc5cfa3d547efeb285dac70884b99e16d | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/mail/tests.py | dadoeyad/django | 802dd1ffc5cfa3d547efeb285dac70884b99e16d | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import asyncore
import base64
import mimetypes
import os
import shutil
import smtpd
import socket
import sys
import tempfile
import threading
from email.header import Header
from email.mime.text import MIMEText
from smtplib import SMTP, SMTPAuthentication... | 41.889859 | 119 | 0.626928 |
81c8f117f52c41cc1afb91591c72cee5958162b6 | 6,397 | py | Python | models.py | ygorcanalli/FairnessComparsion | a6bd842096b7739665bb4f3df381f5f133ddb4e8 | [
"MIT"
] | null | null | null | models.py | ygorcanalli/FairnessComparsion | a6bd842096b7739665bb4f3df381f5f133ddb4e8 | [
"MIT"
] | null | null | null | models.py | ygorcanalli/FairnessComparsion | a6bd842096b7739665bb4f3df381f5f133ddb4e8 | [
"MIT"
] | null | null | null | import numpy as np
from tensorflow.keras import Sequential
from tensorflow.keras.losses import binary_crossentropy
from tensorflow.keras.layers import InputLayer, Dropout, Dense
from aif360.algorithms import Transformer
from tensorflow.keras import backend as K
def fair_forward(P_privileged, P_protected):
"""
... | 39.487654 | 149 | 0.655307 |
1caded7a93620895f697cfb3f3ed13811591a012 | 480 | py | Python | tests/test_Line.py | PythonicNinja/Polygon-Triangulation | 1fc3e5e7770432db6c8f4c947e0a0bef558a9c82 | [
"BSD-3-Clause"
] | 1 | 2019-04-13T11:41:51.000Z | 2019-04-13T11:41:51.000Z | tests/test_Line.py | PythonicNinja/Polygon-Triangulation | 1fc3e5e7770432db6c8f4c947e0a0bef558a9c82 | [
"BSD-3-Clause"
] | null | null | null | tests/test_Line.py | PythonicNinja/Polygon-Triangulation | 1fc3e5e7770432db6c8f4c947e0a0bef558a9c82 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_Line
----------------------------------
Tests for `Line` module.
"""
import unittest
import doctest
from PolygonTriangulation import Line
class TestLine(unittest.TestCase):
def setUp(self):
pass
# def test_docstrings(self):
# doctest... | 14.117647 | 45 | 0.589583 |
829ce6a08bb25dcd5766484740e64f3b7884765a | 4,699 | py | Python | setup.py | eldarion/privileges | 72711fde5351686a8305007f5d493d2f4dabdc6c | [
"BSD-3-Clause"
] | 5 | 2017-09-14T05:42:13.000Z | 2019-03-11T08:38:49.000Z | setup.py | eldarion/privileges | 72711fde5351686a8305007f5d493d2f4dabdc6c | [
"BSD-3-Clause"
] | 6 | 2015-07-25T17:23:42.000Z | 2021-06-10T17:29:45.000Z | setup.py | eldarion/privileges | 72711fde5351686a8305007f5d493d2f4dabdc6c | [
"BSD-3-Clause"
] | 2 | 2015-01-16T02:32:04.000Z | 2018-10-29T13:09:17.000Z | import codecs
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
def read(fname):
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
# Provided as an attribute, so you can append to these instead
# of r... | 34.807407 | 86 | 0.581826 |
e0d152f844b59e3347ecfccf06db613c1a584871 | 431 | py | Python | env/Lib/site-packages/plotly/validators/layout/polar/radialaxis/_linecolor.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | env/Lib/site-packages/plotly/validators/layout/polar/radialaxis/_linecolor.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | env/Lib/site-packages/plotly/validators/layout/polar/radialaxis/_linecolor.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import _plotly_utils.basevalidators
class LinecolorValidator(_plotly_utils.basevalidators.ColorValidator):
def __init__(
self, plotly_name="linecolor", parent_name="layout.polar.radialaxis", **kwargs
):
super(LinecolorValidator, self).__init__(
plotly_name=plotly_name,
... | 30.785714 | 86 | 0.663573 |
55f995e7e19f6d2bcf3dfe20c3236569274e3f98 | 2,104 | py | Python | tool/pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | jcuic5/CUDA-PointPillars | 3e1959448366c273914ec5024db39ed4e8c8dcdd | [
"Apache-2.0"
] | 1 | 2021-12-29T00:04:53.000Z | 2021-12-29T00:04:53.000Z | tool/pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | jcuic5/CUDA-PointPillars | 3e1959448366c273914ec5024db39ed4e8c8dcdd | [
"Apache-2.0"
] | null | null | null | tool/pcdet/models/backbones_2d/map_to_bev/pointpillar_scatter.py | jcuic5/CUDA-PointPillars | 3e1959448366c273914ec5024db39ed4e8c8dcdd | [
"Apache-2.0"
] | 1 | 2022-03-18T01:12:24.000Z | 2022-03-18T01:12:24.000Z | # SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# 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
#
# ht... | 41.254902 | 123 | 0.673479 |
7e3e7fb5981920cf943699102908492b42c3ec8d | 2,316 | py | Python | examples/functional_api/chapter_2.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | examples/functional_api/chapter_2.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | examples/functional_api/chapter_2.py | SKRohit/zenml | ba84f56d8fc6043cdcb59832ab47bc8261e25d12 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) ZenML GmbH 2021. 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... | 31.297297 | 80 | 0.727116 |
b851618f400d4910222fd810b06394dfc25f0fa9 | 14,867 | py | Python | clients/client/python/ory_client/model/submit_self_service_recovery_flow_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/submit_self_service_recovery_flow_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | clients/client/python/ory_client/model/submit_self_service_recovery_flow_body.py | sproutfi/sdk | 5340b37d7b3e8f3c1b8f4c0c16ede05488498620 | [
"Apache-2.0"
] | null | null | null | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.71
Contact: support@ory.sh
Generated by: htt... | 45.464832 | 287 | 0.597229 |
bfab1586e4407d7f3fc87673a05db9973db47274 | 13,038 | py | Python | demos/demo_car.py | GPrathap/lqRRT | 03a02cc9299ebb85b84fcb9f78917fa645315981 | [
"MIT"
] | null | null | null | demos/demo_car.py | GPrathap/lqRRT | 03a02cc9299ebb85b84fcb9f78917fa645315981 | [
"MIT"
] | null | null | null | demos/demo_car.py | GPrathap/lqRRT | 03a02cc9299ebb85b84fcb9f78917fa645315981 | [
"MIT"
] | null | null | null | """
Demo of using the lqrrt planner for (nonholonomic) cars.
We do this with a similar model to the heading-constrained
boat, but with an actual degenerate state-space (no vy).
This is a very simplified model that pretends our input
is a wrench instead of a steering-angle and throttle-angle,
but it suffices to give rea... | 33.430769 | 173 | 0.560822 |
acdf0883ebcb1ba7078d8cb8642ce198a67ce02a | 1,534 | py | Python | k_closest_points.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | k_closest_points.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | k_closest_points.py | pranavdave893/Leetcode | 1f30ea37af7b60585d168b15d9397143f53c92a1 | [
"MIT"
] | null | null | null | from math import sqrt
from heapq import heappush, heappop, heappushpop
class Solution(object):
def kClosest(self, points, K):
"""
:type points: List[List[int]]
:type K: int
:rtype: List[List[int]]
"""
def stupid_python(points, K):
dct = {}
answ... | 26.912281 | 88 | 0.426336 |
aff9505dc47840859a0ebf90e06775cff92e9eb6 | 16,324 | py | Python | test/api/test_frames_api.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | test/api/test_frames_api.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | test/api/test_frames_api.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="test_frames_api.py">
# Copyright (c) 2019-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtai... | 41.118388 | 111 | 0.536572 |
22dad863e791532c2d058ebde0f6a1de8d2c1a0d | 6,412 | py | Python | hack/boilerplate/boilerplate.py | LaudateCorpus1/oci-flexvolume-driver | fcdce8fb737590d3e1df21b796799a91ab73b45e | [
"Apache-2.0"
] | 17 | 2018-01-08T09:30:16.000Z | 2022-01-27T13:13:08.000Z | hack/boilerplate/boilerplate.py | LaudateCorpus1/oci-flexvolume-driver | fcdce8fb737590d3e1df21b796799a91ab73b45e | [
"Apache-2.0"
] | 67 | 2018-01-18T15:45:15.000Z | 2020-04-06T12:50:59.000Z | hack/boilerplate/boilerplate.py | LaudateCorpus1/oci-flexvolume-driver | fcdce8fb737590d3e1df21b796799a91ab73b45e | [
"Apache-2.0"
] | 14 | 2018-02-13T08:02:27.000Z | 2022-02-18T04:38:29.000Z | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 29.278539 | 92 | 0.632252 |
123a3c86fdb6503880f7f089c846d890bf31b3e0 | 3,457 | py | Python | applaud/endpoints/app_clip_header_images.py | codinn/applaud | ed168ca67465b5c0acf4ab4f4e285a2ab348c96d | [
"MIT"
] | 3 | 2022-01-22T15:34:13.000Z | 2022-03-22T06:46:48.000Z | applaud/endpoints/app_clip_header_images.py | codinn/applaud | ed168ca67465b5c0acf4ab4f4e285a2ab348c96d | [
"MIT"
] | 1 | 2022-03-13T17:13:01.000Z | 2022-03-16T05:04:51.000Z | applaud/endpoints/app_clip_header_images.py | codinn/applaud | ed168ca67465b5c0acf4ab4f4e285a2ab348c96d | [
"MIT"
] | 1 | 2022-03-16T02:17:30.000Z | 2022-03-16T02:17:30.000Z | from __future__ import annotations
from .base import Endpoint, IDEndpoint, SortOrder, endpoint
from ..fields import *
from typing import Union
from ..schemas.models import *
from ..schemas.responses import *
from ..schemas.requests import *
from ..schemas.enums import *
class AppClipHeaderImagesEndpoint(Endpoint):
... | 41.154762 | 163 | 0.715939 |
abff849fddd9262e61224d54be619aebe99fda7b | 19,364 | py | Python | python-3.4.4.amd64/Lib/unittest/test/test_discovery.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/unittest/test/test_discovery.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | python-3.4.4.amd64/Lib/unittest/test/test_discovery.py | CSnap/photogate | 208272ef39f4e86f40d431da2ca523e21701f789 | [
"CC0-1.0"
] | null | null | null | import os
import re
import sys
import types
import pickle
import builtins
from test import support
import unittest
import unittest.test
class TestableTestProgram(unittest.TestProgram):
module = None
exit = True
defaultTest = failfast = catchbreak = buffer = None
verbosity = 1
pro... | 36.05959 | 92 | 0.590374 |
96d04ab7c3d08e5597bc370cfe9f00270fdda537 | 1,788 | py | Python | preprocess/create_dataset.py | marshuang80/pe_fusion | f9e4618b63c55377a21345a1e7218b09bab52ed4 | [
"Apache-2.0"
] | 12 | 2020-12-18T15:47:40.000Z | 2022-03-23T07:25:04.000Z | preprocess/create_dataset.py | marshuang80/pe_fusion | f9e4618b63c55377a21345a1e7218b09bab52ed4 | [
"Apache-2.0"
] | null | null | null | preprocess/create_dataset.py | marshuang80/pe_fusion | f9e4618b63c55377a21345a1e7218b09bab52ed4 | [
"Apache-2.0"
] | 3 | 2021-11-14T06:56:28.000Z | 2022-02-08T19:41:28.000Z | import pickle
import pandas as pd
import os
import sys
sys.path.append(os.getcwd())
from constants import *
def create_dataset(input_file:str, out_dir:str):
"""Save raw features into train,val,test dataset pickle files
Args:
input_file (str): path to the raw features file
out_dir (str): pa... | 30.305085 | 81 | 0.639821 |
6b52ac6bd05483c3586fdb864ca54129c8817fb8 | 5,177 | py | Python | tamr_toolbox/project/golden_records/jobs.py | clint-richardson/tamr-toolbox | d99109fa4f871efce9f2f681a1e8febbd6f5ff73 | [
"Apache-2.0"
] | null | null | null | tamr_toolbox/project/golden_records/jobs.py | clint-richardson/tamr-toolbox | d99109fa4f871efce9f2f681a1e8febbd6f5ff73 | [
"Apache-2.0"
] | null | null | null | tamr_toolbox/project/golden_records/jobs.py | clint-richardson/tamr-toolbox | d99109fa4f871efce9f2f681a1e8febbd6f5ff73 | [
"Apache-2.0"
] | null | null | null | """Tasks related to running jobs for Tamr Golden Records projects"""
from typing import List
import logging
from tamr_unify_client.operation import Operation
from tamr_unify_client.project.resource import Project
from tamr_toolbox.models.project_type import ProjectType
from tamr_toolbox.utils import operation
from ta... | 30.633136 | 95 | 0.681476 |
f8f73dd20486fb83c5576aea8e8ab7528b2eb25a | 57,352 | py | Python | third_party/protobuf/python/google/protobuf/internal/python_message.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1,760 | 2015-03-16T07:29:25.000Z | 2022-03-29T17:04:54.000Z | src/third_party/protobuf/python/google/protobuf/internal/python_message.py | 18901233704/libquic | 8954789a056d8e7d5fcb6452fd1572ca57eb5c4e | [
"BSD-3-Clause"
] | 66 | 2017-08-30T18:31:18.000Z | 2021-08-02T10:59:35.000Z | src/third_party/protobuf/python/google/protobuf/internal/python_message.py | 18901233704/libquic | 8954789a056d8e7d5fcb6452fd1572ca57eb5c4e | [
"BSD-3-Clause"
] | 336 | 2015-03-16T13:52:52.000Z | 2022-03-21T10:44:58.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | 37.025178 | 80 | 0.719801 |
b4490f025c5d812a9a25e0773f37701c5f1a976d | 4,641 | py | Python | sdk/python/feast/loaders/ingest.py | Yanson/feast | a72e2127bd002397106ce00c64ed31c09abeae2f | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/loaders/ingest.py | Yanson/feast | a72e2127bd002397106ce00c64ed31c09abeae2f | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/loaders/ingest.py | Yanson/feast | a72e2127bd002397106ce00c64ed31c09abeae2f | [
"Apache-2.0"
] | null | null | null | import logging
from functools import partial
from multiprocessing import Pool
from typing import Iterable, List
import pandas as pd
import pyarrow.parquet as pq
from feast.constants import DATETIME_COLUMN
from feast.feature_set import FeatureSet
from feast.type_map import (
pa_column_to_proto_column,
pa_colum... | 31.571429 | 99 | 0.685197 |
f14627c6916d6c19b9fae708194601be28f319b1 | 1,275 | py | Python | lib/gcloud/search/connection.py | huangkuan/hack | 433e213915749d9c510abf3c7462d5256b5e37eb | [
"Apache-2.0"
] | 1 | 2019-02-06T10:58:11.000Z | 2019-02-06T10:58:11.000Z | lib/gcloud/search/connection.py | huangkuan/hack | 433e213915749d9c510abf3c7462d5256b5e37eb | [
"Apache-2.0"
] | 4 | 2017-10-24T21:47:53.000Z | 2019-09-22T13:12:57.000Z | lib/gcloud/search/connection.py | huangkuan/hack | 433e213915749d9c510abf3c7462d5256b5e37eb | [
"Apache-2.0"
] | 2 | 2017-02-09T16:25:27.000Z | 2017-10-24T21:40:42.000Z | # Copyright 2015 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.5 | 76 | 0.729412 |
03e1c14246f7c5c07f77c0a60972ef38438d526d | 22,220 | py | Python | contrib/devtools/copyright_header.py | btcavenue/btcavenue | 63c135c40dbb1aef3078abb4dffefa04b8ef8217 | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | btcavenue/btcavenue | 63c135c40dbb1aef3078abb4dffefa04b8ef8217 | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | btcavenue/btcavenue | 63c135c40dbb1aef3078abb4dffefa04b8ef8217 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2019 The Btcavenue Core developers
# 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.666667 | 121 | 0.60135 |
cda4c4f33342da3204b0092f290b8b2d6c99fda0 | 6,506 | py | Python | scripts/osprey_basecaller.py | srinivasrana/osprey | ae8f81005b9bf4d80a147d3976ca7ecdb394299d | [
"Apache-2.0"
] | null | null | null | scripts/osprey_basecaller.py | srinivasrana/osprey | ae8f81005b9bf4d80a147d3976ca7ecdb394299d | [
"Apache-2.0"
] | null | null | null | scripts/osprey_basecaller.py | srinivasrana/osprey | ae8f81005b9bf4d80a147d3976ca7ecdb394299d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import osprey
import numpy as np
import time
from ont_fast5_api.fast5_interface import get_fast5_file, check_file_type
import sys
import os
from scipy.special import softmax
import decoder.decoder as d
import pickle
from multiprocessing import Pool
import gzip
import datetime
import argparse
def... | 39.430303 | 197 | 0.610206 |
96d24972a42d4b586579a64f420f5a97409d6b47 | 470 | py | Python | python/ctypes/sum.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | null | null | null | python/ctypes/sum.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | null | null | null | python/ctypes/sum.py | bismog/leetcode | 13b8a77045f96e7c59ddfe287481f6aaa68e564d | [
"MIT"
] | 1 | 2018-08-17T07:07:15.000Z | 2018-08-17T07:07:15.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import ctypes
import sys
_sum = ctypes.CDLL('./libsum.so')
_sum.our_function.argtypes = (ctypes.c_int, ctypes.POINTER(ctypes.c_int))
def our_function(numbers):
global _sum
num_numbers = len(numbers)
array_type = ctypes.c_int * num_numbers
result = _sum.our_... | 24.736842 | 79 | 0.702128 |
bb60854aeaa3a394414430fc54051be13bc2fc74 | 3,755 | py | Python | py/tests/unit_test_utils.py | kmullapudi-11/sparkling-water | 9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e | [
"Apache-2.0"
] | null | null | null | py/tests/unit_test_utils.py | kmullapudi-11/sparkling-water | 9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e | [
"Apache-2.0"
] | null | null | null | py/tests/unit_test_utils.py | kmullapudi-11/sparkling-water | 9b43bc82b0fc6f1be7c23ed7f65cd42c14e5887e | [
"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 us... | 41.263736 | 110 | 0.700399 |
7878d761ea66c872cd5aa32f2e85244a7b0b45bf | 392 | py | Python | latex-project/codes/params2.py | gprzy/report-pibic-2020-2021 | 3738a9d8595ecab28ec7c847fc6f5bba6257f3a2 | [
"MIT"
] | null | null | null | latex-project/codes/params2.py | gprzy/report-pibic-2020-2021 | 3738a9d8595ecab28ec7c847fc6f5bba6257f3a2 | [
"MIT"
] | null | null | null | latex-project/codes/params2.py | gprzy/report-pibic-2020-2021 | 3738a9d8595ecab28ec7c847fc6f5bba6257f3a2 | [
"MIT"
] | null | null | null | model = Sequential()
model.add(LSTM(units=60, return_sequences=True, input_shape=(x_train.shape[1], 1)))
model.add(Dropout(0.1))
model.add(LSTM(units=60, return_sequences=True))
model.add(Dropout(0.1))
model.add(LSTM(units=60))
model.add(Dropout(0.1))
model.add(Dense(units=1))
model.compile(optimizer='adam', loss='me... | 32.666667 | 83 | 0.755102 |
814d42dc5f723ced71830cb506a1da7636ba854c | 1,519 | py | Python | venv/lib/python3.8/site-packages/mercurial/node.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | 4 | 2021-02-05T10:57:39.000Z | 2022-02-25T04:43:23.000Z | venv/lib/python3.8/site-packages/mercurial/node.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/mercurial/node.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | null | null | null | # node.py - basic nodeid manipulation for mercurial
#
# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import binascii
# This ugly style... | 30.38 | 73 | 0.75181 |
a4d435b04a580351ad008a0a538048275c17b31a | 2,501 | py | Python | aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py | VersesGitHub/aries-cloudagent-python | eb7182aaad3ab35ea0783e4b97118333f303e8d8 | [
"Apache-2.0"
] | 1 | 2021-04-15T09:44:00.000Z | 2021-04-15T09:44:00.000Z | aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py | VersesGitHub/aries-cloudagent-python | eb7182aaad3ab35ea0783e4b97118333f303e8d8 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/present_proof/v2_0/handlers/tests/test_pres_handler.py | VersesGitHub/aries-cloudagent-python | eb7182aaad3ab35ea0783e4b97118333f303e8d8 | [
"Apache-2.0"
] | 1 | 2022-02-02T17:05:27.000Z | 2022-02-02T17:05:27.000Z | import pytest
from asynctest import mock as async_mock, TestCase as AsyncTestCase
from ......messaging.request_context import RequestContext
from ......messaging.responder import MockResponder
from ......transport.inbound.receipt import MessageReceipt
from ...messages.pres import V20Pres
from .. import pres_handler... | 42.389831 | 80 | 0.718912 |
223c90c2e16bc6bd64167cfa2cf7ac0eeae1305e | 10,639 | py | Python | src/coda/codadtw.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | 1 | 2016-07-19T08:50:54.000Z | 2016-07-19T08:50:54.000Z | src/coda/codadtw.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | null | null | null | src/coda/codadtw.py | amunoz1/mines | 106f852fe4e64ee132d74290c1a57ea716312376 | [
"MIT"
] | null | null | null | # Dynamic Time Warping plotter for tests
# This runs all Dtw methods and plots
# @author Andrew Munoz, Colorado School of Mines
# @version 10.20.2011
from imports import *
from wt import WTutils
_pngDir = './pics/'
wtu = WTutils()
def main(args):
#dname = "synth"
dname = "real"
#dname = "filtreal"
if dname=="sy... | 24.401376 | 91 | 0.618761 |
346feebecc58e8a37edf0b58beebc33be3d8aa9f | 1,073 | py | Python | psydewalk/handoff/__init__.py | TobleMiner/psydewalk | deb8d5e2a6cca4bc7ab81bdd56841d735db0ee34 | [
"MIT"
] | null | null | null | psydewalk/handoff/__init__.py | TobleMiner/psydewalk | deb8d5e2a6cca4bc7ab81bdd56841d735db0ee34 | [
"MIT"
] | null | null | null | psydewalk/handoff/__init__.py | TobleMiner/psydewalk | deb8d5e2a6cca4bc7ab81bdd56841d735db0ee34 | [
"MIT"
] | null | null | null | from psydewalk.handoff.handoffs import *
import logging
class HandoffManager():
"""docstring for HandoffManager"""
def __init__(self, mngr, logger='handoff'):
super(HandoffManager, self).__init__()
self.behaviorManager = mngr
self.logger = logging.getLogger(logger)
self.handoffs = []
self.logger.info('Col... | 32.515152 | 81 | 0.748369 |
31ca0d1da871c41a49bc6309e3cb6c77f479d3ca | 1,303 | py | Python | python/train.py | PathofData/LGBM_C_inference | ac35be5ca0c83932a9d5281fbabe0c4df6687860 | [
"MIT"
] | null | null | null | python/train.py | PathofData/LGBM_C_inference | ac35be5ca0c83932a9d5281fbabe0c4df6687860 | [
"MIT"
] | null | null | null | python/train.py | PathofData/LGBM_C_inference | ac35be5ca0c83932a9d5281fbabe0c4df6687860 | [
"MIT"
] | null | null | null | import lightgbm as lgb
import pandas as pd
import numpy as np
from sklearn.datasets import load_iris
from sklearn.metrics import classification_report
def main():
data = load_iris(as_frame=True)
df = pd.concat([data['data'], data['target']], axis=1)
df = df.sample(frac=1)
df.reset_index(inplace=True, ... | 28.955556 | 76 | 0.682272 |
4cce30cc9da2da303270d953defcad3f9cba0e24 | 12,345 | py | Python | svdb/__main__.py | jemten/SVDB | e36181e45b0dd3329aef778ad1e62a1181b8d00f | [
"MIT"
] | null | null | null | svdb/__main__.py | jemten/SVDB | e36181e45b0dd3329aef778ad1e62a1181b8d00f | [
"MIT"
] | null | null | null | svdb/__main__.py | jemten/SVDB | e36181e45b0dd3329aef778ad1e62a1181b8d00f | [
"MIT"
] | null | null | null | import argparse
import os
from . import build_module, export_module, merge_vcf_module, query_module
def make_query_calls (args, queries, keyword):
if len(queries) > 1 and args.prefix:
if all(variable is not None for variable in [args.in_occ, args.out_occ, args.in_frq, args.out_frq]):
in_occs ... | 63.307692 | 305 | 0.604941 |
f940e30fbe4e2d7d6a40867ae7bf9c27553dbe17 | 1,344 | py | Python | chemex/model.py | gbouvignies/chemex | b021650928b6db930281957222529bc6bcab8aa2 | [
"BSD-3-Clause"
] | 11 | 2015-03-16T16:45:42.000Z | 2018-09-17T08:43:58.000Z | chemex/model.py | gbouvignies/chemex | b021650928b6db930281957222529bc6bcab8aa2 | [
"BSD-3-Clause"
] | 33 | 2015-01-12T16:46:48.000Z | 2018-03-29T15:01:15.000Z | chemex/model.py | gbouvignies/chemex | b021650928b6db930281957222529bc6bcab8aa2 | [
"BSD-3-Clause"
] | 8 | 2015-01-15T21:53:16.000Z | 2018-01-04T15:33:52.000Z | from __future__ import annotations
from dataclasses import dataclass
from string import ascii_lowercase
KINETIC_MODEL_LIST = (
"1st",
"2st",
"3st",
"4st",
"2st_rs",
"2st_hd",
"2st_eyring",
"3st_eyring",
"2st_binding",
"4st_hd",
)
@dataclass
class _Model:
__name: str = "2s... | 22.779661 | 66 | 0.610119 |
1900a65961ea2414116b9da48d91caf5c35cc6ce | 12,705 | py | Python | ormar/models/mixins/save_mixin.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | null | null | null | ormar/models/mixins/save_mixin.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | null | null | null | ormar/models/mixins/save_mixin.py | ivangirko/ormar | 1f5d993716da0da83874cbdfd5b44dbf7af1b9c5 | [
"MIT"
] | null | null | null | import uuid
from typing import (
Any,
Callable,
Collection,
Dict,
List,
Optional,
Set,
TYPE_CHECKING,
cast,
)
import pydantic
import ormar # noqa: I100, I202
from ormar.exceptions import ModelPersistenceError
from ormar.models.mixins import AliasMixin
from ormar.models.mixins.rela... | 37.588757 | 88 | 0.596852 |
b9b9821fe1b8bc613d6a068bdebfb32031f6ca12 | 3,292 | py | Python | sdk/python/pulumi_azure/recoveryservices/get_vault.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/recoveryservices/get_vault.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/recoveryservices/get_vault.py | kenny-wealth/pulumi-azure | e57e3a81f95bf622e7429c53f0bff93e33372aa1 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class GetVau... | 38.27907 | 166 | 0.655225 |
ff9dd1cfbc949fc4d32c3a9f55f3e3cc1fdcf5a0 | 2,830 | py | Python | tests/unit/queues/transport/wsgi/test_v1_0.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | tests/unit/queues/transport/wsgi/test_v1_0.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | tests/unit/queues/transport/wsgi/test_v1_0.py | andrew-vant/marconi | 9afe7ba27efe597cca8baac77fd0aa387c75001a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 26.203704 | 79 | 0.685866 |
af27a8911af8a8f723c86d5d1ca3c87a7bc56c7e | 1,399 | py | Python | plugins/misp/komand_misp/actions/add_email_subject/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/misp/komand_misp/actions/add_email_subject/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/misp/komand_misp/actions/add_email_subject/action.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | import komand
from .schema import AddEmailSubjectInput, AddEmailSubjectOutput
# Custom imports below
class AddEmailSubject(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name="add_email_subject",
description="Add email subject to event",
inpu... | 29.145833 | 63 | 0.546819 |
dc794189a86f7d4046ddb8c6e996e8a0b34335e2 | 8,452 | py | Python | code/NonLinearMultipleClassification/HelperClass2/DataReader_2_0.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | 3 | 2021-05-25T10:18:23.000Z | 2022-02-09T08:55:14.000Z | code/NonLinearRegression/HelperClass2/DataReader_2_0.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | null | null | null | code/NonLinearRegression/HelperClass2/DataReader_2_0.py | Knowledge-Precipitation-Tribe/Neural-network | eac2e66cdde85b34ddf9313ce4d2b123cc1b8be8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-#
'''
# Name: DataReader_2_0
# Description: 读包括数据读取,数据归一化处理,数据分为训练,验证,测试集,获取得到数据
# Author: super
# Date: 2020/5/24
'''
import numpy as np
from pathlib import Path
from HelperClass2.EnumDef_2_0 import *
"""
X:
x1: feature1 feature2 feature3...
x2: feature1 feature... | 35.965957 | 95 | 0.587435 |
349569a7b21b1a7b1b13214896696e340672e2f4 | 195 | py | Python | vmraid/patches/v6_21/print_settings_repeat_header_footer.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/patches/v6_21/print_settings_repeat_header_footer.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | vmraid/patches/v6_21/print_settings_repeat_header_footer.py | sowrisurya/vmraid | f833e00978019dad87af80b41279c0146c063ed5 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import vmraid
def execute():
vmraid.reload_doctype('Print Settings')
vmraid.db.set_value('Print Settings', 'Print Settings', 'repeat_header_footer', 1)
| 27.857143 | 83 | 0.794872 |
ea4facf48e8d30f7f845640fd9af9654154697c8 | 279 | py | Python | badge_management/badge_management/doctype/badge_management_settings/badge_management_settings.py | Elronde62/dokos-badge-management | e3c534e6aa6040fe4fa57b776f6b8614020b3d34 | [
"MIT"
] | null | null | null | badge_management/badge_management/doctype/badge_management_settings/badge_management_settings.py | Elronde62/dokos-badge-management | e3c534e6aa6040fe4fa57b776f6b8614020b3d34 | [
"MIT"
] | null | null | null | badge_management/badge_management/doctype/badge_management_settings/badge_management_settings.py | Elronde62/dokos-badge-management | e3c534e6aa6040fe4fa57b776f6b8614020b3d34 | [
"MIT"
] | 1 | 2021-06-02T15:36:52.000Z | 2021-06-02T15:36:52.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Guerbadot Alexandre and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class BadgeManagementSettings(Document):
pass
| 25.363636 | 58 | 0.795699 |
bc598e6ccd409f8bee4a33f15f06c342944af493 | 2,665 | py | Python | tests/integration_tests/scripts/run_train_comet.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 970 | 2020-12-17T15:09:20.000Z | 2022-03-31T22:58:03.000Z | tests/integration_tests/scripts/run_train_comet.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 503 | 2020-12-16T21:44:40.000Z | 2022-03-31T18:21:52.000Z | tests/integration_tests/scripts/run_train_comet.py | ludwig-ai/ludw | b9d95bbdb474bc22260269de1bc094bc5455f37c | [
"Apache-2.0"
] | 145 | 2020-12-18T07:38:30.000Z | 2022-03-29T19:05:08.000Z | # Tests the following end-to-end:
#
# 1. Comet is imported
# 2. Conflicting modules (i.e., TensorFlow) are not imported
# 3. Overridden methods are called (train_init, train_model, etc.) and run without error
#
# This test runs in an isolated environment to ensure TensorFlow imports are not leaked
# from previous tests... | 32.901235 | 88 | 0.723452 |
9acc6b832455cb06239e05470f0f2deb4e416c73 | 649 | py | Python | aula_17/ex81.py | Matheus-Pontes/Curso-Python-3 | a55f6730112ee58d6b23158d50b9d3051dce4448 | [
"MIT"
] | null | null | null | aula_17/ex81.py | Matheus-Pontes/Curso-Python-3 | a55f6730112ee58d6b23158d50b9d3051dce4448 | [
"MIT"
] | null | null | null | aula_17/ex81.py | Matheus-Pontes/Curso-Python-3 | a55f6730112ee58d6b23158d50b9d3051dce4448 | [
"MIT"
] | null | null | null |
num = list()
pos = 0
while True:
num.append(int(input("Digite um valor: ")))
option = " "
while option not in "SN":
option = str(input("Quer continuar? [S/N]: ")).upper().strip()[0]
if option == "N":
break
print("="*30)
print(f"Você digitou a seguinte lista {num}")
print(f"Foram digi... | 21.633333 | 73 | 0.557781 |
df5acf0b4df0fae830cb2827543e69643da8ffd3 | 6,356 | py | Python | docs/conf.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"MIT"
] | 1 | 2018-04-27T04:26:38.000Z | 2018-04-27T04:26:38.000Z | docs/conf.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"MIT"
] | null | null | null | docs/conf.py | socib/grumers | ef0b5f8441cf7b3d5a03da715263003d9f550f2f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# geosample documentation build configuration file, created by
# sphinx-quickstart on Wed Aug 19 10:27:46 2009.
#
# 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.
#
# A... | 32.428571 | 80 | 0.723568 |
bbbd36cea3c385fa841b06c09799873b21200e2f | 38 | py | Python | videoanalyst/model/task_model/__init__.py | Jee-King/STNet | 221ab60c4fccfce5a03e8878fb168e0baa7152f4 | [
"MIT"
] | 7 | 2022-03-28T15:08:21.000Z | 2022-03-31T02:59:39.000Z | videoanalyst/model/task_model/__init__.py | Jee-King/STNet | 221ab60c4fccfce5a03e8878fb168e0baa7152f4 | [
"MIT"
] | null | null | null | videoanalyst/model/task_model/__init__.py | Jee-King/STNet | 221ab60c4fccfce5a03e8878fb168e0baa7152f4 | [
"MIT"
] | null | null | null | from .taskmodel_impl import * # noqa
| 19 | 37 | 0.736842 |
df978c09883268325de969bb87c0c6c3fa030256 | 2,415 | py | Python | aiosip/uri.py | nobiit/aiosip | b3e2e5c402b16a1d5a89f009dc8c560d8e68e97f | [
"Apache-2.0"
] | null | null | null | aiosip/uri.py | nobiit/aiosip | b3e2e5c402b16a1d5a89f009dc8c560d8e68e97f | [
"Apache-2.0"
] | null | null | null | aiosip/uri.py | nobiit/aiosip | b3e2e5c402b16a1d5a89f009dc8c560d8e68e97f | [
"Apache-2.0"
] | null | null | null | import logging
import re
from collections.abc import MutableMapping
from .param import Param
LOG = logging.getLogger(__name__)
# Regex pattern from p2p-sip project
URI_PATTERN = re.compile('^(?P<scheme>[a-zA-Z][a-zA-Z0-9\+\-\.]*):' # scheme
+ '(?:(?:(?P<user>[a-zA-Z0-9\-\_\.!\~\*\'\(\)&=\+\... | 29.45122 | 96 | 0.478675 |
4f99aa4d607963b7d6737e7c1749cda78be7a3a1 | 2,039 | py | Python | public/python/rc_ocr.py | mbcse/HashsyTravel | 1510b53d0450bf3e12fc8543b288c551b0e779eb | [
"MIT"
] | null | null | null | public/python/rc_ocr.py | mbcse/HashsyTravel | 1510b53d0450bf3e12fc8543b288c551b0e779eb | [
"MIT"
] | null | null | null | public/python/rc_ocr.py | mbcse/HashsyTravel | 1510b53d0450bf3e12fc8543b288c551b0e779eb | [
"MIT"
] | null | null | null | import pytesseract
from PIL import Image
import datetime
import cv2
import sys
import os
import os.path
import re
import numpy as np
pytesseract.pytesseract.tesseract_cmd = r'C:\Users\MOHITBHAT\Tesseract-OCR\tesseract'
TESSDATA_PREFIX = r'C:\Users\MOHITBHAT\Tesseract-OCR'
class Text_Extractor():
#Constructor
de... | 32.887097 | 85 | 0.558117 |
f330280030e5dff2708a6cabe327c1ad9fcd0221 | 3,782 | py | Python | 4-motokimura/code/spacenet7_model/transforms/augmentations.py | remtav/SpaceNet7_Multi-Temporal_Solutions | ee535c61fc22bffa45331519239c6d1b044b1514 | [
"Apache-2.0"
] | 38 | 2021-02-18T07:04:54.000Z | 2022-03-22T15:31:06.000Z | 4-motokimura/code/spacenet7_model/transforms/augmentations.py | remtav/SpaceNet7_Multi-Temporal_Solutions | ee535c61fc22bffa45331519239c6d1b044b1514 | [
"Apache-2.0"
] | 2 | 2021-02-22T18:53:19.000Z | 2021-06-22T20:28:06.000Z | 4-motokimura/code/spacenet7_model/transforms/augmentations.py | remtav/SpaceNet7_Multi-Temporal_Solutions | ee535c61fc22bffa45331519239c6d1b044b1514 | [
"Apache-2.0"
] | 15 | 2021-02-25T17:25:40.000Z | 2022-01-31T16:59:32.000Z | import functools
import random
import numpy as np
import albumentations as albu
def get_spacenet7_augmentation(config,
is_train,
tta_resize_wh=None,
tta_hflip=False,
tta_vflip=False):
"""[... | 31.256198 | 79 | 0.583289 |
b113a8c4acb34999af5eeb17660ccd7979a25b20 | 5,869 | py | Python | configs/representation/uvc_fpn_moco2/uvc-moco2_r18-fpn_coord_nc_it_l1w100_mt02_video_2x8x1_sgd_cosine_50e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/uvc_fpn_moco2/uvc-moco2_r18-fpn_coord_nc_it_l1w100_mt02_video_2x8x1_sgd_cosine_50e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | configs/representation/uvc_fpn_moco2/uvc-moco2_r18-fpn_coord_nc_it_l1w100_mt02_video_2x8x1_sgd_cosine_50e_k400_rgb.py | happywu/mmaction2-CycleContrast | 019734e471dffd1161b7a9c617ba862d2349a96c | [
"Apache-2.0"
] | null | null | null | # model settings
temperature = 0.01
with_norm = True
query_dim = 128
model = dict(
type='UVCNeckMoCoTrackerV2',
queue_dim=query_dim,
patch_queue_size=256 * 144 * 5,
backbone=dict(
type='ResNet',
pretrained=None,
depth=18,
out_indices=(0, 1, 2, 3),
# strides=(1, 2,... | 30.889474 | 78 | 0.625319 |
193a1d0576ac82362da7e227f8a019c9d120bd89 | 3,846 | py | Python | qa/rpc-tests/p2p-autoinstantsend.py | GRBcoin/GreenRenovatedBonds-Source | 4d25e446bb558bf36f46311acd2d888d77eec627 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-autoinstantsend.py | GRBcoin/GreenRenovatedBonds-Source | 4d25e446bb558bf36f46311acd2d888d77eec627 | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-autoinstantsend.py | GRBcoin/GreenRenovatedBonds-Source | 4d25e446bb558bf36f46311acd2d888d77eec627 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Dash Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import greenrenovatedbondsTestFramework
... | 38.46 | 112 | 0.705148 |
67be0954ffcdd136a2149151435eb934475af183 | 10,105 | py | Python | grr/core/grr_response_core/lib/rdfvalues/protodict_test.py | billstackpole/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2019-03-28T07:09:41.000Z | 2019-03-28T07:09:41.000Z | grr/core/grr_response_core/lib/rdfvalues/protodict_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | null | null | null | grr/core/grr_response_core/lib/rdfvalues/protodict_test.py | gingogo/grr | 203a0a99990a2d4004aed84a5cd822cbda2b418c | [
"Apache-2.0"
] | 1 | 2018-08-30T14:50:24.000Z | 2018-08-30T14:50:24.000Z | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Test protodict implementation.
An Dict is a generic dictionary implementation which has keys of type
string, and values of varying types. The Dict can be used to serialize
and transport arbitrary python dictionaries containing a limited set of value.
Di... | 32.491961 | 80 | 0.697971 |
faee560245f7c50cdc33ccc40da1c6cb77e41527 | 1,615 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/backend_proxy_contract_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 35.888889 | 94 | 0.60805 |
4bb4b007711ebede167e3e1c3b9ced0cd4fa055e | 177,313 | py | Python | google/cloud/securitycenter_v1/proto/securitycenter_service_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1/proto/securitycenter_service_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1/proto/securitycenter_service_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/securitycenter_v1/proto/securitycenter_service.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | 41.878366 | 16,064 | 0.661254 |
cd512ca887658cfe6407d9f58d1fe8ef557f2f51 | 17,929 | py | Python | tests/wallet/cc_wallet/test_trades.py | grayfallstown/cactus-blockchain | 680d68d0bb7694bd4b99e4906b356e014bca7734 | [
"Apache-2.0"
] | 1 | 2021-07-20T12:13:06.000Z | 2021-07-20T12:13:06.000Z | tests/wallet/cc_wallet/test_trades.py | grayfallstown/cactus-blockchain | 680d68d0bb7694bd4b99e4906b356e014bca7734 | [
"Apache-2.0"
] | 2 | 2022-02-27T18:07:25.000Z | 2022-03-25T19:22:44.000Z | tests/wallet/cc_wallet/test_trades.py | grayfallstown/cactus-blockchain | 680d68d0bb7694bd4b99e4906b356e014bca7734 | [
"Apache-2.0"
] | null | null | null | import asyncio
from pathlib import Path
from secrets import token_bytes
import pytest
from cactus.simulator.simulator_protocol import FarmNewBlockProtocol
from cactus.types.peer_info import PeerInfo
from cactus.util.ints import uint16, uint64
from cactus.wallet.cc_wallet.cc_wallet import CCWallet
from cactus.wallet.t... | 40.020089 | 117 | 0.713258 |
8b954146370633f0365d42e283b35e7fbb1cf5ef | 896 | py | Python | content/project-starter/utils/build_script.py | Malachov/mybuildtools | c86ccc02dd4f9e32c11a6935d7696eba8f5d0a86 | [
"MIT"
] | null | null | null | content/project-starter/utils/build_script.py | Malachov/mybuildtools | c86ccc02dd4f9e32c11a6935d7696eba8f5d0a86 | [
"MIT"
] | null | null | null | content/project-starter/utils/build_script.py | Malachov/mybuildtools | c86ccc02dd4f9e32c11a6935d7696eba8f5d0a86 | [
"MIT"
] | 1 | 2021-11-21T23:33:40.000Z | 2021-11-21T23:33:40.000Z | import mypythontools
if __name__ == "__main__":
mypythontools.build.build_app(
preset="eel",
console=True, # True if develop, False in prod
debug=True, # True if develop, False in prod
build_web=True,
cleanit=False,
icon=None, # "logo.ico"
datas=[], # E... | 25.6 | 106 | 0.473214 |
9a64ac2e1356ee2ebad62a7d674274303970699c | 8,067 | py | Python | Bioinformatics_k-mer_generator_with_Flask/venv/Lib/site-packages/Bio/Graphics/GenomeDiagram/_Feature.py | ee2110/Machine_Learning_based_web_applications | a414f3906e49003230f5440bb7f035a8d72767a6 | [
"MIT"
] | 2 | 2019-10-25T18:20:34.000Z | 2019-10-28T15:26:40.000Z | Bioinformatics_k-mer_generator_with_Flask/venv/Lib/site-packages/Bio/Graphics/GenomeDiagram/_Feature.py | ee2110/Machine_Learning_based_web_applications | a414f3906e49003230f5440bb7f035a8d72767a6 | [
"MIT"
] | null | null | null | Bioinformatics_k-mer_generator_with_Flask/venv/Lib/site-packages/Bio/Graphics/GenomeDiagram/_Feature.py | ee2110/Machine_Learning_based_web_applications | a414f3906e49003230f5440bb7f035a8d72767a6 | [
"MIT"
] | null | null | null | # Copyright 2003-2008 by Leighton Pritchard. All rights reserved.
#
# This file is part of the Biopython distribution and governed by your
# choice of the "Biopython License Agreement" or the "BSD 3-Clause License".
# Please see the LICENSE file that should have been included as part of this
# package.
#
# Contact: ... | 40.537688 | 88 | 0.623156 |
6a7af836135ae60af6226934fcd53e6a89acd4ee | 9,034 | py | Python | electrum/gui/qt/request_list.py | c4pt000/electrum-ravencoin-lite | fe0f139a3708261467beb855700f56b5fbc7c2e9 | [
"MIT"
] | null | null | null | electrum/gui/qt/request_list.py | c4pt000/electrum-ravencoin-lite | fe0f139a3708261467beb855700f56b5fbc7c2e9 | [
"MIT"
] | null | null | null | electrum/gui/qt/request_list.py | c4pt000/electrum-ravencoin-lite | fe0f139a3708261467beb855700f56b5fbc7c2e9 | [
"MIT"
] | 1 | 2021-09-15T21:25:08.000Z | 2021-09-15T21:25:08.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... | 42.815166 | 121 | 0.644233 |
0f7c740c0efd0457d4bf425d883e088e4f1f01d6 | 6,478 | py | Python | papermerge/core/views/__init__.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/views/__init__.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/views/__init__.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | from django.utils.decorators import method_decorator
from django.core.paginator import Paginator
from django.http import HttpResponseForbidden
from django.urls import reverse
from django.shortcuts import (
render,
redirect,
get_object_or_404
)
from django.utils.translation import ngettext
from django.contri... | 28.412281 | 79 | 0.534579 |
da32db0a05174de30c43e505ae6abb4e51ae7a3c | 2,125 | py | Python | bot/bot.py | 0054/alert-bot | 56d7ef5a32588dee1d6e6e617dd49e4ed1ec68ec | [
"MIT"
] | null | null | null | bot/bot.py | 0054/alert-bot | 56d7ef5a32588dee1d6e6e617dd49e4ed1ec68ec | [
"MIT"
] | null | null | null | bot/bot.py | 0054/alert-bot | 56d7ef5a32588dee1d6e6e617dd49e4ed1ec68ec | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove, Update)
from telegram.ext import (Updater, CommandHandler, MessageHandler, Filters,
ConversationHandler, CallbackContext)
from config import config
import telegram
import logging
logging.basicConfig(format='... | 45.212766 | 140 | 0.726588 |
967c7bf506503f089f9e0d59d82e9b5a6a3585f2 | 3,189 | py | Python | tests/test_inlinequery.py | jordi2326/RaccBoot | 25ab1cfdef45503936b750d378a35b2eb18a1330 | [
"Apache-2.0"
] | null | null | null | tests/test_inlinequery.py | jordi2326/RaccBoot | 25ab1cfdef45503936b750d378a35b2eb18a1330 | [
"Apache-2.0"
] | null | null | null | tests/test_inlinequery.py | jordi2326/RaccBoot | 25ab1cfdef45503936b750d378a35b2eb18a1330 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2020
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | 35.433333 | 93 | 0.654751 |
0bd82e17cf6ccfff9c69f959435889874d3d7917 | 192,824 | py | Python | leafmap/common.py | sthagen/giswqs-leafmap | be6ccdfa5450b775724547b6ef50f213c820be85 | [
"MIT"
] | null | null | null | leafmap/common.py | sthagen/giswqs-leafmap | be6ccdfa5450b775724547b6ef50f213c820be85 | [
"MIT"
] | null | null | null | leafmap/common.py | sthagen/giswqs-leafmap | be6ccdfa5450b775724547b6ef50f213c820be85 | [
"MIT"
] | null | null | null | """This module contains some common functions for both folium and ipyleaflet.
"""
import csv
import os
import requests
import shutil
import tarfile
import urllib.request
import zipfile
import folium
import ipyleaflet
import ipywidgets as widgets
import whitebox
from IPython.display import display, IFrame
class Titil... | 33.505474 | 311 | 0.622158 |
53745df93f9a6aaf89e1eceea74826256538b737 | 2,110 | py | Python | poky/meta/lib/oeqa/runtime/cases/apt.py | Eyerunmyden/HWMgmt-MegaRAC-OpenEdition | 72b03e9fc6e2a13184f1c57b8045b616db9b0a6d | [
"Apache-2.0",
"MIT"
] | 14 | 2021-11-04T07:47:37.000Z | 2022-03-21T10:10:30.000Z | poky/meta/lib/oeqa/runtime/cases/apt.py | Eyerunmyden/HWMgmt-MegaRAC-OpenEdition | 72b03e9fc6e2a13184f1c57b8045b616db9b0a6d | [
"Apache-2.0",
"MIT"
] | null | null | null | poky/meta/lib/oeqa/runtime/cases/apt.py | Eyerunmyden/HWMgmt-MegaRAC-OpenEdition | 72b03e9fc6e2a13184f1c57b8045b616db9b0a6d | [
"Apache-2.0",
"MIT"
] | 6 | 2021-11-02T10:56:19.000Z | 2022-03-06T11:58:20.000Z | #
# SPDX-License-Identifier: MIT
#
import os
from oeqa.utils.httpserver import HTTPService
from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.data import skipIfNotDataVar, skipIfNotFeature
from oeqa.runtime.decorator.package import OEHasPackage
class AptTest(OERuntimeTestCase):
def pkg(self... | 39.074074 | 137 | 0.668246 |
6b30dda9c6439e5b23ff29440934cd38b53f084a | 25,689 | py | Python | tests/hwsim/test_nfc_wps.py | rzr/wpasupplicant | 3f7ac05878ba965e941f2b5b80b8cb744e63f506 | [
"Unlicense"
] | 19 | 2015-04-02T13:50:00.000Z | 2022-01-19T02:45:18.000Z | tests/hwsim/test_nfc_wps.py | jku/hostap | a61fcc131aa6a7e396eee6a3c613001bf0475cd1 | [
"Unlicense"
] | 3 | 2016-03-16T13:46:10.000Z | 2016-08-30T12:42:52.000Z | tests/hwsim/test_nfc_wps.py | jku/hostap | a61fcc131aa6a7e396eee6a3c613001bf0475cd1 | [
"Unlicense"
] | 11 | 2015-05-18T07:37:12.000Z | 2021-11-12T10:28:50.000Z | # WPS+NFC tests
# Copyright (c) 2013, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import time
import subprocess
import logging
logger = logging.getLogger()
import hwsim_utils
import hostapd
def check_wpa2_connection(sta, ap, ssid, mi... | 48.838403 | 144 | 0.664409 |
379a1301710363521cb2b99e69b830a9e4619c9c | 114 | py | Python | ex005.py | favitoria/python123 | 99074c309b700f48ddc6aa0811a1891145281af7 | [
"MIT"
] | null | null | null | ex005.py | favitoria/python123 | 99074c309b700f48ddc6aa0811a1891145281af7 | [
"MIT"
] | null | null | null | ex005.py | favitoria/python123 | 99074c309b700f48ddc6aa0811a1891145281af7 | [
"MIT"
] | null | null | null | n = int(input('digite um numero: '))
print('O antecessor de {} é {} e o sucessor é {}'.format(n, (n-1), (n+1)))
| 22.8 | 74 | 0.561404 |
ed80bee5fd3bba268834d1c0d99d6d64fab6313a | 3,222 | py | Python | hazuchi/functions/losses.py | h-terao/hazuchi | 3f8ab6bb6d3931439368240af8fc735e3496bc1a | [
"Apache-2.0"
] | null | null | null | hazuchi/functions/losses.py | h-terao/hazuchi | 3f8ab6bb6d3931439368240af8fc735e3496bc1a | [
"Apache-2.0"
] | null | null | null | hazuchi/functions/losses.py | h-terao/hazuchi | 3f8ab6bb6d3931439368240af8fc735e3496bc1a | [
"Apache-2.0"
] | null | null | null | """A collection of loss functions. Some functions are just imported from optax.
Unlike PyTorch, all loss functions does not average arrays along the batch dimension.
Examples:
>>> import hazuchi.functions as F
>>> loss = F.l1_loss(x, y).mean()
>>> accuracy = F.accuracy(x, y).mean()
"""
from __future__ impo... | 28.513274 | 99 | 0.654252 |
12730759d286ce12678e07248b29007e3757dd67 | 1,502 | py | Python | flexget/plugins/generic/welcome.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | 1 | 2017-08-25T07:17:04.000Z | 2017-08-25T07:17:04.000Z | flexget/plugins/generic/welcome.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | 1 | 2015-11-10T01:07:54.000Z | 2015-11-10T01:07:54.000Z | flexget/plugins/generic/welcome.py | Konubinix/Flexget | 1379e346370ef144b9a02f761fc187497b6097e2 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
import os
import logging
import sys
from flexget.event import event
from flexget.utils.simple_persistence import SimplePersistence
__author__ = 'paranoidi'
log = logging.getLogger('welcome')
@event('manager.lock_acquired')
def welcome_message(mana... | 34.930233 | 102 | 0.66245 |
ce154c301959a961ece64a81a7a7117eae3e495a | 5,457 | py | Python | CondTools/Geometry/test/writehelpers/geometryrun2writer.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | CondTools/Geometry/test/writehelpers/geometryrun2writer.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 8 | 2020-03-20T23:18:36.000Z | 2020-05-27T11:00:06.000Z | CondTools/Geometry/test/writehelpers/geometryrun2writer.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("GeometryWriter")
process.load('CondCore.CondDB.CondDB_cfi')
# This will read all the little XML files and from
# that fill the DDCompactView. The modules that fill
# the reco part of the database need the DDCompactView.
process.load('Configuration.Geome... | 72.76 | 278 | 0.579439 |
8572ac8f21554559456eb3bcd0c218e6fc6c13ab | 81 | py | Python | src/stock_data_provider/cn_a/__init__.py | stonewell/learn-curve | fa712bc3d553c7600ef9f403506faaf410358e41 | [
"MIT"
] | null | null | null | src/stock_data_provider/cn_a/__init__.py | stonewell/learn-curve | fa712bc3d553c7600ef9f403506faaf410358e41 | [
"MIT"
] | null | null | null | src/stock_data_provider/cn_a/__init__.py | stonewell/learn-curve | fa712bc3d553c7600ef9f403506faaf410358e41 | [
"MIT"
] | null | null | null | #load stock data from vip data for cn_a
from .vip_dataset import load_stock_data
| 27 | 40 | 0.82716 |
ed2b4fbd8c3724edeba5b88d38eb5fbaf615461b | 1,594 | py | Python | tsutils/helper_classes.py | kary5678/tsutils | ab6ecdcd2f0e10ba19092028909b3f74bf1708a9 | [
"MIT"
] | 1 | 2021-07-28T19:41:18.000Z | 2021-07-28T19:41:18.000Z | tsutils/helper_classes.py | kary5678/tsutils | ab6ecdcd2f0e10ba19092028909b3f74bf1708a9 | [
"MIT"
] | 19 | 2020-09-14T07:55:14.000Z | 2022-03-06T17:23:14.000Z | tsutils/helper_classes.py | kary5678/tsutils | ab6ecdcd2f0e10ba19092028909b3f74bf1708a9 | [
"MIT"
] | 3 | 2020-09-14T07:47:27.000Z | 2021-09-14T02:16:33.000Z | import asyncio
import io
from abc import ABCMeta
from discord.ext.commands import CogMeta
from .enums import Server
from .errors import IndexNotLoaded
class aobject(object):
"""Base class to allow for asynchronous __init__"""
# noinspection PyTypeChecker
# noinspection PyMethodParameters
async def ... | 24.151515 | 93 | 0.636763 |
c2c99cbe5188d9823a894c3929a4e5d0bd48f2f8 | 5,945 | py | Python | eggs/nose-0.11.1-py2.7.egg/nose/proxy.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/nose-0.11.1-py2.7.egg/nose/proxy.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | null | null | null | eggs/nose-0.11.1-py2.7.egg/nose/proxy.py | bopopescu/phyG | 023f505b705ab953f502cbc55e90612047867583 | [
"CC-BY-3.0"
] | 1 | 2020-07-25T21:03:18.000Z | 2020-07-25T21:03:18.000Z | """
Result Proxy
------------
The result proxy wraps the result instance given to each test. It
performs two functions: enabling extended error/failure reporting
and calling plugins.
As each result event is fired, plugins are called with the same event;
however, plugins are called with the nose.case.Test instance tha... | 35.177515 | 77 | 0.632632 |
03dd7d1ff4d1d01f9282c8370b8f2d9abc49422b | 924 | py | Python | courses/management/commands/seed_db.py | testdrivenio/django-performance-testing | e41494ebc5a7e698a34e6c383f4055b42a0e16a9 | [
"MIT"
] | 6 | 2020-03-30T13:16:24.000Z | 2022-02-03T21:26:18.000Z | courses/management/commands/seed_db.py | testdrivenio/django-performance-testing | e41494ebc5a7e698a34e6c383f4055b42a0e16a9 | [
"MIT"
] | 3 | 2021-06-09T17:43:48.000Z | 2022-02-10T07:48:28.000Z | courses/management/commands/seed_db.py | testdrivenio/django-performance-testing | e41494ebc5a7e698a34e6c383f4055b42a0e16a9 | [
"MIT"
] | 2 | 2020-02-26T21:02:22.000Z | 2020-11-14T16:55:17.000Z | from django.core.management.base import BaseCommand
from faker import Faker
from courses.models import Author, Course
class Command(BaseCommand):
help = "Seeds the database with 10 authors and 100 courses"
def handle(self, *args, **options):
fake = Faker()
# remove existing data
Aut... | 29.806452 | 67 | 0.62013 |
b47d4e64cf8570fdf2c6560879c6da292174b675 | 12,567 | py | Python | paasta_tools/cli/cmds/validate.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | paasta_tools/cli/cmds/validate.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | paasta_tools/cli/cmds/validate.py | yuanxu-li/paasta | 5b04f45659293f873c65111a9d1d0909aeed4019 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015-2016 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 34.811634 | 113 | 0.686083 |
2f78ed41e5486503b59d9b3e98fe7123379a7554 | 833 | py | Python | ancestral/recode_zeldovich.py | Tancata/phylo | fb397c31b5cf4cea3c1513391b330e715da2d603 | [
"MIT"
] | 5 | 2020-11-02T06:23:36.000Z | 2021-09-07T01:35:35.000Z | ancestral/recode_zeldovich.py | Tancata/phylo | fb397c31b5cf4cea3c1513391b330e715da2d603 | [
"MIT"
] | 1 | 2021-11-10T13:34:23.000Z | 2021-11-10T16:53:02.000Z | ancestral/recode_zeldovich.py | Tancata/phylo | fb397c31b5cf4cea3c1513391b330e715da2d603 | [
"MIT"
] | 4 | 2018-07-17T13:35:20.000Z | 2021-07-09T18:28:44.000Z | #recode a FASTA alignment into the Zeldovich categories: 0 (non-IVYWREL), 1 (IVYWREL)
#bin1 = list('AGNPST')
#print bin1
import sys
from Bio import AlignIO
alignment = AlignIO.read(open(sys.argv[1]), "fasta")
alignment_length = alignment.get_alignment_length()
num_taxa = len(alignment)
print "#NEXUS"
print "begin dat... | 28.724138 | 86 | 0.633854 |
3f0c5a95a89913078e490a86895121bf84f37c63 | 1,966 | py | Python | venv/lib/python3.8/site-packages/vsts/models/wrapped_exception.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/models/wrapped_exception.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/models/wrapped_exception.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Generated file, DO NOT EDIT
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from msrest.serialization i... | 37.09434 | 105 | 0.571719 |
417c6aa075ecf0243713de0f459afbead401dd95 | 6,122 | py | Python | sdk/lusid/models/instrument_match.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/instrument_match.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/instrument_match.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3725
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 34.982857 | 161 | 0.646847 |
415a9c3126e20c36614e3c30059752942657466a | 43,166 | py | Python | torch/nn/modules/activation.py | shintaro-iwasaki/pytorch | d35fc409ad84c1a837e7e07ffe3f4e4942538e50 | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | torch/nn/modules/activation.py | shintaro-iwasaki/pytorch | d35fc409ad84c1a837e7e07ffe3f4e4942538e50 | [
"Intel"
] | 8 | 2020-05-17T10:23:03.000Z | 2022-02-28T12:47:56.000Z | torch/nn/modules/activation.py | shintaro-iwasaki/pytorch | d35fc409ad84c1a837e7e07ffe3f4e4942538e50 | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | import warnings
from typing import Optional, Tuple
import torch
from torch import Tensor
from .linear import NonDynamicallyQuantizableLinear
from torch.nn.init import constant_, xavier_normal_, xavier_uniform_
from torch.nn.parameter import Parameter
from .module import Module
from .. import functional as F
class Th... | 32.701515 | 129 | 0.597832 |
73445db3daca5574bb0640f54789dbe0104e56aa | 2,784 | py | Python | mangaloid_instance/sync/manager.py | a-manga-thing/instance | 55db1431ec165565afcd3b7617c7e6ada5ab5bc6 | [
"MIT"
] | 6 | 2021-03-26T21:32:00.000Z | 2021-05-04T02:20:35.000Z | mangaloid_instance/sync/manager.py | a-manga-thing/instance | 55db1431ec165565afcd3b7617c7e6ada5ab5bc6 | [
"MIT"
] | 1 | 2021-04-03T08:57:02.000Z | 2021-04-20T19:19:52.000Z | mangaloid_instance/sync/manager.py | a-manga-thing/instance | 55db1431ec165565afcd3b7617c7e6ada5ab5bc6 | [
"MIT"
] | 2 | 2021-03-27T21:06:15.000Z | 2021-03-29T12:43:27.000Z | from asyncio import Queue, get_event_loop, Lock
from .utils import create_sync_payload
from enum import Enum
from aiohttp import ClientSession
from logging import getLogger
class SyncEvents(Enum):
CREATE = 1
MODIFY = 2
DELETE = 3
class SyncItem:
def __init__(self, payload, event):
self.payload... | 32 | 98 | 0.594109 |
d9f99ccda93f0d45e8ddcb5f99fc832c52354cd2 | 2,465 | py | Python | sdk/python/pulumi_azure_native/containerservice/v20200201/list_managed_cluster_user_credentials.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerservice/v20200201/list_managed_cluster_user_credentials.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/containerservice/v20200201/list_managed_cluster_user_credentials.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 36.791045 | 184 | 0.712779 |
de94c9d898d4ace17d22daade03171a19eecf431 | 168 | py | Python | aerich/exceptions.py | ProgrammerPlus1998/aerich | 7d3eb2e1510305006cefd3e2f8a274c7d36aee99 | [
"Apache-2.0"
] | 389 | 2020-09-17T09:48:50.000Z | 2022-03-31T16:22:54.000Z | aerich/exceptions.py | ProgrammerPlus1998/aerich | 7d3eb2e1510305006cefd3e2f8a274c7d36aee99 | [
"Apache-2.0"
] | 185 | 2020-09-16T13:51:14.000Z | 2022-03-23T19:29:39.000Z | aerich/exceptions.py | ProgrammerPlus1998/aerich | 7d3eb2e1510305006cefd3e2f8a274c7d36aee99 | [
"Apache-2.0"
] | 49 | 2020-09-21T12:03:17.000Z | 2022-03-30T17:58:47.000Z | class NotSupportError(Exception):
"""
raise when features not support
"""
class DowngradeError(Exception):
"""
raise when downgrade error
"""
| 15.272727 | 35 | 0.636905 |
9dce76fe7ec604c441838b208110aae30faa0a49 | 4,743 | py | Python | groupdocs_parser_cloud/models/images_result.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | 1 | 2021-12-20T20:27:12.000Z | 2021-12-20T20:27:12.000Z | groupdocs_parser_cloud/models/images_result.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | null | null | null | groupdocs_parser_cloud/models/images_result.py | groupdocs-parser-cloud/groupdocs-parser-cloud-python | e306362857cb78b17a5dc73a3bf707cbc6876ca3 | [
"MIT"
] | 1 | 2021-09-05T17:46:05.000Z | 2021-09-05T17:46:05.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd" file="ImagesResult.py">
# Copyright (c) 2003-2019 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# o... | 30.403846 | 85 | 0.563989 |
ef9f38bbf516839b94b893c8ff0b8452b20545cc | 6,074 | py | Python | pandas/_typing.py | aiudirog/pandas | 58059c152ccf8a714eb3233f13ed22987eb42b44 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 5 | 2019-04-02T06:05:23.000Z | 2022-01-07T02:03:50.000Z | pandas/_typing.py | aiudirog/pandas | 58059c152ccf8a714eb3233f13ed22987eb42b44 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-06-12T00:39:35.000Z | 2021-06-12T00:39:36.000Z | pandas/_typing.py | aiudirog/pandas | 58059c152ccf8a714eb3233f13ed22987eb42b44 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-06-17T12:55:16.000Z | 2022-02-24T21:46:27.000Z | from datetime import (
datetime,
timedelta,
tzinfo,
)
from io import (
BufferedIOBase,
RawIOBase,
TextIOBase,
TextIOWrapper,
)
from mmap import mmap
from os import PathLike
from typing import (
IO,
TYPE_CHECKING,
Any,
AnyStr,
Callable,
Collection,
Dict,
Hashab... | 28.78673 | 86 | 0.729832 |
4e82c6cbfbc190346c7b2181d5b5bab4ad191bdc | 350 | py | Python | Task1E.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | null | null | null | Task1E.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | null | null | null | Task1E.py | AyanShoaib/flood-warning-project-72 | 84a9b24ad6d22b177d3d5d7c4a1c780ea7d48949 | [
"MIT"
] | 1 | 2022-02-03T17:04:14.000Z | 2022-02-03T17:04:14.000Z | from floodsystem.stationdata import build_station_list
from floodsystem.geo import rivers_by_station_number
def RiverByStationNumber():
stations = build_station_list()
print(rivers_by_station_number(stations, 9))
if __name__ == "__main__":
print("*** Task 1E: CUED Part IA Flood Warning System ***")
... | 21.875 | 63 | 0.748571 |
713267f5115d9d85085bb5b5dfaedde23844e74f | 1,986 | py | Python | research/slim/datasets/dataset_factory.py | qilei123/iMaterialist_challenge | 75ba3bc8777fd93f6057e3448148db1f14fe6c8c | [
"Apache-2.0"
] | null | null | null | research/slim/datasets/dataset_factory.py | qilei123/iMaterialist_challenge | 75ba3bc8777fd93f6057e3448148db1f14fe6c8c | [
"Apache-2.0"
] | null | null | null | research/slim/datasets/dataset_factory.py | qilei123/iMaterialist_challenge | 75ba3bc8777fd93f6057e3448148db1f14fe6c8c | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 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... | 33.1 | 80 | 0.711984 |
5cd89e51d6f8a80c70f883ba538b243f9e39f556 | 43,513 | py | Python | newapp/newapp.py | jakeogh/newapp | 3849f0e11eb4340e62f071c11d4c88dbd526a485 | [
"MIT"
] | null | null | null | newapp/newapp.py | jakeogh/newapp | 3849f0e11eb4340e62f071c11d4c88dbd526a485 | [
"MIT"
] | null | null | null | newapp/newapp.py | jakeogh/newapp | 3849f0e11eb4340e62f071c11d4c88dbd526a485 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# flake8: noqa
# pylint: disable=C0111 # docstrings are always outdated and wrong
# pylint: disable=W0511 # todo is encouraged
# pylint: disable=C0301 # line too long
# pylint: disable=R0902 # too many instance attributes
# pylint: disable=C0302 # too many lines in mo... | 34.866186 | 137 | 0.521844 |
9e6b7d780409ab4b7b22a59025667e65c420546e | 13,010 | py | Python | python/run-tests.py | geremih/spark | b50649d745b712af5327ebe0480df7383e1776fb | [
"Apache-2.0"
] | null | null | null | python/run-tests.py | geremih/spark | b50649d745b712af5327ebe0480df7383e1776fb | [
"Apache-2.0"
] | null | null | null | python/run-tests.py | geremih/spark | b50649d745b712af5327ebe0480df7383e1776fb | [
"Apache-2.0"
] | null | null | null | #!/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... | 40.783699 | 100 | 0.644658 |
daa8a18aae72cf201c52aafb557a89b30efd9dc9 | 3,482 | py | Python | tests/test_delete.py | ohsu-qin/eve-mongoengine | fe355007d2e73b51097029b29a474bd336660d46 | [
"BSD-2-Clause"
] | 22 | 2015-05-14T18:24:28.000Z | 2022-02-27T20:16:03.000Z | tests/test_delete.py | ohsu-qin/eve-mongoengine | fe355007d2e73b51097029b29a474bd336660d46 | [
"BSD-2-Clause"
] | 8 | 2015-06-18T07:53:47.000Z | 2018-03-07T13:27:01.000Z | tests/test_delete.py | ohsu-qin/eve-mongoengine | fe355007d2e73b51097029b29a474bd336660d46 | [
"BSD-2-Clause"
] | 21 | 2015-06-25T17:11:04.000Z | 2022-03-26T09:32:13.000Z | import unittest
from eve.utils import config
from tests import BaseTest, SimpleDoc, ComplexDoc
class TestHttpDelete(BaseTest, unittest.TestCase):
def setUp(self):
response = self.client.post('/simpledoc/',
data='[{"a": "jimmy", "b": 23}, {"a": "steve", "b": 77}]',
content_type='a... | 37.847826 | 80 | 0.610281 |
e1e839787d751e565b346c7c50572359edc19947 | 1,961 | py | Python | helper_scripts/generate-chord.py | bestvibes/guitab | b3491bab9bc7390eb3722ada44e0284731abf521 | [
"MIT"
] | 1 | 2022-03-02T09:36:28.000Z | 2022-03-02T09:36:28.000Z | helper_scripts/generate-chord.py | bestvibes/guitab | b3491bab9bc7390eb3722ada44e0284731abf521 | [
"MIT"
] | 3 | 2020-02-12T00:40:58.000Z | 2021-06-10T20:15:45.000Z | helper_scripts/generate-chord.py | bestvibes/guitab | b3491bab9bc7390eb3722ada44e0284731abf521 | [
"MIT"
] | 2 | 2020-09-23T16:26:46.000Z | 2022-02-16T23:57:39.000Z | """
Given a directory of audio files, specify a tab notation
for a chord to generate an audio file of that chord.
Warning: VERY HACKY. Clean code ASAP.
"""
#!/usr/bin/env python
import pydub
import os
# Array showing guitar string's relative pitches, in semi-tones, with "0" being low E
# ["Low E", "A", "D", "G", "B... | 22.033708 | 93 | 0.561958 |
a26cf15b127cd55b2800c9b3644209fbea88b3ec | 739 | py | Python | StringVariablesLesson.py | andreworlov91/PyProj | 489fe5c1f4fb3794e68b807e0004fca10990dc2f | [
"Apache-2.0"
] | null | null | null | StringVariablesLesson.py | andreworlov91/PyProj | 489fe5c1f4fb3794e68b807e0004fca10990dc2f | [
"Apache-2.0"
] | null | null | null | StringVariablesLesson.py | andreworlov91/PyProj | 489fe5c1f4fb3794e68b807e0004fca10990dc2f | [
"Apache-2.0"
] | null | null | null | # ---------------------------------------
# Program by Orlov.A.
#
#
# Version Date Info
# 1.0 2016 Initial Version
#
# ----------------------------------------
name = "vAsya pupkin"
print(name.title()) # сделает заглавными первые буквы, остальными маленькие
print(name.upper()) # сделает всё заглавны... | 32.130435 | 75 | 0.615697 |
3879459c2423da346c5d1e21b11e2f336612d51c | 10,604 | py | Python | nmos-test.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | nmos-test.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | nmos-test.py | garethsb-sony/nmos-testing | 2436972ff495c5942bb29cd0f440cb848eb04ccd | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Riedel Communications GmbH & Co. KG
#
# Modifications Copyright 2018 British Broadcasting Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | 38.56 | 121 | 0.548189 |
40301479995d133f6d1c488cb3f6880c3e7f2feb | 1,833 | py | Python | aries_cloudagent/protocols/didexchange/v1_0/handlers/request_handler.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/didexchange/v1_0/handlers/request_handler.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | 22 | 2021-02-13T18:48:53.000Z | 2021-04-27T07:29:50.000Z | aries_cloudagent/protocols/didexchange/v1_0/handlers/request_handler.py | brianorwhatever/aries-cloudagent-python | 9eb97df5956ed1156e6de353d87455b8df952483 | [
"Apache-2.0"
] | 2 | 2021-02-19T17:53:37.000Z | 2021-02-19T17:56:48.000Z | """Connection request handler under RFC 23 (DID exchange)."""
from .....messaging.base_handler import BaseHandler, BaseResponder, RequestContext
from ..manager import DIDXManager, DIDXManagerError
from ..messages.request import DIDXRequest
from ..messages.problem_report import ProblemReport
class DIDXRequestHandler... | 39 | 83 | 0.6012 |
591a93997d0778165c9207b9bfedcb273eedb90b | 5,528 | py | Python | tests/test_02_dxf_graphics/test_249_boundary_paths.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 515 | 2017-01-25T05:46:52.000Z | 2022-03-29T09:52:27.000Z | tests/test_02_dxf_graphics/test_249_boundary_paths.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 417 | 2017-01-25T10:01:17.000Z | 2022-03-29T09:22:04.000Z | tests/test_02_dxf_graphics/test_249_boundary_paths.py | jkjt/ezdxf | 2acc5611b81476ea16b98063b9f55446a9182b81 | [
"MIT"
] | 149 | 2017-02-01T15:52:02.000Z | 2022-03-17T10:33:38.000Z | # Copyright (c) 2021, Manfred Moitzi
# License: MIT License
import pytest
from ezdxf.math import Vec3
from ezdxf.entities import BoundaryPaths, BoundaryPathType, EdgeType
def test_add_polyline_path():
paths = BoundaryPaths()
new_path = paths.add_polyline_path([(0, 0), (0, 1), (1, 1), (1, 0)])
assert ne... | 29.72043 | 79 | 0.63314 |
7f7bae9bf570fe15a409fc7ea3be388785c250bb | 989 | py | Python | corefgraph/output/trainwriter.py | josubg/CorefGraph | 83c72386649937aa50c17b7960ba42bf08d39eb8 | [
"Apache-2.0"
] | null | null | null | corefgraph/output/trainwriter.py | josubg/CorefGraph | 83c72386649937aa50c17b7960ba42bf08d39eb8 | [
"Apache-2.0"
] | 1 | 2020-04-15T16:10:50.000Z | 2020-04-15T16:10:50.000Z | corefgraph/output/trainwriter.py | josubg/CorefGraph | 83c72386649937aa50c17b7960ba42bf08d39eb8 | [
"Apache-2.0"
] | 1 | 2021-03-10T21:54:51.000Z | 2021-03-10T21:54:51.000Z | # coding=utf-8
""" Conll format document writer,
Not all columns filled with real data, some always contains '-'.
"""
from .basewriter import BaseDocument
from pickle import dump
__author__ = 'Josu Bermudez <josu.bermudez@deusto.es>'
class TrainDocument(BaseDocument):
""" Store the results into a plain text ... | 29.088235 | 83 | 0.656218 |
e0fb5cab25f1409645052b24ff78664e54349c65 | 7,936 | py | Python | src/fastq_filter/__init__.py | LUMC/fastq-filter | e752e43daa9a263008e5352a3f7eccb58ccb6fe8 | [
"MIT"
] | null | null | null | src/fastq_filter/__init__.py | LUMC/fastq-filter | e752e43daa9a263008e5352a3f7eccb58ccb6fe8 | [
"MIT"
] | 5 | 2021-11-05T15:10:26.000Z | 2021-12-29T08:03:49.000Z | src/fastq_filter/__init__.py | LUMC/fastq-filter | e752e43daa9a263008e5352a3f7eccb58ccb6fe8 | [
"MIT"
] | 1 | 2021-09-13T09:39:53.000Z | 2021-09-13T09:39:53.000Z | # Copyright (c) 2021 Leiden University Medical Center
#
# 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, me... | 44.088889 | 79 | 0.668221 |
e8cd44699c18a83a480293b88c3d49560cb06295 | 884 | py | Python | core/src/trezor/messages/MoneroLiveRefreshStepRequest.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | null | null | null | core/src/trezor/messages/MoneroLiveRefreshStepRequest.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 1 | 2019-02-08T00:22:42.000Z | 2019-02-13T09:41:54.000Z | core/src/trezor/messages/MoneroLiveRefreshStepRequest.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 2 | 2019-02-07T23:57:09.000Z | 2020-10-21T07:07:27.000Z | # Automatically generated by pb2py
# fmt: off
import protobuf as p
class MoneroLiveRefreshStepRequest(p.MessageType):
MESSAGE_WIRE_TYPE = 554
def __init__(
self,
out_key: bytes = None,
recv_deriv: bytes = None,
real_out_idx: int = None,
sub_addr_major: int = None,
... | 27.625 | 52 | 0.590498 |
641a9bd4c611efb3e033e2045b497c43bc80c2d5 | 5,168 | py | Python | tests/sampletest/hellotest.py | molayxu/QTAF | a036a22b7baa10214baa60954154bb865c98e44f | [
"BSD-3-Clause"
] | 452 | 2016-09-27T11:21:00.000Z | 2022-03-31T06:11:30.000Z | tests/sampletest/hellotest.py | molayxu/QTAF | a036a22b7baa10214baa60954154bb865c98e44f | [
"BSD-3-Clause"
] | 39 | 2016-09-29T06:14:04.000Z | 2022-03-22T04:24:36.000Z | tests/sampletest/hellotest.py | molayxu/QTAF | a036a22b7baa10214baa60954154bb865c98e44f | [
"BSD-3-Clause"
] | 129 | 2016-09-27T11:28:42.000Z | 2022-03-17T09:05:16.000Z | # -*- coding: utf-8 -*-
'''
模块描述
'''
import os
import sys
import threading
import time
import testbase
from testbase import logger
from testbase import context
from testbase.datadrive import DataDrive
from testbase.testresult import EnumLogLevel
from testbase.util import codecs_open
def _some_thread():
logger.inf... | 26.916667 | 143 | 0.637964 |
a51ba9c7446e5d8f642e526d0b6142ca9a1d254e | 1,260 | py | Python | recipe_scrapers/kitchn.py | p-isso/recipe-scrapers | dbb63daff1caaa773a41d57054d49cf31cc14360 | [
"MIT"
] | null | null | null | recipe_scrapers/kitchn.py | p-isso/recipe-scrapers | dbb63daff1caaa773a41d57054d49cf31cc14360 | [
"MIT"
] | null | null | null | recipe_scrapers/kitchn.py | p-isso/recipe-scrapers | dbb63daff1caaa773a41d57054d49cf31cc14360 | [
"MIT"
] | null | null | null | from ._abstract import AbstractScraper
from ._utils import get_minutes, normalize_string, get_yields
class Kitchn(AbstractScraper):
@classmethod
def host(self):
return 'thekitchn.com'
def title(self):
return self.soup.find(
'h2',
{'class': 'Recipe__title'}
... | 23.773585 | 66 | 0.534921 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.