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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1d1ce5fe3170359416fecfe89b84b7f18d9e63e0 | 4,786 | py | Python | test/functional/httpbasics.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 63 | 2017-07-25T21:57:21.000Z | 2022-02-05T02:58:03.000Z | test/functional/httpbasics.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 105 | 2017-09-04T00:52:17.000Z | 2021-05-22T13:58:37.000Z | test/functional/httpbasics.py | biblepay/biblepay | 6af4517c623620f60cabc228cc2f63c35d1beb5b | [
"MIT"
] | 62 | 2017-08-04T19:48:40.000Z | 2021-07-07T12:21:12.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import BitcoinTestFramework
from test_... | 43.908257 | 109 | 0.633305 |
1d1cfb82e32fc537278fde881ef85b791f2e7c2f | 1,563 | py | Python | lib/pyfrc/mains/cli_profiler.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | 1 | 2017-12-15T20:55:33.000Z | 2017-12-15T20:55:33.000Z | lib/pyfrc/mains/cli_profiler.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | null | null | null | lib/pyfrc/mains/cli_profiler.py | auscompgeek/pyfrc | d8e76a9284690f71ea7fab7d2aa9022cb6eec27d | [
"MIT"
] | null | null | null |
import argparse
import inspect
from os.path import abspath
import subprocess
import sys
class PyFrcProfiler:
"""
Wraps other commands by running them via the built in cProfile module.
Use this to profile your program and figure out where you're spending
a lot of time (note that cProfile on... | 33.255319 | 136 | 0.607166 |
1d1d0a1b58464674f85ec98437d1a67e353cff98 | 703 | py | Python | experiments/distfunc_training/gcbc_training/tabletop_3obj/conf.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 16 | 2021-04-20T20:01:10.000Z | 2022-03-29T03:19:39.000Z | experiments/distfunc_training/gcbc_training/tabletop_3obj/conf.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | null | null | null | experiments/distfunc_training/gcbc_training/tabletop_3obj/conf.py | s-tian/mbold | 85309809e35777b843dafc37d047b84962f17062 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 1 | 2021-05-04T00:32:40.000Z | 2021-05-04T00:32:40.000Z | import os
from classifier_control.classifier.utils.general_utils import AttrDict
current_dir = os.path.dirname(os.path.realpath(__file__))
from classifier_control.classifier.models.gc_bc import GCBC
from classifier_control.classifier.utils.logger import Logger
configuration = {
'model': GCBC,
'logger': Logge... | 26.037037 | 145 | 0.684211 |
1d1d0abc81d5e2a8ed538fea9da901f70a46213c | 4,369 | py | Python | src/python/pants/build_graph/bundle_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/build_graph/bundle_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | src/python/pants/build_graph/bundle_mixin.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os.path
from pants.base.build_environment import get_buildroot
from pants.base.exceptions import TargetDefinitionException
from pants.build_graph.app_base import AppBase
from pants... | 40.831776 | 96 | 0.630579 |
1d1d28d3b659d3c4d94560a8ac0a8dbac5ac0be2 | 287 | py | Python | salt/output/no_out.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2018-02-03T17:30:56.000Z | 2018-02-03T17:30:56.000Z | salt/output/no_out.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/output/no_out.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Display no output.
'''
# Define the module's virtual name
__virtualname__ = 'quiet'
def __virtual__():
return __virtualname__
def output(ret):
'''
Don't display data. Used when you only are interested in the
return.
'''
return ''
| 14.35 | 64 | 0.623693 |
1d1d488b653cf16e6da5a3a18587ef6ce7411759 | 318 | py | Python | exe1102_city_functions.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | exe1102_city_functions.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | exe1102_city_functions.py | juniorpedroso/Curso-Intensivo-de-Python | 4357e313660e77f5e43bb516c1b19fd979de5070 | [
"MIT"
] | null | null | null | def nome_cidade_pais(cidade, pais, populacao=''):
"""[Junta o nome de uma cidade e o de um país de forma elegante]
"""
if populacao:
cidade_pais = f'{cidade.title()}, {pais.title()} - população {populacao}'
else:
cidade_pais = f'{cidade.title()}, {pais.title()}'
return cidade_pais
| 35.333333 | 81 | 0.622642 |
1d1d4ed5abd5f65bbc822388fb002d99d4508843 | 1,090 | py | Python | geoq/locations/models.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 471 | 2015-01-05T15:16:26.000Z | 2022-03-28T05:06:11.000Z | geoq/locations/models.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 109 | 2015-01-06T20:00:58.000Z | 2022-03-11T23:17:53.000Z | geoq/locations/models.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 100 | 2015-01-05T15:16:39.000Z | 2021-12-01T12:13:13.000Z | # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django.contrib.gis.db import models
#ShapeFile has: ['STATEFP', 'COUNTYFP', 'COUNTYNS', 'AFFGEOID', 'GEOID... | 37.586207 | 114 | 0.699083 |
1d1d62507c36c18d61cb804d753a1eea50c37949 | 6,907 | py | Python | pubsub/client.py | tylertreat/PubSub-Python | 92893af86c4ca7f43f9810623e181bf2790de5f9 | [
"Apache-2.0"
] | 7 | 2015-01-26T22:16:02.000Z | 2021-06-21T08:13:56.000Z | pubsub/client.py | tylertreat/PubSub-Python | 92893af86c4ca7f43f9810623e181bf2790de5f9 | [
"Apache-2.0"
] | null | null | null | pubsub/client.py | tylertreat/PubSub-Python | 92893af86c4ca7f43f9810623e181bf2790de5f9 | [
"Apache-2.0"
] | 3 | 2015-07-20T09:24:04.000Z | 2017-05-21T20:23:40.000Z | import base64
from apiclient import errors
from apiclient.discovery import build
import httplib2
PUBSUB_SCOPE = "https://www.googleapis.com/auth/pubsub"
def get_client(project_id, credentials=None, service_account=None,
private_key=None):
"""Return an instance of PubSubClient. Either AssertionCre... | 31.829493 | 79 | 0.595193 |
1d1d96716b4f8555ca07fd7bab7fcdc0a8080ebf | 1,901 | py | Python | test/test_unit.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | test/test_unit.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | 6 | 2022-02-02T16:52:33.000Z | 2022-02-09T09:40:50.000Z | test/test_unit.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | # Tests unit.json schema
import pytest
from jsonschema.exceptions import ValidationError
pytestmark = pytest.mark.schema("/schemas/unit")
def test_unit_with_symbol_string(validator):
''' Tests a unit where we use a string for the symbol '''
unit = { "symbol" : "m" }
validator.validate(unit)
def test_... | 26.041096 | 77 | 0.619148 |
1d1d9d2842db69c3cb49cc1d4237d84fa3a4ef95 | 831 | py | Python | apps/core/tests/test_api.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/core/tests/test_api.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | apps/core/tests/test_api.py | remocrevo/celus | 682b13168eb475d7f970502113e756e40a899877 | [
"MIT"
] | null | null | null | import pytest
from django.urls import reverse
from core.models import Identity
@pytest.mark.django_db
class TestUserAPI(object):
def test_authenticated(self, authenticated_client):
resp = authenticated_client.get(reverse('user_api_view'))
assert resp.status_code == 200
def test_unauthentica... | 34.625 | 87 | 0.734055 |
1d1d9d85b91486eae27cc70793f879d4d9128392 | 4,431 | py | Python | api_app/db/repositories/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/db/repositories/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | api_app/db/repositories/shared_services.py | oliver7598/AzureTRE | 38290b91fb694f6dc50a2af9f9376962de8026bd | [
"MIT"
] | null | null | null | from sqlite3 import InternalError
from typing import List, Tuple
import uuid
from azure.cosmos import CosmosClient
from pydantic import parse_obj_as
from models.domain.resource_template import ResourceTemplate
from models.domain.authentication import User
from db.repositories.resource_templates import ResourceTemplate... | 49.786517 | 220 | 0.772738 |
1d1da0dce9ad514108ce5f10cd080140a148c20a | 2,628 | py | Python | ai/models/similarity_model.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | 1 | 2021-02-22T00:35:40.000Z | 2021-02-22T00:35:40.000Z | ai/models/similarity_model.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | null | null | null | ai/models/similarity_model.py | cenkcorapci/visual-fashion-item-search | 47b93f97383c1b7f9ec23bb4ff66f90504db3da8 | [
"MIT"
] | 1 | 2021-08-30T10:24:16.000Z | 2021-08-30T10:24:16.000Z | from keras.applications.vgg16 import VGG16
from keras.layers import Dense, AveragePooling2D
from keras.layers import Input, concatenate
from keras.models import Model
from keras.optimizers import SGD
from ai.loss_functions import triplet_loss
from commons.config import DEFAULT_IMAGE_SIZE, DEFAULT_VECTOR_SIZE
class I... | 41.0625 | 119 | 0.6914 |
1d1db88f0642d188bfcb2b312edfdcab349d9d6e | 1,212 | py | Python | utils.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | utils.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | utils.py | Lexparency/lexhost | 71ad624d4ea608294ed40496e44fbdfcd11622c7 | [
"MIT"
] | null | null | null | from functools import wraps
from typing import Dict, Union
from flask import request, redirect, Flask
from werkzeug.exceptions import Forbidden
from legislative_act.history import DocumentHistory
from settings import TRUSTED_HOSTS, DEAD_SIMPLE_REDIRECTS
from views.exceptions import handle_as_404
def check_trustwort... | 28.857143 | 78 | 0.693894 |
1d1e1c33287264dd619d96c76d73f1beb4a7095d | 17,501 | py | Python | mypy/constraints.py | wkhere/mypy | 8b47a773e783a5186210e49438ca774c717fcba6 | [
"PSF-2.0"
] | null | null | null | mypy/constraints.py | wkhere/mypy | 8b47a773e783a5186210e49438ca774c717fcba6 | [
"PSF-2.0"
] | null | null | null | mypy/constraints.py | wkhere/mypy | 8b47a773e783a5186210e49438ca774c717fcba6 | [
"PSF-2.0"
] | 1 | 2020-03-24T05:28:58.000Z | 2020-03-24T05:28:58.000Z | """Type inference constraints."""
from typing import Iterable, List, Optional
from mypy.types import (
CallableType, Type, TypeVisitor, UnboundType, AnyType, Void, NoneTyp, TypeVarType,
Instance, TupleType, TypedDictType, UnionType, Overloaded, ErasedType, PartialType,
DeletedType, UninhabitedType, TypeTy... | 42.581509 | 97 | 0.622822 |
1d1e32fe8980877b042b95d6ebd750d53c46f1f1 | 466 | py | Python | test/integrated/storage_Y/cli/dev/feature_B/destroy.py | orkhanshirin/py-dynacli | 6891d922bfb403756e8ebb97e5f9698cdeb725f9 | [
"MIT"
] | 87 | 2022-02-01T12:47:48.000Z | 2022-03-31T10:46:34.000Z | test/integrated/storage_Y/cli/dev/feature_B/destroy.py | orkhanshirin/py-dynacli | 6891d922bfb403756e8ebb97e5f9698cdeb725f9 | [
"MIT"
] | 28 | 2022-02-01T10:16:42.000Z | 2022-03-24T10:53:01.000Z | test/integrated/storage_Y/cli/dev/feature_B/destroy.py | orkhanshirin/py-dynacli | 6891d922bfb403756e8ebb97e5f9698cdeb725f9 | [
"MIT"
] | 4 | 2022-02-09T14:10:32.000Z | 2022-03-28T16:45:19.000Z | __version__ = "1.2"
def destroy(environment: str, project: str, *args: str, **kwargs: str) -> None:
"""
destroy the project and its libraries
Args:
project (str): name of the service
environment (str): environment name (e.g. Cloud9 IDE stack)
**kwargs (str): the keyword length lis... | 27.411765 | 79 | 0.635193 |
1d1e35949562a04355ce3544111db5d01071dd52 | 2,000 | py | Python | tests/app/dao/test_letter_branding_dao.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 51 | 2016-04-03T23:36:17.000Z | 2022-03-21T20:04:52.000Z | tests/app/dao/test_letter_branding_dao.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 1,335 | 2015-12-15T14:28:50.000Z | 2022-03-30T16:24:27.000Z | tests/app/dao/test_letter_branding_dao.py | alphagov-mirror/notifications-api | 4a2e47b118c51f0ad45e87c89521f6087b1fcc2f | [
"MIT"
] | 30 | 2016-01-08T19:05:32.000Z | 2021-12-20T16:37:23.000Z | import uuid
import pytest
from sqlalchemy.exc import SQLAlchemyError
from app.dao.letter_branding_dao import (
dao_create_letter_branding,
dao_get_all_letter_branding,
dao_get_letter_branding_by_id,
dao_update_letter_branding,
)
from app.models import LetterBranding
from tests.app.db import create_let... | 30.30303 | 90 | 0.7745 |
1d1e4278ebcb40c65b4c3913ea25937345c3a86c | 6,599 | py | Python | ocn_008_historic_coral_bleaching_stress_frequency/ocn_008_historic_coral_bleaching_stress_frequency_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | ocn_008_historic_coral_bleaching_stress_frequency/ocn_008_historic_coral_bleaching_stress_frequency_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | ocn_008_historic_coral_bleaching_stress_frequency/ocn_008_historic_coral_bleaching_stress_frequency_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | import os
import boto3
from botocore.exceptions import NoCredentialsError
import urllib
from zipfile import ZipFile
import ee
import eeUtil
import subprocess
# name of asset on GEE where you want to upload data
# this should be an asset name that is not currently in use
dataset_name = 'ocn_008_historic_coral_bleaching... | 46.801418 | 206 | 0.744355 |
1d1e535bfa789b0a0d83781c6d11e403ce651973 | 1,867 | py | Python | tests/openbb_terminal/test_settings_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | tests/openbb_terminal/test_settings_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | tests/openbb_terminal/test_settings_controller.py | JerBouma/OpenBBTerminal | 0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27 | [
"MIT"
] | null | null | null | import pytest
from openbb_terminal.settings_controller import SettingsController
# pylint: disable=W0621
@pytest.fixture()
def controller(mocker):
mocker.patch(
"openbb_terminal.settings_controller.obbff.USE_PROMPT_TOOLKIT",
True,
)
mocker.patch("openbb_terminal.settings_controller.sessi... | 25.930556 | 77 | 0.719336 |
1d1e97d064a7d42537de5721378ae1b1ee0c4631 | 2,377 | py | Python | composed_configuration/_allauth.py | waxlamp/django-composed-configuration | c009bf12ccdfa73d8fd21807f4d41bad14f1790b | [
"Apache-2.0"
] | null | null | null | composed_configuration/_allauth.py | waxlamp/django-composed-configuration | c009bf12ccdfa73d8fd21807f4d41bad14f1790b | [
"Apache-2.0"
] | null | null | null | composed_configuration/_allauth.py | waxlamp/django-composed-configuration | c009bf12ccdfa73d8fd21807f4d41bad14f1790b | [
"Apache-2.0"
] | null | null | null | from typing import Type
from ._base import ComposedConfiguration, ConfigMixin
class AllauthMixin(ConfigMixin):
"""
Configure Django Allauth.
This requires the django-allauth package to be installed.
"""
@staticmethod
def before_binding(configuration: Type[ComposedConfiguration]) -> None:
... | 35.477612 | 99 | 0.727387 |
1d1ec713cdf54bb80968431caa45777ea8014d2e | 8,175 | py | Python | tests/test_search_exact.py | klauer/fuzzysearch | 55fc21e469495bc84fe6f81b0c148e105765182d | [
"MIT"
] | 207 | 2015-09-15T00:24:18.000Z | 2022-03-31T07:42:15.000Z | tests/test_search_exact.py | ibr-hin95/fuzzysearch | 54552b8bba23cc4ebffc877e3a3d5f8b16c6222e | [
"MIT"
] | 37 | 2015-02-07T12:16:25.000Z | 2022-03-22T15:18:16.000Z | tests/test_search_exact.py | ibr-hin95/fuzzysearch | 54552b8bba23cc4ebffc877e3a3d5f8b16c6222e | [
"MIT"
] | 13 | 2015-01-21T14:35:31.000Z | 2022-01-24T12:14:40.000Z | from fuzzysearch.compat import text_type
from fuzzysearch.search_exact import search_exact
from tests.compat import b, u, unittest
class TestSearchExactBase(object):
def search(self, subsequence, sequence, start_index=0, end_index=None):
raise NotImplementedError
def test_empty_sequence(self):
... | 47.52907 | 111 | 0.611988 |
1d1ed192c27ec80878dee36c24dd6becdf9c9d96 | 6,881 | py | Python | pocean/tests/dsg/timeseriesProfile/test_timeseriesProfile_om.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/tests/dsg/timeseriesProfile/test_timeseriesProfile_om.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | pocean/tests/dsg/timeseriesProfile/test_timeseriesProfile_om.py | lucmehl/pocean-core | 79ac85c975f409826abee0de6880b0dd9a3ede6e | [
"MIT"
] | null | null | null | #!python
# coding=utf-8
import os
import tempfile
import unittest
from pocean.dsg import OrthogonalMultidimensionalTimeseriesProfile
from pocean.tests.dsg.test_new import test_is_mine
import logging
from pocean import logger
logger.level = logging.INFO
logger.handlers = [logging.StreamHandler()]
class TestOrthogona... | 52.128788 | 137 | 0.693068 |
1d1f08dbeab3429775c5e0343508c4308a54b4cd | 3,965 | py | Python | pyvital/filters/abp_svv.py | vitaldb/pyvital | b7b045d92e8db3a9d7f45ea6593e57c73ae8ec11 | [
"MIT"
] | 5 | 2019-04-08T05:33:56.000Z | 2021-05-07T06:49:25.000Z | pyvital/filters/abp_svv.py | vitaldb/pyvital | b7b045d92e8db3a9d7f45ea6593e57c73ae8ec11 | [
"MIT"
] | null | null | null | pyvital/filters/abp_svv.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
import math
cfg = {
'name': 'ABP - Stroke Volume Variation',
'group': 'Medical algorithms',
'desc': 'Calculate respiratory deviation of standard deviation and Liljestrad-Zander parameter of the ABP',
'reference': '',
'overlap': 3,
'interval': 30,
'input... | 28.731884 | 111 | 0.531652 |
1d1f3837c63adc2e1cf8a1600e84685a02b5a587 | 3,568 | py | Python | crackers/frequency.py | draliii/Cracker | 8534cec3b06cf5d8727aa096e1b18983145cd4ce | [
"Unlicense"
] | null | null | null | crackers/frequency.py | draliii/Cracker | 8534cec3b06cf5d8727aa096e1b18983145cd4ce | [
"Unlicense"
] | null | null | null | crackers/frequency.py | draliii/Cracker | 8534cec3b06cf5d8727aa096e1b18983145cd4ce | [
"Unlicense"
] | null | null | null | import pickle as pkl
import heapq
import random
from crackers.mono import use_table
from utils.text_analyzer import TextStats, compute_score
from utils.dictionary import Dictionary
from utils.text_analyzer import compute_score_for_table
from copy import deepcopy
def brute_force(stats: TextStats, dictionary: Dictiona... | 29.733333 | 120 | 0.634809 |
1d1f66b6fb421a1986d698588e09252ffe30308f | 11,905 | py | Python | test/rules/src/https_everywhere_checker/gvgen.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | test/rules/src/https_everywhere_checker/gvgen.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | test/rules/src/https_everywhere_checker/gvgen.py | davorb/https-everywhere | 6398c000d3475801bff08aa4387d8f01cf78c244 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# $Id: gvgen.py 10440 2007-10-23 15:17:33Z toady $
"""
GvGen - Generate dot file to be processed by graphviz
Copyright (c) 2007 INL
Written by Sebastien Tricaud <sebastien.tricaud@inl.fr>
This program is free software; you can redistribute it and/or modify
it under the terms o... | 26.222467 | 159 | 0.659975 |
1d1f8d2ffb656b8ccfc9b61c8736b02ac0600cea | 242 | py | Python | magellan_models/interface/__init__.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | 2 | 2021-08-11T18:15:28.000Z | 2021-08-11T18:33:38.000Z | magellan_models/interface/__init__.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | magellan_models/interface/__init__.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | """ User facing interface module init file """
from .abstract_api_model import AbstractApiModel
from .magellan_response import MagellanResponse
from .constant_magellan_response import ConstantMagellanResponse
from .auto_dict import AutoDict
| 34.571429 | 64 | 0.855372 |
1d1fab179cb6b71727da11f9442868ef17f2264b | 4,934 | py | Python | xpctl-client/addons/reporting_xpctl_v1.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 3 | 2019-07-11T17:05:25.000Z | 2020-11-19T08:11:31.000Z | xpctl-client/addons/reporting_xpctl_v1.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 4 | 2019-06-28T01:07:42.000Z | 2020-07-24T15:12:57.000Z | xpctl-client/addons/reporting_xpctl_v1.py | mead-ml/xpctl | 75fcb195e66519b545ddd7aeb2d7476624c20c46 | [
"Apache-2.0"
] | 2 | 2019-06-27T19:10:05.000Z | 2019-08-15T20:15:49.000Z | from __future__ import print_function
import os
import getpass
import socket
import json
from baseline.reporting import EpochReportingHook
from mead.utils import read_config_file_or_json
from baseline.reporting import register_reporting
from xpclient import Configuration
from xpclient.api import XpctlApi
from xpclient... | 43.663717 | 109 | 0.579043 |
1d1fb0dd30bac27f852a5872e21980f11b0c3465 | 6,305 | py | Python | mimesniff/mimesniff.py | corona10/mimesniff | 815601af2d5e3032ef9991b45e291e8acaaf7dda | [
"Apache-2.0"
] | 9 | 2019-06-17T01:13:19.000Z | 2020-11-12T16:14:06.000Z | mimesniff/mimesniff.py | corona10/mimesniff | 815601af2d5e3032ef9991b45e291e8acaaf7dda | [
"Apache-2.0"
] | null | null | null | mimesniff/mimesniff.py | corona10/mimesniff | 815601af2d5e3032ef9991b45e291e8acaaf7dda | [
"Apache-2.0"
] | null | null | null | # Author: Dong-hee Na
# Contact: donghee.na92@gmail.com
import io
from functools import singledispatch
__all__ = ['what']
@singledispatch
def what(fin):
'''
mimesniff.what returns the MIME type of an HTTP response
through mimesniffing
:param fin(str, io.BufferedIOBase, io.RawIOBase, bytes):
Fil... | 30.3125 | 340 | 0.575258 |
1d1fbcb3f44445db18a9692975240eb647829b72 | 2,888 | py | Python | blousebrothers/termsandconditions/migrations/0001_initial.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/termsandconditions/migrations/0001_initial.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/termsandconditions/migrations/0001_initial.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-01-23 11:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migration... | 45.84127 | 160 | 0.613573 |
1d1fc848cef9a61ae2adfaf066699ec2c1fb3d74 | 14,484 | py | Python | doctr/models/detection/differentiable_binarization/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 628 | 2021-02-13T21:49:37.000Z | 2022-03-31T19:48:57.000Z | doctr/models/detection/differentiable_binarization/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 694 | 2021-02-08T15:23:38.000Z | 2022-03-31T07:24:59.000Z | doctr/models/detection/differentiable_binarization/pytorch.py | Mindee/doctr | b9d8feb1b4a2206e4944ef2dea109acc19585074 | [
"Apache-2.0"
] | 90 | 2021-04-28T05:39:02.000Z | 2022-03-31T06:48:36.000Z | # Copyright (C) 2021, Mindee.
# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.
from typing import Any, Callable, Dict, List, Optional
import numpy as np
import torch
from torch import nn
from torch.nn imp... | 36.119701 | 117 | 0.619166 |
1d1ffa1a95ff913338cde4b8303da646b32867ea | 8,803 | py | Python | ros/src/tl_detector/tl_detector.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 4 | 2020-03-30T02:10:33.000Z | 2021-01-13T14:22:01.000Z | ros/src/tl_detector/tl_detector.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 9 | 2020-09-26T00:55:09.000Z | 2022-03-12T00:22:36.000Z | ros/src/tl_detector/tl_detector.py | mkolod/CarND-Capstone | 82bdeee73e0a788778e9276bbea8ad3376f4214d | [
"MIT"
] | 9 | 2020-03-30T02:11:52.000Z | 2020-04-05T02:15:08.000Z | #!/usr/bin/env python
import rospy
from std_msgs.msg import Int32, String
from geometry_msgs.msg import PoseStamped, Pose
from styx_msgs.msg import TrafficLightArray, TrafficLight
from styx_msgs.msg import Lane
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import tf
import cv2
import yaml
import math... | 38.609649 | 132 | 0.635692 |
1d20192c1a0a313e1a2b482d5d7e95d253509f31 | 5,067 | py | Python | atom/nucleus/python/nucleus_api/models/cash.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/cash.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/cash.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 27.538043 | 105 | 0.569963 |
1d202365ea94c3a4b94d292fab80e287897906c9 | 1,486 | py | Python | Seeder/api/viewsets.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/api/viewsets.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/api/viewsets.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | import source
import blacklists
from rest_framework import viewsets
from rest_framework import mixins as rf_mixins
from rest_framework.decorators import action
from rest_framework.response import Response
from . import serializers
class CategoryViewSet(rf_mixins.RetrieveModelMixin, viewsets.GenericViewSet):
seri... | 33.022222 | 78 | 0.739569 |
1d202f393758dc1e8ab984c23cf533fc57b8a6c9 | 9,777 | py | Python | utils/aneurysm_utils/utils/pytorch_utils.py | leoseg/AneurysmSegmentation | 7513c322865d4bfc61bf7887e5822edc187ef93b | [
"MIT"
] | 1 | 2022-03-11T10:55:29.000Z | 2022-03-11T10:55:29.000Z | utils/aneurysm_utils/utils/pytorch_utils.py | leoseg/AneurysmSegmentation | 7513c322865d4bfc61bf7887e5822edc187ef93b | [
"MIT"
] | null | null | null | utils/aneurysm_utils/utils/pytorch_utils.py | leoseg/AneurysmSegmentation | 7513c322865d4bfc61bf7887e5822edc187ef93b | [
"MIT"
] | null | null | null | import random
import os
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.utils.data
from torch.utils.data import Dataset
from torch_geometric.data import InMemoryDataset
from aneurysm_utils.utils.point_cloud_utils import segmented_image_to_graph
from aneurysm_utils.utils.ignite_utils import ... | 33.030405 | 113 | 0.602434 |
1d20452c7d32f59e53e117ff61cc0c9680c0e425 | 1,180 | py | Python | tests/test_accounts.py | dikuchan/aiocoinbase | 3492befc3844dc9a401e5634563a318a59d5eb61 | [
"MIT"
] | null | null | null | tests/test_accounts.py | dikuchan/aiocoinbase | 3492befc3844dc9a401e5634563a318a59d5eb61 | [
"MIT"
] | 2 | 2022-02-25T15:09:46.000Z | 2022-02-25T18:30:42.000Z | tests/test_accounts.py | dikuchan/aiocoinbase | 3492befc3844dc9a401e5634563a318a59d5eb61 | [
"MIT"
] | null | null | null | import os
import pytest
import aiocoinbase
CONNECTOR_PARAMETERS = {
"key": os.getenv("COINBASE_SANDBOX_KEY"),
"secret": os.getenv("COINBASE_SANDBOX_SECRET"),
"passphrase": os.getenv("COINBASE_SANDBOX_PASSPHRASE"),
"endpoint": os.getenv("COINBASE_SANDBOX_ENDPOINT"),
}
ACCOUNT_ID = os.getenv("COINBASE_... | 26.818182 | 67 | 0.775424 |
1d206bf7bc03304127fbf622620d2cb0bbd76962 | 1,334 | py | Python | src/python/platforms/android/constants.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | src/python/platforms/android/constants.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | 1 | 2019-06-07T21:29:28.000Z | 2019-06-07T21:29:28.000Z | src/python/platforms/android/constants.py | fengjixuchui/clusterfuzz | ef89be3934936d1086b4a21bffca5506c8cb93be | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.105263 | 80 | 0.769865 |
1d206d651e042e261c87328066723b830a32410f | 14,172 | py | Python | rat-sql-gap/seq2struct/commands/train_horovod.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/commands/train_horovod.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | rat-sql-gap/seq2struct/commands/train_horovod.py | JuruoMP/gap-exp | 2d7af8a1da2f0ff8f9d3a2c6e15cc6383c716c05 | [
"Apache-2.0"
] | null | null | null | import argparse
import collections
import datetime
import json
import os
import _jsonnet
import attr
import torch
# noinspection PyUnresolvedReferences
from seq2struct import ast_util
# noinspection PyUnresolvedReferences
from seq2struct import datasets
# noinspection PyUnresolvedReferences
from seq2struct import mod... | 44.149533 | 183 | 0.58418 |
1d20a880324b1293c73247f39ed71618de130c12 | 1,533 | py | Python | support/7.migration_to_aggregate_test_questionnaire_submissions.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | support/7.migration_to_aggregate_test_questionnaire_submissions.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | support/7.migration_to_aggregate_test_questionnaire_submissions.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | import sys
from datawinners.main.database import get_db_manager
if __name__ == "__main__" and __package__ is None:
sys.path.insert(0, ".")
from datawinners.main.couchdb.utils import all_db_names
import logging
from migration.couch.utils import migrate, mark_as_completed
def aggregate_test_questionnaire(dbm):
... | 41.432432 | 129 | 0.759295 |
1d20beb4c25597398afd8b7001981b60d20ad0b8 | 1,680 | py | Python | plugins/maya/load/load_mayaShare.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/load/load_mayaShare.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/load/load_mayaShare.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import avalon.api
from avalon.pipeline import AVALON_CONTAINER_ID
from reveries.maya.plugins import ReferenceLoader
class MayaShareLoader(ReferenceLoader, avalon.api.Loader):
"""Specific loader for the reveries.mayaShare family"""
label = "Reference MayaShare"
order = -10
icon = "code-fork"
colo... | 30.545455 | 74 | 0.577381 |
1d20c5e4b3de10502baa291cc2f2a02ee9648c19 | 15,725 | py | Python | SCRAPE/Lib/site-packages/twisted/trial/_dist/test/test_worker.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/trial/_dist/test/test_worker.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/trial/_dist/test/test_worker.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test for distributed trial worker side.
"""
import locale
import os
from io import BytesIO, StringIO
from zope.interface.verify import verifyObject
from twisted.internet.defer import fail, succeed
from twisted.internet.error import Connecti... | 32.489669 | 86 | 0.638665 |
1d20f7b65b5119797d4e5e297ebc25cf44d69495 | 17,794 | py | Python | luminos/utils/log.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | luminos/utils/log.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | 2 | 2021-10-03T08:44:45.000Z | 2021-10-03T08:49:49.000Z | luminos/utils/log.py | linuxaddict89/luminos | cd525173bd6766eb109c4409581f6c6273d1c1bd | [
"MIT"
] | null | null | null | """Loggers and utilities related to logging."""
import os
import sys
import logging
import contextlib
import json
import warnings
import traceback
import collections
import faulthandler
from PyQt5 import QtCore
# Optional imports
try:
import colorama
except ImportError:
colorama = None
_log_inited = False
_... | 31.94614 | 88 | 0.638417 |
1d21103eeed1f2651f93a5b15213b5859d3a70de | 1,558 | py | Python | tests/workers/test_sig_algos_openssl1_0_2_DSA.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_sig_algos_openssl1_0_2_DSA.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_sig_algos_openssl1_0_2_DSA.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implements a class to be used for unit testing.
"""
import pathlib
from tlsmate.workers.sig_algo import ScanSigAlgs
from tlsmate.tlssuite import TlsSuiteTester
from tlsmate.tlssuite import TlsLibrary
sig_algs = [
"DSA_SHA256",
"DSA_SHA1",
]
class TestCase(TlsSuiteTester):
"""Cl... | 30.54902 | 78 | 0.684211 |
1d212e2af110baf9d715123af7ff3af40302cacb | 11,497 | py | Python | hypergbm/search_space.py | oaksharks/HyperGBM | be9442ccf9513727c1123972945c6fa5e8eb63ff | [
"Apache-2.0"
] | null | null | null | hypergbm/search_space.py | oaksharks/HyperGBM | be9442ccf9513727c1123972945c6fa5e8eb63ff | [
"Apache-2.0"
] | null | null | null | hypergbm/search_space.py | oaksharks/HyperGBM | be9442ccf9513727c1123972945c6fa5e8eb63ff | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
__author__ = 'yangjian'
"""
"""
from hypergbm.cfg import HyperGBMCfg as cfg
from hypergbm.estimators import LightGBMEstimator, XGBoostEstimator, CatBoostEstimator, HistGBEstimator
from hypergbm.estimators import detect_lgbm_gpu
from hypergbm.sklearn.sklearn_ops import numeric_pipeline_simple, n... | 37.943894 | 120 | 0.629729 |
1d2149451caf4b56f943be8040eb49a91fa77170 | 43 | py | Python | __init__.py | BALAVIGNESHDOSTRIX/celertix-framework | a3d9a530431cbdecf9686fe34fbe3c8d3265327e | [
"MIT"
] | 2 | 2020-12-19T14:17:25.000Z | 2021-08-03T10:20:21.000Z | __init__.py | BALAVIGNESHDOSTRIX/celertix-framework | a3d9a530431cbdecf9686fe34fbe3c8d3265327e | [
"MIT"
] | 12 | 2021-02-08T21:02:14.000Z | 2022-03-12T00:52:27.000Z | __init__.py | BALAVIGNESHDOSTRIX/celertix-framework | a3d9a530431cbdecf9686fe34fbe3c8d3265327e | [
"MIT"
] | 1 | 2021-04-08T15:32:32.000Z | 2021-04-08T15:32:32.000Z | from . import celertix
from . import addons | 21.5 | 22 | 0.790698 |
1d21523a1fbabd4fb6eb1a40da9defa56003a3c5 | 21,874 | py | Python | generation/decoder.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 22 | 2019-09-23T20:14:54.000Z | 2022-02-24T20:49:35.000Z | generation/decoder.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 2 | 2019-08-31T08:41:14.000Z | 2020-10-03T21:10:34.000Z | generation/decoder.py | yangliuy/Hybrid-Neural-Conversation-Model | 329a9310b2608ed1c04d17285a16a7170d6d4703 | [
"Apache-2.0"
] | 3 | 2019-11-07T03:03:53.000Z | 2020-10-23T15:50:44.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def repeat(input, dim, k):
"""Repeat the input tensor k times along the dim dimention
input: [dim, d]
output: [dim*k, d]
"""
if type(input) is tuple:
size = [-1] * len(input[0].s... | 45.857442 | 189 | 0.623663 |
1d2155cd5dbae0e4f97850f58c5b775861cb0be7 | 6,411 | py | Python | regolith/builders/publistbuilder.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | regolith/builders/publistbuilder.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | regolith/builders/publistbuilder.py | MichaelTrumbull/regolith | 881f543cfa7bbf80b38ed2b357209c5bc009a6af | [
"CC0-1.0"
] | null | null | null | """Builder for publication lists."""
import os
try:
from bibtexparser.bwriter import BibTexWriter
from bibtexparser.bibdatabase import BibDatabase
HAVE_BIBTEX_PARSER = True
except ImportError:
HAVE_BIBTEX_PARSER = False
from regolith.tools import all_docs_from_collection, filter_publications, make_bi... | 38.620482 | 93 | 0.470129 |
1d217f9a2689a23ef7e53578aaade823f11e0ab0 | 2,702 | py | Python | saf/ffm/nonlinear/reader.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | 1 | 2019-06-08T20:06:33.000Z | 2019-06-08T20:06:33.000Z | saf/ffm/nonlinear/reader.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | null | null | null | saf/ffm/nonlinear/reader.py | dmitry-kabanov/fickettmodel | 255b1e9cae1cfb7a6b914ad61a17288d52215cc4 | [
"MIT"
] | 1 | 2019-06-24T13:00:02.000Z | 2019-06-24T13:00:02.000Z | import logging
import os
from .asciireader import ASCIIReader
from .numpyreader import NumpyReader
_hdf5_enabled = False
try:
import h5py
_hdf5_enabled = True
from .hdf5reader import HDF5Reader
except ImportError:
logger = logging.getLogger(__name__)
logger.warning('Reading HDF5 format is not ava... | 30.704545 | 78 | 0.641377 |
1d2197d2daead055465e01191a7f67a7177d806d | 11,764 | py | Python | rlkit/launchers/experiments/ashvin/awr_tf.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/launchers/experiments/ashvin/awr_tf.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/launchers/experiments/ashvin/awr_tf.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | """Script runner for AWR
Use this branch: git@github.com:anair13/awr.git
Setup instructions to run on AWS:
1. Add AWR code path to doodad code_dirs_to_mount
2. If using AWS S3 from AWR, make sure you update the following hardcoded paths
in util/asset_loader.py:
LOCAL_LOG_DIR = '/home/ashvin/data/s3doodad'
AWS_S3_PATH... | 26.317673 | 80 | 0.544458 |
1d21b354567edd9dd9bb472d8a0ebc75c31d315f | 18,927 | py | Python | superpoint/models/base_model.py | wzwart/SuperPoint | 410601f59dffd61a024d3c796025064b40e86109 | [
"MIT"
] | null | null | null | superpoint/models/base_model.py | wzwart/SuperPoint | 410601f59dffd61a024d3c796025064b40e86109 | [
"MIT"
] | null | null | null | superpoint/models/base_model.py | wzwart/SuperPoint | 410601f59dffd61a024d3c796025064b40e86109 | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
import tensorflow as tf
from tensorflow.python.client import timeline
import numpy as np
from tqdm import tqdm
import os.path as osp
import itertools
from superpoint.utils.tools import dict_update
class Mode:
TRAIN = 'train'
EVAL = 'eval'
PRED = 'pred'
class Base... | 45.93932 | 118 | 0.577376 |
1d21ca178eec2ca1fc51ecba235d48085d1d8209 | 5,453 | py | Python | heap/binary/minimum_binary_tree.py | casper1149/algorithms | a6deff4c78ac71f681dc2878bf88c3adb17c23dd | [
"Beerware"
] | null | null | null | heap/binary/minimum_binary_tree.py | casper1149/algorithms | a6deff4c78ac71f681dc2878bf88c3adb17c23dd | [
"Beerware"
] | null | null | null | heap/binary/minimum_binary_tree.py | casper1149/algorithms | a6deff4c78ac71f681dc2878bf88c3adb17c23dd | [
"Beerware"
] | null | null | null | import sys;
from utils import assert_equals
def fill(arr):
''' Utility method to fill an array '''
items = [0, 0, 1, 100, 1000, 1, 0, 200]
for item in items:
insert(arr, item)
def fill(arr, items):
''' Utility method to fill an array '''
for item in items:
insert(arr, item)
def i... | 27.540404 | 152 | 0.631946 |
1d21d17dab40784bb9e214b2e721bacba3f16da8 | 6,307 | py | Python | app/routes.py | SamsonTaxon/InLine | 258536589c2ab948670bbda77b1b7e888e228933 | [
"MIT"
] | null | null | null | app/routes.py | SamsonTaxon/InLine | 258536589c2ab948670bbda77b1b7e888e228933 | [
"MIT"
] | null | null | null | app/routes.py | SamsonTaxon/InLine | 258536589c2ab948670bbda77b1b7e888e228933 | [
"MIT"
] | null | null | null | from flask import abort
from flask import Blueprint
from flask import redirect
from flask import render_template
from flask import request
from flask import url_for
from flask import current_app
from datetime import datetime
from datetime import timezone
import stripe
# from app import logic
from app import myemail
fr... | 30.177033 | 99 | 0.614397 |
1d221c73a7e8f8b257eac099ee3b9360f7f8cb44 | 3,003 | py | Python | rlsuite/algos/gradient_mc_prediction.py | christopher-wolff/lab | 3e26beb30bfb88fef79558a8c1584ddb6c1843e9 | [
"MIT"
] | 2 | 2019-03-28T16:47:50.000Z | 2019-04-08T04:50:50.000Z | rlsuite/algos/gradient_mc_prediction.py | christopher-wolff/rlsuite | 3e26beb30bfb88fef79558a8c1584ddb6c1843e9 | [
"MIT"
] | null | null | null | rlsuite/algos/gradient_mc_prediction.py | christopher-wolff/rlsuite | 3e26beb30bfb88fef79558a8c1584ddb6c1843e9 | [
"MIT"
] | null | null | null | import time
import numpy as np
import tensorflow as tf
from rlsuite import utils
def gradient_mc_prediction(
env_fn,
policy,
value_fn,
alpha=0.01,
gamma=0.99,
num_episodes=1000,
seed=0,
data_dir=None,
log_freq=0,
):
"""Gradient Monte Carlo prediction for estimating a value fu... | 28.875 | 81 | 0.598069 |
1d222bf82d692f63eae541c27f239fc6b5194bfd | 9,496 | py | Python | bounty-monitor.py | bbhunter/bounty-monitor | 4f00c9aea9409d1227fa50d1fd857b63a63f2f99 | [
"MIT"
] | 215 | 2018-02-08T17:20:52.000Z | 2022-03-14T01:15:56.000Z | bounty-monitor.py | kesonn/bounty-monitor | bca8ed58f50732c41cf6908396172e21a91c8236 | [
"MIT"
] | 2 | 2018-03-09T21:00:55.000Z | 2022-03-13T20:18:37.000Z | bounty-monitor.py | kesonn/bounty-monitor | bca8ed58f50732c41cf6908396172e21a91c8236 | [
"MIT"
] | 40 | 2018-02-09T15:42:12.000Z | 2022-03-24T07:44:19.000Z | #!/usr/bin/env python
# Copyright (c) 2018 @nashcontrol
import os
import argparse
import logging
import sqlite3
import re
import time as t
import socket
import ssl
import threading
#python 2 and 3 compatibilities
try:
from queue import Queue
except ImportError:
from Queue import Queue
from datetime import da... | 40.408511 | 208 | 0.64543 |
1d224910441abaa1fe9f280aa44b7da3bf9fb6d0 | 870 | py | Python | scripts/send_submission.py | EvgenyTsydenov/python_course | d3d228b4bf051ad5fb0dff14c2a1fc9656d5ae63 | [
"MIT"
] | 4 | 2022-03-22T14:26:19.000Z | 2022-03-24T05:05:12.000Z | scripts/send_submission.py | EvgenyTsydenov/python_course | d3d228b4bf051ad5fb0dff14c2a1fc9656d5ae63 | [
"MIT"
] | null | null | null | scripts/send_submission.py | EvgenyTsydenov/python_course | d3d228b4bf051ad5fb0dff14c2a1fc9656d5ae63 | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
# noinspection PyUnresolvedReferences
import shared
from definitions import ROOT_PATH
from utils.smtp_sender import SMTPSender
load_dotenv()
if __name__ == '__main__':
lessons = []
if not lessons:
lessons = os.listdir(os.path.join(ROOT_PATH, 'release'))
... | 31.071429 | 76 | 0.656322 |
1d22752a9d798de4a459dfd6ba56a86e587670a3 | 891 | py | Python | venv/Lib/site-packages/nbdime/diffing/lcs.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/nbdime/diffing/lcs.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/nbdime/diffing/lcs.py | PeerHerholz/guideline_jupyter_book | ce445e4be0d53370b67708a22550565b90d71ac6 | [
"BSD-3-Clause"
] | 4 | 2020-11-14T17:05:36.000Z | 2020-11-16T18:44:54.000Z | # coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import unicode_literals
from six.moves import xrange as range
from ..diff_format import SequenceDiffBuilder
def diff_from_lcs(A, B, A_indices, B_indices):
"""Compute the diff of... | 24.75 | 66 | 0.586981 |
1d22ba4942a80f07c94a4afd104dc2f064cc2e18 | 6,162 | py | Python | retrobiocat_web/app/biocatdb/routes/data_issues.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/routes/data_issues.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/routes/data_issues.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.app.retrobiocat.functions.get_images import smiles_rxn_to_svg
from retrobiocat_web.app.biocatdb import bp, forms
from flask import render_template, jsonify, session, request, make_response, flash, redirect, url_for
import mongoengine as db
from flask_security import roles_required, current_user, au... | 36.461538 | 128 | 0.635021 |
1d22e0a48ef7c1522c47d9ba437ae92e1f2de815 | 6,862 | py | Python | access_control/models/role_resource_permission.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | null | null | null | access_control/models/role_resource_permission.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 90 | 2018-01-23T10:30:01.000Z | 2019-01-31T10:53:42.000Z | access_control/models/role_resource_permission.py | hedleyroos/core-management-layer | 2a25bf5fb44fd511b8b2626ec09a4bc05098334c | [
"BSD-3-Clause"
] | 1 | 2021-08-17T14:16:23.000Z | 2021-08-17T14:16:23.000Z | # coding: utf-8
"""
Access Control API
# The Access Control API ## Overview The Access Control API is an API exposed to other core components. It uses an API Key in an HTTP header to perform authentication and authorisation. Most of the API calls facilitates CRUD of the entities defined in the Access Contro... | 30.90991 | 449 | 0.612941 |
1d22e26dc0a119143d08a02224b24dfae788b6e0 | 825 | py | Python | tests/test_essential_serializer.py | shane-mason/essentialdb | 5fad8bb1e62f22cb61201d5b0c0b13ee0a523440 | [
"MIT"
] | 3 | 2016-12-09T20:07:49.000Z | 2020-08-29T20:08:10.000Z | tests/test_essential_serializer.py | shane-mason/essentialdb | 5fad8bb1e62f22cb61201d5b0c0b13ee0a523440 | [
"MIT"
] | null | null | null | tests/test_essential_serializer.py | shane-mason/essentialdb | 5fad8bb1e62f22cb61201d5b0c0b13ee0a523440 | [
"MIT"
] | null | null | null | import unittest
import os
from essentialdb import PickleSerializer, JSONSerializer
class TestSerializers(unittest.TestCase):
json_file_path = "test.json"
pickle_file_path = "test.pickle"
def __get_data(self):
return dict({'f1': [1,2,3], 'f2': {'n1':'a', 'n2': 2}})
def test_pickle(self):
... | 28.448276 | 63 | 0.660606 |
1d22f19493ce4c2846a8a3823507e5a981b67444 | 8,333 | py | Python | training_scripts/s_train_cv.py | jrepifano/mortality-tool | 5503f1cddee5654219ef1aed4d2128e30058ae28 | [
"MIT"
] | 1 | 2021-01-28T22:27:55.000Z | 2021-01-28T22:27:55.000Z | training_scripts/s_train_cv.py | jrepifano/mortality-tool | 5503f1cddee5654219ef1aed4d2128e30058ae28 | [
"MIT"
] | null | null | null | training_scripts/s_train_cv.py | jrepifano/mortality-tool | 5503f1cddee5654219ef1aed4d2128e30058ae28 | [
"MIT"
] | null | null | null | import os
import torch
import scipy
import numpy as np
import pandas as pd
from sklearn.model_selection import StratifiedKFold
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
from sklearn.preprocessing import StandardScaler
from imblearn.under_sampling import Random... | 44.801075 | 147 | 0.656546 |
1d233019f92e68fc73ef07c43d5e9126e0338208 | 4,825 | py | Python | src/tguiil/blinker.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 2 | 2020-09-17T20:51:18.000Z | 2020-11-03T15:58:10.000Z | src/tguiil/blinker.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | 97 | 2020-08-26T05:07:08.000Z | 2022-03-28T16:01:49.000Z | src/tguiil/blinker.py | facade-technologies-inc/facile | 4c9134dced71734641fed605e152880cd9ddefe3 | [
"MIT"
] | null | null | null | """
..
/------------------------------------------------------------------------------\
| -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- |
|------------------------------------------------------------------------------|
| ... | 34.464286 | 100 | 0.629845 |
1d23311b2cacae5ef65e9b8064cf0d4e2ef0e23a | 3,848 | py | Python | tsmodels/autoregressive.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | tsmodels/autoregressive.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | null | null | null | tsmodels/autoregressive.py | ManeeshaPerera/forecast-framework | 60a22af4a97aec10c8bbea7f3f833061283382cb | [
"BSD-3-Clause"
] | 2 | 2022-03-20T10:30:38.000Z | 2022-03-22T06:39:14.000Z | from tsmodels._base_class import ForecastModels
from pmdarima import auto_arima
from pmdarima.preprocessing import FourierFeaturizer
from pmdarima import pipeline
from pmdarima import arima
import pandas as pd
class AutoRegressive(ForecastModels):
def __init__(self, train_data, test_data, horizon, resolution, hor... | 52 | 110 | 0.606549 |
1d235cd9c9a843c5bb0871374cdaf3381235bf15 | 856 | py | Python | 03_Triple/triple_aws-samples_2_v1.py | Machine-Learning-Labs/DeepRacerRewardFunctionsCollection | f6addf4654de90f9d1669fd5de67331add93ab2f | [
"MIT"
] | 17 | 2020-01-14T06:25:10.000Z | 2022-01-25T18:02:37.000Z | 03_Triple/triple_aws-samples_2_v1.py | Machine-Learning-Labs/DeepRacerRewardFunctionsCollection | f6addf4654de90f9d1669fd5de67331add93ab2f | [
"MIT"
] | null | null | null | 03_Triple/triple_aws-samples_2_v1.py | Machine-Learning-Labs/DeepRacerRewardFunctionsCollection | f6addf4654de90f9d1669fd5de67331add93ab2f | [
"MIT"
] | 5 | 2020-05-30T18:49:18.000Z | 2021-09-03T19:38:39.000Z | '''
@author: AWS Samples
@Link: https://docs.aws.amazon.com/deepracer/latest/developerguide/what-is-deepracer.html
@License: Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
'''
def reward_function(params):
'''
Example of rewarding the agent to stay inside the two track bord... | 30.571429 | 93 | 0.698598 |
1d2380281a01fc097a6c5d0d4bc2c9b89ab68983 | 1,072 | py | Python | tests/test_clients/test_methods/test_errors/test_chat_creation_error.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | tests/test_clients/test_methods/test_errors/test_chat_creation_error.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | tests/test_clients/test_methods/test_errors/test_chat_creation_error.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | import uuid
from http import HTTPStatus
import pytest
from botx import ChatTypes
from botx.clients.methods.errors.chat_creation_error import ChatCreationError
from botx.clients.methods.v3.chats.create import Create
from botx.concurrency import callable_to_coroutine
pytestmark = pytest.mark.asyncio
pytest_plugins = (... | 29.777778 | 80 | 0.710821 |
1d23a064bf3d04c2d8d85469cda59caad48cffeb | 660 | py | Python | scripts/utils/interfaces.py | lidofinance/depositor-bot | 3bf6f63fd4f81f6a67838c2d6c63e2384ce50a49 | [
"Apache-2.0"
] | 4 | 2021-09-12T22:17:22.000Z | 2022-01-26T07:33:17.000Z | scripts/utils/interfaces.py | lidofinance/depositor-bot | 3bf6f63fd4f81f6a67838c2d6c63e2384ce50a49 | [
"Apache-2.0"
] | 7 | 2021-09-25T09:34:01.000Z | 2022-03-14T15:55:28.000Z | scripts/utils/interfaces.py | lidofinance/depositor-bot | 3bf6f63fd4f81f6a67838c2d6c63e2384ce50a49 | [
"Apache-2.0"
] | 3 | 2021-09-12T22:17:25.000Z | 2022-03-03T11:26:00.000Z | from brownie import interface
from scripts.utils.constants import (
LIDO_CONTRACT_ADDRESSES,
NODE_OPS_ADDRESSES,
DEPOSIT_SECURITY_MODULE,
DEPOSIT_CONTRACT,
)
from scripts.utils.variables import WEB3_CHAIN_ID, ACCOUNT
LidoInterface = interface.Lido(LIDO_CONTRACT_ADDRESSES[WEB3_CHAIN_ID], owner=ACCOUNT... | 34.736842 | 119 | 0.85 |
1d23ae572df637cdbe4cf72d7c426d96b07740d2 | 3,800 | py | Python | pymbolic/mapper/coefficient.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 70 | 2015-08-10T20:24:24.000Z | 2022-03-31T04:08:35.000Z | pymbolic/mapper/coefficient.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 48 | 2015-04-22T16:13:07.000Z | 2022-03-25T04:27:13.000Z | pymbolic/mapper/coefficient.py | thomasgibson/pymbolic | a4a873f10bfc4c17dec92fe047a4638298cd63fc | [
"MIT"
] | 20 | 2015-11-20T18:47:11.000Z | 2021-09-28T23:44:21.000Z | __copyright__ = "Copyright (C) 2013 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, ... | 36.190476 | 77 | 0.627895 |
1d23bca721289103cbde27b46051191a244a7765 | 3,004 | py | Python | test/language/sql_tables/python/MultiplePkTableTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/sql_tables/python/MultiplePkTableTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/sql_tables/python/MultiplePkTableTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
from testutils import getZserioApi, getApiDir
class MultiplePkTableTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "sql_tables.zs")
cls._fileName = os.path.join(getApiDir(os.path.dirname(__file__)), "multiple_pk_table_test.s... | 31.957447 | 107 | 0.667111 |
1d23f2385aac089665ea27032240272568774255 | 3,341 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_configuration.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 ... | 48.42029 | 172 | 0.698593 |
1d23fbcbd2a30d1f3582c68de8b63ca8f414e73d | 815 | py | Python | census/templatetags/comparatives.py | anoited007/country-dashboard | 577bbcc4992e24c484650895fabbcdf4343e1bdb | [
"MIT"
] | 16 | 2017-10-19T03:36:41.000Z | 2022-03-03T11:46:20.000Z | census/templatetags/comparatives.py | ChrisAchinga/wazimap | a66a1524030a8b98e7ea0dfb270d1946ca75b3b2 | [
"MIT"
] | 66 | 2016-02-15T08:59:29.000Z | 2017-09-21T14:00:43.000Z | census/templatetags/comparatives.py | ChrisAchinga/wazimap | a66a1524030a8b98e7ea0dfb270d1946ca75b3b2 | [
"MIT"
] | 18 | 2017-10-06T12:26:37.000Z | 2021-08-30T01:38:37.000Z | from django import template
register = template.Library()
@register.inclusion_tag('profile/_blocks/_comparative_list_item.html')
def build_comparative_item(sumlev, stat, stat_type, geography, decimals=None):
if sumlev == 'CBSA':
place_name = 'the %s' % geography['parents'][sumlev]['full_name']
else:
... | 32.6 | 78 | 0.641718 |
1d240fed803ac25a728dd07cc8c7edfd9bc63214 | 2,081 | py | Python | tests/python/pants_test/backend/jvm/tasks/test_jvm_prep_command.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_jvm_prep_command.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_jvm_prep_command.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.j... | 39.264151 | 102 | 0.743393 |
1d241f184661fa37b57913861e9fb9b2387cc4b1 | 5,168 | py | Python | predict.py | jaym096/FIFA-WorldCup-Match-Predictor | 4b5b6fbc91391133f595cba4f650736eea81d2e0 | [
"MIT"
] | null | null | null | predict.py | jaym096/FIFA-WorldCup-Match-Predictor | 4b5b6fbc91391133f595cba4f650736eea81d2e0 | [
"MIT"
] | null | null | null | predict.py | jaym096/FIFA-WorldCup-Match-Predictor | 4b5b6fbc91391133f595cba4f650736eea81d2e0 | [
"MIT"
] | null | null | null | import pandas as pd
#============== First Round ===================#
def predict_firstRound(ranking, final_dataset, logreg):
# Obtained from https://fixturedownload.com/results/fifa-world-cup-2018
fixtures = pd.read_csv('data/fixtures.csv')
#List for storing the group stage games
pred_set = []
... | 42.710744 | 124 | 0.614551 |
1d242706791204714cee06d41f54faa74ce91e33 | 2,382 | py | Python | python/app/plugins/http/Weaver Ecology OA/Weaver_Ecology_Oa_Rce.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/http/Weaver Ecology OA/Weaver_Ecology_Oa_Rce.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/http/Weaver Ecology OA/Weaver_Ecology_Oa_Rce.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #/usr/bin/python3
import sys
import urllib3
from app.lib.utils.request import request
from app.lib.utils.common import get_capta, get_useragent
class Weaver_Ecology_Oa_Rce_BaseVerify:
def __init__(self, url):
self.info = {
'name': '泛微-OA漏洞可执行任意命令',
'description': '泛微-OA漏洞可执行任意命令,影响... | 44.111111 | 352 | 0.598237 |
1d24a64bf9732d25367258483830e181f0efccdf | 1,650 | py | Python | src/preprocessing/label_extraction.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/preprocessing/label_extraction.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/preprocessing/label_extraction.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | import os
import numpy as np
import pandas as pd
import wave
PATH_TO_DATA = '/scratch/speech/IEMOCAP_full_release/'
def print_list(list_to_print):
for item in list_to_print:
print(item)
def process_text_files():
audio_paths = []
categorical_emotion = []
average_valence = []
average_activation = []
average_d... | 31.730769 | 102 | 0.688485 |
1d24c6d1a110ba96f95ba4fb5c860ec20d1c2c26 | 15,632 | py | Python | cinder/volume/drivers/netapp/dataontap/client/client_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 1 | 2019-01-22T05:37:38.000Z | 2019-01-22T05:37:38.000Z | cinder/volume/drivers/netapp/dataontap/client/client_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/netapp/dataontap/client/client_base.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Alex Meade. All rights reserved.
# Copyright (c) 2014 Clinton Knight. All rights reserved.
# Copyright (c) 2015 Tom Barron. All rights reserved.
# Copyright (c) 2016 Mike Rooney. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this... | 40.708333 | 79 | 0.621226 |
1d24cd325f41ed3988cb8bf3242945c47c89114c | 320 | py | Python | bgmi3/model/__init__.py | BGmi/BGmi-NG | 33728bb4584dfc1049e733709aa7c2dbc1310297 | [
"MIT"
] | 1 | 2020-03-09T20:50:30.000Z | 2020-03-09T20:50:30.000Z | bgmi3/model/__init__.py | BGmi/BGmi-NG | 33728bb4584dfc1049e733709aa7c2dbc1310297 | [
"MIT"
] | 35 | 2020-03-25T10:33:53.000Z | 2021-10-18T22:59:22.000Z | bgmi3/model/__init__.py | Trim21/BGmi-NG | e7aa9092846386c976aca97ee6a8c645bc24fc67 | [
"MIT"
] | 1 | 2020-05-16T07:59:08.000Z | 2020-05-16T07:59:08.000Z | """export"""
from bgmi3.model.config import Config
from bgmi3.model.series import Series
from bgmi3.model.status import SeriesStatus
from bgmi3.model.subtitle import Subtitle
from bgmi3.model.update_time import UpdateTime
__all__ = [
"Series",
"Config",
"Subtitle",
"UpdateTime",
"SeriesStatus",
]
| 20 | 46 | 0.73125 |
1d24dc84191049bf746bfef51774a88c102c1384 | 1,694 | py | Python | test/language/functions/python/StructureArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 2 | 2019-02-06T17:50:24.000Z | 2019-11-20T16:51:34.000Z | test/language/functions/python/StructureArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | 1 | 2019-11-25T16:25:51.000Z | 2019-11-25T18:09:39.000Z | test/language/functions/python/StructureArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class StructureArrayTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "functions.zs").structure_array
cls.ITEMS = [cls.api.Item.fromFields(1, 2),
cls.api.Item.fromFi... | 33.88 | 82 | 0.688902 |
1d24dfac921b03d067f6b9db07f53933e64e6490 | 1,550 | py | Python | utils/stable_frame_extraction.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | utils/stable_frame_extraction.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | utils/stable_frame_extraction.py | jaswanthbjk/BCDC-Net | a83b7bc31e53ab89d9025fd6b7e3d45c9dbd4f4f | [
"MIT"
] | null | null | null | import cv2
import matplotlib.pyplot as plt
import numpy as np
class StableframeExtractor:
""" Extract a stable frame from the video stream"""
def __init__(self, video_path, viz_image):
self.video_path = video_path
self.viz_image = viz_image
def StableframeExtractor(self):
videoca... | 32.978723 | 78 | 0.561935 |
1d24f423fe1a46418d6a065196451e6dde295a4a | 1,607 | py | Python | superset/migrations/versions/836c0bf75904_cache_timeouts.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 108 | 2018-01-22T11:09:59.000Z | 2021-01-15T10:53:04.000Z | superset/migrations/versions/836c0bf75904_cache_timeouts.py | franksam007/incubator-superset | a0f572eb3ea4b89cb435a8af20436f8e1d34814e | [
"Apache-2.0"
] | 112 | 2018-01-25T22:57:21.000Z | 2019-08-22T20:08:48.000Z | superset/migrations/versions/836c0bf75904_cache_timeouts.py | zhwXF/Superset | 14c3488c79f8f3cdbd1123e8f7a92f8746c2db09 | [
"Apache-2.0",
"CC-BY-4.0",
"MIT"
] | 24 | 2018-01-19T22:54:39.000Z | 2020-11-12T13:04:25.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.522727 | 89 | 0.747978 |
1d24f7250f67f039b0d074829523273eb02e67d2 | 6,639 | py | Python | plugins/dockitems.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | 1 | 2020-05-27T12:53:59.000Z | 2020-05-27T12:53:59.000Z | plugins/dockitems.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | null | null | null | plugins/dockitems.py | tajatwal/mac_apt | 7d8d61933e3240af3def1422179eb3f48ecb84f1 | [
"MIT"
] | null | null | null | '''
Copyright (c) 2018 Yogesh Khatri
This file is part of mac_apt (macOS Artifact Parsing Tool).
Usage or distribution of this software/code is subject to the
terms of the MIT License.
dockitems.py
---------------
Reads the dock plist file for each user.
'''
import logging
from biplist import *... | 42.286624 | 180 | 0.615002 |
1d251226f3541552331d3440da0d26aead0a88c8 | 17,560 | py | Python | data_utils.py | iphysresearch/GW_project | cf6e05816d83765db6c585e423f32e502296b45b | [
"Apache-2.0"
] | null | null | null | data_utils.py | iphysresearch/GW_project | cf6e05816d83765db6c585e423f32e502296b45b | [
"Apache-2.0"
] | null | null | null | data_utils.py | iphysresearch/GW_project | cf6e05816d83765db6c585e423f32e502296b45b | [
"Apache-2.0"
] | null | null | null | #! usr/bin/python
#coding=utf-8
# importing the basic library
from __future__ import print_function
from utils import *
ctx = check_ctx()
# ctx = mx.gpu()
# Data manipulation
import mxnet.ndarray as nd
import mxnet as mx
import numpy as np
import pandas as pd
from functools import reduce
# Signal processing
from sc... | 37.682403 | 213 | 0.58451 |
1d252c3922ab8e7b8cba784cbdb15e8418234b37 | 2,665 | py | Python | google-cloud-sdk/.install/.backup/lib/surface/compute/groups/add_members.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/compute/groups/add_members.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/compute/groups/add_members.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... | 29.611111 | 93 | 0.699062 |
1d25386b7f24279decc8fbf61c7aa57a7f5c430f | 1,566 | py | Python | venv/Lib/site-packages/tests/test_116_ConnActive.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_116_ConnActive.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_116_ConnActive.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_116_ConnActive(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self.run_test... | 17.4 | 84 | 0.702427 |
1d259329e7a136bfe8dfe9b9d99213bdd2805473 | 1,108 | py | Python | articles/migrations/0001_initial.py | ankitmlive/prolab-api | 8e86e222269b63108cd33f08a90b2d921a1152f6 | [
"MIT"
] | null | null | null | articles/migrations/0001_initial.py | ankitmlive/prolab-api | 8e86e222269b63108cd33f08a90b2d921a1152f6 | [
"MIT"
] | 5 | 2021-03-30T12:47:27.000Z | 2021-09-22T18:38:27.000Z | articles/migrations/0001_initial.py | ankitmlive/prolab-api | 8e86e222269b63108cd33f08a90b2d921a1152f6 | [
"MIT"
] | 1 | 2020-03-16T14:42:31.000Z | 2020-03-16T14:42:31.000Z | # Generated by Django 3.0.3 on 2020-03-06 10:02
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Article',
fields=[
('id', models.AutoField(... | 33.575758 | 114 | 0.553249 |
1d259cea6683ff422ba3d5c01ff22edcfb49714e | 1,998 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/app/browser_dispatcher.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/command_lib/app/browser_dispatcher.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/app/browser_dispatcher.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... | 35.052632 | 74 | 0.75025 |
1d259f3299f71a1644d21cffc1487cc03784f1ef | 657 | py | Python | fileshare/fileshare/views.py | nijatrajab/fileshare | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | 1 | 2021-07-08T06:51:28.000Z | 2021-07-08T06:51:28.000Z | fileshare/fileshare/views.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | fileshare/fileshare/views.py | nijatrajab/fileshareproject | f364788f318ffe8b731ccb68e9c275bfa73c0292 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.views.generic import TemplateView
class HomePage(TemplateView):
template_name = 'index.html'
def handler400(request, exception):
return render(request, "status/400.html", status=400)
def handler403(request, exception):
return render(request,... | 24.333333 | 58 | 0.710807 |
1d25a10b1fbbdb51c78713e0748a7c97b6a9cd7f | 1,811 | py | Python | test/aqua/test_nlopt_optimizers.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | null | null | null | test/aqua/test_nlopt_optimizers.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | null | null | null | test/aqua/test_nlopt_optimizers.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 30.183333 | 92 | 0.674213 |
1d25e7d4fb07377a3b3ace5cce0d853e2877db77 | 6,738 | py | Python | annotation/load500.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 7 | 2021-02-01T22:39:23.000Z | 2021-08-09T16:28:38.000Z | annotation/load500.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-05-17T13:14:40.000Z | 2021-05-20T10:26:09.000Z | annotation/load500.py | jakelever/corona-ml | 8ceb22af50d7277ebf05f2fd21bbbf68c080ed76 | [
"MIT"
] | 1 | 2021-01-04T14:11:18.000Z | 2021-01-04T14:11:18.000Z | import mysql.connector
from collections import OrderedDict
import csv
import json
import random
import re
import argparse
def chunks(lst, n):
"""Yield successive n-sized chunks from lst."""
for i in range(0, len(lst), n):
yield lst[i:i + n]
def connect_db(dbfile):
with open(dbfile) as f:
database = json.load... | 34.731959 | 339 | 0.681359 |
1d25f4dee1dd99fb5e37a67eaeb2b4354a8fe74d | 15,567 | py | Python | fci/direct_ep.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | fci/direct_ep.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | fci/direct_ep.py | gmwang18/pyscf | fcd6877751661c8a9743c1c872a4a2b65f6dd7ac | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
'''
Electron phonon coupling
Ref:
arXiv:1602.04195
'''
import numpy
from pyscf import lib
from pyscf.fci import cistring
import pyscf.fci
# site-1 ,...,site-N
# v v
# ep... | 36.801418 | 104 | 0.608724 |
1d25f8a224c3ae26c078d1d83820b14929578d50 | 17 | py | Python | __init__.py | Gongzq5/leetcode-helper | 9a6f79db6fbefa921b852064a269e274e81a1e28 | [
"MIT"
] | null | null | null | __init__.py | Gongzq5/leetcode-helper | 9a6f79db6fbefa921b852064a269e274e81a1e28 | [
"MIT"
] | null | null | null | __init__.py | Gongzq5/leetcode-helper | 9a6f79db6fbefa921b852064a269e274e81a1e28 | [
"MIT"
] | null | null | null | import libs as lc | 17 | 17 | 0.823529 |
1d26391aed28355e7b4b23c9d4d71421451583d9 | 72,827 | py | Python | sdk/batch/azure-batch/azure/batch/operations/_job_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/batch/azure-batch/azure/batch/operations/_job_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/batch/azure-batch/azure/batch/operations/_job_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 ... | 50.364454 | 152 | 0.667362 |
1d266ef43ae5f6a8d520027931abdbfcc0ec30cc | 2,597 | py | Python | tests/st/ops/ascend/vector/test_roi_align_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/st/ops/ascend/vector/test_roi_align_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/st/ops/ascend/vector/test_roi_align_001.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 30.197674 | 95 | 0.570273 |
1d26bb80e5fa1cf03077a4af401f597b97c054cc | 152 | py | Python | wwpdb/utils/testing/__init__.py | wwPDB/py-wwpdb_utils_testing | 5f3e1c03fe298a9c4f80c02ba56d56f876f706dd | [
"Apache-2.0"
] | null | null | null | wwpdb/utils/testing/__init__.py | wwPDB/py-wwpdb_utils_testing | 5f3e1c03fe298a9c4f80c02ba56d56f876f706dd | [
"Apache-2.0"
] | null | null | null | wwpdb/utils/testing/__init__.py | wwPDB/py-wwpdb_utils_testing | 5f3e1c03fe298a9c4f80c02ba56d56f876f706dd | [
"Apache-2.0"
] | 2 | 2019-12-21T19:15:50.000Z | 2020-10-04T14:06:09.000Z | __docformat__ = "restructuredtext en"
__author__ = "Ezra Peisach"
__email__ = "ezra.peisach@rcsb.org"
__license__ = "Apache 2.0"
__version__ = "0.17.2"
| 25.333333 | 37 | 0.743421 |
1d26df42d5ca9f5dd296a82dd0c341b918527ebe | 283 | py | Python | micropub/__init__.py | drivet/micropub-git-server | 159cf380ae12b68ea26d51cffb20c08a710fc280 | [
"MIT"
] | null | null | null | micropub/__init__.py | drivet/micropub-git-server | 159cf380ae12b68ea26d51cffb20c08a710fc280 | [
"MIT"
] | 9 | 2021-03-19T02:49:07.000Z | 2022-02-23T22:28:50.000Z | micropub/__init__.py | drivet/micropub-git-server | 159cf380ae12b68ea26d51cffb20c08a710fc280 | [
"MIT"
] | null | null | null | import logging
from flask import Flask
from micropub.media import media_bp
from micropub.micropub import micropub_bp
app = Flask(__name__)
app.register_blueprint(media_bp, url_prefix='/media')
app.register_blueprint(micropub_bp, url_prefix='/')
app.logger.setLevel(logging.INFO)
| 21.769231 | 53 | 0.816254 |
1d26ff6110d99486ff1bcabedbaf70cadd055ee5 | 3,186 | py | Python | seqtag/model/bert.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 7 | 2021-05-29T16:00:39.000Z | 2022-03-13T16:00:04.000Z | seqtag/model/bert.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 2 | 2021-01-09T05:53:07.000Z | 2021-11-18T11:39:35.000Z | seqtag/model/bert.py | wasiahmad/PolicyIE | 57046c431b64f6e85edd70990c18c02e5ba83c35 | [
"MIT"
] | 3 | 2021-02-04T02:15:24.000Z | 2021-11-17T01:26:41.000Z | import torch
import torch.nn as nn
from transformers.modeling_bert import BertPreTrainedModel, BertModel, BertConfig
from torchcrf import CRF
from .module import IntentClassifier, SlotClassifier
class JointBERT(BertPreTrainedModel):
def __init__(self, config, args, intent_label_lst, slot_label_lst):
super... | 47.552239 | 120 | 0.660703 |
1d27109d4aba6209116c6fb615c078dc6d7f56e9 | 4,806 | py | Python | louie_experiments/reorder_samples_in_rewards.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | louie_experiments/reorder_samples_in_rewards.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | louie_experiments/reorder_samples_in_rewards.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | '''
Created on Aug 25, 2017
@author: rafferty
Contains functions for changing the order of the samples in a rewards file based
on particular criteria. Useful for investigating questions about a slightly different part
of the population arriving at one time versus another.
'''
import csv
import numpy as np
import mat... | 46.211538 | 134 | 0.740741 |
1d27284ea27e8fac6b98cfc3b4b64a2705ddb225 | 9,446 | py | Python | Booking.py | aditisharma2512/MeecoCodingChallengePart2 | 0baf3e54a2cf32b3bc08403da54b3f5661d05dd8 | [
"Xnet",
"X11"
] | null | null | null | Booking.py | aditisharma2512/MeecoCodingChallengePart2 | 0baf3e54a2cf32b3bc08403da54b3f5661d05dd8 | [
"Xnet",
"X11"
] | null | null | null | Booking.py | aditisharma2512/MeecoCodingChallengePart2 | 0baf3e54a2cf32b3bc08403da54b3f5661d05dd8 | [
"Xnet",
"X11"
] | null | null | null | """
This class handles all the booking data. There are three classes in this file:
Booking : Handles the booking data, it stores the records of the bookings being made.
It handles three requests: GET, POST, PATCH
BookingById: Searches the bookings by the Id given by the user
BookingByCustomer: Searches the bookings by ... | 43.731481 | 120 | 0.588821 |
1d273ff7a4de55b95f376aad200bca2e6757d1c1 | 1,027 | py | Python | code/extensions.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | code/extensions.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | code/extensions.py | hanuele/knausj_german | cc6b66b0e5333714fcb5c9a96521af779927b795 | [
"MIT"
] | null | null | null | from .user_settings import get_list_from_csv
from talon import Module, Context, actions, app
mod = Module()
mod.list("file_extension", desc="A file extension, such as .py")
_file_extensions_defaults = {
"punkt pü": ".py",
"punkt talon": ".talon",
"punkt mark down": ".md",
"punkt shell": ".sh",
"pu... | 25.675 | 64 | 0.579357 |
1d2746496f63b9d0d09fa9cc890b0412bfe6e19b | 3,307 | py | Python | scripts/infer_samples.py | nicholasturner1/PyTorchUtils | 50ea71cf32228c07c49ade3d020da591901f56f9 | [
"MIT"
] | 2 | 2017-10-19T20:17:43.000Z | 2019-11-12T10:18:45.000Z | scripts/infer_samples.py | nicholasturner1/PyTorchUtils | 50ea71cf32228c07c49ade3d020da591901f56f9 | [
"MIT"
] | 4 | 2018-03-15T18:27:23.000Z | 2021-04-24T19:36:55.000Z | scripts/infer_samples.py | nicholasturner1/PyTorchUtils | 50ea71cf32228c07c49ade3d020da591901f56f9 | [
"MIT"
] | 7 | 2017-09-03T03:26:48.000Z | 2018-10-19T18:45:31.000Z | """
Inference script for small cutout samples
Nicholas Turner, 2020
"""
import os
import time
import argparse
import os.path as osp
import torch
from pytu import run
from pytu import utils
def addparams(args):
# Sampling params
patchsize = (20, 160, 160)
args.datasetargs = [patchsize]
args.datasetk... | 28.264957 | 81 | 0.660417 |
1d274d924449d18886fb7452eb49e5999c8b348c | 4,359 | py | Python | tango_shared/tests.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 2 | 2015-09-21T04:27:26.000Z | 2016-06-02T16:57:25.000Z | tango_shared/tests.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 1 | 2018-12-20T13:01:57.000Z | 2018-12-20T13:01:57.000Z | tango_shared/tests.py | tBaxter/tango-shared-core | 35fc10aef1ceedcdb4d6d866d44a22efff718812 | [
"MIT"
] | 3 | 2015-11-12T21:11:21.000Z | 2016-10-24T23:18:10.000Z | import unittest
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.db import models
from django.http import HttpRequest
from django.template import Template, Context, RequestContext
from django.test import TestCase, RequestFactory, override_settings
from django.urls impor... | 36.024793 | 99 | 0.645331 |
1d27514db4abc65fc4ff14053f84a151ced2bb30 | 256 | py | Python | lib/stemming.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 8 | 2016-05-31T09:54:15.000Z | 2021-08-13T13:25:01.000Z | lib/stemming.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | null | null | null | lib/stemming.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 10 | 2015-01-07T06:45:44.000Z | 2021-06-21T08:41:57.000Z | from nltk.stem import PorterStemmer
stemmer = None
def stem_phrase(phrase):
global stemmer
if not stemmer:
stemmer = PorterStemmer()
return map(stemmer.stem, phrase)
def stem_document(document):
return map(stem_phrase, document)
| 19.692308 | 37 | 0.722656 |
1d2754502132ffcec098d0cb0f071e651d4dd12e | 18,098 | py | Python | swagger_client/api/result_api.py | radon-h2020/radon-ctt-cli | 3120b748c73e99d81d0cac5037e393229577d640 | [
"Apache-2.0"
] | null | null | null | swagger_client/api/result_api.py | radon-h2020/radon-ctt-cli | 3120b748c73e99d81d0cac5037e393229577d640 | [
"Apache-2.0"
] | null | null | null | swagger_client/api/result_api.py | radon-h2020/radon-ctt-cli | 3120b748c73e99d81d0cac5037e393229577d640 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
RADON CTT Server API
This is API of the RADON Continuous Testing Tool (CTT) Server: <a href=\"https://github.com/radon-h2020/radon-ctt\">https://github.com/radon-h2020/radon-ctt<a/> # noqa: E501
OpenAPI spec version: 1.0.0-oas3
Generated by: https://github.com/swagger-api/sw... | 36.85947 | 178 | 0.604763 |
1d2761740affd1f96056ba45700a821c8803e7f9 | 4,511 | py | Python | components/exp-test-agent/tests/abstraction/test_state_abstracter.py | sfahad1414/AGENT | 84069edc96b6190bb03ffd5099cbc8966061a563 | [
"Apache-2.0"
] | 15 | 2020-05-06T16:17:56.000Z | 2022-03-30T12:25:16.000Z | components/exp-test-agent/tests/abstraction/test_state_abstracter.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:17:16.000Z | 2022-02-10T06:35:58.000Z | components/exp-test-agent/tests/abstraction/test_state_abstracter.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 7 | 2020-04-07T18:47:55.000Z | 2022-03-30T12:14:58.000Z | from unittest.mock import patch
from abstraction.state_abstracter import StateAbstracter
@patch(StateAbstracter.__module__ + '.StateAbstracter.get_actions', side_effect=[['click'], ['set'], []])
@patch(StateAbstracter.__module__ + '.StateAbstracter.build_selector',
side_effect=['selector_1', 'selector_2', 'se... | 21.583732 | 105 | 0.535801 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.