text stringlengths 28 881k |
|---|
from dalek_debug import DalekPrint, DalekDebugOn , DalekDebugSetOutputDeviceNEWLINEimport timeNEWLINEimport dalek_spiNEWLINEimport RPi.GPIO as GPIO # Import GPIO diversNEWLINEdalek_spi.init()NEWLINENEWLINENEWLINE#####################################################NEWLINENEWLINE# This is just for playing with the ... |
# coding=utf-8NEWLINE"""NEWLINEAplicações distribuídas - Projeto 3 - client.pyNEWLINEGrupo: 20NEWLINEAlunos: 43551 45802 43304NEWLINE"""NEWLINEimport json, requests, pprint, signal, subprocess, webbrowser, sys, hashlibNEWLINENEWLINENEWLINENEWLINEactions = ["ADD", "SHOW", "REMOVE", "UPDATE"]NEWLINEgenero = ["pop", "rock... |
"""NEWLINEUse this module directly:NEWLINE import xarray.plot as xpltNEWLINENEWLINEOr use the methods on a DataArray:NEWLINE DataArray.plot._____NEWLINE"""NEWLINEimport functoolsNEWLINENEWLINEimport numpy as npNEWLINEimport pandas as pdNEWLINENEWLINEfrom .facetgrid import _easy_facetgridNEWLINEfrom .utils import ... |
"""NEWLINESprite Collect CoinsNEWLINENEWLINESimple program to show basic sprite usage.NEWLINENEWLINEArtwork from http://kenney.nlNEWLINE"""NEWLINEimport randomNEWLINEimport arcadeNEWLINENEWLINESPRITE_SCALING = 0.5NEWLINENEWLINESCREEN_WIDTH = 800NEWLINESCREEN_HEIGHT = 600NEWLINENEWLINEwindow = NoneNEWLINENEWLINENEWLINEc... |
import osNEWLINENEWLINEfrom celery import CeleryNEWLINENEWLINE# set the default Django settings module for the 'celery' program.NEWLINEos.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")NEWLINENEWLINEapp = Celery("finance_api")NEWLINENEWLINE# Using a string here means the worker doesn't have to ser... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE convertapiNEWLINENEWLINE Convert API lets you effortlessly convert file formats and types. # noqa: E501NEWLINENEWLINE OpenAPI spec version: v1NEWLINE NEWLINE Generated by: https://github.com/swagger-api/swagger-codegen.gitNEWLINE"""NEWLINENEWLINENEWLINEimport ppri... |
"""NEWLINEUnit Test ConfigurationNEWLINE"""NEWLINEimport loggingNEWLINEimport osNEWLINEimport sqlite3NEWLINENEWLINEfrom test.common.utilities import get_mock_qboNEWLINENEWLINEimport pytestNEWLINEfrom qbo_db_connector import QuickbooksExtractConnector, QuickbooksLoadConnectorNEWLINENEWLINElogger = logging.getLogger(__na... |
"""NEWLINEMIT LicenseNEWLINENEWLINECopyright (c) 2020-present phenom4n4nNEWLINENEWLINEPermission is hereby granted, free of charge, to any person obtaining a copyNEWLINEof this software and associated documentation files (the "Software"), to dealNEWLINEin the Software without restriction, including without limitation t... |
#NEWLINE# This file is part of pysnmp software.NEWLINE#NEWLINE# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>NEWLINE# License: http://snmplabs.com/pysnmp/license.htmlNEWLINE#NEWLINEimport randomNEWLINEfrom hashlib import md5NEWLINEfrom hashlib import sha1NEWLINENEWLINEtry:NEWLINE from pysnmpcrypto import... |
from rest_framework import routersNEWLINENEWLINEfrom api.transaction.viewsets import TransactionViewSetNEWLINENEWLINErouter = routers.SimpleRouter(trailing_slash=False)NEWLINENEWLINErouter.register('', TransactionViewSet, basename='transactions')NEWLINENEWLINEurlpatterns = [NEWLINE *router.urls,NEWLINE]NEWLINE |
# Copyright (c) Facebook, Inc. and its affiliates.NEWLINENEWLINEimport numpy as npNEWLINEfrom typing import Dict, List, OptionalNEWLINEimport fvcore.nn.weight_init as weight_initNEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINEfrom torch.nn import functional as FNEWLINENEWLINEfrom detectron2.layers import Conv2d, ... |
# This file is part of the Astrometry.net suite.NEWLINE# Licensed under a 3-clause BSD style license - see LICENSENEWLINENEWLINE# Generates FITS tables from CSV lists of OpenNGC entries and names.NEWLINENEWLINEfrom __future__ import print_functionNEWLINENEWLINEimport csvNEWLINENEWLINEfrom astrometry.util.fits import fi... |
from __future__ import unicode_literalsNEWLINENEWLINEfrom decimal import DecimalNEWLINEimport jsonNEWLINEimport loggingNEWLINEfrom urllib.request import urlopenNEWLINENEWLINEfrom django.core.exceptions import ImproperlyConfiguredNEWLINENEWLINEfrom dj_currencies.sources import CurrencyDataExchangeSourceNEWLINEfrom .exce... |
from ..util import ormNEWLINENEWLINEasync def insert_spoiler_race(srl_id, spoiler_url, studytime=900):NEWLINE await orm.execute(NEWLINE 'INSERT INTO spoiler_races(srl_id, spoiler_url, studytime) VALUES (%s,%s,%s);',NEWLINE [srl_id, spoiler_url, studytime]NEWLINE )NEWLINENEWLINEasync def delete_spoil... |
#! /usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINEfrom collections import OrderedDictNEWLINENEWLINEimport numpy as npNEWLINEfrom landlab import RasterModelGridNEWLINEfrom landlab.bmi.bmi_bridge import TimeStepperNEWLINENEWLINEfrom compaction.landlab import CompactNEWLINENEWLINEfrom .bathymetry import Bathymetr... |
#!python3NEWLINE#encoding: utf-8NEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINEimport os.pathNEWLINE"""NEWLINEBeautifulSoupでは擬似クラスはnth-of-typeしか実装されていないらしい。NEWLINENotImplementedError: Only the following pseudo-classes are implemented: nth-of-type.NEWLINEここではその代わりとなる関数を実装する。NEWLINE"""NEWLINEclass CssPs... |
from __future__ import print_functionNEWLINEimport unittestNEWLINEimport SimPEG.daskNEWLINEfrom SimPEG import (NEWLINE directives,NEWLINE maps,NEWLINE inverse_problem,NEWLINE optimization,NEWLINE data_misfit,NEWLINE inversion,NEWLINE utils,NEWLINE regularization,NEWLINE)NEWLINENEWLINEfrom discre... |
from hs.entities.cluster_config import ClusterConfigNEWLINEimport pytestNEWLINENEWLINE@pytest.mark.xfailNEWLINEdef test_config_read_failed():NEWLINE d = {NEWLINE 'aaaaa': 'failed'NEWLINE }NEWLINE ClusterConfig.deserialize(d)NEWLINENEWLINEdef test_config_read_successful():NEWLINE d = {NEWLINE "... |
# Lint as: python3NEWLINENEWLINE# Copyright 2020 Google LLC.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENS... |
import asyncioNEWLINEimport ioNEWLINENEWLINEimport discordNEWLINEfrom asyncpg.pool import PoolNEWLINEfrom discord.ext import commandsNEWLINENEWLINEfrom utils.db.cache import BotCacheNEWLINEfrom utils.ext import standards as stdNEWLINENEWLINENEWLINEclass Context(commands.Context):NEWLINE def __init__(self, **kwargs):... |
"""PyTest cases related to the integration between FERC1 & EIA 860/923."""NEWLINEimport loggingNEWLINENEWLINEimport pytestNEWLINENEWLINEimport pudlNEWLINENEWLINElogger = logging.getLogger(__name__)NEWLINENEWLINENEWLINE@pytest.fixture(scope="module")NEWLINEdef fast_out(pudl_engine, pudl_datastore_fixture):NEWLINE """... |
from __future__ import absolute_import, division, print_functionNEWLINENEWLINEimport base64NEWLINEfrom collections import defaultdictNEWLINEimport contextlibNEWLINEimport fnmatchNEWLINEfrom glob2 import globNEWLINEimport jsonNEWLINEfrom locale import getpreferredencodingNEWLINEimport loggingNEWLINEimport logging.config... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE SendinBlue APINEWLINENEWLINE SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You ... |
import numpy as npNEWLINEimport unittestNEWLINEimport sysNEWLINEsys.path.append("tests/python")NEWLINE# Don't import the test class, otherwise they will run twice.NEWLINEimport test_interaction_constraints as test_icNEWLINErng = np.random.RandomState(1994)NEWLINENEWLINENEWLINEclass TestGPUInteractionConstraints(unittes... |
#!/usr/bin/pythonNEWLINE#NEWLINE# Copyright: Ansible ProjectNEWLINE# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)NEWLINENEWLINEfrom __future__ import absolute_import, division, print_functionNEWLINE__metaclass__ = typeNEWLINENEWLINEANSIBLE_METADATA = {'metadata_version': '1... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE Home Connect APINEWLINENEWLINE This API provides access to home appliances enabled by Home Connect (https://home-connect.com). Through the API programs can be started and stopped, or home appliances configured and monitored. For instance, you can start a cotton program on a... |
# coding: utf-8NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom .adobepass import AdobePassIENEWLINEfrom ..utils import (NEWLINE extract_attributes,NEWLINE update_url_query,NEWLINE smuggle_url,NEWLINE)NEWLINENEWLINENEWLINEclass SproutIE(AdobePassIE):NEWLINE _VALID_URL = r'https?://(?:www\.)?... |
# Copyright (c) 2013 The Chromium Authors. All rights reserved.NEWLINE# Use of this source code is governed by a BSD-style license that can beNEWLINE# found in the LICENSE file.NEWLINENEWLINE"""Parses the command line, discovers the appropriate tests, and runs them.NEWLINENEWLINEHandles test configuration, but all the ... |
from collections import OrderedDictNEWLINEfrom typing import ListNEWLINEfrom typing import OptionalNEWLINENEWLINEimport optunaNEWLINEfrom optuna.distributions import BaseDistributionNEWLINEfrom optuna.distributions import CategoricalDistributionNEWLINEfrom optuna.distributions import DiscreteUniformDistributionNEWLINEf... |
#!/usr/bin/env python2NEWLINEimport numpy as npNEWLINEimport path_parserNEWLINEfrom mpl_toolkits.mplot3d import Axes3DNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom matplotlib import cmNEWLINEfrom matplotlib.ticker import LinearLocator, FormatStrFormatterNEWLINEfrom scipy.spatial import KDTreeNEWLINEruta='sample_map... |
from __future__ import unicode_literalsNEWLINENEWLINEfrom decimal import DecimalNEWLINEimport jsonNEWLINEimport loggingNEWLINEfrom urllib.request import urlopenNEWLINENEWLINEfrom django.core.exceptions import ImproperlyConfiguredNEWLINENEWLINEfrom dj_currencies.sources import CurrencyDataExchangeSourceNEWLINEfrom .exce... |
import asyncioNEWLINENEWLINEfrom unittest.mock import patch, MagicMockNEWLINENEWLINEfrom icap import ICAPRequest, HeadersDict, handlerNEWLINEfrom icap.session import make_session_id, should_finalize_session, get_session, SessionStorageNEWLINEfrom icap.criteria import _HANDLERSNEWLINENEWLINENEWLINEdef test_make_session_... |
import osNEWLINEimport shutilNEWLINEimport unittestNEWLINEfrom xbrr.edinet.client.document_client import DocumentClientNEWLINEfrom xbrr.edinet.reader.doc import DocNEWLINENEWLINENEWLINEclass TestDoc(unittest.TestCase):NEWLINENEWLINE @classmethodNEWLINE def setUpClass(cls):NEWLINE cls._dir = os.path.join(os... |
import thulacNEWLINEfrom py2neo import Graph,Node,Relationship,NodeMatcherNEWLINENEWLINENEWLINE# print(cut_text)NEWLINEentity_dict = {}NEWLINEentity_type_dict = {}NEWLINEdef init():NEWLINE with open("entity.txt","r",encoding="utf-8") as f:NEWLINE for line in f.readlines():NEWLINE line = line.strip(... |
from django.shortcuts import renderNEWLINEfrom django.contrib.auth.models import UserNEWLINEfrom django.http import Http404NEWLINEfrom django.views.generic import DetailViewNEWLINEfrom django.contrib.auth.decorators import login_requiredNEWLINEfrom django.utils.decorators import method_decoratorNEWLINEfrom django.short... |
class Solution:NEWLINE def solve(self, matrix):NEWLINE if not matrix:NEWLINE return -1NEWLINE NEWLINE sets = [set(row) for row in matrix]NEWLINE return next((num for num in matrix[0] if all(num in row for row in matrix)), -1)NEWLINE |
import jsonNEWLINEimport os.pathNEWLINENEWLINEclass Inventory:NEWLINE pets = {}NEWLINENEWLINE def __init__(self) -> None:NEWLINE self.load()NEWLINENEWLINE def add(self, key , qty):NEWLINE q = 0NEWLINE if key in self.pets: # test to make sure key existNEWLINE v = self.pets[key]NE... |
# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu) and Wei Dong (weidong@andrew.cmu.edu)NEWLINE#NEWLINE# Please cite the following papers if you use any part of the code.NEWLINE# - Christopher Choy, Wei Dong, Vladlen Koltun, Deep Global Registration, CVPR 2020NEWLINE# - Christopher Choy, Jaesik Park, Vladlen Koltun... |
# vim: set et sw=4 sts=4 fileencoding=utf-8:NEWLINE#NEWLINE# Raspberry Pi Sense HAT Emulator library for the Raspberry PiNEWLINE# Copyright (c) 2016 Raspberry Pi Foundation <info@raspberrypi.org>NEWLINE#NEWLINE# This package is free software; you can redistribute it and/or modify it underNEWLINE# the terms of the GNU L... |
import spacyNEWLINEfrom spacy import symbolsNEWLINENEWLINEclass SentenceAnalyzer:NEWLINE '''NEWLINE Class for analyzing sentence structure and extracting key informationNEWLINE '''NEWLINENEWLINE def __init__(self):NEWLINE self.nlp = spacy.load('en_core_web_sm')NEWLINE NEWLINE #TODO method for c... |
from ast import BitAndNEWLINEimport importlibNEWLINEfrom cmath import cos, exp, log, log10, pi, sinNEWLINEimport matplotlib.pyplot as mpltNEWLINENEWLINE##################### ##################### #####################NEWLINE##################### ##################### #####################NEWLINENEWLINETWOPI = 2.0 * piN... |
# -*- coding: utf-8 -*-NEWLINEimport osNEWLINEimport sysNEWLINENEWLINEcmd = 'coverage run `which djangocms-helper` aldryn_boilerplates test --cms --extra-settings=test_settings'NEWLINENEWLINEsys.exit(os.system(cmd))NEWLINE |
# Copyright (c) 2015 OpenStack FoundationNEWLINE# All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License"); you mayNEWLINE# not use this file except in compliance with the License. You may obtainNEWLINE# a copy of the License atNEWLINE#NEWLINE# http://www.apac... |
from src.interfacing.ogs.connect import AuthenticationNEWLINEimport codecsNEWLINEimport sysNEWLINEimport osNEWLINEfrom time import sleepNEWLINENEWLINEdef loadList(pNameFile): NEWLINE iList = []NEWLINE with codecs.open(pNameFile, "r", "utf-8") as f:NEWLINE for line in f:NEWLINE iList.append(lin... |
'''NEWLINECreated on May 1, 2015NEWLINENEWLINE@author: zwickerNEWLINE'''NEWLINENEWLINEfrom __future__ import division, absolute_importNEWLINENEWLINEimport numpy as npNEWLINEfrom six.moves import rangeNEWLINENEWLINEfrom .lib_exp_base import LibraryExponentialBaseNEWLINEfrom ..library_numeric_base import LibraryNumericMi... |
import ioNEWLINEimport jsonNEWLINEimport unittestNEWLINEimport tempfileNEWLINEfrom base64 import b64encodeNEWLINENEWLINEfrom ukbrest import appNEWLINEimport pandas as pdNEWLINENEWLINEfrom tests.settings import POSTGRESQL_ENGINENEWLINEfrom tests.utils import get_repository_path, DBTestNEWLINEfrom ukbrest.common.pheno2sq... |
# @copyright@NEWLINE# Copyright (c) 2006 - 2018 TeradataNEWLINE# All rights reserved. Stacki(r) v5.x stacki.comNEWLINE# https://github.com/Teradata/stacki/blob/master/LICENSE.txtNEWLINE# @copyright@NEWLINENEWLINEimport stack.commandsNEWLINEfrom stack.exception import ArgRequired, ArgUnique, CommandErrorNEWLINENEWLINENE... |
# -*- coding: utf-8 -*-NEWLINENEWLINE# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:NEWLINE# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-codeNEWLINENEWLINEfrom ccxt.kucoin import kucoinNEWLINEfrom ccxt.base.errors import AuthenticationErrorNEWLINEfrom ccxt.base.er... |
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root for license information.NEWLINE# Code generated by Microsoft (R) AutoRest Code G... |
"""NEWLINEUnionFind.pyNEWLINENEWLINESource: http://www.ics.uci.edu/~eppstein/PADS/UnionFind.pyNEWLINENEWLINEUnion-find data structure. Based on Josiah Carlson's code,NEWLINEhttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/215912NEWLINEwith significant additional changes by D. Eppstein.NEWLINE"""NEWLINENEWLINEfro... |
import sysNEWLINEimport osNEWLINEsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))NEWLINENEWLINEimport coreNEWLINE |
import numpy as npNEWLINENEWLINEfrom ._points_utils import points_in_boxNEWLINENEWLINENEWLINEdef select(layer, event):NEWLINE """Select points.NEWLINENEWLINE Clicking on a point will select that point. If holding shift while clickingNEWLINE that point will be added to or removed from the existing selectionNEWL... |
from unittest import mockNEWLINENEWLINEimport pytestNEWLINENEWLINEfrom bgmi.lib.models import Bangumi, Filter, FollowedNEWLINEfrom bgmi.main import mainNEWLINEfrom bgmi.website.bangumi_moe import BangumiMoeNEWLINENEWLINENEWLINEdef test_gen_nginx_conf():NEWLINE main("gen nginx.conf --server-name _".split())NEWLINENEW... |
"""NEWLINE``cotk.metrics`` provides classes and functions evaluating results of models.NEWLINEIt provides a fair metric for every model.NEWLINE"""NEWLINEfrom typing import Any, List, DictNEWLINEimport hashlibNEWLINENEWLINEfrom .._utils.unordered_hash import UnorderedSha256, dumpsNEWLINEfrom .._utils.metaclass import Lo... |
"""Log consumers are responsible for fetching chia logsNEWLINEand propagating them to subscribers for further handling.NEWLINENEWLINEThis abstraction should provide an easy ability to switch betweenNEWLINElocal file reader and fetching logs from a remote machine.NEWLINEThe latter has not been implemented yet. Feel free... |
from dataclasses import dataclass, asdictNEWLINEfrom typing import ListNEWLINENEWLINEfrom bson import ObjectIdNEWLINEfrom passlib.hash import pbkdf2_sha256 as sha256NEWLINEfrom pymongo.database import DatabaseNEWLINENEWLINEfrom app import dbNEWLINEdb: DatabaseNEWLINENEWLINENEWLINE@dataclassNEWLINEclass UserModel:NEWLIN... |
# -*- coding: utf-8 -*-NEWLINENEWLINEimport osNEWLINEimport timeNEWLINEimport waveNEWLINEfrom Queue import QueueNEWLINEfrom threading import ThreadNEWLINENEWLINEfrom bottle import route, run, request, static_file, viewNEWLINENEWLINEfrom recognition import recognizeNEWLINEfrom textlogger import add_log, get_logsNEWLINEN... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Tue Dec 13 01:25:12 2017NEWLINEComplete document analysis:NEWLINE1) Fuzzy String compare for file similarityNEWLINE2) Word frequency counterNEWLINE3) Phrase frequency counterNEWLINE@author: MStattelmanNEWLINE"""NEWLINENEWLINE#ImportsNEWLINEimport pandas as pdNEWLINEimp... |
import osNEWLINEimport reNEWLINEfrom collections import defaultdictNEWLINEfrom dataclasses import dataclassNEWLINEfrom typing import Dict, SetNEWLINENEWLINEimport easyargsNEWLINEfrom colorama import Fore, StyleNEWLINEfrom javalang import parse as parserNEWLINEfrom javalang.parser import JavaSyntaxErrorNEWLINEfrom javal... |
# Generated by Django 3.2.4 on 2021-06-06 05:11NEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE (... |
#NEWLINE# Copyright (c) 2021 Citrix Systems, Inc.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License")NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICENSE-2.0... |
from Node import NodeNEWLINEfrom shutil import rmtreeNEWLINE# from config_creator import create_file_structureNEWLINEfrom sesamutils import sesam_loggerNEWLINEfrom os import mkdirNEWLINEfrom git import RepoNEWLINEimport subprocessNEWLINEfrom json import dumps as dump_jsonNEWLINENEWLINENEWLINEclass Gitter:NEWLINE def... |
# Generated by Django 3.2.4 on 2021-06-18 02:41NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.CreateModel(NEWLINE ... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# @Time : 2019/8/9 11:00NEWLINE# @Author : BaijbNEWLINENEWLINE"""NEWLINE demoProject 的web服务器(异步io处理高并发访问,使用单线程及协程处理)NEWLINE ---路径映射(web.Application 中 ) 和 视图处理器(jinja2)NEWLINE 1、生成数据连接池NEWLINE 2、生成web服务器对象(设置 middlewares(类似拦截器) 日志处理,返回值处理)NEWL... |
"""NEWLINE :codeauthor: Megan Wilhite<mwilhite@saltstack.com>NEWLINE"""NEWLINENEWLINENEWLINEimport pytestNEWLINEimport salt.modules.mac_service as mac_serviceNEWLINEfrom salt.exceptions import CommandExecutionErrorNEWLINEfrom tests.support.mixins import LoaderModuleMockMixinNEWLINEfrom tests.support.mock import Magi... |
import sysNEWLINEimport numpy as npNEWLINEfrom acd.util import tiling_2d as tilingNEWLINEfrom acd.scores.cd import cd, cd_textNEWLINEfrom skimage import measure # for connected componentsNEWLINEfrom math import ceilNEWLINEfrom scipy.signal import convolve2dNEWLINEfrom copy import deepcopyNEWLINEfrom acd.scores import ... |
# pylint: disable=too-many-lines,redefined-outer-nameNEWLINEimport enumNEWLINEimport osNEWLINEimport sysNEWLINEimport tracebackNEWLINEfrom collections import defaultdictNEWLINEfrom enum import EnumNEWLINEfrom queue import QueueNEWLINEfrom typing import Any, Callable, Dict, Generator, Iterable, List, NoReturn, Optional,... |
import osNEWLINEimport timeNEWLINEfrom pathlib import PathNEWLINEimport loggingNEWLINENEWLINEimport casperlabs_clientNEWLINEfrom casperlabs_client.abi import ABINEWLINENEWLINEBASE_PATH = Path(os.path.dirname(os.path.abspath(__file__))).parentNEWLINEERC20_WASM = f"{BASE_PATH}/execution-engine/target/wasm32-unknown-unkno... |
import networkxNEWLINEimport reNEWLINEfrom konlpy.tag import Mecab,OktNEWLINEimport mathNEWLINEimport pandas as pdNEWLINEfrom tqdm import tqdmNEWLINENEWLINE# Textrank 요약NEWLINEclass TextRank:NEWLINE def __init__(self, **kargs):NEWLINE self.graph = NoneNEWLINE self.window = kargs.get('window', 5)NEWLINE... |
'''define the config file for voc and resnet50os8'''NEWLINEfrom .base_cfg import *NEWLINENEWLINENEWLINE# modify dataset configNEWLINEDATASET_CFG = DATASET_CFG.copy()NEWLINEDATASET_CFG['train'].update(NEWLINE {NEWLINE 'type': 'voc',NEWLINE 'set': 'trainaug',NEWLINE 'rootdir': 'data/VOCdevkit/VOC2... |
from django.views.decorators.csrf import csrf_exemptNEWLINEfrom django.shortcuts import renderNEWLINEfrom django.http import JsonResponseNEWLINEfrom backend.models import users,interviewer,interviewee,hr,play,interview,position,applyNEWLINEfrom django.views.decorators.csrf import csrf_protectNEWLINEfrom django.db.model... |
class RadixSort:NEWLINE def __init__(self, arr):NEWLINE self.arr = arrNEWLINENEWLINE def _count_sort(self, exp):NEWLINE n = len(self.arr)NEWLINE sorted_arr = [0] * (n)NEWLINE count_arr = [0] * (10)NEWLINE for i in range(n):NEWLINE index = int(self.arr[i]/exp)NEWLINE ... |
_base_ = './mask_rcnn_r101_fpn_1x_coco.py'NEWLINEmodel = dict(NEWLINE pretrained='open-mmlab://resnext101_32x4d',NEWLINE backbone=dict(NEWLINE type='ResNeXt',NEWLINE depth=101,NEWLINE groups=32,NEWLINE base_width=4,NEWLINE num_stages=4,NEWLINE out_indices=(0, 1, 2, 3),NEW... |
import socketNEWLINENEWLINEdef Server(host="127.0.0.1",porta=8585):NEWLINE """NEWLINE -> Servido TCPNEWLINE :param host: Ip para o ServidoNEWLINE :param porta: Porta de ComunicaçãoNEWLINE :return: NoneNEWLINE """NEWLINE s = socket.socket(socket.AF_INET, socket.SOCK_STREA... |
"""NEWLINEGiven a Singly Linked-List, implement a method to insert a node at a specific position.NEWLINEIf the given position is greater than the list size, simply insert the node at the end.NEWLINENEWLINEExample:NEWLINEGiven 1->2->3,NEWLINENEWLINEinsert_at_pos(data,position) :NEWLINEinsert_at_pos(4,2) ==> 1->4->2->3NE... |
import osNEWLINEimport reNEWLINEimport shutilNEWLINEimport subprocessNEWLINEimport jsonNEWLINENEWLINEfrom core.python import help_textNEWLINEfrom core.python.python_terraform import IsNotFlaggedNEWLINEfrom core.python.utils import PatchedTerraform as TerraformNEWLINEfrom core.python.utils import (NEWLINE check_own_i... |
# -*- coding: utf-8 -*-NEWLINE"""NEWLINE 'accounts' resource and schema settings.NEWLINENEWLINE :copyright: (c) 2014 by Nicola Iarocci and CIR2000.NEWLINE :license: BSD, see LICENSE for more details.NEWLINE"""NEWLINEfrom common import base_schema, required_stringNEWLINENEWLINE_schema = {NEWLINE 'u': require... |
import osNEWLINEimport pandas as pdNEWLINENEWLINEfrom plotly import toolsNEWLINEimport plotly.graph_objs as goNEWLINEimport plotly.offline as offlineNEWLINEfrom matplotlib import colorsNEWLINENEWLINEoffline.init_notebook_mode()NEWLINENEWLINEcolor = {NEWLINE "acaes": "brown",NEWLINE "cavern-acaes": "brown",NEWLINE... |
# Import modelsNEWLINEfrom ..models import InputComputeGmx, OutputComputeGmxNEWLINEfrom cmselemental.util.decorators import classpropertyNEWLINENEWLINE# Import componentsNEWLINEfrom mmic_cmd.components import CmdComponentNEWLINEfrom mmic.components.blueprints import GenericComponentNEWLINENEWLINEfrom typing import Dict... |
"""NEWLINESprite Collect CoinsNEWLINENEWLINESimple program to show basic sprite usage.NEWLINENEWLINEArtwork from http://kenney.nlNEWLINE"""NEWLINEimport randomNEWLINEimport arcadeNEWLINENEWLINESPRITE_SCALING = 0.5NEWLINENEWLINESCREEN_WIDTH = 800NEWLINESCREEN_HEIGHT = 600NEWLINENEWLINEwindow = NoneNEWLINENEWLINENEWLINEc... |
import numpy as npNEWLINEimport unittestNEWLINENEWLINEimport chainerNEWLINEfrom chainer import optimizersNEWLINEfrom chainer import testingNEWLINEfrom chainer.testing import attrNEWLINENEWLINEfrom chainercv.links.model.ssd import GradientScalingNEWLINENEWLINENEWLINEclass SimpleLink(chainer.Link):NEWLINENEWLINE def _... |
import osNEWLINEimport sysNEWLINEimport pickleNEWLINEimport copyNEWLINEimport warningsNEWLINEimport platformNEWLINEimport textwrapNEWLINEimport globNEWLINEfrom os.path import joinNEWLINENEWLINEfrom numpy.distutils import logNEWLINEfrom distutils.dep_util import newerNEWLINEfrom sysconfig import get_config_varNEWLINEfro... |
"""NEWLINEModule: 'ujson' on micropython-v1.15-esp8266NEWLINE"""NEWLINE# MCU: {'ver': 'v1.15', 'port': 'esp8266', 'arch': 'xtensa', 'sysname': 'esp8266', 'release': '1.15', 'name': 'micropython', 'mpy': 9733, 'version': '1.15', 'machine': 'ESP module with ESP8266', 'build': '', 'nodename': 'esp8266', 'platform': 'esp82... |
###############################################################################NEWLINE# Copyright Kitware Inc. and ContributorsNEWLINE# Distributed under the Apache License, 2.0 (apache.org/licenses/LICENSE-2.0)NEWLINE# See accompanying Copyright.txt and LICENSE files for detailsNEWLINE#################################... |
"""Set up the Python API for dingz devices."""NEWLINEimport osNEWLINENEWLINEimport sysNEWLINENEWLINEfrom setuptools import setup, find_packagesNEWLINENEWLINEhere = os.path.abspath(os.path.dirname(__file__))NEWLINENEWLINEwith open(os.path.join(here, "README.rst"), encoding="utf-8") as readme:NEWLINE long_description ... |
# -*- coding: utf-8 -*-NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEimport datetimeNEWLINEimport decimalNEWLINENEWLINEfrom django.template.defaultfilters import *NEWLINEfrom django.test import TestCaseNEWLINEfrom django.utils import sixNEWLINEfrom django.utils import unittest, translationNEWLINEfrom djan... |
# -*- coding: utf-8 -*-NEWLINENEWLINE'''NEWLINE**Wavelet Based in CUSUM control chart for filtering signals Project (module**NEWLINE``statsWaveletFilt.miscellaneous`` **):** A Miscellaneous of functions forNEWLINEwork with data and show wavelet coefficientsNEWLINENEWLINE*Created by Tiarles Guterres, 2018*NEWLINE'''NEWL... |
#!/usr/bin/env python3NEWLINENEWLINEimport osNEWLINEimport jsonNEWLINENEWLINE# print("Content-Type: application/json")NEWLINE# print()NEWLINE# print(json.dumps(dict(os.environ), indent=2))NEWLINENEWLINEprint("Content-Type: text/html")NEWLINEprint()NEWLINEprint(f"<p>QUERY_STRING={os.environ['QUERY_STRING']}")NEWLINEprin... |
def read():NEWLINE numbers = []NEWLINE with open('./docs/numbers.txt', 'r', encoding='utf-8') as f:NEWLINE for line in f:NEWLINE numbers.append(int(line))NEWLINE print(numbers)NEWLINENEWLINEdef write():NEWLINE names = ['Jesús', 'Facundo', 'Miguel', 'Christian', 'Adal', 'Karol', 'Nicolás']NEWLINE with open(... |
import sysNEWLINEimport importlib.resourcesNEWLINEimport pickleNEWLINEimport argparseNEWLINEimport reNEWLINEfrom contextlib import contextmanagerNEWLINEfrom collections import CounterNEWLINEfrom apycula import chipdbNEWLINENEWLINEclass Bba(object):NEWLINENEWLINE def __init__(self, file):NEWLINE self.file = fi... |
from django.conf.urls import urlNEWLINENEWLINEfrom .views import ImageDetail, ImageListNEWLINENEWLINENEWLINEurlpatterns = [NEWLINE url(r'^(?P<pk>\d+)/$', ImageDetail.as_view(), name='image-detail'),NEWLINE url(r'^(?P<gallery_ct>[a-z]+)/(?P<gallery_id>\d+)/$', ImageList.as_view(), name='image-list'),NEWLINE]NEWLIN... |
# Generated by Django 2.1 on 2019-09-24 20:31NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('authentication', '0001_initial'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AlterFie... |
from __future__ import absolute_importNEWLINENEWLINEimport osNEWLINEimport reNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.template import TemplateDoesNotExistNEWLINEfrom django.template.loaders import cachedNEWLINENEWLINEfrom pypugjs.utils import processNEWLINEfrom .compiler import CompilerNEWLINENE... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.NEWLINE#NEWLINE# Licensed under the Apache License, Version 2.0 (the "License");NEWLINE# you may not use this file except in compliance with the License.NEWLINE# You may obtain a copy of the License atNEWLINE#NEWLINE# http://www.apache.org/licenses/LICE... |
# ===================================================================NEWLINE#NEWLINE# Copyright (c) 2015, Legrandin <helderijs@gmail.com>NEWLINE# All rights reserved.NEWLINE#NEWLINE# Redistribution and use in source and binary forms, with or withoutNEWLINE# modification, are permitted provided that the following condit... |
#-NEWLINE# Copyright (c) 2013 Michael RoeNEWLINE# All rights reserved.NEWLINE#NEWLINE# This software was developed by SRI International and the University ofNEWLINE# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237NEWLINE# ("CTSRD"), as part of the DARPA CRASH research programme.NEWLINE#NEWLINE#... |
from django.contrib.contenttypes.models import ContentTypeNEWLINEimport jsonNEWLINENEWLINEfrom django.http import Http404, HttpResponseNEWLINEfrom django.contrib import messagesNEWLINEfrom django.contrib.auth import get_user_modelNEWLINEfrom django.contrib.auth.decorators import login_required, user_passes_testNEWLINEf... |
from nose import SkipTestNEWLINEfrom nose.tools import eq_NEWLINEfrom pyquery import PyQuery as pqNEWLINENEWLINEfrom kitsune.gallery.models import Image, VideoNEWLINEfrom kitsune.gallery.tests import image, videoNEWLINEfrom kitsune.sumo.helpers import urlparamsNEWLINEfrom kitsune.sumo.tests import TestCase, get, Locali... |
# coding: utf-8NEWLINENEWLINE"""NEWLINE Cost ManagementNEWLINENEWLINE The API for Project Koku and OpenShift cost management. You can find out more about Cost Management at [https://github.com/project-koku/](https://github.com/project-koku/). # noqa: E501NEWLINENEWLINE The version of the OpenAPI document: 1.0... |
import jsonNEWLINENEWLINENEWLINEdef dummy_function():NEWLINE return []NEWLINENEWLINENEWLINEdef test_norun():NEWLINE this shall not runNEWLINENEWLINEif __name__ == '__main__':NEWLINE test_norun()NEWLINE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.