text
stringlengths
28
881k
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.11.20 on 2019-02-25 16:08NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEimport django.contrib.postgres.fields.hstoreNEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies ...
import argparseNEWLINEimport templateNEWLINENEWLINEparser = argparse.ArgumentParser(description='EDSR and MDSR')NEWLINENEWLINEparser.add_argument('--debug', action='store_true',NEWLINE help='Enables debug mode')NEWLINEparser.add_argument('--template', default='.',NEWLINE help='You ...
# -*- coding: utf-8 -*-NEWLINE#NEWLINE# Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de>NEWLINE# Copyright (C) 2007-2010 Edgewall SoftwareNEWLINE# All rights reserved.NEWLINE#NEWLINE# This software is licensed as described in the file COPYING, whichNEWLINE# you should have received as part of this distribution....
from typing import ListNEWLINENEWLINEfrom bleak.backends.service import BleakGATTServiceNEWLINEfrom bleak.backends.bluezdbus.characteristic import BleakGATTCharacteristicBlueZDBusNEWLINENEWLINENEWLINEclass BleakGATTServiceBlueZDBus(BleakGATTService):NEWLINE """GATT Service implementation for the BlueZ DBus backend""...
# """NEWLINE# This is the interface that allows for creating nested lists.NEWLINE# You should not implement it, or speculate about its implementationNEWLINE# """NEWLINE# class NestedInteger(object):NEWLINE# def isInteger(self):NEWLINE# """NEWLINE# @return True if this NestedInteger holds a single integ...
from decimal import ROUND_HALF_EVENNEWLINENEWLINEimport moneyedNEWLINEfrom moneyed.localization import _sign, _formatNEWLINENEWLINE_sign("en_GB", moneyed.GBP, prefix="£")NEWLINENEWLINE_format(NEWLINE "en_GB",NEWLINE group_size=3,NEWLINE group_separator=",",NEWLINE decimal_point=".",NEWLINE positive_sign=...
import osNEWLINEimport shutilNEWLINEimport subprocessNEWLINENEWLINEimport requestsNEWLINENEWLINEfrom koapy.utils.logging import get_loggerNEWLINEfrom koapy.utils.subprocess import quoteNEWLINENEWLINElogger = get_logger(__name__)NEWLINENEWLINEiss_file_encoding = "euc-kr"NEWLINENEWLINENEWLINEdef download_openapi_installe...
class RenderContentBase():NEWLINE '''NEWLINE This defines the data common for all content type renderersNEWLINE '''NEWLINENEWLINE def __init__(self, question_bundle):NEWLINE self.question_list = question_bundle.splitlines()NEWLINENEWLINE self.close_tokens = ')」}>』'NEWLINE self.tokens = ...
# Licensed to the Apache Software Foundation (ASF) under oneNEWLINE# or more contributor license agreements. See the NOTICE fileNEWLINE# distributed with this work for additional informationNEWLINE# regarding copyright ownership. The ASF licenses this fileNEWLINE# to you under the Apache License, Version 2.0 (theNEWL...
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...
"""NEWLINEMetric Learning for Kernel Regression (MLKR), Weinberger et al.,NEWLINENEWLINEMLKR is an algorithm for supervised metric learning, which learns a distanceNEWLINEfunction by directly minimising the leave-one-out regression error. ThisNEWLINEalgorithm can also be viewed as a supervised variation of PCA and can ...
"""Implements get optimizer method."""NEWLINEimport torchNEWLINENEWLINENEWLINEdef get_optimizer(optimizer):NEWLINE """Method to get optimizer from pytorch."""NEWLINE dir_optim = dir(torch.optim)NEWLINE opts = [o.lower() for o in dir_optim]NEWLINENEWLINE if isinstance(optimizer, str):NEWLINENEWLINE tr...
# coding=utf-8NEWLINE# Copyright 2018 The Tensor2Tensor Authors.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/LIC...
"""NEWLINETests for navtagsNEWLINE"""NEWLINENEWLINEimport pytestNEWLINEassert pytestNEWLINENEWLINEfrom django.http import HttpRequestNEWLINENEWLINEfrom hm_web.templatetags import navtagsNEWLINENEWLINENEWLINEdef build_request(path):NEWLINE """NEWLINE Build an HttpRequest object with the given pathNEWLINE """NEW...
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 osNEWLINEimport numpy as npNEWLINEimport streamlit as stNEWLINEimport pikapi.utils.loggingNEWLINENEWLINEimport pikapi.facelandmark_utils as fluNEWLINEfrom pikapi.head_gestures import YesOrNoEstimator, get_minmax_feature_from_base_dir, get_stateNEWLINENEWLINEdef detection_analysis_dashboard():NEWLINE # @st.cac...
# Copyright 2020-present, Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, Simone Calderara.NEWLINE# All rights reserved.NEWLINE# This source code is licensed under the license found in theNEWLINE# LICENSE file in the root directory of this source tree.NEWLINENEWLINEimport randomNEWLINEimport torchNEWLIN...
#!/usr/bin/env pythonNEWLINE#NEWLINE# ontoviz documentation build configuration file, created byNEWLINE# sphinx-quickstart on Fri Jun 9 13:47:02 2017.NEWLINE#NEWLINE# This file is execfile()d with the current directory set to itsNEWLINE# containing dir.NEWLINE#NEWLINE# Note that not all possible configuration values a...
from .tool.func import *NEWLINENEWLINEdef watch_list_2(conn, tool):NEWLINE curs = conn.cursor()NEWLINENEWLINE if tool == 'watch_list':NEWLINE div = load_lang("msg_whatchlist_lmt") + ' : 10 <hr class=\"main_hr\">'NEWLINE else:NEWLINE div = ''NEWLINENEWLINE ip = ip_check()NEWLINENEWLINE if ip...
#!/usr/bin/env python3NEWLINE# -*- coding: utf-8 -*-NEWLINENEWLINE# @author Copyright (c) 2022 Damir Dzeko AnticNEWLINE# @license MIT No AttributionNEWLINE# @version 0.1.2NEWLINE# @lastUpdate 2022-02-05NEWLINENEWLINE# ChangeLog:NEWLINE# - can be tested with: python3 -m unittest tomtomLookup.pyNEWLINE# - added object de...
import unittestNEWLINENEWLINENEWLINEclass TestLocalizable(unittest.TestCase):NEWLINE def test___init__(self):NEWLINE # localizable = Localizable(project, subpath, created)NEWLINE assert False # TODO: implement your test hereNEWLINENEWLINE def test_exists(self):NEWLINE # localizable = Localiz...
# 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 ...
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...
import torchNEWLINEimport numpy as npNEWLINENEWLINEfrom torch.nn.utils.clip_grad import clip_grad_norm_NEWLINEfrom maml.utils import accuracyNEWLINENEWLINEdef get_grad_norm(parameters, norm_type=2):NEWLINE if isinstance(parameters, torch.Tensor):NEWLINE parameters = [parameters]NEWLINE parameters = list(fi...
import numpy as npNEWLINEimport itertools as itNEWLINENEWLINEfrom big_ol_pile_of_manim_imports import *NEWLINENEWLINEfrom old_projects.brachistochrone.curves import \NEWLINE Cycloid, PathSlidingScene, RANDY_SCALE_FACTOR, TryManyPathsNEWLINENEWLINENEWLINEclass Lens(Arc):NEWLINE CONFIG = {NEWLINE "radius" : ...
import argparseNEWLINEimport osNEWLINEfrom math import log10NEWLINENEWLINEimport pandas as pdNEWLINEimport torch.optim as optimNEWLINEimport torch.utils.dataNEWLINEimport torchvision.utils as utilsNEWLINEfrom torch.autograd import VariableNEWLINEfrom torch.utils.data import DataLoaderNEWLINEfrom tqdm import tqdmNEWLINE...
import osNEWLINEimport timeNEWLINEimport statNEWLINEimport jsonNEWLINEimport zlibNEWLINEimport typingNEWLINEfrom typing import List, Sequence, MutableSequence, OptionalNEWLINEfrom collections import UserDictNEWLINEfrom hashlib import sha256NEWLINEfrom operator import attrgetterNEWLINEfrom torba.client.hash import bette...
"""NEWLINEThe tsnet.postprocessing.time_history module contains functionsNEWLINEto plot the time history of head and velocity at the start andNEWLINEend point of a pipeNEWLINE"""NEWLINEfrom __future__ import print_functionNEWLINEimport matplotlib.pyplot as pltNEWLINENEWLINEdef plot_head_history(pipe,H,wn,tt):NEWLINE ...
#!/usr/bin/env pythonNEWLINEPROGRAM_NAME = "cg-list-site-policy-csv.py"NEWLINEPROGRAM_DESCRIPTION = """NEWLINECloudGenix script to Create a CSV listing of all Sites and their associated PoliciesNEWLINE---------------------------------------NEWLINENEWLINEusage: cg-list-site-policy-csv.py [-h] [--token "MYTOKEN"]NEWLINE ...
#!/usr/bin/pythonNEWLINE# -*- coding: UTF-8 -*-NEWLINEimport jsonNEWLINEimport osNEWLINEimport shutilNEWLINENEWLINEfrom django.conf import settingsNEWLINEfrom django.core.management.base import BaseCommandNEWLINEfrom django.template.loader import render_to_stringNEWLINENEWLINEimport tastypie_swaggerNEWLINENEWLINENEWLIN...
# Copyright 2013-2018 Lawrence Livermore National Security, LLC and otherNEWLINE# Spack Project Developers. See the top-level COPYRIGHT file for details.NEWLINE#NEWLINE# SPDX-License-Identifier: (Apache-2.0 OR MIT)NEWLINENEWLINEfrom spack import *NEWLINENEWLINENEWLINEclass RPsych(RPackage):NEWLINE """A general purpo...
import numpy as npNEWLINEimport torchNEWLINEimport torch.nn as nnNEWLINENEWLINEfrom mmcv.cnn import constant_init, normal_initNEWLINEfrom mmdet.models.anchor_heads.ssd_head import SSDHeadNEWLINEfrom mmdet.models.registry import HEADSNEWLINENEWLINEfrom .operations import conv_dw_headNEWLINENEWLINENEWLINE@HEADS.register_...
from pycat.geometry.point import PointNEWLINENEWLINENEWLINEdef line_intersection(NEWLINE ax: float,NEWLINE ay: float,NEWLINE bx: float,NEWLINE by: float,NEWLINE cx: float,NEWLINE cy: float,NEWLINE dx: float,NEWLINE dy: float,NEWLINE ) -> Point:NEWLINE d ...
import osNEWLINEimport numpy as npNEWLINEimport cv2NEWLINEimport torchNEWLINEimport torchvisionNEWLINEimport carlaNEWLINENEWLINEfrom PIL import Image, ImageDrawNEWLINENEWLINEfrom carla_project.src.image_model import ImageModelNEWLINEfrom carla_project.src.converter import ConverterNEWLINENEWLINEfrom team_code.base_agen...
#===============================================================================NEWLINE#NEWLINE# FILE: parse_log_3.pyNEWLINE#NEWLINE# USAGE:NEWLINE#NEWLINE# DESCRIPTION:NEWLINE#NEWLINE# OPTIONS: NEWLINE# REQUIREMENTS: NEWLINE# BUGS: NEWLINE# NOTES: NEWLINE# AUTHOR: Debjit PalNE...
# -*- coding: utf-8 -*-NEWLINENEWLINE"""NEWLINEtaiga_ncurses.ui.signalsNEWLINE~~~~~~~~~~~~~~~~~~~~~~~~NEWLINE"""NEWLINENEWLINEimport urwidNEWLINENEWLINEconnect = urwid.connect_signalNEWLINEdisconnect = urwid.disconnect_signalNEWLINENEWLINEdef emit(widget, signal):NEWLINE widget._emit(signal)NEWLINE
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Thu Apr 16 10:17:24 2020NEWLINENEWLINE@author: roger.marquezNEWLINE"""NEWLINENEWLINEfrom . import datafileNEWLINEfrom . import tao5datafileNEWLINEfrom . import naldatafileNEWLINEfrom . import azuredatalaketoa5datafileNEWLINENEWLINEclass DataFileFactory:NEWLINE @stat...
S = input()NEWLINENEWLINEwhile S != "0+0=0":NEWLINE S = S[::-1]NEWLINE a, b = S.split('=')NEWLINE b, c = b.split('+')NEWLINENEWLINE if int(a) == int(b) + int(c):NEWLINE print('True')NEWLINE else:NEWLINE print('False')NEWLINENEWLINE S = input()NEWLINENEWLINEprint('True')NEWLINE
NEWLINENEWLINENEWLINEdef custom_jwt_response_handler(token, user=None, request=None):NEWLINENEWLINE return {NEWLINE "username": user.username,NEWLINE "user_id": user.id,NEWLINE "token": tokenNEWLINE }
from django.conf import settingsNEWLINEfrom rest_framework.routers import DefaultRouter, SimpleRouterNEWLINEfrom django.urls import pathNEWLINEfrom scrape_imdb.movies.views import MovieSerializerView, scrape_moviesNEWLINENEWLINEfrom scrape_imdb.users.api.views import UserViewSetNEWLINENEWLINEif settings.DEBUG:NEWLINE ...
from os import mkdirNEWLINEfrom os.path import existsNEWLINENEWLINEfrom .dist_tree import DistTreeNEWLINEfrom ...typehint import *NEWLINENEWLINENEWLINEdef main(conf: TConf):NEWLINE """ Create dist-side tree (all empty folders under `dst_root`) """NEWLINE _precheck(conf)NEWLINE NEWLINE # create main folders ...
#-----------------------------------------------------------------------------NEWLINE# Copyright (c) 2005-2016, PyInstaller Development Team.NEWLINE#NEWLINE# Distributed under the terms of the GNU General Public License with exceptionNEWLINE# for distributing bootloader.NEWLINE#NEWLINE# The full license is in the file ...
#!/Users/administrator/dev/njode/env/bin/python2.7NEWLINE#NEWLINE# The Python Imaging Library.NEWLINE# $Id$NEWLINE#NEWLINE# print image files to postscript printerNEWLINE#NEWLINE# History:NEWLINE# 0.1 1996-04-20 fl CreatedNEWLINE# 0.2 1996-10-04 fl Use draft mode when converting.NEWLINE# 0.3 2003-05-06 fl F...
import osNEWLINEimport win32security,win32file,win32api,ntsecuritycon,win32conNEWLINEfrom security_enums import TRUSTEE_TYPE,TRUSTEE_FORM,ACE_FLAGS,ACCESS_MODENEWLINENEWLINEfname = os.path.join(win32api.GetTempPath(), "win32security_test.txt")NEWLINEf=open(fname, "w")NEWLINEf.write("Hello from Python\n");NEWLINEf.close...
#!/usr/bin/env python3NEWLINE# ------------------------------------------------------------------------NEWLINE# Copyright (c) 2021 megvii-model. All Rights Reserved.NEWLINE# ------------------------------------------------------------------------NEWLINEfrom .database import *NEWLINEimport random, pdbNEWLINEimport numpy...
# Copyright 2015 The Crashpad 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/LICENSE-...
# coding: utf-8NEWLINENEWLINE# Copyright 2018 IBM 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/licen...
import httpNEWLINEimport osNEWLINEfrom datetime import datetime, timedeltaNEWLINEfrom pathlib import PathNEWLINEfrom typing import ListNEWLINENEWLINEimport flaskNEWLINEimport sassNEWLINEimport torchNEWLINEfrom flask_sqlalchemy import SQLAlchemyNEWLINEfrom sqlalchemy import funcNEWLINENEWLINEfrom reporter.database.misc ...
# -*- 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 ...
#!/usr/bin/env pythonNEWLINEimport argparseNEWLINEimport networkx as nxNEWLINEimport numpy as npNEWLINEimport matplotlib as mplNEWLINEimport matplotlib.pyplot as pltNEWLINEfrom matplotlib import rcNEWLINEimport prmfNEWLINEimport prmf.plotNEWLINErc('text', usetex=True)NEWLINENEWLINEDPI = prmf.plot.DPINEWLINEEPSILON = np...
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 "...
"""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...
#!/usr/bin/env pythonNEWLINENEWLINEfrom setuptools import setupNEWLINENEWLINENEWLINEsetup(name='txTemplate',NEWLINE version='1.0.1',NEWLINE description='Twisted Adapters for Templating Engines',NEWLINE long_description=open("README.rst", "r").read(),NEWLINE author='Mike Steder',NEWLINE author_e...
# -*- coding: utf-8 -*-NEWLINE# Generated by Django 1.10.5 on 2017-11-03 13:12NEWLINEfrom __future__ import unicode_literalsNEWLINENEWLINEfrom django.db import migrations, modelsNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('main', '0003_profile'),NEWLINE ...
import timeNEWLINEfrom flask import g, requestNEWLINEfrom flask.signals import got_request_exceptionNEWLINEfrom pybrake.utils import loggerNEWLINENEWLINEtry:NEWLINE from flask_login import current_userNEWLINEexcept ImportError:NEWLINE flask_login_imported = FalseNEWLINEelse:NEWLINE flask_login_imported = TrueN...
# -*- coding: utf-8 -*-NEWLINENEWLINEfrom ..expr import *NEWLINENEWLINEdef_Topic(NEWLINE Title("Riemann zeta function"),NEWLINE Section("Definitions"),NEWLINE Entries(NEWLINE "e0a6a2",NEWLINE ),NEWLINE Section("Illustrations"),NEWLINE Entries(NEWLINE "3131df",NEWLINE ),NEWLINE Sect...
#!/usr/bin/env python3NEWLINE"""NEWLINEpixivNEWLINENEWLINEUsage:NEWLINE pixiv.pyNEWLINE pixiv.py <id>...NEWLINE pixiv.py -r [-d | --date=<date>]NEWLINE pixiv.py -uNEWLINENEWLINEArguments:NEWLINE <id> user_idsNEWLINENEWLINEOptions:NEWLINE -r ...
#NEWLINE# Copyright 2015 Quantopian, 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.0NEWLINE#NEWLINE...
# This file is part of the Indico plugins.NEWLINE# Copyright (C) 2002 - 2021 CERNNEWLINE#NEWLINE# The Indico plugins are free software; you can redistributeNEWLINE# them and/or modify them under the terms of the MIT License;NEWLINE# see the LICENSE file for more details.NEWLINENEWLINEimport reNEWLINEimport sysNEWLINEim...
NEWLINENEWLINEdef add_(a,b):NEWLINE return a+bNEWLINENEWLINEdef sub_(a,b):NEWLINE return a-b
"""This is the one place the version number is stored."""NEWLINENEWLINE__version__ = '0.5.1'NEWLINE
from setuptools import setupNEWLINENEWLINEinstall_requires = [NEWLINE 'social-auth-app-django',NEWLINE]NEWLINENEWLINE# copy from `python-social-auth` social-core/setup.pyNEWLINEsocial_core_extras_require={NEWLINE 'openidconnect': ['python-jose>=3.0.0'],NEWLINE 'saml': ['python3-saml>=1.2.1'],NEWLINE 'azurea...
import osNEWLINEimport numpy as npNEWLINEimport streamlit as stNEWLINEimport pikapi.utils.loggingNEWLINENEWLINEimport pikapi.facelandmark_utils as fluNEWLINEfrom pikapi.head_gestures import YesOrNoEstimator, get_minmax_feature_from_base_dir, get_stateNEWLINENEWLINEdef detection_analysis_dashboard():NEWLINE # @st.cac...
#!/usr/bin/env python3NEWLINEimport globNEWLINEimport osNEWLINEfrom PIL import ImageNEWLINENEWLINEhdrs = []NEWLINEdata = []NEWLINEimgs = []NEWLINENEWLINEdef encode_pixels(img):NEWLINE r = ''NEWLINE img = [ (x[0] + x[1] + x[2] > 384 and '1' or '0') for x in img]NEWLINE for i in range(len(img) // 8):NEWLINE c = ''.join(...
import mathNEWLINENEWLINEfrom engine.geometry import calcsNEWLINEfrom engine.geometry.obstacle.target import TargetNEWLINEfrom gui.draw import DEFAULT_DASHNEWLINEimport gui.drawNEWLINEimport numpy as npNEWLINENEWLINENEWLINEclass VertexTarget(Target):NEWLINENEWLINE def __init__(self, startPosition, velocity, normal, ...
#!/usr/bin/pythonNEWLINENEWLINEimport roslibNEWLINEimport rospyNEWLINEimport numpy as npNEWLINEimport zmqNEWLINEimport mathNEWLINEfrom sensor_msgs.msg import JointStateNEWLINEglobal joint_poses, socketNEWLINENEWLINEjoint_poses = [90,90,90]NEWLINENEWLINEport = "5556"NEWLINENEWLINEcontext = zmq.Context()NEWLINEsocket = c...
"""NEWLINEThis module contains the main image processing class for the currentNEWLINEsetup with the camera beneath the chess board. It uses colorsNEWLINEto distinguish among the pieces. It also has a setup mode toNEWLINEinitialize the location of the center of each square on the board.NEWLINE"""NEWLINEimport cv2NEWLINE...
for c in range(0,51):NEWLINE if c % 2 == 0:NEWLINE print(c)NEWLINEprint('Programa Finalizado')NEWLINE
# -*- coding=utf-8 -*-NEWLINEfrom __future__ import absolute_import, print_functionNEWLINENEWLINEimport loggingNEWLINEimport operatorNEWLINEimport platformNEWLINEimport sysNEWLINEfrom collections import defaultdictNEWLINENEWLINEimport attrNEWLINEimport sixNEWLINEfrom packaging.version import VersionNEWLINENEWLINEfrom ....
'''cron function.NEWLINENEWLINEScans the user table and, for each user, invokes one lambda checker.NEWLINEIf the check generates an alert, invokes mailer lambda to notify the user.'''NEWLINEfrom sslnotifyme import (lambda_db, lambda_checker, lambda_main_wrapper, LOGGER)NEWLINENEWLINENEWLINEclass Cron(object):NEWLINE ...
"""Support to select a date and/or a time."""NEWLINEimport datetimeNEWLINEimport loggingNEWLINEimport typingNEWLINENEWLINEimport voluptuous as volNEWLINENEWLINEfrom homeassistant.const import (NEWLINE ATTR_DATE,NEWLINE ATTR_EDITABLE,NEWLINE ATTR_TIME,NEWLINE CONF_ICON,NEWLINE CONF_ID,NEWLINE CONF_NAME...
[ ## this file was manually modified by jtNEWLINE {NEWLINE 'functor' : {NEWLINE 'arity' : '1',NEWLINE 'call_types' : [],NEWLINE 'ret_arity' : '0',NEWLINE 'rturn' : {NEWLINE 'default' : 'T',NEWLINE },NEWLINE 'simd_types' : [],NEWLINE 'special'...
"""NEWLINEUnit and regression test for the analyze_foldamers package.NEWLINE"""NEWLINENEWLINE# Import package, test suite, and other packages as neededNEWLINEimport analyze_foldamersNEWLINEimport pytestNEWLINEimport sysNEWLINEimport osNEWLINEimport pickleNEWLINEfrom cg_openmm.cg_model.cgmodel import CGModelNEWLINEfrom ...
from typing import Any, Dict, Type, TypeVar, UnionNEWLINENEWLINEimport attrNEWLINENEWLINEfrom ..types import UNSET, UnsetNEWLINENEWLINET = TypeVar("T", bound="Definition")NEWLINENEWLINENEWLINE@attr.s(auto_attribs=True)NEWLINEclass Definition:NEWLINE """ """NEWLINENEWLINE definition: strNEWLINE source: Union[Un...
from securitycenter import SecurityCenter5NEWLINEfrom datetime import dateNEWLINEfrom time import mktimeNEWLINEfrom pygal.style import BlueStyleNEWLINEfrom pygal import DateLineNEWLINEfrom sys import stdoutNEWLINENEWLINEusername = 'USER'NEWLINEpassword = 'PASS'NEWLINEaddress = 'HOST'NEWLINEresults = [True,True]NEWLINEs...
# Licensed to the Apache Software Foundation (ASF) under oneNEWLINE# or more contributor license agreements. See the NOTICE fileNEWLINE# distributed with this work for additional informationNEWLINE# regarding copyright ownership. The ASF licenses this fileNEWLINE# to you under the Apache...
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...
#!/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...
# exercise 1NEWLINEdef max_array(array):NEWLINE return max(array)NEWLINENEWLINE# exercise 2NEWLINEdef reverse_array(array):NEWLINE result=[]NEWLINE for i in range(len(array)-1,-1,-1):NEWLINE result.append(array[i])NEWLINE return resultNEWLINENEWLINE# exercise 3NEWLINEdef check(array,char):NEWLINE ...
S = input()NEWLINENEWLINEwhile S != "0+0=0":NEWLINE S = S[::-1]NEWLINE a, b = S.split('=')NEWLINE b, c = b.split('+')NEWLINENEWLINE if int(a) == int(b) + int(c):NEWLINE print('True')NEWLINE else:NEWLINE print('False')NEWLINENEWLINE S = input()NEWLINENEWLINEprint('True')NEWLINE
from django import formsNEWLINEfrom app.models import BrewPiDevice, OldControlConstants, NewControlConstants, SensorDevice, FermentationProfile, FermentationProfilePointNEWLINEfrom django.core import validatorsNEWLINEimport fermentrack_django.settings as settingsNEWLINEfrom django.core.exceptions import ObjectDoesNotEx...
#!/usr/bin/pythonNEWLINENEWLINE# Copyright (c) 2016-2020 Dell Inc. or its subsidiaries.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....
# 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)...
#NEWLINE# © Copyright 2020 Hewlett Packard Enterprise Development LPNEWLINE#NEWLINE# This file was auto-generated by the Python SDK generator; DO NOT EDIT.NEWLINE#NEWLINENEWLINEfrom ..resource import Resource, CollectionNEWLINEfrom ..exceptions import NimOSAPIOperationUnsupportedNEWLINENEWLINEclass Controller(Resou...
#!/usr/bin/env pythonNEWLINENEWLINEimport jsonNEWLINEimport clickNEWLINENEWLINENEWLINE@click.command()NEWLINE@click.option("--in-private")NEWLINEdef dump_pem_to_jwks(in_private):NEWLINE try:NEWLINE from jwcrypto.jwk import JWK, JWKSetNEWLINE except ImportError as e:NEWLINE msg = "You have to install...
# -*- coding: utf-8 -*-NEWLINE"""NEWLINECreated on Sat Jan 16 13:04:06 2016NEWLINENEWLINE@author: lilianNEWLINE"""NEWLINENEWLINE#from onvif import ONVIFCameraNEWLINEfrom cameraUtils import IPCameraNEWLINEimport urllibNEWLINEimport loggingNEWLINEimport timeNEWLINENEWLINEclass PTZCamera(IPCamera):NEWLINENEWLINE def __...
#!/usr/bin/env pythonNEWLINE# -*- coding: utf-8 -*-NEWLINE# @Time : 2018/7/31 12:28NEWLINE# @Author : Ma xiaoquanNEWLINE# @Email : xiaoquan.ma@nokia-sbell.comNEWLINE# @Site :NEWLINE# @File : pydbsync.pyNEWLINE# @desc:NEWLINENEWLINEimport MySQLdb as mdbNEWLINEimport reNEWLINEimport sysNEWLINEimport os.pathNEWLINEfrom da...
#!/usr/bin/env pythonNEWLINENEWLINE# Import modulesNEWLINEfrom pcl_helper import *NEWLINENEWLINENEWLINE# TODO: Define functions as requiredNEWLINENEWLINE# Callback function for your Point Cloud SubscriberNEWLINEdef pcl_callback(pcl_msg):NEWLINE # TODO: Convert ROS msg to PCL dataNEWLINE cloud = ros_to_pcl(pcl_msg...
# encoding: utf-8NEWLINEimport jsonNEWLINENEWLINEimport pytestNEWLINEimport requests_mockNEWLINENEWLINEimport configfetcherNEWLINEimport phabricatorNEWLINEimport wikibugsNEWLINEfrom tests.common import rootNEWLINEfrom tests.wikibugs_network.common import parse_request, conduit_connect, unexpectedNEWLINENEWLINENEWLINEcl...
# Generated by Django 2.2 on 2020-02-19 18:16NEWLINENEWLINEfrom django.db import migrations, modelsNEWLINEimport django.db.models.deletionNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE dependencies = [NEWLINE ('home', '0108_fullwidthpage_citations'),NEWLINE ]NEWLINENEWLINE ope...
# Copyright 2015 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.NEWLINE"""NEWLINEGenerator that produces an externs file for the Closure Compiler.NEWLINENote: This is a work in progress, and generated externs ma...
"""NEWLINEPython的内置函数NEWLINE- 数学相关: abs / divmod / pow / round / min / max / sumNEWLINE- 序列相关: len / range / next / filter / map / sorted / slice / reversedNEWLINE- 类型转换: chr / ord / str / bool / int / float / complex / bin / oct / hexNEWLINE- 数据结构: dict / list / set / tupleNEWLINE- 其他函数: all / any / id / input / open ...
"""NEWLINEResults for test_glm.py.NEWLINENEWLINEHard-coded from R or Stata. Note that some of the remaining discrepancy vs.NEWLINEStata may be because Stata uses ML by default unless you specifically ask forNEWLINEIRLS.NEWLINE"""NEWLINEimport osNEWLINENEWLINEimport numpy as npNEWLINEimport pandas as pdNEWLINENEWLINEfr...
r"""NEWLINEModule for some integrators.NEWLINENEWLINE - IRK3: Implicit third order Runge-KuttaNEWLINE - RK4: Runge-Kutta fourth orderNEWLINE - ETD: Exponential time differencing Euler methodNEWLINE - ETDRK4: Exponential time differencing Runge-Kutta fourth orderNEWLINENEWLINESee, e.g.,NEWLIN...
# -*- 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...
# --------------------------------------------------------NEWLINE# DenseCap-TensorflowNEWLINE# Written by InnerPeaceNEWLINE# This file is adapted from Ross Girshick's workNEWLINE# --------------------------------------------------------NEWLINE# Fast R-CNNNEWLINE# Copyright (c) 2015 MicrosoftNEWLINE# Licensed under The ...
# Generated by Django 2.2.8 on 2019-12-23 10:46NEWLINENEWLINEimport datetimeNEWLINEfrom django.db import migrations, modelsNEWLINEfrom django.utils.timezone import utcNEWLINENEWLINENEWLINEclass Migration(migrations.Migration):NEWLINENEWLINE initial = TrueNEWLINENEWLINE dependencies = [NEWLINE ]NEWLINENEWLINE ...
# coding=utf-8NEWLINE# *** WARNING: this file was generated by the Pulumi SDK Generator. ***NEWLINE# *** Do not edit by hand unless you're certain you know what you are doing! ***NEWLINENEWLINEimport warningsNEWLINEimport pulumiNEWLINEimport pulumi.runtimeNEWLINEfrom typing import Any, Mapping, Optional, Sequence, Unio...
#!/bin/env python2.7NEWLINE# encoding: utf-8NEWLINEimport ctypesNEWLINEimport osNEWLINEimport reNEWLINEimport sysNEWLINEimport timeNEWLINENEWLINEIS_32_BITS_PYTHON = ctypes.sizeof(ctypes.c_voidp)==4NEWLINE# 4 for 32 bit or 8 for 64 bit. NEWLINENEWLINEfrom fixtures import *NEWLINENEWLINENEWLINEtry:NEWLINE FileNotFound...
import connexionNEWLINEfrom swagger_server.models.add_index_response import AddIndexResponseNEWLINEfrom swagger_server.models.index import IndexNEWLINEfrom datetime import date, datetimeNEWLINEfrom typing import List, DictNEWLINEfrom six import iteritemsNEWLINEfrom ..util import deserialize_date, deserialize_datetimeNE...