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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ae34666b723061be80352705629ca5b56c7bdea1 | 202 | py | Python | nomadgram/users/tests/test_models.py | tonky0110/nomadgram | 2a203a91598156c91b546ff1c4c67e14ca54df6d | [
"MIT"
] | null | null | null | nomadgram/users/tests/test_models.py | tonky0110/nomadgram | 2a203a91598156c91b546ff1c4c67e14ca54df6d | [
"MIT"
] | 9 | 2021-03-10T10:00:53.000Z | 2022-02-18T22:00:51.000Z | nomadgram/users/tests/test_models.py | tonky0110/nomadgram | 2a203a91598156c91b546ff1c4c67e14ca54df6d | [
"MIT"
] | null | null | null | import pytest
from nomadgram.users.models import User
pytestmark = pytest.mark.django_db
def test_user_get_absolute_url(user: User):
assert user.get_absolute_url() == f"/users/{user.username}/"
| 20.2 | 64 | 0.772277 |
2912c10e05e938bf94ca6acec458e0e104495cce | 299 | py | Python | app/errors/handlers.py | MicroprocessorX069/Todo-web-app | c68f2e26eec1c89ab2257a22071133216c743ca0 | [
"Apache-2.0"
] | null | null | null | app/errors/handlers.py | MicroprocessorX069/Todo-web-app | c68f2e26eec1c89ab2257a22071133216c743ca0 | [
"Apache-2.0"
] | 1 | 2021-06-02T00:55:48.000Z | 2021-06-02T00:55:48.000Z | app/errors/handlers.py | MicroprocessorX069/Todo-web-app | c68f2e26eec1c89ab2257a22071133216c743ca0 | [
"Apache-2.0"
] | null | null | null | from flask import render_template
from app import db
from app.errors import bp
@bp.errorhandler(404)
def not_found_error(error):
return render_template('errors/404.html'), 404
@bp.errorhandler(500)
def internal_error(error):
db.session.rollback()
return render_template('errors/500.html'), 500
| 23 | 47 | 0.789298 |
caae1b7c4f85356f1c31fa560be5a95a2357b1ff | 51,489 | py | Python | Lib/test/test_fstring.py | pxeger/cpython | 959580bd9ff8824590e8b24895bc2276f3f10b35 | [
"0BSD"
] | 12 | 2021-04-22T14:52:17.000Z | 2021-12-21T12:51:31.000Z | Lib/test/test_fstring.py | pxeger/cpython | 959580bd9ff8824590e8b24895bc2276f3f10b35 | [
"0BSD"
] | 31 | 2017-09-04T16:47:24.000Z | 2022-03-01T10:01:34.000Z | Lib/test/test_fstring.py | pxeger/cpython | 959580bd9ff8824590e8b24895bc2276f3f10b35 | [
"0BSD"
] | 5 | 2021-04-25T22:26:29.000Z | 2022-01-25T22:22:30.000Z | # -*- coding: utf-8 -*-
# There are tests here with unicode string literals and
# identifiers. There's a code in ast.c that was added because of a
# failure with a non-ascii-only expression. So, I have tests for
# that. There are workarounds that would let me run tests for that
# code without unicode identifiers and ... | 39.944919 | 150 | 0.51209 |
99480bb5ac64179bb0ba039a6d07cc47d73af0d8 | 3,090 | py | Python | application/migrations/0006_auto_20141218_1524.py | dhosterman/hebrew_order_david | c86a83c9e3e1e22dd0427c7c03525f2503fff574 | [
"MIT"
] | null | null | null | application/migrations/0006_auto_20141218_1524.py | dhosterman/hebrew_order_david | c86a83c9e3e1e22dd0427c7c03525f2503fff574 | [
"MIT"
] | null | null | null | application/migrations/0006_auto_20141218_1524.py | dhosterman/hebrew_order_david | c86a83c9e3e1e22dd0427c7c03525f2503fff574 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('application', '0005_remove_contactdetails_email'),
]
operations = [
migrations.AddField(
model_name='contactdeta... | 31.212121 | 60 | 0.565696 |
c859272fe3606142e41fef19e4bdb41c4de60aa5 | 2,559 | py | Python | datamart_isi/joiners/joiner_base.py | usc-isi-i2/datamart-user-end | b3111d67d3c9a7f69885e44b4645724f9a629c19 | [
"MIT"
] | 1 | 2020-09-19T14:51:14.000Z | 2020-09-19T14:51:14.000Z | datamart_isi/joiners/joiner_base.py | usc-isi-i2/datamart-user-end | b3111d67d3c9a7f69885e44b4645724f9a629c19 | [
"MIT"
] | null | null | null | datamart_isi/joiners/joiner_base.py | usc-isi-i2/datamart-user-end | b3111d67d3c9a7f69885e44b4645724f9a629c19 | [
"MIT"
] | 1 | 2020-11-06T22:52:30.000Z | 2020-11-06T22:52:30.000Z | from abc import ABC, abstractmethod
import pandas as pd
from enum import Enum
import typing
from datamart_isi.joiners.join_result import JoinResult
class JoinerBase(ABC):
"""Abstract class of Joiner, should be extended for other joiners.
"""
@abstractmethod
def join(self, **kwargs) -> JoinResult:
... | 27.516129 | 120 | 0.619383 |
e287a6f55ade8a93f03aa520d54d685012a69f55 | 69,970 | py | Python | django/db/models/sql/compiler.py | smjreynolds/django | b9db423d3c525697ad59b14c0dcaaccf2770d062 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-02-07T07:16:02.000Z | 2020-02-07T07:16:02.000Z | django/db/models/sql/compiler.py | smjreynolds/django | b9db423d3c525697ad59b14c0dcaaccf2770d062 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | django/db/models/sql/compiler.py | smjreynolds/django | b9db423d3c525697ad59b14c0dcaaccf2770d062 | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-26T09:40:10.000Z | 2020-10-26T09:40:10.000Z | import collections
import re
from itertools import chain
from django.core.exceptions import EmptyResultSet, FieldError
from django.db.models.constants import LOOKUP_SEP
from django.db.models.expressions import OrderBy, Random, RawSQL, Ref, Value
from django.db.models.functions import Cast
from django.db.models.query_u... | 45.8519 | 118 | 0.572288 |
ddc7aa53f8b28903e8c9c0dc37dd8e09ee1d6061 | 14,378 | py | Python | test/test_geometry.py | robustrobotics/forgg | 97fc0896dfe4522156a42b8eddb641216149c5ff | [
"MIT"
] | 4 | 2016-12-06T19:23:09.000Z | 2022-02-14T07:06:24.000Z | test/test_geometry.py | robustrobotics/forgg | 97fc0896dfe4522156a42b8eddb641216149c5ff | [
"MIT"
] | null | null | null | test/test_geometry.py | robustrobotics/forgg | 97fc0896dfe4522156a42b8eddb641216149c5ff | [
"MIT"
] | null | null | null | """Tests for geometry module"""
import numpy
import Box2D.b2 as b2
import shapely.geometry
import shapely.ops
import metis
from metis.debug import graphical_debug, draw_polygon, draw_polygons
def example_shapes():
"""Generate example shapes for testing"""
obstacle_geometry = shapely.geometry.box(0, 0, 10, 1... | 45.0721 | 83 | 0.65475 |
a456bf25893a3c8e5aeb35029dae77e5e32ceb42 | 14,205 | py | Python | tests/unit/test_utils.py | stepnem/tmt | 1f2ecdaa6a4b0429e5eea77143057ef1143e17a3 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | stepnem/tmt | 1f2ecdaa6a4b0429e5eea77143057ef1143e17a3 | [
"MIT"
] | null | null | null | tests/unit/test_utils.py | stepnem/tmt | 1f2ecdaa6a4b0429e5eea77143057ef1143e17a3 | [
"MIT"
] | null | null | null | # coding: utf-8
import re
import tmt
import unittest
import pytest
from tmt.utils import (StructuredField, StructuredFieldError, public_git_url,
listify, duration_to_seconds)
def test_public_git_url():
""" Verify url conversion """
examples = [
{
'original': 'git@... | 39.132231 | 78 | 0.575079 |
1f128326d4eb93f1dec22528128bd0e7da22c1c6 | 1,267 | py | Python | host/function/list_clouds.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 2 | 2020-04-15T11:20:59.000Z | 2021-05-12T13:01:36.000Z | host/function/list_clouds.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-06-05T04:48:56.000Z | 2018-06-05T04:48:56.000Z | host/function/list_clouds.py | zadjii/nebula | 50c4ec019c9f7eb15fe105a6c53a8a12880e281c | [
"MIT"
] | 1 | 2018-08-15T06:45:46.000Z | 2018-08-15T06:45:46.000Z | from common.BaseCommand import BaseCommand
from common_util import Success
from host import Cloud
__author__ = 'zadjii'
################################################################################
class ListCloudsCommand(BaseCommand):
def add_parser(self, subparsers):
list_clouds = subparsers.add_par... | 39.59375 | 97 | 0.469613 |
7f5125d14410e5153f3374915806b332bb8d09df | 6,293 | py | Python | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/cs_interpolator.py | ignaciotb/uuv_simulator | b3c46ef713dbcca615627d9f537c88edc8ad8f95 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-11-10T08:59:19.000Z | 2021-11-10T08:59:19.000Z | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/cs_interpolator.py | ignaciotb/uuv_simulator | b3c46ef713dbcca615627d9f537c88edc8ad8f95 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2019-06-13T10:58:38.000Z | 2019-09-24T14:09:05.000Z | uuv_control/uuv_trajectory_control/src/uuv_trajectory_generator/path_generator/cs_interpolator.py | ignaciotb/uuv_simulator | b3c46ef713dbcca615627d9f537c88edc8ad8f95 | [
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2017-10-24T15:02:53.000Z | 2019-04-02T15:14:58.000Z | # Copyright (c) 2016 The UUV Simulator 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 b... | 38.371951 | 112 | 0.606547 |
930e6b981f2e5cbb8159c600139875223f00a2cc | 1,419 | py | Python | azure-mgmt-compute/azure/mgmt/compute/models/virtual_machine_image_resource.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-mgmt-compute/azure/mgmt/compute/models/virtual_machine_image_resource.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-mgmt-compute/azure/mgmt/compute/models/virtual_machine_image_resource.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 31.533333 | 76 | 0.561663 |
2ddd1b0582bd08b8943daa0c8dbc3a926e0a1904 | 7,844 | py | Python | dan_tools.py | alicechi2/LargeScaleCoverSongId | d33a8425ce8761f09537d657d29c0e4b87e05249 | [
"MIT"
] | 35 | 2015-07-08T17:51:08.000Z | 2021-12-24T07:28:49.000Z | dan_tools.py | alicechi2/LargeScaleCoverSongId | d33a8425ce8761f09537d657d29c0e4b87e05249 | [
"MIT"
] | 1 | 2017-08-07T13:37:05.000Z | 2017-08-07T13:37:05.000Z | dan_tools.py | alicechi2/LargeScaleCoverSongId | d33a8425ce8761f09537d657d29c0e4b87e05249 | [
"MIT"
] | 8 | 2016-07-27T08:46:44.000Z | 2020-11-12T02:45:56.000Z | """
Translation of Dan Ellis' MATLAB tools
----
Author:
Thierry Bertin-Mahieux (tb2332@columbia.edu)
----
License:
This code is distributed under the GNU LESSER PUBLIC LICENSE
(LGPL, see www.gnu.org).
Copyright (c) 2012-2013 MARL@NYU.
All rights reserved.
Redistribution and use in source and binary forms, with or... | 33.097046 | 75 | 0.655405 |
2a45207cbff1f411b8d461d456269d3945175dda | 7,262 | py | Python | sdk/python/feast/job.py | fossabot/feast | 0c0b50927ce023315e25edba16b0f573431ef2d8 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/job.py | fossabot/feast | 0c0b50927ce023315e25edba16b0f573431ef2d8 | [
"Apache-2.0"
] | 6 | 2020-10-26T17:50:33.000Z | 2022-02-10T02:01:28.000Z | sdk/python/feast/job.py | fossabot/feast | 0c0b50927ce023315e25edba16b0f573431ef2d8 | [
"Apache-2.0"
] | 1 | 2022-01-08T12:05:29.000Z | 2022-01-08T12:05:29.000Z | from typing import List
from urllib.parse import urlparse
import fastavro
import grpc
import pandas as pd
from feast.constants import CONFIG_TIMEOUT_KEY
from feast.constants import FEAST_DEFAULT_OPTIONS as defaults
from feast.serving.ServingService_pb2 import (
DATA_FORMAT_AVRO,
JOB_STATUS_DONE,
GetJobReq... | 33.776744 | 108 | 0.630543 |
9a997791ceab3be6f77653ecd1e7b85602f11517 | 1,209 | py | Python | adhoc/export_users.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2016-01-26T08:09:59.000Z | 2019-03-23T23:27:07.000Z | adhoc/export_users.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2016-02-16T03:36:14.000Z | 2020-05-04T16:19:00.000Z | adhoc/export_users.py | lund5000/chirpradio | e084d53e92d897766ac19fe85eeabad68a1d7e39 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2016-04-16T02:51:35.000Z | 2021-12-06T19:25:15.000Z | from sqlite3 import dbapi2 as sqlite
import csv
import optparse
def main():
p = optparse.OptionParser(usage='%prog [options] path/to/chirp.db')
(options, args) = p.parse_args()
if len(args) != 1:
p.error('incorrect args')
chirp_db = args[0]
connection = sqlite.connect(chirp_db)
... | 30.225 | 78 | 0.583127 |
24a7cb64926371d5a91edb1ffeaf8bf7917bfc13 | 362 | py | Python | nltkma/test/childes_fixt.py | aydtmiri/nltk-ma | 5d7dd01844ee063fc910a648948624b6a2dddaf9 | [
"Apache-2.0"
] | null | null | null | nltkma/test/childes_fixt.py | aydtmiri/nltk-ma | 5d7dd01844ee063fc910a648948624b6a2dddaf9 | [
"Apache-2.0"
] | null | null | null | nltkma/test/childes_fixt.py | aydtmiri/nltk-ma | 5d7dd01844ee063fc910a648948624b6a2dddaf9 | [
"Apache-2.0"
] | null | null | null | def setup_module():
import pytest
import nltkma.data
try:
nltkma.data.find("corpora/childes/data-xml/Eng-USA-MOR/")
except LookupError as e:
pytest.skip(
"The CHILDES corpus is not found. "
"It should be manually downloaded and saved/unpacked "
"to [N... | 27.846154 | 66 | 0.604972 |
a44b7c40401fef1d4bf34e86f2907fc50eb799ad | 3,780 | py | Python | Experiments/STMeta/Runner_singleGraph.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | 2 | 2020-07-07T14:17:38.000Z | 2020-07-07T14:17:41.000Z | Experiments/STMeta/Runner_singleGraph.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | null | null | null | Experiments/STMeta/Runner_singleGraph.py | nj-czy/UCTB | bddb8b47953bef1f44cb06f1a57a3d7efbd31c3a | [
"MIT"
] | null | null | null | import os
#############################################
# BenchMark Bike
#############################################
########### NYC ###########
# os.system('python STMeta_Obj.py -m STMeta_v3.model.yml -d bike_nyc.data.yml '
# '-p graph:Distance,MergeIndex:12')
# os.system('python STMeta_Obj.py -m STMeta... | 41.538462 | 86 | 0.583598 |
ad75655e5357363044223fb7a21416f29d670b41 | 6,258 | py | Python | opfunu/cec/cec2005/F24.py | ElliottP-13/opfunu | 7f4de3c34a91bb37fd8784fd28dbcf550e06d8a7 | [
"MIT"
] | 28 | 2020-09-12T09:19:49.000Z | 2022-03-25T07:25:01.000Z | opfunu/cec/cec2005/F24.py | ElliottP-13/opfunu | 7f4de3c34a91bb37fd8784fd28dbcf550e06d8a7 | [
"MIT"
] | 2 | 2020-05-22T10:16:02.000Z | 2020-08-06T15:46:39.000Z | opfunu/cec/cec2005/F24.py | ElliottP-13/opfunu | 7f4de3c34a91bb37fd8784fd28dbcf550e06d8a7 | [
"MIT"
] | 11 | 2020-02-16T05:00:49.000Z | 2020-07-21T19:40:18.000Z | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu Nguyen" at 20:31, 20/04/2020 %
# ... | 40.901961 | 133 | 0.494247 |
ce300040f4385552ae97d6d20b8bfc24f2a63579 | 7,493 | py | Python | qiskit/circuit/library/standard_gates/swap.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2021-07-06T09:07:47.000Z | 2021-07-06T09:07:47.000Z | qiskit/circuit/library/standard_gates/swap.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | 1 | 2019-10-03T12:22:41.000Z | 2019-10-03T12:22:41.000Z | qiskit/circuit/library/standard_gates/swap.py | Elliot-Coupe/qiskit-terra | 8a604e156ba4c2fa099b1c24cd941f59b9408398 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# 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 wo... | 29.972 | 99 | 0.472708 |
aeaf7eafe25aab1c66858f493c0b24bea6386b20 | 810 | py | Python | setup.py | Guilouf/AgenDjang | bc6c0afcf3f8b71b4bac9a4477294329a729faeb | [
"Apache-2.0"
] | null | null | null | setup.py | Guilouf/AgenDjang | bc6c0afcf3f8b71b4bac9a4477294329a729faeb | [
"Apache-2.0"
] | 24 | 2017-11-19T16:42:19.000Z | 2021-12-28T14:41:23.000Z | setup.py | Guilouf/AgenDjang | bc6c0afcf3f8b71b4bac9a4477294329a729faeb | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
from pathlib import Path
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setup(
name='django-agendjang',
version='1.0.3',
packages=['agendjang', 'agendjang.migrations', 'agendjang.static', 'agendjang.templates'],
packag... | 35.217391 | 95 | 0.709877 |
2dd5b719d0489694ef7e11d88a03374d2e4faf6f | 12,501 | py | Python | tests/kafkatest/tests/core/upgrade_test.py | sknop/kafka | 2bf16e59840faec0536f794e81bd94631a442890 | [
"Apache-2.0"
] | 2 | 2021-01-20T05:10:46.000Z | 2021-04-01T14:21:28.000Z | tests/kafkatest/tests/core/upgrade_test.py | sknop/kafka | 2bf16e59840faec0536f794e81bd94631a442890 | [
"Apache-2.0"
] | 1 | 2019-07-30T21:04:27.000Z | 2019-07-31T16:38:51.000Z | tests/kafkatest/tests/core/upgrade_test.py | sknop/kafka | 2bf16e59840faec0536f794e81bd94631a442890 | [
"Apache-2.0"
] | 3 | 2018-07-11T16:56:43.000Z | 2019-04-19T23:58:24.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 67.209677 | 296 | 0.739941 |
30ad931396a135a7f19e43dad5ac72aef215bcc8 | 916 | py | Python | spacy/lang/tl/__init__.py | gandersen101/spaCy | 109849bd311490f17a29b320cb032e43d153f36f | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | spacy/lang/tl/__init__.py | gandersen101/spaCy | 109849bd311490f17a29b320cb032e43d153f36f | [
"MIT"
] | 4 | 2021-06-02T00:49:27.000Z | 2022-01-13T01:59:34.000Z | spacy/lang/tl/__init__.py | gandersen101/spaCy | 109849bd311490f17a29b320cb032e43d153f36f | [
"MIT"
] | 2 | 2020-02-15T18:33:35.000Z | 2022-02-13T14:11:41.000Z | # coding: utf8
from __future__ import unicode_literals
from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
from .stop_words import STOP_WORDS
from .lex_attrs import LEX_ATTRS
from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ..norm_exceptions import BASE_NORMS
from ...language import Language
from ...attrs im... | 26.171429 | 76 | 0.779476 |
ce4b8b27a51a97c5144780812dd366f29b744a19 | 3,063 | py | Python | homeassistant/components/intent_script/__init__.py | joopert/home-assistant | a3f6fbb3774004b15c397c0556f98c5f7a59cb22 | [
"Apache-2.0"
] | 3 | 2020-10-23T14:39:11.000Z | 2021-02-17T14:40:17.000Z | homeassistant/components/intent_script/__init__.py | joopert/home-assistant | a3f6fbb3774004b15c397c0556f98c5f7a59cb22 | [
"Apache-2.0"
] | 3 | 2021-02-08T20:54:46.000Z | 2021-09-08T02:30:04.000Z | homeassistant/components/intent_script/__init__.py | joopert/home-assistant | a3f6fbb3774004b15c397c0556f98c5f7a59cb22 | [
"Apache-2.0"
] | 4 | 2020-05-30T08:19:47.000Z | 2021-05-14T11:39:19.000Z | """Handle intents with scripts."""
import copy
import logging
import voluptuous as vol
from homeassistant.helpers import intent, template, script, config_validation as cv
DOMAIN = "intent_script"
CONF_INTENTS = "intents"
CONF_SPEECH = "speech"
CONF_ACTION = "action"
CONF_CARD = "card"
CONF_TYPE = "type"
CONF_TITLE... | 29.451923 | 83 | 0.599412 |
3a6b95218d102c4cc185627569f994785d6138f2 | 6,223 | py | Python | pr2_robot/sensor_stick/scripts/object_recognition.py | Shubodh/RoboND_Perception_Project | 1f7a09c62c93c2130d4f06069d317f758800b0a4 | [
"MIT"
] | null | null | null | pr2_robot/sensor_stick/scripts/object_recognition.py | Shubodh/RoboND_Perception_Project | 1f7a09c62c93c2130d4f06069d317f758800b0a4 | [
"MIT"
] | null | null | null | pr2_robot/sensor_stick/scripts/object_recognition.py | Shubodh/RoboND_Perception_Project | 1f7a09c62c93c2130d4f06069d317f758800b0a4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import sklearn
from sklearn.preprocessing import LabelEncoder
import pickle
from sensor_stick.srv import GetNormals
from sensor_stick.features import compute_color_histograms
from sensor_stick.features import compute_normal_histograms
from visualization_msgs.msg import Marker... | 34.005464 | 161 | 0.763297 |
a7e0379f37896330cb7f7a897f3546c8354f01a1 | 3,092 | py | Python | modules/dbnd/src/dbnd/_core/decorator/schemed_result.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/_core/decorator/schemed_result.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | modules/dbnd/src/dbnd/_core/decorator/schemed_result.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | from typing import Any
import attr
from dbnd._core.errors import friendly_error
from dbnd._core.errors.friendly_error.task_execution import (
failed_to_read_value_from_target,
)
from dbnd._core.parameter.parameter_definition import ParameterDefinition, T
from targets.errors import NotSupportedValue
from targets.m... | 31.232323 | 96 | 0.629043 |
852c459153a83d97c1a83edb25958ea8149e9693 | 9,931 | py | Python | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_extractor_config.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | 1 | 2019-01-03T16:41:29.000Z | 2019-01-03T16:41:29.000Z | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_extractor_config.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | 76 | 2018-11-09T18:19:44.000Z | 2019-08-20T20:29:53.000Z | Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/dateperiod_extractor_config.py | inloco/Recognizers-Text | 9f4ac7cd4170fe39e48ccf52c028877e7c421e60 | [
"MIT"
] | 6 | 2017-05-04T17:24:59.000Z | 2019-07-23T15:48:44.000Z | from typing import List, Pattern
from recognizers_text import Extractor, Parser, RegExpUtility
from recognizers_number import ChineseNumberExtractor, ChineseNumberParserConfiguration, BaseNumberParser, \
ChineseCardinalExtractor, ChineseOrdinalExtractor
from ...resources.base_date_time import BaseDateTime
from ...... | 32.667763 | 120 | 0.699124 |
9ea7029808e7b9dd188df87167c2c08ab649c24e | 1,485 | py | Python | env/lib/python3.7/site-packages/banal/cache.py | keshavm02/cyber_security-CTF-server | 6af715b4c108349aa728fe9630f4b0be6a3c07a7 | [
"Apache-2.0"
] | null | null | null | env/lib/python3.7/site-packages/banal/cache.py | keshavm02/cyber_security-CTF-server | 6af715b4c108349aa728fe9630f4b0be6a3c07a7 | [
"Apache-2.0"
] | null | null | null | env/lib/python3.7/site-packages/banal/cache.py | keshavm02/cyber_security-CTF-server | 6af715b4c108349aa728fe9630f4b0be6a3c07a7 | [
"Apache-2.0"
] | null | null | null | import six
import types
from itertools import chain
from hashlib import sha1
from datetime import date, datetime
from banal.dicts import is_mapping
from banal.lists import is_sequence
def bytes_iter(obj):
"""Turn a complex object into an iterator of byte strings.
The resulting iterator can be used for cachin... | 29.117647 | 72 | 0.612121 |
bee7ee05d85b0d3f4dabdb86e9c98cffea3a9c0c | 10,056 | py | Python | python_modules/dagster/dagster_tests/daemon_tests/test_dagster_daemon_health.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/daemon_tests/test_dagster_daemon_health.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/daemon_tests/test_dagster_daemon_health.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | import time
import pendulum
from dagster import DagsterInvariantViolationError
from dagster.core.test_utils import instance_for_test
from dagster.daemon.controller import (
all_daemons_healthy,
all_daemons_live,
daemon_controller_from_instance,
get_daemon_status,
)
from dagster.utils.error import Seria... | 38.235741 | 134 | 0.591289 |
cf4d328b48eb37eb7c18a8890822a5cff7f2395a | 2,019 | py | Python | models/utils.py | teachteamgithub/coursebuilder | 178c0ff3cd28858079488c3c2a0bc22a5baf58e3 | [
"Apache-2.0"
] | 13 | 2015-02-07T12:43:40.000Z | 2020-02-10T18:30:36.000Z | models/utils.py | opsschool/coursebuilder | 178c0ff3cd28858079488c3c2a0bc22a5baf58e3 | [
"Apache-2.0"
] | null | null | null | models/utils.py | opsschool/coursebuilder | 178c0ff3cd28858079488c3c2a0bc22a5baf58e3 | [
"Apache-2.0"
] | 8 | 2015-08-29T03:10:16.000Z | 2019-09-13T22:59:03.000Z | # Copyright 2012 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 ... | 33.098361 | 80 | 0.709262 |
75da3202f5ab62541074ed3ea6477a9a02a19d82 | 2,350 | py | Python | python_framework/api/test/apitests/testone/api/src/controller/ActuatorHealthTestController.py | AChillFeeder/python_framework | 4521e1acb90f749ebd9724a87dc121c6f37b3dca | [
"MIT"
] | 5 | 2020-09-02T20:05:44.000Z | 2022-03-04T21:02:13.000Z | python_framework/api/test/apitests/testone/api/src/controller/ActuatorHealthTestController.py | AChillFeeder/python_framework | 4521e1acb90f749ebd9724a87dc121c6f37b3dca | [
"MIT"
] | 1 | 2021-05-23T22:55:58.000Z | 2021-05-24T15:33:50.000Z | python_framework/api/test/apitests/testone/api/src/controller/ActuatorHealthTestController.py | AChillFeeder/python_framework | 4521e1acb90f749ebd9724a87dc121c6f37b3dca | [
"MIT"
] | 3 | 2020-11-01T01:13:09.000Z | 2022-02-22T15:01:19.000Z | from python_helper import EnvironmentHelper
from python_framework.api.src.enumeration.HttpStatus import HttpStatus
from python_framework.api.src.service.flask.FlaskManager import Controller, ControllerMethod
from python_framework.api.src.dto import ActuatorHealthDto
from dto import EnumAsQueryDto
from dto import Test... | 47 | 185 | 0.728085 |
05ba061bc66c13f53fce48aa23f5e7aa736d51af | 17,950 | py | Python | python/mxnet/gluon/utils.py | liuxiaotiao/mxnet_DGT | 023382a9e73047624d511605fb391eac0d7fdb8e | [
"Apache-2.0",
"MIT"
] | null | null | null | python/mxnet/gluon/utils.py | liuxiaotiao/mxnet_DGT | 023382a9e73047624d511605fb391eac0d7fdb8e | [
"Apache-2.0",
"MIT"
] | null | null | null | python/mxnet/gluon/utils.py | liuxiaotiao/mxnet_DGT | 023382a9e73047624d511605fb391eac0d7fdb8e | [
"Apache-2.0",
"MIT"
] | 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... | 37.086777 | 110 | 0.6039 |
90cf041d5eb01ba382431175556e212e1196d214 | 34,574 | py | Python | tests/unit/test_mock.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | tests/unit/test_mock.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/test_mock.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # -*- coding: utf-8 -*-
'''
Tests for our mock_open helper
'''
# Import Python Libs
from __future__ import absolute_import, unicode_literals, print_function
import errno
import logging
import textwrap
# Import Salt libs
import salt.utils.data
import salt.utils.files
import salt.utils.stringutils
from salt.ext import s... | 44.043312 | 105 | 0.532394 |
07095e6e79ac5bc62216bd46213bc175b6f61b92 | 808 | py | Python | server/setup.py | hustrlee/opencv-python-getting-started | b33f155a1905d793b40bbd18aa725bce8ab897f9 | [
"MIT"
] | null | null | null | server/setup.py | hustrlee/opencv-python-getting-started | b33f155a1905d793b40bbd18aa725bce8ab897f9 | [
"MIT"
] | null | null | null | server/setup.py | hustrlee/opencv-python-getting-started | b33f155a1905d793b40bbd18aa725bce8ab897f9 | [
"MIT"
] | null | null | null | # coding: utf-8
import sys
from setuptools import setup, find_packages
NAME = "bill_segmentation"
VERSION = "0.1.0"
# To install the library, run the following
#
# python setup.py install
#
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
REQUIRES = [
"connexion>=2.0.2",
"swagger-ui-bundl... | 20.717949 | 82 | 0.667079 |
f4af4b0a59fd33fc5f44131cd8480c1c56b3561c | 4,635 | py | Python | tools/api/androapi_format.py | tkgwJeff/androguard | bf653d6340a05023eb7d87a70b9c7ae6327eb3cc | [
"Apache-2.0"
] | 12 | 2016-12-26T12:40:42.000Z | 2022-01-04T23:18:12.000Z | tools/api/androapi_format.py | dweinstein/androguard | 7dd2791212e815e869a42541655a1f20cc548665 | [
"Apache-2.0"
] | null | null | null | tools/api/androapi_format.py | dweinstein/androguard | 7dd2791212e815e869a42541655a1f20cc548665 | [
"Apache-2.0"
] | 6 | 2017-03-20T02:03:17.000Z | 2022-01-13T22:36:22.000Z | #!/usr/bin/env python
# This file is part of Androguard.
#
# Copyright (C) 2010, Anthony Desnos <desnos at t0t0.org>
# 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
#
... | 31.317568 | 75 | 0.575836 |
88ba111b4cbaba38bc64a1ecf4eb7f1374c1f0fc | 867 | py | Python | tests/test_modules/test_builtin/test_choicepart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_builtin/test_choicepart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | tests/test_modules/test_builtin/test_choicepart.py | MattTaylorDLS/pymalcolm | 995a8e4729bd745f8f617969111cc5a34ce1ac14 | [
"Apache-2.0"
] | null | null | null | import unittest
from malcolm.core import call_with_params
from malcolm.modules.builtin.parts import ChoicePart
class TestChoicePart(unittest.TestCase):
def setUp(self):
self.o = call_with_params(
ChoicePart, name="cp", description="desc", choices=["a", "b"],
initialValue="a", wri... | 30.964286 | 74 | 0.61361 |
6ea24326db0fdae49b10d11cc9d5d7cf067d3192 | 294 | py | Python | pdfkit/__init__.py | Noorquacker/Remarkable | ff30d5b9e2e5f262dc7603860c01faadc86c67c6 | [
"MIT"
] | 2,074 | 2016-06-30T20:38:27.000Z | 2022-03-23T22:11:47.000Z | pdfkit/__init__.py | Noorquacker/Remarkable | ff30d5b9e2e5f262dc7603860c01faadc86c67c6 | [
"MIT"
] | 357 | 2016-07-01T12:24:40.000Z | 2022-03-30T18:58:45.000Z | pdfkit/__init__.py | Noorquacker/Remarkable | ff30d5b9e2e5f262dc7603860c01faadc86c67c6 | [
"MIT"
] | 323 | 2016-07-01T13:26:08.000Z | 2022-03-17T02:16:48.000Z | # -*- coding: utf-8 -*-
"""
Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt
"""
__author__ = 'Golovanov Stanislav'
__version__ = '0.4.1'
__license__ = 'MIT'
from .pdfkit import PDFKit
from .api import from_url, from_file, from_string, configuration
| 24.5 | 90 | 0.741497 |
953461f76b8edbcab57f40b9742c03c4f165252f | 10,235 | py | Python | src/toil/test/sort/sort.py | david4096/toil | 491e3cceafc2462395bb83ce759da7b008bb27f3 | [
"Apache-2.0"
] | null | null | null | src/toil/test/sort/sort.py | david4096/toil | 491e3cceafc2462395bb83ce759da7b008bb27f3 | [
"Apache-2.0"
] | 1 | 2017-10-28T00:39:00.000Z | 2017-10-28T00:39:00.000Z | src/toil/test/sort/sort.py | david4096/toil | 491e3cceafc2462395bb83ce759da7b008bb27f3 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2016 Regents of the University of California
#
# 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.824268 | 181 | 0.644846 |
6a4890b38fb468ae02ee0f86b54bf68880e9a51b | 957 | py | Python | setup.py | TinaTabo/SciDataTool | a1a51b104248d3e6d07006f2c3f2806b4589624e | [
"Apache-2.0"
] | null | null | null | setup.py | TinaTabo/SciDataTool | a1a51b104248d3e6d07006f2c3f2806b4589624e | [
"Apache-2.0"
] | null | null | null | setup.py | TinaTabo/SciDataTool | a1a51b104248d3e6d07006f2c3f2806b4589624e | [
"Apache-2.0"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
with open("requirements.txt", "r") as file:
requirements = file.readlines()
install_requires = "".join(
requirements
).splitlines() # remove endline in each element
setuptools.setup(
name="SciDataTool",
... | 30.870968 | 77 | 0.677116 |
1783f7e2075026faffb3c8f6f23c41df171add5f | 1,494 | py | Python | bot/rasa/core/wexin_channel.py | newsettle/ns4_chatbot | 526b97aa31292c28d10518bbfaa7466b8ba109ee | [
"Apache-2.0"
] | 51 | 2019-03-29T11:47:55.000Z | 2021-04-16T02:40:35.000Z | bot/rasa/core/wexin_channel.py | piginzoo/ns4_chatbot | 526b97aa31292c28d10518bbfaa7466b8ba109ee | [
"Apache-2.0"
] | 7 | 2019-04-16T01:46:01.000Z | 2022-03-11T23:44:09.000Z | bot/rasa/core/wexin_channel.py | newsettle/ns4_chatbot | 526b97aa31292c28d10518bbfaa7466b8ba109ee | [
"Apache-2.0"
] | 20 | 2019-04-02T03:37:38.000Z | 2021-12-31T09:25:12.000Z | # -*- coding: UTF-8 -*-
from rasa_core.channels.channel import UserMessage
from rasa_core.channels.channel import InputChannel, OutputChannel
import random, time
from wxpy import *
import sys
reload(sys)
sys.setdefaultencoding('utf8')
#当需要发送消息
class WeixinOutputChannel(OutputChannel):
def __init__(self, weixin_gr... | 31.125 | 77 | 0.692102 |
d42cb1fe7dbc3b2a57cd568ca0d40a5fdc0264f2 | 706 | py | Python | var/spack/repos/builtin/packages/globus-toolkit/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2021-03-19T13:12:47.000Z | 2021-03-19T13:12:47.000Z | var/spack/repos/builtin/packages/globus-toolkit/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/globus-toolkit/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 GlobusToolkit(AutotoolsPackage):
"""The Globus Toolkit is an open source software toolkit ... | 33.619048 | 105 | 0.735127 |
83edb3c165ed90338233f26f92095ae4690dd2ce | 600 | py | Python | miniapp/mini_benchmarks/shared/wait_comp_benchmarks.py | qyz96/tasktorrent | 4418d83da7de657363ac99ee263602794a0b97a5 | [
"MIT"
] | 23 | 2019-09-29T19:33:29.000Z | 2022-03-25T01:48:40.000Z | miniapp/mini_benchmarks/shared/wait_comp_benchmarks.py | qyz96/tasktorrent | 4418d83da7de657363ac99ee263602794a0b97a5 | [
"MIT"
] | 3 | 2020-03-11T18:14:08.000Z | 2020-05-09T22:32:56.000Z | miniapp/mini_benchmarks/shared/wait_comp_benchmarks.py | qyz96/tasktorrent | 4418d83da7de657363ac99ee263602794a0b97a5 | [
"MIT"
] | 7 | 2019-10-22T06:40:03.000Z | 2021-12-01T08:17:39.000Z | import subprocess
import os
repeat = 25
for threads in [1, 2, 4, 8, 16]:
for time in [1e-5, 1e-4]:
tasks = round(threads * 1.0 / time)
subprocess.run(["./ttor_wait", str(threads), str(tasks), str(time), "1", str(repeat), "0"])
os.environ['OMP_NUM_THREADS'] = str(threads)
os.environ[... | 42.857143 | 99 | 0.596667 |
6fb86e23347856c1399992080c9fc74e11195a6f | 2,796 | py | Python | rlpyt/samplers/serial/collectors.py | tristandeleu/rlpyt | 22eccb4e2b33d3c52947a27b6d300b575e36a3ea | [
"MIT"
] | 1 | 2021-04-24T16:42:18.000Z | 2021-04-24T16:42:18.000Z | rlpyt/samplers/serial/collectors.py | tristandeleu/rlpyt | 22eccb4e2b33d3c52947a27b6d300b575e36a3ea | [
"MIT"
] | null | null | null | rlpyt/samplers/serial/collectors.py | tristandeleu/rlpyt | 22eccb4e2b33d3c52947a27b6d300b575e36a3ea | [
"MIT"
] | null | null | null |
import numpy as np
from rlpyt.samplers.collectors import BaseEvalCollector
from rlpyt.agents.base import AgentInputs
from rlpyt.utils.buffer import buffer_from_example, torchify_buffer, numpify_buffer
from rlpyt.utils.logging import logger
# For sampling, serial sampler can use Cpu collectors.
class SerialEvalColl... | 38.833333 | 83 | 0.555794 |
a86c4c29b6ca0f4b861017085a7675878a286a35 | 6,782 | py | Python | sdk/lusid/models/i_unit_definition_dto.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/i_unit_definition_dto.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | sdk/lusid/models/i_unit_definition_dto.py | finbourne/lusid-sdk-python-generated-preview | 9c36c953e8149443a4390ed7f0c04d01211401b6 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.4425
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 28.737288 | 129 | 0.585668 |
54baebb7dc29664e745e67af28590536da0baef0 | 2,174 | py | Python | Tests/test_SearchIO_fasta_m10_index.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 2,856 | 2015-01-01T07:10:06.000Z | 2022-03-31T18:17:25.000Z | Tests/test_SearchIO_fasta_m10_index.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 3,429 | 2015-01-05T11:11:42.000Z | 2022-03-31T13:08:10.000Z | Tests/test_SearchIO_fasta_m10_index.py | lukasz-kozlowski/biopython | 6b601cf09234e1e82cfc94ad5030389036cb6343 | [
"BSD-3-Clause"
] | 1,619 | 2015-01-05T13:07:11.000Z | 2022-03-31T19:19:52.000Z | # Copyright 2012 by Wibowo Arindrarto. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SearchIO fasta-m10 indexing."""
import os
import unittest
from search_tests... | 35.064516 | 83 | 0.672493 |
11c4160e2a248a094bb194690570aa60f87f9a2a | 393 | py | Python | kwiktalk/asgi.py | Vicynet/social-login-django | 7384d7725cd8a33dcf9f05c92b11eec8d928e4eb | [
"bzip2-1.0.6"
] | null | null | null | kwiktalk/asgi.py | Vicynet/social-login-django | 7384d7725cd8a33dcf9f05c92b11eec8d928e4eb | [
"bzip2-1.0.6"
] | null | null | null | kwiktalk/asgi.py | Vicynet/social-login-django | 7384d7725cd8a33dcf9f05c92b11eec8d928e4eb | [
"bzip2-1.0.6"
] | null | null | null | """
ASGI config for kwiktalk project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
ade7105d9886971384cc1183ef43c963e001da36 | 3,307 | py | Python | model_compiler/src/model_compiler/compilers/saved_model_file_to_saved_model.py | yuanliya/Adlik | 602074b44064002fc0bb054e17a989a5bcf22e92 | [
"Apache-2.0"
] | 548 | 2019-09-27T07:37:47.000Z | 2022-03-31T05:12:38.000Z | model_compiler/src/model_compiler/compilers/saved_model_file_to_saved_model.py | yuanliya/Adlik | 602074b44064002fc0bb054e17a989a5bcf22e92 | [
"Apache-2.0"
] | 533 | 2019-09-27T06:30:41.000Z | 2022-03-29T07:34:08.000Z | model_compiler/src/model_compiler/compilers/saved_model_file_to_saved_model.py | yuanliya/Adlik | 602074b44064002fc0bb054e17a989a5bcf22e92 | [
"Apache-2.0"
] | 54 | 2019-10-10T02:19:31.000Z | 2021-12-28T03:37:45.000Z | # Copyright 2019 ZTE corporation. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from typing import Any, Mapping, NamedTuple, Optional, Sequence
import tensorflow as tf
from . import repository
from ..models.sources.saved_model_file import SavedModelFile
from ..models.targets.saved_model import SavedModel... | 38.453488 | 106 | 0.659208 |
ecb017375c202cdfcbdddc5a4d9b0b37f3c581a5 | 417 | py | Python | tests/test_equal_groups.py | Vareto-Forks/Same-Size-K-Means | 1bc3f6a355d77cf7a06c1130d9493c0c3b59bd09 | [
"BSD-3-Clause"
] | 68 | 2017-11-20T14:13:23.000Z | 2022-02-27T03:45:56.000Z | tests/test_equal_groups.py | Vareto-Forks/Same-Size-K-Means | 1bc3f6a355d77cf7a06c1130d9493c0c3b59bd09 | [
"BSD-3-Clause"
] | 12 | 2018-05-01T05:43:20.000Z | 2021-10-19T06:53:53.000Z | miscellaneous/SameSizeKMeans/tests/test_equal_groups.py | Jinqi-Cheng/delivery_pal_server | b38f540919b9b61b6b22935e7801ce7da1f41db3 | [
"MIT"
] | 49 | 2017-12-05T21:54:27.000Z | 2022-02-04T05:37:57.000Z | from clustering.equal_groups import EqualGroupsKMeans
import numpy as np
X = np.array([[1, 2], [1, 4], [1, 0], [4, 2], [4, 4], [4, 0]])
def test_evens():
assert 1 + 1 == 2
def test_evens_imports():
clf = EqualGroupsKMeans(n_clusters=2, random_state=0)
clf.fit(X)
clf.labels_
clf.cluster_centers_
... | 23.166667 | 62 | 0.628297 |
ea351b1e338e75f50f3f197e2581e6e49d2a2577 | 1,011 | py | Python | Dragon Curve/1 - basic.py | ThePythonist/AlgorithmicBotanyModule | 7e7b3d1e36a2da702890a0a2345d4c5efe197172 | [
"MIT"
] | null | null | null | Dragon Curve/1 - basic.py | ThePythonist/AlgorithmicBotanyModule | 7e7b3d1e36a2da702890a0a2345d4c5efe197172 | [
"MIT"
] | null | null | null | Dragon Curve/1 - basic.py | ThePythonist/AlgorithmicBotanyModule | 7e7b3d1e36a2da702890a0a2345d4c5efe197172 | [
"MIT"
] | null | null | null | #Draw a dragon curve
from turtle import *
#Recursively draw sides of the curve
#Since the line segments alternate between bending left and right, we need a parameter to tell us which to do
def draw_side(length, numLayers, leftFirst=False):
if numLayers == 1:
forward(length)
else:
#Ternary oper... | 28.083333 | 109 | 0.695351 |
f2d02ab0c27a29f39e7586b6acea3c2f844836ab | 5,583 | py | Python | sanic/static.py | SimonCqk/sanic | b9fd1d1d2e5dc379b22532f76db70072bdb69695 | [
"MIT"
] | 5 | 2018-05-10T19:50:27.000Z | 2018-05-10T20:07:05.000Z | sanic/static.py | SimonCqk/sanic | b9fd1d1d2e5dc379b22532f76db70072bdb69695 | [
"MIT"
] | 1 | 2019-02-18T15:34:13.000Z | 2019-02-18T15:34:13.000Z | sanic/static.py | SimonCqk/sanic | b9fd1d1d2e5dc379b22532f76db70072bdb69695 | [
"MIT"
] | null | null | null | from mimetypes import guess_type
from os import path
from re import sub
from time import strftime, gmtime
from urllib.parse import unquote
from aiofiles.os import stat
from sanic.exceptions import (
ContentRangeError,
FileNotFound,
HeaderNotFound,
InvalidUsage,
)
from sanic.handlers import ContentRang... | 43.617188 | 79 | 0.569228 |
399e06a5878e8322e0fc0a052c5a6a7e73449e19 | 4,934 | py | Python | ipython-extension/autoplot/extensions/toast.py | kernelpanek/jupyterlab-autoplot | 023b0b6a1ebc1857b4dab95c04286d45ec70fc42 | [
"BSD-3-Clause"
] | 48 | 2021-01-27T14:40:00.000Z | 2022-03-31T10:15:35.000Z | ipython-extension/autoplot/extensions/toast.py | kernelpanek/jupyterlab-autoplot | 023b0b6a1ebc1857b4dab95c04286d45ec70fc42 | [
"BSD-3-Clause"
] | 1 | 2021-03-11T06:31:35.000Z | 2021-07-29T18:47:29.000Z | ipython-extension/autoplot/extensions/toast.py | kernelpanek/jupyterlab-autoplot | 023b0b6a1ebc1857b4dab95c04286d45ec70fc42 | [
"BSD-3-Clause"
] | 5 | 2021-04-22T17:44:12.000Z | 2022-02-09T22:47:16.000Z | """Module containing the class used to display JupyterLab toasts.
Communication is achieved via custom DOM events, using the name 'autoplot-toast'.
Classes
-------
ToastType
Enum class defining different toast types.
Toast
Class to display JupyterLab toasts via DOM events.
"""
from enum import Enum
from IP... | 30.8375 | 120 | 0.621403 |
63d2f050b020d1fe3f613be52922c74dfb64a747 | 32,502 | py | Python | pygocomma/r9.py | p3g4asus/pygocomma | 096ce0455d90acd0f4b825591477fb650e5c1653 | [
"MIT"
] | null | null | null | pygocomma/r9.py | p3g4asus/pygocomma | 096ce0455d90acd0f4b825591477fb650e5c1653 | [
"MIT"
] | null | null | null | pygocomma/r9.py | p3g4asus/pygocomma | 096ce0455d90acd0f4b825591477fb650e5c1653 | [
"MIT"
] | null | null | null | '''
Created on 28 apr 2019
@author: Matteo
'''
import traceback
import struct
import asyncio
from base64 import b64decode, b64encode
import json
import time
from Crypto.Cipher import AES
import random
import string
import binascii
from hashlib import md5
from . import _LOGGER
from .const import (CD_AD... | 42.430809 | 901 | 0.600025 |
17da98758fef614f2fdca1329c924ab628e8cfa6 | 861 | py | Python | reviews/models.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | reviews/models.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | 9 | 2020-01-10T14:10:02.000Z | 2022-03-12T00:08:19.000Z | reviews/models.py | yun-mh/uniwalk | f5307f6970b24736d13b56b4792c580398c35b3a | [
"Apache-2.0"
] | null | null | null | from django.core.validators import MaxValueValidator
from django.db import models
from django.utils.translation import ugettext_lazy as _
from core import models as core_models
class Review(core_models.TimeStampedModel):
""" レビューのモデルを定義する """
product = models.ForeignKey(
"products.Product",
... | 26.90625 | 70 | 0.664344 |
e1c804e0550ff2803e3b004705b5d71b6b94a737 | 3,828 | py | Python | python/pyspark/pandas/tests/test_generic_functions.py | dbolshak/spark | e00d305053c98995efa990ffb2cf82cb281c71d8 | [
"Apache-2.0"
] | 1 | 2021-10-07T11:25:57.000Z | 2021-10-07T11:25:57.000Z | python/pyspark/pandas/tests/test_generic_functions.py | dbolshak/spark | e00d305053c98995efa990ffb2cf82cb281c71d8 | [
"Apache-2.0"
] | 1 | 2022-02-11T00:28:06.000Z | 2022-02-11T00:28:06.000Z | python/pyspark/pandas/tests/test_generic_functions.py | dbolshak/spark | e00d305053c98995efa990ffb2cf82cb281c71d8 | [
"Apache-2.0"
] | 1 | 2016-11-22T03:46:44.000Z | 2016-11-22T03:46:44.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 30.624 | 87 | 0.551463 |
cc048a4e9acac4324a3d13531f1fef898c900e42 | 1,607 | py | Python | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/17_features/numtrees_30/rule_1.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/17_features/numtrees_30/rule_1.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | duke-cs671-fall21-coupon-recommendation/outputs/rules/RF/17_features/numtrees_30/rule_1.py | apcarrik/kaggle | 6e2d4db58017323e7ba5510bcc2598e01a4ee7bf | [
"MIT"
] | null | null | null | def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurant20to50, obj[15]: Direct... | 37.372093 | 347 | 0.586808 |
551ad697326bddf77c3cd210312b53d882f0e44b | 11,239 | py | Python | venv/Lib/site-packages/scipy/ndimage/fourier.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | venv/Lib/site-packages/scipy/ndimage/fourier.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | venv/Lib/site-packages/scipy/ndimage/fourier.py | EkremBayar/bayar | aad1a32044da671d0b4f11908416044753360b39 | [
"MIT"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | 36.728758 | 78 | 0.659489 |
63f6bc65bff5668505c4c7784831c5288a0ef1b4 | 1,696 | py | Python | extra_apps/social_core/pipeline/partial.py | kaocher82/Vue-Django-Shop-Website | 6273990a5510b72c3a3115d73e149d242049b5bc | [
"MIT"
] | 84 | 2019-02-22T08:19:52.000Z | 2022-02-08T03:36:32.000Z | Backend/extra_apps/social_core/pipeline/partial.py | GinCho-Max/Dailyfresh-B2C | 7c94e9a4428e5116c91bf27cf696e6eee430748a | [
"Apache-2.0"
] | 16 | 2019-09-06T10:25:40.000Z | 2022-02-12T06:37:41.000Z | Backend/extra_apps/social_core/pipeline/partial.py | GinCho-Max/Dailyfresh-B2C | 7c94e9a4428e5116c91bf27cf696e6eee430748a | [
"Apache-2.0"
] | 61 | 2019-03-20T02:29:23.000Z | 2021-07-09T08:14:25.000Z | from functools import wraps
from .utils import partial_prepare
def partial_step(save_to_session):
"""Wraps func to behave like a partial pipeline step, any output
that's not None or {} will be considered a response object and
will be returned to user.
The pipeline function will receive a current_par... | 35.333333 | 89 | 0.65684 |
b0a7f7d301f5030d331ec5fac440ae621c86e90f | 353 | py | Python | tools/train.py | Kingzerd/siamfc_pytorch | fd1dbeb12dd7e2b9190876a1de7ea4b71a7a1166 | [
"MIT"
] | 1 | 2019-11-17T05:12:58.000Z | 2019-11-17T05:12:58.000Z | tools/train.py | Kingzerd/siamfc_pytorch | fd1dbeb12dd7e2b9190876a1de7ea4b71a7a1166 | [
"MIT"
] | null | null | null | tools/train.py | Kingzerd/siamfc_pytorch | fd1dbeb12dd7e2b9190876a1de7ea4b71a7a1166 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import os
from got10k.datasets import *
from siamfc import TrackerSiamFC
if __name__ == '__main__':
# root_dir = os.path.abspath('~/data/GOT-10k')
root_dir = 'H:/datasets/GOT-10k'
seqs = GOT10k(root_dir, subset='train', return_meta=True)
tracker = TrackerSiamF... | 22.0625 | 61 | 0.716714 |
704ff29783736a31c052cf80753f1a68d47141c9 | 3,865 | py | Python | venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/recursive.py | fmfrancisco/chapters | 34acc93e7a41490fe3c856e16927e50fdc370dee | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/recursive.py | fmfrancisco/chapters | 34acc93e7a41490fe3c856e16927e50fdc370dee | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/hypothesis/strategies/_internal/recursive.py | fmfrancisco/chapters | 34acc93e7a41490fe3c856e16927e50fdc370dee | [
"MIT"
] | null | null | null | # This file is part of Hypothesis, which may be found at
# https://github.com/HypothesisWorks/hypothesis/
#
# Most of this work is copyright (C) 2013-2021 David R. MacIver
# (david@drmaciver.com), but it contains contributions by others. See
# CONTRIBUTING.rst for a full list of people who may hold copyright, and
# con... | 34.81982 | 84 | 0.623027 |
831d9c94befd0221675dfede1756cc4fc32d0cca | 3,387 | py | Python | src/simmer/drivers.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | null | null | null | src/simmer/drivers.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | 25 | 2021-01-21T06:51:58.000Z | 2022-03-28T21:07:30.000Z | src/simmer/drivers.py | holdengill/SImMER | 7608a9cb044f2827f43f2d0c177e17faf8ff7720 | [
"MIT"
] | null | null | null | """
Module for driving reduction processes. Contains highest-level API.
"""
from glob import glob
import numpy as np
import pandas as pd
from tqdm import tqdm
from . import darks, flats, image
from . import plotting as pl
from . import search_headers as search
from . import sky
def all_driver(
inst, config_fil... | 30.241071 | 78 | 0.675229 |
44114c66c293094c47af36383993bc14f8ceebf5 | 1,210 | py | Python | wikipedia_scraper.py | rodrigogomesrc/CrawlerStats | b0c5d27369127580bbbd3c868907b1431a501564 | [
"MIT"
] | null | null | null | wikipedia_scraper.py | rodrigogomesrc/CrawlerStats | b0c5d27369127580bbbd3c868907b1431a501564 | [
"MIT"
] | null | null | null | wikipedia_scraper.py | rodrigogomesrc/CrawlerStats | b0c5d27369127580bbbd3c868907b1431a501564 | [
"MIT"
] | null | null | null | from config import *
from bs4 import BeautifulSoup
import requests
from FTDHandler import ftdhandler as txt
import time
def extract_page_text(content):
soup = BeautifulSoup(content, 'html.parser')
paragraphs_list = soup.find_all("p")
page_text = " "
for paragraph in paragraphs_list:
page_text += paragraph.g... | 18.90625 | 84 | 0.715702 |
814f9bb8b748e2a9ffac0a140d188d94c5e2da68 | 3,520 | py | Python | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | code.py | shadow09rj/olympic-hero | 652f9f88241e3320cdeb16abee18af75d4aef3e7 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#Path of the file
data= pd.read_csv(path)
data.rename(columns = {'Total':'Total_Medals'},inplace=True)
print(data.head(10))
#Code starts here
# --------------
#Code starts here0
#Code starts he... | 30.344828 | 118 | 0.705398 |
e501b2f73286439b86125483113001b774dab3d4 | 535 | py | Python | examples/sanic/example.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/sanic/example.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/sanic/example.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : example
# @Time : 2019-09-12 11:37
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
import os
from sanic import Sanic, response
from sanic.response import ht... | 19.814815 | 77 | 0.616822 |
5f01359889fa890604453dd36663a1e64ba7ed72 | 188 | py | Python | src/OTLMOW/ModelGenerator/OSLODatatypeUnion.py | davidvlaminck/OTLClassPython | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | 2 | 2022-02-01T08:58:11.000Z | 2022-02-08T13:35:17.000Z | src/OTLMOW/ModelGenerator/OSLODatatypeUnion.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | src/OTLMOW/ModelGenerator/OSLODatatypeUnion.py | davidvlaminck/OTLMOW | 71330afeb37c3ea6d9981f521ff8f4a3f8b946fc | [
"MIT"
] | null | null | null | import dataclasses
@dataclasses.dataclass
class OSLODatatypeUnion:
name: str
objectUri: str
definition: str
label: str
usagenote: str
deprecated_version: str
| 11.75 | 27 | 0.702128 |
415eaffb93a7bacc3ddd15d91d551ea06562cef3 | 8,349 | py | Python | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM58/PHoleM58.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM58/PHoleM58.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | pyleecan/GUI/Dialog/DMachineSetup/SMHoleMag/PHoleM58/PHoleM58.py | mxgnsr/pyleecan | 2b0a04e4ae67c073a91362ab42332908fef53bdd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from numpy import pi
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QWidget
from ......Classes.HoleM58 import HoleM58
from ......GUI import gui_option
from ......GUI.Dialog.DMachineSetup.SMHoleMag.PHoleM58.Gen_PHoleM58 import Gen_PHoleM58
from .... | 30.694853 | 87 | 0.568811 |
1d93ae0de7b18e1f2d775ed3725d8d28dce97946 | 3,114 | py | Python | gnupg_mails/message.py | jandd/django-gnupg-mails | 15e6fceeacc3d7c6d9e3bcbce41db65e0f9f7ce0 | [
"MIT"
] | 4 | 2015-03-16T13:03:11.000Z | 2020-04-27T16:19:09.000Z | gnupg_mails/message.py | jandd/django-gnupg-mails | 15e6fceeacc3d7c6d9e3bcbce41db65e0f9f7ce0 | [
"MIT"
] | 1 | 2019-05-16T17:38:46.000Z | 2020-02-25T20:39:27.000Z | gnupg_mails/message.py | jandd/django-gnupg-mails | 15e6fceeacc3d7c6d9e3bcbce41db65e0f9f7ce0 | [
"MIT"
] | null | null | null | from email.charset import Charset, QP
from email.encoders import encode_noop
from email.mime.application import MIMEApplication
from email.mime.nonmultipart import MIMENonMultipart
from email.utils import formatdate
from django.conf import settings
from django.core.mail import EmailMessage
from django.core.mail import... | 34.988764 | 87 | 0.632627 |
02fb73dad8796f75103022ec87a70f2fc021a301 | 1,388 | py | Python | tests/test_profile.py | Jikol/terracotta | d7e5b615f52cb856d2d12039e95b1de837603be6 | [
"MIT"
] | 1 | 2022-01-23T14:52:48.000Z | 2022-01-23T14:52:48.000Z | tests/test_profile.py | fitriandriastuti/terracotta | 04f1019ee47c565dbf068ee2a6d49f05080da698 | [
"MIT"
] | null | null | null | tests/test_profile.py | fitriandriastuti/terracotta | 04f1019ee47c565dbf068ee2a6d49f05080da698 | [
"MIT"
] | 1 | 2022-01-04T22:14:22.000Z | 2022-01-04T22:14:22.000Z | import pytest
import time
from moto import mock_xray_client, XRaySegment
def test_xray_tracing(caplog):
@mock_xray_client
def run_test():
from terracotta import update_settings
import terracotta.profile
update_settings(XRAY_PROFILE=True)
@terracotta.profile.trace('dummy')
... | 25.703704 | 94 | 0.639049 |
e18166ecbf88e51292aec27fc43c595b6249a633 | 4,836 | py | Python | cloudmersive_convert_api_client/models/get_docx_pages_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Convert | dba2fe7257229ebdacd266531b3724552c651009 | [
"Apache-2.0"
] | 3 | 2018-07-25T23:04:34.000Z | 2021-08-10T16:43:10.000Z | cloudmersive_convert_api_client/models/get_docx_pages_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Convert | dba2fe7257229ebdacd266531b3724552c651009 | [
"Apache-2.0"
] | 3 | 2020-11-23T10:46:48.000Z | 2021-12-30T14:09:34.000Z | cloudmersive_convert_api_client/models/get_docx_pages_response.py | Cloudmersive/Cloudmersive.APIClient.Python.Convert | dba2fe7257229ebdacd266531b3724552c651009 | [
"Apache-2.0"
] | 2 | 2020-01-07T09:48:01.000Z | 2020-11-23T10:47:00.000Z | # coding: utf-8
"""
convertapi
Convert API lets you effortlessly convert file formats and types. # noqa: E501
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class GetDocxPagesResponse(object):
... | 27.793103 | 85 | 0.577957 |
57307fd7d390d9b7b456d025281c9c16a2b3f46b | 3,108 | py | Python | uncertainty_wizard/internal_utils/tf_version_resolver.py | p1ndsvin/uncertainty-wizard | 92a7a9bcb411e512cf6ad54e7ba226a3c66d3583 | [
"MIT"
] | 33 | 2020-12-21T20:21:21.000Z | 2022-03-25T17:51:36.000Z | uncertainty_wizard/internal_utils/tf_version_resolver.py | swb19/uncertainty-wizard | 5ba9bfc6ee967eb5f226abbedb6f9d5452b3cfea | [
"MIT"
] | 83 | 2020-12-18T18:18:28.000Z | 2022-03-28T21:17:29.000Z | uncertainty_wizard/internal_utils/tf_version_resolver.py | swb19/uncertainty-wizard | 5ba9bfc6ee967eb5f226abbedb6f9d5452b3cfea | [
"MIT"
] | 5 | 2021-02-13T13:27:48.000Z | 2021-12-25T16:45:19.000Z | import warnings
from typing import Union
import tensorflow as tf
def _compare_expected_to_current_tf_version(expected_version) -> Union[None, int]:
"""
Compares the 'x.y.z' version parts of a passed expected version and the actual tensorflow version.
The result is negative if the expected version is newe... | 40.363636 | 115 | 0.685972 |
d432e415ba500b10d8274254c15bc725d047bf2c | 14,789 | py | Python | smart_device_client/smart_device_client.py | buckley-w-david/smart-device-client | 3ea8ea190466794300a1956557445800b26c74b8 | [
"MIT"
] | null | null | null | smart_device_client/smart_device_client.py | buckley-w-david/smart-device-client | 3ea8ea190466794300a1956557445800b26c74b8 | [
"MIT"
] | null | null | null | smart_device_client/smart_device_client.py | buckley-w-david/smart-device-client | 3ea8ea190466794300a1956557445800b26c74b8 | [
"MIT"
] | null | null | null | from enum import IntEnum
import json
import logging
import re
import socket
from typing import Tuple, Optional, Dict
import zmq
RESP_PATTERN = re.compile(r"calibre wireless device client \(on (.+)\);(\d+),(\d+)")
CALIBRE_MESSAGE = re.compile(r"^(?P<length>\d+)(?P<message>.*)")
MAGIC_PATH_LENGTH = 37
Port = int
Addre... | 42.133903 | 143 | 0.618162 |
8a561548bb11553bac1e047a676ca78db1a57457 | 6,479 | py | Python | historical_event.py | alia0801/Asset-allocation | 2df61ea57d7de83a42b616f839631ee142c468d0 | [
"MIT"
] | null | null | null | historical_event.py | alia0801/Asset-allocation | 2df61ea57d7de83a42b616f839631ee142c468d0 | [
"MIT"
] | null | null | null | historical_event.py | alia0801/Asset-allocation | 2df61ea57d7de83a42b616f839631ee142c468d0 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
import numpy as np
import pymysql
import math
import statistics
import time
import datetime
from itertools import combinations, permutations
from scipy.special import comb, perm
# starttime = datetime.datetime.now()
years = ["1990","1991","1992","1993","1994","1995","1996","1997","1998",... | 29.45 | 104 | 0.609353 |
89d4c0403fd5125e5f287098b30e36b97c79ad21 | 2,539 | py | Python | DS/tree/tree_node.py | kiapanahi/CS101 | e800d00d11eccfc5f1bd8fd8b45615158eea3035 | [
"MIT"
] | null | null | null | DS/tree/tree_node.py | kiapanahi/CS101 | e800d00d11eccfc5f1bd8fd8b45615158eea3035 | [
"MIT"
] | null | null | null | DS/tree/tree_node.py | kiapanahi/CS101 | e800d00d11eccfc5f1bd8fd8b45615158eea3035 | [
"MIT"
] | null | null | null | from .constants import HEAP_TYPE
class AbstractTreeNode(object):
"""
the abstraction of a tree node containing a generic value and
optional left/right children
"""
# type hinting is done in strings due to the 'forward referencing' problem
# https://www.python.org/dev/peps/pep-0484/#id28
... | 32.974026 | 102 | 0.625837 |
7ff454782556873d24ed1cee878166bac80e183f | 12,890 | py | Python | scripts/json_manip.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 22 | 2015-03-05T17:23:34.000Z | 2021-12-30T02:52:22.000Z | scripts/json_manip.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2016-09-30T11:15:32.000Z | 2016-09-30T11:15:32.000Z | scripts/json_manip.py | certik/pandas | 758ca05e2eb04532b5d78331ba87c291038e2c61 | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 22 | 2015-01-02T12:14:20.000Z | 2021-10-13T09:22:30.000Z | """
Tasks
-------
Search and transform jsonable structures, specifically to make it 'easy' to make tabular/csv output for other consumers.
Example
~~~~~~~~~~~~~
*give me a list of all the fields called 'id' in this stupid, gnarly
thing*
>>> Q('id',gnarly_data)
['id1','id2','id3']
Observations:
--... | 30.400943 | 120 | 0.595811 |
5f561f2efd9dd256eb39c9a86c7785c7a39b9b6e | 31,666 | py | Python | selfdrive/locationd/test/ublox.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 16 | 2018-09-27T06:29:11.000Z | 2022-03-17T22:56:38.000Z | selfdrive/locationd/test/ublox.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 3 | 2018-12-29T01:34:02.000Z | 2022-01-07T19:08:20.000Z | selfdrive/locationd/test/ublox.py | wolterhv/openpilot | c189d15af9a613d8f109b39298c0ab3e22f39f6d | [
"MIT"
] | 14 | 2018-08-24T00:34:17.000Z | 2021-03-19T11:57:15.000Z | #!/usr/bin/env python3
# pylint: skip-file
'''
UBlox binary protocol handling
Copyright Andrew Tridgell, October 2012
Released under GNU GPL version 3 or later
WARNING: This code has originally intended for
ublox version 7, it has been adapted to work
for ublox version 8, not all functions may work.
'''
import stru... | 31.571286 | 100 | 0.61975 |
5c6ffc7bca5fd691a011156fe4c8deea600920ed | 30,283 | py | Python | src/python/pants/backend/go/util_rules/third_party_pkg_test.py | wimax-grapl/pants | 0aabd417a772ea4e39999c4415c67db40de679a4 | [
"Apache-2.0"
] | 1,806 | 2015-01-05T07:31:00.000Z | 2022-03-31T11:35:41.000Z | src/python/pants/backend/go/util_rules/third_party_pkg_test.py | wimax-grapl/pants | 0aabd417a772ea4e39999c4415c67db40de679a4 | [
"Apache-2.0"
] | 9,565 | 2015-01-02T19:01:59.000Z | 2022-03-31T23:25:16.000Z | src/python/pants/backend/go/util_rules/third_party_pkg_test.py | riisi/pants | b33327389fab67c47b919710ea32f20ca284b1a6 | [
"Apache-2.0"
] | 443 | 2015-01-06T20:17:57.000Z | 2022-03-31T05:28:17.000Z | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import os.path
from textwrap import dedent
import pytest
from pants.backend.go.target_types import GoModTarget
from pants.backend.go.util_rules import... | 54.761302 | 135 | 0.691972 |
c7791218311ce14814ad0bfbb5cc68e390d94d4a | 5,620 | py | Python | Chapter12/videos_sharing_smart_contract/tests/test_videos_sharing.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 62 | 2019-03-18T04:41:41.000Z | 2022-03-31T05:03:13.000Z | Chapter12/videos_sharing_smart_contract/tests/test_videos_sharing.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 2 | 2020-06-14T21:56:03.000Z | 2022-01-07T05:32:01.000Z | Chapter12/videos_sharing_smart_contract/tests/test_videos_sharing.py | HowToBeCalculated/Hands-On-Blockchain-for-Python-Developers | f9634259dd3dc509f36a5ccf3a5182c0d2ec79c4 | [
"MIT"
] | 42 | 2019-02-22T03:10:36.000Z | 2022-02-20T04:47:04.000Z | import pytest
import eth_tester
def upload_video(video_sharing, chain, account, video_path, video_title):
txn_hash = video_sharing.functions.upload_video(video_path, video_title).transact({'from': account})
chain.wait.for_receipt(txn_hash)
def transfer_coins(video_sharing, chain, source, destination, amount)... | 46.065574 | 104 | 0.754093 |
5545fe74c60b96404f1778318325773ea7e4e356 | 10,905 | py | Python | client/verta/tests/monitoring/alerts/test_entities.py | lsb/modeldb | bf484b4110980268d22714e4ff907c28e0ece89e | [
"Apache-2.0"
] | null | null | null | client/verta/tests/monitoring/alerts/test_entities.py | lsb/modeldb | bf484b4110980268d22714e4ff907c28e0ece89e | [
"Apache-2.0"
] | null | null | null | client/verta/tests/monitoring/alerts/test_entities.py | lsb/modeldb | bf484b4110980268d22714e4ff907c28e0ece89e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from collections import namedtuple
import pytest
from verta._internal_utils import (
_utils,
time_utils,
)
from verta.monitoring import comparison
from verta.monitoring.alert import (
FixedAlerter,
RangeAlerter,
ReferenceAlerter,
)
from verta.monitoring.aler... | 37.996516 | 92 | 0.682898 |
481ff00188f78034656c93d13e61771de84db6e2 | 1,125 | py | Python | calisma1.py | donmezmerve/calismas | d941dbaac6b022ae517387b2aa8be564e007532a | [
"MIT"
] | null | null | null | calisma1.py | donmezmerve/calismas | d941dbaac6b022ae517387b2aa8be564e007532a | [
"MIT"
] | null | null | null | calisma1.py | donmezmerve/calismas | d941dbaac6b022ae517387b2aa8be564e007532a | [
"MIT"
] | null | null | null | import pandas
import numpy
def read_file(filename): # fonksıyon tanımle
data = pandas.read_csv(filename, delim_whitespace=True) #data dıye degıskene kaydettık
temp_list=numpy.asarray(data['Temperature']) #dosya formatını gormek ıcın
return temp_list
def calculate_costs(temp): # bır tane data poınt alaca... | 31.25 | 91 | 0.728889 |
059bbbcd468fb3bd80f720a794049eca9aed284f | 1,616 | py | Python | vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | vsts/vsts/customer_intelligence/v4_0/customer_intelligence_client.py | kenkuo/azure-devops-python-api | 9e920bd25e938fa89ff7f60153e5b9e113ca839d | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 41.435897 | 94 | 0.572401 |
6f935b8da8c0007ddf226b8df8412f5adf85d5bc | 11,190 | py | Python | python/mtap/io/serialization.py | benknoll-umn/mtap | 67d506aa4ffc960acca1988ec12c5391c15ad736 | [
"Apache-2.0"
] | 3 | 2020-03-06T21:24:24.000Z | 2021-03-21T06:38:00.000Z | python/mtap/io/serialization.py | benknoll-umn/mtap | 67d506aa4ffc960acca1988ec12c5391c15ad736 | [
"Apache-2.0"
] | 40 | 2019-10-14T17:02:54.000Z | 2022-03-09T13:35:54.000Z | python/mtap/io/serialization.py | benknoll-umn/mtap | 67d506aa4ffc960acca1988ec12c5391c15ad736 | [
"Apache-2.0"
] | 2 | 2019-10-14T15:42:46.000Z | 2020-03-05T23:29:01.000Z | # Copyright 2019 Regents of the University of Minnesota.
#
# 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 l... | 33.909091 | 102 | 0.615728 |
a6898cc7362dd7c3ba61568492958f7941be0962 | 1,679 | py | Python | setup.py | diegojromerolopez/django-async-include | af447c14ed2571e4f16423c75f5c725cd26c9780 | [
"MIT"
] | 14 | 2017-03-11T22:26:54.000Z | 2022-02-01T12:09:57.000Z | setup.py | diegojromerolopez/django-async-include | af447c14ed2571e4f16423c75f5c725cd26c9780 | [
"MIT"
] | 11 | 2017-03-23T22:40:48.000Z | 2021-08-22T00:22:21.000Z | setup.py | diegojromerolopez/django-async-include | af447c14ed2571e4f16423c75f5c725cd26c9780 | [
"MIT"
] | 4 | 2017-03-22T23:27:15.000Z | 2021-06-26T06:15:17.000Z | # -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
root_dir_path = os.path.dirname(os.path.abspath(__file__))
long_description = open(os.path.join(root_dir_path, "README.md")).read()
data_files = []
for dirpath, dirnames, filenames in os.walk('.'):
for i, dirname in enumerate(dirnames... | 31.679245 | 72 | 0.640858 |
98ff1bafed433665948f64272fca27494513e7e1 | 542 | py | Python | CeV - Gustavo Guanabara/exerc034.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | 1 | 2021-12-11T19:53:41.000Z | 2021-12-11T19:53:41.000Z | CeV - Gustavo Guanabara/exerc034.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | null | null | null | CeV - Gustavo Guanabara/exerc034.py | us19861229c/Meu-aprendizado-Python | 575c0714ac5377ff3122f4cb57952969e07ba89b | [
"Unlicense"
] | null | null | null | #034 : programa para ler o salario do funcionario e dar um aumento percentual
# caso o salario seja maior q 1250, dar +10%
# para salario menor q 1250, dar 15%
sal = float(input("Qual o seu salario atual? R$"))
if sal > 1250.00 :
nsal = sal + (sal * 0.10)
print(f'Seu salario antigo era R${sal:.2f}, '
... | 36.133333 | 77 | 0.623616 |
12622bd8108be1d2928443cf1ad2df3f6bd9a4a6 | 2,131 | py | Python | src/main.py | nkosinathintuli/eee3096s-prac-06-iot-server | 40369e2baf9c2588c0ee38559c520c8e96f79ca0 | [
"MIT"
] | null | null | null | src/main.py | nkosinathintuli/eee3096s-prac-06-iot-server | 40369e2baf9c2588c0ee38559c520c8e96f79ca0 | [
"MIT"
] | null | null | null | src/main.py | nkosinathintuli/eee3096s-prac-06-iot-server | 40369e2baf9c2588c0ee38559c520c8e96f79ca0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from csv import DictReader
import threading
import datetime
import socket
import csv
import os
TCP_IP = ''
P1_IP = '192.168.137.105'
TCP_PORT = 5005
BUFFER_SIZE = 20 # Normally 1024, but we want fast response
global temp_ADC
temp_ADC = -1
global LDR_ADC
LDR_ADC = -1
global counter
counter=ti... | 24.494253 | 90 | 0.651807 |
c69de00cd893bded53257278f8f19478f2f38554 | 21,570 | py | Python | pirates/leveleditor/worldData/interior_shanty_store_clothing.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/leveleditor/worldData/interior_shanty_store_clothing.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/leveleditor/worldData/interior_shanty_store_clothing.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.leveleditor.worldData.interior_shanty_store_clothing
from pandac.PandaModules import Point3, VBase3, Vec4, Vec3
objectStruct = {... | 3,081.428571 | 21,142 | 0.667269 |
3b955f5026a253155508bbf078358f9426a60a9a | 650 | py | Python | common/src/stack/command/stack/commands/list/host/storage/controller/__init__.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 123 | 2015-05-12T23:36:45.000Z | 2017-07-05T23:26:57.000Z | common/src/stack/command/stack/commands/list/host/storage/controller/__init__.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 177 | 2015-06-05T19:17:47.000Z | 2017-07-07T17:57:24.000Z | common/src/stack/command/stack/commands/list/host/storage/controller/__init__.py | anooprajendra/stacki | 5e3f51c928ff5367a7441f07bf28f0121e7abdff | [
"BSD-3-Clause"
] | 32 | 2015-06-07T02:25:03.000Z | 2017-06-23T07:35:35.000Z | # @copyright@
# Copyright (c) 2006 - 2019 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
import stack.commands
class Command(stack.commands.list.host.command):
"""
List the storage controller configuration for a given host(s).
... | 28.26087 | 108 | 0.72 |
3c426ef1e6eeaa67db33e31fff1a014d81f3b0ff | 434 | py | Python | test/5__pika__rec.py | qq453388937/d | 95c282b8cdcb603724c7e5907fc268cfadb51fce | [
"MIT"
] | null | null | null | test/5__pika__rec.py | qq453388937/d | 95c282b8cdcb603724c7e5907fc268cfadb51fce | [
"MIT"
] | 1 | 2020-12-10T06:28:54.000Z | 2020-12-10T06:28:54.000Z | test/5__pika__rec.py | qq453388937/d | 95c282b8cdcb603724c7e5907fc268cfadb51fce | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import pika
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='helloQueue')
def callback(ch, method, properties, body):
print(" [>>>]Receive %r" % body)
channel.basic_consume(callback, queue='hello... | 28.933333 | 81 | 0.737327 |
fcff7d83b5e8e4e771bdae36e9eedc1cba991e2a | 30,748 | py | Python | python/ray/cloudpickle/cloudpickle_fast.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 3 | 2020-12-03T17:48:45.000Z | 2022-01-22T08:09:46.000Z | python/ray/cloudpickle/cloudpickle_fast.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 6 | 2022-03-18T14:06:24.000Z | 2022-03-26T07:13:16.000Z | python/ray/cloudpickle/cloudpickle_fast.py | firebolt55439/ray | 215300b070628c06f0106906fc6c03bd70ebf140 | [
"Apache-2.0"
] | 1 | 2020-12-12T13:59:22.000Z | 2020-12-12T13:59:22.000Z | """
New, fast version of the CloudPickler.
This new CloudPickler class can now extend the fast C Pickler instead of the
previous Python implementation of the Pickler class. Because this functionality
is only available for Python versions 3.8+, a lot of backward-compatibility
code is also removed.
Note that the C Pick... | 39.623711 | 110 | 0.654254 |
5a3e0f6ada91e6fa630047a427a61d6cfa78d4ab | 5,423 | py | Python | fhirpy/base/utils.py | motey/fhir-py | b1bf0784f6ede2b12b8c34f7b863e498fd27bf34 | [
"MIT"
] | null | null | null | fhirpy/base/utils.py | motey/fhir-py | b1bf0784f6ede2b12b8c34f7b863e498fd27bf34 | [
"MIT"
] | null | null | null | fhirpy/base/utils.py | motey/fhir-py | b1bf0784f6ede2b12b8c34f7b863e498fd27bf34 | [
"MIT"
] | 1 | 2020-03-19T10:48:59.000Z | 2020-03-19T10:48:59.000Z | import reprlib
from urllib.parse import urlencode, quote, parse_qs, urlparse
class AttrDict(dict):
def __init__(self, *args, **kwargs):
super(AttrDict, self).__init__(*args, **kwargs)
self.__dict__ = self
def get_by_path(self, path, default=None):
keys = parse_path(path)
retur... | 26.453659 | 78 | 0.501014 |
b8547e44652af13db717e5e07a779937ba2e7188 | 5,520 | py | Python | pyannote/audio/cli/train.py | matakanobu/pyannote-audio | 7699a730f83240d0e8e04d0a626eedd9e3f623fe | [
"MIT"
] | null | null | null | pyannote/audio/cli/train.py | matakanobu/pyannote-audio | 7699a730f83240d0e8e04d0a626eedd9e3f623fe | [
"MIT"
] | null | null | null | pyannote/audio/cli/train.py | matakanobu/pyannote-audio | 7699a730f83240d0e8e04d0a626eedd9e3f623fe | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020-2022 CNRS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pu... | 34.716981 | 82 | 0.70779 |
5eee77e8e3617f89ea8f5b127fd72b7a39522cae | 403 | py | Python | board_project/asgi.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | board_project/asgi.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | board_project/asgi.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | """
ASGI config for board_project project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO... | 23.705882 | 78 | 0.791563 |
40e057650fc537e4efa8e47c37f7aab9c37aec5c | 1,853 | py | Python | src/probflow/callbacks/learning_rate_scheduler.py | chiragnagpal/probflow | 1ba0619cd4f482a015cd25633d2f113d5d0f3476 | [
"MIT"
] | 134 | 2019-02-18T09:45:35.000Z | 2022-03-26T22:17:34.000Z | src/probflow/callbacks/learning_rate_scheduler.py | chiragnagpal/probflow | 1ba0619cd4f482a015cd25633d2f113d5d0f3476 | [
"MIT"
] | 44 | 2019-04-18T17:41:33.000Z | 2021-09-14T00:40:55.000Z | src/probflow/callbacks/learning_rate_scheduler.py | chiragnagpal/probflow | 1ba0619cd4f482a015cd25633d2f113d5d0f3476 | [
"MIT"
] | 18 | 2019-10-17T05:45:16.000Z | 2022-03-03T11:58:02.000Z | import matplotlib.pyplot as plt
from .callback import Callback
class LearningRateScheduler(Callback):
"""Set the learning rate as a function of the current epoch
Parameters
----------
fn : callable
Function which takes the current epoch as an argument and returns a
learning rate.
... | 28.075758 | 79 | 0.59633 |
172e2d03b7869e0a51dcd9f034b9f056230716de | 21,741 | py | Python | tests/test_services/test_set_2457.py | yangyimincn/ucloud-sdk-python3 | 9732d67f32ec5f46467458ba655c44c193a6bbff | [
"Apache-2.0"
] | 37 | 2019-06-19T09:41:34.000Z | 2022-02-18T08:06:00.000Z | tests/test_services/test_set_2457.py | yangyimincn/ucloud-sdk-python3 | 9732d67f32ec5f46467458ba655c44c193a6bbff | [
"Apache-2.0"
] | 90 | 2019-08-09T09:27:33.000Z | 2022-03-30T15:54:55.000Z | tests/test_services/test_set_2457.py | yangyimincn/ucloud-sdk-python3 | 9732d67f32ec5f46467458ba655c44c193a6bbff | [
"Apache-2.0"
] | 19 | 2019-06-13T02:46:01.000Z | 2021-11-01T07:22:18.000Z | """ Code is generated by ucloud-model, DO NOT EDIT IT. """
import pytest
import logging
from ucloud.core import exc
from ucloud.testing import env, funcs, op, utest
logger = logging.getLogger(__name__)
scenario = utest.Scenario(2457)
@pytest.mark.skipif(env.is_ut(), reason=env.get_skip_reason())
def test_set_245... | 51.397163 | 4,095 | 0.79449 |
29f360803bbe0577da71a6ed541a8d1aca0f5315 | 20,723 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/foreman/katello.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/foreman/katello.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/remote_management/foreman/katello.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2016, Eric D Helms <ericdhelms@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version... | 33.424194 | 154 | 0.624089 |
fb47021cd797ce1ff920b46b3ba691cd016b2d9c | 1,309 | py | Python | face_detection.py | AnishSangrulkar/AI_Proctoring | 9ca149fdf8400d55afda27a738026318be2ba125 | [
"MIT"
] | null | null | null | face_detection.py | AnishSangrulkar/AI_Proctoring | 9ca149fdf8400d55afda27a738026318be2ba125 | [
"MIT"
] | null | null | null | face_detection.py | AnishSangrulkar/AI_Proctoring | 9ca149fdf8400d55afda27a738026318be2ba125 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
modelFile = "res10_300x300_ssd_iter_140000.caffemodel"
configFile = "deploy.prototxt.txt"
net = cv2.dnn.readNetFromCaffe(configFile, modelFile)
#cap = cv2.VideoCapture(0)
#frame=cv2.imread('2020-10-30-201038.jpg')
def main(frame):
frame = cv2.flip(frame, 1)
h, ... | 29.75 | 111 | 0.582124 |
c7a141d4d334827bdad874f53c02799b3be75fff | 27,751 | py | Python | server/www/teleport/webroot/app/controller/system.py | hgahhja56465/teleport | 56115234dc7bc61ac40eb6ff19fbbd44de7e50ff | [
"Apache-2.0"
] | 640 | 2018-09-12T03:14:13.000Z | 2022-03-30T04:38:09.000Z | server/www/teleport/webroot/app/controller/system.py | hgahhja56465/teleport | 56115234dc7bc61ac40eb6ff19fbbd44de7e50ff | [
"Apache-2.0"
] | 175 | 2018-09-10T19:52:20.000Z | 2022-03-30T04:37:30.000Z | server/www/teleport/webroot/app/controller/system.py | hgahhja56465/teleport | 56115234dc7bc61ac40eb6ff19fbbd44de7e50ff | [
"Apache-2.0"
] | 230 | 2018-09-13T02:40:49.000Z | 2022-03-29T11:53:58.000Z | # -*- coding: utf-8 -*-
import datetime
import hashlib
import json
import shutil
import time
import app.model.system as system_model
import tornado.gen
from app.app_ver import TP_SERVER_VER
from app.base import mail
from app.base.configs import tp_cfg
from app.base.controller import TPBaseHandler, TPBase... | 35.396684 | 138 | 0.501099 |
9e201473bcb6a7dbd0590f53e51e82495cf80c27 | 4,447 | py | Python | Chapter17/05_how_to_optimize_a_NN_architecture.py | kksonge/Hands-On-Machine-Learning-for-Algorithmic-Trading | 01516a70f777c78673feaac16a477b457d0381b4 | [
"MIT"
] | 944 | 2019-01-06T22:44:31.000Z | 2022-03-30T14:47:33.000Z | Chapter17/05_how_to_optimize_a_NN_architecture.py | kksonge/Hands-On-Machine-Learning-for-Algorithmic-Trading | 01516a70f777c78673feaac16a477b457d0381b4 | [
"MIT"
] | 14 | 2019-01-05T08:34:25.000Z | 2021-11-15T01:11:54.000Z | Chapter17/05_how_to_optimize_a_NN_architecture.py | Nnamdi-sys/Machine-Learning-for-Algo-Trading | 9082adece2bbdc6375eb58e2253addf0cbbdfd07 | [
"MIT"
] | 598 | 2018-12-09T00:09:50.000Z | 2022-03-18T10:21:13.000Z | # coding: utf-8
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import pandas as pd
from joblib import dump
from sklearn.model_selection import train_test_split, GridSearchCV, StratifiedKFold
from sklearn.metrics import roc_auc_score
import tensorflow as tf
from keras.models import Sequential
f... | 31.316901 | 100 | 0.638408 |
e372b1cbb27f9c8cd4d0cef757a1712f7fcf501c | 148 | py | Python | mall_spider/utils/__init__.py | 524243642/taobao_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 12 | 2019-06-06T12:23:08.000Z | 2021-06-15T17:50:07.000Z | mall_spider/utils/__init__.py | 524243642/mall_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 3 | 2021-03-31T19:02:47.000Z | 2022-02-11T03:43:15.000Z | mall_spider/utils/__init__.py | 524243642/taobao_spider | 9cdaed1c7a67fc1f35ee2af2e18313cedf3b1e5e | [
"Unlicense"
] | 5 | 2019-09-17T03:55:56.000Z | 2020-12-18T03:34:03.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
default_connect_timeout = 5.0
default_timeout = 10.0
default_retry = 3
default_retry_interval = 0.1
| 18.5 | 29 | 0.722973 |
bf6997fd55c0c8984972d5635f501dec8cd184ed | 9,526 | py | Python | integration-testing/test/test_bonding.py | srinivasreddy/CasperLabs | bb299b3257d8291ccf713e4a27d62d7d486582f5 | [
"Apache-2.0"
] | null | null | null | integration-testing/test/test_bonding.py | srinivasreddy/CasperLabs | bb299b3257d8291ccf713e4a27d62d7d486582f5 | [
"Apache-2.0"
] | null | null | null | integration-testing/test/test_bonding.py | srinivasreddy/CasperLabs | bb299b3257d8291ccf713e4a27d62d7d486582f5 | [
"Apache-2.0"
] | null | null | null | from test.cl_node.common import BONDING_CONTRACT, UNBONDING_CONTRACT
from test.cl_node.client_parser import parse_show_block
from test.cl_node.client_parser import parse_show_blocks
from test.cl_node.casperlabs_network import OneNodeNetwork
from typing import List
def bond_to_the_network(network: OneNodeNetwork, cont... | 32.623288 | 101 | 0.691686 |
4e638bb76013276f2e3f5a1aaad71bcca78e2bf1 | 1,396 | py | Python | py_cron_expression/util.py | vubon/PyCronExpression | 3d8dae321b3f243cae05101c85a1f367dd118e31 | [
"MIT"
] | 3 | 2020-05-03T06:49:18.000Z | 2020-05-28T12:09:53.000Z | py_cron_expression/util.py | vubon/PyCronExpression | 3d8dae321b3f243cae05101c85a1f367dd118e31 | [
"MIT"
] | null | null | null | py_cron_expression/util.py | vubon/PyCronExpression | 3d8dae321b3f243cae05101c85a1f367dd118e31 | [
"MIT"
] | null | null | null | """
@since: 26 may, 2020
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
Linux platf... | 29.702128 | 94 | 0.47063 |
b75af80e8bd7586d1657caf2b4802aafad2cd822 | 1,537 | py | Python | lab-server/controller/setup.py | CoderDojoTC/python-minecraft | d78ff6d30e47b887f5db12f23de81dd716576c0b | [
"MIT"
] | 31 | 2015-01-30T22:30:55.000Z | 2022-02-12T17:10:26.000Z | lab-server/controller/setup.py | mikemccllstr/mikemccllstr-python-minecraft | b1765ad7bb39dfad00944a7d8fa914484c88f95a | [
"MIT"
] | 16 | 2015-01-20T23:56:43.000Z | 2016-01-03T04:14:04.000Z | lab-server/controller/setup.py | mikemccllstr/mikemccllstr-python-minecraft | b1765ad7bb39dfad00944a7d8fa914484c88f95a | [
"MIT"
] | 24 | 2015-02-21T22:52:43.000Z | 2021-12-14T00:18:34.000Z | #!/usr/bin/env python
import lsc
from setuptools import setup, find_packages
try:
long_description = open('README.rst', 'rt').read()
except IOError:
long_description = ''
setup(
name='lsc',
version=lsc.__version__,
packages=find_packages(),
description='CoderDojo Twin Cities, Python-Minecr... | 22.940299 | 81 | 0.579701 |
848d5d6804e7a4e9e8a8cb6560f112bfabbb8669 | 2,173 | py | Python | server/helper-code/visualizer-tensorboard/w2v_visualizer.py | malakhovks/word2cluster | 5d191a6dff1bea9d1e4ad024a004f7a2a4f1f130 | [
"MIT"
] | 4 | 2021-01-10T13:42:20.000Z | 2021-08-01T12:14:48.000Z | server/helper-code/visualizer-tensorboard/w2v_visualizer.py | malakhovks/word2cluster | 5d191a6dff1bea9d1e4ad024a004f7a2a4f1f130 | [
"MIT"
] | null | null | null | server/helper-code/visualizer-tensorboard/w2v_visualizer.py | malakhovks/word2cluster | 5d191a6dff1bea9d1e4ad024a004f7a2a4f1f130 | [
"MIT"
] | null | null | null | import sys
import os
import pathlib
import numpy as np
from gensim.models.keyedvectors import KeyedVectors
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
def visualize(model, output_path):
meta_file = "w2x_metadata.tsv"
placeholder = np.zeros((len(model.wv.index2word), mo... | 38.122807 | 107 | 0.693051 |
ece3e1e6d527304ffc1d83612a8c6c8466c63b64 | 1,673 | py | Python | tests/cluster_tests/InternalParallel/InternalParallelExtModel/lorentzAttractor.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 159 | 2017-03-24T21:07:06.000Z | 2022-03-20T13:44:40.000Z | tests/cluster_tests/InternalParallel/InternalParallelExtModel/lorentzAttractor.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 1,667 | 2017-03-27T14:41:22.000Z | 2022-03-31T19:50:06.000Z | tests/cluster_tests/InternalParallel/InternalParallelExtModel/lorentzAttractor.py | rinelson456/raven | 1114246136a2f72969e75b5e99a11b35500d4eef | [
"Apache-2.0"
] | 95 | 2017-03-24T21:05:03.000Z | 2022-03-08T17:30:22.000Z | # Copyright 2017 Battelle Energy Alliance, 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 agreed t... | 31.566038 | 89 | 0.673042 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.