hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1aba897572031b3fd4657a4d12834cf14e3920b9 | 648 | py | Python | manage.py | chiragjn/sentry_structlog_experiments | e98a9caf48899c6c244a687c1f208f8929d83a41 | [
"MIT"
] | 4 | 2020-05-07T11:49:57.000Z | 2020-06-08T05:49:04.000Z | manage.py | chiragjn/sentry_structlog_experiments | e98a9caf48899c6c244a687c1f208f8929d83a41 | [
"MIT"
] | null | null | null | manage.py | chiragjn/sentry_structlog_experiments | e98a9caf48899c6c244a687c1f208f8929d83a41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sentry_structlog_experiments.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:... | 29.454545 | 92 | 0.692901 |
1abaab83a38226b8fd71589e8c937aa9ed66d7ec | 6,728 | py | Python | examples/time_sequential.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | examples/time_sequential.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | examples/time_sequential.py | dec-heim/nempy | 10c304cd6c756ffb9d8038c45b6b8251584d7a0c | [
"BSD-3-Clause"
] | null | null | null | # Notice:
# - This script downloads large volumes of historical market data from AEMO's nemweb
# portal. The boolean on line 20 can be changed to prevent this happening repeatedly
# once the data has been downloaded.
# - This example also requires plotly >= 5.3.1, < 6.0.0 and kaleido == 0.2.1
# pip install plotly... | 41.276074 | 86 | 0.69025 |
1abab9b858c4c197e589f15e1d9ff9d731c8a00a | 780 | py | Python | boo/errors.py | AirVetra/boo | bb8404c48a6f17402a98a88454fdd876184c35c1 | [
"MIT"
] | 1 | 2019-12-06T21:13:22.000Z | 2019-12-06T21:13:22.000Z | boo/errors.py | AirVetra/boo | bb8404c48a6f17402a98a88454fdd876184c35c1 | [
"MIT"
] | null | null | null | boo/errors.py | AirVetra/boo | bb8404c48a6f17402a98a88454fdd876184c35c1 | [
"MIT"
] | null | null | null | class UnclassifiableCodeError(ValueError):
pass
class WrongYearError(ValueError):
def __init__(self, year):
super().__init__(f"Year not supported: {year}.\n"
"Try year starting 2012 up to recent year.\n"
"Update definitions in year.py if necessary")
... | 26.896552 | 70 | 0.607692 |
1abaef74aaf6567b7d5ad92435650fef4ebcfa57 | 4,057 | py | Python | scripts/create_mls_trans.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 608 | 2020-10-15T16:11:23.000Z | 2022-03-28T21:23:55.000Z | scripts/create_mls_trans.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 174 | 2020-10-15T16:14:27.000Z | 2022-03-28T11:48:56.000Z | scripts/create_mls_trans.py | huylenguyen806/vnasrg | caee2e79d0eb9d1a997f5df8e2ba3ee7f0a1bcae | [
"Apache-2.0"
] | 191 | 2020-10-16T01:24:15.000Z | 2022-03-28T10:30:55.000Z | # Copyright 2020 M. Yusuf Sarıgöz (@monatis)
#
# 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... | 35.902655 | 118 | 0.671432 |
1abb12775a4d5a6bd558e7202461439c4cd1c20f | 4,965 | py | Python | ryu/openexchange/domain/translation.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | 3 | 2017-05-16T11:24:05.000Z | 2021-05-15T13:59:44.000Z | ryu/openexchange/domain/translation.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | null | null | null | ryu/openexchange/domain/translation.py | xiaobinglu/Ryu-Qos | 0da078745a9c07a53905b542b4adad058fd1fd2d | [
"Apache-2.0"
] | 2 | 2016-08-20T18:07:16.000Z | 2017-05-16T11:24:07.000Z | """
Translate Packet_out and Flow_mod.
Author:www.muzixing.com
Date Work
2015/9/1 new Translation.
"""
from ryu.base import app_manager
from ryu.ofproto import ofproto_v1_3
from ryu.controller.handler import set_ev_cls
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.lib.packet i... | 37.330827 | 79 | 0.603424 |
1abb3033fd92f329f53d2a7f6e52b8af36e2df72 | 423 | py | Python | action_detection/SW_GCN/mish.py | AnonymousCI/MTMAssemblyStepEstimation | d7411fe9c1b6855988304c25057771d94428407e | [
"MIT"
] | 1 | 2022-03-25T20:53:11.000Z | 2022-03-25T20:53:11.000Z | action_detection/SW_GCN/mish.py | AnonymousCI/MTMAssemblyStepEstimation | d7411fe9c1b6855988304c25057771d94428407e | [
"MIT"
] | null | null | null | action_detection/SW_GCN/mish.py | AnonymousCI/MTMAssemblyStepEstimation | d7411fe9c1b6855988304c25057771d94428407e | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
"""
This implementation is based on: https://github.com/DelamareMicka/SW-GCN
"""
class Mish(nn.Module): # basically a softmax layer
def init(self):
super().init()
def forward(self, x):
# inlining this saves 1 second per epoc... | 24.882353 | 102 | 0.669031 |
1abb3d5a4f077a66a3fc0f92a581135cddb5f92a | 67 | py | Python | chirun/plastex/tikz-3dplot/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 5 | 2021-12-06T15:57:24.000Z | 2022-01-24T20:34:00.000Z | chirun/plastex/tikz-3dplot/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 38 | 2021-12-09T13:16:46.000Z | 2022-03-30T11:42:13.000Z | chirun/plastex/tikz-3dplot/__init__.py | sthagen/chirun-ncl-chirun | 45897319d5203b9867b5d6e00b2db1aa90a6580c | [
"Apache-2.0"
] | 1 | 2022-01-17T17:41:35.000Z | 2022-01-17T17:41:35.000Z | from chirun.plastex import VerbatimEnvironment # noqa: F401, F403
| 33.5 | 66 | 0.80597 |
1abb40f94bc68ea064977aa41bb10613a7e6df24 | 5,235 | py | Python | advertorch/advertorch/attacks/spatial.py | sleepstagingrest/rest | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 18 | 2020-02-03T07:14:40.000Z | 2021-12-20T18:45:43.000Z | advertorch/advertorch/attacks/spatial.py | sleepstagingrest/rest | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 11 | 2020-01-28T23:16:25.000Z | 2022-02-10T01:04:56.000Z | advertorch/advertorch/attacks/spatial.py | sleepstagingrest/REST | cf0de7ae82b6b74fe23e9d057214970cd3c9672d | [
"MIT"
] | 2 | 2020-08-20T08:15:09.000Z | 2021-02-23T07:30:40.000Z | # Copyright (c) 2018-present, Royal Bank of Canada.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __futu... | 36.354167 | 74 | 0.578606 |
1abb453c33149af623bc6490f9bec9583b2d6fd5 | 425 | py | Python | tests/test_html_tags/test_figure_tag.py | bharadwajyarlagadda/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 2 | 2016-10-11T03:57:30.000Z | 2018-01-19T20:13:47.000Z | tests/test_html_tags/test_figure_tag.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 16 | 2016-08-19T04:08:45.000Z | 2016-09-27T03:26:39.000Z | tests/test_html_tags/test_figure_tag.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 1 | 2016-10-11T03:57:33.000Z | 2016-10-11T03:57:33.000Z | # -*- coding: utf-8 -*-
from ..fixtures import parametrize
from korona.html.tags import Figure
from korona.templates.html.tags import figure
@parametrize('attributes', [
({'text': 'abcd'})
])
def test_construct_figure_tag(attributes):
"""Test for validating whether the figure tag is constructed correctly or... | 23.611111 | 77 | 0.698824 |
1abb525d24c744194a511fa1d989614ac3aad2d8 | 725 | py | Python | src/stactools/goes/errors.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | 5 | 2021-07-06T21:48:11.000Z | 2021-11-09T15:57:45.000Z | src/stactools/goes/errors.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | 5 | 2021-06-15T16:16:51.000Z | 2021-09-07T14:44:57.000Z | src/stactools/goes/errors.py | stactools-packages/stactools-goes | 8d81c9644c02d3c79ac369228d659d065e0e6889 | [
"Apache-2.0"
] | null | null | null | class CogifyError(Exception):
"""Raises if there is an error during cogification."""
pass
class GOESRFileNameError(Exception):
"""Errors related to parsing or creating GOES-R ABI Level 2 file names"""
pass
class GOESRAttributeError(Exception):
"""Raised when unable to parse an attribute from a G... | 23.387097 | 77 | 0.710345 |
1abb6d6291b2e9d5e82c6462bb7b8e6948e47784 | 4,883 | py | Python | flexget/plugins/output/subtitles.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | 1 | 2018-05-02T21:14:50.000Z | 2018-05-02T21:14:50.000Z | flexget/plugins/output/subtitles.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/output/subtitles.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.moves.xmlrpc.client import ServerProxy
import re
import difflib
import os.path
import logging
from flexget import plugin
from flexget.event import event
log = logg... | 34.878571 | 114 | 0.557649 |
1abb77f8992997122b8b238c04a5107c57e91b5a | 2,530 | py | Python | axonius_api_client/cli/grp_system/grp_users/cmd_add.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/cli/grp_system/grp_users/cmd_add.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/cli/grp_system/grp_users/cmd_add.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
from ...context import CONTEXT_SETTINGS, click
from ...options import AUTH, add_options
from .grp_common import EXPORT, handle_export
USER_NAME = click.option(
"--name",
"-n",
"name",
help="Name of user",
required=True,
... | 22.192982 | 76 | 0.640316 |
1abbd035eac4d84779a5d83bc11038b5e815e765 | 1,926 | py | Python | data/transcoder_evaluation_gfg/python/SMALLEST_SUM_CONTIGUOUS_SUBARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/SMALLEST_SUM_CONTIGUOUS_SUBARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/SMALLEST_SUM_CONTIGUOUS_SUBARRAY.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import sys
def f_gold ( arr , n ) :
min_ending_here = sys.maxsize
min_so_far = sys.maxsize
for i in range ( n ) :
... | 48.15 | 203 | 0.504154 |
1abc06075c3a9a161f25cec548001610ec175049 | 7,044 | py | Python | docker_zabbix_sender/zabbix_sender.py | tristan0x/zabbix-containers-sender | 517cfb3bc20fa197fc01c025699f4860ffc7b792 | [
"Apache-2.0"
] | 11 | 2015-02-26T04:50:04.000Z | 2017-04-03T08:30:49.000Z | docker_zabbix_sender/zabbix_sender.py | tristan0x/zabbix-containers-sender | 517cfb3bc20fa197fc01c025699f4860ffc7b792 | [
"Apache-2.0"
] | 9 | 2015-03-05T06:23:46.000Z | 2015-12-02T22:02:21.000Z | docker_zabbix_sender/zabbix_sender.py | tristan0x/docker-zabbix-sender | 517cfb3bc20fa197fc01c025699f4860ffc7b792 | [
"Apache-2.0"
] | 11 | 2015-03-12T02:06:54.000Z | 2017-04-27T21:15:32.000Z | # encoding: utf-8
import argparse
import logging
import os
import subprocess
import signal
import sys
import tempfile
from docker import Client
from docker.utils import kwargs_from_env
from .endpoint import EndPoint
from .collector import ContainerStatsEmitter
LOGGER = logging.getLogger(__name__)
class ZabbixSende... | 32.915888 | 121 | 0.602215 |
1abc20bf4395fc01f43dfd33058274dbf373c14f | 2,239 | py | Python | dear_petition/petition/migrations/0018_auto_20200407_1720.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 4 | 2020-04-01T14:42:45.000Z | 2021-12-12T21:11:11.000Z | dear_petition/petition/migrations/0018_auto_20200407_1720.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 142 | 2019-08-12T19:08:34.000Z | 2022-03-29T23:05:35.000Z | dear_petition/petition/migrations/0018_auto_20200407_1720.py | robert-w-gries/dear-petition | 35244afc8e967b41ae5265ae31fd13b26e4e835a | [
"MIT"
] | 8 | 2020-02-04T20:37:00.000Z | 2021-03-28T13:28:32.000Z | # Generated by Django 2.2.10 on 2020-04-07 17:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("petition", "0017_auto_20200209_0229"),
]
operations = [
migrations.AddField(
model_name="ciprsrecord",
name="arrest... | 29.460526 | 63 | 0.475659 |
1abc220ff8f7645e1102f13b3457234342c640be | 484 | py | Python | myproject/common/templatetags/helpers.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | 3 | 2018-08-15T16:17:19.000Z | 2020-01-13T22:20:49.000Z | myproject/common/templatetags/helpers.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | 45 | 2018-06-23T18:02:28.000Z | 2021-08-25T14:46:12.000Z | myproject/common/templatetags/helpers.py | sert121/privacy-sharing | 69f712b0524361c8a3b4db0574a13ce914222695 | [
"MIT"
] | null | null | null | from django import template
__author__ = "Alex Laird"
__copyright__ = "Copyright 2018, Alex Laird"
__version__ = "0.2.0"
register = template.Library()
@register.simple_tag
def active(request, pattern):
"""
Returns 'active' if the give pattern is in the current URL.
"""
try:
if (request.path ... | 23.047619 | 101 | 0.632231 |
1abc435dd414ca56af62406891dd2420627f6ed0 | 450 | py | Python | annotypes/py3_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 2 | 2019-08-16T11:40:21.000Z | 2019-10-25T12:43:48.000Z | annotypes/py3_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 3 | 2019-03-12T11:03:23.000Z | 2019-07-02T10:24:28.000Z | annotypes/py3_examples/reusecls.py | thomascobb/annotypes | 3dac2e2970a67f667b707b0d248f58ac9a06551b | [
"Apache-2.0"
] | 1 | 2020-08-14T13:52:01.000Z | 2020-08-14T13:52:01.000Z | import time
from annotypes import WithCallTypes, add_call_types, Anno
from .simple import Simple
with Anno("Parameters to take"):
ASimple = Simple
class ReuseCls(WithCallTypes):
@add_call_types
def validate(self, params: ASimple) -> ASimple:
if params.exposure < 0.4:
params.exposure ... | 19.565217 | 57 | 0.68 |
1abc45b5f22be774e99eaf688f91a5f166d44191 | 28,852 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_03_02_preview/operations/_managed_cluster_snapshots_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 42.058309 | 216 | 0.670768 |
1abc5d3778dbe725862e8e8c225b207067533ccc | 14,398 | py | Python | src/tools/train_net.py | Harmonicahappy/MASTER-TF | 27e4306d827d50ee53ecbeeebba2259d2d37ecbe | [
"MIT"
] | 128 | 2020-07-06T06:59:17.000Z | 2022-03-29T21:28:48.000Z | src/tools/train_net.py | Harmonicahappy/MASTER-TF | 27e4306d827d50ee53ecbeeebba2259d2d37ecbe | [
"MIT"
] | 19 | 2020-07-23T07:16:49.000Z | 2022-02-09T23:49:28.000Z | src/tools/train_net.py | Harmonicahappy/MASTER-TF | 27e4306d827d50ee53ecbeeebba2259d2d37ecbe | [
"MIT"
] | 39 | 2020-07-20T01:15:25.000Z | 2021-09-18T13:04:18.000Z | # ______ __
# / \ / |
# /$$$$$$ | __ __ __ ______ _______ $$ | __ __
# $$ | $$ |/ | / | / | / \ / \ $$ | / | / |
# $$ | $$ |$$ | $$ | $$ |/$... | 42.724036 | 142 | 0.577441 |
1abc6802858d21729d59d15d2f19cb17c802600a | 16,700 | py | Python | aea/cli/generate_all_protocols.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | aea/cli/generate_all_protocols.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | aea/cli/generate_all_protocols.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2021-2022 Valory AG
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compl... | 35.232068 | 148 | 0.698922 |
1abc737a7d75587ad04bec3f6def26fc9c37a218 | 1,833 | py | Python | lang/python/queen.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/queen.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/queen.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | import sys
def queen(row, col):
def safe(l, k):
for idx, i in enumerate(l):
if i == k or i + idx + 1 == k or i - idx - 1 == k:
return False
return True
if col == 0:
return [[]]
lst = queen(row, col - 1)
return [[k] + l for k in range(row) for l in lst... | 23.5 | 75 | 0.491544 |
1abc800125addd6cc4fe321c58b9cc72c6ca437d | 4,325 | py | Python | hooks/lreplace_extracted_comments.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | null | null | null | hooks/lreplace_extracted_comments.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | 2 | 2021-08-25T04:56:36.000Z | 2022-02-25T16:47:39.000Z | hooks/lreplace_extracted_comments.py | mondeja/pre-commit-po-hooks | 6c96941357699b283c46528d34821631e1aff324 | [
"BSD-3-Clause"
] | null | null | null | """Replaces the beginning of extracted comments which starts with a string
by another value.
Returns an error code if the extracted comments were replaced.
"""
import argparse
import os
import re
import shutil
import sys
import tempfile
TMP_DIR = tempfile.gettempdir()
def lreplace_extracted_comments(
filename... | 27.03125 | 87 | 0.587514 |
1abc88fae9d27d4aa43ba0d349fa9cb40b967aa0 | 24,678 | py | Python | app/tests.py | vuhctreh/GSEP_F_In_The_Chat | a636b4fef9af9b844006257db30f6a181fd33e5d | [
"Apache-2.0"
] | null | null | null | app/tests.py | vuhctreh/GSEP_F_In_The_Chat | a636b4fef9af9b844006257db30f6a181fd33e5d | [
"Apache-2.0"
] | null | null | null | app/tests.py | vuhctreh/GSEP_F_In_The_Chat | a636b4fef9af9b844006257db30f6a181fd33e5d | [
"Apache-2.0"
] | null | null | null | """ Functions used for Unit Testing our web application """
from django.test import SimpleTestCase, TestCase, Client
from django.template.loader import render_to_string
from app.models import CafeTable, CoffeeUser, Message, Report, Task
client = Client()
class LogInTests(TestCase):
""" Unit tests for login page... | 40.126829 | 79 | 0.608396 |
1abc9ce1942e345a189eed23110397bf600c661f | 4,369 | py | Python | format_tableX.py | GinoBacallao/hgdp_tgp | b674a79ad60da4c78b0b55a77e4cc4f138e9057e | [
"MIT"
] | 1 | 2021-02-26T17:45:20.000Z | 2021-02-26T17:45:20.000Z | format_tableX.py | atgu/hgdp_tgp | b674a79ad60da4c78b0b55a77e4cc4f138e9057e | [
"MIT"
] | null | null | null | format_tableX.py | atgu/hgdp_tgp | b674a79ad60da4c78b0b55a77e4cc4f138e9057e | [
"MIT"
] | null | null | null | # The purpose of this script is to format and write out a matrix table which will be used to create 'table_x'
# for our resource manuscript
# author: Zan Koenig
import hail as hl
hl.init()
# reading in the post QC version of the merged dataset (with metadata)
mt = hl.read_matrix_table('gs://african-seq-data/hgdp_tgp/... | 33.868217 | 109 | 0.677272 |
1abcc0f1fe1574f96df32f06c642d0698a35b649 | 4,251 | py | Python | examples/l3dcube/animations.py | stewartadam/netl3d | a222b7fd65d61a3b8393409a8fe6888d55d949ce | [
"MIT"
] | 3 | 2016-12-09T07:30:26.000Z | 2021-04-18T13:50:11.000Z | examples/l3dcube/animations.py | stewartadam/netl3d | a222b7fd65d61a3b8393409a8fe6888d55d949ce | [
"MIT"
] | null | null | null | examples/l3dcube/animations.py | stewartadam/netl3d | a222b7fd65d61a3b8393409a8fe6888d55d949ce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Orchestrates individual shapes into animations, rotation animations every 10s
"""
import itertools
import pygame
import random
import time
import netl3d
from netl3d.hardware import l3dcube
def random_col(frame):
while True:
x = random.randint(0, frame.face_size-1)
y = random.rand... | 28.722973 | 79 | 0.635615 |
1abcf7bdeed4bd7c094a3ddaf287c9bd3345d48f | 1,888 | py | Python | challenges/cryptography/dot-matrix/solve/dot_matrix_solve.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 18 | 2021-02-22T00:09:27.000Z | 2022-02-28T14:23:33.000Z | challenges/cryptography/dot-matrix/solve/dot_matrix_solve.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | null | null | null | challenges/cryptography/dot-matrix/solve/dot_matrix_solve.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 6 | 2021-02-22T01:32:10.000Z | 2022-02-25T15:48:42.000Z | def mod_inv(p, q):
# calculate inverse of p mod q
if p < q:
return mod_inv(q, p)
else:
x0, y0, x1, y1 = 1, 0, 0, 1
x0, y0, x1, y1 = x1, y1, x0 - (p // q) * x1, y0-( p // q) * y1
p, q = q, p%q
while q != 0:
x0, y0, x1, y1 = x1, y1, x0 - (p // q) * x1, y0 - (p // q) * y1
p, q = q, p % q
return y0
d... | 28.179104 | 144 | 0.637182 |
1abd49e74993a86a07baeea0645539b75ac7ee63 | 6,029 | py | Python | CODEX.py | PrototypesProjects/CODEX.py | a6854b6602360296af1e483ca95ea5de161b37be | [
"MIT"
] | null | null | null | CODEX.py | PrototypesProjects/CODEX.py | a6854b6602360296af1e483ca95ea5de161b37be | [
"MIT"
] | null | null | null | CODEX.py | PrototypesProjects/CODEX.py | a6854b6602360296af1e483ca95ea5de161b37be | [
"MIT"
] | null | null | null | import argparse
import math
import random
from reportlab.lib.colors import black, white, Color, yellow
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.units import inch, cm
from reportlab.pdfbase.ttfonts import TTFont
FONT_NAME = "AnglicanText"
pdfmetrics.registe... | 34.062147 | 115 | 0.613866 |
1abd54418cf7f2e7fafeb85028da5ea4cd8b9a92 | 3,335 | py | Python | sarkas/potentials/coulomb.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | sarkas/potentials/coulomb.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | sarkas/potentials/coulomb.py | pwessels-uhh/sarkas | 78fb9f8106ed6b15fb67c22afea09593fed01730 | [
"MIT"
] | null | null | null | """
Module for handling Coulomb interaction
"""
import numpy as np
from numba import njit
import math as mt
def update_params(potential, params):
"""
Assign potential dependent simulation's parameters.
Parameters
----------
potential: sarkas.potentials.core.Potential
Potential's informat... | 26.895161 | 110 | 0.633583 |
1abd5bf3ff45b81fa65f9b3840abf1606e7afa92 | 2,081 | py | Python | configs/selfsup/_base_/models/resnet18_simsiam_wproject_kd.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/_base_/models/resnet18_simsiam_wproject_kd.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/_base_/models/resnet18_simsiam_wproject_kd.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | # model settings
model = dict(
type='SimSiamKD_PredMatching',
backbone=dict(
type='ResNet',
depth=18,
in_channels=3,
out_indices=[4], # 0: conv-1, x: stage-x
norm_cfg=dict(type='SyncBN'),
zero_init_residual=True),
neck=dict(
type='NonLinearNeck',
... | 31.059701 | 61 | 0.474772 |
1abd61c5f87bc7175a0085221cbfa8931c103818 | 4,588 | py | Python | contrib/workflow/workflow_parser.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | contrib/workflow/workflow_parser.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | contrib/workflow/workflow_parser.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Eli Carter <retracile@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also ava... | 33.246377 | 89 | 0.620314 |
1abd7c515172b6d604dfe87c1aded58ad1b6e3ac | 492 | py | Python | src/main/python/smv/__init__.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | src/main/python/smv/__init__.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | src/main/python/smv/__init__.py | shuangshuangwang/SMV | 021faece3f0fefca6051df8415789b14bc9a60ed | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
# Smv DataSet Framework
from smv.smvdataset import *
from smv.smvinput import *
from smv.smvapp import SmvApp
from smv.runconfig import SmvRunConfig
from smv.csv_attributes import CsvAttributes
from smv.helpers import SmvGroupedData
from smv.historical_validators import SmvHistoricalValidator, SmvHist... | 25.894737 | 85 | 0.841463 |
1abd7d014115ec374a23a7fadb0553ec5a6b30d9 | 3,574 | py | Python | Timetable/settings.py | kmazi/Timetable | eb320a0ca3726bfdbb5d8c49b97a09da097207f5 | [
"MIT"
] | null | null | null | Timetable/settings.py | kmazi/Timetable | eb320a0ca3726bfdbb5d8c49b97a09da097207f5 | [
"MIT"
] | 3 | 2020-02-11T23:07:35.000Z | 2021-06-10T18:18:12.000Z | Timetable/settings.py | kmazi/Timetable | eb320a0ca3726bfdbb5d8c49b97a09da097207f5 | [
"MIT"
] | null | null | null | """
Django settings for Timetable project.
Generated by 'django-admin startproject' using Django 1.11.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import ... | 26.671642 | 91 | 0.683548 |
1abdc2998e44ef4e674a5299ceea0c61a77432b5 | 1,789 | py | Python | src/pipelines/epidemiology/es_datadista.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | src/pipelines/epidemiology/es_datadista.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | src/pipelines/epidemiology/es_datadista.py | harrisonzhu508/data | a3b95ced4abad6653d20f67f3f285abeeb0c2b25 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Dict, List
from pandas import DataFrame, concat, merge
from lib.pipeline import DefaultPipeline
from lib.utils import grouped_diff
from lib.time import datetime_isoformat
class DatadistaPipeline(DefaultPipeline):
url_base = "https://raw.github.com/datadista/datasets/master/COVID%2019"
... | 38.06383 | 94 | 0.610956 |
1abdd23347aa6d542a84e123414dc028b7cc3e98 | 20,478 | py | Python | bigml/tests/test_23_local_model_info.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/test_23_local_model_info.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/test_23_local_model_info.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2015-2019 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 68.26 | 286 | 0.583944 |
1abdd43e39e5f48dd54cb965bf422a1cc1b19af0 | 222 | py | Python | example/dailyweatherdata.py | ckaus/PyDWD | c37ceeb3f3a7721d8d3edd29d550adb4bcce6eb3 | [
"MIT"
] | 2 | 2016-10-07T16:53:52.000Z | 2017-07-03T09:06:20.000Z | example/dailyweatherdata.py | ckaus/PyDWD | c37ceeb3f3a7721d8d3edd29d550adb4bcce6eb3 | [
"MIT"
] | 2 | 2017-01-12T23:59:17.000Z | 2017-07-14T22:54:21.000Z | example/dailyweatherdata.py | ckaus/PyDWD | c37ceeb3f3a7721d8d3edd29d550adb4bcce6eb3 | [
"MIT"
] | 2 | 2017-03-13T16:33:36.000Z | 2018-10-08T13:42:08.000Z | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from pydwd.crawler.dailycrawler import DailyCrawler
crawler = DailyCrawler()
print crawler.by_city('Berlin-Tegel')
| 22.2 | 82 | 0.765766 |
1abde4485698a250833ceb87f50b16a242008d0b | 4,663 | py | Python | core/argo/core/network/s-vae/hyperspherical_vae/distributions/hyperspherical_uniform.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | 164 | 2018-06-29T09:19:38.000Z | 2022-02-12T01:39:58.000Z | hyperspherical_vae_tensorflow/distributions/hyperspherical_uniform.py | pimdh/svae-temp | 49d3974e66abc761312432f28ae57fe714d17451 | [
"MIT"
] | 2 | 2018-12-24T09:41:31.000Z | 2020-02-18T14:14:25.000Z | hyperspherical_vae_tensorflow/distributions/hyperspherical_uniform.py | pimdh/svae-temp | 49d3974e66abc761312432f28ae57fe714d17451 | [
"MIT"
] | 27 | 2018-08-01T17:41:28.000Z | 2021-12-21T22:39:05.000Z | # 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... | 39.516949 | 111 | 0.661591 |
1abdff70a7c277612085afbb9381e65aadf1810d | 4,253 | py | Python | harvest/models/beastxml.py | lmaurits/harvest | df6b549096da8ae2f4ed38aa2be19c7e82fa60e3 | [
"BSD-2-Clause"
] | 1 | 2016-10-23T13:24:44.000Z | 2016-10-23T13:24:44.000Z | harvest/models/beastxml.py | lmaurits/harvest | df6b549096da8ae2f4ed38aa2be19c7e82fa60e3 | [
"BSD-2-Clause"
] | null | null | null | harvest/models/beastxml.py | lmaurits/harvest | df6b549096da8ae2f4ed38aa2be19c7e82fa60e3 | [
"BSD-2-Clause"
] | null | null | null | import codecs
import tempfile
import xml.etree.ElementTree as ET
def indent(elem, level=0):
i = "\n" + level*" "
if len(elem):
if not elem.text or not elem.text.strip():
elem.text = i + " "
if not elem.tail or not elem.tail.strip():
elem.tail = i
for elem in el... | 43.397959 | 250 | 0.601928 |
1abe6a346b6ea35aa7749cbbd0466b10c4c15757 | 3,368 | py | Python | DAFNI-wrappers/base-image/dockerFiles/run_nismod.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 5 | 2019-12-18T15:27:28.000Z | 2020-10-03T09:10:23.000Z | DAFNI-wrappers/base-image/dockerFiles/run_nismod.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 11 | 2019-12-18T14:53:03.000Z | 2021-12-30T07:26:46.000Z | DAFNI-wrappers/base-image/dockerFiles/run_nismod.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 3 | 2019-12-18T15:27:39.000Z | 2022-02-25T07:04:06.000Z | import os
import yaml
from pathlib import Path
from extract_data import extract
from utils import run_process, is_truthy
from settings import (
INPUT_PATH,
NISMOD_PATH,
RESULTS_PATH,
TRANSPORT_ADDITIONAL_OUTPUTS_PATH,
model_to_run,
part_of_sos_model,
sector_model,
timestep,
use_gener... | 35.829787 | 116 | 0.557601 |
1abe7190816973d23f91adcace593a8c2db8c84b | 7,669 | py | Python | luminos/browser/webengine/WebEngineScheme.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | luminos/browser/webengine/WebEngineScheme.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | luminos/browser/webengine/WebEngineScheme.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | """QtWebEngine specific luminos://* and custom uri handlers and glue code."""
import os
import mimetypes
from PyQt5.QtCore import QBuffer, QIODevice, QUrl
from PyQt5.QtWebEngineCore import QWebEngineUrlSchemeHandler, QWebEngineUrlRequestJob
try:
from PyQt5.QtWebEngineCore import QWebEngineUrlScheme # type: ignor... | 39.735751 | 117 | 0.579997 |
1abe8f37c6f6e2dea892b652e102ee84282d55ed | 7,828 | py | Python | exercises/classifiers_evaluation.py | Ronkob/IML.HUJI | 4de24d14ade573771b9fafb291ee3a83d640566e | [
"MIT"
] | null | null | null | exercises/classifiers_evaluation.py | Ronkob/IML.HUJI | 4de24d14ade573771b9fafb291ee3a83d640566e | [
"MIT"
] | null | null | null | exercises/classifiers_evaluation.py | Ronkob/IML.HUJI | 4de24d14ade573771b9fafb291ee3a83d640566e | [
"MIT"
] | null | null | null | import numpy as np
import sys
from IMLearn.learners.classifiers import Perceptron, LDA, GaussianNaiveBayes
from typing import Tuple
from typing import NoReturn
from utils import *
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from math import atan2, pi
def load_dataset(filename: str) ->... | 45.511628 | 121 | 0.579075 |
1abec44ecd791603930d6d02100c726bcafa6051 | 7,951 | py | Python | HA_Addon/rvc2mqtt/entity/tank_warmer.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | 1 | 2022-01-30T18:02:13.000Z | 2022-01-30T18:02:13.000Z | rvc2mqtt/entity/tank_warmer.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | null | null | null | rvc2mqtt/entity/tank_warmer.py | ccirrinc/rvc2mqtt | 108328323357e55be6242887b964ca936ea7b3fc | [
"Apache-2.0"
] | null | null | null | """
A Tank Heater
Copyright 2022 Sean Brogan
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by appl... | 42.292553 | 113 | 0.629732 |
1abed596c4bc82db1ab5c38ac343c669d3f3a854 | 3,852 | py | Python | src/visitpy/visit_flow/flow/tests/test_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/tests/test_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/tests/test_generator.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: test_parser.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 8/29/2012
descriptio... | 34.088496 | 83 | 0.585929 |
1abeed95bf7eafc91d3a5f161c66d9f2f9006187 | 892 | py | Python | lang/python/concurrent/timeoutThread.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/concurrent/timeoutThread.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/concurrent/timeoutThread.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | from functools import wraps
import errno
import os
import signal
import time
class TimeoutError(Exception):
pass
def timeout(seconds=10, error_message=os.strerror(errno.ETIME)):
def decorator(func):
def _handle_timeout(signum, frame):
raise TimeoutError(error_message)
def wrappe... | 17.84 | 64 | 0.596413 |
1abf3b0d8c63fa9774a8ebe86174c0f08148d6f7 | 1,786 | py | Python | portals/wwits/groups/service/wo_labor_line_update/schemas.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/service/wo_labor_line_update/schemas.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | portals/wwits/groups/service/wo_labor_line_update/schemas.py | jalanb/portals | 7a5360b48547719d3fbe50790f08eaf5571148dd | [
"ADSL"
] | null | null | null | from marshmallow import fields, post_load
from portals.wwits.apis.rest import BaseSchemaExcludeFields as Schema
from .models import ParmModel, WOLaborLineUpdateModel
class ParmSchema(Schema):
UserID = fields.Str()
Version = fields.Str()
Env = fields.Str()
Source = fields.Str()
Session = fields.Int... | 29.278689 | 69 | 0.674692 |
1abf631e22c19fd13123760a423ca358bb6bf2c8 | 5,820 | py | Python | sktime/series_as_features/compose/_pipeline.py | FedericoGarza/sktime | b21cdd81453abd34c72b42d4b2273b49d29eba30 | [
"BSD-3-Clause"
] | null | null | null | sktime/series_as_features/compose/_pipeline.py | FedericoGarza/sktime | b21cdd81453abd34c72b42d4b2273b49d29eba30 | [
"BSD-3-Clause"
] | null | null | null | sktime/series_as_features/compose/_pipeline.py | FedericoGarza/sktime | b21cdd81453abd34c72b42d4b2273b49d29eba30 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Feature union pipeline element."""
from warnings import warn
import pandas as pd
from sklearn import clone
from sktime.base import _HeterogenousMetaEstimator
from sktime.transformations.base import BaseTransformer
__all__ = ["FeatureUnion"]
__author__ = ["mloning, fkiraly"]
class Featur... | 37.070064 | 88 | 0.655326 |
1abf88a15e79781d48ea780398bee69b242c8781 | 6,705 | py | Python | docs/source/conf.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 4 | 2020-09-23T08:09:33.000Z | 2022-02-10T22:02:11.000Z | docs/source/conf.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 126 | 2020-09-16T22:25:59.000Z | 2022-03-29T17:15:27.000Z | docs/source/conf.py | DNPLab/DNPLab | 78999a4e8320b6476a5aa55d9884c49d74149edc | [
"MIT"
] | 5 | 2020-09-24T20:57:31.000Z | 2021-08-19T01:52:16.000Z | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup -----------------------------------... | 28.172269 | 88 | 0.643251 |
1abf8aa0a08dd36b58b8af1bb2aa486c35f4fdc5 | 1,944 | py | Python | luolearn/utils/multiclass.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | 4 | 2017-06-19T06:33:38.000Z | 2019-01-31T12:07:12.000Z | luolearn/utils/multiclass.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | null | null | null | luolearn/utils/multiclass.py | luoshao23/ML_algorithm | 6e94fdd0718cd892118fd036c7c5851cf3e6d796 | [
"MIT"
] | 1 | 2017-12-06T08:41:06.000Z | 2017-12-06T08:41:06.000Z | from collections import Sequence
import numpy as np
from scipy.sparse.base import spmatrix
from ..externals.six import string_types
def is_multilabel(y):
if hasattr(y, '__array__'):
y = np.asarray(y)
if not (hasattr(y, "shape") and y.ndim == 2 and y.shape[1] > 1):
return False
def type_of_... | 30.375 | 78 | 0.552469 |
1abfe7151de7e8920aa46e61e332c9f3cf9eb4b8 | 4,877 | py | Python | BGWpy/Abinit/abinitbgwflow.py | jonahhaber/BGWpy | 03ae0df2c7ddad833f679a69908abcb7b4adf9a2 | [
"BSD-3-Clause-LBNL"
] | 27 | 2015-11-19T06:14:56.000Z | 2022-02-11T18:03:26.000Z | BGWpy/Abinit/abinitbgwflow.py | jonahhaber/BGWpy | 03ae0df2c7ddad833f679a69908abcb7b4adf9a2 | [
"BSD-3-Clause-LBNL"
] | 5 | 2020-08-31T14:27:08.000Z | 2021-04-08T15:28:44.000Z | BGWpy/Abinit/abinitbgwflow.py | jonahhaber/BGWpy | 03ae0df2c7ddad833f679a69908abcb7b4adf9a2 | [
"BSD-3-Clause-LBNL"
] | 13 | 2016-02-10T05:36:25.000Z | 2021-11-02T01:52:09.000Z |
from os.path import join as pjoin
from . import AbinitScfTask, AbinitWfnTask, Abi2BgwTask
from ..DFT import WfnBgwFlow
__all__ = ['AbinitBgwFlow']
class AbinitBgwFlow(WfnBgwFlow):
def __init__(self, **kwargs):
"""
Keyword Arguments
-----------------
dirname : str
Di... | 32.298013 | 83 | 0.603855 |
1abfe77254dc26037d6a57a29d0169292ee6c752 | 2,788 | py | Python | networkit/coloring.py | kit-parco/networkit | e7cb33df26969e34b17f73ff80dbca982b2a34b9 | [
"MIT"
] | 194 | 2016-10-21T22:56:49.000Z | 2019-06-21T03:04:22.000Z | networkit/coloring.py | kit-parco/networkit | e7cb33df26969e34b17f73ff80dbca982b2a34b9 | [
"MIT"
] | 215 | 2017-02-06T09:12:54.000Z | 2019-06-24T10:52:24.000Z | networkit/coloring.py | kit-parco/networkit | e7cb33df26969e34b17f73ff80dbca982b2a34b9 | [
"MIT"
] | 93 | 2017-01-10T10:51:01.000Z | 2019-06-20T13:58:57.000Z | # local imports
from . import graph
#import .
from .algebraic import adjacencyEigenvectors
class SpectralColoring(object):
"""
SpectralColoring(G)
Algorithm for computing a valid spectral coloring for a given graph.
Parameters
----------
G : networkit.Graph
The graph to compute the spectral coloring for.
""... | 21.952756 | 105 | 0.689383 |
1ac009b8f721843bbe101b3a0f95b2c8afec2779 | 6,096 | py | Python | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from collections import namedtuple
from ..exceptions import LocationParseError
url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment']
class Url(namedtuple('Url', url_attrs)):
"""
Datastructure for representing an HTTP URL. Used as a ret... | 27.963303 | 87 | 0.527231 |
1ac01f12f7a6557f36ce2e265731943e22063b47 | 72,800 | py | Python | froide/foirequest/tests/test_request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/foirequest/tests/test_request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/foirequest/tests/test_request.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from datetime import datetime, timedelta
import os
import zipfile
import unittest
from mock import patch
from django.test import TestCase
from django.urls import reverse
from django.contrib.auth import get_user_model
from django.conf import se... | 44.417328 | 137 | 0.605701 |
1ac0212b5bbc924244f57dcbdef9213d4238dc0c | 1,278 | py | Python | demos/synthetic/src/main.py | lostmygithubaccount/mldiff | 9c24724614dba676daba3d7d28c6faa264992596 | [
"MIT"
] | 1 | 2022-03-05T19:39:18.000Z | 2022-03-05T19:39:18.000Z | demos/synthetic/src/main.py | lostmygithubaccount/mldrift | 9c24724614dba676daba3d7d28c6faa264992596 | [
"MIT"
] | null | null | null | demos/synthetic/src/main.py | lostmygithubaccount/mldrift | 9c24724614dba676daba3d7d28c6faa264992596 | [
"MIT"
] | null | null | null | # imports
import os
import argparse
import pandas as pd
from datetime import datetime, timedelta
from mldrift.tabular.lightgbm_diff import DataDiff
BASELINE_START = datetime(2000, 1, 1)
BASELINE_END = datetime(2000, 4, 1)
INTERVAL = timedelta(days=30)
# define functions
def main(args):
# read in data
print... | 19.96875 | 56 | 0.656495 |
1ac04127dff5d26166441980ea9613b41713534e | 11,092 | py | Python | skbio/stats/evolve/_hommola.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/evolve/_hommola.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | skbio/stats/evolve/_hommola.py | johnchase/scikit-bio | 340e6153b6c93053d923d344e63481860e03731e | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | 41.543071 | 79 | 0.684908 |
1ac0479db866b540143a43557da8834d51e73996 | 527 | py | Python | CHAPTER 12 (sorting and selection)/decorated_merge_sort.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 12 (sorting and selection)/decorated_merge_sort.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 12 (sorting and selection)/decorated_merge_sort.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | from linked_queue_class import *
from merge_sort_linked import *
def decorated_merge_sort(data,key=None):
"""Demonstration of the decorate-sort-undercorate pattern."""
if key is not None:
for j in range(len(data)):
data[j] = _Item(key(data[j]), data[j]) # decorate each element
merge_s... | 40.538462 | 82 | 0.603416 |
1ac05640dae6698dc4dc07bd8b2a0a07ab4d44da | 19,349 | py | Python | datasets/MOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | datasets/MOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | datasets/MOT/dataset.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from datasets.base.storage_engine.memory_mapped import ListMemoryMapped
import numpy as np
from miscellanies.platform_style_path import join_path
from datasets.base.common.memory_mapped.dataset import LazyAttributesLoader, DummyAttributesLoader, MemoryMappedDataset
__all__ = ['MultipleObjectTrackingDataset_MemoryMappe... | 49.997416 | 143 | 0.686082 |
1ac058db8b00a7a7abedd43a2a1f254e42b7e74a | 5,377 | py | Python | environments/runner_partially_observable_cb.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | environments/runner_partially_observable_cb.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | environments/runner_partially_observable_cb.py | nbro/contextual-bandit-recommender | 0176dad94e0e791327dc2f50e38aa3ab4e327673 | [
"MIT"
] | null | null | null | """
Runner for portially observable reward CB problems.
Currently only supports shared contetxtual policies.
"""
import os
import numpy as np
import pandas as pd
import torch
from datautils.bandit_data import BanditData
from datautils.news.sample_data import sample_user_event
from environments.utils import create_if... | 31.444444 | 115 | 0.57746 |
1ac0591c9a7f425c9c23c59c8711f15f3d6497b5 | 9,257 | py | Python | scripts/code_generation.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 40 | 2020-04-25T17:12:57.000Z | 2020-10-16T15:35:40.000Z | scripts/code_generation.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 18 | 2020-04-24T18:06:52.000Z | 2020-10-22T14:50:57.000Z | scripts/code_generation.py | opendifferentialprivacy/whitenoise-core-python | a37dc5787ade35c33d29f70ec53b5dc92533f9f0 | [
"MIT"
] | 4 | 2020-04-27T20:36:27.000Z | 2020-05-21T14:09:05.000Z | """
Script to build out the python package opendp.smartnoise.core in 3 steps
(a) Build the smartnoise-core Rust validator and runtime
(b) Create the Python classes from Protobuf definitions
(c) Build the python components.py and variant_message_map.py file
"""
import json
import os
import re
from datetime import dateti... | 39.559829 | 121 | 0.64751 |
1ac06a00fe24deb2d13c6b7744a004b1293d3eba | 268 | py | Python | microcosm_resourcesync/schemas/__init__.py | globality-corp/microcosm-resourcesync | a7c8f9e2f60e27ac7368e00e5c646d74006afcfb | [
"Apache-2.0"
] | null | null | null | microcosm_resourcesync/schemas/__init__.py | globality-corp/microcosm-resourcesync | a7c8f9e2f60e27ac7368e00e5c646d74006afcfb | [
"Apache-2.0"
] | 8 | 2017-02-02T20:01:53.000Z | 2019-11-08T11:42:34.000Z | microcosm_resourcesync/schemas/__init__.py | globality-corp/microcosm-resourcesync | a7c8f9e2f60e27ac7368e00e5c646d74006afcfb | [
"Apache-2.0"
] | 1 | 2019-03-17T03:46:33.000Z | 2019-03-17T03:46:33.000Z | """
Schema modeling.
"""
from enum import Enum, unique
from microcosm_resourcesync.schemas.hal_schema import HALSchema
from microcosm_resourcesync.schemas.simple_schema import SimpleSchema
@unique
class Schemas(Enum):
HAL = HALSchema
SIMPLE = SimpleSchema
| 17.866667 | 69 | 0.791045 |
1ac07d5ecbca48396ce02ae0d2b1a7bc2d53472b | 1,904 | py | Python | Google_Data_Recorder/G_UpdateSheet.py | pz716/SIOT-Air_Quality | 5e1620053a389cafb4e69d81a385e19ece325ed4 | [
"MIT"
] | null | null | null | Google_Data_Recorder/G_UpdateSheet.py | pz716/SIOT-Air_Quality | 5e1620053a389cafb4e69d81a385e19ece325ed4 | [
"MIT"
] | null | null | null | Google_Data_Recorder/G_UpdateSheet.py | pz716/SIOT-Air_Quality | 5e1620053a389cafb4e69d81a385e19ece325ed4 | [
"MIT"
] | null | null | null | # Import Google Sheets API libraries
from __future__ import print_function
from googleapiclient.discovery import build
from httplib2 import Http
# from oauth2client import file, client, tools
from oauth2client.service_account import ServiceAccountCredentials
import datetime
import gspread
import pickle
impo... | 40.510638 | 90 | 0.704307 |
1ac0b7fa1147eaeb448b020fc2418f96da13f941 | 7,897 | py | Python | userbot/plugins/pmpermit.py | spyzz45/raynaldbot | 14e86c1756cc23ae3f72d07a9b8ae9d01825c14a | [
"MIT"
] | 1 | 2020-06-24T09:37:08.000Z | 2020-06-24T09:37:08.000Z | userbot/plugins/pmpermit.py | spyzz45/raynaldbot | 14e86c1756cc23ae3f72d07a9b8ae9d01825c14a | [
"MIT"
] | null | null | null | userbot/plugins/pmpermit.py | spyzz45/raynaldbot | 14e86c1756cc23ae3f72d07a9b8ae9d01825c14a | [
"MIT"
] | null | null | null | import asyncio
import io
import userbot.plugins.sql_helper.pmpermit_sql as pmpermit_sql
from telethon.tl.functions.users import GetFullUserRequest
from telethon import events, errors, functions, types
from userbot import ALIVE_NAME, LESS_SPAMMY
from userbot.utils import admin_cmd
PM_WARNS = {}
PREV_REPLY_MESSAGE = {}
... | 39.883838 | 410 | 0.550842 |
1ac0d2e5c82d32c95d9c14d1c027f8800e75be4f | 33,048 | py | Python | pandas/tests/frame/test_missing.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T09:31:34.000Z | 2019-03-25T09:31:34.000Z | pandas/tests/frame/test_missing.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/frame/test_missing.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import datetime
from distutils.version import LooseVersion
import dateutil
import numpy as np
import pytest
from pandas.compat import lrange
import pandas.util._test_decorators as td
import pandas as pd
from pandas import Categorical, DataFrame, Series,... | 37.216216 | 79 | 0.535827 |
1ac0d70dfca2048c342899fe9029cae63bdb3bae | 3,798 | py | Python | venv/Lib/site-packages/pybtex/bibtex/runner.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 2 | 2021-02-16T16:17:07.000Z | 2021-11-08T20:27:13.000Z | venv/Lib/site-packages/pybtex/bibtex/runner.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pybtex/bibtex/runner.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | #!/usr/bin/env python
# Copyright (c) 2006-2019 Andrey Golovigin
#
# 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, cop... | 32.186441 | 80 | 0.681675 |
1ac0f2167395a8236cdbaa91812754b822293f3a | 1,106 | py | Python | tests/preprocessor_tests.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | 1 | 2021-02-06T06:42:29.000Z | 2021-02-06T06:42:29.000Z | tests/preprocessor_tests.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | 6 | 2021-04-08T21:46:06.000Z | 2021-05-09T01:40:04.000Z | tests/preprocessor_tests.py | Delaunay/LuaFun | bd0efd8fc2b064d6bf58993e59a6ad4ac6713b39 | [
"BSD-3-Clause"
] | null | null | null | from luafun.dotaenv import action_space, Dota2Env
class MockState:
def get_entities(self, x, y):
return None, None, None
class MockDraftTracker:
def __init__(self):
pass
def update(self, x, y):
return
class MockEnv:
def __init__(self):
self.draft_tracker = MockDraf... | 19.068966 | 58 | 0.490054 |
1ac11a017c00c051dbb30d05c3d7f17da99812c5 | 2,837 | py | Python | qnarre/base/net.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/base/net.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/base/net.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix 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 applicable l... | 32.609195 | 79 | 0.543179 |
1ac12aba06f2caf9391c8887f2c0a8c8937a717b | 47,949 | py | Python | src/sage/combinat/integer_vector.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/integer_vector.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/integer_vector.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | """
(Non-negative) Integer vectors
AUTHORS:
* Mike Hansen (2007) - original module
* Nathann Cohen, David Joyner (2009-2010) - Gale-Ryser stuff
* Nathann Cohen, David Joyner (2011) - Gale-Ryser bugfix
* Travis Scrimshaw (2012-05-12) - Updated doc-strings to tell the user of
that the class's name is a misnomer (that... | 31.318746 | 133 | 0.527415 |
1ac1484fc2e803c76a6532d68f83f0f8dbf29b67 | 1,827 | py | Python | examples/anomaly_detector.py | bytewax/bytewax | c935aac8d6eabb0af5a331f59fc4a1300fa6d1e3 | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2022-02-05T02:38:35.000Z | 2022-03-31T16:42:52.000Z | examples/anomaly_detector.py | yutiansut/bytewax | 54dba26cbab2afd24007865f69083a92c05cbdc1 | [
"ECL-2.0",
"Apache-2.0"
] | 9 | 2022-02-08T22:13:56.000Z | 2022-03-31T18:16:12.000Z | examples/anomaly_detector.py | yutiansut/bytewax | 54dba26cbab2afd24007865f69083a92c05cbdc1 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2022-02-14T23:45:03.000Z | 2022-03-22T06:58:47.000Z | import random
from bytewax import Dataflow, inputs, parse, run_cluster
def random_datapoints():
for _ in range(20):
yield "QPS", random.randrange(0, 10)
class ZTestDetector:
"""Anomaly detector.
Use with a call to flow.stateful_map().
Looks at how many standard deviations the current item... | 26.867647 | 98 | 0.642583 |
1ac177b5a37f1218927406a8157139f252c9ed7a | 5,185 | py | Python | SingleStationViewer.py | kriete/singleStationTimeSeries | 5002395be24dbfd002b28f14a1a5b1718cc50f4c | [
"MIT"
] | null | null | null | SingleStationViewer.py | kriete/singleStationTimeSeries | 5002395be24dbfd002b28f14a1a5b1718cc50f4c | [
"MIT"
] | null | null | null | SingleStationViewer.py | kriete/singleStationTimeSeries | 5002395be24dbfd002b28f14a1a5b1718cc50f4c | [
"MIT"
] | null | null | null | from utils import *
from bokeh.io import output_file, save
__author__ = "Andreas Krietemeyer"
__copyright__ = "Copyright 2016, SOCIB Sistema d observacio i prediccio costaner de les Illes Balears"
__license__ = "GNU GPL v 3"
__version__ = "1.0"
__maintainer__ = ["Andreas Krietemeyer"]
__email__ = "akrietemeyer@socib.... | 45.482456 | 126 | 0.659595 |
1ac1997f872a28c182d709eb522075515851cfa7 | 693 | py | Python | setup.py | datasmoothie/tally-client | eef6d09724ed757ffc9cea5808050ab571ad482d | [
"Apache-2.0"
] | null | null | null | setup.py | datasmoothie/tally-client | eef6d09724ed757ffc9cea5808050ab571ad482d | [
"Apache-2.0"
] | 1 | 2021-10-14T19:08:14.000Z | 2021-10-14T19:08:14.000Z | setup.py | datasmoothie/tally-client | eef6d09724ed757ffc9cea5808050ab571ad482d | [
"Apache-2.0"
] | null | null | null | import setuptools
setuptools.setup(
name="datasmoothie-tally-client",
packages=setuptools.find_packages(),
install_requires=[
'numpy',
'pandas',
],
version="0.8",
license='MIT',
include_package_data=True,
url="https://github.com/datasmoothie/datasmoothie-tally-client",
... | 27.72 | 79 | 0.643579 |
1ac19f5a088aafd6969f244b04fd29aab7af3304 | 14,297 | py | Python | android_env/components/setup_step_interpreter_test.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 768 | 2021-05-28T00:40:07.000Z | 2022-03-30T12:01:52.000Z | android_env/components/setup_step_interpreter_test.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 17 | 2021-05-29T18:59:23.000Z | 2022-03-08T11:55:54.000Z | android_env/components/setup_step_interpreter_test.py | yjaeseok/android_env | b847754e855c3e331d9aaecfb7d01c2d8a71dbea | [
"Apache-2.0"
] | 46 | 2021-05-28T15:30:03.000Z | 2022-03-18T08:20:08.000Z | # coding=utf-8
# Copyright 2021 DeepMind Technologies Limited.
#
# 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 applic... | 35.041667 | 79 | 0.718053 |
1ac1b1866595e2b0413f942ea0d67575e561a39f | 4,849 | py | Python | src/fractalshades/mprocessing.py | GBillotey/Fractal-shades | 99c690cb1114ab7edcbfd9836af585fed2b133e8 | [
"MIT"
] | 3 | 2021-03-06T18:32:51.000Z | 2021-07-07T01:35:21.000Z | src/fractalshades/mprocessing.py | GBillotey/Fractal-shades | 99c690cb1114ab7edcbfd9836af585fed2b133e8 | [
"MIT"
] | null | null | null | src/fractalshades/mprocessing.py | GBillotey/Fractal-shades | 99c690cb1114ab7edcbfd9836af585fed2b133e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import multiprocessing
import os
import sys
import functools
import uuid
import contextlib
import concurrent
import fractalshades.utils as fsutils
import fractalshades.settings as fssettings
# https://gist.github.com/EdwinChan/3c13d3a746bb3ec5082f
@contextlib.contextmanager
def globalized(fu... | 36.734848 | 79 | 0.614147 |
1ac1b20a8d61122388f3d6fe1297b006bb7d7c27 | 2,507 | py | Python | email_auth/migrations/0002_emailverification.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 1 | 2020-06-05T23:29:24.000Z | 2020-06-05T23:29:24.000Z | email_auth/migrations/0002_emailverification.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 40 | 2019-08-30T23:08:10.000Z | 2019-12-08T13:58:19.000Z | email_auth/migrations/0002_emailverification.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.2 on 2019-08-10 18:29
from django.db import migrations, models
import django.db.models.deletion
import email_auth.models
class Migration(migrations.Migration):
dependencies = [("email_auth", "0001_initial")]
operations = [
migrations.CreateModel(
name="EmailVer... | 35.309859 | 91 | 0.419226 |
1ac1b3fe3497806b582ce482d1581beb6ae90a34 | 484 | py | Python | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage1.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 136 | 2020-08-24T08:18:16.000Z | 2022-03-31T13:45:12.000Z | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage1.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 5 | 2020-10-07T08:44:36.000Z | 2021-12-17T06:00:57.000Z | configs/universe_r101_gfl/universe_r101_gfl_mstrain_stage1.py | kazakh-shai/kaggle-global-wheat-detection | b26295ea257f73089f1a067b70b4a7ee638f6b83 | [
"Apache-2.0"
] | 28 | 2020-08-24T11:07:07.000Z | 2022-01-01T13:07:54.000Z | _base_ = [
"../_base_/models/universe_r101_gfl.py",
"../_base_/datasets/wheat_detection_mstrain_light.py",
"../_base_/schedules/schedule_1x.py",
"../_base_/default_runtime.py",
]
data = dict(samples_per_gpu=6)
optimizer = dict(lr=0.03 / 2)
optimizer_config = dict(_delete_=True, grad_clip=dict(max_norm=... | 34.571429 | 80 | 0.743802 |
1ac1b6f0e79d9cf140571f2cafb9996ab7b04c0a | 36,927 | py | Python | nnunet/training/network_training/network_trainer.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | null | null | null | nnunet/training/network_training/network_trainer.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | null | null | null | nnunet/training/network_training/network_trainer.py | ZXLam/nnUNet | 0cf7c8a857c248d6be171e4945427b405f6ac258 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 44.597826 | 150 | 0.599968 |
1ac1b9621ff38a2fe639e69a051279aeaeff91c0 | 6,292 | py | Python | MazeGen/MazeUtils.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 3 | 2020-10-16T18:59:18.000Z | 2021-03-23T00:46:09.000Z | MazeGen/MazeUtils.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 3 | 2020-12-09T21:34:34.000Z | 2021-06-04T05:17:51.000Z | MazeGen/MazeUtils.py | christymarc/raycasting-simulation | ed9b92143d3eb1c5a25900419ead517f93f8c315 | [
"MIT"
] | 5 | 2020-12-09T00:49:23.000Z | 2021-06-01T07:40:41.000Z | #!/usr/bin/env python
"""
You can use this file as a command line script, or as a library.
Example of computing the percent a location is through the maze:
python MazeUtils.py ../Mazes/maze01.txt --percent 1.5 7.5
See the main function below to see how to use these functions as
a library.
"""
from argparse imp... | 29.819905 | 88 | 0.569294 |
1ac1e39e27e8ac98a937973e7638f01bc5c25571 | 362 | py | Python | src/dmd/__init__.py | erdc/node_nirom | 30bf9a6e0d197d81dfd3520fe0828e2f7c8007a3 | [
"MIT"
] | 3 | 2021-08-19T19:07:12.000Z | 2021-12-24T02:32:13.000Z | src/dmd/__init__.py | erdc/node_nirom | 30bf9a6e0d197d81dfd3520fe0828e2f7c8007a3 | [
"MIT"
] | null | null | null | src/dmd/__init__.py | erdc/node_nirom | 30bf9a6e0d197d81dfd3520fe0828e2f7c8007a3 | [
"MIT"
] | 2 | 2021-04-07T20:13:32.000Z | 2021-05-21T19:00:03.000Z | __all__ = [
'dmd'
]
__project__ = 'DMD-Nirom'
__title__ = "dmd"
__author__ = "Sourav Dutta, Matthew Farthing"
__copyright__ = "Copyright 2019-2020, DMD contributors"
__license__ = "MIT"
__version__ = "1.0"
__mail__ = 'sourav.dutta@erdc.dren.mil, matthew.w.farthing@erdc.dren.mil'
__maintainer__ = __author__
__statu... | 21.294118 | 73 | 0.734807 |
1ac1fe8ed406602e3c455d891e229c46d305def1 | 1,208 | py | Python | snm/spareparts/graphql/types.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | null | null | null | snm/spareparts/graphql/types.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | 9 | 2021-02-27T13:13:38.000Z | 2021-06-04T11:57:12.000Z | snm/spareparts/graphql/types.py | sparesnmechs/sparesnmechs | 44a7178fcfd0c89004d9f31734405c8d0fd5cd97 | [
"MIT"
] | null | null | null | """GraphQL types."""
from graphene import relay
from graphene_django import DjangoObjectType
from snm.spareparts.models import (
SparePart,
SparePartCategory,
SparePartSubCategory,
)
class CategoryType(DjangoObjectType):
"""CategoryType define a GraphQL spareparts category Object Type."""
class ... | 22.792453 | 79 | 0.639073 |
1ac22302c6b3780a4be6bb20c7918a20e742210e | 3,399 | py | Python | src/olympia/translations/transformer.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10 | 2018-08-16T04:55:06.000Z | 2022-01-08T16:09:39.000Z | src/olympia/translations/transformer.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/translations/transformer.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 12 | 2018-08-01T16:46:09.000Z | 2022-01-08T16:09:46.000Z | from django.conf import settings
from django.db import connections, models, router
from django.utils import translation
from olympia.translations.fields import TranslatedField
from olympia.translations.models import Translation
isnull = """IF(!ISNULL({t1}.localized_string), {t1}.{col}, {t2}.{col})
AS {na... | 38.191011 | 76 | 0.604001 |
1ac278414f07882b9f35bcea7a2b665a9897bbef | 6,890 | py | Python | src/utils_stats.py | tianzongw/Podcast-Segment-Retrieval-Spotify | f089520b1d70ed2607b56b2e50f97b65f34d5002 | [
"MIT"
] | null | null | null | src/utils_stats.py | tianzongw/Podcast-Segment-Retrieval-Spotify | f089520b1d70ed2607b56b2e50f97b65f34d5002 | [
"MIT"
] | null | null | null | src/utils_stats.py | tianzongw/Podcast-Segment-Retrieval-Spotify | f089520b1d70ed2607b56b2e50f97b65f34d5002 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import json
import re
import string
from sklearn.feature_extraction.text import TfidfVectorizer
from gensim.models import TfidfModel
from gensim.corpora import Dictionary
from gensim.parsing.preprocessing import remove_stopwords
from nltk.stem import WordNetLemmatizer
from nltk.st... | 32.5 | 108 | 0.628882 |
1ac27de15cd17da49f87775514a94abc6b947e54 | 14,363 | py | Python | external/py3dpi/src/pydpi/drug/basak.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | 1 | 2020-08-20T07:49:10.000Z | 2020-08-20T07:49:10.000Z | external/py3dpi/src/pydpi/drug/basak.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | null | null | null | external/py3dpi/src/pydpi/drug/basak.py | pgniewko/deep-toxin | fa61b06405749e5de7d74eedadb5de7c67981471 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
##############################################################################
The calculation of some commonly used basak information index based on its
topological structure. You can get 21 molecular connectivity descriptors.
You can freely use and distribute it. If you hava any prob... | 25.602496 | 84 | 0.427278 |
1ac2d589a4feb47d5863b4dd87086f28e6511421 | 648 | py | Python | rep/estimators/__init__.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 726 | 2015-04-16T08:16:30.000Z | 2022-03-25T19:19:42.000Z | rep/estimators/__init__.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 86 | 2015-04-16T23:57:01.000Z | 2021-09-26T01:03:47.000Z | rep/estimators/__init__.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 167 | 2015-04-16T11:42:18.000Z | 2022-01-11T15:10:19.000Z | from __future__ import division, print_function, absolute_import
from .interface import Classifier, Regressor
from .sklearn import SklearnClassifier, SklearnRegressor
from .matrixnet import MatrixNetClassifier, MatrixNetRegressor
try:
from .theanets import TheanetsClassifier, TheanetsRegressor
except:
pass
... | 20.903226 | 64 | 0.791667 |
1ac2f3b67869d5f8781da4a56898f25c28745592 | 1,467 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/util/http_retry.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/util/http_retry.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/api_lib/util/http_retry.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.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 ag... | 37.615385 | 77 | 0.734151 |
1ac311aa0cd362a53adc8d0a1e06d01f20cfbca5 | 3,679 | py | Python | test/test_rosdep_model.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | test/test_rosdep_model.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | test/test_rosdep_model.py | NikolausDemmel/rosdep | 5897af419cbabc078659ef8a696f3538a868cb6e | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... | 39.98913 | 77 | 0.68361 |
1ac315e64bd2e7959b710ca56aa84dd2a0b37c43 | 8,345 | py | Python | mirage/libs/common/sdr/modulators.py | tlechien/mirage | cff987c52e11447064df1f8631593a9baa749fac | [
"MIT"
] | 123 | 2019-11-20T19:53:23.000Z | 2022-03-07T19:51:03.000Z | mirage/libs/common/sdr/modulators.py | FlorentGaltier/mirage | e25c0d1042fa02b1dff4058b240567f45fd64b4b | [
"MIT"
] | 23 | 2019-10-22T13:53:34.000Z | 2022-03-22T22:22:55.000Z | mirage/libs/common/sdr/modulators.py | FlorentGaltier/mirage | e25c0d1042fa02b1dff4058b240567f45fd64b4b | [
"MIT"
] | 25 | 2019-11-15T12:13:48.000Z | 2021-12-22T00:21:15.000Z | from mirage.libs.common.sdr.sinks import SDRSink
from mirage.libs.common.sdr.encoders import SDREncoder
import math,queue,threading
import numpy as np
'''
This component implements multiple Software Defined Radio modulators allowing to modulate numeric data to generate an IQ stream.
'''
class SDRModulator:
'''
Th... | 24.762611 | 195 | 0.693469 |
1ac31ccb5db96dec9525a963f3d3ee579626cb8f | 2,131 | py | Python | click_creds/groups.py | eshaan7/click-creds | 9dd18fcdd674deb59b1cb8af4e4d822f7cb50614 | [
"BSD-3-Clause"
] | 2 | 2020-12-24T08:47:59.000Z | 2021-03-24T06:57:35.000Z | click_creds/groups.py | Eshaan7/click-creds | 40dcc52b0a9ecc7bea8d9fa580a48ed19784d298 | [
"BSD-3-Clause"
] | 5 | 2021-02-27T16:29:45.000Z | 2021-08-19T15:58:30.000Z | click_creds/groups.py | eshaan7/click-creds | 9dd18fcdd674deb59b1cb8af4e4d822f7cb50614 | [
"BSD-3-Clause"
] | 1 | 2021-03-24T06:57:37.000Z | 2021-03-24T06:57:37.000Z | import click
from typing import List
from .classes import NetrcStore
from .decorators import pass_netrcstore_obj
from .defaults import MODULE_KEY
@click.group("config")
def config_group():
"""
Set or view config variables
"""
pass
@config_group.command("get")
@click.option("-m", "--default-mapping"... | 26.974684 | 88 | 0.584702 |
1ac342c0ba0b60c200996e6d645477558c31b2c3 | 3,378 | py | Python | qtim_tools/qtim_preprocessing/resample.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 12 | 2017-03-29T18:17:24.000Z | 2020-03-19T05:28:56.000Z | qtim_tools/qtim_preprocessing/resample.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 7 | 2017-03-08T21:06:01.000Z | 2017-06-21T19:01:58.000Z | qtim_tools/qtim_preprocessing/resample.py | QTIM-Lab/qtim_tools | 92bd15ec7a81c5eda70d11a015f74538f3c41e22 | [
"Apache-2.0"
] | 5 | 2017-03-02T09:08:21.000Z | 2019-10-26T05:37:39.000Z | """ This module should be used for functions that null out values in an array
based on a condition. Primarily used for masking.
"""
import subprocess
import os
import numpy as np
from ..qtim_utilities.format_util import convert_input_2_numpy
from ..qtim_utilities.nifti_util import save_numpy_2_nifti
def resample... | 37.533333 | 185 | 0.643872 |
1ac3529f86283d62afe9ddbb6ddf6d0b7e9e6a5b | 6,432 | py | Python | datasets/datafeeder.py | gaoyu1983/mandarin_tacotron_GL | 2db2dd339dd74519e6360db0d50f40bc6c1dbfd7 | [
"MIT"
] | 24 | 2020-04-12T06:00:44.000Z | 2021-09-29T07:15:35.000Z | datasets/datafeeder.py | gaoyu1983/mandarin_tacotron_GL | 2db2dd339dd74519e6360db0d50f40bc6c1dbfd7 | [
"MIT"
] | 2 | 2020-10-19T13:44:06.000Z | 2021-04-11T17:43:32.000Z | datasets/datafeeder.py | gaoyu1983/mandarin_tacotron_GL | 2db2dd339dd74519e6360db0d50f40bc6c1dbfd7 | [
"MIT"
] | 8 | 2020-04-12T06:00:43.000Z | 2022-01-11T02:32:07.000Z | import numpy as np
import os
import random
import tensorflow as tf
import threading
import time
import traceback
from hparams import hparams
from text import cmudict, text_to_sequence
from util.infolog import log
_batches_per_group = 32
_p_cmudict = 0.5
_pad = 0
_stop_token_pad = 1
class DataFeeder(threading.Thread... | 38.51497 | 117 | 0.709733 |
1ac372cfd269f2c71c490e8b89d54f04c1dae6ee | 1,008 | py | Python | infinisdk/infinibox/notification_rule.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | 5 | 2019-02-26T20:11:43.000Z | 2021-03-10T08:45:38.000Z | infinisdk/infinibox/notification_rule.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | 11 | 2017-11-15T19:20:23.000Z | 2021-09-14T18:17:47.000Z | infinisdk/infinibox/notification_rule.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | 2 | 2017-11-16T11:59:05.000Z | 2019-02-25T20:44:23.000Z | from urlobject import URLObject as URL
from ..core.api.special_values import Autogenerate
from ..core.bindings import RelatedObjectBinding
from ..core import Field, SystemObject
class NotificationRule(SystemObject):
URL_PATH = URL('/api/rest/notifications/rules')
FIELDS = [
Field('id', type=int, is... | 36 | 98 | 0.69246 |
1ac374c77ed2df987e5cbe0002f11ef8cff936bb | 6,622 | py | Python | pypykatz/commons/kerberosticket.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | 1 | 2018-08-19T11:53:30.000Z | 2018-08-19T11:53:30.000Z | pypykatz/commons/kerberosticket.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | null | null | null | pypykatz/commons/kerberosticket.py | retr0-13/pypykatz | 0d689fbd819c52ca46709737b2c063f40e302832 | [
"MIT"
] | null | null | null | from asn1crypto import core
from pypykatz.commons.filetime import *
from pypykatz.commons.common import *
from pypykatz.commons.win_datatypes import *
from minikerberos.asn1_structs import *
from minikerberos.constants import *
import enum
import os
import hashlib
class KerberosTicketType(enum.Enum):
TGT = enum.auto... | 35.411765 | 157 | 0.71791 |
1ac379d2b3a53ae5edbd6e60ee3284060f623e53 | 593 | py | Python | day9/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | day9/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | day9/main.py | josteinl/advent2020 | f109f9c1ef4fcb14582cda6b114d7648000decc6 | [
"Apache-2.0"
] | null | null | null | """
Day 9 - XMAS
"""
from itertools import combinations
def part_one():
with open('data.txt', 'r') as f:
numbers = [int(data) for data in f]
print(numbers)
preamble = 25
for position, number in enumerate(numbers[preamble:], start=preamble):
combines = combinations(numbers[position -... | 19.766667 | 74 | 0.608769 |
1ac38230121339b2f885252588cb9373b9222fe0 | 4,928 | py | Python | aesara/link/numba/dispatch/nlinalg.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/link/numba/dispatch/nlinalg.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/link/numba/dispatch/nlinalg.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import warnings
import numba
import numpy as np
from aesara.link.numba.dispatch import basic as numba_basic
from aesara.link.numba.dispatch.basic import (
get_numba_type,
int_to_float_fn,
numba_funcify,
)
from aesara.tensor.nlinalg import (
SVD,
Det,
Eig,
Eigh,
Inv,
MatrixInverse,
... | 25.142857 | 88 | 0.62987 |
1ac3cf2aba66a133fbd01e9dbd55568159bd8354 | 9,243 | py | Python | dsbox/datapreprocessing/profiler/feature_compute_hih.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 4 | 2017-07-13T00:37:56.000Z | 2017-09-14T17:45:18.000Z | dsbox/datapreprocessing/profiler/feature_compute_hih.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 8 | 2017-08-02T17:35:37.000Z | 2018-07-06T17:21:03.000Z | dsbox/datapreprocessing/profiler/feature_compute_hih.py | RqS/dsbox-profiling | bb972e0e577de1f10d8b97d1b7043b20111e85e0 | [
"MIT"
] | 1 | 2018-12-20T19:11:35.000Z | 2018-12-20T19:11:35.000Z | import pandas as pd # type: ignore
import numpy as np # type: ignore
from . import helper_funcs as hf
from collections import OrderedDict
from collections import defaultdict
from collections import Counter
from builtins import filter
def ordered_dict2(column, k):
unique,counts = np.unique(column, return_counts=... | 43.805687 | 144 | 0.663205 |
1ac3d0fa72a2d54e6d3bb3e954ec55651936dacf | 1,305 | py | Python | flaskeztest3/helpers.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | 1 | 2018-06-22T04:56:14.000Z | 2018-06-22T04:56:14.000Z | flaskeztest3/helpers.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | null | null | null | flaskeztest3/helpers.py | cmorterud/flask-eztest | 3d0827c64e09c7787ec00f62ef8a94bb153ae9a5 | [
"MIT"
] | 2 | 2018-08-30T08:56:17.000Z | 2019-05-08T15:20:26.000Z |
import os
import sys
from sqlalchemy.dialects.mysql import BIT, INTEGER,TINYINT
def parse_module_name_from_filepath(filepath):
"""
Adds module file path to python path and returns the proper name that eztest should import.
Most of this was taken from flask github source code
:type filepath: str
""... | 29.659091 | 95 | 0.642146 |
1ac3f701c89dcd6895fec42ba8b2723e6639370e | 376 | py | Python | setup.py | pardo/namespaced-cache | a14fb224e57dce4e5c75b8c09780ba2a3d1b6c46 | [
"MIT"
] | null | null | null | setup.py | pardo/namespaced-cache | a14fb224e57dce4e5c75b8c09780ba2a3d1b6c46 | [
"MIT"
] | null | null | null | setup.py | pardo/namespaced-cache | a14fb224e57dce4e5c75b8c09780ba2a3d1b6c46 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(name='django-namespaced-cache',
version='0.1',
description='Cache with simple support for namespaced and cascade delete',
author='Andres Pardini',
author_email='unpardos@gmail.com',
url='https://github.com/pardo/namespaced-cach... | 28.923077 | 80 | 0.68883 |
1ac41505a3b0a7768d7c6f900bea14b64f38571f | 4,171 | py | Python | userbot/plugins/purge.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/purge.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | userbot/plugins/purge.py | kumar451/CatUserbot | 44fab853232fad163fee63565cc4f3e645596527 | [
"MIT"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module for purging unneeded messages(usually spam or ot). """
from asyncio import sleep
from telethon.erro... | 30.896296 | 86 | 0.619755 |
1ac4274105c0343a2621be6513dca3a9c01ff78f | 396 | py | Python | Python3/Books/Douson/chapter11/pizza_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter11/pizza_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | Python3/Books/Douson/chapter11/pizza_sprite.py | neon1ks/Study | 5d40171cf3bf5e8d3a95539e91f5afec54d1daf3 | [
"MIT"
] | null | null | null | # Pizza Sprite
# Demonstrates creating a sprite
from livewires import games
games.init(screen_width = 640, screen_height = 480, fps = 50)
wall_image = games.load_image("wall.jpg", transparent = False)
games.screen.background = wall_image
pizza_image = games.load_image("pizza.bmp")
pizza = games.Sprite(image = pizz... | 24.75 | 62 | 0.752525 |
1ac42c9ab2392b37ebaea1ed184f04fd96d515a9 | 15,934 | py | Python | empower/apps/managers/flowmanager/flowmanager.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | 2 | 2020-02-28T15:54:01.000Z | 2020-11-24T08:45:11.000Z | empower/apps/managers/flowmanager/flowmanager.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | empower/apps/managers/flowmanager/flowmanager.py | imec-idlab/empower-runtime | eda52649f855722fdec1d02e25a28c61a8fbda06 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2020 Pedro Heleno Isolani
#
# 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... | 32.786008 | 117 | 0.609075 |
1ac4412458e5e48fa5e33f88a13098732c012200 | 1,681 | py | Python | graphs/minimum_spanning_tree_kruskal.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | graphs/minimum_spanning_tree_kruskal.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | graphs/minimum_spanning_tree_kruskal.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 32.960784 | 74 | 0.69066 |
1ac4442744c453485c5d4fdad1a091d7a7fb6291 | 1,895 | py | Python | program_synthesis/naps/examples/seq2seq/pointer_seq_encoder.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 123 | 2018-06-09T00:49:39.000Z | 2022-03-09T05:41:20.000Z | program_synthesis/naps/examples/seq2seq/pointer_seq_encoder.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 9 | 2018-06-12T01:01:17.000Z | 2022-03-18T09:06:39.000Z | program_synthesis/naps/examples/seq2seq/pointer_seq_encoder.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | 24 | 2018-06-09T00:42:46.000Z | 2021-09-29T08:23:32.000Z | import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
from torch.autograd import Variable
class SeqEncoder(nn.Module):
def __init__(self, args):
super(SeqEncoder, self).__init__()
self.num_units = args.num_units
self.num_encoder_layers... | 45.119048 | 112 | 0.688654 |
1ac475660909fe0b2b81528307a678029adc94de | 9,499 | py | Python | sh/scripts/node_upgrade.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | sh/scripts/node_upgrade.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | sh/scripts/node_upgrade.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import argparse
import pathlib as pl
import toml
import typing as tp
import tempfile
from stests.core.utils import args_validator
from stests.core.utils import env
from stests.core.utils import cli as utils
from sh.scripts.svc_utils import remote_node_ssh_copy, remote_node_ssh_invoke
from sh.scripts.svc_utils import r... | 32.2 | 98 | 0.637541 |
1ac4c1e498e4fa0a2adc3b1cea8a6977087de54d | 1,759 | py | Python | docs/conf.py | ajsilveira/ufedmm | 3de9b057669d1f3ad2e5b368ed2e4e6b6eb2a7b2 | [
"MIT"
] | 1 | 2020-11-25T15:18:06.000Z | 2020-11-25T15:18:06.000Z | docs/conf.py | ajsilveira/ufedmm | 3de9b057669d1f3ad2e5b368ed2e4e6b6eb2a7b2 | [
"MIT"
] | null | null | null | docs/conf.py | ajsilveira/ufedmm | 3de9b057669d1f3ad2e5b368ed2e4e6b6eb2a7b2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext... | 25.128571 | 79 | 0.681637 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.