gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ These pipeline stages are used in creating the StandardPipelineRenderer, the default renderer for standard widget backends. [createbg] => [overlays] => [iccprof] => [flipswap] => [rotate] => [output] """ ...
############################################ # # Author: Luca Cinquini # ############################################ """ Abstract -------- The wps module of the OWSlib package provides client-side functionality for executing invocations to a remote Web Processing Server. Disclaimer ---------- PLEASE NOTE: the owsl...
# coding=utf-8 """ #### Grants * Normal usage ``` GRANT REPLICATION CLIENT on *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status ``` GRANT SUPER ON *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status on MySQL versions 5.1.24+ ``` GRANT PROCESS ON *.* ...
# # 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...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'EnvironmentMap' db.create_table(u'bsdfs_environmentmap', ...
from spider import Document, FetchTask, Storage from logbook import Logger import getopt import time import sys, os import logging logger = Logger('Spider') fend = None def reduce_report(row1, row2): # Assuming row1 and row2 have share the same keys r = {} for key in row1: r[key] = row1[key] + ro...
import os import environ import oscar env = environ.Env() # Path helper location = lambda x: os.path.join( os.path.dirname(os.path.realpath(__file__)), x) DEBUG = env.bool('DEBUG', default=True) ALLOWED_HOSTS = [ 'latest.oscarcommerce.com', 'master.oscarcommerce.com', 'localhost', '127.0.0.1', ]...
# -*- coding: utf-8 -*- """ GraphicsView.py - Extension of QGraphicsView Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. """ from PyQt4 import QtCore, QtGui, QtOpenGL, QtSvg #from numpy import vstack #import time from Point import * #from vector import * import...
# 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...
''' Document Localization using Recursive CNN Maintainer : Khurram Javed Email : kjaved@ualberta.ca ''' import csv import logging import os import xml.etree.ElementTree as ET import numpy as np from torchvision import transforms import utils.utils as utils # To incdude a new Dataset, inherit from Dataset and add ...
from __future__ import absolute_import, print_function, division __author__ = 'Alistair Miles <alimanfoo@googlemail.com>' # standard library dependencies from xml.etree import ElementTree from operator import attrgetter import itertools # internal dependencies from petl.util import RowContainer from petl.io.sourc...
from PIL import Image, ImageDraw import yaml import numpy as np class Mesh: """ Mesh: Square mesher class for thermal analysis. Each entry corresponds to a 2D array with one entry per pixel. There are two data types, flags and double. The mesher takes a number of squares in the x and y direction and cr...
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ from __future__ import unicode_literals import logging import re from django.conf import settings from django.core.urlresolvers import get_callable from django.utils...
# # Copyright 2018 Analytics Zoo 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...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from numpy import * from util.sentiment_util import * from util.math_util import * from util.adagrad import Adagrad import cPickle, time, argparse from collections import Counter # compute model accuracy on a given fold def validate(data, fold, params, deep, f=relu): correct = 0. total = 0. for sent, lab...
import pytest from pnc_cli.swagger_client.apis.buildrecords_api import BuildrecordsApi from pnc_cli.swagger_client.apis.buildconfigurations_api import BuildconfigurationsApi from test import testutils import pnc_cli.user_config as uc @pytest.fixture(scope='function', autouse=True) def get_builds_api(): global b...
# Copyright 2011 Jamie Norrish (jamie@artefact.org.nz) # # 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...
# -*- coding: utf-8 -*- # # 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...
from io import StringIO from os import path as opath from _plotly_utils.basevalidators import ( BaseDataValidator, CompoundValidator, CompoundArrayValidator, ) from codegen.datatypes import ( reindent_validator_description, add_constructor_params, add_docstring, ) from codegen.utils import Plot...
# Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTW...
""":mod:`linkage.consumer` --- High level Amazon Kinesis Streams consumer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from gevent import monkey monkey.patch_all() # noqa: E402 import os.path import sys import pkgutil import gevent import signal from datetime import timedelta, datet...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Flurbo Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Run Regression Test Suite This module calls down into individual test cases via subprocess. It will f...
"""Tests for the Google Assistant integration.""" from homeassistant.components.google_assistant import helpers from tests.async_mock import MagicMock def mock_google_config_store(agent_user_ids=None): """Fake a storage for google assistant.""" store = MagicMock(spec=helpers.GoogleConfigStore) if agent_u...
""" radish ~~~~~~ The root from red to green. BDD tooling for Python. :copyright: (c) 2019 by Timo Furrer <tuxtimo@gmail.com> :license: MIT, see LICENSE for more details. """ import pytest from tagexpressions import parse from radish.models import ScenarioOutline, Tag def test_scenariooutline_set_feature_on_all_e...
# Copyright 2015 Quantopian, 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...
# -*- coding: utf-8 -*- """Installer script for Pywikibot framework.""" # # (C) Pywikibot team, 2009-2020 # # Distributed under the terms of the MIT license. # from __future__ import (absolute_import, division, print_function, unicode_literals) import os import sys from setuptools import setup...
#!/usr/bin/env python # encoding: utf-8 """ Program Purpose Are you new to population genetics? Not familiar with command-line programs, or just want a simple way to run basic pop gen analyses right on your labtop? Then POPEase is perfect for you. The purpose of the POPEase program is to help novices obtain reliable ...
#--------------------------------------------------------------------------- # # ReactionDiffusion.py: implementation of reaction-diffusion chemical systems # # originally based on the breve Hypercycle.[tz/py] demo by jon klein # <jk@spiderland.org>, www.spiderland.org # # by Lidia Yamamoto, Univ. Basel, Switzerland, J...
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import sys import stat import genericpath from genericpath import * __all__ = ["normcase","is...
import os, re, fileinput, shutil, urllib2 import simplejson as json from fabric.api import local from utils.version import get_version from itertools import combinations VERSION = get_version() DATE = get_version(True) # Lists all the names of the modules of Tiramisu, # each module has an identification number (als...
# $Id$ from cPickle import load, dump import logging import os import shelve from time import time import traceback from mx.DateTime import localtime, mktime from quixote import get_publisher from quixote.errors import AccessError from quixote.form2 import Form from quixote.publish import SessionPublisher from quixo...
# 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...
# Copyright (c) 2018 PaddlePaddle 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 appli...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Coi...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# -*- coding: utf-8 -*- from __future__ import division import copy import functools import logging import math import re import unicodedata from framework import sentry import six from django.apps import apps from django.core.paginator import Paginator from elasticsearch import (ConnectionError, Elasticsearch, No...
from google.appengine.ext import webapp from google.appengine.api import memcache from dbmodel import * from session import * from caching import * import json import datetime import logging class GetDeviceType(webapp.RequestHandler): def get(self): # First check session authorized if not checkSess...
from __future__ import print_function from __future__ import division from __future__ import absolute_import import array import base64 import json import os import struct from compas.files.gltf.constants import COMPONENT_TYPE_ENUM from compas.files.gltf.constants import COMPONENT_TYPE_FLOAT from compas.files.gltf.co...
#!/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. """Entry point for both build and try bots. This script is invoked from XXX, usually without arguments to package an SDK. It autom...
# This Python module is part of the PyRate software package. # # Copyright 2022 Geoscience Australia # # 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/...
#!/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...
import py, sys import _cffi_backend as _cffi1_backend def test_ffi_new(): ffi = _cffi1_backend.FFI() p = ffi.new("int *") p[0] = -42 assert p[0] == -42 def test_ffi_subclass(): class FOO(_cffi1_backend.FFI): def __init__(self, x): self.x = x foo = FOO(42) assert foo.x ...
"""Interconvert between json and other (cif, mol, smi, etc.) files.""" from collections import Counter try: from fractions import gcd # < Python 3.9 except ImportError: from math import gcd # >= Python 3.9 import logging from functools import reduce try: from openbabel import openbabel as ob f...
# -*- coding: utf-8 -*- """ Pyweed utility functions. :copyright: Mazama Science, IRIS :license: GNU Lesser General Public License, Version 3 (http://www.gnu.org/copyleft/lesser.html) """ from __future__ import (absolute_import, division, print_function) # Basic packages import os import logging import r...
import collections.abc import threading import immutables __all__ = ('ContextVar', 'Context', 'Token', 'copy_context') _NO_DEFAULT = object() # !!!! Rigetti edit !!!! # This backport inspects objects' __module__ attribute to prevent subclassing outside of # this module. The backport assumes it will be installed a...
# Copyright (c) 2014 Bull. # # 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, sof...
import unittest import mock import numpy import six import chainer from chainer import _backprop_utils from chainer.backends import cuda from chainer import testing from chainer.testing import attr def make_array(start, shape, dtype): size = numpy.product(shape, dtype='i') a = numpy.arange(start, start + si...
""" Support for Yamaha Receivers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.yamaha/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( SUPPORT_TURN_OFF, SUPPORT_TURN_ON, SUPPORT_VOLUME_...
#!/usr/bin/env python # coding=utf-8 ## @package biopredyn ## Copyright: [2012-2019] Cosmo Tech, All Rights Reserved ## License: BSD 3-Clause import copy import libsbml import libsedml import libsbmlsim import algorithm, result, statistics import numpy as np from cobra.io.sbml import create_cobra_model_from_sbml_doc ...
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php class classinstancemethod(object): """ Acts like a class method when called from a class, like an instance method when called by an instan...
from fabric.api import hide, run, settings, sudo from fabric.context_managers import shell_env from fabric.contrib.files import exists def _run_cmd(func, cmd, verbose): """ Utility function to run commands respecting `use_sudo` and `verbose`. """ with shell_env(DEBIAN_FRONTEND='noninteractive'): ...
from colormath import color_objects, color_conversions from spectra.grapefruit import Color as GC convert_color = color_conversions.convert_color COLOR_SPACES = { "lab": color_objects.LabColor, "rgb": color_objects.sRGBColor, "lch": color_objects.LCHabColor, "xyz": color_objects.XYZColor, "hsl": co...
# Copyright 2017 Capital One Services, 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...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # helper.py """ Helper and utility functions. """ from __future__ import division import numpy as np def parse_smi(files): """ Return parsed files as list of dicts. .. note: parse_smi uses the x and y coordinate of the left eye. Parameters...
import sys import unittest from datetime import datetime import mock from libcloud.common.aws import AWSRequestSignerAlgorithmV4 from libcloud.common.aws import SignedAWSConnection from libcloud.common.aws import UNSIGNED_PAYLOAD from libcloud.test import LibcloudTestCase class EC2MockDriver(object): region_nam...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CustomField.empty_selection_list' db.add_column('helpdesk_customfield', 'empty_selection_l...
import os.path from theano import Apply, config, Op from theano.compile import optdb from theano.gof import LocalOptGroup from theano.tensor.basic import as_tensor_variable from theano.tensor.opt import in2out from .basic_ops import as_gpuarray_variable, infer_context_name from .opt_util import inplace_allocempty t...
import logging import sys import os import socket import re import xmlrpclib import httplib from time import sleep from urlparse import urlparse from flexget.utils.template import RenderError from flexget.utils.pathscrub import pathscrub from flexget import plugin from flexget.event import event from flexget.entry im...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
#!/g/bork3/bin/python # Thanks to http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/457411 from bisect import bisect_left, bisect_right from itertools import izip class intervalmap(object): """ This class maps a set of intervals to a set of values. >>> i = intervalmap() >>>...
import mock import io import netlib.utils from netlib.http import Headers from mitmproxy import filt, controller, flow, options from mitmproxy.contrib import tnetstring from mitmproxy.exceptions import FlowReadException from mitmproxy.models import Error from mitmproxy.models import Flow from mitmproxy.models import H...
# -*- 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...
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- #from gadgets import coroutine from itertools import islice #FIXME: Should be in gadgets def coroutine(func): def start(*args,**kwargs): cr = func(*args,**kwargs) next(cr) return cr return start #Simple version of window, below def co...
import unittest2 as unittest import pymongo import time import random import threading from oplogreplay import OplogReplayer SOURCE_HOST = '127.0.0.1:27017' DEST_HOST = '127.0.0.1:27018' TESTDB = 'testdb' # Inherit from OplogReplayer to count number of processed_op methodcalls. class CountingOplogReplayer(OplogRepl...
# -*- coding: utf-8 -*- import mock from nose.tools import * # noqa from framework.auth.core import Auth from framework.exceptions import PermissionsError from tests.base import OsfTestCase from tests.factories import UserFactory, ProjectFactory from website.addons.mendeley.tests.factories import ( MendeleyAcco...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Module files as torch.nn.Module subclasses for Seq2seqAgent. """ import math import torch import torch.nn as nn fro...
import functools import torch.nn as nn import torch.nn.functional as F from ptsemseg.models.utils import get_upsampling_weight from ptsemseg.loss import cross_entropy2d # FCN32s class fcn32s(nn.Module): def __init__(self, n_classes=21, learned_billinear=False): super(fcn32s, self).__init__() sel...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
# ---------------------------------------------------------------------------- # Copyright 2015-2016 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.apa...
# -*- coding: utf-8 -*- from ccxt.async.base.exchange import Exchange import math import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound from ccxt.base.errors import DDoSProtection clas...
from conans.client.output import Color from conans.model.ref import PackageReference from conans.model.ref import ConanFileReference from collections import OrderedDict class Printer(object): """ Print some specific information """ INDENT_COLOR = {0: Color.BRIGHT_CYAN, 1: Color.BRIGHT_RED...
import re import six from ..api import APIClient from ..errors import BuildError from ..utils.json_stream import json_stream from .resource import Collection, Model class Image(Model): """ An image on the server. """ def __repr__(self): return "<%s: '%s'>" % (self.__class__.__name__, "', '"....
""" Unit test for dynamic parameters. Tests __get__, __set__ and that inspect_value() and get_value_generator() work. Originally implemented as doctests in Topographica in the file testDynamicParameter.txt """ import copy import unittest import param import numbergen class TestDynamicParameters(unittest.TestCase):...
#!/usr/bin/env python # encoding: UTF-8 import asyncio import datetime import sqlite3 import unittest import uuid from cloudhands.burst.agent import message_handler from cloudhands.burst.appliance import PreCheckAgent from cloudhands.burst.appliance import PreDeleteAgent from cloudhands.burst.appliance import PreOper...
#!/usr/bin/env python # -*- coding: utf-8 -*- # CAVEAT UTILITOR # # This file was automatically generated by Grako. # # https://pypi.python.org/pypi/grako/ # # Any changes you make to it will be overwritten the next time # the file is generated. from __future__ import print_function, division, absolute_import, un...
# -*- coding: utf-8 -*- from __future__ import division import click import os import collections import contextlib import signal import swiftclient import keystoneclient import subprocess32 as subprocess import copy import sqlalchemy AUTH_VERSION = 2 # An object which we can use to pass state # from the group to su...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import copy as cp from warnings import warn import numpy as np from .. import Epochs, compute_proj_evoked, co...
# GTK+ GUI for Snidget from __future__ import print_function from datetime import date, timedelta import sys import pygtk pygtk.require('2.0') import gtk from snidget import settings, database, transaction, plotter #! special transfer dialog #! dialog for user settings #! Add and delete types #! File/Undo or Reloa...
# 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 ...
# Copyright 2016 The Kubernetes 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 ...
from __future__ import absolute_import import datetime from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from .models import Book class ArchiveIndexViewTests(TestCase): fixtures = ['generic-views-test-data.json'] urls = 'regressiontests.generic_views.urls' def _m...
# PSU Capstone Intel Mood Light 2015-2016 # This program functions as the user interface to allow the user to set profiles in the the arduino # Connect to the arduino over a serial com port connection to send and receive information from the arduino # # Adrian Steele (steelead@pdx.edu) # Bander Alenezi (alenezi@pdx.ed...
import os from CPAC.pipeline import nipype_pipeline_engine as pe from ..output_func_to_standard import ants_apply_warps_func_mni from .mocks import configuration_strategy_mock import CPAC.utils.test_init as test_utils import nibabel as nb import pytest @pytest.mark.skip(reason="no way of currently testing this") def t...
"""Docutils CommonMark parser""" import sys from os.path import splitext from docutils import parsers, nodes from sphinx import addnodes from commonmark import Parser from warnings import warn if sys.version_info < (3, 0): from urlparse import urlparse, unquote else: from urllib.parse import urlparse, unqu...
import warnings import itertools from contextlib import contextmanager import numpy as np from matplotlib import transforms from .. import utils from .. import _py3k_compat as py3k class Renderer(object): @staticmethod def ax_zoomable(ax): return bool(ax and ax.get_navigate()) @staticmethod ...
""" Commands that are available from the connect screen. """ import re import traceback from django.conf import settings from src.players.models import PlayerDB from src.objects.models import ObjectDB from src.server.models import ServerConfig from src.comms.models import Channel from src.utils import create, logger, ...
import paramiko from paramiko import AuthenticationException, SSHException, ChannelException from enum import Enum from concurrent.futures import ThreadPoolExecutor from socket import error as SocketError from margaritashotgun.auth import AuthMethods from margaritashotgun.exceptions import * import logging logger = lo...
# manage.py import datetime import os import unittest import coverage from flask.ext.script import Manager from flask.ext.migrate import Migrate, MigrateCommand from project import app, db from project.models import ( User, EducationalInstitutionType, Gender, PatentOffice, PatentStatus, Publi...
import logging import threading import time from hazelcast.errors import TransactionError, IllegalStateError from hazelcast.future import make_blocking from hazelcast.invocation import Invocation from hazelcast.protocol.codec import ( transaction_create_codec, transaction_commit_codec, transaction_rollback_...
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
"""Demonstrating how to convert a flowpipe graph to a render farm job. This guide expects that your render farm can handle dependencies between tasks. """ import json import logging import os from tempfile import gettempdir from flowpipe import Graph, INode, Node # ---------------------------------------------------...
# pointsToSpheres.py copyright (c) 2005 by Charl P. Botha <cpbotha@ieee.org> # $Id$ # see module documentation import gen_utils from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import wx import vtk class pointsToSpheres(ScriptedConfigModuleMixin, ModuleBase): ...
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from mininode import * from blockstore import BlockStore, TxStore from util import p2p_port ''' This is a tool for comparing two or more bitcoinds to ...
"""ZFS based backup workflows.""" import datetime import shlex import gflags import lvm import workflow FLAGS = gflags.FLAGS gflags.DEFINE_string('rsync_options', '--archive --acls --numeric-ids --delete --inplace', 'rsync command options') gflags.DEFINE_string('rsync_path'...
from unittest import mock import kafka.codec from kafka.errors import UnsupportedCodecError import pytest from aiokafka.record.default_records import ( DefaultRecordBatch, DefaultRecordBatchBuilder ) @pytest.mark.parametrize("compression_type,crc", [ (DefaultRecordBatch.CODEC_NONE, 3950153926), # Gzip he...
import os import sys import subprocess from six import print_ from ccmlib import common from ccmlib.cmds.command import Cmd from ccmlib.node import NodeError def node_cmds(): return [ "show", "remove", "showlog", "setlog", "start", "stop", "ring", ...