gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import division, unicode_literals from itertools import permutations, product from random import Random import numpy as np import pytest try: from unittest import mock except ImportError: import mock from catpy import CoordinateTransformer from catpy.spatial import StackOrientation COUNT = ...
from __future__ import unicode_literals import difflib import errno import json import os import posixpath import re import socket import sys import threading import unittest import warnings from collections import Counter from copy import copy from functools import wraps from unittest.util import safe_repr from djan...
# Author: Ovidiu Predescu # Date: July 2011 # # 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 ...
""" Management of Zabbix hosts. :codeauthor: Jiri Kotlin <jiri.kotlin@ultimum.io> """ from collections.abc import Mapping from copy import deepcopy import salt.utils.dictdiffer import salt.utils.json def __virtual__(): """ Only make these states available if Zabbix module is available. """ if "za...
# Copyright (c) 2014 Greg James, Visual6502.org # # 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 the rights # to use, copy, modify, merge, p...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
__author__ = 'Copyright (c) 2013-15 Alan Yorinks All rights reserved.' """ Copyright (c) 2013-15 Alan Yorinks All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 o...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# # Copyright (C) 2008 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 required by applicable la...
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
# Copyright 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 writing, softwa...
# orm/path_registry.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Path tracking utilities, representing mapper graph traversals. """ from .. im...
""" Test the decorators from ``testing.decorators``. """ from __future__ import division, absolute_import, print_function import warnings import pytest from numpy.testing import ( assert_, assert_raises, dec, SkipTest, KnownFailureException, ) try: import nose except ImportError: HAVE_NOSE = False ...
""" Nose test running. This module implements ``test()`` and ``bench()`` functions for NumPy modules. """ from __future__ import division, absolute_import, print_function import os import sys import warnings import numpy as np from numpy.compat import basestring from .utils import import_nose, suppress_warnings ...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
#!/usr/bin/python """ Copyright 2016 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 l...
# apis_v1/views/views_position.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from config.base import get_environment_variable from django.http import HttpResponse import json from ballot.controllers import figure_out_google_civic_election_id_voter_is_watching from ballot.models import OFFICE, CANDIDA...
# coding=utf-8 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2012, Intel Performance Learning Solutions 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 License at # # ...
import re import unicodedata import warnings from gzip import GzipFile from htmlentitydefs import name2codepoint try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.utils.encoding import force_unicode from django.utils.functional import allow_lazy, SimpleLazyObjec...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module implements tools for exposing Python methods as API endpoints. """ from __future__ import absolute_import __all__ = [ "EndpointResponse", "structured", "user_documentation", ] from functools import wraps from json import loads, dum...
# Copyright 2010 the Melange 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 wr...
""" Sikuli script implementation for Python See https://github.com/glitchassassin/lackey """ from zipfile import ZipFile try: import Tkinter as tk import tkFileDialog import tkMessageBox except ImportError: import tkinter as tk from tkinter import filedialog as tkFileDialog from tkinter import...
#!/usr/bin/env python # 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. """Miscellaneous node types. """ import os.path import re import sys from grit import constants from grit import exception from g...
#!/usr/bin/env python from nose.tools import * import networkx from test_graph import BaseAttrGraphTester, TestGraph class BaseMultiGraphTester(BaseAttrGraphTester): def test_has_edge(self): G=self.K3 assert_equal(G.has_edge(0,1),True) assert_equal(G.has_edge(0,-1),False) assert_equ...
from __future__ import unicode_literals import base64 import botocore.client import boto3 import hashlib import io import json import zipfile import sure # noqa from freezegun import freeze_time from moto import mock_lambda, mock_s3, mock_ec2, settings def _process_lamda(pfunc): zip_output = io.BytesIO() z...
#!/usr/bin/env 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. """A git command for managing a local cache of git repositories.""" from __future__ import print_function import errno import logging ...
import sys import unittest from pympler.util.compat import HTMLParser, HTTPConnection, StringIO from pympler.util.compat import Request, urlopen, URLError from socket import error as socket_error from time import sleep from pympler.classtracker import ClassTracker from pympler.garbagegraph import start_debug_garbage...
#!/usr/bin/python #---------------------------------------------------------------------- # Copyright (c) 2013-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without rest...
from numpy import asarray import numpy as np import copy ListType = list TupleType = tuple StringType = str def abut(source, *args): # comment: except for the repetition, this is equivalent to hstack. """\nLike the |Stat abut command. It concatenates two arrays column-wise and returns the result. CAUTIO...
''' receives BGP messages and assign them to the set of SMPC workers ''' import argparse from multiprocessing.connection import Listener import os import Queue from threading import Thread import sys np = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) if np not in sys.path: sys.path.append(np) impor...
import multiprocessing import warnings import numpy import six import chainer from chainer.backends import cuda from chainer.dataset import convert from chainer import reporter from chainer.training.updaters import standard_updater try: from cupy.cuda import nccl _available = True except Exception: _ava...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.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.apach...
# -*- 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...
# Copyright 2013 NEC Corporation # # 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...
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from .error import TweepError from .utils import parse_datetime, parse_html_value, parse_a_href class ResultSet(list): """A list like object that holds results from a Twitter API query.""" def __init__(self, max_id=None, since_id=None...
import fnmatch import functools import io import ntpath import os import posixpath import re import sys from collections import Sequence from contextlib import contextmanager from errno import EINVAL, ENOENT, ENOTDIR from operator import attrgetter from stat import S_ISDIR, S_ISLNK, S_ISREG, S_ISSOCK, S_ISBLK, S_ISCHR,...
# 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 th...
"""Operator classes for eval. """ import operator as op from functools import partial from datetime import datetime import numpy as np import pandas as pd from pandas.compat import PY3, string_types, text_type import pandas.core.common as com from pandas.core.base import StringMixin from pandas.computation.common im...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
from DBUtil import * ##### junction - 202666877 def createjunction4Data(junction_id): connection = MongoClient() db = connection.c3stem_database db.junction.insert({ "_id": junction_id, "west_lane_out":"-19501516#2", "west_lane_out_values":["-19501516#2_0", "-19501516#2_1"], "west_lane_in"...
#!/bin/env python from __future__ import print_function from qds_sdk.qubole import Qubole from qds_sdk.commands import * from qds_sdk.cluster import * import qds_sdk.exception from qds_sdk.scheduler import SchedulerCmdLine from qds_sdk.actions import ActionCmdLine from qds_sdk.report import ReportCmdLine from qds_sdk....
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
from django.contrib import admin from django.forms import ModelForm,HiddenInput # Register your models here. from uwsgi_it_api.models import * class ServerAdmin(admin.ModelAdmin): def memory_status(self): return "available:%d used:%d free:%d" % (self.memory, self.used_memory, self.free_memory) def sto...
import json import pytest from django.utils import timezone from rest_framework_json_api import serializers, views from rest_framework_json_api.renderers import JSONRenderer from example.models import Author, Blog, Comment, Entry # serializers class RelatedModelSerializer(serializers.ModelSerializer): blog = s...
# -*- coding: utf-8 -*- import collections import glob import json import os import sys # thirdparty libraies import click import requests # This package import ar_too as at from ar_too.exceptions import UnknownArtifactoryRestError # "CONSTANTS" FETCH_WHAT_HELP_STR = """ What type of configs you want to fetch. curr...
#!/usr/bin/env python import os import sys import numpy as np import nibabel as nb import argparse import mayavi.mlab as mlab from scai_utils import * COORD_FILE = "/home/cais/STUT/FSDATA/fsaverage2/mri/aparc12_roi_coords.txt" STRUCT_VOL = "/home/cais/STUT/FSDATA/fsaverage2/mri/brain.nii.gz" # STRUCT_VOL = "/home/ca...
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import r...
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.conf import settings from django.core.exceptions import FieldError from django.db import connections from django.db.models.constants import LOOKUP_SEP from django.db.models.fields import DateField, DateTimeField, Field...
from __future__ import absolute_import, division, print_function import os import absl.flags FLAGS = absl.flags.FLAGS # sphinx-doc: training_ref_flags_start def create_flags(): # Importer # ======== f = absl.flags f.DEFINE_string('train_files', '', 'comma separated list of files specifying the data...
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Red Hat, Inc # Written by Seth Vidal <skvidal at fedoraproject.org> # (c) 2014, Epic Games, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
import os import json try: from importlib import reload as reload_module except ImportError: from imp import reload as reload_module try: from urllib.request import urlopen from http.client import HTTPMessage except ImportError: from urllib import urlopen from django.test import TestCase from djan...
""" The Plaid API The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from plaid.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import BitcoinTestFramework from ...
import networkx as nx import matplotlib.pyplot as plt import exact_controllability as ECT from networkx.utils import powerlaw_sequence import operator import random import csv import copy import subprocess, os import time import numpy as np from ControllabilityRobustnessBasedOnEdgeAttack import RandomEdgeAttack from Co...
#!/usr/bin/env python """ This script implements branching and tagging in the DOC group repository, and automates the process of creating sets. """ import os def parse_args (): from optparse import OptionParser parser = OptionParser ("usage: %prog [options] name") parser.add_option ("-A", "--ACE", dest=...
from __future__ import print_function, division import numpy as np import pandas as pd import pytest from sklearn.utils.validation import NotFittedError from sklearn.pipeline import Pipeline from nflwin import preprocessing class TestPipelines(object): """Testing if pipelining cleaning steps works.""" def te...
#!/usr/bin/env python # Copyright 2013 Brett Slatkin # # 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 # # This script defines variables and functions which are needed for # plotting purposes and for using WriteRegularization.py which forms a # regularization matrix by collocation # # Variables in all caps are required for other scripts to run and # this script must also define the slip and fluidi...
# modified from https://github.com/goberoi/cloudy_vision import cv2 from jinja2 import FileSystemLoader, Environment import json import numpy import time import os import pprint import shutil import time import vendors.google import vendors.microsoft import vendors.clarifai_ import vendors.ibm import vendors.cloudsigh...
from __future__ import division import os import sys import time from multiprocessing import Process, Pipe, Pool from math import pi import numpy as np import matplotlib.pyplot as plt from pylab import get_current_fig_manager import networkx as nx import win32api import win32con from screen_capture.localize_map...
# Copyright 2014 Cisco Systems, 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 requir...
""" The :mod:`sklearn.model_selection._search` includes utilities to fine-tune the parameters of an estimator. """ from __future__ import print_function from __future__ import division # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org> # Andreas...
from datetime import timedelta import numpy as np from pandas.core.groupby import BinGrouper, Grouper from pandas.tseries.frequencies import to_offset, is_subperiod, is_superperiod from pandas.tseries.index import DatetimeIndex, date_range from pandas.tseries.tdi import TimedeltaIndex from pandas.tseries.offsets import...
import numpy as np from math import log,sqrt,e import iohelpers import sys import copy import time import subprocess import math LIKEITSCONST = 100.0 MAXVALIDITERSCONST = 1000.0 NOTIMPROVCONST = 3 IMPROVEPS = 0.1 VERBOSE = True class EmWFA: def __init__(self, n_components, n_symbols): self.n_components = n_compon...
from __future__ import with_statement """ Fabcommon is a reusable deployment script in fabric Copyright (c) 2015, Miguel Marcos. License: MIT (see LICENSE for details) """ __author__ = 'Miguel Marcos' __version__ = '0.9.2' __license__ = 'MIT' import os import re from fabric.api import local, settings, abort, env, run...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import multiprocessing import threading from builtins import next, object from multiproce...
from __future__ import print_function import argparse import gzip import os import shutil import struct import tarfile import tempfile import h5py import numpy import six from numpy.testing import assert_equal, assert_raises from six.moves import range, zip, cPickle from fuel.converters.base import (fill_hdf5_file, c...
#!/usr/bin/env python # Copyright (c) 2013, 2014 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import optparse import os import re import shutil import subprocess import sys from app_info import Ap...
# 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, ...
################################################################## # Code for testing the variational Multi-Stage Generative Model. # ################################################################## # basic python import numpy as np import numpy.random as npr import cPickle # theano business import theano import th...
EnsureSConsVersion(1,2) import os import inspect import platform def get_cuda_paths(): """Determines CUDA {bin,lib,include} paths returns (bin_path,lib_path,inc_path) """ # determine defaults if os.name == 'nt': bin_path = 'C:/CUDA/bin' lib_path = 'C:/CUDA/lib' inc_path = 'C:/CUDA/include' ...
<<<<<<< HEAD <<<<<<< HEAD """Unit tests for idlelib.AutoExpand""" import unittest from test.support import requires from tkinter import Text, Tk #from idlelib.idle_test.mock_tk import Text from idlelib.AutoExpand import AutoExpand class Dummy_Editwin: # AutoExpand.__init__ only needs .text def __init__(self, ...
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the Builder class, a minimal prototype class to build more chart types on top of it. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2014, Contin...
# Natural Language Toolkit: Shift-Reduce Parser # # Copyright (C) 2001-2011 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu.au> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import string from nltk.grammar import Nonterminal, p...
"""Test functions for the sparse.linalg._expm_multiply module """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (assert_allclose, assert_, assert_equal, suppress_warnings) from scipy.sparse import SparseEfficiencyWarning import...
# # # Copyright (C) 2013 Google 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generic discrete convolution Description ----------- This is a manual (not optimized!) implementation of discrete 1D convolution intended for spectroscopy analysis. The difference with commonly used methods is the possibility to adapt the convolution kernel for ea...
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,sys,time from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors try: from urllib import request except: from urllib import urlopen else: urlop...
""" Build swig and f2py sources. """ from __future__ import division, absolute_import, print_function import os import re import sys import shlex import copy from distutils.command import build_ext from distutils.dep_util import newer_group, newer from distutils.util import get_platform from distutils.errors import D...
import http.server import multiprocessing import os import re import socket import ssl import sys import ttfw_idf from tiny_test_fw import DUT, Utility server_cert = '-----BEGIN CERTIFICATE-----\n' \ 'MIIDWDCCAkACCQCbF4+gVh/MLjANBgkqhkiG9w0BAQsFADBuMQswCQYDVQQGEwJJ\n'\ 'TjELMAkGA1UECAwCTUg...
__author__ = 'chris' import json import random import time import nacl.signing import bitcoin from hashlib import sha256 from binascii import unhexlify, hexlify from collections import OrderedDict from urllib2 import Request, urlopen, URLError import re import os import nacl.encoding from twisted.internet import reac...
# -*- coding: utf-8 -*- # 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 o...
"""Forms for activity.""" from django import forms from django.forms.util import ErrorList from apps.widgets.smartgrid.models import ConfirmationCode, TextReminder, Level, \ ColumnName from apps.managers.player_mgr import player_mgr from apps.widgets.smartgrid_library.models import LibraryQuestionChoice class G...
"""Support for Russound multizone controllers using RIO Protocol.""" from __future__ import annotations from russound_rio import Russound import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TY...
import os import re import subprocess import sys from reviewboard.diffviewer.parser import DiffParser from reviewboard.scmtools.core import SCMTool, HEAD, PRE_CREATION from reviewboard.scmtools.errors import SCMError, FileNotFoundError # This specific import is necessary to handle the paths for # cygwin enabled machi...
# # 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 # ...
# Copyright (c) 2013 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 ...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import tex...
#!/usr/bin/python import os import unittest import mailerlite try: API_KEY = os.environ['PYML_TEST_API_KEY'] except KeyError as e: print('You need to configure a PYML_TEST_API_KEY in your env variables. ' '{0}'.format(e)) class ApiTest(unittest.TestCase): @classmethod def setUpClass(cls):...
#!/usr/bin/env python from __future__ import with_statement import argparse import sys import logging import urllib, urllib2 import json from fabric.operations import local from fabric.api import hide import yaml VERSION = "0.0.1" SERVER_FILE = ".server" logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) d...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Pedro Navarro Perez # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
#!/usr/bin/env python # # Copyright 2011 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...
# Copyright (c) 2016-2017, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Classes for local RPC server and remote client TCP/SSL servers.''' import codecs import time from functools import partial from lib.hash import sha2...
# Copyright (c) 2014, MapR Technologies # # 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...
from docker.errors import APIError from cattle.plugins.docker import docker_client # TODO cattle.plugins.load_plugins() somehow make cattle.plugin.* modules # unavailable, importing it first import cattle.plugins.docker # NOQA from cattle.plugins.docker.network.setup import NetworkSetup from cattle.plugins.host_info...
#!/usr/bin/env python # # Copyright 2009 VMware, Inc. # Copyright 2014 Intel Corporation # 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 restriction, includin...
"""The Qt MainWindow for the QtConsole This is a tabbed pseudo-terminal of Jupyter sessions, with a menu bar for common actions. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import sys import webbrowser from threading import Thread from jupyter_core.paths i...
#!/usr/bin/env python import dbus import subprocess import sys import os import optparse import re from dbus.mainloop.glib import DBusGMainLoop import glib, gobject # Either pass the bluetooth address of the network access point to connect to # with the -b flag, or store it in the config file in the form: # bdaddr =...
# -*- coding: utf-8 -*- """ Unit tests for the spectral module. :copyright: Copyright 2014-2020 by the Elephant team, see `doc/authors.rst`. :license: Modified BSD, see LICENSE.txt for details. """ import unittest import numpy as np import scipy.signal as spsig import quantities as pq import neo.core as n from numpy...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # 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 the rights # to use, copy,...