gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import absolute_import, print_function, division import time import sys import traceback import h2.exceptions import six import netlib.exceptions from mitmproxy import exceptions from mitmproxy import models from mitmproxy.protocol import base from netlib import http from netlib import tcp class _H...
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# repository.py # provides database interfce for domain objects #import statements import time import sqlite3 from domainobjects import * from core.IdGenerator import IdGenerator ############################################################################### # Global Methods def print_message(message, same_line = F...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# pyOCD debugger # Copyright (c) 2015-2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
from atmPy.general import timeseries from atmPy.radiation import solar import pandas as pd from atmPy.radiation.rayleigh import bucholtz_rayleigh as _bray # from scipy import signal import numpy as np # import matplotlib.pylab as plt # from atmPy.tools import plt_tools class MiniSASP(timeseries.TimeSeries): def __...
# Copyright 2014-2020 Scalyr Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Kore Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print_functio...
from datetime import date, datetime, timedelta from itertools import chain from operator import attrgetter from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django.core.urlresolvers import reverse from django.db.models import Q, get_app from django.http i...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# coding=utf-8 # Copyright 2022 The Edward2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
#! /usr/bin/env python '''Class for indicators, temporal indicators, and safety indicators''' __metaclass__ = type import moving # need for a class representing the indicators, their units, how to print them in graphs... class TemporalIndicator: '''Class for temporal indicators i.e. indicators that take a va...
import collections import copy from .Utils import _write_complex_object from .DataPointType import DataPointType class DataPoint(object): """Data contract class for type DataPoint. """ _defaults = collections.OrderedDict([ ('ns', None), ('name', None), ('kind', DataPointType.measure...
"""Generic "model" class.""" __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from collections import defaultdict from theano.compat.six.moves imp...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import generic_inlinefo...
"""Replace dialog for IDLE. Inherits SearchDialogBase for GUI. Uses idlelib.SearchEngine for search capability. Defines various replace related functions like replace, replace all, replace+find. """ import re from tkinter import StringVar, TclError from idlelib.searchbase import SearchDialogBase from idlelib import s...
import numpy as np from numpy.testing import assert_equal, assert_raises, assert_almost_equal from skimage.measure import LineModel, CircleModel, EllipseModel, ransac from skimage.transform import AffineTransform def test_line_model_invalid_input(): assert_raises(ValueError, LineModel().estimate, np.empty((5, 3))...
r"""UUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() ...
# coding=utf-8 import datetime as dt import logging import signal import sys import threading import time import traceback from math import ceil import pytz from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db.utils import DataError, IntegrityError from geop...
# Copyright 2014 Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
import os import sys from itertools import takewhile from django.apps import apps from django.core.management.base import BaseCommand, CommandError from django.db.migrations import Migration from django.db.migrations.autodetector import MigrationAutodetector from django.db.migrations.loader import MigrationLoader from...
import sys, re, inspect, operator import logging from util import emit, name2label, plural, singular try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import sqlalchemy from sqlalchemy import exc, and_ from sqlalchemy import MetaData, ForeignKeyConstraint from sqlalchemy.ext...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # std import logging import simplejson as json # 3rd party from docker.errors import NullResource, NotFound # project from utils.dockerutil import DockerUtil from utils.kubernetes import KubeUtil from utils.plat...
from __future__ import unicode_literals import locale import sys from datetime import date from django.apps import apps from django.contrib.auth import management, models from django.contrib.auth.checks import check_user_model from django.contrib.auth.management import create_permissions from django.contrib.auth.mana...
import logging import os import re import urllib import urlparse import gobject gobject.threads_init() import gst import gtk import random from blockify import util log = logging.getLogger("player") class InterludePlayer(object): "A simple gstreamer audio player to play interlude music." def __init__(self,...
import ftplib import config import log import tarfile from datetime import datetime import db def getRemoteTars(): try: ml_db = db.connect(config.get('db_host','medialib_live'),config.get('db_user','medialib_live'),config.get('db_password','medialib_live'),config.get('db_name','medialib_live')) log.logger.debug('...
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from markdown import markdown import bleach from flask import current_app, request, url_for from flask_login import UserMixin, Ano...
from fast_rcnn.config import cfg, get_output_dir import numpy as np import cv2 import caffe from fast_rcnn.nms_wrapper import nms, soft_nms import cPickle import os import time def im_detect(net, im, targe_size): im_orig = im.astype(np.float32, copy=True) im_orig -= cfg.PIXEL_MEANS im = cv2.resize(im_orig,...
"""Evaluating SQL expressions on ORM objects""" from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import not_ from sqlalchemy import or_ from sqlalchemy import String from sqlalchemy import tuple_...
_required = object() class Fixture(object): """Assistant for creating test fixtures. This proxies all undefined attributes to its :class:`~sgmock.shotgun.Shotgun` instance for easy tear-down of newly created entities. E.g:: # Create a fixture wrapping a mock Shotgun. sg = Fi...
""" Copyright (c) 2016, John Deutscher Description: Sample Python script for OCR processor License: MIT (see LICENSE.txt file for details) Documentation : https://azure.microsoft.com/en-us/documentation/articles/media-services-video-optical-character-recognition/ """ import os import json import amspy import time impor...
#!/usr/bin/python # The MIT License (MIT) # # Copyright (C) 2015, Sam Russell <sam.h.russell@gmail.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files (the "Software"), to deal in the Software without # restriction, including...
# See also: http://code.google.com/p/ipaddr-py/ """An IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and prefixes. """ __version__ = '1.0.2' import struct from json import loads from secure.gae import gaeinit gaeinit() from google.appengine.api im...
import sys from PyQt4.QtGui import * from PyQt4.QtCore import * from pymongo import MongoClient from server_info import ServerInfoPage from finddocs import FindDocsPage from insertdoc import InsertDocPage from updatedoc import UpdateDocPage from removedoc import RemoveDocPage from createcoll import CreateCollPage from ...
import os, os.path, sys, subprocess, re, base64, hashlib, mimetypes, copy from os.path import dirname, exists from urllib.parse import urljoin, urldefrag, urlparse import html from distutils.spawn import find_executable from . import buildsystem from . import utils from . import errdocs from . import urlregexps from ...
import redis, json, itertools def sorted_list(original_function): """ A decorator that outputs anything this function outputs as a sorted list """ def sl_function(*args, **kwargs): struct = original_function(*args, **kwargs) if struct is None: return None else: ...
import io import os from distutils import log from setuptools import setup, Extension, Command from setuptools.dist import Distribution from distutils.errors import DistutilsSetupError from distutils.sysconfig import customize_compiler as _customize_compiler from distutils.dep_util import newer_group from distutils.c...
# -*- coding: utf-8 -*- """ xbee.py By Paul Malmsten, 2010 Inspired by code written by Amit Synderman and Marco Sangalli pmalmsten@gmail.com XBee superclass module This class defines data and methods common to all XBee modules. This class should be subclassed in order to provide series-specific functionality. """ i...
#!/usr/bin/env python import sys import trees import span_dict import markup_convert analysis_out = sys.stdout def side_by_side(tree0, tree1): text0 = tree0.__repr__() text1 = tree1.__repr__() lines0 = ' '.join(text0.split('\t')).split('\n') lines1 = ' '.join(text1.split('\t')).split('\n') longest = 0 for line...
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
#!/usr/bin/python -t # -*- coding: utf-8 -*- #Author: James Antill <james.antill@redhat.com> #Contributors: # Sam Gleske <sag47@drexel.edu> #Source1: http://www.redhat.com/archives/rhl-list/2009-July/msg00228.html #Source2: http://markmail.org/message/dodinyrhwgey35mh #Acquired Fri Nov 9 09:09:28 EST 2012 #Succes...
# ----------------------------------------------------------------------------- # CONSTANTS # ----------------------------------------------------------------------------- DIR_PLAYLIST = "./music" DIR_COLORS = "./colors" DIR_COLORS_RANDOM = "./colors/random" ON_PI = False LED_COMMON_ANODE = True RGB_PINS = [4, 17, 22...
"""Functions to support fitting multi-modal distributions. """ import numpy as np from scipy.optimize import curve_fit from statsmodels.iolib.table import SimpleTable from .utils import Table def dndlogdp(dp, n, gm, gsd): """ Discrete PDF for a lognormal particle size distribution. :param dp: Particle...
from py.test import raises import py from hippy.objects.intobject import W_IntObject from hippy.sourceparser import parse from hippy.astcompiler import compile_ast, bc_preprocess, CompilerContext from hippy.ast import CompilerError, PLACEHOLDER from hippy.objspace import ObjSpace, getspace, ExecutionContext from hippy....
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
#!/usr/bin/env python3 """Store 2-D matrices as human-readable PNG files and recover them The canonical source for this package is https://github.com/finitemobius/matrixpng-py See pypng documentation for acceptable modes and bit depths""" import png import numpy as np import io from ._colormaps import ColorMaps from ...
import re import math from django.template import Library, Node, VariableDoesNotExist, \ TemplateSyntaxError from sorl.thumbnail.main import DjangoThumbnail, get_thumbnail_setting from sorl.thumbnail.processors import dynamic_import, get_valid_options from sorl.thumbnail.utils import split_args register = Library(...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
import time import re import datetime from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait, Select from selenium.webdriver.support import expected_conditions as EC from selenium.common.exceptions import TimeoutException, NoSuchElementException, StaleElementReferenceExcepti...
#--------------------------------- #Joseph Boyd - joseph.boyd@epfl.ch #--------------------------------- from twython import Twython, TwythonError, TwythonRateLimitError, TwythonAuthError from datetime import datetime from time import sleep from sys import maxint import re import csv import sys import pickle import tr...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
#!/usr/bin/env python # ESP32 secure boot utility # https://github.com/themadinventor/esptool # # Copyright (C) 2016 Espressif Systems (Shanghai) PTE LTD # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Fo...
#! /usr/bin/env python import struct import sys import os import zlib import argparse from binascii import crc32 SUPPORTED_FORMATS = (bytearray('\x50\x4b\x05\x06'),) UNCOMPRESSED_EXT = (".jpg", ".JPG", ".fsb", ".mp3") class IpfInfo(object): """ This class encapsulates information about a file entry in an IP...
"""Tests for the smartapp module.""" from uuid import uuid4 from asynctest import CoroutineMock, Mock, patch from pysmartthings import AppEntity, Capability from homeassistant.components.smartthings import smartapp from homeassistant.components.smartthings.const import ( CONF_INSTALLED_APP_ID, CONF_INSTALLED_APPS...
""" utilsCrowdKernel.py author: Lalit Jain (lalitkumarj@gmail.com) edited: 1/18/15 This module has methods that assist with the crowd kernel for pairwise comparisons presented here: http://research.microsoft.com/en-us/um/people/adum/publications/2011-crowd-kernel.pdf If you're trying to COMPUTE an embedding, you mi...
# Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import web_idl from . import name_style from .blink_v8_bridge import blink_class_name from .blink_v8_bridge import blink_type_info from .blink_v8_bridge imp...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
from locust import HttpLocust, TaskSet, TaskSequence, between, constant from bs4 import BeautifulSoup, SoupStrainer from string import ascii_lowercase import random import gevent import sys import re # TODO: # Modify current_hunt request to only look at unsolved puzzles # Fix no last_pk error with chat post (user ...
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unles...
# VMware vSphere Python SDK # Copyright (c) 2008-2015 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
from __future__ import unicode_literals from django.test import TestCase, override_settings from unittest import skip from .models import PoliticalPlace, MapItem from .utils import country_to_continent from .backends import Client from .exceptions import NoResultsException # GeoTypeException from .widgets import Plac...
""" Standardized encryption routines. """ import base64 import ctypes import ctypes.wintypes import hashlib import os # For documentation on the cryptography library, or to download it, visit: # https://cryptography.io/en/latest/ # To install with pip: # pip install cryptography import cryptography.fernet from...
# ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you unde...
import inspect import json import re import sys import time from abc import ABCMeta from abc import abstractmethod from getpass import getpass from pathlib import Path from urllib.parse import quote import defusedxml.ElementTree as ET import requests from bs4 import BeautifulSoup from cached_property import cached_pro...
import sys if sys.version_info[0] < 3: import ConfigParser else: import configparser if __name__ == u'__main__': import re CONFIG = [ { 'section_name': 'STARTUP', 'section_title': 'Startup Configuration', 'questions': [ { ...
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for the base bot implementation """ import unittest.mock import asynctest import hord.core.bot from tests.fixtures.commands import EXPECTED_COMMAND_HANDLERS import tests.mixins @asynctest.fail_on(unused_loop=False) class TestBot(tests.mixins.DiscordMixin, as...
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
#!/usr/bin/env python """ exec_command Implements exec_command function that is (almost) equivalent to commands.getstatusoutput function but on NT, DOS systems the returned status is actually correct (though, the returned status values may be different by a factor). In addition, exec_command takes keyword arguments fo...
# Copyright (C) 2003-2006 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at...
# LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Regenerate the Scintilla and SciTE source files that list # all the lexers and all the properties files. # Should be run whenever a new lexer is added or removed. # Requires Python 2.4 or later # Most files are regene...
# -*- coding: utf-8 -*- """ pygments.lexers.typoscript ~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for TypoScript `TypoScriptLexer` A TypoScript lexer. `TypoScriptCssDataLexer` Lexer that highlights markers, constants and registers within css. `TypoScriptHtmlDataLexer` Lexer th...
""" Table of Contents Extension for Python-Markdown =============================================== See <https://Python-Markdown.github.io/extensions/toc> for documentation. Oringinal code Copyright 2008 [Jack Miller](https://codezen.org/) All changes Copyright 2008-2014 The Python Markdown Project License: [BSD](h...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AuditLogEntry.ip_address' db.add_column('sentry_auditlogentry', 'ip_address', ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
from random import randint from datetime import datetime from sqlalchemy import func import destiny.utils as utils import destiny.main.api_call as api_call from destiny.main.bdd.models import Players from destiny.main.bdd.models.participants import Participants from destiny.main.bdd.models.participantstats import Par...
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from collections impor...
#!/usr/bin/env python3 from twython.exceptions import TwythonError from twython import Twython import pickle import readline import sys import consts import pprinter def log(it): print(it) with open("./.user_info", 'rb') as f: user_info = pickle.load(f) class Termeet(object): def __init__(self): ...
# Copyright (c) 2010 Cloud.com, Inc # Copyright 2012 Cloudbase Solutions Srl / Pedro Navarro Perez # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
from _Framework.ControlSurfaceComponent import ControlSurfaceComponent from consts import * # noqa class InstrumentPresetsComponent(): def __init__(self, *a, **k): self.octave_index_offset = 0 self.is_horizontal = True self.interval = 3 def _set_scale_mode(self, octave_index_offset, orientation, interval): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for tautomer.py""" from __future__ import print_function from __future__ import unicode_literals from __future__ import division import logging from molvs.standardize import enumerate_tautomers_smiles, canonicalize_tautomer_smiles logging.basicConfig(level=logg...
from django.apps import AppConfig from django.db.models import signals from django_fsm import signals as fsm_signals class StructureConfig(AppConfig): name = 'waldur_core.structure' verbose_name = 'Structure' def ready(self): from waldur_core.core.models import User, ChangeEmailRequest fr...
import numpy as np from nose.tools import assert_raises, assert_true, assert_false from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from scipy import sparse from sklearn import datasets, svm, linear_model, base from sklearn.datasets import make_classific...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
import os import sys from jedi._compatibility import exec_function, unicode from jedi.parser import tree as pr from jedi.parser import Parser from jedi.evaluate.cache import memoize_default from jedi import debug from jedi import common def get_sys_path(): def check_virtual_env(sys_path): """ Add virtual...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
# Copyright 2017 reinforce.io. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
"""The tests for the Input text component.""" # pylint: disable=protected-access from unittest.mock import patch import pytest from homeassistant.components.input_text import ( ATTR_MAX, ATTR_MIN, ATTR_MODE, ATTR_VALUE, CONF_INITIAL, CONF_MAX_VALUE, CONF_MIN_VALUE, DOMAIN, MODE_TEX...
# encoding=utf8 import datetime from distutils.version import StrictVersion import hashlib import os.path import random from seesaw.config import realize, NumberConfigValue from seesaw.item import ItemInterpolation, ItemValue from seesaw.task import SimpleTask, LimitConcurrent from seesaw.tracker import GetItemFromTrac...
import pytest import ibis import ibis.common.exceptions as com from ibis import window from ibis.expr.window import rows_with_max_lookback from ibis.tests.util import assert_equal from ..compiler import ImpalaCompiler pytest.importorskip("impala") @pytest.fixture def alltypes(con): return con.table('alltypes')...
script_clean_regs = 0 script_db_test = 1 script_db_get_neighbour_scene_ids = 2 script_get_nearest_entry_point_to_pos = 3 script_db_load_player_data = 4 script_db_insert_player_if_not_exist = 5 script_db_change_agent = 6 script_db_update_agent = 7 script_db_load_agent = 8 script_db_update_inventory = 9 script_db_change_...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright (C) 2012 - 2014 EMC Corporation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
#!/usr/bin/env python #///////////////////////////////////////////////////////////// # # ROS related imports import rospy from sensor_msgs.msg import Imu from std_msgs.msg import Float64 from std_msgs.msg import Bool from rospy_tutorials.msg import Floats # RTIMU reltate imports import RTIMU # Other Imports import s...
import filecmp import os import ujson from django.core import mail from django.test import override_settings from mock import patch, MagicMock from typing import Any, Dict, List, Mapping from zerver.lib.actions import do_change_stream_invite_only, do_deactivate_user from zerver.lib.bot_config import get_bot_config f...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import copy import ethereum.opcodes as opcodes # ####### dev hack flags ############### verify_stack_after_op = False # ###################################### import sys from ethereum import utils from ethereum.abi import is_numeric import copy from ethereum import opcodes import time from ethereum.slogging import...
""" Defines the ColorMapper and ColorMapTemplate classes. """ # Major library imports from types import IntType, FloatType from numpy import arange, array, asarray, clip, divide, float32, int8, isinf, \ isnan, ones, searchsorted, sometrue, sort, take, uint8, where, zeros, \ linspace, ones_like # Entho...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...