code
stringlengths
1
199k
"""Contains DiscoElastigroup class that orchestrates AWS Spotinst Elastigroups""" import copy import logging import time import os from base64 import b64encode from itertools import groupby import boto3 from disco_aws_automation.resource_helper import throttled_call, tag2dict from .spotinst_client import SpotinstClient...
""" XForm Survey element classes for different question types. """ import os.path import re from pyxform.constants import ( EXTERNAL_CHOICES_ITEMSET_REF_LABEL, EXTERNAL_CHOICES_ITEMSET_REF_VALUE, ) from pyxform.errors import PyXFormError from pyxform.question_type_dictionary import QUESTION_TYPE_DICT from pyxfo...
from environmentbase.networkbase import NetworkBase from environmentbase.template import Template from troposphere import ec2 class MyRootTemplate(NetworkBase): """ Class creates a VPC and common network components for the environment """ def create_action(self): self.initialize_template() ...
"""SCons.Tool.mslib Tool-specific initialization for lib (MicroSoft library archiver). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ __revision__ = "src/engine/SCons/Tool/mslib.py 3603 2008/10/10 05:46:45 scon...
from robotpy_ext.control.toggle import Toggle from robotpy_ext.misc.precise_delay import NotifierDelay class FakeJoystick: def __init__(self): self._pressed = [False] * 2 def getRawButton(self, num): return self._pressed[num] def press(self, num): self._pressed[num] = True def re...
from setuptools import setup setup( name = 'parabench', version = '0.0.1', description = ' Drive MPI aparallel bencmark run', url = 'https://github.com/dfroger/parabench', packages = ['parabench',], entry_points = { 'console_scripts': [ 'parabench = parabench.parabench:main',...
"""Tools for interpolating to a vertical slice/cross section through data.""" import numpy as np import xarray as xr from ..package_tools import Exporter from ..units import units from ..xarray import check_axis exporter = Exporter(globals()) @exporter.export def interpolate_to_slice(data, points, interp_type='linear')...
import graphene from graphene import Field, List, NonNull, ObjectType, String from graphene.relay.connection import Connection from graphene_django_optimizer.types import OptimizedDjangoObjectType class NonNullConnection(Connection): class Meta: abstract = True @classmethod def __init_subclass_with_...
import unittest from pyglet import window from tests.interactive.window import base_event_sequence __noninteractive = True class TEST_CLASS(base_event_sequence.BaseEventSequence): last_sequence = 3 def on_resize(self, width, height): self.check_sequence(1, 'on_resize') def on_show(self): sel...
import sys from itertools import starmap, chain from functools import partial from seqio import iteratorFromExtension, fastaRecordToString from nucio import fileIterator, openerFromExtension if not len(sys.argv) > 1: sys.exit("uniqreads.py in.{fa,fq} [in2.{fa.fq} ...]\n") files = sys.argv[1:] (openers,nfiles) = zip...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0002_auto_20160208_1517'), ] operations = [ migrations.AlterField( model_name='field', name='value_type', ...
""" Pipeline that determines phase ordering and execution. """ from __future__ import absolute_import, division, print_function import types from . import ir, transforms def run_pipeline(func, env, passes): """ Run a sequence of transforms (given as functions or modules) on the AIR function. """ for...
from functools import wraps import warnings import copy import math as m from ..util.config import __config__ _APY_UNITS= __config__.getboolean('astropy','astropy-units') _APY_LOADED= True try: from astropy import units, constants except ImportError: _APY_UNITS= False _APY_LOADED= False _G= 4.302*10.**-...
""" This module has tests for the agent types iot and iot_merge. The iot agent has only two parameters: func and in_stream. The iot_merge agent also has two parameters func and in_streams where in_streams is a list of input streams. Typically, func uses positional or keyword arguments specified in *args or **kwargs, re...
import operator from mock import MagicMock import pytest import numpy as np import pandas as pd from pandas.util.testing import (assert_series_equal, assert_frame_equal) from ..data import (Component, ComponentID, Data, DerivedComponent, CoordinateComponent, ...
from __future__ import absolute_import import logging from functools import partial, update_wrapper from django.contrib import messages from django.contrib.auth import login as login_user, authenticate from django.template.context_processors import csrf from django.core.urlresolvers import reverse from django.db import...
""" Created on Thu Jun 25 18:54:17 2015 @author: anym """ from scipy import misc im = misc.imread('C:\Projektor\BlobDetectionForBloodFlow\IMG_0039.JPG') import blobFunct as bf plotopt = 1 amount,mask,arealsize,red,green,blue = bf.BlobFunct(im, 1)
""" Copyright (c) 2013 Rodrigo Baravalle 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 the following...
def main(request, response): _URL = request.url _CSP = "child-src " + _URL[:_URL.index('/csp')+1] print _CSP response.headers.set("Content-Security-Policy", _CSP) response.headers.set("X-Content-Security-Policy", _CSP) response.headers.set("X-WebKit-CSP", _CSP) return """<!DOCTYPE html> <!--...
from __future__ import absolute_import import datetime import mock import six from django.core.urlresolvers import reverse from django.db.models import F from django.conf import settings from django.utils import timezone from sentry.models import Authenticator, TotpInterface, RecoveryCodeInterface, SmsInterface, Organi...
from __future__ import absolute_import def test_import(): import behav if __name__ == '__main__': test_import()
""" The test cases for various inference algorithms """ import unittest import numpy as np import GPy class InferenceXTestCase(unittest.TestCase): def genData(self): np.random.seed(1111) Ylist = GPy.examples.dimensionality_reduction._simulate_matern(5, 1, 1, 10, 3, False)[0] return Ylist[0] ...
import mysql.connector import datetime def searchLike(momentId, cnx): likeQuery = 'SELECT user_id FROM moment_like WHERE moment_id = %s' try: likeCursor = cnx.cursor() likeCursor.execute(likeQuery, (momentId, )) return likeCursor.fetchall() #return 0 for db error except mysql.con...
from base import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'citizengridDB', # Or path to database file if using sqlite3. 'USER': 'citizengrid', # Not used w...
from django.db import models from django.db import IntegrityError from django.db.models import Q from django.core.exceptions import ValidationError from django.contrib.auth.models import AnonymousUser, Group from django.contrib.contenttypes.models import ContentType from projector.signals import setup_project from rich...
from cms.models.pluginmodel import CMSPlugin from django.db import models from cms.plugins.text.models import Text class Toc(CMSPlugin): content_source = models.ForeignKey(Text)
""" Generalized Recommender models. This module contains basic recommender interfaces used throughout the whole scikit-crab package. The interfaces are realized as abstract base classes (ie., some optional functionality is provided in the interface itself, so that the interfaces can be subclassed). """ from scikits.cra...
def extractStoriesonlineOrg(item): ''' Parser for 'storiesonline.org' ''' return None
from pbPlist import PBPlist
""" This module contains the classes and utility functions for distance and cartesian coordinates. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from .. import units as u __all__ = ['Distance'] __doctest_requires__ = {'*': ['scipy.int...
"""This is a helper module to get and manipulate histogram data. The histogram data is the same data as is visible from "chrome://histograms". More information can be found at: chromium/src/base/metrics/histogram.h """ import json import logging BROWSER_HISTOGRAM = 'browser_histogram' RENDERER_HISTOGRAM = 'renderer_his...
from __future__ import absolute_import from envisage.plugins.remote_editor.communication.server import *
from django.core.urlresolvers import reverse from django.db import models from django.db.models import signals from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import Group, Permission from django.core.exceptions import ObjectDoesNotE...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CentroAsistencial.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
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 'MuseumObject.maker' db.add_column('cat_museumobject', 'maker', self.gf('django.db.models.fields.r...
""" license: MIT, see LICENSE.txt """ from setuptools import setup version = "0.2" entry_points = {"console_scripts": []} install_requirements = ["bottle"] entry_points["console_scripts"].append( 'mpv_simpleserver = mpv_simpleserver.__main__:main' ) setup( name='mpv_simpleserver', version=version, # ver...
from south.db import db from django.db import models from mypage.pages.models import * import datetime class Migration: def forwards(self, orm): # Adding field 'Page.site' db.add_column('pages_page', 'site', models.ForeignKey(orm['sites.Site'], default=1), keep_default=False) def backwards(self,...
""" ipcai2016 Copyright (c) German Cancer Research Center, Computer Assisted Interventions. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE for details """ """ Created on Thu Aug 13 13:52:23 201...
import testClasses import busters import layout import bustersAgents from game import Agent from game import Actions from game import Directions import random import time import util import json import re import copy from util import manhattanDistance class GameScoreTest(testClasses.TestCase): def __init__(self, qu...
import louie as L from .notifier import Notifier class CliNotifier(Notifier): def __init__(self): L.connect(self._handle_match, signal='match', sender=L.Any) def _handle_match(self, *args, **kwargs): print '%s matched %s' % (kwargs.get('url', ''), kwargs.get('mat...
""" These plugins modify the behavior of py.test and are meant to be imported into conftest.py in the root directory. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import __future__ from ..extern import six import ast import datetime import io import lo...
from django.contrib import admin from userprofiles.models import UserType, Profile, ProjectType, Project class ProjectAdmin(admin.ModelAdmin): prepopulated_fields = {"project_slug": ("project",)} admin.site.register(UserType) admin.site.register(Profile) admin.site.register(ProjectType) admin.site.register(Project,...
import ctypes from pyglet import com lib = ctypes.oledll.dsound DWORD = ctypes.c_uint32 LPDWORD = ctypes.POINTER(DWORD) LONG = ctypes.c_long LPLONG = ctypes.POINTER(LONG) WORD = ctypes.c_uint16 HWND = DWORD LPUNKNOWN = ctypes.c_void_p D3DVALUE = ctypes.c_float PD3DVALUE = ctypes.POINTER(D3DVALUE) class D3DVECTOR(ctypes...
import os import shutil import subprocess import sys import time import urlparse import naclports import binary_package import package_index from naclports import Trace, Log, Warn, Error, DisabledError, PkgConflictError from naclports import OUT_DIR, NACLPORTS_ROOT from naclports.configuration import Configuration PACK...
import numpy as np import pandas.util.testing as tm from pandas import ( Series, date_range, DatetimeIndex, Index, RangeIndex, Float64Index, IntervalIndex, ) class SetOperations: params = ( ["datetime", "date_string", "int", "strings"], ["intersection", "union", "symmetri...
"""GitHubRepo module for pybossa-github-builder.""" import re import json import os import jsonschema from . import github class InvalidPybossaProjectError(Exception): """Raied if a repo is not for a vaild PyBossa project.""" def __init__(self, msg=None): if msg is None: msg = 'that is not a...
import time from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from django.core.management.base import BaseCommand from os import chdir, getcwd from subprocess import Popen, PIPE from os.path import split, dirname, join, abspath import os.path import re from optparse import make_...
import datetime import logging import os import socket import dj_database_url from django.utils.functional import lazy from heka.config import client_from_dict_config ALLOWED_HOSTS = [ '.allizom.org', '.mozilla.org', '.mozilla.com', '.mozilla.net', ] CACHEBUST_IMGS = True try: # If we have build ids...
""" Test cases for twisted.mail.pop3 module. """ import StringIO import string import hmac import base64 import itertools from zope.interface import implements from twisted.internet import defer from twisted.trial import unittest, util from twisted import mail import twisted.mail.protocols import twisted.mail.pop3 impo...
""" :copyright: (C) 2010-2013 by Contrail Consortium. """ from os import chown from pwd import getpwnam from os.path import join, devnull, lexists from subprocess import Popen, PIPE from Cheetah.Template import Template from conpaas.core.log import create_logger from conpaas.core.misc import run_cmd import time S_I...
from copy import deepcopy from os import makedirs import os.path as op import re from shutil import copy import numpy as np import pytest from numpy.testing import assert_equal, assert_allclose from mne import (make_bem_model, read_bem_surfaces, write_bem_surfaces, make_bem_solution, read_bem_solution,...
"""Fichier contenant le contexte éditeur EdtBoiteEnvoi""" from primaires.interpreteur.editeur import Editeur from primaires.interpreteur.editeur.env_objet import EnveloppeObjet from primaires.communication.editeurs.medit import EdtMedit from primaires.communication.mudmail import ENVOYE from primaires.format.fonctions ...
import sys import logging import warnings from logging.config import dictConfig from twisted.python.failure import Failure from twisted.python import log as twisted_log import scrapy from scrapy.settings import Settings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.utils.versions import scrapy_comp...
from pygments.filter import simplefilter from pygments.token import Token @simplefilter def linker(self, lexer, stream, options): for ttype, value in stream: value = value.replace('_LNK_', '_LNK__') if ttype is Token.Keyword or ttype is Token.Keyword.Namespace: value = '_LNK_B_nginx.org/...
from django.shortcuts import render, get_object_or_404, redirect from .models import Post, Comment from django.utils import timezone from .forms import PostForm, CommentForm from django.contrib.auth.decorators import login_required def post_list(request): posts = Post.objects.filter(published_date__lte=timezone.now...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Author.last_name' db.delete_column('database_author', 'last_name') # Deleting field 'Author.first_name' ...
from argparse import ArgumentParser import pybashutils.ulimit as ulimit def main(): p = ArgumentParser() p.add_argument('-n', '--nofile', help='max number of open files', type=int, default=4096) P = p.parse_args() soft, hard = ulimit.raise_nofile(P.nofile) print(f'ulimit -n soft, ...
""" Tests models.parameters """ import itertools import pytest import numpy as np from numpy.testing import utils from . import irafutil from .. import models, fitting from ..core import Model, FittableModel from ..parameters import Parameter, InputParameterError from ...utils.data import get_pkg_data_filename def sett...
import param import numpy as np from ..core.dimension import Dimension, process_dimensions from ..core.data import Dataset from ..core.element import Element, Element2D from ..core.util import get_param_values, OrderedDict class StatisticsElement(Dataset, Element2D): """ StatisticsElement provides a baseclass f...
"""Clebsch-Gordon Coefficients.""" from __future__ import print_function, division from sympy import (Add, expand, Eq, Expr, Mul, Piecewise, Pow, sqrt, Sum, symbols, sympify, Wild) from sympy.printing.pretty.stringpict import prettyForm, stringPict from sympy.functions.special.tensor_functions import...
from __future__ import unicode_literals from django.test import TestCase import codeutil.other_element as oe class OtherElementTest(TestCase): def test_log_lines(self): snippet = ''' Test This is a test Mike''' lines = snippet.split('\n') (log_kind, confidence) = oe.i...
import maya.mel as mel # @UnresolvedImport def get_maya_version(): return mel.eval( 'getApplicationVersionAsFloat;' )
import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgViewer typedef std.vector< osg.Image > ImageList def createState(): # read 4 2d images image_0 = osgDB.readImageFile("Images/lz.rgb") image_1 = osgDB.readImageFile("Images/reflect.rgb") image_2 = osgDB.readImageFile("Ima...
from __future__ import division import collections import os import sys import shlex from copy import deepcopy from fnmatch import fnmatch from math import log10 from pprint import pformat from subprocess import Popen, PIPE, STDOUT from time import time from uuid import uuid4 from py3status import exceptions from py3s...
import graphene import requests from django.conf import settings from mozillians.graphql.schema import CoreProfile from mozillians.graphql.utils import json2obj class Query(object): """GraphQL Query class for the V2 Profiles.""" profiles = graphene.List(CoreProfile, userId=graphene.String()) def resolve_pro...
from datetime import timedelta from rediscache import SimpleCache, RedisConnect, cache_it, cache_it_json, CacheMissException, ExpiredKeyException, DoNotCache, RedisNoConnException from unittest import TestCase, main import time class RedisTestCase(TestCase): def setUp(self): self.c = SimpleCache(10) ...
"""A useful module for application multilanguagee support .. module:: translator :platform: Unix :synopsis: A useful module for application multilanguage support. .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ import sys import pprint PYTHON_MAJOR_VERSION = sys.version_info[0] if PYTHON_MAJOR_VERSION == 2: ...
import os import pytest @pytest.mark.conf_file(extensions=['sphinx_gallery.load_style']) def test_load_style(sphinx_app_wrapper): """Testing that style loads properly.""" sphinx_app = sphinx_app_wrapper.build_sphinx_app() cfg = sphinx_app.config assert cfg.project == "Sphinx-Gallery <Tests>" build_w...
from datetime import date from calendartools import defaults from calendartools.views.calendars import ( YearView, TriMonthView, MonthView, WeekView, DayView ) class YearAgenda(YearView): template_name = 'calendar/agenda/year.html' paginate_by = defaults.MAX_AGENDA_ITEMS_PER_PAGE class MonthAgenda(MonthView...
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from userena.models import UserenaBaseProfile class UserProfile(UserenaBaseProfile): user = models.OneToOneField(User, unique=True, ...
VERSION = (1, 3, 11) if len(VERSION) > 2 and VERSION[2] is not None: if isinstance(VERSION[2], int): str_version = "%s.%s.%s" % VERSION[:3] else: str_version = "%s.%s_%s" % VERSION[:3] else: str_version = "%s.%s" % VERSION[:2] __version__ = str_version
"""Redis lock and store wrapper. The lock implementation was mostly lifted from http://chris-lamb.co.uk/2010/06/07/distributing-locking-python-and-redis/ """ import shelve from .time import time, sleep class Lock(object): def __init__(self, db, key, expires=60): """ Distributed locking using Redis S...
import logging from cliff.lister import Lister from cliff.show import ShowOne from atmosphere.api import AtmosphereAPI from atmosphere.utils import ts_to_isodate class ImageSearch(Lister): """ Search images for user. """ log = logging.getLogger(__name__) def get_parser(self, prog_name): pars...
from sklearn_explain.tests.skl_datasets import skl_datasets_test as skltest skltest.test_class_dataset_and_model("BinaryClass_100" , "LogisticRegression_4")
"""Auto-generated file, do not edit by hand. PS metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_PS = PhoneMetadata(id='PS', country_code=970, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[24589]\\d{7,8}|1(?:[78]\\d{8}|[49]\\d{2,...
import django from django_messages.utils import get_user_model def get_username_field(): if django.VERSION[:2] >= (1, 5): return get_user_model().email else: return 'email'
from packageindex import signals
from .color import Color from .number import Number from .length import Length _converters = { "fill": Color, "fill-opacity": Number, "stroke": Color, "stroke-opacity": Number, "opacity": Number, "stroke-width": Length, } class Style(object): de...
import pandas as pd from activitysim.core import simulate from activitysim.core import config from activitysim.core import expressions from activitysim.core import tracing """ At this time, these utilities are mostly for transforming the mode choice spec, which is more complicated than the other specs, into something t...
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip('numpy') from operator import add from toolz import merge from toolz.curried import identity import dask import dask.array as da from dask.array.core import * from dask.utils import raises, ignoring, tmpfile inc = lambda ...
from clevertimapi.session import Session from clevertimapi.company import Company, PhoneNumber, SocialMediaId, Contact, create_contact_or_company from clevertimapi.task import Task from clevertimapi.opportunity import Opportunity from clevertimapi.case import Case from clevertimapi.customfield import CustomField, Custo...
""" The monkey automaton This state does not need to add as much new stuff since it was all added in the first state; rather we just need to add the new things happening in this state. Once the monkey has gotten its name, this moves to the next state since it will change the room. """ from evennia.utils import interact...
def transform(dataset, SHIFT=None, rotation_angle=90.0, tilt_axis=0): from tomviz import utils from scipy import ndimage import numpy as np data_py = dataset.active_scalars # Get data as numpy array. if data_py is None: #Check if data exists raise RuntimeError("No data array found!") if ...
from __future__ import with_statement NAME = 'test_rosmsgproto' import os import sys import unittest import time import std_msgs import rostest import roslib.packages import rosmsg from rosmsg import * from nose.plugins.skip import SkipTest _NO_DICT=True if "OrderedDict" in collections.__dict__: _NO_DICT=False clas...
from django import forms from django.utils.translation import ugettext as _ from projector.core.exceptions import ForkError from projector.forks.base import BaseExternalForkForm from projector.models import Project from vcs.exceptions import VCSError class BitbucketForkForm(BaseExternalForkForm): site = 'bitbucket....
from djangoappengine.settings_base import * import os DATABASES['native'] = DATABASES['default'] DATABASES['default'] = {'ENGINE': 'dbindexer', 'TARGET': 'native'} AUTOLOAD_SITECONF = 'indexes' SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi' INSTALLED_APPS = ( 'django.contrib.admin', 'django.c...
import warnings class AltairDeprecationWarning(UserWarning): pass def _deprecated(obj, name=None, message=None): """Return a version of a class or function that raises a deprecation warning. Parameters ---------- obj : class or function The object to create a deprecated version of. name ...
"""CLY and readline, together at last. This module uses readline's line editing and tab completion along with CLY's grammar parser to provide an interactive command line environment. It includes support for application specific history files, dynamic prompt, customisable completion key, interactive help and more. *User...
"""Fichier contenant le paramètre 'liste' de la commande 'autoquête'.""" from primaires.interpreteur.masque.parametre import Parametre from primaires.format.fonctions import oui_ou_non class PrmListe(Parametre): """Commande 'autoquête liste'. """ def __init__(self): """Constructeur du paramètre""" ...
import sys import os from django.core.management.base import BaseCommand from django.db.models import Q from django.conf import settings from django.template.loader import render_to_string from ietf.doc.models import Document def write(fn, new): try: f = open(fn) old = f.read().decode('utf-8') ...
from django.contrib.auth.backends import RemoteUserBackend class RemoteNoUnknownUserBackend(RemoteUserBackend): """ RemoteUserBackend which does not auto-create non-existing users. """ create_unknown_user = False
from __future__ import unicode_literals from django.conf import settings CACHE_PREFIX = getattr(settings, 'WAFFLE_CACHE_PREFIX', 'waffle:') COOKIE_NAME = getattr(settings, 'WAFFLE_COOKIE', 'dwf_%s') TEST_COOKIE_NAME = getattr(settings, 'WAFFLE_TESTING_COOKIE', 'dwft_%s') FLAG_CACHE_KEY = getattr(settings, 'WAFFLE_FLAG_...
"""Package contenant les différents éditeurs""" from . import oedit
import unittest from django.test.client import Client from django.test import TestCase from django.urls import reverse from django.contrib.contenttypes.models import ContentType from model_mommy import mommy from mail.models import MailTemplate, MailTemplateRecipient, MailHistory from users.models import Lageruser clas...
from setuptools import find_packages from setuptools import setup setup( name='collective.tocify', version="0.0.1", description="A plone package to integrate the tocify pattern (pat-tocify)", long_description='{0}\n{1}'.format( open("README.rst").read(), open("CHANGES.rst").read(), )...
import logging logging.basicConfig() from .core import app from .errors import setup_errors setup_errors(app) from . import controllers
"""Wrapper script to run emerge, with sane defaults. Usage: ./parallel_emerge [--board=BOARD] [--workon=PKGS] [--force-remote-binary=PKGS] [emerge args] package This script is a simple wrapper around emerge that handles legacy command line arguments as well as setting reasonable defaults for paralle...
import logging from enso.contrib.scriptotron.tracebacks import safetyNetted from enso.contrib.scriptotron.events import EventResponderList class GeneratorManager( object ): """ Responsible for managing generators in a way similar to tasklets in Stackless Python by iterating the state of all registered g...
""" Tests the mesh refinement routines. """ import numpy as np import pytest from pysofe.meshes.mesh import Mesh class TestRefinement1D(object): mesh = Mesh(nodes=np.array([[0.], [0.5], [1.]]), connectivity=np.array([[1, 2], ...
from __future__ import with_statement import pytest from whoosh import collectors, fields, query, searching from whoosh.compat import b, u, xrange from whoosh.filedb.filestore import RamStorage from whoosh.util.testing import TempIndex def test_add(): schema = fields.Schema(id=fields.STORED, text=fields.TEXT) i...