gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2012 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 contextlib import httplib import logging import os import tempfile import time import android_commands from chrome_test_server_spawner import Spa...
# # 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...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ i...
#!/usr/bin/env python # $Id$ # -*- coding: utf-8 ''' test libcint ''' __author__ = "Qiming Sun <osirpt.sun@gmail.com>" import sys import os import ctypes import numpy _cint = numpy.ctypeslib.load_library('libcint', '.') PTR_LIGHT_SPEED = 0 PTR_COMMON_ORIG = 1 PTR_SHIELDING_ORIG = 4 PTR_RINV_ORIG = 4 PT...
# 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 re import sys import copy import socket from datetime import datetime from decimal import Decimal from collections import Mapping, Container if sys.version_info[0] == 3: _str_type = str _int_types = (int,) else: _str_type = basestring _int_types = (int, long) class SchemaError(ValueError): ...
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
# 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 use ...
# 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 os import unittest from __main__ import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging # # CreateSamples # class CreateSamples(ScriptedLoadableModule): """Uses ScriptedLoadableModule base class, available at: https://github.com/Slicer/Slicer/blob/master/Base/Python/slicer/S...
# -*- coding: utf-8 -*- # # 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 ...
from __future__ import with_statement, absolute_import import re import sys from functools import wraps, partial from math import ceil from operator import itemgetter from threading import Lock from time import time import sqlalchemy from flask import _app_ctx_stack, abort, url_for from flask.signals import Namespace...
""" Module containing MPG Ranch NFC coarse classifier, version 3.0. An NFC coarse classifier classifies an unclassified clip as a `'Call'` if it appears to be a nocturnal flight call, or as a `'Noise'` otherwise. It does not classify a clip that has already been classified, whether manually or automatically. This cla...
#!/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: iso-8859-1 -*- """Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (func_*, co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the usef...
""" sphinx.writers.text ~~~~~~~~~~~~~~~~~~~ Custom docutils writer for plain text. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import math import os import re import textwrap import warnings from itertools import groupby, chain from ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ("apps", "0001_initial"), ("organizations", "0001_initial"), ) def forward...
import PlayerClass import ActionMethods import Log import Items import copy import random class Sym: # logName - string def __init__(self,logName): self.listOfTeams = [] # Team - a list of players with some additional stuff. self.dayDuration = 12 # Amount of hours in a day self.hourlyCalorieCost = 50 # calorie...
#!/etc/bin/env python __author__ = 'nash.xiejun' import sys sys.path.append('/usr/bin/install_tool') import os import traceback from oslo.config import cfg from constants import FileName import socket import shutil import errno import log import utils from utils import CommonCMD, SSHConnection from services import Ref...
""" color_scheme_matcher. Licensed under MIT. Copyright (C) 2012 Andrew Gibson <agibsonsw@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 without limit...
import calendar import hashlib import sys import time import urlparse import uuid from decimal import Decimal from urllib import urlencode from django import http from django.conf import settings from django.views.decorators.csrf import csrf_exempt import bleach import commonware.log from tower import ugettext as _ ...
# coding: utf-8 # PYTHON IMPORTS import os import ntpath import posixpath import shutil # DJANGO IMPORTS from django.conf import settings from django.test import TestCase from django.contrib.auth.models import User from django.utils.encoding import filepath_to_uri from django.template import Context, Template, Templa...
#!/usr/bin/env python """ Name : qconcurrency.widgets._progressbar_.py Created : Apr 17, 2017 Author : Will Pittman Contact : willjpittman@gmail.com ________________________________________________________________________________ Description : ProgressBar, that can be updated from a separa...
# -*- coding: utf-8 -*- """ Sahana Eden Setup Model @copyright: 2015 (c) Sahana Software Foundation @license: MIT 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 w...
""" fs.contrib.dropboxfs ======== A FS object that integrates with Dropbox. """ import time import shutil import optparse import datetime import tempfile import calendar from UserDict import UserDict from fs.base import * from fs.path import * from fs.errors import * from fs.filelike import StringIO from dropbox i...
# Copyright 2018 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...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'MaterialShapeNicenessLabel' db.delete_table(u'shapes_ma...
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** from . import AWSObject, AWSProperty, PropsDictType from .validators import boolean, integer from .validators.waf import validate_waf_action_type ...
# Copyright (C) 2014 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. """VisTrails runner for reprounzip. This file provides the reprounzip plugin that builds a VisTrails pipeline alongside an unpacked experiment. Although...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, subprocess, sys, glob, string import zipfile, shutil from datetime import date import prepare_rebtel_sdk cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['name','version','mod...
""" 6.00.2x Problem Set 4 """ # pylint: disable=invalid-name import pylab # pylint: disable=E0401, E0602, W0401, W0612 from ps3b import * # # PROBLEM 1 # # pylint: disable=too-many-locals def simulationDelayedTreatment(numTrials): """ Runs simulations and make histograms for problem 1. Runs numTrials sim...
# -*- coding: utf-8 -*- """Test triggers""" from pyrseas.testutils import DatabaseToMapTestCase from pyrseas.testutils import InputMapToSqlTestCase, fix_indent FUNC_SRC = "BEGIN NEW.c3 := CURRENT_TIMESTAMP; RETURN NEW; END" FUNC_INSTEAD_SRC = "BEGIN INSERT INTO t1 VALUES (NEW.c1, NEW.c2, now()); " \ "RETURN NULL;...
#!/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...
# mock.py # Test tools for mocking and patching. # Copyright (C) 2007-2011 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # mock 0.7.0 # http://www.voidspace.org.uk/python/mock/ # Released subject to the BSD License # Please see http://www.voidspace.org.uk/python/license.shtml # Scripts...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ Generate the class definition corresponding to a given IFMap DB object. """ from type_classgen import TypeClassGenerator, TypeImplGenerator from ifmap_global import CppTypeMap, GetModuleName from ifmap_model import IFMapIdentifier, IFMapProperty...
""" Plotting vectors ================ Plotting vectors is handled by :meth:`pygmt.Figure.plot`. """ # sphinx_gallery_thumbnail_number = 6 import numpy as np import pygmt ######################################################################################## # Plot Cartesian Vectors # ---------------------- # # Crea...
import numpy as np import time import utils from scipy.special import gammaln, psi #epsilon eps = 1e-100 class hdsp: """ hierarchical dirichlet scaling process (hdsp) """ def __init__(self, num_topics, num_words, num_labels, dir_prior=0.5): self.K = num_topics # number of topics ...
"""Alexa capabilities.""" from datetime import datetime import logging from homeassistant.const import ( ATTR_SUPPORTED_FEATURES, ATTR_TEMPERATURE, ATTR_UNIT_OF_MEASUREMENT, STATE_LOCKED, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNLOCKED, ) import homeassistant.components.climate.c...
import numpy as np from pandas._libs import (index as libindex, algos as libalgos, join as libjoin) from pandas.core.dtypes.common import ( is_dtype_equal, pandas_dtype, is_float_dtype, is_object_dtype, is_integer_dtype, is_bool, is_bool_dtype, is_scalar) from p...
from __future__ import absolute_import from builtins import str import re import sys import traceback from flask import current_app from flask import request import json from requests.exceptions import Timeout, ConnectTimeout, ReadTimeout, ConnectionError import timeout_decorator import datetime from .client import cli...
# Copyright 2011 OpenStack Foundation # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
from __future__ import print_function import os import time import json import argparse import densenet import numpy as np import keras.backend as K from keras.datasets import cifar10 from keras.optimizers import Adam from keras.utils import np_utils def run_cifar10(batch_size, nb_epoch, ...
import json import logging import os import subprocess import textwrap import uuid import boto3 import passlib.hash import pytest from dcos_installer import backend from dcos_installer.config import Config, make_default_config_if_needed, to_config os.environ["BOOTSTRAP_ID"] = "12345" def test_password_hash(): ...
""" Setup logging handler to write syslog-like messages to file or to syslog. Logging handlers can be set upto write to a file or to the system syslog facility. If writing to a file, then file rotation parameters are configurable. The logging handler is created and configured by calling one of the functions in this ...
#!/usr/bin/env python3 """ This file is part of Mbed TLS (https://tls.mbed.org) Copyright (c) 2018, Arm Limited, All Rights Reserved Purpose This script checks the current state of the source code for minor issues, including incorrect file permissions, presence of tabs, non-Unix line endings, trailing whitespace, pr...
''' API for the laws app ''' import logging from django.core.urlresolvers import reverse from tastypie.constants import ALL import tastypie.fields as fields from agendas.templatetags.agendas_tags import agendas_for from apis.resources.base import BaseResource from mks.models import Member, Party from mks.api import M...
# Main help from http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm # also see http://effbot.org/zone/simple-top-down-parsing.htm from abc import ABCMeta, abstractproperty, abstractmethod import re from logic.language import PropositionalConstant from logic.syntax import SimpleSentence, Negation, Conjunction, Disjuncti...
from __future__ import unicode_literals from django.conf.urls import url from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings from django.utils import six import rest_framework.utils.model_meta from rest_framework.compat import _resolve_model from rest_framework....
# Generated by Django 2.1.3 on 2018-11-20 22:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import taggit.managers import wagtail.core.models import wagtail.images.models import wagtail.search.index # Functions from wagtail.images.migrations.0002_initia...
# -*- coding: utf-8 -*- # # Copyright 2019 Spotify AB # # 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 a...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008 Adroll.com and Valentino Volonghi <dialtone@adroll.com> # 20090113 Frank Scholz <coherence@beebits.net> # renamed watch() kwarg autoAdd back to auto_add, to not break # existing applications from twisted.internet import...
""" file: gnuplot.py authors: Matt Rasmussen date: 11/30/05 Plotting classes and functions: GNUPLOT wrapper """ import copy import os INF = 1e1000 class Gnuplot: class Plot: def __init__(self, xlist, ylist, zlist, options): self.xlist = copy.copy(xlist) self.ylist = copy.co...
"""Debug Plugin for EasyEngine""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from ee.core.shellexec import * from ee.core.mysql import EEMysql from ee.core.services import EEService from ee.core.logging import Log from ee.cli.plugins.site_functions import logw...
# VMware vCloud Python SDK # Copyright (c) 2014 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 # # Unless...
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku - Use sentry for error logging ''' from __future__ import absolute_import, unicode_literals from boto.s3.connection import Ordinar...
"""Contains the base class for flippers.""" from typing import List from typing import Optional from mpf.core.events import event_handler from mpf.core.platform_controller import HardwareRule, EosRuleSettings from mpf.core.device_monitor import DeviceMonitor from mpf.core.platform_controller import SwitchRuleSettings...
import cv2 import cv2.cv as cv import numpy as np import signal, os, subprocess, sys import time import threading import requests import io from picamera.array import PiRGBArray from picamera import PiCamera import RPi.GPIO as GPIO #GPIO.setmode(GPIO.BCM) from fractions import Fraction # #GPIO.setup(18, GPIO.OUT) ...
""" Benchmarks for sampling without replacement of integer. """ from __future__ import division from __future__ import print_function import gc import sys import optparse from datetime import datetime import operator import matplotlib.pyplot as plt import numpy as np import random from sklearn.utils.random import s...
""" kombu.pidbox =============== Generic process mailbox. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import socket from copy import copy from itertools import count from .entity import Exchange, Queue from .messaging import Con...
def option_price_call_american_binomial(S, K, r, sigma, t, steps): """American Option (Call) using binomial approximations Converted to Python from "Financial Numerical Recipes in C" by: Bernt Arne Odegaard http://finance.bi.no/~bernt/gcc_prog/index.html @param S: spot (underlying) price @param...
import subprocess import tempfile import shutil #import fdfgen import re import string import codecs import logging import uuid from xfdfgen import Xfdf import yaml import PyPDF2 as pypdf #import pypdftk from PIL import Image from docassemble.base.error import DAError from docassemble.base.pdfa import pdf_to_pdfa from ...
# -*- coding: utf-8 -*- from __future__ import with_statement import sys from django.contrib.admin.models import CHANGE, LogEntry from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers imp...
# 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...
import pytest import re from spacy.lang.en import English from spacy.matcher import Matcher from spacy.tokens import Doc, Span pattern1 = [{"ORTH": "A"}, {"ORTH": "A", "OP": "*"}] pattern2 = [{"ORTH": "A", "OP": "*"}, {"ORTH": "A"}] pattern3 = [{"ORTH": "A"}, {"ORTH": "A"}] pattern4 = [{"ORTH": "B"}, {"ORTH": "A", "...
# -*- coding: utf-8 -*- """ nexmo sms gateway backend. (https://www.nexmo.com/) Author: Alican Toprak (a.toprak@northernbitcoin.com) ~~~~~~~~~~~~~~~~~~~~~~ """ import logging from django.conf import settings import requests from .base import BaseSmsBackend logger = logging.getLogger("nexmo") try: from json ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=no-self-use, pointless-statement, missing-docstring, no-member, len-as-condition import re from functools import partial from rebulk.pattern import FunctionalPattern, StringPattern, RePattern from ..rebulk import Rebulk from ..validators import chars_surr...
"""This example shows how to browse the object tree and enlarge tables. Before to run this program you need to execute first tutorial1-1.py that create the tutorial1.h5 file needed here. """ import tables as tb print() print('-**-**-**-**- open the previous tutorial file -**-**-**-**-**-') # Reopen the file in app...
""" Stack-In-A-WSGI: stackinawsgi.session.session.Session testing """ import unittest from threading import Lock import uuid import ddt import mock from stackinabox.stack import StackInABox from stackinabox.services.hello import HelloService from stackinawsgi.exceptions import ( InvalidSessionId, InvalidServ...
import inspect import types as python_types import warnings from ..engine.topology import Layer, InputSpec from .. import backend as K from ..utils.generic_utils import func_dump, func_load from .. import regularizers from .. import constraints from .. import activations from .. import initializers class Merge(Layer...
# # 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 typing import Optional from lxml import etree from great_expectations.core.expectation_configuration import ExpectationConfiguration from great_expectations.execution_engine import ( PandasExecutionEngine, SparkDFExecutionEngine, ) from great_expectations.expectations.expectation import ( ColumnMapEx...
# encoding: 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 'Race.reach' db.add_column('dnd_race', 'reach', self.gf('django.db.models.fields.PositiveSm...
# Copyright 2018 The TensorFlow Probability 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...
import unittest import numpy import pytest from chainerx_tests import array_utils import chainer.testing import chainerx import chainerx.testing from chainerx_tests import dtype_utils from chainerx_tests import math_utils from chainerx_tests import op_utils @op_utils.op_test(['native:0', 'cuda:0']) @chainer.testin...
import usb import logging ################ # IBUDDY class ################ class BuddyDevice: SETUP = (0x22, 0x09, 0x00, 0x02, 0x01, 0x00, 0x00, 0x00) MESS = (0x55, 0x53, 0x42, 0x43, 0x00, 0x40, 0x02) LEFT = 0 RIGHT = 1 UP = 0 DOWN = 1 finalMess = 0xFF battery = 0 product =...
"""High level parallel SNP and indel calling using multiple variant callers. """ import os import collections import copy import pprint import toolz as tz from bcbio import bam, utils from bcbio.cwl import cwlutils from bcbio.distributed.split import (grouped_parallel_split_combine, parallel_split_combine) from bcbio...
""" Data structures for sparse float data. Life is made simpler by dealing only with float64 data """ # pylint: disable=E1101,E1103,W0231 from pandas.compat import range, lrange, zip from pandas import compat import numpy as np from pandas.core.index import Index, MultiIndex, _ensure_index from pandas.core.frame imp...
""" Module for adaptive stochastic descent optimization """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import zip from builtins import range from builtins import open from builtins import str from...
<<<<<<< HEAD <<<<<<< HEAD """\ A library of useful helper classes to the SAX classes, for the convenience of application and driver writers. """ import os, urllib.parse, urllib.request import io import codecs from . import handler from . import xmlreader def __dict_replace(s, d): """Replace substrings of a string...
import os import re import unittest from parameterized import parameterized from conans.client import tools from conans.client.build.msbuild import MSBuild from conans.test.utils.mocks import MockSettings, MockConanfile class MSBuildTest(unittest.TestCase): def test_dont_mess_with_build_type(self): set...
from __future__ import absolute_import import sys import os import errno import types import gc import signal import traceback from gevent.event import AsyncResult from gevent.hub import get_hub, linkproxy, sleep, getcurrent from gevent.fileobject import FileObject from gevent.greenlet import Greenlet, joinall spawn = ...
# 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 applica...
#!/usr/bin/env python """Class for querying the Twitter API""" __author__ = "Peter J Usherwood" __python_version__ = "3.5" import json import os import tweepy import time from datetime import datetime import math import io from tweepy.streaming import StreamListener from tweepy import Stream import re from requests...
# 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 with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# -*- coding: utf-8 -*- import lang.mqllex as mqllex import yacc.yacc as yacc from lang.mqllex import tokens precedence = ( ('left', 'PLUS', 'MINUS'), ('left', 'MULTIPLY', 'DIVIDE'), ('left', 'POWER'), ('right', 'UMINUS') ) def p_program(p): """program : program command | command ...
# Copyright 2014 eBay Inc. # # Author: Ron Rickard <rrickard@ebaysf.com> # # 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 require...
import logging import os import warnings from great_expectations.datasource.batch_kwargs_generator.batch_kwargs_generator import ( BatchKwargsGenerator, ) from great_expectations.datasource.types import PathBatchKwargs from great_expectations.exceptions import BatchKwargsError logger = logging.getLogger(__name__)...
from __future__ import division, print_function import json import numpy as np from keras.utils.data_utils import get_file from keras.models import Sequential from keras.layers.core import Flatten, Dense, Dropout, Lambda from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.opti...
# Copyright 2020 DeepMind Technologies Limited. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
""" The setup package to install SeleniumBase dependencies and plugins. (Uses selenium 3.x and is compatible with Python 2.7+ and Python 3.5+) """ from setuptools import setup, find_packages # noqa: F401 import os import sys this_dir = os.path.abspath(os.path.dirname(__file__)) long_description = None total_descrip...
# Copyright 2006 James Tauber and contributors # # 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 agre...
""" A Python CLI interface that utilizes the Cisco UCS SDK to: - Connect to a UCSM domain - View and Add VLANs - Add a VLAN to a vNIC Please note that there is very little error handling present so proceed accordingly. """ from UcsSdk import UcsHandle from UcsSdk import UcsUtils from UcsSdk.MoMeta.FabricVlan impor...
"""Base for all node resource services. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import collections import errno import glob import io import logging import os import socket import struct import ...
# Copyright 2017, Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2012-2013 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 # # Unless required by applicable law or...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
"""Support for displaying collected data over SNMP.""" from datetime import timedelta import logging import pysnmp.hlapi.asyncio as hlapi from pysnmp.hlapi.asyncio import ( CommunityData, ContextData, ObjectIdentity, ObjectType, SnmpEngine, UdpTransportTarget, UsmUserData, getCmd, ) imp...