text stringlengths 28 881k |
|---|
QUERY = """NEWLINEquery searchByQuery($query:SearchQueryJson!$testListings:Boolean!$smartHide:Boolean$recentHides:[ListingId!])@debug(testListings:$testListings){rentSearch(query:$query smartHide:$smartHide recentHides:$recentHides){...RentResultsMetaData resolvedQuery{...SearchMetadata ...ResultsHeading ...SeoFooterLi... |
from __future__ import absolute_importNEWLINENEWLINE__all__ = ["from_user", "from_member", "DEFAULT"]NEWLINENEWLINEimport warningsNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.utils.functional import cached_propertyNEWLINENEWLINEfrom sentry import rolesNEWLINEfrom sentry.auth.superuser import is_acti... |
import openxc_threadNEWLINEimport threadingNEWLINEimport bluetoothNEWLINEimport datetimeNEWLINEimport pygameNEWLINEimport timeNEWLINEimport jsonNEWLINEimport osNEWLINENEWLINENEWLINE# SETTING VARIABLESNEWLINE# ColorsNEWLINEBLACK = (0, 0, 0)NEWLINEWHITE = (255, 255, 255)NEWLINEGREEN = (0, 255, 0)NEWLINERED = (255, 0, 0)N... |
# *************************NEWLINE# |docname| - Runestone APINEWLINE# *************************NEWLINE# This module implements the API that the Runestone Components use to communicate with a Runestone Server.NEWLINE#NEWLINE# ImportsNEWLINE# =======NEWLINE# These are listed in the order prescribed by `PEP 8NEWLINE# <htt... |
import timeNEWLINEimport typingNEWLINEimport inspectNEWLINEfrom uuid import uuid4NEWLINEfrom broccoli.injector import ASyncInjectorNEWLINEfrom broccoli.components import ReturnValueNEWLINEfrom broccoli.task import create_taskNEWLINEfrom broccoli.result import AsyncResultNEWLINEfrom broccoli.types import App, Broker, Ta... |
import boto3NEWLINEimport sysNEWLINEfrom st2actions.runners.pythonrunner import ActionNEWLINENEWLINEclass GetStackBuildStatus(Action):NEWLINE def run(self, stack_name_or_id):NEWLINE region = self.config['region']NEWLINENEWLINE stack_states = ['CREATE_COMPLETE', 'CREATE_FAILED', 'ROLLBACK_COMPLETE']NEWL... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf8 -*-NEWLINENEWLINE"""Initialize userNEWLINE"""NEWLINENEWLINEimport sysNEWLINEsys.path.insert(0, '../')NEWLINENEWLINEfrom app.models import UserNEWLINEfrom app.models import dbNEWLINENEWLINE_admin0 = {'name': 'uadmin', 'hash': '$6$rounds=656000$BGPNku.GTxUFp5/m$z2VoGUbOzZfjE... |
from django.apps import AppConfigNEWLINENEWLINENEWLINEclass GiftConfig(AppConfig):NEWLINE name = 'gift'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 django.db import modelsNEWLINEimport django.contrib.auth.modelsNEWLINENEWLINENEWLINE# class Admin(models.Model):NEWLINE# password = models.CharField(max_length=128)NEWLINE# last_login = models.DateTimeField()NEWLINE# is_superuser = models.BooleanField()NEWLINE# first_name = models.CharField(max_len... |
import abcNEWLINEfrom typing import Type, UnionNEWLINEimport numpy as npNEWLINENEWLINEfrom uncertainty_framework.report._report import Report as ReportBaseClassNEWLINEfrom uncertainty_framework.report.margins import MarginReportNEWLINEfrom uncertainty_framework.report.console import ConsoleReportNEWLINEfrom uncertainty... |
from rest_framework import generics, permissionsNEWLINEfrom rest_framework import filters as filters_rfNEWLINEfrom django_filters import rest_framework as filtersNEWLINENEWLINEfrom oms_cms.backend.comments.models import OmsCommentNEWLINEfrom .serializers import OmsCommentSerializer, OmsCommentDeleteUpdateCreateSerializ... |
# Copyright (c) 2015 Jaime van Kessel, Ultimaker B.V.NEWLINE# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.NEWLINEfrom PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlotNEWLINENEWLINEfrom UM.PluginRegistry import PluginRegistryNEWLINEfrom UM.Resources import ResourcesNEWLINE... |
from discord.ext import commandsNEWLINEimport discordNEWLINEimport requestsNEWLINEfrom bs4 import BeautifulSoupNEWLINEimport reNEWLINENEWLINEclass neorg_cmds(commands.Cog):NEWLINENEWLINE def __init__(self, bot):NEWLINE self.bot = botNEWLINENEWLINE @commands.command()NEWLINE async def wiki(self, ctx, *, query):NEWLINE ... |
#!/usr/bin/pythonNEWLINE#NEWLINE# pybuddyDXNEWLINE# python e-buddy (ibuddy alike sold on DX) daemonNEWLINE# http://code.google.com/p/pybuddyDXNEWLINE#NEWLINE# protocol reverse engineered and implemented byNEWLINE# peter.dhoye@gmail.comNEWLINE#NEWLINE# borrows code from http://code.google.com/p/pybuddyNEWLINE# by Jose.C... |
import numpy as npNEWLINEimport matplotlib.pyplot as pltNEWLINENEWLINE# plt.style.use("dark_background")NEWLINENEWLINEfrom matplotlib.patches import PolygonNEWLINEfrom matplotlib.collections import PatchCollectionNEWLINEfrom matplotlib.collections import PolyCollectionNEWLINENEWLINEfrom mpl_toolkits.axes_grid1 import A... |
from checkov.common.models.enums import CheckResult, CheckCategoriesNEWLINEfrom checkov.cloudformation.checks.resource.base_resource_value_check import BaseResourceValueCheckNEWLINENEWLINENEWLINEclass ElasticacheReplicationGroupEncryptionAtRest(BaseResourceValueCheck):NEWLINE def __init__(self):NEWLINE name =... |
"""NEWLINETurner, Mann, Clandinin:NEWLINENEWLINEhttps://github.com/mhturner/SC-FCNEWLINEmhturner@stanford.eduNEWLINE"""NEWLINEfrom scfc import bridge, anatomical_connectivityNEWLINEimport osNEWLINENEWLINEdata_dir = bridge.getUserConfiguration()['data_dir']NEWLINENEWLINEinclude_inds_branson, name_list_branson = bridge.g... |
from hp_model import operationNEWLINEimport matplotlib.pyplot as pltNEWLINENEWLINENEWLINEinit = 0NEWLINEstate = 0NEWLINEi = 0NEWLINENEWLINEcp1 = []NEWLINEcp2 = []NEWLINEerp = []NEWLINEpu = []NEWLINEefflist = []NEWLINElast_state = 0NEWLINEtemperature = []NEWLINEstate_list = []NEWLINEQ_list = []NEWLINEwhile 1:NEWLINE ... |
from .companies import CompanyView, CompaniesViewNEWLINEfrom .employees import (NEWLINE EmployeeView, EmployeesView, EmployeeProductsView,NEWLINE EmployeeProductDeleteViewNEWLINE)NEWLINEfrom .products import ProductView, ProductsViewNEWLINENEWLINENEWLINEHANDLERS = (NEWLINE CompanyView, CompaniesView,NEWLINE ... |
# Project: hardInfoNEWLINE# Author: George Keith WatsonNEWLINE# Date Started: March 18, 2022NEWLINE# Copyright: (c) Copyright 2022 George Keith WatsonNEWLINE# Module: model/Installation.pyNEWLINE# Date Started: March 20, 2022NEWLINE# Purpose: Store installation locat... |
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... |
import taichi as tiNEWLINENEWLINEti.init()NEWLINENEWLINEn = 512NEWLINEx = ti.field(dtype=ti.f32, shape=(n, n))NEWLINENEWLINENEWLINE@ti.kernelNEWLINEdef paint():NEWLINE for i, j in ti.ndrange(n * 4, n * 4):NEWLINE # 4x4 super sampling:NEWLINE ret = ti.taichi_logo(ti.Vector([i, j]) / (n * 4))NEWLINE ... |
def map_list(list, key, default=None):NEWLINE return filter(None, (item.get(key, default) for item in list))NEWLINENEWLINENEWLINEclass FilterModule(object):NEWLINE def filters(self):NEWLINE return {NEWLINE 'select': map_listNEWLINE }NEWLINE |
'''NEWLINENotice:NEWLINE ConstantOP only supports CPU.NEWLINE For supporting cross-device, please use ConstantOP2NEWLINE'''NEWLINEimport sysNEWLINEsys.path.append('../') # Add MobulaOP pathNEWLINEimport mobulaNEWLINEimport numpy as npNEWLINENEWLINE# ConstantOP only supports CPU.NEWLINENEWLINENEWLINE@mobula.op.re... |
import numpy as npNEWLINEimport sysNEWLINEsys.path.append('..')NEWLINEfrom chap11.dubins_parameters import dubins_parametersNEWLINEfrom message_types.msg_path import msg_pathNEWLINENEWLINEclass path_manager:NEWLINE def __init__(self):NEWLINE # message sent to path followerNEWLINE self.path = msg_path()... |
print('This is for test #1') |
# *************************NEWLINE# |docname| - Runestone APINEWLINE# *************************NEWLINE# This module implements the API that the Runestone Components use to communicate with a Runestone Server.NEWLINE#NEWLINE# ImportsNEWLINE# =======NEWLINE# These are listed in the order prescribed by `PEP 8NEWLINE# <htt... |
# SETTINGNEWLINEimport osNEWLINENEWLINEencoding_ = 'utf_8_sig'NEWLINEtime_zone = 'Asia/Shanghai'NEWLINEpool_max_workers = 8NEWLINEdefault_options_ = {NEWLINE 'encoding': encoding_,NEWLINE}NEWLINEbase_dir = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/")NEWLINEstatic_dir = os.path.join(base_dir, 'static... |
"""This module contains miscellaneous utilities."""NEWLINENEWLINE__author__ = "Damián Silvani"NEWLINE__copyright__ = "Dymaxion Labs"NEWLINE__license__ = "MIT"NEWLINENEWLINENEWLINEdef flatten(list):NEWLINE return [item for sublist in list for item in sublist]NEWLINE |
#!/usr/bin/pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE##############################################################################NEWLINE# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. #NEWLINE# #NEWLINE# Licensed... |
# Copyright (C) 2013 Jaedyn K. DraperNEWLINE#NEWLINE# Permission is hereby granted, free of charge, to any person obtainingNEWLINE# a copy of this software and associated documentation files (the "Software"),NEWLINE# to deal in the Software without restriction, including without limitationNEWLINE# the rights to use, co... |
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located atNEWLINE#NEWLINE# http://www.apache.org/license... |
#! /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... |
import operatorNEWLINEimport reNEWLINEfrom functools import reduceNEWLINENEWLINEfrom aocd import get_dataNEWLINENEWLINENEWLINEdef rotate_once(data):NEWLINE return [''.join(r) for r in zip(*data[::-1])]NEWLINENEWLINENEWLINEdef rotate(data, rotation):NEWLINE if rotation >= 4:NEWLINE data = [r[::-1] for r in ... |
# coding: utf-8NEWLINENEWLINEimport copyNEWLINEimport jsonNEWLINEimport loggingNEWLINEimport osNEWLINEimport uuidNEWLINEfrom io import BytesIONEWLINEfrom unittest.mock import patchNEWLINENEWLINEfrom django.contrib.auth import get_user_modelNEWLINEfrom django.contrib.auth.models import PermissionNEWLINEfrom django.contr... |
#!/usr/bin/env python2NEWLINENEWLINE#NEWLINE# Distributed under the MIT/X11 software license, see the accompanyingNEWLINE# file COPYING or http://www.opensource.org/licenses/mit-license.php.NEWLINE#NEWLINENEWLINEfrom test_framework.test_framework import ComparisonTestFrameworkNEWLINEfrom test_framework.util import *NEW... |
# Copyright 1996-2021 Cyberbotics Ltd.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.0NEWLINE#NEWLINE# U... |
# _*_ coding: utf-8 _*_NEWLINE"""NEWLINE Swagger 配置NEWLINE"""NEWLINEimport osNEWLINEfrom collections import namedtupleNEWLINENEWLINEVERSION = "0.1.0" # 项目版本NEWLINENEWLINE# is_dev_mode = os.path.exists('app/config/dev_setting.py') # 'development' & 'product' (开发环境 or 生产环境)NEWLINENEWLINEis_dev_mode = TrueNEWLINENEWLINE... |
# Copyright 2015 The LUCI Authors. All rights reserved.NEWLINE# Use of this source code is governed under the Apache License, Version 2.0NEWLINE# that can be found in the LICENSE file.NEWLINENEWLINE"""OS abstraction OS specific utility functions."""NEWLINENEWLINE# pylint: disable=unnecessary-lambdaNEWLINENEWLINEimport ... |
# coding=utf-8NEWLINE# --------------------------------------------------------------------------NEWLINE# Copyright (c) Microsoft Corporation. All rights reserved.NEWLINE# Licensed under the MIT License. See License.txt in the project root forNEWLINE# license information.NEWLINE#NEWLINE# Code generated by Microsoft (R)... |
import osNEWLINEfrom typing import OptionalNEWLINENEWLINEimport numpy as npNEWLINEimport pytorch_lightning as plNEWLINENEWLINEimport torchNEWLINEimport torchvision.transforms as TNEWLINEfrom torch.utils.data import DataLoader, TensorDatasetNEWLINEfrom torchvision import datasetsNEWLINEfrom torchvision.datasets.utils im... |
from django_asservio_core.models import (NEWLINE CodeDictionary, NameDictionary,NEWLINE Dictionary, DescriptionDictionaryNEWLINE)NEWLINENEWLINENEWLINEclass Code(CodeDictionary):NEWLINE """Code dictionary."""NEWLINE passNEWLINENEWLINENEWLINEclass Name(NameDictionary):NEWLINE """Name dictionary."""NEWLINE ... |
#!/usr/bin/pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (c) 2016 Red Hat, Inc.NEWLINE#NEWLINE# This file is part of AnsibleNEWLINE#NEWLINE# Ansible is free software: you can redistribute it and/or modifyNEWLINE# it under the terms of the GNU General Public License as published byNEWLINE# the Free Soft... |
# -*- coding: utf-8 -*-NEWLINENEWLINEfrom __future__ import absolute_importNEWLINENEWLINEimport copyNEWLINEimport contextlibNEWLINEimport threadingNEWLINEimport uuidNEWLINENEWLINEctx = threading.local()NEWLINENEWLINENEWLINEclass TrackerBase(object):NEWLINE def __init__(self, client=None, server=None):NEWLINE ... |
# -*- 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... |
import purerpcNEWLINEimport greeter_pb2NEWLINENEWLINENEWLINEclass GreeterServicer(purerpc.Servicer):NEWLINE async def SayHello(self, input_message):NEWLINE raise NotImplementedError()NEWLINENEWLINE async def SayHelloGoodbye(self, input_message):NEWLINE raise NotImplementedError()NEWLINENEWLINE as... |
NEWLINE# coding: utf-8NEWLINENEWLINE# # Plotting Functions in Azure Machine Learning Package for Forecasting (AMLPF)NEWLINE# In this notebook, we go over the plotting functions in AMLPF for visualizing and analyzing forecasting results. The following functions are covered.NEWLINE# 1. Plot aggregated error distribution.... |
"""PyMC3-specific conversion code."""NEWLINEimport loggingNEWLINEfrom typing import Dict, List, Any, Optional, TYPE_CHECKINGNEWLINEfrom types import ModuleTypeNEWLINENEWLINEimport numpy as npNEWLINEimport xarray as xrNEWLINEfrom .. import utilsNEWLINEfrom .inference_data import InferenceData, concatNEWLINEfrom .base im... |
from typing import Dict, Type, AnyNEWLINENEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINEfrom torch.utils.data import DataLoaderNEWLINEfrom torch.utils.tensorboard import SummaryWriterNEWLINENEWLINEfrom sklearn.model_selection import ParameterGridNEWLINENEWLINENEWLINEclass Learner(object):NEWLINENEWLINE def __... |
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# File: raw.pyNEWLINE# Author: Yuxin Wu <ppwwyyxxc@gmail.com>NEWLINENEWLINEimport numpy as npNEWLINEimport copyNEWLINEimport sixNEWLINEfrom six.moves import rangeNEWLINEfrom .base import DataFlow, RNGDataFlowNEWLINENEWLINE__all__ = ['FakeData', 'DataFromQueue', ... |
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... |
# coding=utf-8NEWLINEfrom __future__ import unicode_literals, absolute_importNEWLINENEWLINEfrom django.core import urlresolversNEWLINEfrom django.db import modelsNEWLINEfrom django.utils.translation import ugettext_lazy as _NEWLINENEWLINEfrom filer.models import FileNEWLINENEWLINENEWLINEclass OrderedFile(File):NEWLINE ... |
# Copyright 2020 Google LLC. 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/LICENSE-2.0NEWLINE... |
# Copied from botocore, licensed under the Apache licence 2.0.NEWLINE# Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.NEWLINENEWLINEimport reNEWLINENEWLINE_xform_cache = {NEWLINE ('CreateCachediSCSIVolume', '_'): 'create_cached_iscsi_volume',NEWLINE ('CreateCachediSCSIVolume', '-'): '... |
# Copyright 2017 Google LLCNEWLINE#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# https://www.apache.org/licenses/LICENSE-2.0NEWLINE#NEWLINE# Unless requ... |
import sqlite3NEWLINEimport abcNEWLINEfrom .base import DatabaseNEWLINENEWLINEfrom logzero import loggerNEWLINENEWLINEclass SqliteDatabase(Database):NEWLINENEWLINE def initialise(self, settings):NEWLINE logger.info("sqlite_database: initialise()")NEWLINE con = NoneNEWLINENEWLINE create = FalseNE... |
# Generated by Django 2.2.2 on 2019-06-10 15:58NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [("core", "0007_auto_20190603_1459")]NEWLINENEWLINE operations = [NEWLINE migrations.AddField(NEWLINE mode... |
#! /usr/bin/python3NEWLINENEWLINE"""Create and parse 'send'-type messages."""NEWLINENEWLINEimport structNEWLINEimport jsonNEWLINEimport loggingNEWLINElogger = logging.getLogger(__name__)NEWLINENEWLINEfrom ... import (config, exceptions, util, message_type)NEWLINENEWLINEFORMAT = '>QQ'NEWLINELENGTH = 8 + 8NEWLINEID = 0NE... |
import osNEWLINEimport sysNEWLINEimport timeNEWLINEimport torchNEWLINEimport utilsNEWLINEimport loggingNEWLINEimport argparseNEWLINEimport torch.nn as nnNEWLINEimport torch.utilsNEWLINENEWLINEfrom adaptive_augmentor import AdaAugNEWLINEfrom networks import get_modelNEWLINEfrom networks.projection import ProjectionNEWLI... |
#!/usr/bin/env pythonNEWLINE#NEWLINE# VMAccess extensionNEWLINE#NEWLINE# Copyright 2014 Microsoft CorporationNEWLINE#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#NE... |
#!/usr/bin/python3NEWLINENEWLINE'''NEWLINEConvert Japanese datasets to Hepburn RomanizationNEWLINECopyright 2016 Xiang ZhangNEWLINENEWLINEUsage: python3 construct_hepburn.py -i [input] -o [output]NEWLINE'''NEWLINENEWLINE# Input fileNEWLINEINPUT = '../data/rakuten/sentiment/full_train.csv'NEWLINE# Output fileNEWLINEOUTP... |
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright 2020 Google LLCNEWLINE#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# https://www.apache.org/licenses/L... |
def DetectCollision(characterPosX, characterPosY, character, obstaclePosX, obstaclePosY, obstacle):NEWLINE MARGIN_ERROR = 18 # error with image pixelsNEWLINE collision = FalseNEWLINENEWLINE print("Character:",characterPosX, characterPosY, "\tObstacle", obstaclePosX, obstaclePosY)NEWLINE if ( characterPosX +... |
import argparseNEWLINEimport rayNEWLINENEWLINEfrom wiki_search import Dataset, EngineNEWLINENEWLINENEWLINEif __name__ == '__main__':NEWLINE if not ray.is_initialized():NEWLINE ray.init()NEWLINENEWLINE parser = argparse.ArgumentParser()NEWLINE parser.add_argument('--data_dir', type=str, default='./data')... |
from sympy import Point, Line, SegmentNEWLINEfrom skimage import feature, measureNEWLINEimport numpy as npNEWLINEfrom scipy import ndimage as ndNEWLINENEWLINEdef thr_calculator(filtered_img,min_distance,stringency):NEWLINENEWLINE """NEWLINE Function used to calculate the threshold to use for the dotsNEWLINE co... |
import loggingNEWLINEimport reNEWLINEimport timeNEWLINEimport hashlibNEWLINENEWLINEfrom bs4 import BeautifulSoupNEWLINEimport requestsNEWLINEfrom requests.exceptions import ReadTimeoutNEWLINENEWLINEclass BackEnd:NEWLINENEWLINE @staticmethodNEWLINE def help():NEWLINE return [NEWLINE "url: ex http... |
# pylint: disable=redefined-builtin, wildcard-importNEWLINE"""x86 specific declaration and schedules."""NEWLINEfrom __future__ import absolute_import as _absNEWLINENEWLINEfrom .conv2d import schedule_conv2d, schedule_conv2d_nhwcNEWLINEfrom .binarize_pack import schedule_binarize_packNEWLINEfrom .binary_dense import sch... |
import mathNEWLINENEWLINEr= float(input("Radius:"))NEWLINEri=int(r)NEWLINEwhile r>ri:NEWLINE ri=ri+1NEWLINEx= float(input("x-coordinate:"))NEWLINEwhile x>r or x<-r:NEWLINE print ("x-coordinate cannot be larger than radius")NEWLINE x= float(input("x-coordinate:"))NEWLINEy= float(input("y-coordinate:"))NEWLINEwh... |
# Copyright (c) Microsoft Corporation.NEWLINE# Licensed under the MIT license.NEWLINENEWLINEimport timeNEWLINEfrom typing import IterableNEWLINENEWLINEfrom ..graph import Model, ModelStatusNEWLINEfrom .interface import AbstractExecutionEngineNEWLINEfrom .listener import DefaultListenerNEWLINENEWLINE_execution_engine = ... |
# Copyright 2018 IguazioNEWLINE#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.0NEWLINE#NEWLINE# Unless required b... |
# title.pyNEWLINENEWLINEimport htmlNEWLINEimport reNEWLINENEWLINEfrom bobbit.utils import strip_htmlNEWLINENEWLINE# MetadataNEWLINENEWLINENAME = 'title'NEWLINEENABLE = TrueNEWLINEPATTERN = r'.*(?P<url>http[^\s]+).*'NEWLINEUSAGE = '''Usage: <url>NEWLINELooks up title of URL.NEWLINEExample:NEWLINE > http://www.i... |
import torchNEWLINEimport torch.nn as nnNEWLINEimport torch.nn.functional as FNEWLINEimport randomNEWLINENEWLINEfrom torch.distributions import NormalNEWLINENEWLINENEWLINEclass Retina:NEWLINE """A visual retina.NEWLINENEWLINE Extracts a foveated glimpse `phi` around location `l`NEWLINE from an image `x`.NEWLIN... |
# Generated by Django 2.2.4 on 2021-01-15 01:18NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('users', '0019_puzzlesolution'),NEWLINE ]NEWLINENEWLINE operations = [NEWLINE migrations.AddField... |
from pathlib import PathNEWLINENEWLINEimport pytestNEWLINENEWLINEnplg = pytest.importorskip("ome_types._napari_plugin")NEWLINENEWLINEDATA = Path(__file__).parent / "data"NEWLINENEWLINENEWLINE@pytest.mark.parametrize("fname", DATA.iterdir(), ids=lambda x: x.stem)NEWLINEdef test_widget(fname, qtbot):NEWLINE if fname.s... |
#!/usr/bin/env pythonNEWLINE# Copyright (C) 2012-2013, The CyanogenMod ProjectNEWLINE# (C) 2017-2018,2020-2021, The LineageOS ProjectNEWLINE#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 ... |
from .test_auth import enable_ad, load_setup_data, enable_openldap, \NEWLINE OPENLDAP_AUTH_USER_PASSWORD, enable_freeipa, FREEIPA_AUTH_USER_PASSWORDNEWLINEfrom .common import * # NOQANEWLINEimport astNEWLINENEWLINEAGENT_REG_CMD = os.environ.get('RANCHER_AGENT_REG_CMD', "")NEWLINEHOST_COUNT = int(os.environ.get('RAN... |
N = int(input())NEWLINEp = [int(input()) for i in range(N)]NEWLINEprint(sum(p)-max(p)//2)NEWLINE |
#FatiamentoNEWLINEfrase = 'Curso em video python'NEWLINE#Ex01|Obs: Desmostra um celula no parametro indicadoNEWLINEprint(frase[3])NEWLINE#Ex02/OBS: sempre será escluido última casa para mostragem NEWLINEprint(frase[3:15])NEWLINE#Ex03|Obs: seleção e alternação na mostragem definido parametro NEWLINEprint(frase[3:21:2])N... |
import osNEWLINEfrom threading import BrokenBarrierErrorNEWLINEimport timeNEWLINENEWLINEfrom multiprocess.context import TimeoutErrorNEWLINEfrom multiprocess.managers import StateNEWLINEimport numpy as npNEWLINEimport pytestNEWLINENEWLINEfrom catkit.multiprocessing import Process, SharedMemoryManagerNEWLINENEWLINETIMEO... |
from __future__ import print_function, absolute_import, divisionNEWLINENEWLINEfrom timeit import default_timer as timerNEWLINEimport numpy as npNEWLINENEWLINEfrom .reduction import device_reduce_sumNEWLINENEWLINENEWLINEdef benchmark_intp(nelem):NEWLINE data = np.random.randint(0, 100, nelem).astype(np.intp)NEWLINENE... |
"""NEWLINEProcess missing data within a dataset. NEWLINE"""NEWLINEimport missingno as msnoNEWLINEfrom pandas import DataFrameNEWLINEfrom pandas import SeriesNEWLINEfrom typing import ListNEWLINENEWLINENEWLINEdef visualize(df):NEWLINE """Plot missing cells heatmap"""NEWLINE msno.matrix(df)NEWLINENEWLINENEWLINEdef remove... |
from __future__ import absolute_import, divisionNEWLINE__author__ = 'katharine'NEWLINENEWLINEfrom six import indexbytesNEWLINEfrom six.moves import rangeNEWLINENEWLINEfrom libpebble2.events.mixin import EventSourceMixinNEWLINEfrom libpebble2.exceptions import ScreenshotErrorNEWLINEfrom libpebble2.protocol.screenshots i... |
"""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 ... |
# 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 argparseNEWLINEimport jsonNEWLINEimport pandas as pdNEWLINEpd.options.display.float_format = '{:,.2f}'.formatNEWLINEimport randomNEWLINEimport numpy as npNEWLINEimport tqdmNEWLINENEWLINEfrom src.sim import SimNEWLINENEWLINEdef run(params):NEWLINE """simulates the investment on the S&P500 index similar toNEWLI... |
# proxy moduleNEWLINEfrom traitsui.wx.boolean_editor import *NEWLINE |
"""Support for getting statistical data from a Pi-hole system."""NEWLINEimport loggingNEWLINENEWLINEfrom homeassistant.const import CONF_NAMENEWLINEfrom homeassistant.helpers.entity import EntityNEWLINENEWLINEfrom .const import (NEWLINE ATTR_BLOCKED_DOMAINS,NEWLINE DATA_KEY_API,NEWLINE DATA_KEY_COORDINATOR,NEW... |
#!/usr/bin/pythonNEWLINE'''NEWLINEExtract _("...") strings for translation and convert to Qt4 stringdefs so thatNEWLINEthey can be picked up by Qt linguist.NEWLINE'''NEWLINEfrom subprocess import Popen, PIPENEWLINEimport globNEWLINEimport operatorNEWLINENEWLINEOUT_CPP="src/qt/yiffcoinstrings.cpp"NEWLINEEMPTY=['""']NEWL... |
# -*- coding: utf-8 -*-NEWLINENEWLINEimport pymysqlNEWLINEimport structNEWLINENEWLINEfrom pymysql.constants.COMMAND import COM_BINLOG_DUMP, COM_REGISTER_SLAVENEWLINEfrom pymysql.cursors import DictCursorNEWLINEfrom pymysql.util import int2byteNEWLINENEWLINEfrom .packet import BinLogPacketWrapperNEWLINEfrom .constants.B... |
# ==============================================================================NEWLINE# zero.pyNEWLINE# ==============================================================================NEWLINENEWLINEimport osNEWLINEimport sysNEWLINENEWLINEERROR = FalseNEWLINENEWLINEdef main(function):NEWLINE try:NEWLINE argumen... |
"""NEWLINEA WSGI application which lists available versionsNEWLINEof APIs understood by another WSGI application.NEWLINE"""NEWLINENEWLINEfrom reporting_api.common.apiversion import APIVersionNEWLINEfrom reporting_api.common.application import ApplicationNEWLINENEWLINENEWLINEclass VersionsApp(Application):NEWLINE """... |
from django.test import TestCaseNEWLINEfrom django.contrib.auth import get_user_modelNEWLINEfrom django.urls import reverseNEWLINENEWLINEfrom rest_framework.test import APIClientNEWLINEfrom rest_framework import statusNEWLINENEWLINENEWLINECREATE_USER_URL = reverse('user:create')NEWLINETOKEN_URL = reverse('user:token')N... |
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Thu Jun 6 12:02:09 2019NEWLINENEWLINE@author: smrakNEWLINE"""NEWLINEfrom gpstec import gpstecNEWLINEimport h5pyNEWLINEimport os, globNEWLINEfrom datetime import datetime, timedeltaNEWLINEfrom dateutil import parserNEWLINEimport numpy as np... |
#!/usr/bin/env python2NEWLINE#NEWLINE# Distributed under the MIT/X11 software license, see the accompanyingNEWLINE# file COPYING or http://www.opensource.org/licenses/mit-license.php.NEWLINE#NEWLINENEWLINEfrom test_framework.mininode import *NEWLINEfrom test_framework.test_framework import BitcoinTestFrameworkNEWLINEfr... |
"""Application-specific settings."""NEWLINEimport osNEWLINEfrom django.conf import settings as _settingsNEWLINEfrom django.core.exceptions import ImproperlyConfiguredNEWLINENEWLINENEWLINE###############################################################################NEWLINE# Single settings.NEWLINE######################... |
"""NEWLINE Copyright (c) 2020-2022 Intel CorporationNEWLINENEWLINE 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 atNEWLINENEWLINE http://www.apache.org/licenses/LICENSE-2.0NEWLINENE... |
# -*- coding: utf-8 -*-NEWLINENEWLINEimport osNEWLINEimport argparseNEWLINEfrom lxml import etree, htmlNEWLINEfrom lxml.html.clean import CleanerNEWLINEimport fnmatch # To match files by patternNEWLINEimport regex as re # Maybe not necessaryNEWLINEimport timeNEWLINEimport dateparserNEWLINEimport jsonNEWLINENEWLINENEW... |
import asyncioNEWLINEimport loggingNEWLINEimport pickleNEWLINENEWLINEimport timeNEWLINEfrom functools import partialNEWLINEfrom typing import Callable, Any, TypeVarNEWLINENEWLINEfrom aio_pika.exchange import ExchangeTypeNEWLINEfrom aio_pika.channel import ChannelNEWLINEfrom aio_pika.exceptions import UnroutableErrorNEW... |
# fine-tune on different datasetNEWLINE# Copyright (c) 2017-present, Facebook, Inc.NEWLINE# All rights reserved.NEWLINE#NEWLINE# This source code is licensed under the license found in theNEWLINE# LICENSE file in the root directory of this source tree.NEWLINE#NEWLINE#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.