gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
#-*- coding: utf-8 -*- """ Interact with the client. """ from django.shortcuts import render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.views.decorators.csrf import csrf_exempt from django.conf import settings from django.template import RequestContext from oauth2app.models im...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- """Parsers for MacOS fseventsd files.""" import os from dfdatetime import semantic_time as dfdatetime_semantic_time from dfvfs.resolver import resolver as path_spec_resolver from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions from pl...
import unittest from pyorient.serializations import OrientSerialization from pyorient.otypes import OrientBinaryObject, OrientRecord def binary_db_connect(): import pyorient DB = pyorient.OrientDB("localhost", 2424, OrientSerialization.Binary) DB.connect("root", "root") db_name = "binary_test" tr...
import numpy as np from .core import Nominable from .params import Parameters, Scale, Precision from csb.core import validatedproperty class Probability(Nominable): """Probability Generic class that will be subclassed by all probabilistic models. """ def log_prob(self): raise NotImplementedE...
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from threading import Thread import time from mcrouter.test.MCProcess import McrouterClient, Memcached, Mcrouter fr...
import logging from collections import Iterable from inspect import isclass, isroutine, getmembers from shark.common import Default from shark.dependancies import escape_url, escape_html class BaseParamConverter(object): @classmethod def convert(cls, value, parent_object): return value class Enumer...
# Copyright 2021 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 os import sys import os.path import logging import time import pprint import shutil import traceback import settings import pArch import dbPhashApi as dbApi import scanner.fileHasher PHASH_DISTANCE_THRESHOLD = 2 BAD_PHASHES = [ # Phash value of '0' is commonly a result of an image where there is no conte...
# coding: utf-8 """ Provides test-related code that can be used by all tests. """ import os import pystache from pystache import defaults from pystache.tests import examples # Save a reference to the original function to avoid recursion. _DEFAULT_TAG_ESCAPE = defaults.TAG_ESCAPE _TESTS_DIR = os.path.dirname(pystac...
# 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 os import os.path import re import codecs import fnmatch import logging import itertools from .utils import (PageNotFoundError, NamespaceNotFoundError, split_page_url) META_ENDPOINT = '_meta' logger = logging.getLogger(__name__) valid_filename_pattern = re.compile('^[\w \.\-\(\)\[\]\\/]+$...
########################################################################## # # Copyright 2012 Jose Fonseca # All Rights Reserved. # # 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 res...
'''test_jutil.py - test the high-level interface python-javabridge is licensed under the BSD license. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2013 Broad Institute All rights reserved. ''' import gc import os import numpy as np ...
from common_fixtures import * # NOQA RCCOMMANDS_SUBDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'resources/rccmds/v2') logger = logging.getLogger(__name__) start_project_str = "Starting" if_compose_data_files = pytest.mark.skipif( not os.path.isdir(RCCOMMANDS_...
#!/usr/bin/python # Copyright 2011 Software Freedom Conservancy. # # 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 app...
# -*- coding: utf-8 -*- """ pyte.screens ~~~~~~~~~~~~ This module provides classes for terminal screens, currently it contains three screens with different features: * :class:`~pyte.screens.Screen` -- base screen implementation, which handles all the core escape sequences, recognized by ...
#!/usr/bin/env python # coding: utf-8 """ This script supports publishing Pystache to PyPI. This docstring contains instructions to Pystache maintainers on how to release a new version of Pystache. (1) Prepare the release. Make sure the code is finalized and merged to master. Bump the version number in setup.py, u...
import yaml from scoring_engine.config import config from scoring_engine.engine.engine import Engine from scoring_engine.models.team import Team from scoring_engine.models.user import User from scoring_engine.models.service import Service from scoring_engine.models.account import Account from scoring_engine.models.en...
# vim: set expandtab ts=4 sw=4 filetype=python fileencoding=utf8: import copy import logging import textwrap import psycopg2.extras from profiles.pg import RelationWrapper log = logging.getLogger(__name__) class IndicatorsFactory(psycopg2.extras.CompositeCaster): def make(self, values): d = dict(zip(s...
"""Test different accessory types: Camera.""" from uuid import UUID from pyhap.accessory_driver import AccessoryDriver import pytest from homeassistant.components import camera, ffmpeg from homeassistant.components.homekit.accessories import HomeBridge from homeassistant.components.homekit.const import ( AUDIO_C...
# -*- coding: utf-8 -*- ########################################################################### ## Python code generated with wxFormBuilder (version Oct 26 2018) ## http://www.wxformbuilder.org/ ## ## PLEASE DO *NOT* EDIT THIS FILE! ########################################################################### impor...
#!/usr/bin/env python """ Artificial Intelligence for Humans Volume 3: Deep Learning and Neural Networks Python Version http://www.aifh.org http://www.jeffheaton.com Code repository: https://github.com/jeffheaton/aifh Copyright 2015 by Jeff Heaton Licensed under the Apache License, V...
""" G R A D I E N T - E N H A N C E D N E U R A L N E T W O R K S (G E N N) Author: Steven H. Berguin <steven.berguin@gtri.gatech.edu> This package is distributed under New BSD license. """ from smt.surrogate_models.surrogate_model import SurrogateModel from smt.utils.neural_net.model import Model import numpy...
# 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 u...
import ipaddress import hashlib import time import struct import nacl.secret import urllib.parse from base64 import urlsafe_b64encode, urlsafe_b64decode from bitstring import BitArray from .utils import pad, depad class Nut(object): """A class encompassing SQRL nuts. The server should not need to use this cl...
import os.path from datetime import datetime, timedelta import json import time from osgeo import ogr, osr OTP_ROUTER_EPSG = 4326 LOCATION_NAME_FIELD = "Name" ID_FIELD = "id" TIME_FIELD = "time" def rasterName(loc_name, date, time, base_path=None, suffix=None): fname = str.replace(loc_name, ' ', '_') \ ...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# -*- encoding: utf-8 -*- ''' HubbleStack Nova plugin for verifying attributes associated with a mounted partition. Supports both blacklisting and whitelisting patterns. Blacklisted patterns must not be found in the specified file. Whitelisted patterns must be found in the specified file. :maintainer: HubbleStack / b...
""" Comsystem command module. Comm commands are OOC commands and intended to be made available to the Player at all times (they go into the PlayerCmdSet). So we make sure to homogenize self.caller to always be the player object for easy handling. """ from django.conf import settings from src.comms.models import Chann...
import numpy from astLib import astCoords, astWCS from astropy.io import fits from itertools import count, izip from scipy import optimize from scipy.ndimage import zoom def contour_levels(x, y=[], bins=10, levels=(0.68,0.95)): """ Get the contour levels corresponding to a set of percentiles (given as frac...
# -*- coding: utf-8 -*- """ Sphinx test suite utilities ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. This is largely lifted directly from the Sphinx repository, because the Sphinx test directory isn't inclu...
""" The text editor module for pySUMO. The TextEditor widget is the main pySUMO widget. It contains the textual representation of the currently loaded Ontologies allowing conventional kif editing with features such as syntax highlighting and autocompletion. """ from PySide.QtCore import Qt, QRegExp, Slot, QRect, QPoint...
import os from django.conf import settings as dj_settings from django_statsd.clients import statsd from elasticsearch import Elasticsearch from elasticsearch_dsl import Q, Search import olympia.core.logger log = olympia.core.logger.getLogger('z.es') DEFAULT_HOSTS = ['localhost:9200'] DEFAULT_TIMEOUT = 5 def ge...
# -*- coding: utf-8 -*- """Notification tests.""" import django_dynamic_fixture as fixture from unittest import mock from django.contrib.auth.models import AnonymousUser, User from django.http import HttpRequest from django.test import TestCase from django.test.utils import override_settings from messages_extends.mod...
"""Support for Belkin WeMo lights.""" import asyncio import logging from datetime import timedelta import requests import async_timeout from homeassistant import util from homeassistant.components.light import ( Light, ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_TRANSITION, SUPPORT_BRIGHTNESS, SUPPO...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
import unittest import unittest.mock as mock import numpy as np import bson import util.dict_utils as du import util.transform as tf import database.client import metadata.camera_intrinsics as cam_intr import metadata.image_metadata as imeta import core.tests.mock_types as mock_core import core.image_collection import ...
# 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 u...
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # # 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 Licens...
# Third-party import numpy as np # This package from .. import combine, PhaseSpacePosition from ..nbody import DirectNBody from ...potential import Hamiltonian, PotentialBase from ...integrate.timespec import parse_time_specification from ._mockstream import mockstream_dop853, mockstream_dop853_animate from .core impo...
"""Base classes for all estimators.""" # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import copy import inspect import warnings import numpy as np from scipy import sparse from .externals import six ############################################################################### de...
""" Functions for identifying peaks in signals. """ from __future__ import division, print_function, absolute_import import numpy as np from scipy._lib.six import xrange from scipy.signal.wavelets import cwt, ricker from scipy.stats import scoreatpercentile __all__ = ['argrelmin', 'argrelmax', 'argrelextrema', 'fin...
""" Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data')) >>> os.chdir(datadir) """ import os from ..base import (CommandLineInputSpec, Comman...
# Copyright (c) 2015 Mirantis 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 writ...
import mmd as MMD from model_mmd import MMD_GAN, tf, np from utils import variable_summaries from cholesky import me_loss from ops import batch_norm, conv2d, deconv2d, linear, lrelu from glob import glob import os import time class ME_GAN(MMD_GAN): def __init__(self, sess, config, is_crop=True, b...
from collections import Counter import json import base64 import random import re from django.core.files.storage import get_storage_class from django.db import models from django.db.models import ( DateTimeField, TextField, CharField, ForeignKey, IntegerField, BooleanField, F, ManyToManyField, OneToOneField, F...
""" Spatial geometric objects. :Classes: :`Geometry`: base class for all geometries :`Point`: (x, y, z) point :`Point2`: pair of `Point` instances that define a line, or box, etc. :`PPoint`: multiple `Point` instances :`Mesh`: mesh surface made up of triangular faces defined by verticies...
import re from collections import defaultdict from datetime import timedelta from email.headerregistry import Address from typing import Any, Dict, Iterable, List, Optional, Tuple import html2text import lxml.html import pytz from bs4 import BeautifulSoup from django.conf import settings from django.contrib.auth impor...
from ..encoding import wif_to_secret_exponent from ..convention import tx_fee from .Spendable import Spendable from .Tx import Tx from .TxOut import TxOut, standard_tx_out_script from .pay_to import build_hash160_lookup class SecretExponentMissing(Exception): pass class LazySecretExponentDB(object): """ ...
""" Model storage. @author: Gautham Ganapathy @organization: LEMS (http://neuroml.org/lems/, https://github.com/organizations/LEMS) @contact: gautham@lisphacker.org """ import os from os.path import dirname import sys from lems.base.base import LEMSBase from lems.base.map import Map from lems.parser.LEMS import LEMS...
# coding=utf-8 # Copyright 2022 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...
__author__ = 'Jonas Eberle <jonas.eberle@eberle-mail.de>' import subprocess import os import osr import ogr import numpy as np from osgeo import gdal, gdalconst, gdalnumeric, gdal_array import shutil from pyEOM import log LOGGER = log.LOGGER def TestMODISHDFProcessor(): geom = 'POLYGON((7.807615733070551 26.259...
import platform from glom import glom from util import * import nexmo @responses.activate def test_get_balance(client, dummy_data): stub(responses.GET, "https://rest.nexmo.com/account/get-balance") assert isinstance(client.get_balance(), dict) assert request_user_agent() == dummy_data.user_agent @re...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .keylevel import _KeyLevel, LineKey, Regex, BooleanKey from .helpers import ReaderError, SUPPRESS, Namespace from .py23compat import py23_items, py23_values, py23_basestring class _KeyAdder(_KeyLevel): """An abstract base class that ...
# Vendored up-to-date copy of locket.py # Based on https://github.com/mwilliamson/locket.py/pull/8 # flake8: noqa import time import errno import threading import weakref __all__ = ["lock_file"] try: import fcntl except ImportError: try: import ctypes import ctypes.wintypes import m...
# Copyright 2018 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, s...
# Copyright 2018 The Cirq Developers # # 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 in ...
# Copyright 2012 Nebula, 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 agree...
#!/usr/bin/env python # Copyright (c) 2012, AT&T Labs, Yun Mao <yunmao@gmail.com> # 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.apach...
from .constants import MILLI_MICROS,SECOND_MICROS,MINUTE_MICROS import calendar from datetime import datetime from dateutil import parser from dateutil.tz import tzlocal from .error import TimeConstructionError from .sanedelta import SaneDelta import pytz #TODO: ensure that this is immutable, and that addiiton,etc al...
# Copyright 2014 The Oppia 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 ...
# 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...
""" Created on 18/12/2013 @author: Nacho, BorjaGB """ from datetime import datetime from lpentities.computation import Computation from lpentities.data_source import DataSource from lpentities.dataset import Dataset from lpentities.indicator import Indicator from lpentities.instant import Instant from lpentities.lice...
from __future__ import division """ Author: Keith Bourgoin """ __license__ = """ Copyright 2015 Parse.ly, 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/LIC...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicab...
from bs4 import BeautifulSoup import urllib #csv is for the csv writer import csv import smtplib import imapclient """ Included Sources: 1843 Magazine BBC Caixin ChannelNewsAsia ChinaChange China Digital Times ChinaFile China Media Project China Policy Institute Chublic Opinion Dui Hua Human Rights Journal East Asia...
# 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 ...
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import os.path import socket from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url from pip._vendor.urllib3.response import HTTPRes...
# -------------------------------------------------------- # Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- import lmdb import os import sys def wrapper_str(raw_str): if sys.version_info >= (3, 0): return raw_str.encode() return ra...
""" Python Character Mapping Codec tis_620 generated from 'python-mappings/TIS-620.TXT' with gencodec.py. """ # " import codecs # ## Codec APIs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.charmap_encode(input, errors, encoding_table) def decode(self, input, e...
from __future__ import with_statement import operator from nose import SkipTest from ..util import decorator from . import config from .. import util import contextlib class skip_if(object): def __init__(self, predicate, reason=None): self.predicate = _as_predicate(predicate) self.reason = reason...
#!/usr/bin/env python '''Configuration and execution of the actual pipeline. .. This software is released under an MIT/X11 open source license. Copyright 2012-2015 Diffeo, Inc. The :class:`Pipeline` itself consists of a series of :mod:`~streamcorpus_pipeline.stages`. These are broken into several categories: * E...
# 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...
"""Test the cloud.iot module.""" from unittest.mock import patch, MagicMock from aiohttp import web import pytest from homeassistant.core import State from homeassistant.setup import async_setup_component from homeassistant.components.cloud import DOMAIN from homeassistant.components.cloud.const import ( PREF_ENA...
# Copyright 2012 SINA 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 app...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
"""Constants for the Renault integration tests.""" from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY_CHARGING, DEVICE_CLASS_PLUG, DOMAIN as BINARY_SENSOR_DOMAIN, ) from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER_DOMAIN from homeassistant.components.renaul...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
from nose.tools import assert_true from nose.tools import assert_equal from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from scipy.linalg import eigh import numpy as np from numpy.testing import assert_array_almost_equal from numpy.testing import assert_array_...
# -*- coding: utf-8 -*- import abc import collections import re from watson.http import REQUEST_METHODS, MIME_TYPES from watson.common.imports import get_qualified_name __all__ = ('Base', 'Literal', 'Segment', 'RouteMatch') # route: The matched route # params: The parameters that have been matched RouteMatch = collec...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 limitation t...
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
import locale import calendar import pytest import numpy as np import pandas as pd import pandas.util.testing as tm from pandas import (Index, DatetimeIndex, datetime, offsets, date_range, Timestamp) class TestTimeSeries(object): def test_pass_datetimeindex_to_index(self): # Bugs in...
# Copyright 2014 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 ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011-2012 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....
# -*- coding: utf-8 -*- ''' Manage transport commands via ssh ''' # Import python libs import os import time import subprocess # Import salt libs import salt.utils import salt.utils.nb_popen def gen_key(path): ''' Generate a key for use with salt-ssh ''' cmd = 'ssh-keygen -P "" -f {0} -t rsa -q'.for...
# Copyright 2021 The Kubeflow 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 applicabl...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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/l...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import * import unittest import datetime as pydt import logging imp...
# Copyright 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 # # Unless required by applicable law ...
# Author: Mengye Ren (mren@cs.toronto.edu). # # Modified from Tensorflow original code. # Original Tensorflow license shown below. # ============================================================================= # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version ...
#!/usr/bin/env python2 # transpiled with BefunCompile v1.3.0 (c) 2017 import sys import zlib, base64 _g = ("Ah+LCAAAAAAABADtmVc4nG/378eM3vuI3oIUDBmjRY/eJaL3SHRGLzEE0UWCJKJEjQhiCBGd0aJGDZMYwahRRtTBGLZf+R+8Z/vk3de1r73vk/u71vo833U/1zpcfCmU" + "gL8OKWAbM59ivxbUuxvlKvhD3K3C+tanWiVKJkibLzKHRuD1K34xKraiw5eZHW1CNz5pT5yFjsp7...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
#!/usr/bin/env python # # HTTP support for ooni-probe # by Jacob Appelbaum <jacob@appelbaum.net> # Arturo Filasto' <art@fuffa.org> # from socket import gethostbyname import ooni.common import ooni.helpers import ooni.report import urllib2 import httplib from urlparse import urlparse from pprint import pprint import...
from __future__ import absolute_import, unicode_literals import itertools import json from functools import total_ordering from django.core.urlresolvers import reverse from django.forms import widgets from django.forms.utils import flatatt from django.template.loader import render_to_string from django.utils.encoding...
#!/usr/bin/python # Copyright 2014 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. """Runs Closure compiler on JavaScript files to check for errors and produce minified output.""" import argparse import os import re impor...