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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
338f7b82d9ff37200f115e949e6a45293c01124e | 20,384 | py | Python | dynamics365crm/client.py | Flywheel-Technologies/dynamics365crm-python | b1fe2818710e51d65203145ba86282d6e642de4b | [
"MIT"
] | null | null | null | dynamics365crm/client.py | Flywheel-Technologies/dynamics365crm-python | b1fe2818710e51d65203145ba86282d6e642de4b | [
"MIT"
] | null | null | null | dynamics365crm/client.py | Flywheel-Technologies/dynamics365crm-python | b1fe2818710e51d65203145ba86282d6e642de4b | [
"MIT"
] | null | null | null | # Default imports
import requests
import logging
# Custom imports
from .errors import (
BadRequestError,
UnauthorizedError,
ForbiddenError,
NotFoundError,
PreconditionFailedError,
PayloadTooLargeError,
TooManyRequestsError,
InternalServerError,
NotImplementedError,
ServiceUnavai... | 38.826667 | 176 | 0.551168 |
338f83586b31e714d3ff43c106d77ecc4c97cfc7 | 2,910 | py | Python | project_RL/monte_carlo/monte_carlo_agent.py | Ronnypetson/gym-minigrid | 1f0a607160960f00b664130c756a4f3bab356752 | [
"Apache-2.0"
] | null | null | null | project_RL/monte_carlo/monte_carlo_agent.py | Ronnypetson/gym-minigrid | 1f0a607160960f00b664130c756a4f3bab356752 | [
"Apache-2.0"
] | 2 | 2021-10-15T01:57:47.000Z | 2021-10-29T20:24:56.000Z | project_RL/monte_carlo/monte_carlo_agent.py | Ronnypetson/gym-minigrid | 1f0a607160960f00b664130c756a4f3bab356752 | [
"Apache-2.0"
] | null | null | null | import random
from collections import defaultdict as dd
class MonteCarlo:
"""*-visit Monte-Carlo"""
def __init__(self, env, n_zero=7, gamma=0.9):
self.action_size = env.action_space.n
self.gamma = gamma
self.n_zero = n_zero
self.init_q_value_table()
self.init_v... | 44.769231 | 136 | 0.642612 |
338ff5ce5582b33894044bf971cc8c691f60b0ae | 3,573 | py | Python | oscar/apps/customer/notifications/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/customer/notifications/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | oscar/apps/customer/notifications/views.py | makielab/django-oscar | 0a325cd0f04a4278201872b2e163868b72b6fabe | [
"BSD-3-Clause"
] | null | null | null | from django.core.urlresolvers import reverse
from django.utils.html import strip_tags
from django.utils.translation import ugettext_lazy as _, ungettext
from django.utils.timezone import now
from django.contrib import messages
from django import http
from django.views import generic
from django.db.models import get_mod... | 33.083333 | 74 | 0.677302 |
339037b0d60494576e7f42dd3adffb3b790c95fb | 7,472 | py | Python | alipay/aop/api/domain/AntMerchantExpandStoreShopserviceCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AntMerchantExpandStoreShopserviceCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AntMerchantExpandStoreShopserviceCreateModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ShopServiceItem import ShopServiceItem
from alipay.aop.api.domain.ServiceTimeInfo import ServiceTimeInfo
from alipay.aop.api.domain.ShopStaffInfo import ShopStaffInfo
class AntMer... | 34.118721 | 83 | 0.59114 |
3390462f299c4b9abc2bdd18c4dac8ee0413944e | 530 | py | Python | terrascript/provider/jeremmfr/junos.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/jeremmfr/junos.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/jeremmfr/junos.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/jeremmfr/junos.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:19:45 UTC)
import terrascript
class junos(terrascript.Provider):
"""Terraform's provider for Junos devices"""
__description__ = "Terraform's provider for Junos devices"
__namespace__ = "jeremmfr"
... | 26.5 | 73 | 0.715094 |
339048f012582d648344e4c1e9159f0ad797ddb1 | 7,357 | py | Python | python/openlattice/__init__.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/openlattice/__init__.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/openlattice/__init__.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# flake8: noqa
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
__version__ = "0.1.0"
# import apis into sdk pa... | 53.70073 | 125 | 0.894386 |
339050259ebe08db8111c746dcfb11afa523bd0a | 2,910 | py | Python | src/ackermann/units/argparse.py | baldulin/ackermann | e9cb7648c14610b249256a0531a533e3d2b7c70e | [
"MIT"
] | 2 | 2021-05-17T07:27:02.000Z | 2021-06-24T18:48:43.000Z | src/ackermann/units/argparse.py | baldulin/ackermann | e9cb7648c14610b249256a0531a533e3d2b7c70e | [
"MIT"
] | null | null | null | src/ackermann/units/argparse.py | baldulin/ackermann | e9cb7648c14610b249256a0531a533e3d2b7c70e | [
"MIT"
] | null | null | null | """ Config units that parse command line arguments"""
from argparse import ArgumentParser
from ..command import MetaCommand
from ..config import config_unit
from ..exceptions import StopInitException
from ..logger import logger
from .vars import (config_arg_command_parser, config_arg_parser, config_args,
... | 26.944444 | 84 | 0.64433 |
3390f3f35c6664e2ba29c76fc0ea9f8db511c9e0 | 259 | py | Python | photos/admin.py | kelvin-wahome/Insta | 7e702bd691d32ceea218b681eb2a2490d197c26f | [
"Unlicense"
] | null | null | null | photos/admin.py | kelvin-wahome/Insta | 7e702bd691d32ceea218b681eb2a2490d197c26f | [
"Unlicense"
] | null | null | null | photos/admin.py | kelvin-wahome/Insta | 7e702bd691d32ceea218b681eb2a2490d197c26f | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
from .models import Image,Category,Location
# Register your models here.
admin.site.register(Image)
admin.site.register(Category)
admin.site.register(Location)
| 23.545455 | 43 | 0.791506 |
33910eee0d453793a309763faa9786dcc6919dfc | 1,054 | py | Python | app/data_model/session_data.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/data_model/session_data.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | app/data_model/session_data.py | ons-eq-team/eq-questionnaire-runner | 8d029097faa2b9d53d9621064243620db60c62c7 | [
"MIT"
] | null | null | null | class SessionData:
def __init__(
self,
tx_id,
schema_name,
period_str,
language_code,
survey_url,
ru_name,
ru_ref,
response_id,
questionnaire_id,
case_id=None,
case_ref=None,
account_service_url=None,
acc... | 29.277778 | 70 | 0.621442 |
33913a480fb094ab898b6556d2f047cd2cd877e4 | 663 | py | Python | uwgroups/subcommands/get.py | nhoffman/uwgroups | fab9cb266d2e0c794370c1bdf62b26610dd33aef | [
"MIT",
"Unlicense"
] | 1 | 2018-11-30T00:43:06.000Z | 2018-11-30T00:43:06.000Z | uwgroups/subcommands/get.py | nhoffman/uwgroups | fab9cb266d2e0c794370c1bdf62b26610dd33aef | [
"MIT",
"Unlicense"
] | 2 | 2018-08-20T17:00:18.000Z | 2018-08-27T17:30:54.000Z | uwgroups/subcommands/get.py | nhoffman/uwgroups | fab9cb266d2e0c794370c1bdf62b26610dd33aef | [
"MIT",
"Unlicense"
] | 1 | 2018-08-21T15:06:54.000Z | 2018-08-21T15:06:54.000Z | """Show the API response for information about a group
"""
import logging
import pprint
import sys
from uwgroups.api import UWGroups
from uwgroups.subcommands import find_credentials
log = logging.getLogger(__name__)
def build_parser(parser):
parser.add_argument('group_name', help="name of a group")
def acti... | 25.5 | 75 | 0.711916 |
3391666aff7a85a250a51e257b7ea3a9a93706ec | 2,420 | py | Python | spoffy/io/aiohttp.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | 1 | 2019-04-24T19:50:03.000Z | 2019-04-24T19:50:03.000Z | spoffy/io/aiohttp.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | 3 | 2019-10-11T20:31:57.000Z | 2020-04-13T16:06:43.000Z | spoffy/io/aiohttp.py | steinitzu/spoffy | 40cce0f00accbe006084a610d0d50396c21ec96c | [
"Apache-2.0"
] | null | null | null | from typing import Optional
import aiohttp
from spoffy.models import Token
from spoffy.client.base import AsyncClient, ClientCommon
from spoffy.sansio import Request, Response
from spoffy.spotify import AsyncSpotify
class AioHttpClient(AsyncClient):
"""
Client implementation using requests as a http backend... | 27.5 | 78 | 0.600826 |
33917817786399e73a08d1401a6aae195402028a | 17,385 | py | Python | src/buildstream/_remotespec.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_remotespec.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | src/buildstream/_remotespec.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2019 Bloomberg Finance LP
# Copyright (C) 2020 Codethink Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | 34.088235 | 180 | 0.598217 |
3391a232383483da557785f45f6477a4debbf14e | 18,023 | py | Python | backend/stock/models.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/models.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/stock/models.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.db import models
from django.db import transaction
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from article.models import ArticleType
from money.models import CostField
from stock.exceptions import StockSmallerThanZeroError, Id10TError
from money.exceptions impo... | 43.745146 | 122 | 0.587416 |
3391ac5e0da51296168540a4e0eacf86d8167fd8 | 1,744 | py | Python | guillotina_elasticsearch/testing.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 4 | 2019-04-27T14:40:24.000Z | 2021-03-02T18:10:07.000Z | guillotina_elasticsearch/testing.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 21 | 2019-04-05T19:20:44.000Z | 2021-07-14T17:07:30.000Z | guillotina_elasticsearch/testing.py | plone/guillotina_elasticsearch | 539996e9f4f6c9312503bd55613ff8b052a49657 | [
"BSD-2-Clause"
] | 2 | 2019-04-04T08:36:50.000Z | 2021-03-26T19:59:29.000Z | from elasticsearch import AsyncElasticsearch
from guillotina import app_settings
from guillotina import configure
from guillotina import task_vars
from guillotina.exceptions import RequestNotFound
from guillotina_elasticsearch.interfaces import IConnectionFactoryUtility
from guillotina_elasticsearch.utility import Defa... | 34.88 | 88 | 0.673165 |
3391cb4d569e9fd005d31152c88caab0cda8cbf3 | 426 | py | Python | dbgr/results.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 8 | 2019-05-23T19:45:46.000Z | 2021-02-08T17:21:21.000Z | dbgr/results.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 86 | 2019-05-13T14:20:20.000Z | 2019-06-19T11:48:59.000Z | dbgr/results.py | JakubTesarek/dbgr | fc55cee5d5a69f3fa691579bc7d2627f51cbca03 | [
"Apache-2.0"
] | 1 | 2021-02-08T17:21:22.000Z | 2021-02-08T17:21:22.000Z | from dbgr.types import Type
class Result:
def __init__(self, value, annotation=None, cached=False):
self._value = value
self.cached = cached
if annotation is None:
annotation = Type()
self.annotation = annotation
def __str__(self):
return self.annotation.re... | 23.666667 | 61 | 0.640845 |
3391d5269232dae154471d6038fb95ceb79a7a54 | 4,909 | py | Python | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | 31.876623 | 179 | 0.684865 |
3392399c7c121afe23e81ce0e31ec4f6b037fbd0 | 3,015 | py | Python | beers/migrations/0004_auto_20181203_2229.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 18 | 2018-12-06T01:46:37.000Z | 2021-10-17T10:37:17.000Z | beers/migrations/0004_auto_20181203_2229.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 194 | 2018-11-04T12:50:49.000Z | 2022-01-06T22:43:43.000Z | beers/migrations/0004_auto_20181203_2229.py | danroberts728/hsvdotbeer | 5b977bf4a7aab149ad56564b3adbb09424500308 | [
"Apache-2.0"
] | 7 | 2019-03-18T05:36:06.000Z | 2020-12-25T03:27:29.000Z | # Generated by Django 2.1.3 on 2018-12-03 22:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("beers", "0003_manufacturer"),
]
operations = [
migrations.CreateModel(
name="Beer",
... | 32.771739 | 87 | 0.363847 |
3392594e7df894158a4542de7b7b986f8a92ad07 | 2,112 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/open_shift_managed_cluster_aad_identity_provider_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/open_shift_managed_cluster_aad_identity_provider_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_04_30/models/open_shift_managed_cluster_aad_identity_provider_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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 ... | 40.615385 | 139 | 0.650095 |
33925c2f692b1dbee8ab875f57d243538e15aabe | 8,201 | py | Python | experiments/shikhar/corl2019/mulitobj_cvae/bowl.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/shikhar/corl2019/mulitobj_cvae/bowl.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/shikhar/corl2019/mulitobj_cvae/bowl.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 37.619266 | 152 | 0.567736 |
33925e5f1374dbdfa53c9e6d1bedc1ce9fe0bf0e | 2,044 | py | Python | src/olympia/pages/tests.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/pages/tests.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/pages/tests.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | from django.conf import settings
from olympia.amo.tests import TestCase
from olympia.amo.urlresolvers import reverse
class TestPages(TestCase):
def _check(self, url, status):
resp = self.client.get(reverse(url))
assert resp.status_code == status
def test_status(self):
pages = ['page... | 32.444444 | 75 | 0.568493 |
33926c42d8f945f0013c10d33f5c37ec5d91a0d2 | 2,429 | py | Python | lustro/cli.py | ashwoods/lustro | 8ba5e0f3daa85a65f68290fa8a7afe876079693f | [
"MIT"
] | null | null | null | lustro/cli.py | ashwoods/lustro | 8ba5e0f3daa85a65f68290fa8a7afe876079693f | [
"MIT"
] | null | null | null | lustro/cli.py | ashwoods/lustro | 8ba5e0f3daa85a65f68290fa8a7afe876079693f | [
"MIT"
] | null | null | null | import click
import click_log
import os
from .db import Mirror
from .utils import oracle_qualified_dsn
os.environ['NLS_LANG'] = 'GERMAN.AL32UTF8'
@click.group()
@click_log.simple_verbosity_option()
@click_log.init(__name__)
@click.option('--source', help="Source DB DSN.")
@click.option('--target', help="Target DB D... | 31.545455 | 89 | 0.691231 |
33928a4f6da60dd56c68e11d76fc4aca74c48b52 | 1,336 | py | Python | src/snowflakes/tests/test_batch_upgrade.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | null | null | null | src/snowflakes/tests/test_batch_upgrade.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | null | null | null | src/snowflakes/tests/test_batch_upgrade.py | lrowe/snovault | acfcac9b62a4d6b2ebb4a2343acadc36b449f0db | [
"MIT"
] | 2 | 2021-07-07T18:41:25.000Z | 2021-07-27T23:45:27.000Z | def test_batch_upgrade(testapp, invalid_snowball):
assert invalid_snowball['status'] == 'FLYBARGS'
upgrade = testapp.post_json(
'/batch_upgrade', {'batch': [invalid_snowball['uuid']]}, status=200)
res = testapp.get(invalid_snowball['@id'])
assert res.json['schema_version'] == '2'
assert u... | 31.069767 | 103 | 0.628743 |
3392b5fddbfe83bd8f35db0906051ef430d80af8 | 14,438 | py | Python | src/apply_manual_codes.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | null | null | null | src/apply_manual_codes.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | 15 | 2019-03-18T13:20:17.000Z | 2020-06-16T11:54:58.000Z | src/apply_manual_codes.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | null | null | null | import time
from os import path
import sys
from core_data_modules.cleaners import Codes
from core_data_modules.cleaners.cleaning_utils import CleaningUtils
from core_data_modules.cleaners.location_tools import KenyaLocations
from core_data_modules.traced_data import Metadata
from core_data_modules.traced_data.io impor... | 57.521912 | 124 | 0.587547 |
3392d3c1a63cf91825211611dbf8ed940aa9f1e4 | 7,739 | py | Python | heat/db/sqlalchemy/models.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | 1 | 2020-08-15T14:29:15.000Z | 2020-08-15T14:29:15.000Z | heat/db/sqlalchemy/models.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | heat/db/sqlalchemy/models.py | CiscoSystems/heat | 1b609f3c0621c44e4988a166a38f36c2b57eb4c6 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicabl... | 30.832669 | 78 | 0.654865 |
3392f34433b69068e40af946d8d3984d16bec385 | 1,095 | py | Python | froide/foirequest/models/suggestion.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | froide/foirequest/models/suggestion.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | 3 | 2020-02-11T21:43:56.000Z | 2021-11-15T17:47:06.000Z | froide/foirequest/models/suggestion.py | ashmpace/question-mtl | 5ce1289cd6db0e629aa138d2dee235d9a4c4546b | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from froide.publicbody.models import PublicBody
from .request import FoiRequest
class PublicBodySuggestion(models.Model):
request = models.ForeignKey(Foi... | 35.322581 | 76 | 0.702283 |
339306a477386013f9dbc7745a968b708e2e36fc | 7,786 | py | Python | lib/utils/faces.py | geraudster/zevision | 26566547c37046f239b94d545bdfefee2d6bb4e0 | [
"Apache-2.0"
] | 14 | 2019-07-06T19:53:04.000Z | 2021-08-29T15:22:25.000Z | lib/utils/faces.py | IhabBendidi/zevision | 26566547c37046f239b94d545bdfefee2d6bb4e0 | [
"Apache-2.0"
] | 9 | 2019-09-03T11:16:10.000Z | 2022-01-31T14:34:02.000Z | lib/utils/faces.py | IhabBendidi/zevision | 26566547c37046f239b94d545bdfefee2d6bb4e0 | [
"Apache-2.0"
] | 6 | 2019-07-06T19:54:09.000Z | 2020-05-21T09:30:11.000Z | import lib.utils.models.models as models
import lib.utils.encodings.encodings as codes
import lib.utils.classifier as classifier
import imutils
import dlib
import cv2
import os
import numpy as np
from imutils import paths
default_path_encodings = codes.default_encodings
default_encoding_data = codes.encoding_data
... | 31.650407 | 172 | 0.744413 |
33932a9d30a56340a7248881a4bc18b1ae66dc25 | 1,375 | py | Python | finley/test/python/rectangle.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null | finley/test/python/rectangle.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | 1 | 2019-01-14T03:07:43.000Z | 2019-01-14T03:07:43.000Z | finley/test/python/rectangle.py | markendr/esys-escript.github.io | 0023eab09cd71f830ab098cb3a468e6139191e8d | [
"Apache-2.0"
] | null | null | null |
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development unt... | 28.061224 | 78 | 0.668364 |
339362a169147a65bbe09f9c6417f81ef42d0650 | 1,667 | py | Python | test/vanilla/version-tolerant/AcceptanceTests/test_binary.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/AcceptanceTests/test_binary.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/version-tolerant/AcceptanceTests/test_binary.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 40.658537 | 78 | 0.70246 |
3393631684dce2abd856ac55d0e379f996871dde | 14,853 | py | Python | ImageClassifierUtils.py | vjsingh1984/aipnd-project | dc02dafc754e5f1696cd6e5f4382c49e41d97091 | [
"MIT"
] | null | null | null | ImageClassifierUtils.py | vjsingh1984/aipnd-project | dc02dafc754e5f1696cd6e5f4382c49e41d97091 | [
"MIT"
] | null | null | null | ImageClassifierUtils.py | vjsingh1984/aipnd-project | dc02dafc754e5f1696cd6e5f4382c49e41d97091 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Imports here
import matplotlib.pyplot as plt
import numpy as np
import torch
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datasets, transforms, models, utils
import torchvision.models as models
from PIL import Image
import json
from matplo... | 33.528217 | 126 | 0.59281 |
33938bfef5fea0b6fa42b0c940495086b4d6d526 | 1,131 | py | Python | leetcode/medium/1424-Diagonal_traverse_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | 1 | 2020-02-25T10:32:27.000Z | 2020-02-25T10:32:27.000Z | leetcode/medium/1424-Diagonal_traverse_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | leetcode/medium/1424-Diagonal_traverse_II.py | shubhamoli/practice | 5a24fdeb6e5f43b821ef0510fe3b343ddda18f22 | [
"MIT"
] | null | null | null | """
Leetcode #1424
"""
from typing import List
from collections import defaultdict
class Solution:
def findDiagonalOrder(self, nums: List[List[int]]) -> List[int]:
if not nums or not nums[0]:
return []
store = defaultdict(list)
for i in range(len(nums)):
for ... | 21.75 | 87 | 0.50221 |
3393a6117ea1b22d1f163b5387294f8422d3c67d | 16,736 | py | Python | api/resources/m_parser_wikidata.py | phucty/mtab_dev | 1334b65f77454b7188e1a80d42c5cbc123799edd | [
"MIT"
] | null | null | null | api/resources/m_parser_wikidata.py | phucty/mtab_dev | 1334b65f77454b7188e1a80d42c5cbc123799edd | [
"MIT"
] | null | null | null | api/resources/m_parser_wikidata.py | phucty/mtab_dev | 1334b65f77454b7188e1a80d42c5cbc123799edd | [
"MIT"
] | null | null | null | import bz2
import datetime
import gc
import numbers
import queue
from collections import defaultdict
from contextlib import closing
from multiprocessing.pool import Pool
import ujson
from rdflib.util import from_n3
from tqdm import tqdm
import api.utilities.m_io as iw
import m_config as cf
from api.resources.m_db_item... | 34.155102 | 116 | 0.541766 |
3393b9cf35948e2179a75358ac3c3dc0f6d01963 | 985 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_lsm6ds_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_lsm6ds_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/lis3mdl_lsm6ds_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
from adafruit_lsm6ds.lsm6dsox import LSM6DSOX as LSM6DS
# To use LSM6DS33, comment out the LSM6DSOX import line
# and uncomment the next line
# from adafruit_lsm6ds.lsm6ds33 import LSM6DS33 as LSM6DS... | 30.78125 | 86 | 0.701523 |
3393d36d31aa75bad3bbf35c921434db5a4e0fca | 11,203 | py | Python | nemo/collections/asr/parts/preprocessing/segment.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2021-09-10T10:40:51.000Z | 2021-09-10T10:40:51.000Z | nemo/collections/asr/parts/preprocessing/segment.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | null | null | null | nemo/collections/asr/parts/preprocessing/segment.py | JMichaelStringer/NeMo | b5b29a69ccb0ec3d8c9ace2f33872ee99858a559 | [
"Apache-2.0"
] | 1 | 2022-01-07T03:39:11.000Z | 2022-01-07T03:39:11.000Z | # Copyright (c) 2020, NVIDIA CORPORATION. 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 appli... | 41.339483 | 115 | 0.62751 |
33940cb25ae519c92314396632ab6b86bb5ec493 | 640 | py | Python | src/zptess/dbase/__init__.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/__init__.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/dbase/__init__.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
# Copyright (c) 2022
#
# See the LICENSE file for details
# see the AUTHORS file for authors
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# -------------------
# -----------... | 19.393939 | 72 | 0.339063 |
33944c44f63c075b9bc46d8c7b7027979f4d5f49 | 1,425 | py | Python | gerapy/spiders/crawl.py | awesome-archive/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | 1 | 2018-12-07T02:05:32.000Z | 2018-12-07T02:05:32.000Z | gerapy/spiders/crawl.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | gerapy/spiders/crawl.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from scrapy.spiders import CrawlSpider as BaseSpider, signals
from scrapy_splash import SplashRequest
from scrapy import Request
class CrawlSpider(BaseSpider):
name = None
def start_requests(self):
self.crawler.signals.connect(self.make_requests, signal=signals.spider_idle... | 33.928571 | 111 | 0.614737 |
33948b8669c7455c162ccfc6897f067f42b1f476 | 19,240 | py | Python | infinisdk/infinibox/dataset.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/infinibox/dataset.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | infinisdk/infinibox/dataset.py | kobutton/infinisdk | 4ae5c66a2d7926636a52cb0a1452f9a2809b2ec2 | [
"BSD-3-Clause"
] | null | null | null | import functools
import gossip
import logbook
from capacity import Capacity, byte, GB
from urlobject import URLObject as URL
from collections import namedtuple
from mitba import cached_method
from vintage import deprecated
from ..core.utils import end_reraise_context, DONT_CARE, handle_possible_replication_snapshot
fro... | 49.207161 | 120 | 0.664917 |
3394c4203137aad10c55b3ceff009e900e696aab | 3,657 | py | Python | intersight/models/iam_ldap_dns_parameters_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_ldap_dns_parameters_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/iam_ldap_dns_parameters_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class IamLdapDnsParametersRef(object):
"""
NOTE: Th... | 24.38 | 77 | 0.547443 |
33951cba2b4ea42d5cf03ec8894ce5ffa7be0320 | 71 | py | Python | tests/return_none.py | ZYAZP/python2 | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 1,062 | 2015-11-18T01:04:33.000Z | 2022-03-29T07:13:30.000Z | tests/return_none.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 26 | 2015-11-17T06:58:07.000Z | 2022-01-15T18:11:16.000Z | tests/return_none.py | ArrowSides/onelinerizer | 7dc3b62eff51e1decb4a408122e77630fdc1687d | [
"MIT"
] | 100 | 2015-11-17T09:01:22.000Z | 2021-09-12T13:58:28.000Z | def f():
print 1
return
print 2
print 3
print f()
print 4
| 7.888889 | 11 | 0.56338 |
339547c0cd03cd344c240742ec307bc7a2190d19 | 26,404 | py | Python | webapp/extra-apis.py | Rodrick12123/cs257-1 | de2a74f71627d02d8a9b5090af35b5b18d71ac94 | [
"MIT"
] | null | null | null | webapp/extra-apis.py | Rodrick12123/cs257-1 | de2a74f71627d02d8a9b5090af35b5b18d71ac94 | [
"MIT"
] | null | null | null | webapp/extra-apis.py | Rodrick12123/cs257-1 | de2a74f71627d02d8a9b5090af35b5b18d71ac94 | [
"MIT"
] | 1 | 2021-12-04T00:12:04.000Z | 2021-12-04T00:12:04.000Z | '''
api.py
Rodrick and Thea, 09 November 2021
'''
import sys
import flask
import json
import config
import psycopg2
api = flask.Blueprint('api', __name__)
def get_connection():
''' Returns a connection to the database described in the
config module. May raise an exception as described in the
... | 34.157827 | 152 | 0.523368 |
33954bc4825bc748a8f083157674c711357b4f63 | 1,578 | py | Python | tests/test_utils.py | Tesorio/django-anon | 5288d84001e2cbe4027c3c0f00173e6fe49da959 | [
"MIT"
] | 146 | 2019-11-08T20:17:39.000Z | 2022-03-30T12:34:13.000Z | tests/test_utils.py | Tesorio/django-anon | 5288d84001e2cbe4027c3c0f00173e6fe49da959 | [
"MIT"
] | 35 | 2019-11-04T17:37:41.000Z | 2021-07-28T12:22:02.000Z | tests/test_utils.py | Tesorio/django-anon | 5288d84001e2cbe4027c3c0f00173e6fe49da959 | [
"MIT"
] | 3 | 2020-10-02T13:55:49.000Z | 2021-06-23T10:46:50.000Z | # stdlib
import re
# deps
from django.test import TestCase
# local
from anon import utils
class UtilsTestCase(TestCase):
def test_fake_word(self):
text = utils.fake_word(min_size=6)
self.assertGreaterEqual(len(text), 6)
def test_fake_text(self):
text = utils.fake_text(40)
se... | 29.222222 | 73 | 0.642586 |
339555b21811773a87c062941470ae5a64f4b112 | 598 | bzl | Python | example/third_party/com_jayway_jsonpath.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/com_jayway_jsonpath.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/com_jayway_jsonpath.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "com_jayway_jsonpath_json_path",
artifact = "com.jayway.jsonpath:json-path:2.6.0",
artifact_sha256 = "c175df1eb0cb14dc5adc9f19a1566c7d16d7e419c48dc1771aec8... | 35.176471 | 93 | 0.660535 |
3395861634a0f83a95ebe94697423803aaa2f37b | 3,543 | py | Python | migrations/versions/c35e9bbece72_.py | DD-DeCaF/iam | e70ed924b5fdd4bed2a684a1bada43c2755fb0bc | [
"Apache-2.0"
] | 2 | 2018-03-29T14:41:06.000Z | 2019-01-20T21:56:26.000Z | migrations/versions/c35e9bbece72_.py | DD-DeCaF/iam | e70ed924b5fdd4bed2a684a1bada43c2755fb0bc | [
"Apache-2.0"
] | 25 | 2018-02-20T14:52:13.000Z | 2020-04-30T09:50:38.000Z | migrations/versions/c35e9bbece72_.py | DD-DeCaF/iam | e70ed924b5fdd4bed2a684a1bada43c2755fb0bc | [
"Apache-2.0"
] | null | null | null | """empty message
Revision ID: c35e9bbece72
Revises:
Create Date: 2018-04-16 13:14:47.083924
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'c35e9bbece72'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 40.724138 | 107 | 0.672312 |
3395af056be5eed1d7eb6feee1d04ddc1e2e5ba6 | 7,486 | py | Python | generated/python/proto-google-cloud-functions-v1beta2/google/cloud/proto/functions/v1beta2/functions_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 18 | 2016-12-08T20:47:57.000Z | 2022-01-29T19:36:04.000Z | generated/python/proto-google-cloud-functions-v1beta2/google/cloud/proto/functions/v1beta2/functions_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 252 | 2016-09-21T20:51:36.000Z | 2021-03-25T23:02:36.000Z | generated/python/proto-google-cloud-functions-v1beta2/google/cloud/proto/functions/v1beta2/functions_pb2_grpc.py | landrito/api-client-staging | 140c312c9335af160efce5b37842c995308e0148 | [
"BSD-3-Clause"
] | 37 | 2016-09-19T21:13:16.000Z | 2022-01-29T19:36:07.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from grpc.framework.common import cardinality
from grpc.framework.interfaces.face import utilities as face_utilities
import google.cloud.proto.functions.v1beta2.functions_pb2 as google_dot_cloud_dot_proto_dot_functions_dot_v1beta2_dot_fu... | 53.471429 | 142 | 0.801095 |
3395b37e8a01a274501cb5e017ec2fc23afd2a9d | 575 | py | Python | 08_multi_processing/daemonProcess.py | 837477/Python_Parallel | 7590ff38e6a2b1dbec139e9571b6564b5bbf276f | [
"MIT"
] | 67 | 2017-08-27T18:00:46.000Z | 2022-03-01T11:54:16.000Z | 08_multi_processing/daemonProcess.py | 837477/python_parallel_programming_study | 2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f | [
"MIT"
] | 8 | 2018-10-18T17:15:45.000Z | 2021-12-24T01:58:05.000Z | 08_multi_processing/daemonProcess.py | 837477/python_parallel_programming_study | 2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f | [
"MIT"
] | 49 | 2017-08-18T12:53:30.000Z | 2022-02-06T09:40:50.000Z | import multiprocessing
import time
def daemonProcess():
print("Starting my Daemon Process")
print("Daemon process started: {}".format(multiprocessing.current_process()))
time.sleep(3)
print("Daemon process terminating")
def main():
print("Main process: {}".format(multiprocessing.current_process())... | 27.380952 | 81 | 0.713043 |
3395c63846c3cbc23ba0ef70e54142644c3d371f | 12,775 | py | Python | toontown/coghq/boardbothq/BoardOfficePipeRoom_Battle01.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 1 | 2018-06-16T23:06:38.000Z | 2018-06-16T23:06:38.000Z | toontown/coghq/boardbothq/BoardOfficePipeRoom_Battle01.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/coghq/boardbothq/BoardOfficePipeRoom_Battle01.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 toontown.coghq.SpecImports import *
GlobalEntities = {1000: {'type': 'levelMgr',
'name': 'LevelMgr',
'comment': '',
'parentEntId': 0,
'cogLevel': 0,
'farPlaneDistance': 1500,
'modelFilename': 'phase_11/models/lawbotHQ/LB_Zone13a',
'wantDoors': 1},
1001: {'ty... | 33.707124 | 70 | 0.465049 |
3395d66eefd51c638da6bec87bbb6349c6672cb8 | 8,486 | py | Python | video-server-analysis/python-src/integrate.py | yogendrapal/videoquestion-analysis | d136f812d7eb3625912c463e6b0a107e36730b06 | [
"MIT"
] | null | null | null | video-server-analysis/python-src/integrate.py | yogendrapal/videoquestion-analysis | d136f812d7eb3625912c463e6b0a107e36730b06 | [
"MIT"
] | 12 | 2019-12-16T21:57:32.000Z | 2022-02-10T00:16:54.000Z | video-server-analysis/python-src/integrate.py | yogendrapal/videoquestion-analysis | d136f812d7eb3625912c463e6b0a107e36730b06 | [
"MIT"
] | null | null | null | '''
Github link of original code: https://github.com/oarriaga/face_classification
Author: Neel Dani
Date: 22nd May, 2019
Incroporated few changes according to needs mentioned below.
CHANGES INCORPORATED:
1) Used skvideo.io package to read a video rather than openCV as video maybe rotated (landscape mode).
Skvideo... | 34.636735 | 309 | 0.693495 |
3395d6f9311067cb0a2671ce217924893aa97687 | 8,650 | py | Python | rig/metadatasources.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | rig/metadatasources.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | rig/metadatasources.py | tgbugs/mlab | dacc1663cbe714bb45c31b1b133fddb7ebcf5c79 | [
"MIT"
] | null | null | null | from database.models import MetaDataSource, Experiment, Subject
from database.api import MDSource
#TODO what I need is a link between datasources and the Controller classes, that should probably be defined... here? or somewhere? or fuck what damn it one class per metadata source???!
def mdsAll(channels=4):
"""used... | 28.547855 | 253 | 0.652948 |
3395f5cad477265392b477bf807b5c386a520623 | 10,756 | py | Python | fri/model/lupi_regression.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | null | null | null | fri/model/lupi_regression.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | null | null | null | fri/model/lupi_regression.py | timothycrosley/fri | 94c6b74bfb4ceee405df41834e2e3f8b0a617b38 | [
"MIT"
] | null | null | null | from itertools import product
import cvxpy as cvx
import numpy as np
from sklearn.metrics import r2_score
from sklearn.metrics.regression import _check_reg_targets
from sklearn.utils import check_X_y
from fri.model.base_lupi import (
LUPI_Relevance_CVXProblem,
split_dataset,
is_lupi_feature,
)
from fri.mo... | 35.381579 | 130 | 0.615192 |
339600e9d5277fa3045509d56bd3a534b0ebb959 | 19,317 | py | Python | tofu/data/_inversions_algos.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 6 | 2016-09-15T17:01:19.000Z | 2017-03-06T22:53:10.000Z | tofu/data/_inversions_algos.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 9 | 2016-09-14T17:23:52.000Z | 2017-04-13T07:30:07.000Z | tofu/data/_inversions_algos.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | null | null | null |
import warnings
import numpy as np
import scipy.linalg as scplin
import scipy.optimize as scpop
import scipy.sparse as scpsp
dfail = {}
try:
import sksparse as sksp
except Exception as err:
sksp = False
dfail['sksparse'] = "For cholesk factorizations"
try:
import scikits.umfpack as skumf
except E... | 29.810185 | 90 | 0.48786 |
3396163828cc1616ef71c81e36a10b998ba581c4 | 14,317 | py | Python | hw5/exp/density_model.py | whoiszyc/cs294-112_hws | 68f18e002cf99d88fd68241215a428fda5189b60 | [
"MIT"
] | 102 | 2019-01-18T09:58:03.000Z | 2022-01-28T14:50:42.000Z | hw5/exp/density_model.py | whoiszyc/cs294-112_hws | 68f18e002cf99d88fd68241215a428fda5189b60 | [
"MIT"
] | 1 | 2020-03-10T15:43:22.000Z | 2020-03-10T15:43:22.000Z | hw5/exp/density_model.py | whoiszyc/cs294-112_hws | 68f18e002cf99d88fd68241215a428fda5189b60 | [
"MIT"
] | 47 | 2019-01-17T19:40:22.000Z | 2022-01-18T08:55:25.000Z | import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from ex_utils import build_mlp
class Density_Model(object):
def __init__(self):
super(Density_Model, self).__init__()
def receive_tf_sess(self, sess):
self.sess = sess
def get_prob(self, state):
raise ... | 36.522959 | 114 | 0.559964 |
33962158df4d4b580b67d966dcb859dc0bbe8356 | 1,927 | py | Python | alipay/aop/api/domain/AlipayUserCharityAgreementQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserCharityAgreementQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserCharityAgreementQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserCharityAgreementQueryModel(object):
def __init__(self):
self._biz_id = None
self._product_code = None
self._withhold_pid = None
@property
def biz_id(sel... | 27.140845 | 75 | 0.596264 |
33962f77d3c4021d9c6b61556c9e03d93b163ced | 906 | py | Python | manage/sawtooth_manage/exceptions.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | manage/sawtooth_manage/exceptions.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | 1 | 2021-12-09T23:11:26.000Z | 2021-12-09T23:11:26.000Z | manage/sawtooth_manage/exceptions.py | trust-tech/sawtooth-core | fcd66ff2f13dba51d7642049e0c0306dbee3b07d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 36.24 | 80 | 0.68543 |
33963ac38f110fe8f446dd89dc150793dfcaf56d | 866 | py | Python | sktime/forecasting/tests/__init__.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-12-28T15:24:13.000Z | 2020-12-28T15:24:13.000Z | sktime/forecasting/tests/__init__.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/forecasting/tests/__init__.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | #!/usr/bin/env python3 -u
# coding: utf-8
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning"]
import numpy as np
from sktime.utils._testing.forecasting import generate_time_series
# default parameter testing grid
TEST_WINDOW_LENGTHS = [1, 5]
TEST_STEP_LENGTHS = [1, ... | 27.935484 | 71 | 0.700924 |
33965858aa7e6f4f9a9e25e8121e676b23082a74 | 3,473 | py | Python | mi/dataset/dataset_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/dataset_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/dataset_driver.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | __author__ = 'wordenm'
import os
from mi.logging import config
from mi.core.log import get_logger
log = get_logger()
from mi.core.exceptions import NotImplementedException
class ParticleDataHandler(object):
"""
This class is a stub class. The real class is a Java class.
This script is expected to be us... | 33.718447 | 101 | 0.65275 |
33965b113dd1dcc2fd0fd1e56e82d1658312e269 | 1,102 | py | Python | reliabilly/components/tools/data_monitoring_client.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2018-11-24T02:07:37.000Z | 2018-11-24T02:07:37.000Z | reliabilly/components/tools/data_monitoring_client.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-23T07:12:30.000Z | 2019-01-23T07:12:30.000Z | reliabilly/components/tools/data_monitoring_client.py | corpseware/reliabilly | e8d310d43478407e2cf8b45cc746362124140385 | [
"MIT"
] | 1 | 2019-01-16T05:30:49.000Z | 2019-01-16T05:30:49.000Z | # pylint: disable=too-many-arguments
from reliabilly.components.tools.newrelic_http_client import NewRelicHttpClient
def get_default_monitoring_client(api_key):
return NewRelicHttpClient(api_key)
class DataMonitoringClient:
def __init__(self, api_key, client=None):
self.client = client
if no... | 38 | 118 | 0.716878 |
339684122ec30383f642c4eb9a8b4c3ae88a9e1e | 1,739 | py | Python | tensorflow/python/ops/nn.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/nn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/nn.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2015 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.644444 | 79 | 0.764232 |
33968945d1f89e0be65f5be4b2768b72eaabdb79 | 867 | py | Python | crawler/qs_ranking/decode2.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 3 | 2021-05-24T23:06:40.000Z | 2021-11-08T10:32:42.000Z | crawler/qs_ranking/decode2.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 4 | 2020-10-12T03:00:43.000Z | 2020-11-17T01:47:56.000Z | crawler/qs_ranking/decode2.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 2 | 2021-03-01T15:30:26.000Z | 2022-01-13T21:30:20.000Z | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '10/6/2020 11:56 AM'
import json
def export_2_file(file_path, data):
with open(file_path, 'wb+') as output_file:
encoded_item = json.dumps([dict(item) for item in data], ensure_ascii=False, indent=4)
output_file.write(encoded_ite... | 32.111111 | 94 | 0.615917 |
3396946789c9119c1659c61568e4bf3025d3e661 | 4,672 | py | Python | bit_common.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"Apache-2.0"
] | null | null | null | bit_common.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"Apache-2.0"
] | null | null | null | bit_common.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 46.72 | 117 | 0.516695 |
3396b019a4c02d8903da316f3bbfc85a62f399cd | 5,268 | py | Python | src/examples/barplot.py | DavideConficconi/segretini-matplottini | e50acc4767da7cf7fee94bcab003fff7a755ab7c | [
"MIT"
] | 16 | 2020-10-01T09:24:09.000Z | 2022-02-08T13:08:33.000Z | src/examples/barplot.py | DavideConficconi/segretini-matplottini | e50acc4767da7cf7fee94bcab003fff7a755ab7c | [
"MIT"
] | null | null | null | src/examples/barplot.py | DavideConficconi/segretini-matplottini | e50acc4767da7cf7fee94bcab003fff7a755ab7c | [
"MIT"
] | 1 | 2021-11-08T15:51:31.000Z | 2021-11-08T15:51:31.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 18 09:40:35 2020
@author: aparravi
"""
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import pandas as pd
import numpy as np
import matplotlib.ticker as ticker
import sys
sys.path.append("..")
from pl... | 41.15625 | 148 | 0.601936 |
3396bd35db31509f74112e476c66dae78eeccd30 | 3,919 | py | Python | urd/upgrade_database.py | niubi007/accelerator1 | 0b2a7ab41aeb983942020bdd5e5a99629f2f551b | [
"Apache-2.0"
] | 1 | 2022-01-20T10:51:31.000Z | 2022-01-20T10:51:31.000Z | urd/upgrade_database.py | fyesgo/accelerator | 24bc0fd1b5895ba5d26afc7147a181145ada7938 | [
"Apache-2.0"
] | null | null | null | urd/upgrade_database.py | fyesgo/accelerator | 24bc0fd1b5895ba5d26afc7147a181145ada7938 | [
"Apache-2.0"
] | 1 | 2020-02-15T16:52:47.000Z | 2020-02-15T16:52:47.000Z | #!/usr/bin/env python2.7
# -*- coding: iso-8859-1 -*-
############################################################################
# #
# Copyright (c) 2018 eBay Inc. #
# ... | 33.495726 | 83 | 0.530748 |
339700974b69ea35b0a873abc07fdaa708322f24 | 7,025 | py | Python | disco_aws_automation/disco_sns.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | disco_aws_automation/disco_sns.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | 4 | 2016-03-22T17:04:04.000Z | 2016-03-23T18:03:45.000Z | disco_aws_automation/disco_sns.py | Angakkuit/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | '''Contains DiscoSNS class for manipulating SNS topics'''
import logging
import itertools
import boto
from boto.exception import BotoServerError
class DiscoSNS(object):
"""
Class for manipulating SNS topics
"""
def __init__(self, connection=None, account_id=None):
self.sns = connection or bo... | 47.147651 | 110 | 0.636868 |
339706fae6a2948554e9570ba3f9fe2621a2c066 | 1,018 | py | Python | angrmanagement/ui/widgets/qccode_edit.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/widgets/qccode_edit.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/ui/widgets/qccode_edit.py | mephi42/angr-management | be2ae29279f75b8c057fbad5af0d80d468852059 | [
"BSD-2-Clause"
] | 1 | 2022-02-04T06:12:32.000Z | 2022-02-04T06:12:32.000Z |
from PySide2.QtWidgets import QPlainTextEdit
from PySide2.QtCore import Qt, QEvent
class QCCodeEdit(QPlainTextEdit):
def __init__(self, code_view):
super().__init__()
self._code_view = code_view
self.setTabChangesFocus(False)
self.setReadOnly(True)
@property
def workspac... | 24.829268 | 81 | 0.62279 |
33973f96703d909bae43db49f2855c884b1de733 | 4,903 | py | Python | nlisim/modules/il10.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 4 | 2021-05-21T15:46:15.000Z | 2022-03-01T02:58:32.000Z | nlisim/modules/il10.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 10 | 2020-11-10T23:20:37.000Z | 2022-03-12T01:34:47.000Z | nlisim/modules/il10.py | jbeezley/simulation-hello-world | b4e1258de9c7601af1701041fa39f8f6c5e5a61e | [
"Apache-2.0"
] | 2 | 2020-12-16T14:24:26.000Z | 2021-01-08T15:56:20.000Z | from typing import Any, Dict
import attr
import numpy as np
from nlisim.coordinates import Voxel
from nlisim.diffusion import apply_diffusion
from nlisim.grid import RectangularGrid
from nlisim.module import ModuleModel, ModuleState
from nlisim.modules.molecules import MoleculesState
from nlisim.random import rg
from... | 36.864662 | 97 | 0.63349 |
3397511e81c7c2b5f0b9e37b09b2a97dca784fc6 | 222 | py | Python | pni_customization/pni_customization/doctype/paper_cup_job_order/test_paper_cup_job_order.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/paper_cup_job_order/test_paper_cup_job_order.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | pni_customization/pni_customization/doctype/paper_cup_job_order/test_paper_cup_job_order.py | DaizyModi/pni_customization | 577946e91c8fe956ca64c089327ce18174002ec4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Jigar Tarpara and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestPaperCupJobOrder(unittest.TestCase):
pass
| 20.181818 | 52 | 0.77027 |
33975146d075a1a1ea2ef8d276e367889886c2e4 | 1,786 | py | Python | src/pypipegraph/__init__.py | IMTMarburg/pypipegraph | a3cb50199b9a62071c7006e49967c9a87234dfb0 | [
"MIT"
] | null | null | null | src/pypipegraph/__init__.py | IMTMarburg/pypipegraph | a3cb50199b9a62071c7006e49967c9a87234dfb0 | [
"MIT"
] | 1 | 2020-07-27T06:13:48.000Z | 2020-07-27T06:13:48.000Z | src/pypipegraph/__init__.py | IMTMarburg/pypipegraph | a3cb50199b9a62071c7006e49967c9a87234dfb0 | [
"MIT"
] | 1 | 2020-07-26T07:05:10.000Z | 2020-07-26T07:05:10.000Z | # -*- coding: utf-8 -*-
__version__ = '0.197'
from .graph import run_pipegraph, new_pipegraph
from .ppg_exceptions import (
RuntimeError,
RuntimeException,
CycleError,
JobContractError,
PyPipeGraphError,
JobDiedException,
NothingChanged,
)
from . import util
inside_ppg = util.inside_ppg
... | 20.528736 | 62 | 0.731243 |
33976925f3d4ba5dd82f7d57d022cedd8fef0d55 | 1,561 | py | Python | google-cloud-sdk/lib/surface/ml/jobs/cancel.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/ml/jobs/cancel.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/ml/jobs/cancel.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2016 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... | 33.934783 | 80 | 0.738629 |
33979552789ef8689833da06262315f44154a39d | 3,569 | py | Python | intersight/models/equipment_fex_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_fex_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/equipment_fex_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class EquipmentFexRef(object):
"""
NOTE: This class... | 23.793333 | 77 | 0.536285 |
3397d536e428cec52f369da0cf1cd239dfb7951a | 2,830 | py | Python | prom/interface/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | 8 | 2018-04-10T17:42:34.000Z | 2022-01-14T09:20:23.000Z | prom/interface/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | 85 | 2018-03-29T00:48:28.000Z | 2021-10-16T07:31:02.000Z | prom/interface/__init__.py | viggyfresh/prom | a918476dab1dbadced61fc088cdc36fed1685d0a | [
"MIT"
] | 3 | 2019-02-19T23:50:37.000Z | 2021-05-12T02:07:57.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, print_function, absolute_import
import dsnparse
from ..config import DsnConnection
interfaces = {}
"""holds all the configured interfaces"""
def configure_environ(dsn_env_name='PROM_DSN', connection_class=DsnConnection):
"""
config... | 29.175258 | 102 | 0.699647 |
3397f0173bd655ac2f69935ec9570dcf600851d3 | 2,071 | py | Python | tests/test_nanoevents_physlite.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 77 | 2019-06-09T14:23:33.000Z | 2022-03-22T21:34:01.000Z | tests/test_nanoevents_physlite.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 353 | 2019-06-05T23:54:39.000Z | 2022-03-31T21:21:47.000Z | tests/test_nanoevents_physlite.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 71 | 2019-06-07T02:04:11.000Z | 2022-03-05T21:03:45.000Z | import os
import pytest
import numpy as np
from coffea.nanoevents import NanoEventsFactory, PHYSLITESchema
@pytest.fixture(scope="module")
def events():
path = os.path.abspath("tests/samples/DAOD_PHYSLITE_21.2.108.0.art.pool.root")
factory = NanoEventsFactory.from_root(
path, treepath="CollectionTree"... | 33.403226 | 84 | 0.650893 |
339818c01d23ee8466a71591b6cf99cc4969be58 | 4,549 | py | Python | tofu/tests/tests00_root/test_03_plot.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 56 | 2017-07-09T10:29:45.000Z | 2022-03-31T02:44:50.000Z | tofu/tests/tests00_root/test_03_plot.py | WinstonLHS/tofu | c95b2eb6aedcf4bac5676752b9635b78f31af6ca | [
"MIT"
] | 522 | 2017-07-02T21:06:07.000Z | 2022-03-02T08:07:57.000Z | tofu/tests/tests00_root/test_03_plot.py | Didou09/tofu | 4a4e1f058bab8e7556ed9d518f90807cec605476 | [
"MIT"
] | 9 | 2017-07-02T20:38:53.000Z | 2021-12-04T00:12:30.000Z | """
This module contains tests for tofu.geom in its structured version
"""
# External modules
import os
import numpy as np
import matplotlib.pyplot as plt
import warnings as warn
# Importing package tofu.geom
import tofu as tf
from tofu import __version__
_here = os.path.abspath(os.path.dirname(__file__))
VerbHe... | 29.160256 | 76 | 0.500769 |
339844cd822a0f4524d3e48ec134457f7fafcbb5 | 21,723 | py | Python | modoboa/core/app_settings.py | teicee/modoboa | e2492a08b0a7749fbebc3f161af17df20142d028 | [
"ISC"
] | null | null | null | modoboa/core/app_settings.py | teicee/modoboa | e2492a08b0a7749fbebc3f161af17df20142d028 | [
"ISC"
] | null | null | null | modoboa/core/app_settings.py | teicee/modoboa | e2492a08b0a7749fbebc3f161af17df20142d028 | [
"ISC"
] | null | null | null | from django import forms
from django.conf import settings
from django.contrib.auth import password_validation
from django.utils.translation import ugettext as _, ugettext_lazy
from modoboa.core.password_hashers import get_dovecot_schemes
from modoboa.core.password_hashers.base import PasswordHasher
from modoboa.lib im... | 34.8125 | 80 | 0.631911 |
33984805bc3c060432b3fdc78835a1c58a00a59e | 6,994 | py | Python | flexget/tests/test_movie_list_api.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/tests/test_movie_list_api.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/tests/test_movie_list_api.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from flexget.utils import json
from flexget.api import empty_response
from flexget.plugins.api.movie_list import ObjectsContainer as OC
class TestMovieListAPI(object):
co... | 40.427746 | 104 | 0.629397 |
33989731f7713969068a6943b00c88f78f480e0f | 2,544 | py | Python | pyram/mock/run_jp.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | pyram/mock/run_jp.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 6 | 2020-02-17T13:44:43.000Z | 2020-06-25T15:35:05.000Z | pyram/mock/run_jp.py | Hoseung/pyRamAn | f9386fa5a9f045f98590039988d3cd50bc488dc2 | [
"MIT"
] | 1 | 2021-11-25T16:11:56.000Z | 2021-11-25T16:11:56.000Z | import ramski
import numpy as np
import pyram
from pyram.utils.cosmology import Timeconvert as TC
YZiCS = False
NH = True
if YZiCS:
centers = (0.51237148, 0.68784678, 0.45724899)# JP's pick
nout = 187
ramski.ramski_v4("/home/hoseung/Work/data/YZiCS/29172/snapshots/",
"./output/",
... | 29.929412 | 93 | 0.633648 |
3398f02de01a33f0df7d05d4cb20729d55a3a0ff | 10,604 | py | Python | artemis/general/scannable_functions.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/general/scannable_functions.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | artemis/general/scannable_functions.py | peteroconnor-bc/artemis | ad2871fae7d986bf10580eec27aee5b7315adad5 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-10-16T21:21:59.000Z | 2022-03-07T22:18:44.000Z | from collections import namedtuple
from artemis.general.functional import advanced_getargspec
def _normalize_formats(func, returns, state, output, outer_kwargs):
"""
:param func:
:param returns:
:param state:
:param output:
:return:
"""
if returns is None:
assert isinstance(s... | 45.706897 | 245 | 0.654281 |
3398f6ec1581f5771c70be6f2c957063b40f8b10 | 2,472 | py | Python | robust_serial/utils.py | mitag/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 25 | 2018-10-07T13:37:48.000Z | 2022-03-25T07:28:11.000Z | robust_serial/utils.py | c0qu1/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 1 | 2019-07-10T00:58:33.000Z | 2019-07-10T08:42:39.000Z | robust_serial/utils.py | c0qu1/python-arduino-serial | 6beccc099167a21595c84286a973347a3a903cbd | [
"MIT"
] | 13 | 2018-10-07T11:53:07.000Z | 2021-05-23T12:41:29.000Z | from __future__ import print_function, division, absolute_import
import sys
import glob
try:
import queue
except ImportError:
import Queue as queue
import serial
# From https://stackoverflow.com/questions/6517953/clear-all-items-from-the-queue
class CustomQueue(queue.Queue):
"""
A custom queue subc... | 30.146341 | 106 | 0.641181 |
33990c05e774d65303fbef0b98e98307dcf75dab | 5,112 | py | Python | somaticseq/vcfModifier/modify_VarScan2.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | somaticseq/vcfModifier/modify_VarScan2.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | somaticseq/vcfModifier/modify_VarScan2.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
import sys, argparse, re
import somaticseq.genomicFileHandler.genomic_file_handlers as genome
def run():
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# Variant Call Type, i.e., snp or indel
parser.add_argument('-infile', '--input-vcf'... | 36 | 201 | 0.563185 |
339945677369fddacbf2dc58bbd5fb99859eb388 | 9,904 | py | Python | Allura/allura/model/session.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2017-07-31T23:13:58.000Z | 2017-07-31T23:13:58.000Z | Allura/allura/model/session.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/model/session.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 37.373585 | 96 | 0.632068 |
339947ded37f16d665c3dc7fcb68a076a0cebd8d | 5,909 | py | Python | tests/test_config.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | tests/test_config.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | """ run with
nosetests -v --nocapture
or
nosetests -v
"""
from __future__ import print_function
from cloudmesh.config.cm_config import cm_config_server
from cloudmesh.config.cm_config import cm_config
from cloudmesh_base.ConfigDict import ConfigDict
import json
import os
import warnings
from pprint import pprint
... | 27.483721 | 77 | 0.604163 |
33995f30ae05d7e5df5f7d3d16b5d400dbe1165e | 6,942 | py | Python | tempest/api/compute/servers/test_attach_interfaces.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/servers/test_attach_interfaces.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/api/compute/servers/test_attach_interfaces.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corp.
# 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... | 40.127168 | 78 | 0.622587 |
339970c67f8b4e207ab2caf917d1da6e2ea4978d | 4,009 | py | Python | alipay/aop/api/request/AlipayEbppMerchantExternalbillQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayEbppMerchantExternalbillQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayEbppMerchantExternalbillQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayEbppMerchantExternalbillQueryModel import AlipayEbppMerchantExternalbillQueryModel
class AlipayEbppMerchantExternalbillQueryRe... | 27.648276 | 148 | 0.648042 |
339978212e09e70ff600828d3e9675362fb79acb | 123 | py | Python | models/enums/__init__.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | null | null | null | models/enums/__init__.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | 40 | 2021-05-05T23:53:36.000Z | 2022-03-29T23:50:02.000Z | models/enums/__init__.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | 2 | 2021-12-13T17:51:20.000Z | 2022-02-23T22:46:57.000Z | # flake8: noqa
from models.enums.analysis import *
from models.enums.sample import *
from models.enums.sequencing import *
| 24.6 | 37 | 0.788618 |
339978fcc743c01165b74c9147a6a1a7b84f1791 | 5,174 | py | Python | teafacto/query/cfg.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 2 | 2016-06-28T23:41:42.000Z | 2017-01-14T12:41:36.000Z | teafacto/query/cfg.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 1 | 2016-04-20T20:09:20.000Z | 2016-08-17T19:02:47.000Z | teafacto/query/cfg.py | lukovnikov/teafacto | 5e863df8d061106ad705c0837f2d2ca4e08db0e4 | [
"MIT"
] | 5 | 2016-07-18T17:05:18.000Z | 2018-10-13T05:40:05.000Z | import re, numpy as np
class CFG(object):
def __init__(self):
self.rules = []
def __repr__(self):
return "CFG"
def __str__(self):
ret = "RULES=========\n"
ret += "\n".join(map(str, self.rules))
return ret
def parse_rules(self, s):
# rules must be of fo... | 32.955414 | 96 | 0.482026 |
3399bc04dc14dee41ebc7b7f6badede31c1f9c0e | 300 | py | Python | unit_tests/datafunctions.py | mpHarm88/lambdata | 8d0c8dbeda85f13193515222c0f6a882d974aa18 | [
"MIT"
] | null | null | null | unit_tests/datafunctions.py | mpHarm88/lambdata | 8d0c8dbeda85f13193515222c0f6a882d974aa18 | [
"MIT"
] | 3 | 2020-03-24T17:58:48.000Z | 2021-02-02T22:20:09.000Z | unit_tests/datafunctions.py | mpHarm88/lambdata | 8d0c8dbeda85f13193515222c0f6a882d974aa18 | [
"MIT"
] | null | null | null | """Writing functions to work witth arrays and strings"""
import string
import numpy as np
def increment(x):
"""ads one to x"""
return(x+1)
def strip_punctuation(text):
"""strips punctuation"""
exclude = string.punctuation
return ''.join(s for s in text if s not in exclude)
| 17.647059 | 56 | 0.67 |
3399c6b0bc833ed6f893e73a1b5b64768e329f53 | 9,215 | py | Python | test/dom/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/dom/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/dom/test_element.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | from TestSuite import EMPTY_NAMESPACE
def get_exception_name(code):
import types
from xml import dom
for (name,value) in vars(dom).items():
if (type(value) == types.IntType
and value == code):
return name
def test(tester):
tester.startGroup('Element')
tester.startTest(... | 32.108014 | 85 | 0.673142 |
339a256657db68dfb1e09d59cc7bbff89e20627d | 6,139 | py | Python | files/Utilities/AutoDMG.app/Contents/Resources/IEDAppVersionController.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/IEDAppVersionController.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | files/Utilities/AutoDMG.app/Contents/Resources/IEDAppVersionController.py | samdoran/ansible-role-macos-server | a401b8d10914fd6208e681b971204184e6fab7e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# IEDAppVersionController.py
# AutoDMG
#
# Created by Per Olofsson on 2013-10-31.
# Copyright 2013-2014 Per Olofsson, University of Gothenburg. All rights reserved.
#
from Foundation import *
from AppKit import *
from objc import IBAction, IBOutlet
from IEDLog import LogDebug, LogInfo, L... | 46.157895 | 127 | 0.581854 |
339a42bad2564fea7afefff86ed4a921ced49cc2 | 2,687 | py | Python | run.py | jiwoongim/ft-SNE | 4b5c368ee561c151f36cb25b654830bd38dc9a5b | [
"MIT"
] | 13 | 2018-09-19T10:49:27.000Z | 2020-07-14T20:59:37.000Z | run.py | jiwoongim/ft-SNE | 4b5c368ee561c151f36cb25b654830bd38dc9a5b | [
"MIT"
] | 3 | 2018-09-20T09:26:41.000Z | 2019-03-01T04:51:00.000Z | run.py | jiwoongim/ft-SNE | 4b5c368ee561c151f36cb25b654830bd38dc9a5b | [
"MIT"
] | null | null | null | import os, sys, gzip, pickle, cPickle, argparse
import matplotlib
matplotlib.use('Agg')
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import numpy as np
from tsne import tsne
from utils import unpickle, plot_map
from utils_sne import precision_K, K_neighbours
from sklearn.decomposition import PCA
RNG = ... | 29.206522 | 136 | 0.620767 |
339a5a0116f3deca225ffcb0215a4a087cb1e5d7 | 1,875 | py | Python | src/testing.py | jhuebotter/SpikingVAE | 8ef6171559542b8bc73bb2cc45ec90b5f6612ccd | [
"MIT"
] | 3 | 2021-05-12T01:24:43.000Z | 2021-09-29T15:36:38.000Z | src/testing.py | jhuebotter/SpikingVAE | 8ef6171559542b8bc73bb2cc45ec90b5f6612ccd | [
"MIT"
] | null | null | null | src/testing.py | jhuebotter/SpikingVAE | 8ef6171559542b8bc73bb2cc45ec90b5f6612ccd | [
"MIT"
] | null | null | null | from models.scnn_classifier import SpikingConvolutionalClassifier
import utils as u
# set important parameters
parser = u.get_argparser()
args = parser.parse_args()
args.loss = "mse"
args.dataset = "mnist"
args.hidden_sizes = [100]
args.conv_channels = "16, 32"
args.conv_channels = [int(item) for item in args.conv_cha... | 25 | 93 | 0.7216 |
339a8bb8dbcbc74e337a7927360786ce9b1dea17 | 813 | py | Python | tests/test_datasets/test_unconditional_image_dataset.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_datasets/test_unconditional_image_dataset.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tests/test_datasets/test_unconditional_image_dataset.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import os.path as osp
from mmgen.datasets import UnconditionalImageDataset
class TestUnconditionalImageDataset(object):
@classmethod
def setup_class(cls):
cls.imgs_root = osp.join(osp.dirname(__file__), '..', 'data/image')
cls.default_pipeline ... | 32.52 | 77 | 0.649446 |
339aa5068b05b5403108e71bea602bf315ab9e31 | 32,448 | py | Python | tests/dashbio_demos/dash-clustergram/app.py | brybackGMet/dash-bio | 31cc7828e26094c4c49b08374dc515ef25637834 | [
"MIT"
] | null | null | null | tests/dashbio_demos/dash-clustergram/app.py | brybackGMet/dash-bio | 31cc7828e26094c4c49b08374dc515ef25637834 | [
"MIT"
] | null | null | null | tests/dashbio_demos/dash-clustergram/app.py | brybackGMet/dash-bio | 31cc7828e26094c4c49b08374dc515ef25637834 | [
"MIT"
] | null | null | null | import base64
import os
import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
import dash_daq as daq
from dash_bio.utils import gene_expression_reader
import dash_bio
from layout_helper import run_standalone_app
DATAPATH = os.path.join(... | 36.214286 | 92 | 0.440767 |
339aab21708dc1c9e6c9f95dcf7286894cef5f6f | 419 | py | Python | Seeder/harvests/migrations/0006_auto_20190526_2040.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 8 | 2017-08-16T19:18:57.000Z | 2022-01-24T10:08:19.000Z | Seeder/harvests/migrations/0006_auto_20190526_2040.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 242 | 2017-02-03T19:15:52.000Z | 2022-03-25T08:02:52.000Z | Seeder/harvests/migrations/0006_auto_20190526_2040.py | WebarchivCZ/Seeder | 1958c5d3f6bdcbbdb2c81dcb6abc7f689125b6a8 | [
"MIT"
] | 2 | 2019-03-06T12:36:29.000Z | 2019-07-08T12:52:20.000Z | # Generated by Django 2.2 on 2019-05-26 20:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('harvests', '0005_harvest_archive_it'),
]
operations = [
migrations.AlterField(
model_name='harvest',
name='archive_it'... | 22.052632 | 79 | 0.620525 |
339ab7b4fb0bffb100fde96bfaab1f3e88a6b214 | 35,312 | py | Python | aerosandbox/geometry/airfoil/airfoil.py | opme/AeroSandbox | 309ae275387fca0bcf0a36a105ba761584318f35 | [
"MIT"
] | null | null | null | aerosandbox/geometry/airfoil/airfoil.py | opme/AeroSandbox | 309ae275387fca0bcf0a36a105ba761584318f35 | [
"MIT"
] | null | null | null | aerosandbox/geometry/airfoil/airfoil.py | opme/AeroSandbox | 309ae275387fca0bcf0a36a105ba761584318f35 | [
"MIT"
] | null | null | null | import aerosandbox.numpy as np
from aerosandbox import AeroSandboxObject
from aerosandbox.geometry.polygon import Polygon, stack_coordinates
from aerosandbox.geometry.airfoil.airfoil_families import get_NACA_coordinates, get_UIUC_coordinates, \
get_kulfan_coordinates, get_file_coordinates
from aerosandbox.geometry.... | 38.719298 | 146 | 0.533586 |
339ace62ab0babb7a23845c128d0e21a6688937a | 139 | py | Python | py/cidoc_crm_types/properties/p148i_is_component_of.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p148i_is_component_of.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | py/cidoc_crm_types/properties/p148i_is_component_of.py | minorg/cidoc-crm-types | 9018bdbf0658e4d28a87bc94543e467be45d8aa5 | [
"Apache-2.0"
] | null | null | null | from dataclasses import dataclass
@dataclass
class P148iIsComponentOf:
URI = "http://erlangen-crm.org/current/P148i_is_component_of"
| 19.857143 | 65 | 0.798561 |
339b0296379e29143ee1fb48b85c0daea883d6df | 1,389 | py | Python | extractor/parse.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | 2 | 2017-10-17T16:36:48.000Z | 2019-05-13T01:02:06.000Z | extractor/parse.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | extractor/parse.py | MITMotorsports/MY17_OneDayDAQ | cbf0c22d17a133042e3a7a4ee7fb2a7b601bf74d | [
"MIT"
] | null | null | null | import re
SI_MOD = {
'u' : 1e-6,
'm' : 1e-3,
'' : 1,
'k' : 1e3,
'K' : 1e3,
'M' : 1e6,
}
def frequency(freq):
'''
Extract frequency of CAN Message from spec.
'''
if isinstance(freq, (int, float)):
return freq
match = re.search(r'(\d\.*\d*)*([A-Za-z]*)', freq)
un... | 25.254545 | 72 | 0.544996 |
339b15f440232a3f5e07a9f52238e5690047689f | 167 | py | Python | setup.py | bingqingsuimeng/ctypesgen | 5ddc80e89abe8b02591a9baa1d857ce1f55bdee6 | [
"BSD-2-Clause"
] | 200 | 2015-05-12T03:02:39.000Z | 2021-08-10T23:24:44.000Z | setup.py | bingqingsuimeng/ctypesgen | 5ddc80e89abe8b02591a9baa1d857ce1f55bdee6 | [
"BSD-2-Clause"
] | 88 | 2015-05-11T15:49:11.000Z | 2021-08-19T22:02:12.000Z | setup.py | bingqingsuimeng/ctypesgen | 5ddc80e89abe8b02591a9baa1d857ce1f55bdee6 | [
"BSD-2-Clause"
] | 87 | 2015-05-11T19:09:51.000Z | 2021-08-19T17:11:07.000Z | #!/usr/bin/env python3
"""Examples:
setup.py sdist
setup.py bdist_wininst
"""
from setuptools import setup
if __name__ == "__main__":
setup()
| 11.928571 | 30 | 0.622754 |
339b339271d1b2b2eea60dfe86340076f1b67390 | 626 | py | Python | apps/iiif/manifests/migrations/0030_auto_20211018_1913.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 18 | 2017-06-12T09:58:02.000Z | 2021-10-01T11:14:34.000Z | apps/iiif/manifests/migrations/0030_auto_20211018_1913.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 276 | 2019-04-26T20:13:01.000Z | 2022-03-31T10:26:28.000Z | apps/iiif/manifests/migrations/0030_auto_20211018_1913.py | ecds/readux | 4eac8b48efef8126f4f2be28b5eb943c85a89c2e | [
"Apache-2.0"
] | 7 | 2018-03-13T23:44:26.000Z | 2021-09-15T17:54:55.000Z | # Generated by Django 2.2.24 on 2021-10-18 19:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('manifests', '0029_auto_20211012_1612'),
]
operations = [
migrations.AlterField(
model_name='manifest',
name='label'... | 26.083333 | 132 | 0.595847 |
339ba1802da537edb0c51a1661f18d3f29ab0774 | 277 | py | Python | modules/core/formats/__init__.py | nursix/DRKCM | 09328289ff721c416494398aa751ff99906327cb | [
"MIT"
] | 3 | 2022-01-26T08:07:54.000Z | 2022-03-21T21:53:52.000Z | modules/core/formats/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | modules/core/formats/__init__.py | nursix/eden-asp | e49f46cb6488918f8d5a163dcd5a900cd686978c | [
"MIT"
] | null | null | null | from .card import PDFCardWriter, PDFCardLayout
from .pdf import PDFWriter, EdenDocTemplate
from .shp import SHPWriter
from .svg import SVGWriter
from .xls import XLSWriter
from .xlsx import XLSXWriter, XLSXPivotTableWriter
from .xml import S3XML, S3EntityResolver, S3XMLFormat
| 34.625 | 53 | 0.837545 |
339ba50529d7e374a25ac3878d9a021b70d3558c | 241 | py | Python | examples/test_monitor.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | 2 | 2019-07-30T13:26:41.000Z | 2020-01-08T11:44:46.000Z | examples/test_monitor.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | null | null | null | examples/test_monitor.py | GetmeUK/swm | 4baad7e1eb2b6e763f89be353ce199414731f07e | [
"MIT"
] | null | null | null | import json
import redis
from swm.monitors import get_tasks, get_workers
from shared import MyTask, MyWorker
if __name__ == '__main__':
conn = redis.Redis()
print(get_tasks(conn, MyTask))
print(get_workers(conn, MyWorker))
| 16.066667 | 47 | 0.73029 |
339baad3f2e72f3b902237e9b2ebb417baee1fd9 | 2,101 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/contacts/block.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/contacts/block.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/contacts/block.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.180556 | 103 | 0.608282 |
339bac09a9177436fefde9bfafa79b99b9299497 | 1,836 | py | Python | converters/jmm/convert-jareds.py | review/logger-py | 9d51d78abc89bbc6d1503b66b84da995e1b48bb8 | [
"MIT"
] | 1 | 2021-02-26T15:42:02.000Z | 2021-02-26T15:42:02.000Z | converters/jmm/convert-jareds.py | review/logger-py | 9d51d78abc89bbc6d1503b66b84da995e1b48bb8 | [
"MIT"
] | null | null | null | converters/jmm/convert-jareds.py | review/logger-py | 9d51d78abc89bbc6d1503b66b84da995e1b48bb8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import sys
animation_filename = sys.argv[1]
with open(animation_filename, 'r') as animation_file:
animation_data = animation_file.readlines()
json_data = {}
json_data['timeStep'] = float(animation_data[2])
json_data['name'] = "Jared's Animation"
num_box = int(sys.argv[2])
nu... | 25.859155 | 82 | 0.581155 |
339bb3f4fd145e5e55eb5aec7919267e0407377c | 18,213 | py | Python | ev3sim/attach.py | platy11/ev3sim | df8693523f630e9838b8f79f2b7017a86633d696 | [
"BSD-3-Clause"
] | null | null | null | ev3sim/attach.py | platy11/ev3sim | df8693523f630e9838b8f79f2b7017a86633d696 | [
"BSD-3-Clause"
] | null | null | null | ev3sim/attach.py | platy11/ev3sim | df8693523f630e9838b8f79f2b7017a86633d696 | [
"BSD-3-Clause"
] | null | null | null | def main():
import sys
import logging
import grpc
import ev3sim.simulation.comm_schema_pb2
import ev3sim.simulation.comm_schema_pb2_grpc
import json
import time
import argparse
from unittest import mock
from queue import Queue
parser = argparse.ArgumentParser(description='At... | 47.183938 | 232 | 0.504145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.