content
string
#!/usr/bin/python import pytest # get the functions from pv_tools.climate execfile('../climate.py') @pytest.fixture def testFile(): import os workDir = os.getcwd()+'/' return workDir,'climate_test.nc' ####################################################### # now define the tests def test_CheckAny(): ...
""" Adds LUV given LX """ import h5py # HDF5 support import os import glob import numpy as n from scipy.interpolate import interp1d import sys from astropy.cosmology import FlatLambdaCDM import astropy.units as u cosmoMD = FlatLambdaCDM(H0=67.77*u.km/u.s/u.Mpc, Om0=0.307115, Ob0=0.048206) beta = 9. gamma = 0.6 lo...
from __future__ import division import numpy as np # Dielectric model from Turner et. al. 2016 a = [8.111e01, 2.025] b = [4.434e-3, 1.073e-2] c = [1.302e-13, 1.012e-14] d = [6.627e02, 6.089e02] tc = 1.342e2 s = [8.7914e1, -4.044e-1, 9.5873e-4, -1.3280e-6] def get_refractivity(freq, temp): """ Get complex refra...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Some utility functionality. :copyright: Lion Krischer (<EMAIL>), 2013 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html) """ from collections import namedtuple from geographiclib import geodesic from fnmatch import fnmatc...
from subprocess import Popen, PIPE from warnings import warn __all__ = ['say','getEngineName'] """ Module speak provides a simple speech synthesis interface under unix-like os-s. It works by using the commandline program espeak. Typical usage: >>> from speak import say >>> say("hello world") >>> say("it's wonderful ...
""" This module contains logic for a Connect-4 board """ import sys __author__ = "Matthew 'MasterOdin' Peveler" __license__ = "The MIT License (MIT)" class Board(object): """ This Board contains all the information for a Connect-4 board Attributes: board (list of lists): a column major list of l...
import gobject from JamendoSource import JamendoSource from JamendoConfigureDialog import JamendoConfigureDialog import rb from gi.repository import Gtk, Gio, Peas from gi.repository import RB popup_ui = """ <ui> <popup name="JamendoSourceViewPopup"> <menuitem name="AddToQueueLibraryPopup" action="AddToQueue"/...
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base....
#!/usr/bin/python3 import sys import functools import os # for remove def with_output_to(fname): '''Make decorator to run with stdout redirected to fname. The file is opened for appending each time f will be called and closed when it returns. ''' def decorator(f): @functools.wraps(f) ...
import logging from scap.model.xhtml import * from scap.Model import Model logger = logging.getLogger(__name__) class HtmlTag(Model): MODEL_MAP = { 'elements': [ {'tag_name': 'head', 'class': 'HeadTag'}, {'tag_name': 'body', 'class': 'BodyTag'}, ], 'attributes': { ...
''' Copyright 2009, 2010 Anthony John Machin. All rights reserved. Supplied subject to The GNU General Public License v3.0 Created on 23 Aug 2010 Last Updated on 23 Aug 2010 rbtree tests without the TripleStore @author: Administrator ''' import metabulate.utils.utils as mtutils import random if __name__ == "__m...
# -*- coding: utf-8 -*- """ DoG filter module """ #:copyright: Copyright 2015 by Christoph Kirst, The Rockefeller University, New York City #:license: GNU, see LICENSE.txt for details. import sys from scipy.ndimage.filters import correlate #from scipy.signal import fftconvolve from ClearMap.ImageProcessing.Filter.F...
from datetime import datetime, timedelta from zentral.core.events.base import EventMetadata, EventRequest, EventRequestUser, BaseEvent, register_event_type class TestEvent1(BaseEvent): event_type = "event_type_1" namespace = "ns_event_type_1" register_event_type(TestEvent1) class TestEvent2(BaseEvent): ...
""" :Author: Pierre Barbier de Reuille <<EMAIL>> This modules provides function for bootstrapping a regression method. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.random import randint from scipy import optimize from collections import namedtuple from . import ke...
from WebInterface.utils import getContext from WebInterface.context import BaseContext from WebInterface.modules.organization.context import OrganizationContext from WebInterface.modules.organization.context import ListMemberContext from WebInterface.modules.organization.context import OrganizationSettingsContext from ...
#!/usr/bin/env python import logging import sys import django from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, ...
import asyncio from pyplanet.core import Controller from pyplanet.core.events import Callback, handle_generic async def handle_joust_selected_players(source, signal, **kwargs): players = await asyncio.gather(*[ Controller.instance.player_manager.get_player(login=p) for p in source['players'] ]) return dict(pl...
__author__ = 'marcopereira' import numpy as np from dateutil.relativedelta import relativedelta import pandas as pd from datetime import date class Scheduler(object): def __init__(self): pass def getSchedule(self, start, end, freq,referencedate): return pd.date_range(start=referencedate,end=e...
import json from base64 import b64decode, b64encode import numpy as np class Messages: @staticmethod def list_users(filter = None): msg = { "method" : "list_users", "filter": filter} return json.dumps(msg) @staticmethod def list_users_with_level(level): msg = { "method" : "list_users_with_level", "level": ...
from odoo import api, fields, models class ProductCategory(models.Model): _inherit = 'product.category' property_account_income_categ_ids = fields.Many2many( 'res.company.property', string="Income Accounts", compute='_compute_properties', ) property_account_expense_categ_ids ...
import os import os.path import logging import json import urllib import urlparse from nose.tools import assert_equal, with_setup, assert_false, eq_, ok_ from nose.plugins.attrib import attr import mock import uritemplate from django.conf import settings, UserSettingsHolder from django.utils.functional import wraps ...
import account_product_fiscal_classification import product
import os from udevdiscover.device import Device KB = 1024.0 MB = KB * 1024.0 GB = MB * 1024.0 def size_for_display(size): if not size: return None size = int(size) if size < MB: return "%.1f KB" % (size / KB) elif size < GB: return "%.1f MB" % (size / MB) else: return "%...
""" Testing for the base module (sklearn.ensemble.base). """ # Authors: Gilles Louppe # License: BSD 3 clause import numpy as np from sklearn.utils._testing import assert_raise_message from sklearn.datasets import load_iris from sklearn.ensemble import BaggingClassifier from sklearn.ensemble._base import _set_rando...
from __future__ import with_statement import os import shutil from vcs import VCSError, get_repo, get_backend from vcs.backends.hg import MercurialRepository from vcs.utils.compat import unittest from vcs.tests.conf import TEST_HG_REPO, TEST_GIT_REPO, TEST_TMP_PATH class VCSTest(unittest.TestCase): """ Tes...
# # Code for dumping a single block, given its ID (hash) # from bsddb3.db import * import logging import os.path import re import sys import time from BCDataStream import * from base58 import public_key_to_bc_address from util import short_hex, long_hex from deserialize import * def _open_blkindex(db_env): db = DB...
# -*- coding: utf-8 -*- """ celery.utils.threads ~~~~~~~~~~~~~~~~~~~~ Threading utilities. """ from __future__ import absolute_import import os import sys import threading import traceback from celery.local import Proxy from celery.utils.compat import THREAD_TIMEOUT_MAX USE_FAST_LOCALS = os.environ.get...
"""Compression utilities.""" import zlib from kombu.utils.encoding import ensure_bytes _aliases = {} _encoders = {} _decoders = {} __all__ = ('register', 'encoders', 'get_encoder', 'get_decoder', 'compress', 'decompress') def register(encoder, decoder, content_type, aliases=None): """Register new c...
def main(request, response): origin = request.headers[b'origin'] response.headers.set(b'Access-Control-Allow-Origin', origin) tao = request.GET.first(b'tao') if tao == b'zero': # zero TAO value, fail pass elif tao == b'wildcard': # wildcard, pass response.headers.set(b'Timi...
# -*- coding: utf-8 -*- """ Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U This file is part of fiware-pep-steelskin fiware-pep-steelskin is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, eithe...
"""A module that handles deferred execution of callables via the task queue. Tasks consist of a callable and arguments to pass to it. The callable and its arguments are serialized and put on the task queue, which deserializes and executes them. The following callables can be used as tasks: 1) Functions defined in the...
"""Fichier contenant le masque <personnage>.""" from primaires.interpreteur.masque.masque import Masque from primaires.interpreteur.masque.fonctions import * from primaires.interpreteur.masque.exceptions.erreur_validation \ import ErreurValidation from primaires.format.fonctions import contient class Personna...
from collections import OrderedDict from atom.api import (Atom, List, observe, Bool, Enum, Str, Int, Range, Float, Typed, Dict, Constant, Coerced, Tuple) from matplotlib.figure import Figure from matplotlib.axes import Axes from matplotlib.lines import Line2D import six from dataportal.muxer.data_...
import os import platform from twisted.internet import defer from .. import data, helper from p2pool.util import pack import gmpy from gmpy import mpq P2P_PREFIX = '2cfe7e6d'.decode('hex') P2P_PORT = 8639 ADDRESS_VERSION = 0 RPC_PORT = 8638 RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue( ...
import unittest from conans.test.utils.tools import TestClient, TestServer from collections import OrderedDict from conans.util.files import load class RemoteTest(unittest.TestCase): def setUp(self): self.servers = OrderedDict() self.users = {} for i in range(3): test_server =...
# -*- coding: UTF-8 -*- # pep8: disable-msg=E501 # pylint: disable=C0301 import os import logging import getpass import tempfile __version__ = '0.0.1' __author__ = 'Ricardo Staudt' __author_username__ = 'staudt' __author_email__ = '<EMAIL>' __description__ = 'app description goes here' log_filename = os.path.join(te...
import os def determine_base_name(path): f_name = os.path.basename(path) (base_name, ext) = os.path.splitext(f_name) return base_name import re def parse_dump(text): values = {} for line in text.split('\n'): if len(line.strip()) > 0: parts = re.split(r'\s*=\s*', line, 2) ...
from __future__ import absolute_import import argparse import bokeh.command.subcommands.serve as scserve def test_create(): import argparse from bokeh.command.subcommand import Subcommand obj = scserve.Serve(parser=argparse.ArgumentParser()) assert isinstance(obj, Subcommand) def test_loglevels(): ...
from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.contrib.auth.models import Group, User from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.core.urlresolvers import reverse from django.db.models ...
#!/usr/bin/env python """ stresstest.py: A stress-tester for ConcurrentRotatingFileHandler This utility spawns a bunch of processes that all try to concurrently write to the same file. This is pretty much the worst-case scenario for my log handler. Once all of the processes have completed writing to the log file, the...
import argparse import tempfile import unittest import mock import os import re import shutil from dogen.generator import Generator # Generate a Dockerfile, and check what is in it. class TestDockerfile(unittest.TestCase): # keys that must be present in config file but we don't care about # for specific tes...
# coding: utf-8 """ Acceptance tests for licensing of the Video module """ from __future__ import unicode_literals from nose.plugins.attrib import attr from ..studio.base_studio_test import StudioCourseTest #from ..helpers import UniqueCourseTest from ...pages.studio.overview import CourseOutlinePage from ...pages.lms...
import ddt import mock from nova import test from nova.virt import fake from nova_lxd.nova.virt.lxd import config from nova_lxd.nova.virt.lxd import image from nova_lxd.nova.virt.lxd import operations as container_ops from nova_lxd.nova.virt.lxd import session from nova_lxd.tests import stubs @ddt.ddt @mock.patch.o...
from azure_common import BaseTest, CUSTOM_SUBSCRIPTION_ID from c7n_azure.handler import run from os.path import dirname, join from c7n.config import Config from mock import patch, call class HandlerTest(BaseTest): @patch('c7n_azure.provider.Azure.initialize', return_value=Config.empty()) @patch('az...
from spectral_cube import SpectralCube import astropy.units as u from astropy.coordinates import SkyCoord import numpy as np import matplotlib.pyplot as p # hi_cube = SpectralCube.read( # '/media/eric/MyRAID/M33/14B-088/HI/imaging/south_arm_800_1200.image.fits') hi_cube = SpectralCube.read( '/media/eric/MyRAI...
from unittest.mock import call, mock_open, patch from pytest import raises from vang.misc.ext_local import main from vang.misc.ext_local import parse_args from vang.misc.ext_local import update import pytest @pytest.fixture def expected_hosts(): return [ '##\n', '# Host Database\n', '#\...
#!/usr/bin/env python # Creates SQL and simstring DBs for brat normalization support. # Each line in the input file should have the following format: # ID<TAB>TYPE1:LABEL1:STRING1<TAB>TYPE2:LABEL2:STRING2[...] # Where the ID is the unique ID normalized to, and the # TYPE:LABEL:STRING triplets provide various inform...
from openerp.osv import orm, fields class res_company(orm.Model): _inherit = 'res.company' _columns = { 'accrual_taxes': fields.boolean(string='Accrual On Taxes') }
#!/usr/bin/env python # Dive ArduSub in SITL from __future__ import print_function import os from pymavlink import mavutil from common import AutoTest from common import NotAchievedException # get location of scripts testdir = os.path.dirname(os.path.realpath(__file__)) SITL_START_LOCATION = mavutil.location(33.81...
# -*- coding: utf-8 -*- from django.db import models, connection from django.core.exceptions import PermissionDenied from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import ( User as UserSystem, UserManager, Group, ) from .common import MigasLink class UserProfile(...
import unittest import arcpy import os import UnitTestUtilities import Configuration import DataDownload class ImportWMOStationDataTestCase(unittest.TestCase): ''' Test all tools and methods related to the Import WMO Station Data tool in the Military Aspects of Weather toolbox''' WMOGDB = None WMO...
from dace.processdefinition.processdef import ProcessDefinition from dace.processdefinition.activitydef import ActivityDefinition from dace.processdefinition.gatewaydef import ( ExclusiveGatewayDefinition, ParallelGatewayDefinition) from dace.processdefinition.transitiondef import TransitionDefinition from dace...
import copy import pytest import requests from datadog_checks.azure_iot_edge import AzureIoTEdgeCheck from datadog_checks.base.stubs.aggregator import AggregatorStub from datadog_checks.base.stubs.datadog_agent import DatadogAgentStub from datadog_checks.dev.utils import get_metadata_metrics from . import common @...
#!/usr/bin/env python from collections import defaultdict try: import beanstalkc except: pass from datetime import datetime import logging import sys from restkit import ResourceNotFound from settings import settings from base.models import User, LookupJobBody from base.twitter import TwitterResource from bas...
#!/usr/bin/env python import io from os import path from setuptools import setup, find_packages from pywind import __version__ # Get the long description from the relevant file here = path.abspath(path.dirname(__file__)) with io.open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read(...
"""Support to trigger Maker IFTTT recipes.""" import json import logging import requests import voluptuous as vol from homeassistant.const import CONF_WEBHOOK_ID from homeassistant.helpers import config_entry_flow import homeassistant.helpers.config_validation as cv from .const import DOMAIN _LOGGER = logging.getLog...
#! /usr/bin/env python """ Copyright: map2list converts a OTU map file to a list Copyright (C) 2016 William Brazelton, Christopher Thornton 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 Softwa...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Jan-Piet Mens <jpmens()gmail.com>' __copyright__ = 'Copyright 2015 Jan-Piet Mens' __license__ = """Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)""" HAVE_DNS = True try: import dns.update import dns.query import d...
import numpy as np import sys from theano import function from theano import tensor as T from pylearn2.utils import serial from pylearn2.utils.string_utils import preprocess def usage(): """ Run python make_submission.py <model> <test set> where <test set> is public_test or private_test (private_test will be rel...
"""Change EASFolderSync unique constraint Revision ID: 1c72d8a0120e Revises: 1edbd63582c2 Create Date: 2014-06-12 22:44:31.934659 """ # revision identifiers, used by Alembic. revision = '1c72d8a0120e' down_revision = '1edbd63582c2' from alembic import op from sqlalchemy.ext.declarative import declarative_base from...
"""Demo of using urwid with Python 3.4's asyncio. This code works on older Python 3.x if you install `asyncio` from PyPI, and even Python 2 if you install `trollius`! """ from __future__ import print_function import asyncio from datetime import datetime import sys import weakref import urwid from urwid.raw_display i...
# coding=utf-8 import os import traceback import types import unicodedata import datetime import urllib import time import re import platform import subprocess import sys from collections import OrderedDict from babelfish.exceptions import LanguageError import chardet from bs4 import UnicodeDammit from subzero.langu...
from django.conf.urls import patterns urlpatterns = patterns('crits.samples.views', (r'^upload/$', 'upload_file'), (r'^upload/(?P<related_md5>\w+)/$', 'upload_file'), (r'^upload_list/(?P<filename>[\S ]+)/(?P<md5s>.+)/$', 'view_upload_list'), (r'^bulkadd/$', 'bulk_add_md5_sample'), ...
#coding: utf-8 from django.test import TestCase from django.contrib.auth.models import User from django.core.exceptions import ValidationError from enroll.validators import * class ValidatorTest(TestCase): def test_plain_username_validator(self): validator = PlainUsernameValidator() #if valid no...
#!/usr/bin/env python import time import numpy as np np.random.seed() import markovpy # PDF that we're going to sample def lnprob(x,*args): """ Value at x of a multi-dimensional Gaussian with mean mu and inverse variance sig2 """ mu,sig2 = tuple(*args) diff = x-mu return -np.dot(diff,np....
# -*- coding: 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 model 'BlacklistedDomain' db.create_table(u'djangofeeds_blacklisteddomain', ( (u'id', s...
import sys import os import kivy from kivy.app import App from kivy.uix.carousel import Carousel from kivy.factory import Factory class MainApp(object): def __init__(self, argv): self.args = argv self.parametrics() def parametrics(self): alternate_directory = (len(self.args) == 2) ...
import os import re from lib.utility import shell_utils, misc from scli import api_wrapper, config_file, prompt from scli.constants import EbLocalDir, OptionSettingFile, OptionSettingEnvironmentType, \ ParameterSource, ParameterName, ServiceDefault from scli.terminal.iam_terminal import IamTerminal from scli.termi...
import types from vt_manager.communication.sfa.util.xrn import Xrn, urn_to_hrn from vt_manager.communication.sfa.util.method import Method from vt_manager.communication.sfa.trust.credential import Credential from vt_manager.communication.sfa.util.parameter import Parameter, Mixed class Resolve(Method): """ ...
import shutil from collections import namedtuple from pyanaconda.iutil import getSysroot, execReadlines, execWithRedirect from pyanaconda.simpleconfig import unquote import logging log = logging.getLogger("anaconda") class GrubbyInfoError(Exception): pass _BootInfo = namedtuple("BootInfo", ["kernel", "initrd", ...
from .viewContainer import TopContainer, NotebookContainer class Workspace(TopContainer): def __init__(self): TopContainer.__init__(self) def get_currentDocument(self): try: return self.get_currentContainer().get_documentView().document except AttributeError: re...
"OrderPortal: Group pages." from __future__ import print_function, absolute_import import logging import tornado.web import orderportal from orderportal import constants from orderportal import saver from orderportal import settings from orderportal import utils from orderportal.requesthandler import RequestHandler...
import time class Timer(object): def __init__(self): self.start() def start(self): self._active = True self._start = time.time() def stop(self): self._active = False self._end = time.time() def resume(self): elapsed = self._end - self._start ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('website', '0001_initial'), ] operations = [ migrations.AlterField( model_name='section', name='headl...
"""Creation of announcements table""" from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '028ba0bf5f85' down_revision = '36f19890d4fd' branch_labels = () depends_on = None def upgrade(): """Upgrade database.""" # ### commands auto generated by Alembic - please...
""" This module provides convenient functions to transform sympy expressions to lambda functions which can be used to calculate numerical values very fast. """ from __future__ import division from sympy.core.sympify import sympify from sympy.core.compatibility import ordered_iter import inspect # These are the names...
"""Creates a Compute Instance with the provided metadata.""" COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' def GlobalComputeUrl(project, collection, name): return ''.join([COMPUTE_URL_BASE, 'projects/', project, '/global/', collection, '/', name]) def ZonalComputeUrl(project, zon...
import os import sys from PIL import Image from PIL import ImageFont from PIL import ImageFilter from PIL import ImageDraw def generate_from_ttf_list(TTFList, directory): alphabet = "АаБбВвГгДдЕеЁёЖжЗзИиЙйКкЛлМмНнОоПпРрСсТтУуФфХхЦцЧчШшЩщЪъЫыЬьЭэЮюЯя1234567890" black = (0,0,0) for fontface in TTFList: ...
# coding=utf-8 import json from django.shortcuts import render, HttpResponse, HttpResponseRedirect # 导入登录,认证 from django.contrib.auth import authenticate, login, logout from django.contrib.auth.backends import ModelBackend from .models import UserProfile, EmialVertifiedRecode from django.db.models import Q from django....
from gmx_top import * from gmx_bon import * from gmx_nb import * from gmx_rtp import * from gmx_atp import * import os class top2itp(): def __init__(self,topfilename,nbfile='res_ffnonbonded.itp',bonfile='res_ffbonded.itp',atpfile='res_atomtypes.atp',rtpfile='res_aminoacids.rtp'): self.top =topology() ...
import ast from numpy import array import bpy from bpy.props import IntProperty, StringProperty, BoolProperty, FloatProperty, FloatVectorProperty from sverchok.node_tree import SverchCustomTreeNode from sverchok.utils.nodes_mixins.sv_animatable_nodes import SvAnimatableNode from sverchok.data_structure import updateNod...
# -*- coding: utf-8 -*- """ Extension for printing Numeric Arrays in flexible ways. """ from Numeric import ArrayType def num_display(self,arg): """Display method for printing which treats Numeric arrays specially. """ # Non-numpy variables are printed using the system default if type(arg) != ArrayTy...
""" Django settings for contacttools project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import ...
import json def parse(filename=None,tle_string=None): if filename: f = open(filename) tle_string = f.read() f.close() else: pass if tle_string: line_list = tle_string.split('\n') class TLEParameters(object): def __init__(self,tle_string=None,name=None,line1=No...
from io import BytesIO from unittest.mock import Mock import pytest from mitmproxy import exceptions from mitmproxy.net.http import Headers from mitmproxy.net.http.http1.read import ( read_request, read_response, read_request_head, read_response_head, read_body, connection_close, expected_http_body_size, _get_...
# encoding: utf-8 # module _dbus_bindings # from /usr/lib/python3/dist-packages/_dbus_bindings.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 """ Low-level Python bindings for libdbus. Don't use this module directly - the public API is provided by the `dbus`, `dbus.service`, `dbus.mainloop` and `dbus.mainloop.gli...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsComposerPolyline. .. note:: 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 2 of the License, or (at your option) any later version. "...
''' Pydgin project settings. ''' from collections import OrderedDict DEFAULT_BUILD = 38 ''' Sections for pages. ''' PAGE_SECTIONS = { 'GeneView': OrderedDict([ ('overview', {'show': True, 'collapse': False}), ('jbrowse', {'show': True, 'collapse': False}), ('tcell profile', True), (...
import zope.interface __author__ = 'mffrench' class ISQLdbInit(zope.interface.Interface): """Ariane SQL database init interface""" dbServerHost = zope.interface.Attribute("""The database server host.""") dbServerPort = zope.interface.Attribute("""The database server port.""") dbServerUser = zope.inte...
import operator import datetime import RPi.GPIO import SystemTime # Constants to define relay state. RELAY_OFF = 1 RELAY_ON = 0 class Relays: def __init__(self): # Instance storage for relay states. self.RelayState = [] # Configure Raspberry Pi GPIO interfaces. RPi.GPIO.setmode(RPi.GPIO.BCM) ...
# -*- coding: utf-8 -*- __author__ = 'Jordi Vilaplana' import tweepy import pymongo from pymongo import MongoClient import json import logging logging.basicConfig( filename='emovix_twitter_26j.log', level=logging.WARNING, format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s', datefmt='%d-%m-%y...
from unittest.mock import patch, sentinel from fjfnaranjobot.auth import logger as auth_logger from fjfnaranjobot.common import SORRY_TEXT, Command from fjfnaranjobot.components.commands.info import commands_handler, logger from ...base import ( LOG_BOT_UNAUTHORIZED_HEAD, LOG_FRIEND_UNAUTHORIZED_HEAD, LOG...
import io import json import math import os import numpy as np import tensorflow as tf from tensorflowjs import quantization from tensorflowjs import read_weights _OUTPUT_DTYPES = [np.float16, np.float32, np.int32, np.complex64, np.uint8, np.uint16, np.bool, np.object] _AUTO_DTYPE_CONVERSION = { ...
"""Unit tests for the pylint checkers in :mod:`pylint.extensions.check_docs`, in particular the parameter documentation checker `DocstringChecker` """ from __future__ import division, print_function, absolute_import import unittest import sys import astroid from astroid import test_utils from pylint.testutils import ...
import functools import operator import numpy import six from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import concat from chainer.functions.array import split_axis from chainer import initializers from chainer import link from chainer.links.connection imp...
#!/usr/bin/env python """Main API into the Kororaa Repomanagement system. """ from log_manager import * from config_manager import * DEFAULT_ETC = "etc/repoman.conf" class repoman(): __server_manager=None __repo_manager=None __config_manager=None __repo_utils=None __log_manager=None def __init__(self, conf...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
import struct import time from pyalsa import alsaseq class Nano_Kontrol_Common: """Common parameters from TABLE 1 of 'nanoKONTROL MIDI Implementation' file available from Korg.""" def __init__(self): self.Scene_Name = 'Scene 1' # ASCII code self.Scene_Midi_Channel = 0 # 0~15 def Get_List(self...
""" Contains many of the shared utility functions """ import os import click def assemble_username(env, param): return "{0}:{1}".format(env, param) def check_environment_presets(): """ Checks for environment variables that can cause problems with supernova """ presets = [x for x in os.environ....
"""Update the Tulsi dSYM symbol cache.""" import sqlite3 from symbol_cache_schema import SQLITE_SYMBOL_CACHE_PATH from symbol_cache_schema import SymbolCacheSchema class UpdateSymbolCache(object): """Provides a common interface to update a UUID referencing a dSYM.""" def UpdateUUID(self, uuid, dsym_path, arch):...