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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1cb913729e890c6ea7e79b9e489fc3d21b33e133 | 1,254 | py | Python | src/checkmatelib/exceptions.py | hypothesis/checkmatelib | a5bfb9c0e9c30dcac95f3660d8e0e21dbc9262af | [
"BSD-2-Clause"
] | null | null | null | src/checkmatelib/exceptions.py | hypothesis/checkmatelib | a5bfb9c0e9c30dcac95f3660d8e0e21dbc9262af | [
"BSD-2-Clause"
] | 2 | 2020-11-24T15:49:43.000Z | 2021-04-16T14:03:39.000Z | src/checkmatelib/exceptions.py | hypothesis/checkmatelib | a5bfb9c0e9c30dcac95f3660d8e0e21dbc9262af | [
"BSD-2-Clause"
] | null | null | null | """Exceptions for the Checkmate client."""
from functools import wraps
from requests import exceptions
REQUESTS_BAD_URL = (
exceptions.MissingSchema,
exceptions.InvalidSchema,
exceptions.InvalidURL,
exceptions.URLRequired,
)
REQUESTS_UPSTREAM_SERVICE = (
exceptions.ConnectionError,
exceptions... | 24.588235 | 80 | 0.706539 |
1cb9235cdd0539572e7fd24dfdcd4d103e7e5092 | 51,087 | py | Python | tests/test_frbr_mods.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | 1 | 2015-09-24T01:12:02.000Z | 2015-09-24T01:12:02.000Z | tests/test_frbr_mods.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | 1 | 2021-12-13T19:39:44.000Z | 2021-12-13T19:39:44.000Z | tests/test_frbr_mods.py | jermnelson/FRBR-Redis-Datastore | d44af821536b82f5fafa5bed7a51fa86e9a92243 | [
"Apache-2.0"
] | null | null | null | """
:mod:`test_frbr_mods` Unit tests for loading MODS xml records into FRBR
Redis datastore as native FRBR RDA entities
"""
import unittest,redis,config
from redisco import connection_setup
import lib.frbr_rda as frbr
import lib.mods as mods
from lxml import etree
mods_book_file = open('fixures... | 50.036239 | 1,191 | 0.614285 |
1cb938fc4defdd6dc14492f465a235b1446ee9d5 | 1,610 | py | Python | src/speaking_eye/activity_converter.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | 6 | 2020-04-30T17:35:09.000Z | 2021-11-18T09:41:50.000Z | src/speaking_eye/activity_converter.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | 6 | 2020-05-16T17:52:45.000Z | 2021-08-16T11:47:11.000Z | src/speaking_eye/activity_converter.py | alena-bartosh/speaking-eye | 86e692cf5d3182f77b28e5264da74657d1972303 | [
"MIT"
] | null | null | null | from .activity import Activity
from .bool_parser import BoolParser
from .datetime_formatter import DatetimeFormatter
class ActivityConverter:
"""Сonvert activity from/to string format"""
EXPECTED_COLUMNS_NUMBER = 6
@staticmethod
def to_string(activity: Activity) -> str:
return f'{activity.st... | 40.25 | 106 | 0.653416 |
1cb93956b1664c238f00fd0a949262e36e50a123 | 5,172 | py | Python | data/users/externaljwt.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | data/users/externaljwt.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | data/users/externaljwt.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | import logging
import json
import os
from data.users.federated import FederatedUsers, UserInformation
from util.security import jwtutil
logger = logging.getLogger(__name__)
class ExternalJWTAuthN(FederatedUsers):
"""
Delegates authentication to a REST endpoint that returns JWTs.
"""
PUBLIC_KEY_FIL... | 34.026316 | 98 | 0.62355 |
1cb93d1b65748e32941a323720ac18a7d43541fd | 9,689 | py | Python | JHDBot/cogs/veteran.py | Fumenoid/JHDBot | 0b04a3a002c668202d46e6ab5be2b9ce58698e5d | [
"MIT"
] | 20 | 2020-07-19T20:55:38.000Z | 2022-01-13T15:28:01.000Z | JHDBot/cogs/veteran.py | Fumenoid/JHDBot | 0b04a3a002c668202d46e6ab5be2b9ce58698e5d | [
"MIT"
] | 38 | 2020-07-20T23:01:46.000Z | 2022-01-23T15:17:59.000Z | JHDBot/cogs/veteran.py | Fumenoid/JHDBot | 0b04a3a002c668202d46e6ab5be2b9ce58698e5d | [
"MIT"
] | 13 | 2020-07-19T22:57:55.000Z | 2022-01-13T13:58:34.000Z | #!/usr/bin/env python3
import asyncio
import urllib.request
import discord
from discord.ext import commands
class VeteranCog(commands.Cog):
def __init__(self, bot):
self.name = "veteran"
self.bot = bot
async def cog_after_invoke(self, ctx: commands.Context) -> None:
"""
Clean ... | 43.644144 | 134 | 0.598204 |
1cb93e846743f0a3ba3cd4cc57c45240b6195ada | 6,230 | py | Python | p2p/protocol.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | p2p/protocol.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | p2p/protocol.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | from abc import ABC
import logging
import struct
from typing import (
Any,
Dict,
Generic,
List,
Tuple,
Type,
TypeVar,
TYPE_CHECKING,
Union,
)
import rlp
from rlp import sedes
from eth.constants import NULL_BYTE
from p2p.exceptions import (
MalformedMessage,
)
from p2p.utils im... | 34.41989 | 99 | 0.655538 |
1cb975295a2f1c21fe5b73c46c8e0b6f14495dcd | 1,037 | py | Python | setup.py | theletterf/signalflow-cli | f1fd89988ca8ceb35b2ccc205287808eb023551a | [
"Apache-2.0"
] | 13 | 2016-06-28T17:32:39.000Z | 2022-02-28T22:16:49.000Z | setup.py | theletterf/signalflow-cli | f1fd89988ca8ceb35b2ccc205287808eb023551a | [
"Apache-2.0"
] | 6 | 2016-11-02T15:00:52.000Z | 2019-04-26T18:40:32.000Z | setup.py | theletterf/signalflow-cli | f1fd89988ca8ceb35b2ccc205287808eb023551a | [
"Apache-2.0"
] | 15 | 2016-11-02T14:46:19.000Z | 2022-02-10T13:35:18.000Z | #!/usr/bin/env python
# Copyright (C) 2016-2018 SignalFx, Inc. All rights reserved.
from setuptools import setup, find_packages
with open('signalflowcli/version.py') as f:
exec(f.read())
with open('README.rst') as readme:
long_description = readme.read()
with open('requirements.txt') as f:
requirements... | 26.589744 | 61 | 0.660559 |
1cb9760a75ad975629c440a1546c93a4966421c9 | 583 | py | Python | tests/plugins/snapclient/__init__.py | brunosmmm/viscum | a6b90ae6203998fc016ef89972a3b5d6cf441eb0 | [
"MIT"
] | null | null | null | tests/plugins/snapclient/__init__.py | brunosmmm/viscum | a6b90ae6203998fc016ef89972a3b5d6cf441eb0 | [
"MIT"
] | null | null | null | tests/plugins/snapclient/__init__.py | brunosmmm/viscum | a6b90ae6203998fc016ef89972a3b5d6cf441eb0 | [
"MIT"
] | null | null | null | from viscum.plugin import (Module,
ModuleArgument,
ModuleCapabilities)
class SnapClientDriver(Module):
"""SnapCast client dummy driver only for display purposes"""
_module_desc = ModuleArgument('snapclient',
'SnapCast clie... | 29.15 | 65 | 0.627787 |
1cb9896fc0e1ff081096a8c90e66ba6ca138a2e1 | 8,671 | py | Python | app/delivery/send_to_providers.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/delivery/send_to_providers.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | app/delivery/send_to_providers.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | null | null | null | import random
from datetime import datetime, timedelta
from urllib import parse
from cachetools import TTLCache, cached
from flask import current_app
from notifications_utils.template import (
HTMLEmailTemplate,
PlainTextEmailTemplate,
SMSMessageTemplate,
)
from app import create_uuid, notification_provid... | 37.214592 | 115 | 0.688271 |
1cb9a6489a6745c3665d510e1ab948aed602512a | 837 | py | Python | migrations/versions/ce1cee954334_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | 1 | 2021-10-17T13:28:51.000Z | 2021-10-17T13:28:51.000Z | migrations/versions/ce1cee954334_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | migrations/versions/ce1cee954334_.py | Simple2B/cortex-backend | 9cf6802b0eff9254875bcbe553517500ccfc9082 | [
"MIT"
] | null | null | null | """empty message
Revision ID: ce1cee954334
Revises: 747f2180d382
Create Date: 2021-12-16 10:58:10.755449
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ce1cee954334'
down_revision = '747f2180d382'
branch_labels = None
depends_on = None
def upgrade():
# ... | 27 | 100 | 0.709677 |
1cb9ac6a27705c0b2e07ddff83fafa42d9caede9 | 7,086 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_claim.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_claim.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_persistent_volume_claim.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1Per... | 32.063348 | 295 | 0.621789 |
1cb9b7e077b002feb8d39e3ca7b977d48303dacf | 70 | py | Python | tests/__init__.py | rcourivaud/logstash_logger | 135f9b314428717909f4cda17298db7100b1e7d3 | [
"MIT"
] | null | null | null | tests/__init__.py | rcourivaud/logstash_logger | 135f9b314428717909f4cda17298db7100b1e7d3 | [
"MIT"
] | null | null | null | tests/__init__.py | rcourivaud/logstash_logger | 135f9b314428717909f4cda17298db7100b1e7d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for logstash_logger."""
| 17.5 | 44 | 0.614286 |
1cb9e3bb0685db3f8ac2adb11581c61ee6041cd8 | 235 | py | Python | skcosmo/feature_selection/__init__.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 16 | 2020-12-07T23:27:11.000Z | 2021-12-17T22:28:33.000Z | skcosmo/feature_selection/__init__.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 74 | 2020-11-30T18:51:41.000Z | 2021-12-06T20:53:31.000Z | skcosmo/feature_selection/__init__.py | lab-cosmo/scikit-cosmo | 8121cb74d3577618936c809b2f1b2cd698362d2f | [
"BSD-3-Clause"
] | 4 | 2020-10-15T15:01:00.000Z | 2020-11-06T16:21:53.000Z | """
The :mod:`sklearn.feature_selection` module includes FPS and CUR selection, each
with the optional PCov-flavor
"""
from ._base import (
CUR,
FPS,
PCovCUR,
PCovFPS,
)
__all__ = ["PCovFPS", "PCovCUR", "FPS", "CUR"]
| 16.785714 | 80 | 0.651064 |
1cb9e5969df3066dfbeb791f87d1edf92950477d | 7,564 | py | Python | RelationNetwork.py | obitto/relation-network | 2cbea587c9d43d6e02dba8ddd79e9ae18eca5356 | [
"MIT"
] | null | null | null | RelationNetwork.py | obitto/relation-network | 2cbea587c9d43d6e02dba8ddd79e9ae18eca5356 | [
"MIT"
] | null | null | null | RelationNetwork.py | obitto/relation-network | 2cbea587c9d43d6e02dba8ddd79e9ae18eca5356 | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow.contrib.slim as slim
from tensorflow.python.ops.rnn_cell import LSTMCell
import numpy as np
from utils import *
class RN(object):
def __init__(self, config, is_train = True, restore = False, mode = 'clevr'):
"""
model for Relation Augment network.
Args:
config: o... | 36.897561 | 161 | 0.694738 |
1cb9ea7377e8f87bc1f4f83d13dd3e1a4774a760 | 1,063 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/quarantine_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/quarantine_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/quarantine_policy_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 34.290323 | 76 | 0.60207 |
1cb9f9b566450eb62632633f2d5043093db30a14 | 1,523 | py | Python | contact/tests/test_tasks.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | 1 | 2021-11-06T12:08:26.000Z | 2021-11-06T12:08:26.000Z | contact/tests/test_tasks.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | contact/tests/test_tasks.py | konradko/directory-api | e9cd05b1deaf575e94352c46ddbd1857d8119fda | [
"MIT"
] | null | null | null | import pytest
from django.conf import settings
from django.core import mail
from company.tests import factories
from contact import models, tasks
@pytest.mark.django_db
def test_task_strips_tags_escape():
not_allowed_string = '<b>Joel</b> <button>is</button> a <span>slug</span>'
company = factories.CompanyFa... | 35.418605 | 78 | 0.717663 |
1cba63f5be75839dba5288287a704ab1305215f3 | 6,697 | py | Python | dbReporters.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 3 | 2017-12-09T10:58:59.000Z | 2019-05-22T15:32:44.000Z | dbReporters.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 26 | 2018-02-22T05:55:45.000Z | 2019-04-21T02:37:18.000Z | dbReporters.py | BAM-PFA/pymm | f029167579bfe2db87df441b313315ecfe18b18a | [
"BSD-2-Clause"
] | 1 | 2018-03-01T17:40:20.000Z | 2018-03-01T17:40:20.000Z | #!/usr/bin/env python3
# classes for database reporting
# ONE CLASS PER TABLE?? IS THAT A GOOD IDEA??
import os
import sys
# local modules
try:
import MySQLqueries
import pymmFunctions
except:
from . import MySQLqueries
from . import pymmFunctions
class EventInsert:
'''
gather variables
do the thing (make the... | 22.548822 | 72 | 0.74496 |
1cba65bc8e48fd44b41a72486b78e17a456d7f1a | 10,695 | py | Python | python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py | liangzhenduo0608/Paddle | 23a4f54b73305f43c469fd7444310a74b9d49b67 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py | liangzhenduo0608/Paddle | 23a4f54b73305f43c469fd7444310a74b9d49b67 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/dygraph_to_static/test_program_translator.py | liangzhenduo0608/Paddle | 23a4f54b73305f43c469fd7444310a74b9d49b67 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.925532 | 80 | 0.660215 |
1cba77cd7412ea66a15341fae1b2c77d7c146b48 | 5,727 | py | Python | doc/sphinxext/numpydoc.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 2 | 2017-03-10T04:16:05.000Z | 2019-04-19T23:02:48.000Z | doc/sphinxext/numpydoc.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | doc/sphinxext/numpydoc.py | pierre-haessig/pandas | f9e0b7df8ca8a92133d3cea0a26181140f991e2d | [
"PSF-2.0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """
========
numpydoc
========
Sphinx extension that handles docstrings in the Numpy standard format. [1]
It will:
- Convert Parameters etc. sections to field lists.
- Convert See Also section to a See also entry.
- Renumber references.
- Extract the signature from the docstring, if it can't be determined otherwise.... | 31.640884 | 84 | 0.581805 |
1cba96f057697af4eef7f6f0fa6c7f9b1273ecd3 | 239 | py | Python | backend/base/models.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | backend/base/models.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | backend/base/models.py | uncle-yura/simple_booking | 91a9609ae4521e4b2d52953112607c69db54d0ee | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
User.__str__ = (
lambda user_instance: user_instance.first_name + " " + user_instance.last_name
if user_instance.first_name and user_instance.last_name
else user_instance.username
)
| 29.875 | 82 | 0.782427 |
1cbabafe1ae03bb5d61066bbe971ef0ea924643c | 15,106 | py | Python | motif2sig.py | hasindu2008/libabea | 5f822e6e56567bd886a16c6f40eb84cf80b7d1df | [
"MIT"
] | 5 | 2021-08-17T05:30:37.000Z | 2022-01-10T18:02:13.000Z | motif2sig.py | hasindu2008/libabea | 5f822e6e56567bd886a16c6f40eb84cf80b7d1df | [
"MIT"
] | null | null | null | motif2sig.py | hasindu2008/libabea | 5f822e6e56567bd886a16c6f40eb84cf80b7d1df | [
"MIT"
] | null | null | null | import sys
import os
import argparse
import numpy as np
import abea
import h5py
import traceback
# import matplotlib.pyplot as plt
'''
James M. Ferguson (j.ferguson@garvan.org.au)
Genomic Technologies
Garvan Institute
Copyright 2020
script description
motif2sig.py takes the start and stop po... | 35.966667 | 131 | 0.515093 |
1cbad8c96bf81dc59842e86f5ec9fe7ff88980df | 11,427 | py | Python | git_t5/core/data_module.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | 1 | 2021-07-05T18:40:35.000Z | 2021-07-05T18:40:35.000Z | git_t5/core/data_module.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | git_t5/core/data_module.py | formermagic/git-t5 | 5ee27d1be72988986f03659bd79fc2f9680e5372 | [
"MIT"
] | null | null | null | import copy
import typing
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union
import datasets as hfds
import jax
import numpy as np
from git_t5.core import HFDatasetConfig, LocalDatasetConfig, MultitaskDatasetConfig
from git_t5.data import (
DataCollatorFo... | 32.930836 | 97 | 0.61661 |
1cbaf0081851f3a6233209271ded1ffa6fcad4d5 | 4,544 | py | Python | sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_locations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_locations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/oep/azure-mgmt-oep/azure/mgmt/oep/aio/operations/_locations_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.367347 | 158 | 0.71919 |
1cbafa4dd7a3d2f53e150619d276824c283818c5 | 8,619 | py | Python | theano_models/SdA/test_loss_SdA.py | lzamparo/SdA_reduce | 1dc11f23b395f316df5f41448542d2d5c2e619ff | [
"BSD-3-Clause"
] | null | null | null | theano_models/SdA/test_loss_SdA.py | lzamparo/SdA_reduce | 1dc11f23b395f316df5f41448542d2d5c2e619ff | [
"BSD-3-Clause"
] | null | null | null | theano_models/SdA/test_loss_SdA.py | lzamparo/SdA_reduce | 1dc11f23b395f316df5f41448542d2d5c2e619ff | [
"BSD-3-Clause"
] | null | null | null | import numpy
import cPickle
import theano
import theano.tensor as T
from mlp.logistic_sgd import LogisticRegression
from dA.AutoEncoder import AutoEncoder
from SdA import SdA
from numpy.linalg import norm
from theano.tensor.shared_randomstreams import RandomStreams
from extract_datasets import extract_unlabeled_chu... | 42.668317 | 131 | 0.63128 |
1cbb0acf5b9c1203abf2fc266a89bc2971c36495 | 5,253 | py | Python | rocrate/model/computerlanguage.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | rocrate/model/computerlanguage.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | rocrate/model/computerlanguage.py | pauldg/ro-crate-py | 695004f18175ca70b439534adece9e2242dca778 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019-2022 The University of Manchester, UK
# Copyright 2020-2022 Vlaams Instituut voor Biotechnologie (VIB), BE
# Copyright 2020-2022 Barcelona Supercomputing Center (BSC), ES
# Copyright 2020-2022 Center for Advanced Studies, Research and Development in Sardinia (CRS4), IT
# Copyright 2022 École Polytechni... | 28.862637 | 98 | 0.631258 |
1cbb1dbc458bed7bd41dd4b597261801c8da8db7 | 895 | py | Python | Models/Math/Constant/V2_2Outs/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | 2 | 2018-05-31T15:02:08.000Z | 2018-07-11T11:02:44.000Z | Models/Math/Constant/V2_2Outs/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | Models/Math/Constant/V2_2Outs/model.py | schmocker/Pyjamas | 52a72d6e8b915f77a2194d4e7d53c46d0ec28c17 | [
"MIT"
] | null | null | null | import asyncio
from pyjamas_core.util import Input, Output, Property
from pyjamas_core.supermodel import Supermodel
class Model(Supermodel):
"""
sets a constant number as output
"""
def __init__(self, uuid, name :str):
super(Model,self).__init__(uuid,name)
self.outputs['const1'] = ... | 35.8 | 100 | 0.639106 |
1cbb35de537d3104a30c235c3ac9ae8473a0ccb2 | 2,396 | py | Python | plugins/aea-cli-benchmark/aea_cli_benchmark/case_acn_startup/command.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/case_acn_startup/command.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | plugins/aea-cli-benchmark/aea_cli_benchmark/case_acn_startup/command.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2021 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance... | 28.86747 | 80 | 0.601836 |
1cbb3e6723ef55c95d349adaffe19f0b97a13bda | 4,819 | py | Python | examples/navier_stokes/stokes_slip_bc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 1 | 2021-06-07T13:20:04.000Z | 2021-06-07T13:20:04.000Z | examples/navier_stokes/stokes_slip_bc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | examples/navier_stokes/stokes_slip_bc.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | r"""
Incompressible Stokes flow with Navier (slip) boundary conditions, flow driven
by a moving wall and a small diffusion for stabilization.
This example demonstrates the use of `no-penetration` boundary conditions as
well as `edge direction` boundary conditions together with Navier or slip
boundary conditions.
Find... | 29.384146 | 78 | 0.583731 |
1cbb9b2bb0acf594529321abea7ce6b296b13dfc | 492 | py | Python | CHAPTER 13 (text processing)/Huffman_Algorithm.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 13 (text processing)/Huffman_Algorithm.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | CHAPTER 13 (text processing)/Huffman_Algorithm.py | ahammadshawki8/Data-Structures-Algorithms-in-Python- | fc18b54128cd5bc7639a14999d8f990190b524eb | [
"MIT"
] | null | null | null | from linked_binary_tree import *
from collections import Counter
from sorted_priority_queue import *
def huffman(string):
f = Counter()
f.update(string)
f = dict(f)
Q = SortedPriorityQueue()
for s in string:
T = LinkedBinaryTree()
root = T._add_root(s)
Q.add(f[s],T)
while len(Q) > 1:
(f1,T1) = Q.remo... | 16.965517 | 35 | 0.652439 |
1cbb9e5c3a8a7c63fcb76153aef7e96820497a68 | 5,519 | py | Python | envs/flatland_sparse.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | envs/flatland_sparse.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | envs/flatland_sparse.py | HaiDangDang/2020-flatland | abbf2f7f62fabf6da0937f80c2181f1c457ce24a | [
"MIT"
] | null | null | null | import logging
from pprint import pprint
import gym
from flatland.envs.malfunction_generators import malfunction_from_params, no_malfunction_generator
# from flatland.envs.rail_env import RailEnv
from envs.flatland.utils.gym_env_wrappers import FlatlandRenderWrapper as RailEnv
from flatland.envs.rail_generators impor... | 45.61157 | 122 | 0.666425 |
1cbbae2cef2a432d76b304de07fc04e4f754d5c3 | 9,710 | py | Python | src/maestral_cocoa/settings.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 8 | 2020-11-13T08:48:01.000Z | 2021-12-16T06:30:27.000Z | src/maestral_cocoa/settings.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 4 | 2021-08-23T20:41:39.000Z | 2021-11-16T08:43:58.000Z | src/maestral_cocoa/settings.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 1 | 2021-11-09T07:14:44.000Z | 2021-11-09T07:14:44.000Z | # -*- coding: utf-8 -*-
# system imports
import sys
import os
import os.path as osp
import asyncio
from pathlib import Path
from typing import Any, Union, TYPE_CHECKING
# external imports
import toga
from maestral.utils.path import delete
from maestral.daemon import MaestralProxy
# local imports
from .utils import (... | 35.181159 | 88 | 0.600206 |
1cbbe1163c7d4f1fbd54d1a65191850051d4e912 | 13,427 | py | Python | train_extractor_ml.py | kenchan0226/AbsThenExtPublic | 567811d6c76fe51c2c368eeaca1761eb322db2a2 | [
"MIT"
] | 5 | 2021-08-10T02:31:51.000Z | 2022-02-08T01:12:25.000Z | train_extractor_ml.py | kenchan0226/abs-then-ext-public | 567811d6c76fe51c2c368eeaca1761eb322db2a2 | [
"MIT"
] | null | null | null | train_extractor_ml.py | kenchan0226/abs-then-ext-public | 567811d6c76fe51c2c368eeaca1761eb322db2a2 | [
"MIT"
] | null | null | null | """ train extractor (ML)"""
import argparse
import json
import os
from os.path import join, exists
import pickle as pkl
from cytoolz import compose
import torch
from torch import optim
from torch.nn import functional as F
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import DataLoader
... | 42.490506 | 177 | 0.655619 |
1cbc03889b172868c3f9e324566fced24825388c | 7,648 | py | Python | common/f5/bigip/interfaces/rule.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | common/f5/bigip/interfaces/rule.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | common/f5/bigip/interfaces/rule.py | Sinan828/oslbaasv1_for_cmcc | 52318460b704ed5f08491b482b47aae61bf166ca | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 40.465608 | 79 | 0.573483 |
1cbc1ee609b4fc5eee6edafcedef95f190cc5397 | 802 | py | Python | test/unit/v1/test_sync_report.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | test/unit/v1/test_sync_report.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | test/unit/v1/test_sync_report.py | ehossack/b2-sdk-python | 034bec38671c0862b6956915993061359dbd51f6 | [
"MIT"
] | null | null | null | ######################################################################
#
# File: test/unit/v1/test_sync_report.py
#
# Copyright 2019 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from unittest.mock i... | 28.642857 | 94 | 0.554863 |
1cbc3973388deb88f143f38a6dda15151bc50af6 | 320 | py | Python | tests/test_skeleton.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | tests/test_skeleton.py | misakadam97/cell_mrcnn | 1cd32da96fad0a26257602d602777a6c069d6ae0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
from cell_mrcnn.skeleton import fib
__author__ = "misakadam97"
__copyright__ = "misakadam97"
__license__ = "mit"
def test_fib():
assert fib(1) == 1
assert fib(2) == 1
assert fib(7) == 13
with pytest.raises(AssertionError):
fib(-10)
| 17.777778 | 39 | 0.646875 |
1cbc5db33d97630d919358ba8e3f799878964d9e | 6,321 | py | Python | deprecated_nets/net_global.py | danielmk/pyDentateeLife2020 | b4a9f2beaa0c74dbc9583e2cf228856612596f8a | [
"MIT"
] | 1 | 2022-02-24T20:39:46.000Z | 2022-02-24T20:39:46.000Z | deprecated_nets/net_global.py | danielmk/pydentate | df8f67d4523ce463701c5e5675e74e309dd151e7 | [
"MIT"
] | null | null | null | deprecated_nets/net_global.py | danielmk/pydentate | df8f67d4523ce463701c5e5675e74e309dd151e7 | [
"MIT"
] | 4 | 2021-11-02T07:47:42.000Z | 2021-11-30T09:07:35.000Z | # -*- coding: utf-8 -*-
"""
This module implements the class StandardNetwork.
StandardNetwork creates a ring network as defined in Santhakumar et al. 2005
with some changes as in Yim et al. 2015.
See StandardNetwork docstring for details.
Created on Tue Nov 28 13:01:38 2017
@author: DanielM
"""
from neuron import h, ... | 45.47482 | 98 | 0.490745 |
1cbc69d1f3bdd5b76b048b4b9e022080cd02ac63 | 3,015 | py | Python | setup.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | setup.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | setup.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup, find_packages
import papas
# Load long description from files
with open('README.rst', 'r') as readme, open('CHANGELOG.rst', 'r') as history:
long_description = '\n' + readme.read() + '\n\n' + history.read()
# A list of strings specifying what other distributi... | 33.876404 | 82 | 0.678939 |
1cbc851f53b69ff4d0a851339ec5ef9d561df8c3 | 1,029 | py | Python | datawinners/smsapi/send_sms.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/smsapi/send_sms.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/smsapi/send_sms.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth import authenticate
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
import jsonpickle
from datawinners.common.authorization import api_http_basic
from datawinners.sms.models import MSG_TYPE_API
from datawinners.utils import get_organization
from datawin... | 39.576923 | 108 | 0.770651 |
1cbc8c76686a2263f6b829401462397add6471e2 | 4,458 | py | Python | ui/SettingsWindow.py | nkrios/VMAttack | 67dcce6087163d85bbe7780e3f6e6e9e72e2212a | [
"MIT"
] | 724 | 2016-09-19T09:38:54.000Z | 2022-02-20T14:01:56.000Z | ui/SettingsWindow.py | 987432340/VMAttack | 23ba4614525d6f59c8f8fc6902c2c3ee1e05ee5d | [
"MIT"
] | 11 | 2016-10-21T02:05:42.000Z | 2021-06-20T09:35:41.000Z | ui/SettingsWindow.py | 987432340/VMAttack | 23ba4614525d6f59c8f8fc6902c2c3ee1e05ee5d | [
"MIT"
] | 173 | 2016-09-21T12:23:54.000Z | 2022-02-28T09:28:47.000Z | # coding=utf-8
__author__ = 'Anatoli Kalysch'
from idaapi import Form, BADADDR
from lib.VMRepresentation import get_vmr, VMContext
class SettingsView(Form):
def __init__(self):
Form.__init__(self, ("STARTITEM 0\n"
"BUTTON YES* Confirm\n"
"BUTTON C... | 42.056604 | 100 | 0.514132 |
1cbca67fb5c0614dec826f7ac15797bc31f96a79 | 904 | py | Python | sdks/python/test/test_XamarinToolset.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_XamarinToolset.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_XamarinToolset.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 22.6 | 87 | 0.712389 |
1cbcc8f0b28b4e209161d73d3795442b4f81b576 | 7,662 | py | Python | zubhub_backend/zubhub/projects/migrations/0001_initial.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | 1 | 2022-01-21T14:15:24.000Z | 2022-01-21T14:15:24.000Z | zubhub_backend/zubhub/projects/migrations/0001_initial.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | zubhub_backend/zubhub/projects/migrations/0001_initial.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2021-05-16 03:47
from django.conf import settings
import django.contrib.postgres.indexes
import django.contrib.postgres.search
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
... | 51.08 | 140 | 0.538763 |
1cbce15c95c7d52bdee50401bcc9d238b8acf1a1 | 2,021 | py | Python | google-cloud-sdk/lib/surface/functions/describe.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/surface/functions/describe.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/functions/describe.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... | 36.745455 | 79 | 0.736269 |
1cbd0455ad1490c355089aeb007a1d989389411e | 7,971 | py | Python | scraper/named_entity_recognition.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | 1 | 2020-09-11T01:13:27.000Z | 2020-09-11T01:13:27.000Z | scraper/named_entity_recognition.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | 15 | 2020-06-19T01:14:36.000Z | 2021-09-08T02:00:20.000Z | scraper/named_entity_recognition.py | Stimson-Center/stimson-web-scraper | c2e6c3ae4abb8e8697b10d844bfb0fa3d305d05f | [
"MIT"
] | null | null | null | import re
from collections import OrderedDict
import dateparser
import numpy as np
from date_extractor import extract_dates
from spacy.lang.en.stop_words import STOP_WORDS
from spacy.matcher import Matcher
# https://gist.github.com/BrambleXu/3d47bbdbd1ee4e6fc695b0ddb88cbf99
# https://spacy.io/usage/linguistic-featur... | 32.534694 | 101 | 0.538326 |
1cbd07c1eba66ba38abf54d8e0e3a5b7bc6ccfd9 | 5,705 | py | Python | examples/science_ie/science_ie.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | examples/science_ie/science_ie.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | examples/science_ie/science_ie.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | from sciwing.datasets.seq_labeling.conll_dataset import CoNLLDatasetManager
from sciwing.models.rnn_seq_crf_tagger import RnnSeqCrfTagger
from sciwing.modules.lstm2seqencoder import Lstm2SeqEncoder
from sciwing.modules.embedders.trainable_word_embedder import TrainableWordEmbedder
from sciwing.modules.embedders.char_em... | 35.880503 | 102 | 0.703944 |
1cbd08eb4302d66941eca392dd5fe7f0a20727ce | 2,508 | py | Python | fiepipedesktoplib/gitlabserver/shell/gitlabserver.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/gitlabserver/shell/gitlabserver.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | fiepipedesktoplib/gitlabserver/shell/gitlabserver.py | leith-bartrich/fiepipe_desktop | 5136141d67a59e9a2afb79f368a6a02f2d61d2da | [
"MIT"
] | null | null | null | import sys
import typing
from fiepipelib.gitlabserver.routines.gitlabserver import GitLabServerRoutines
from fiepipedesktoplib.gitlabserver.shell.server_name_var_command import GitLabServerNameVar
from fiepipedesktoplib.shells.AbstractShell import AbstractShell
from fiepipelib.legalentity.registry.routines.registered_... | 32.153846 | 105 | 0.702552 |
1cbd345e0e3c61b583481236759c9211b39cec34 | 2,158 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/users/get_full_user.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/users/get_full_user.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/users/get_full_user.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 29.972222 | 103 | 0.615848 |
1cbd4aa3bf437447ae5ae262de5b7ace57c2426c | 4,580 | py | Python | hyperbox/mutables/ops/linear.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | hyperbox/mutables/ops/linear.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | hyperbox/mutables/ops/linear.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null |
import math
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from .base_module import FinegrainedModule
from .utils import is_searchable
__all__ = [
'Linear'
]
class Linear(FinegrainedModule):
def __i... | 35.230769 | 107 | 0.578821 |
1cbd60ffb298a1fa94b3891f640b6aa69f3db8cf | 4,234 | py | Python | openapi_client/models/facilities.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/facilities.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/facilities.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 28.039735 | 97 | 0.576287 |
1cbdc0eb9df33aec7523ecf5e87d06ab571379da | 15,050 | py | Python | selfdrive/car/toyota/interface.py | lispain/081ATOM_NIRO | b50a79ab2080b5e359329420a958803e9e20b598 | [
"MIT"
] | 2 | 2021-02-14T12:03:07.000Z | 2021-03-18T01:52:24.000Z | selfdrive/car/toyota/interface.py | hikee9123/openpilot_081 | eb597ca8f507bc111934b8991351b1cabce7763b | [
"MIT"
] | null | null | null | selfdrive/car/toyota/interface.py | hikee9123/openpilot_081 | eb597ca8f507bc111934b8991351b1cabce7763b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from cereal import car
from selfdrive.config import Conversions as CV
from selfdrive.car.toyota.values import Ecu, ECU_FINGERPRINT, CAR, TSS2_CAR, FINGERPRINTS
from selfdrive.car import STD_CARGO_KG, scale_rot_inertia, scale_tire_stiffness, is_ecu_disconnected, gen_empty_fingerprint
from selfdriv... | 41.805556 | 139 | 0.665714 |
1cbdfd0fa1b935d46f176d430556752421eca793 | 19,076 | py | Python | wsidicomizer/openslide.py | JamesDarcy616/wsidicomizer | c38c062a2b1c31ce30be00ef71c69e34826c8f96 | [
"Apache-2.0"
] | null | null | null | wsidicomizer/openslide.py | JamesDarcy616/wsidicomizer | c38c062a2b1c31ce30be00ef71c69e34826c8f96 | [
"Apache-2.0"
] | null | null | null | wsidicomizer/openslide.py | JamesDarcy616/wsidicomizer | c38c062a2b1c31ce30be00ef71c69e34826c8f96 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 SECTRA AB
#
# 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... | 32.608547 | 79 | 0.593783 |
1cbe2cdc7f322a752240a126c78cc2f5d9857b9b | 10,345 | py | Python | Examples/12_tacticities/polycarboxybetaine/scripts/polymerization.py | ElsevierSoftwareX/SOFTX-D-21-00117 | 8ce9f9b5c1f1bb07733f248763759b05454690c8 | [
"MIT"
] | 55 | 2017-01-14T09:11:54.000Z | 2022-01-28T17:17:34.000Z | Examples/12_tacticities/polycarboxybetaine/scripts/polymerization.py | ElsevierSoftwareX/SOFTX-D-21-00117 | 8ce9f9b5c1f1bb07733f248763759b05454690c8 | [
"MIT"
] | 13 | 2017-03-27T19:32:57.000Z | 2022-01-04T17:49:50.000Z | Examples/12_tacticities/polycarboxybetaine/scripts/polymerization.py | ElsevierSoftwareX/SOFTX-D-21-00117 | 8ce9f9b5c1f1bb07733f248763759b05454690c8 | [
"MIT"
] | 28 | 2016-08-29T12:30:58.000Z | 2021-12-04T07:24:07.000Z | from pysimm import lmps, system, forcefield
from pysimm.apps.random_walk import random_walk, random_walk_tacticity, check_tacticity
import matplotlib.pyplot as mplp
import numpy
import os
# ----------> Here starts the main body of polymerisation code <------------
def cap_with_methyls(input_sst, ff):
'''
... | 50.960591 | 123 | 0.61972 |
1cbe35be350ff9ddefab2b942b48ba86f774f80b | 3,000 | py | Python | code/train/util/util.py | 96jhwei/Genetic-U-Net | 25116f01afcf8ed4386cd0fc258da15e1c982cb5 | [
"MIT"
] | 14 | 2021-09-09T11:22:17.000Z | 2022-03-14T10:06:36.000Z | code/train/util/util.py | 96jhwei/Genetic-U-Net | 25116f01afcf8ed4386cd0fc258da15e1c982cb5 | [
"MIT"
] | 1 | 2021-11-24T10:30:36.000Z | 2021-11-24T10:30:36.000Z | code/train/util/util.py | 96jhwei/Genetic-U-Net | 25116f01afcf8ed4386cd0fc258da15e1c982cb5 | [
"MIT"
] | 5 | 2021-11-02T09:29:49.000Z | 2022-03-25T09:44:25.000Z | from model.genetic_unet.genetic_unet import Net
import multiprocessing as mp
import multiprocessing.pool
import torch
from deap import tools
import time
from ..train_model import train_one_model
class NoDaemonProcess(mp.Process):
def _get_daemon(self):
return False
def _set_daemon(self... | 35.294118 | 121 | 0.607 |
1cbe44bca747f017abe10ecdc6d09b9fb3682d5f | 2,326 | py | Python | configs/stylegan_mstar.py | McHz1s/genforce | c808edc5fe897c27076c4588de3466669399e5e6 | [
"MIT"
] | null | null | null | configs/stylegan_mstar.py | McHz1s/genforce | c808edc5fe897c27076c4588de3466669399e5e6 | [
"MIT"
] | null | null | null | configs/stylegan_mstar.py | McHz1s/genforce | c808edc5fe897c27076c4588de3466669399e5e6 | [
"MIT"
] | null | null | null | # python3.7
"""Configuration for training StyleGAN on FF-HQ (256) dataset.
All settings are particularly used for one replica (GPU), such as `batch_size`
and `num_workers`.
"""
runner_type = 'StyleGANRunner'
gan_type = 'stylegan'
resolution = 128
batch_size = 24
val_batch_size = 64
total_img = 25000_000
gpus = '9'
#... | 35.784615 | 103 | 0.682717 |
1cbe825b0d82c69a8bb470e58a25ceb8cab86d7f | 483 | py | Python | dali/data/utils.py | JonathanRaiman/dali-cython-stub | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 7 | 2016-06-20T17:50:06.000Z | 2019-12-13T17:27:46.000Z | dali/data/utils.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 6 | 2015-08-04T07:25:38.000Z | 2015-08-13T22:06:22.000Z | dali/data/utils.py | JonathanRaiman/dali-cython | e258469aeb1d4cb3e4cdf5c07e8948f461a038f1 | [
"MIT"
] | 2 | 2016-07-04T21:38:14.000Z | 2016-08-31T02:53:19.000Z | PUNCTUATION_CHARS = set(list('.,?!-"\'()[]{}:;'))
def split_punctuation(sentence, punctuation=PUNCTUATION_CHARS):
res = []
for i, char in enumerate(list(sentence)):
if char in punctuation:
if i - 1 >= 0 and sentence[i-1] != ' ':
res.append(' ')
res.append(char)
... | 32.2 | 64 | 0.496894 |
1cbe92460c1ac03a73a3d4a38c18f51df32fb363 | 3,286 | py | Python | lib/connect/venders/google/auth.py | hdknr/connect | fb99dc3069dc165d6771fb19e2415b45ee421353 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | lib/connect/venders/google/auth.py | hdknr/connect | fb99dc3069dc165d6771fb19e2415b45ee421353 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | lib/connect/venders/google/auth.py | hdknr/connect | fb99dc3069dc165d6771fb19e2415b45ee421353 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Google "OAuth 2.0 for Login(OpenID Connect)"
https://developers.google.com/accounts/docs/OAuth2Login
'''
from django.http import HttpResponse
from django.template import RequestContext
from django.template.response import TemplateResponse
from django.core.urlresolvers import reverse
from dja... | 27.613445 | 93 | 0.627511 |
1cbea4989ba7191e58fcee404c4526f5a1e729ae | 4,884 | py | Python | tfchain/crypto/merkletree.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | null | null | null | tfchain/crypto/merkletree.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | 3 | 2019-05-21T10:11:38.000Z | 2019-05-31T21:12:37.000Z | tfchain/crypto/merkletree.py | xmonader/pytfchain | ef28238eeaedda1dd5ea8055ea6dc2ca6baa263c | [
"Apache-2.0"
] | 1 | 2019-05-21T08:40:40.000Z | 2019-05-21T08:40:40.000Z | # PORTED FROM OLD Rivine JS960 code,
# perhaps we can remove this file in the future,
# or at the very least it should probably be(come/replaced-by) a global JS solution.
# // A Tree takes data as leaves and returns the Merkle root. Each call to 'Push'
# // adds one leaf to the Merkle tree. Calling 'Root' returns the ... | 38.456693 | 87 | 0.638821 |
1cbeabb7f7ba13c0fefa3e35dc3f08c2896f9280 | 27 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/CrossPromoPanel/cross_promo_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/CrossPromoPanel/cross_promo_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/UI_New/GameEvents/CrossPromoPanel/cross_promo_panel.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class CrossPromoPanel: pass | 27 | 27 | 0.888889 |
1cbebe7679d838856f89e958db8bcfd2d978310a | 3,396 | py | Python | pyvital/filters/pleth_ptt.py | vitaldb/pyvital | b7b045d92e8db3a9d7f45ea6593e57c73ae8ec11 | [
"MIT"
] | 5 | 2019-04-08T05:33:56.000Z | 2021-05-07T06:49:25.000Z | pyvital/filters/pleth_ptt.py | vitaldb/pyvital | b7b045d92e8db3a9d7f45ea6593e57c73ae8ec11 | [
"MIT"
] | null | null | null | pyvital/filters/pleth_ptt.py | vitaldb/pyvital | b7b045d92e8db3a9d7f45ea6593e57c73ae8ec11 | [
"MIT"
] | 5 | 2019-09-17T09:52:55.000Z | 2022-02-25T08:30:08.000Z | from .. import arr
import numpy as np
cfg = {
'name': 'Pleth - Pulse Transit Time',
'group': 'Medical algorithms',
'desc': 'Calculate pulse transit time.',
'reference': '',
'overlap': 5,
'interval': 30,
'inputs': [{'name': 'ecg', 'type': 'wav'}, {'name': 'pleth', 'type': 'wav'}],
'outpu... | 33.96 | 84 | 0.565371 |
1cbec33076ecf59ade9878458e6ca76122d9f8c4 | 809 | py | Python | setup.py | jameswdelancey/pe6502_web_interface | 852da71db1fdbd5661b8d760f5e7ea73725604bc | [
"Apache-2.0"
] | null | null | null | setup.py | jameswdelancey/pe6502_web_interface | 852da71db1fdbd5661b8d760f5e7ea73725604bc | [
"Apache-2.0"
] | null | null | null | setup.py | jameswdelancey/pe6502_web_interface | 852da71db1fdbd5661b8d760f5e7ea73725604bc | [
"Apache-2.0"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="example-pkg-YOUR-USERNAME-HERE", # Replace with your own username
version="0.0.1",
author="Example Author",
author_email="author@example.com",
description="A small examp... | 31.115385 | 76 | 0.663782 |
1cbed62f0364e38830689256168137b9ffbc4639 | 26,261 | py | Python | compoundeye/model.py | InsectRobotics/insectvision | ab3ac5e56fa9c75388bdc7d08012736a0c150143 | [
"MIT"
] | 4 | 2019-09-05T17:31:13.000Z | 2021-05-27T12:34:07.000Z | compoundeye/model.py | InsectRobotics/insectvision | ab3ac5e56fa9c75388bdc7d08012736a0c150143 | [
"MIT"
] | null | null | null | compoundeye/model.py | InsectRobotics/insectvision | ab3ac5e56fa9c75388bdc7d08012736a0c150143 | [
"MIT"
] | 6 | 2019-10-09T12:02:42.000Z | 2021-05-27T12:33:51.000Z | #!/usr/bin/env python
__author__ = "Evripidis Gkanias"
__copyright__ = "Copyright (c) 2019, Insect Robotics Group," \
"Institude of Perception, Action and Behaviour," \
"School of Informatics, the University of Edinburgh"
__credits__ = ["Evripidis Gkanias"]
__license__ = "MIT"
__version... | 45.592014 | 119 | 0.520163 |
1cbedf1e850205c7eb957545966ad49c97285889 | 10,697 | py | Python | prepare_data.py | Blank-Wang/dcase2017_task4_cvssp | fc7b604dcea6d9ca4dbcde8a33da3346fdda271c | [
"MIT"
] | 151 | 2017-09-19T17:02:18.000Z | 2021-12-29T02:56:47.000Z | prepare_data.py | MaigoAkisame/dcase2017_task4_cvssp | fc7b604dcea6d9ca4dbcde8a33da3346fdda271c | [
"MIT"
] | 11 | 2017-10-10T21:01:27.000Z | 2020-12-09T13:22:17.000Z | prepare_data.py | yongxuUSTC/dcase2017_task4_cvssp | 97ab1e29709bc87c9c1f9459929fb3853e7fa664 | [
"MIT"
] | 57 | 2017-09-22T22:13:33.000Z | 2021-12-01T09:03:58.000Z | from __future__ import print_function
import numpy as np
import sys
import soundfile
import os
import librosa
from scipy import signal
import pickle
import cPickle
import scipy
import time
import csv
import gzip
import h5py
import matplotlib.ticker as ticker
import matplotlib.pyplot as plt
from sklearn import preproces... | 33.323988 | 95 | 0.566794 |
1cbee3973cc033002c18e22e18a8f20d780abbcb | 265 | py | Python | violas_client/lbrtypes/on_chain_config/dual_attestation_limit.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/on_chain_config/dual_attestation_limit.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/lbrtypes/on_chain_config/dual_attestation_limit.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from violas_client.canoser import Struct, Uint64
from violas_client.lbrtypes.on_chain_config import OnChainConfig
class DualAttestationLimit(Struct, OnChainConfig):
IDENTIFIER = "DualAttestationLimit"
_fields = [
("micro_lbr_limit", Uint64)
]
| 26.5 | 64 | 0.766038 |
1cbf3050868299fc1c03b43beef3dadd0d3b6697 | 120,729 | py | Python | dnacentersdk/api/v2_1_1/devices.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/api/v2_1_1/devices.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/api/v2_1_1/devices.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Devices API wrapper.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 with... | 38.76975 | 78 | 0.565075 |
1cbf398fa2af184c8db1b34714fcf69bb9b752de | 59,491 | py | Python | oscar/run_retrieval.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 20 | 2022-02-27T16:26:57.000Z | 2022-03-23T07:09:47.000Z | oscar/run_retrieval.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 4 | 2022-03-09T11:16:00.000Z | 2022-03-28T13:03:26.000Z | oscar/run_retrieval.py | Junction4Nako/mvp_pytorch | 66db043d7beb1481c7a4c62908a4a46c7bfbc57a | [
"MIT"
] | 6 | 2022-03-05T07:28:07.000Z | 2022-03-24T09:38:10.000Z | # Copyright (c) 2020 Microsoft Corporation. Licensed under the MIT license.
from __future__ import absolute_import, division, print_function
import argparse
import os
import glob
# os.environ["CUDA_VISIBLE_DEVICES"] = '0'
import base64
import os.path as op
import random, json
import numpy as np
import torch
import tor... | 51.551993 | 181 | 0.61922 |
1cbf7d77a092f68ccec752750724aa54e8a907f1 | 4,956 | py | Python | parser/team09/tabla_simbolos.py | jorasofra/tytus | a4943af1c7d3c268edd5c8c1df82561419e2a37e | [
"MIT"
] | 1 | 2021-01-09T05:32:35.000Z | 2021-01-09T05:32:35.000Z | parser/team09/tabla_simbolos.py | XiomRB/tytus | 0873e4bdce5c110bee6ef2aa98240be6a93ae024 | [
"MIT"
] | null | null | null | parser/team09/tabla_simbolos.py | XiomRB/tytus | 0873e4bdce5c110bee6ef2aa98240be6a93ae024 | [
"MIT"
] | null | null | null | from enum import Enum
import Errores as E
class tipo_simbolo(Enum):
DATABASE = 1,
TABLE = 2,
INTEGER = 3,
TEXT = 4,
SMALLINT = 5,
BEGINT = 6,
DECIMAL = 7,
REAL = 8,
D_PRECISION = 9,
MONEY = 10,
CHARACTER_V = 11,
VARCHR = 12,
CHARACTER = 13,
CHAR = 14,
TIMESTA... | 33.261745 | 130 | 0.579096 |
1cbf8b1f12db00a17bb42d1f7c330a63a315933f | 4,600 | py | Python | python/eggroll/roll_site/test/roll_site_test_asset.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/roll_site/test/roll_site_test_asset.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/roll_site/test/roll_site_test_asset.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 - now, Eggroll 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 ... | 32.857143 | 115 | 0.681522 |
1cbf925a2c71a3d7dc2963d5b6604ba5634baa96 | 13,213 | py | Python | ts3/Events.py | SilentLama/python-ts3-bot | 1f86b228e3516cca9a1d8a8cc45b4011e3a0dc2c | [
"Apache-2.0"
] | null | null | null | ts3/Events.py | SilentLama/python-ts3-bot | 1f86b228e3516cca9a1d8a8cc45b4011e3a0dc2c | [
"Apache-2.0"
] | null | null | null | ts3/Events.py | SilentLama/python-ts3-bot | 1f86b228e3516cca9a1d8a8cc45b4011e3a0dc2c | [
"Apache-2.0"
] | null | null | null | """Events generated by the TS3Connection class."""
import logging
import sys
import traceback
from enum import IntEnum, Enum
class EventType(Enum):
CLIENT_ENTER = "notifycliententerview"
CLIENT_LEFT = "notifyclientleftview"
CLIENT_MOVED = "notifyclientmoved"
TEXT_MESSAGE = "notifytextmessage"
SERV... | 29.03956 | 146 | 0.644971 |
1cbf9eba9bf4ac94fba64609dcce642e6a52d046 | 18,926 | py | Python | sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appcontainers/azure-mgmt-appcontainers/azure/mgmt/appcontainers/operations/_managed_environments_storages_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... | 40.613734 | 210 | 0.676265 |
1cbfb615c910ed5d1840e449257826bd3e4d7cc9 | 2,701 | py | Python | toontown/effects/Splash.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/effects/Splash.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/effects/Splash.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from toontown.effects.Ripples import *
from toontown.battle.BattleProps import globalPropPool
from toontown.battle import BattleParticles
class Splash(NodePath):
splashCount = 0
def __init__(self, parent = hidden, wantParticles = 1... | 38.042254 | 194 | 0.641984 |
1cc01d9ef266caeb2f62d5022e96828c1561b0da | 1,817 | py | Python | myia/operations/macro_call_object.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 222 | 2019-02-13T07:56:28.000Z | 2022-03-28T07:07:54.000Z | myia/operations/macro_call_object.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 107 | 2019-02-12T21:56:39.000Z | 2022-03-12T01:08:03.000Z | myia/operations/macro_call_object.py | strint/myia | 3d00d3fb3df80ab7a264a724226c5f56c6ff1a8a | [
"MIT"
] | 27 | 2017-11-14T17:58:15.000Z | 2019-01-14T01:36:09.000Z | """Implementation of macro `call_object(obj, *args)`.
Receive and call syntax `obj(*args)` and replace it with
relevant myia operations.
"""
from myia.utils.errors import MyiaTypeError
from .. import operations, xtype
from ..lib import (
AbstractClassBase,
AbstractScalar,
AbstractType,
macro,
type... | 29.786885 | 74 | 0.635663 |
1cc046820eb766fed5ef125076a691273544ca36 | 3,006 | py | Python | plugins/getsongs.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 1 | 2020-10-29T15:44:57.000Z | 2020-10-29T15:44:57.000Z | plugins/getsongs.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | null | null | null | plugins/getsongs.py | ItzSjDude/PikaBotPlugins | 6b468a43caefbea5b8f3cd2c1ca83790380e1f5b | [
"Apache-2.0"
] | 4 | 2020-10-28T09:02:35.000Z | 2020-12-27T22:45:57.000Z | """ Songs Module
{i}getsong song name
"""
# created by @mrconfused
import glob
import os
from selenium import webdriver
from userbot import ALIVE_NAME
DEFAULTUSER = ALIVE_NAME
@ItzSjDude(pattern="getsong( (.*)|$)")
async def _(event):
reply_to_id = event.message.id
if event.reply_to_msg_id:
reply_t... | 30.989691 | 106 | 0.604125 |
1cc0480fbe3bb5e87a2e9365657b73be3aa2d02e | 7,563 | py | Python | networks/convlstm_networks/train_src/model_input_mode.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | networks/convlstm_networks/train_src/model_input_mode.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | networks/convlstm_networks/train_src/model_input_mode.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | import deb
import numpy as np
import pdb
class ModelInputMode():
pass
class MIMFixed(ModelInputMode):
def __init__(self):
pass
def batchTrainPreprocess(self, batch, data, label_date_id, batch_seq_len=12):
input_ = batch['in'].astype(np.float16)
input_ = data.addDoty(input_)
r... | 42.971591 | 111 | 0.616422 |
1cc07fdb0c6d7ed7a6f063bb181029857088db95 | 863 | py | Python | packages/fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | packages/fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | packages/fetchai/__init__.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# Copyright 2018-2020 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# ... | 39.227273 | 80 | 0.582851 |
1cc099f77021ef554560f128845710223fa0d0a9 | 970 | py | Python | river/metrics/log_loss.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/metrics/log_loss.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/metrics/log_loss.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | import math
from river import metrics
__all__ = ["LogLoss"]
class LogLoss(metrics.base.MeanMetric, metrics.base.BinaryMetric):
"""Binary logarithmic loss.
Examples
--------
>>> from river import metrics
>>> y_true = [True, False, False, True]
>>> y_pred = [0.9, 0.1, 0.2, 0.65]
>... | 19.795918 | 78 | 0.576289 |
1cc0a965fb2d163b3326e506974e5fc6b2b7bfa0 | 2,894 | py | Python | aries_cloudagent/protocols/resolve_did/v0_9/messages/resolve_did_result.py | danubetech/aries-cloudagent-python | 18b6db8dc5d24a69ad7d80ae1a88f95197cd2d14 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/resolve_did/v0_9/messages/resolve_did_result.py | danubetech/aries-cloudagent-python | 18b6db8dc5d24a69ad7d80ae1a88f95197cd2d14 | [
"Apache-2.0"
] | 1 | 2021-04-20T03:56:53.000Z | 2021-04-20T04:04:07.000Z | aries_cloudagent/protocols/resolve_did/v0_9/messages/resolve_did_result.py | danubetech/aries-cloudagent-python | 18b6db8dc5d24a69ad7d80ae1a88f95197cd2d14 | [
"Apache-2.0"
] | 1 | 2021-04-20T03:44:33.000Z | 2021-04-20T03:44:33.000Z | """Resolve DID response message."""
# TODO: add further response fields/options, see
# https://github.com/hyperledger/aries-rfcs/tree/master/features/0124-did-resolution-protocol#resolve-message
from datetime import datetime
from typing import Union
from marshmallow import fields
from ....problem_report.v1_0.messag... | 30.145833 | 109 | 0.688666 |
1cc0bfd24fd814429409a103b075e87dacd26a75 | 9,161 | py | Python | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_data_masking_policies_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... | 46.739796 | 247 | 0.692828 |
1cc0c7930d643c3025ac7b0a2255b1f0025d1a70 | 927 | py | Python | management_layer/exceptions.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | management_layer/exceptions.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | management_layer/exceptions.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | import json
from aiohttp import web
class JSONException(web.HTTPException):
status_code = None
def __init__(self, *, headers=None, reason=None, body=None,
json_data=None, message=None):
# Use the json object given or create a message object using the string in message.
text ... | 25.75 | 91 | 0.703344 |
1cc0cb68dc1d898edfef54352e4d3dad9df6328c | 31,895 | py | Python | helix/workspace.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | 2 | 2021-04-26T15:14:08.000Z | 2021-06-07T10:56:37.000Z | helix/workspace.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | null | null | null | helix/workspace.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
"""\
This module defines the Workspace classes that are central to every script.
The role of these classes is to provide paths to all the data files used in any
part of the pipeline and to hide the organization of the directories containing
those files. The base Workspace class deals with files... | 33.362971 | 94 | 0.631227 |
1cc0d981d3fa4feed24f12a37d2f05823fb826fc | 2,672 | py | Python | src/jax_rl/policies.py | hamishs/JAX-RL | c7b59598bce18b6dc7e8317c10d14bf94606fc79 | [
"MIT"
] | 3 | 2021-11-12T13:06:05.000Z | 2022-03-27T13:36:38.000Z | src/jax_rl/policies.py | hamishs/JAX-RL | c7b59598bce18b6dc7e8317c10d14bf94606fc79 | [
"MIT"
] | null | null | null | src/jax_rl/policies.py | hamishs/JAX-RL | c7b59598bce18b6dc7e8317c10d14bf94606fc79 | [
"MIT"
] | 1 | 2021-12-24T22:27:37.000Z | 2021-12-24T22:27:37.000Z | import jax
import jax.numpy as jnp
import numpy as np
from abc import ABC, abstractmethod
class Policy(ABC):
''' Policy base class.'''
def __init__(self):
pass
def __call__(self, *args, **kwargs):
return self.call(*args, **kwargs)
@abstractmethod
def call(self, key, q_values, exploration = True, return_di... | 32.192771 | 86 | 0.69274 |
1cc0e16f30f93025e02bd6472411371e068254c6 | 4,948 | py | Python | homeassistant/components/dlink/switch.py | marioedani/homeassistant-core | 2bc5db857ec6aa605ea7ff363654db2109f7cec4 | [
"Apache-2.0"
] | 1 | 2020-04-07T15:44:54.000Z | 2020-04-07T15:44:54.000Z | homeassistant/components/dlink/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 3 | 2021-09-08T03:31:36.000Z | 2022-03-12T01:00:03.000Z | homeassistant/components/dlink/switch.py | tomachristian/core | 71c8fcee20c55536b33c3ee774c76c1795f37cd2 | [
"Apache-2.0"
] | 2 | 2020-04-19T13:35:24.000Z | 2020-04-19T13:35:51.000Z | """Support for D-Link W215 smart switch."""
from datetime import timedelta
import logging
import urllib
from pyW215.pyW215 import SmartPlug
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import (
ATTR_TEMPERATURE,
CONF_HOST,
CONF... | 29.452381 | 86 | 0.645918 |
1cc0eed75aca013e5af8603a1c27ea6bd3a29754 | 18 | py | Python | pycatia/version.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | null | null | null | pycatia/version.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | null | null | null | pycatia/version.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | null | null | null | version = "0.4.3"
| 9 | 17 | 0.555556 |
1cc114bf81715b21b78ba7077a930f4a08ba4736 | 2,031 | py | Python | tensorflow_text/public_names_test.py | Alpus/text | 41413d193fd502e8a0754ac4b60b4c645bdf9ac7 | [
"Apache-2.0"
] | null | null | null | tensorflow_text/public_names_test.py | Alpus/text | 41413d193fd502e8a0754ac4b60b4c645bdf9ac7 | [
"Apache-2.0"
] | null | null | null | tensorflow_text/public_names_test.py | Alpus/text | 41413d193fd502e8a0754ac4b60b4c645bdf9ac7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 TF.Text Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.85 | 74 | 0.731167 |
1cc1158d267848a1cf9dadbc96209b289fb21158 | 5,914 | py | Python | starthinker/util/sdf/__init__.py | danieldjewell/starthinker | 3327d5874f01d7563603b8a82c1ecd6615b9768d | [
"Apache-2.0"
] | 1 | 2020-12-04T17:13:35.000Z | 2020-12-04T17:13:35.000Z | starthinker/util/sdf/__init__.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | starthinker/util/sdf/__init__.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... | 30.802083 | 79 | 0.632905 |
1cc1390908e6d24a3bc9e80a299eab3ad349f0b5 | 8,256 | py | Python | claripy/backends/backend_smtlib_solvers/__init__.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | 211 | 2015-08-06T23:25:01.000Z | 2022-03-26T19:34:49.000Z | claripy/backends/backend_smtlib_solvers/__init__.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | 175 | 2015-09-03T11:09:18.000Z | 2022-03-09T20:24:33.000Z | claripy/backends/backend_smtlib_solvers/__init__.py | mborgerson/claripy | 45b01c10caa0001b4e210e449ad5618880d1773b | [
"BSD-2-Clause"
] | 99 | 2015-08-07T10:30:08.000Z | 2022-03-26T10:32:09.000Z | import hashlib
import os
from claripy.ast.bv import BV
from .. import BackendError
from ..backend_smtlib import BackendSMTLibBase
from ...smtlib_utils import SMTParser, make_pysmt_const_from_type
from six.moves import cStringIO
from pysmt.smtlib.parser import Tokenizer
from pysmt.shortcuts import NotEquals
class ... | 35.586207 | 131 | 0.64438 |
1cc14b17b9a804f343c33aa411cf208272c0c7c6 | 5,505 | py | Python | synthesizer/g2p/__init__.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | synthesizer/g2p/__init__.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | synthesizer/g2p/__init__.py | neonsecret/Real-Time-Voice-Cloning | 07442ca1e73957440b3c8c55b50b124fb813db55 | [
"MIT"
] | null | null | null | import re
import torch
import threading
import _thread
from alphabet_detector import AlphabetDetector
from contextlib import contextmanager
from .config import DataConfigEn, DataConfigRu, ModelConfigEn, ModelConfigRu, TestConfigEn, TestConfigRu
from .data import PersianLexicon
from .model import Encoder, Decoder
d... | 30.414365 | 120 | 0.608538 |
1cc152cd3efedc03a2e51362d420ff7958ce0350 | 26,017 | py | Python | admin/users/views.py | sergiy-neurohub/osf.io | bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293 | [
"Apache-2.0"
] | null | null | null | admin/users/views.py | sergiy-neurohub/osf.io | bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293 | [
"Apache-2.0"
] | null | null | null | admin/users/views.py | sergiy-neurohub/osf.io | bd12fdd4efc2eb58c0a3c805c33aaeb8672f0293 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import csv
import pytz
from furl import furl
from datetime import datetime, timedelta
from django.db.models import Q
from django.views.defaults import page_not_found
from django.views.generic import FormView, DeleteView, ListView, TemplateView
from django.contrib import messages... | 36.134722 | 154 | 0.627705 |
1cc1681f1db84ba02a0ad34093e2665b564c0733 | 126 | py | Python | src/hydro/common/utils.py | aolarchive/Hydro | 8580aebc30694156c436e5ba7470d3fcbb46896b | [
"MIT"
] | 42 | 2015-03-04T09:05:00.000Z | 2018-12-01T15:13:48.000Z | src/hydro/common/utils.py | aolarchive/Hydro | 8580aebc30694156c436e5ba7470d3fcbb46896b | [
"MIT"
] | 5 | 2015-05-11T08:18:12.000Z | 2016-03-22T19:11:01.000Z | src/hydro/common/utils.py | Convertro/Hydro | 8580aebc30694156c436e5ba7470d3fcbb46896b | [
"MIT"
] | 4 | 2015-03-05T09:07:27.000Z | 2018-12-01T15:13:49.000Z | __author__ = 'yanivshalev'
import hashlib
def create_cache_key(fingerprint):
return hashlib.md5(fingerprint).hexdigest() | 21 | 47 | 0.793651 |
1cc16ae68d0c045b04c21734b06473c9e48d0afd | 31,583 | py | Python | workspace/eval_new.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | workspace/eval_new.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | workspace/eval_new.py | dmitryshendryk/mask_rcnn_carplate | c0b8de45f3ce95712140259a7ad520e118dee0ed | [
"MIT"
] | null | null | null | import os
import sys
import time
import numpy as np
import imgaug # https://github.com/aleju/imgaug (pip3 install imgaug)
import json
import skimage
import cv2
from mrcnn import visualize
from PIL import ImageEnhance
import matplotlib.pyplot as plt
from mrcnn.config import Config
from mrcnn import model as modellib, u... | 32.293456 | 183 | 0.520058 |
1cc1839f13ff5e3dc4cc0e671be92810f0098f58 | 8,963 | py | Python | airflow_client/test/test_connection_collection_item.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_connection_collection_item.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_connection_collection_item.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 242.243243 | 8,173 | 0.760906 |
1cc19f4f4a8e4aa3d8a0eeb258cf30d2adb748da | 2,016 | py | Python | knx/text/nertagger.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | 2 | 2017-07-27T03:50:37.000Z | 2017-09-28T06:42:52.000Z | knx/text/nertagger.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | null | null | null | knx/text/nertagger.py | gofortargets/CNN_brandsafety | 77c9048a7aca9458879585925e98220435c052e9 | [
"Apache-2.0"
] | null | null | null | import logging
import nltk
import requests
import codecs
logging.basicConfig(level=logging.DEBUG)
LOGGER = logging.getLogger(__name__)
class NERTagger(object):
"""Base class for named entity recognition (NER) tagger objects
Returns
=======
tag : NERtagger
NPChunker object, typically used by calling its chunk() ... | 25.2 | 78 | 0.673611 |
1cc1a407e8b09b1ff82dd4bca1f2a63e8229ce82 | 5,393 | py | Python | backend/tests/test_incidents.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 16 | 2021-03-02T21:32:52.000Z | 2022-03-15T23:13:06.000Z | backend/tests/test_incidents.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 173 | 2021-03-03T01:35:36.000Z | 2022-03-30T03:17:58.000Z | backend/tests/test_incidents.py | AlexanderBerardino/police-data-trust | 587fe2bc1e7f048e2308d89803abb20f4e619aab | [
"MIT"
] | 36 | 2021-03-03T00:27:20.000Z | 2022-03-29T23:07:57.000Z | from datetime import datetime
import pytest
from backend.database import Incident
mock_incidents = {
"domestic": {
"time_of_incident": "2021-03-14 01:05:09",
"description": "Domestic disturbance",
"officers": [
{"first_name": "Susie", "last_name": "Suserson"},
{"fir... | 30.128492 | 79 | 0.571852 |
1cc1a8db8148b17e1beea69207191b07cc7d4449 | 171 | py | Python | tests/unit/executors/metas_executors.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | tests/unit/executors/metas_executors.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | tests/unit/executors/metas_executors.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | from jina import Executor, requests, DocumentArray
class TestExecutor(Executor):
@requests
def process(self, docs: DocumentArray, **kwargs):
return docs
| 21.375 | 53 | 0.719298 |
1cc1e577afb7ad7ea56a56a39ab2776e2efad850 | 1,284 | py | Python | tests/test_main.py | blahsd/pywal | 6e94d880a09c335d538e3660b4f70aff9b8e0490 | [
"MIT"
] | 9 | 2019-03-22T05:28:05.000Z | 2021-10-08T05:29:57.000Z | tests/test_main.py | blahsd/pywal | 6e94d880a09c335d538e3660b4f70aff9b8e0490 | [
"MIT"
] | null | null | null | tests/test_main.py | blahsd/pywal | 6e94d880a09c335d538e3660b4f70aff9b8e0490 | [
"MIT"
] | null | null | null | """Test __main__ functions."""
import unittest
import unittest.mock
import os
from pywal import __main__
from pywal import reload
from pywal import wallpaper
from pywal import util
from pywal.settings import CACHE_DIR
class TestMain(unittest.TestCase):
"""Test the gen_colors functions."""
def test_args_a(s... | 27.319149 | 55 | 0.637072 |
1cc1f59108b2779814a38de04892adae0e9ea226 | 2,491 | py | Python | tests/keymgt/test_keymgt.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | tests/keymgt/test_keymgt.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | tests/keymgt/test_keymgt.py | ccassler/eucaconsole | c555728685b0d76eed65919037d442d97b6e9dd6 | [
"BSD-2-Clause"
] | null | null | null | # Copyright 2013-2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 conditions and ... | 40.177419 | 73 | 0.725411 |
1cc23bef35bc924a70a93aa8ff16a87231c36269 | 3,638 | py | Python | models/nlp/text_tfidf_model.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 194 | 2019-04-23T10:25:13.000Z | 2022-03-29T04:19:28.000Z | models/nlp/text_tfidf_model.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 50 | 2019-06-24T20:17:51.000Z | 2022-03-16T20:05:37.000Z | models/nlp/text_tfidf_model.py | h2oai/driverlessai-recipes | 508663ed6bd1961925fcb29fde268493fe40e9e8 | [
"Apache-2.0"
] | 85 | 2019-03-27T12:26:43.000Z | 2022-01-27T13:15:37.000Z | """Text classification / regression model using TFIDF"""
import random
import numpy as np
import scipy as sp
import datatable as dt
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.linear_model import LinearRegression, LogisticRegression
from h2oaic... | 38.294737 | 106 | 0.57779 |
1cc23ea4dc294ff0fae18c6d6089a066be3b1d4a | 527 | py | Python | django_sensible/drf/viewsets.py | viper-development/django-sensible | 3e6777a6f95d029978f40ec6ef4854fc2d51a84a | [
"MIT"
] | 1 | 2021-08-17T07:47:56.000Z | 2021-08-17T07:47:56.000Z | django_sensible/drf/viewsets.py | viper-development/django-sensible | 3e6777a6f95d029978f40ec6ef4854fc2d51a84a | [
"MIT"
] | 3 | 2021-08-31T07:33:33.000Z | 2021-10-06T13:45:13.000Z | django_sensible/drf/viewsets.py | viper-development/django-sensible | 3e6777a6f95d029978f40ec6ef4854fc2d51a84a | [
"MIT"
] | null | null | null | from rest_framework import viewsets
class ModelViewSet(viewsets.ModelViewSet):
"""
Generic model viewset.
Serializer_class attribute is required.
Sensible defaults include:
- model
- queryset
"""
def get_model(self):
"""
Default model is inherited from the ser... | 21.08 | 55 | 0.612903 |
1cc274d62f6345acc44f8ef612df98e6a959ff85 | 7,117 | py | Python | AlgorithmicTradingAndQuantitativeAnalysis/Examples/53_strategy2_breakout.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | AlgorithmicTradingAndQuantitativeAnalysis/Examples/53_strategy2_breakout.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | AlgorithmicTradingAndQuantitativeAnalysis/Examples/53_strategy2_breakout.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | # =============================================================================
# Backtesting strategy - II : Intraday resistance breakout strategy
# Author : Mayank Rasu
# Please report bug/issues in the Q&A section
# =============================================================================
import numpy as np
im... | 43.396341 | 153 | 0.615568 |
1cc282119508f2aa34670c11494e3dd3355b8fce | 3,430 | py | Python | gunicorn/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | gunicorn/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | gunicorn/setup.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.347107 | 92 | 0.632653 |
1cc2a0c32314d15c93ddff131afc10bedaffd601 | 1,779 | py | Python | djangocms_versioning/migrations/0004_auto_20180730_1135.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/migrations/0004_auto_20180730_1135.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | djangocms_versioning/migrations/0004_auto_20180730_1135.py | webbyfox/djangocms-versioning | a466ff0f8d109a22ec2f567cace6ef69d332180c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-07-30 10:35
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_fsm
class Migration(migrations.Migration):
dependencies = [
migration... | 44.475 | 225 | 0.632378 |
1cc2bc572404523b3ab7c27e0a5d94e0a84090e3 | 41,704 | py | Python | models/official/detection/utils/object_detection/box_list_ops.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 65 | 2017-07-28T03:47:42.000Z | 2018-02-04T20:54:18.000Z | models/official/detection/utils/object_detection/box_list_ops.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 10 | 2017-08-11T22:55:40.000Z | 2018-02-07T01:11:28.000Z | models/official/detection/utils/object_detection/box_list_ops.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 28 | 2017-07-28T08:20:06.000Z | 2018-01-28T16:28:12.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.614815 | 80 | 0.699309 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.