gt
stringclasses
1 value
context
stringlengths
2.49k
119k
<<<<<<< HEAD <<<<<<< HEAD import os from tkinter import * import tkinter.messagebox as tkMessageBox class FileList: # N.B. this import overridden in PyShellFileList. from idlelib.EditorWindow import EditorWindow def __init__(self, root): self.root = root self.dict = {} self.inver...
#!/usr/bin/env python __author__ = 'alex' import pymongo from collections import OrderedDict from datetime import datetime,timedelta import unicodecsv as csv import sys import os import time if (len(sys.argv) == 2 and sys.argv[1]!="ALL") or (len(sys.argv)==1) or (len(sys.argv) < 3 and sys.argv[1]!="ALL"): print "Usa...
from JumpScale import j from time import sleep class Startable: """ This class to ensure that things get installed and started only once """ def __init__(self): self.installed = False self.started = False def _install(self): self.installed = True def _start(self): ...
import logging from tempfile import mkstemp import urllib import urlparse def url(base, seg, query=None): """ Create a URL from a list of path segments and an optional dict of query parameters. """ def clean_segment(segment): """ Cleans the segment and encodes to UTF-8 if the segme...
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2015-2016 Indiana University # # This file is part of AEGeAn (http://github.com/BrendelGroup/AEGeAn) and is # licensed under the ISC license: see LICENSE. # -----------------------------------------...
# 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 # d...
from jsonschema import Draft4Validator, validators import yaml from collections import OrderedDict from textwrap import wrap as _wrap def ordered_load(stream, Loader=yaml.Loader, object_pairs_hook=OrderedDict): """ Load YAML into an ordered dictionary to maintain key sorting. """ class OrderedLoader(L...
# Copyright 2008-2013 Nokia Siemens Networks Oyj # # 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...
############################################################################# # Copyright (c) 2010 by Casey Duncan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source c...
from django.db import NotSupportedError from django.db.models import Index from django.utils.functional import cached_property __all__ = [ 'BloomIndex', 'BrinIndex', 'BTreeIndex', 'GinIndex', 'GistIndex', 'HashIndex', 'SpGistIndex', ] class PostgresIndex(Index): @cached_property def max_name_length(...
import json import threading from collections import defaultdict from contextlib import contextmanager from typing import Any, Dict, Iterable, Iterator, List, Optional from asgiref.sync import async_to_sync from mypy_extensions import TypedDict from .cache import element_cache, get_element_id from .stream import stre...
# -*- coding: utf-8 -*- """ Sahana Eden Content Management System Model @copyright: 2012-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 ...
""" Transform images in a directory Usage: transform.py [-hv] transform.py [-a -b -g -s PERCENTAGE] <INPUT_PATH> <OUTPUT_PATH> Arguments: INPUT_PATH : Path to the input directory where images are stored OUTPUT_PATH : Path to the output directory where resulting...
"""The tests the MQTT alarm control panel component.""" import copy import json from unittest.mock import patch import pytest from homeassistant.components import alarm_control_panel from homeassistant.components.mqtt.alarm_control_panel import ( MQTT_ALARM_ATTRIBUTES_BLOCKED, ) from homeassistant.const import ( ...
#!/usr/bin/env python # # Copyright (C) 2013 The Android Open Source 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 # # Unless req...
__all__ = ["Encoder"] import re import struct from array import array import pyconspack.header as H import pyconspack.types as T import pyconspack.error as E import pyconspack.index as I class EncodedObject: def __init__(self, typename, val): self.typename = typename self.val = val class Encode...
# # Copyright (c) 2011, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of co...
#-*- coding:utf-8 -*- # Copyright 2017 Xiaomi, 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...
from conans.errors import ConanException import unittest from conans.model.settings import Settings from conans.model.config_dict import bad_value_msg, undefined_field, undefined_value class SettingsTest(unittest.TestCase): def setUp(self): data = {"compiler": { "Visual Studio...
#!/usr/bin/env python # NB: Before sending a PR to change the above line to '#!/usr/bin/env python2', please read https://github.com/themadinventor/esptool/issues/21 # # ESP8266 ROM Bootloader Utility # https://github.com/themadinventor/esptool # # Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton, other contribut...
title = 'methoxy decomposition to H + CH2O' description = \ frequencyScaleFactor = 1.0 """ This example illustrates how to manually set up a CanTherm input file for a small P-dep reaction system [using only the RRHO assumption, and without tunneling, although this can be easily implemented]. Such a calculation is des...
# Copyright 2017-present Open Networking 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 or agr...
#!/usr/bin/python3 """CLI-frontend for WebAdvisor, OU's management software. WebAdvisor is used in a lot of places (oasis.oglethorpe.edu, wa.gcccd.edu, webadvisor.coastal.edu, etc.), and the WebAdvisor class is, for the most part, compatible with all of them. Any specific sites will require code written for them (diffe...
"""Component to count within automations.""" import logging import voluptuous as vol from homeassistant.const import CONF_ICON, CONF_MAXIMUM, CONF_MINIMUM, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_component import EntityComponent from homeassistant.helpers.resto...
""" The below is a list of many factors. Taken from several sources, these factors have been forecast to generate alpha signals either alone or in combination with eachother. These can form the basis of factors trading algoithms. NB: Morningstar cash_flow_statement, income_statement, earnings_report are quarterly NB: M...
# 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...
from __future__ import absolute_import from __future__ import print_function from contextlib import contextmanager from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sized, Tuple, Union, Text) from django.core.urlresolvers import resolve from django.conf imp...
# Copyright 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 # # Unless required by applicable law or agreed to in writing, ...
# Copyright (c) 2017 Huawei Technologies Co., Ltd. # 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 # # ...
import shopify from test.test_helper import TestCase import hmac from hashlib import sha256 import time from six.moves import urllib from six import u class SessionTest(TestCase): def test_not_be_valid_without_a_url(self): session = shopify.Session("", "any-token") self.assertFalse(session.valid) ...
# Compute the two-sided one-sample Kolmogorov-Smirnov Prob(Dn <= d) where: # D_n = sup_x{|F_n(x) - F(x)|}, # F_n(x) is the empirical CDF for a sample of size n {x_i: i=1,...,n}, # F(x) is the CDF of a probability distribution. # # Exact methods: # Prob(D_n >= d) can be computed via a matrix algorithm of Durbin...
import time import uuid from cassandra import ConsistencyLevel, Unauthorized from cassandra.query import SimpleStatement from tools.assertions import assert_invalid from dtest import Tester from tools.decorators import since def listify(item): """ listify a query result consisting of user types returns...
# # Copyright (c) SAS Institute 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 w...
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Button, Slider from matplotlib import path from matplotlib.patches import Polygon from clustering import clustering_ import common import pickle from digraph import draw_transition_table def add_buttons(self): ######################...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Routines to read galaxy catalogs from disk. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from os.path import dirname, abspath, splitext, exists as file_exists,\ join as pjoin import numpy as np tr...
# # Copyright (c) SAS Institute 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 w...
#!/usr/bin/env python2 # -*- coding: <utf-8> -*- """Hovering script""" from math import sin, cos, pi, atan2, sqrt from time import sleep from rospy import init_node, Subscriber, spin, Publisher, Time from geometry_msgs.msg import Twist, PoseStamped from tf.transformations import quaternion_inverse, quaternion_multipl...
import warnings import numpy as np from .common import Benchmark, safe_import, is_xslow with safe_import(): import scipy.stats as stats with safe_import(): from scipy.stats._distr_params import distcont, distdiscrete try: # builtin lib from itertools import compress except ImportError: pass class ...
import argparse import torch import torch.nn.functional as F from torch.utils.data import DataLoader from ogb.linkproppred import PygLinkPropPredDataset, Evaluator from logger import Logger class LinkPredictor(torch.nn.Module): def __init__(self, in_channels, hidden_channels, out_channels, num_layers, ...
"""Common settings and globals.""" from os import environ from os.path import abspath, basename, dirname, join, normpath from sys import path # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.exceptions import ImproperlyConf...
import numpy as np import matplotlib.pyplot as plt import h5py def sigmoid(Z): """ Implements the sigmoid activation in numpy Arguments: Z -- numpy array of any shape Returns: A -- output of sigmoid(z), same shape as Z cache -- returns Z as well, useful during backpropagation ...
# -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, (C) 2015 Minio, 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/licen...
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
""" Functions for retrieving data from and manipulating dictionaries. """ from __future__ import absolute_import from copy import deepcopy from .strings import camelize, underscore DATA_ELEMENT_SEPARATOR = '/' class MissingKeyException(Exception): pass def must_deep_get(data, path): """ Retrieve a deep...
"""regression.py Regression test for the Tarsqi components. Currently only for Evita and within evita only loads some verbal event cases. USAGE, this needs to be run from the parent directory with the -m option: $ python -m testing.regression --evita Runs all available Evita tests and stores the results in direc...
import sys import os import math resultDir = os.environ.get('RESULTS') if resultDir == None : print ("WARNING! $RESULTS not set! Attempt to write results will fail!\n") # Expecting input botConc, topConc, rateConstFull, sysSize, analInterval, numStepsEquilib, numStepsSnapshot, numStepsAnal, numStepsReq, numPasses...
#!/usr/bin/python2.4 # # Copyright 2010 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...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of bzz. # https://github.com/heynemann/bzz # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2014 Bernardo Heynemann heynemann@gmail.com import locale import mongoengine import cow.server as server import ...
from fabric.api import * from fabric.contrib.files import upload_template, append, comment from StringIO import StringIO import server import uuid import time import socket import pyproxmox DEBIAN_TEMPLATE = "debian-7.0-standard_7.0-2_i386.tar.gz" NGINX_IP = '10.7.0.1' NGINX_NAME = 'nginx' GESTION_IP = '10.7.0.2'...
# # Copyright 2009 Facebook # # 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...
import unittest import os import signal import time import random import socket from crate.testing.layer import CrateLayer from crate.client.http import Client from .paths import crate_path from .ports import public_ipv4, random_available_port from lovely.testlayers.layer import CascadedLayer class GracefulStopCrateL...
import warnings from datetime import datetime, timedelta import datetime as pydt import numpy as np from dateutil.relativedelta import relativedelta import matplotlib.units as units import matplotlib.dates as dates from matplotlib.ticker import Formatter, AutoLocator, Locator from matplotlib.transforms import nonsin...
from annotefinder import AnnoteFinder from math import ceil import numpy as np import scipy import evaluate import morpho import matplotlib from scipy.ndimage import label plt = matplotlib.pyplot cm = plt.cm from itertools import cycle label=scipy.ndimage.measurements.label center_of_mass=scipy.ndimage.measurements.ce...
import datetime import logging import itertools import time import mock import contextlib2 as contextlib import pytest from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from vcr.cassette import Cassette, CassetteContextDecorator from . import util from okcupyd import db, settings from okcup...
# -*- coding: utf-8 -*- """Jobs for S3 files.""" import os from ..aws.s3 import file as s3file from .exceptions import FileDoesNotExist from .exceptions import ImproperlyConfigured from .exceptions import MissingKey from .exceptions import ResourceAlreadyExists from .exceptions import ResourceDoesNotExist from .exc...
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> %matplotlib inline import pandas as pd import argparse import os import matplotlib.pyplot as plt import numpy as np # <codecell> def rmspe(tru, pred): if tru==0.0 or isinstance(tru, str) or np.isnan(tru) or np.isnan(pred): return 0.0 re...
import requests BASE_URI = "http://js8:5000" class Client: def __init__(self): self.url = BASE_URI self.session = requests.Session() self.auth_header = '' def set_auth_header(self, val): ''' set authorization header value''' self.auth_header = val def update(sel...
# -*- coding: utf-8 -*- from collections import defaultdict from itertools import groupby import operator import warnings from django.contrib.sites.models import Site, SITE_CACHE from django.shortcuts import get_object_or_404 from django.template import NodeList, VariableNode, TemplateSyntaxError from django.template....
# Copyright 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from __future__ import unicode_literals import boto from boto.route53.healthcheck import HealthCheck from boto.route53.record import ResourceRecordSets import sure # noqa from moto import mock_route53 @mock_route53 def test_hosted_zone(): conn = boto.connect_route53('the_key', 'the_secret') firstzone = co...
# # Preferences.py -- Preferences plugin for Ginga channels # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import math from ginga.gw import Widgets from ginga.misc import ParamSet, Bunch from ginga import cmap, imap, trcalc from ginga import GingaPlugin ...
from sqlalchemy.testing import fixtures from sqlalchemy.testing.util import gc_collect from sqlalchemy.testing import assert_raises_message, is_, eq_ from sqlalchemy import exc, MetaData from sqlalchemy.ext.declarative import clsregistry import weakref class MockClass(object): def __init__(self, base, name): ...
# 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 2010-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 required by ap...
# Copyright (C) 2015-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import re import requests # Disable requests/urllib3 debug & info messages. logging.getLogger("requests").setLevel(logging.WARNING) log...
from datetime import datetime from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.backends import RemoteUserBackend from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase from django.ut...
from __future__ import absolute_import, unicode_literals from pytest import fixture, raises from mock import patch from brownant import Brownant, redirect from brownant.exceptions import NotSupported class StubEndpoint(object): name = __name__ + ".StubEndpoint" def __init__(self, request, id_, **kwargs): ...
#!/usr/bin/env python """ Show Botan module dependencies as a list or graph. Requires graphviz from pip when graphical output is selected: https://pypi.python.org/pypi/graphviz (C) 2015 Simon Warta (Kullo GmbH) Botan is released under the Simplified BSD License (see license.txt) """ # global import argparse import...
# -*- coding: utf-8 -*- # 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 # # Un...
# Copyright (C) 2003-2005 Peter J. Verveer # # 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 list of conditions and the following d...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
"""Test the cross_validation module""" from __future__ import division import warnings import numpy as np from scipy.sparse import coo_matrix from scipy import stats from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from ...
#!/usr/bin/env python from __future__ import print_function import string import sys import os import codegen # Command-line flags. OPT_QUIET = 1 # The lexer has several contexts in which it operates. # # fileScope is the default state of the lexer, where it has no idea what the # next input token will be. # # le...
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
# 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/...
from __future__ import absolute_import import re from collections import namedtuple, defaultdict from copy import deepcopy from datetime import datetime import six from django.utils.functional import cached_property from parsimonious.expressions import Optional from parsimonious.exceptions import IncompleteParseError...
#!/usr/bin/env python # Created on: October 21, 2013 __author__ = "Sven Kreiss, Kyle Cranmer" __version__ = "0.1" __description__ = """ Creates a 2-bin counting model using HistFactory. """ import optparse parser = optparse.OptionParser(version=__version__, description=__description__) parser.add_option( "--...
# -*- coding: utf-8 -*- """ abstract model adapters ~~~~~~~~~~~~~~~~~~~~~~~ :author: Sam Gammon <sg@samgammon.com> :copyright: (c) Sam Gammon, 2014 :license: This software makes use of the MIT Open Source License. A copy of this license is included as ``LICENSE.md`` in the root of t...
# (c) Copyright 2014 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 # # http://www.apache.org/licenses...
from io import StringIO from itertools import islice from openpyxl import load_workbook from time import strftime import argparse import csv import os import sys import warnings # --- # GET ARGUMENTS # --- # see https://docs.python.org/3/howto/argparse.html parser = argparse.ArgumentParser(description='Convert XLS...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- #======================================================================= # # view_rnd.py # ------------- # Accepts a file with random data (bytes) and generates a picture # with the pixels representing the contents of the file. # # Note: This program requires the Python Im...
# -*- coding: windows-1251 -*- import pandas as pd import numpy as np from xml.etree import ElementTree import shutil import os.path import os import datetime import calendar import glob address = 'ADDRESS.CSV' client_dog = 'CL_CLIENT_DOG.CSV' client = 'CL_CLIENTS.CSV' passport = 'CL_CLIENTS_PASPORT.CSV' c...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2015 Tom Barron. 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.a...
#!/usr/bin/env python # # Merge multiple JavaScript source code files into one. # # Usage: # This script requires source files to have dependencies specified in them. # # Dependencies are specified with a comment of the form: # # // @requires <file path> # # e.g. # # // @requires Geo/DataSource.js # # This scri...
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...
#!/usr/bin/env python # Copyright 2015 tsuru-pool-recycle-plugin 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 os import sys import argparse import socket import time from urlparse import urlparse try: from tsuruclient ...
#!/usr/bin/env python """Setup a python virtual environment to test holland""" import sys, os import signal import shutil import logging import subprocess from optparse import OptionParser from os.path import abspath, join, dirname, basename, expanduser try: import curses curses.setupterm() except ImportError...
from __future__ import print_function from __future__ import unicode_literals import logging import sys import re import signal from inspect import getdoc import dockerpty from .. import __version__ from ..project import NoSuchService, ConfigurationError from ..service import BuildError, CannotBeScaledError from .com...
# Copyright 2013-2015 DataStax, 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 writi...
from django.db import transaction from django.utils.translation import ugettext as _ from openslides.poll.serializers import default_votes_validator from openslides.utils.rest_api import ( CharField, DictField, IntegerField, ModelSerializer, PrimaryKeyRelatedField, SerializerMethodField, Va...
# 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 ...
# coding: utf-8 """Tornado handlers for WebSocket <-> ZMQ sockets.""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os import json import struct import warnings import sys try: from urllib.parse import urlparse # Py 3 except ImportError: from urlp...
import numpy as np from union_of_transforms import random_submatrix from dl_simulation import * from analyze_predictions import * from scipy.spatial import distance from sklearn.cluster import SpectralClustering from sparse_optimization import SparseOptimization def get_variable_Phi_y(Phi_f,Y_f,pv,g,s,X0,snr): pf = P...
# # 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...
# # 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...
# Author: Wei Xue <xuewei4d@gmail.com> # Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clauseimport warnings import sys import warnings import numpy as np from scipy import stats, linalg from sklearn.covariance import EmpiricalCovariance from sklearn.datasets.samples_generator import...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Nicira, 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 # #...
# -*- coding: utf-8 -*- """ =============================================================================== Generating a stimulus from an image =============================================================================== *This example shows how to use images as input stimuli for a retinal implant.* In addition to ...