content
string
"""Implementation of matrix FGLM Groebner basis conversion algorithm. """ from __future__ import print_function, division from sympy.polys.monomials import monomial_mul, monomial_div from sympy.core.compatibility import range def matrix_fglm(F, ring, O_to): """ Converts the reduced Groebner basis ``F`` of a ...
#!/usr/bin/env python from __future__ import unicode_literals from buffer_tests import * from document_tests import * from inputstream_tests import * from key_binding_tests import * from screen_tests import * from regular_languages_tests import * from layout_tests import * from contrib_tests import * import unittest ...
import base64 import cPickle as pickle import re from django import http, template from django.contrib.admin import ModelAdmin from django.contrib.auth import authenticate, login from django.db.models.base import ModelBase from django.core.exceptions import ImproperlyConfigured from django.shortcuts import render_to_r...
"""Config options available for the GCE metadata service.""" from oslo_config import cfg from cloudbaseinit.conf import base as conf_base class GCEOptions(conf_base.Options): """Config options available for the GCE metadata service.""" def __init__(self, config): super(GCEOptions, self).__init__(c...
from absl import flags flags.DEFINE_boolean('mesos_privileged_docker', False, 'If set to True, will attempt to create Docker containers ' 'in a privileged mode. Note that some benchmarks execute ' 'commands which are only allowed in privileged mode.') fl...
# -*- coding: utf-8 -*- # =================================== # ScriptName : download.py # Email : <EMAIL> # CreateTime : 2017-05-11 9:51 # =================================== import os import xlwt import csv import time import json ezxf = xlwt.easyxf from config import download_doc_path def write_xls(username, ...
class entertainment(object): def __init__(self, console): self.console = console self.console = console self.currrent_domain = None def get_response(self,user_input, domain, target): """ Return: - response : String, 針對使用者的提問給予的答覆 -...
import sys # for command line arguments import urllib2 # for HTTP GET request import json # for parsing retrieved data import time # for current time from xml.sax.saxutils import escape from datetime import datetime import pytz import tzlocal def file2string(filepath): with open(filepath, 'r') as file: ...
import os import tensorflow as tf from tensorflow.python.framework import test_util from tensorflow.python.platform import googletest from dragnn.python import dragnn_ops from dragnn.python import sentence_io from syntaxnet import sentence_pb2 FLAGS = tf.app.flags.FLAGS def setUpModule(): if not hasattr(FLAGS, ...
#!/usr/bin/env python """Tests for submitting jobs via qsub.""" __author__ = "Jens Reeder" __copyright__ = "Copyright 2011, The QIIME Project" # remember to add yourself if you make changes __credits__ = ["Jens Reeder", "Rob Knight"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Jens Reeder" __email...
import unittest import socket import sys from telemetry.core import util from telemetry.core.chrome import cros_browser_backend from telemetry.core.chrome import cros_interface from telemetry.test import options_for_unittests from telemetry.test import run_tests class CrOSInterfaceTest(unittest.TestCase): @run_test...
"""Module that implements a worker that will call social network crawlers in separated processes. """ from traceback import print_exc from multiprocessing import Process from gd.model import Audience, session, set_mayor_last_tweet # shitty mess'up class ahead from urllib import urlopen from time import sleep from jso...
#!/usr/bin/python import math import time import threading import Adafruit_CharLCD as LCD class Line(object): """Handles line representation for LCD character display of display_length.""" def __init__(self, s="", display_length=16, delimiter=" *** "): self.display_length = display_length ...
from tadek.core import log from tadek.connection import protocol from tadek.connection import server import processor class DaemonHandler(server.Handler): ''' A class responsible for direct communication with client, receiving messages, processing them and sending responses. ''' def __init__(self,...
""" Simple wrapper for some plink commands relevant to this pipleine. ============================================================================ AUTHOR: Michael D Dacre, <EMAIL> ORGANIZATION: Stanford University LICENSE: MIT License, property of Stanford, use as you wish VERSION: 0.1 ...
#Andrew Tan, 3/30, Section 010, Part 1b #Ask user for username and validate while True: username = str(input("Please enter a username: ")) if len(username) < 8 or len(username) > 15: print("Username must be between 8 and 15 characters.\n") continue if username.isalnum() == False: ...
import judicious judicious.register("http://127.0.0.1:5000") # judicious.register("https://imprudent.herokuapp.com") text = """One night two young men from Egulac went down to the river to hunt seals, and while they were there it became foggy and calm. Then they heard war-cries, and they thought: "Maybe this is a war...
from ConfigParser import SafeConfigParser import widget class Config(object): """Class to load and process dashboard configuration file data.""" def __init__(self, filename): """Create an instance of the configuration by loading data from the provided config filename. """ # L...
# -*- coding: utf-8 -*- from resources.lib.gui.gui import cGui from resources.lib.gui.guiElement import cGuiElement from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.parser import cParser from resources.lib import logger from resources.lib.handler.ParameterHandler import ParameterHandl...
import logging import base64 import requests from odoo import _ from odoo.exceptions import UserError from odoo.addons.message_center_compassion.tools.onramp_connector import \ OnrampConnector from odoo.addons.message_center_compassion.tools.onramp_logging import \ log_message from odoo.tools.config import co...
"""test_parsing.py Test the dicom_contour_parser.parsing module. """ import unittest import tempfile import os import numpy as np import matplotlib.path as mpl_path from dicom_contour_parser import parsing CONTOUR_STR = """ 20.00 20.00 30.00 20.00 40.00 30.00 40.00 50.00 20.00 50.00 10.00 30.00 """ CONTOUR_DATA...
from __future__ import with_statement import os import hashlib import time import gzip import re import sys from paste.deploy import appconfig import zlib from slogging.internal_proxy import InternalProxy from swift.common.daemon import Daemon from swift.common import utils class LogUploader(Daemon): ''' Giv...
from __future__ import print_function import sys from builtins import range import struct import inspect try: from collections.abc import MutableMapping as DictMixin except ImportError: from collections import MutableMapping as DictMixin from operator import itemgetter import codecs from future.utils import ...
#!/usr/bin/python #run not on cluster if openeye is not running on cluster ... :( import os, sys, time auri_path = sys.argv[1] os.chdir(auri_path) files = os.listdir('./') files.sort() path = os.path.abspath(os.path.curdir) print path + ' path' log_array = [] counter = 0 for file_ in files: if file_[-4:] ==...
from functools import partial from pubsub import pub from threading import Thread from time import sleep import wx from wx.lib.agw.floatspin import FloatSpin from spacq.gui.tool.box import load_csv, save_csv, Dialog, MessageDialog from spacq.interface.units import Quantity """ Configuration for a ch6VoltageSource. ""...
""" Views for managing Nova instances. """ import datetime import logging from django import http from django import shortcuts from django import template from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.utils.translation import ...
# -*- coding: utf-8 -*- import sys import os # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.mathjax', ] # Add any paths that contain templates here, relative t...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from numpy import array from numpy import asarray from numpy import argmax from numpy import argmin from numpy import amax from numpy import amin from numpy import dot # from numpy import ptp from numpy import ...
import json from functionaltests.api import base class TestPlatformAndContainers(base.TestCase): def _test_get_resource(self, url, rtype, name): resp, body = self.client.get(url) self.assertEqual(200, resp.status, 'GET %s resource' % rtype) resource = json.loads(body) self.assert...
__author__ = 'junz' import os import matplotlib.pyplot as plt import corticalmapping.RetinotopicMapping as rm import corticalmapping.core.FileTools as ft trialName = "160524_M243930_Trial1.pkl" isSave = True params = {'phaseMapFilterSigma': 1., 'signMapFilterSigma': 9., 'signMapThr': 0.3, ...
from .KinSrc import KinSrc from .faults import KinSrcTimeHistory as ModuleKinSrc class KinSrcTimeHistory(KinSrc, ModuleKinSrc): """Python object for time history data file slip time function. Factory: eq_kinematic_src """ import pythia.pyre.inventory from spatialdata.spatialdb.TimeHistory import...
""" Expands WFC3 subarray image and embeds it to a full frame image to probive correct header information. :requires: PyFITS :requires: NumPy :author: Sami-Matias Niemi :contact: <EMAIL> :version: 0.1 """ import pyfits as PF import numpy as N import glob as g if __name__ == '__main__': #try to open the template...
#!/usr/bin/python # -*- coding: utf-8 -*- import requests import datetime import re def prevLastDay(): today = datetime.date.today() first = datetime.date(day=1, month=today.month, year=today.year) return first - datetime.timedelta(days=1) def prevFirstDay(): l_day = prevLastDay() return datetime...
import sys; sys.path.insert(0, '.') import os os.environ['DJANGO_SETTINGS_MODULE'] = __name__ SECRET_KEY = 'boo' DEBUG = True ROOT_URLCONF = __name__ MIDDLEWARE = () MIDDLEWARE_CLASSES = () from wsgiref import simple_server from django.core.wsgi import get_wsgi_application from django.conf.urls import url from djang...
from flask.ext.login import current_user from pybossa.core import db from pybossa.model.task_run import TaskRun from flask import abort from sqlalchemy.sql import text def create(taskrun=None): authorized = False session = db.slave_session if taskrun.user_ip: sql = text('''SELECT COUNT(task_run.id)...
import argparse import contextlib import cStringIO import datetime import gzip import json import logging import multiprocessing import os import sys import traceback import requests import requests_cache from infra_libs import logs from infra.libs.service_utils import outer_loop from infra.services.builder_alerts i...
#!/usr/bin/env python3 """ --- Day 19: Medicine for Rudolph --- Rudolph the Red-Nosed Reindeer is sick! His nose isn't shining very brightly, and he needs medicine. Red-Nosed Reindeer biology isn't similar to regular reindeer biology; Rudolph is going to need custom-made medicine. Unfortunately, Red-Nosed Reindeer ch...
from django.core.urlresolvers import reverse from django.contrib.messages.views import SuccessMessageMixin from django.db.models import Q from django.http import HttpResponseRedirect from django.views.generic.edit import CreateView from django.views.generic.list import ListView from django.views.generic.detail import D...
from ...const import GRAMPS_LOCALE as glocale _ = glocale.get_translation().sgettext #------------------------------------------------------------------------- # # GRAMPS modules # #------------------------------------------------------------------------- from ..utils import gfloat from ..docgen import PaperSize from ...
import time import pytest from openstack_dashboard.test.integration_tests import helpers from openstack_dashboard.test.integration_tests.regions import messages class TestVolumesBasic(helpers.TestCase): """Login as demo user""" VOLUME_NAME = helpers.gen_random_resource_name("volume") @property def...
import traceback __author__ = 'Marten Fischer (<EMAIL>)' from virtualisation.wrapper.history.abstractreader import AbstractReader from virtualisation.misc.buffer import Buffer from virtualisation.misc.lists import TimestampedList, BufferedTimestampedList from virtualisation.misc.log import Log import csv import os.pat...
import config from install_package import InstallPackage import os import shutil import sys import utils # NB: for this module to build successfully, ITK has to be built with # ITK_USE_REVIEW=ON (until the itkFlatStructuringElement moves OUT of the # review directory, that is) BASENAME = "itktudoss" SVN_REPO ...
from sqlalchemy import * from sqlalchemy import testing from sqlalchemy.dialects import mysql from sqlalchemy.engine import default from sqlalchemy.testing import AssertsCompiledSQL, eq_, fixtures from sqlalchemy.testing.schema import Table, Column class _UpdateFromTestBase(object): @classmethod def define_ta...
import numpy as np import pandas as pd from emulator.env_data import high2low, fix_data from emulator.env_factor import get_factors quotes = fix_data('emulator/HS300.csv') quotes = high2low(quotes, '5min') daily_quotes = high2low(quotes, '1d') Index = quotes.index High = quotes.high.values Low = quotes.low.values Clo...
""" WSGI config for house project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
from django.conf import settings from django.utils.translation import ugettext as _ from branding import api old_get_footer = api.get_footer EXCLUDED_NAVIGATION_LINKS = [ 'blog', 'careers', 'donate', 'enterprise', ] def get_footer(is_secure=True): footer = old_get_footer(is_secure) footer =...
import json from functools import wraps import logging import requests from . import exceptions from . import __user_agent__ __all__ = ['get', 'post'] DEFAULT_SCHEME = 'http' logger = logging.getLogger(__name__) def check_http_status(response): """ Raises one of `scieloapi.exceptions` depending on respon...
""" An example highlighting the difference between DMD and streaming DMD Streaming DMD is a modification of the "standard" DMD procedure that produces *APPROXIMATIONS* of the DMD modes and eigenvalues. The benefit of this procedure is that it can be applied to data sets with large (in theory, infinite...
#!/usr/bin/env python import boto import sys import json import time import boto.sqs import config_manager as conf_man import uuid import sns_sqs import dynamo_utils as dutils import argparse import bottle from bottle import template import ast def update_record(record, key, value): record[key] = value recor...
import os from testfixtures.shouldraise import ShouldAssert from .mock import Mock from tempfile import mkdtemp from testfixtures import Replacer, ShouldRaise, TempDirectory, compare, tempdir from unittest import TestCase from ..rmtree import rmtree class TestTempDir(TestCase): @tempdir() def test_simple(s...
import socket import mock import six import testtools import oslo_i18n from neutron.agent.linux import utils from neutron.tests import base from neutron.tests.common import helpers _marker = object() class AgentUtilsExecuteTest(base.BaseTestCase): def setUp(self): super(AgentUtilsExecuteTest, self).s...
from __future__ import unicode_literals from django import http from django.db import models from django.contrib.databrowse.datastructures import EasyModel from django.contrib.databrowse.sites import DatabrowsePlugin from django.shortcuts import render_to_response from django.utils.html import format_html, format_html...
#!/usr/bin/env python # coding:utf-8 import sys def readSushiAttributeFile(filename): lines = [l.strip() for l in file(filename, "r").readlines()] itemAttrs = {} for line in lines: elems = line.split("\t") item_id = elems[0] itemAttrs[item_id] = elems[1:] return itemAttrs def readSushiOrderingFil...
import sys import argparse from glusternagios import utils from glusternagios import glustercli import gfapi BYTES_IN_KB = 1024 def computeVolumeStats(data): total = data.f_blocks * data.f_bsize free = data.f_bfree * data.f_bsize used = total - free return {'sizeTotal': float(total), 'si...
"""Custom Logging Setup """ import io import json import Queue import pkg_resources import socket import sys import time import threading from typing import Any # noqa import boto3 import raven from raven.transport.twisted import TwistedHTTPTransport from raven.utils.stacks import iter_stack_frames from twisted.inter...
import asyncio import re import enum import logging from wordbook.exceptions import DictError, DictConnectionError, InvalidDatabase, InvalidStrategy class ResponseCodes(enum.IntEnum): DATABASES_PRESENT = 110 STRATEGIES_AVAILABLE = 111 DATABASE_INFORMATION = 112 HELP_TEXT = 113 SERVER_INFORMATION...
# flake8: noqa import json import logging import os import shlex import tempfile from .. import exception from . import process_provider, util logger = logging.getLogger(__name__) def get_project_manipulator_provider( execution_name, jar_path, default_parameters, repour_parameters, rest_mode, ...
from datetime import datetime import json from flask import Flask, Response, request, render_template from pymongo import MongoClient from bson import json_util from clarifai.client import ClarifaiApi import urbanairship as ua from urbanairship import ios from settings_local import ( CLARIFAI_APP_ID, CLARIFAI_APP...
""" Demo implementation of the media player. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.media_player import ( MEDIA_TYPE_MUSIC, MEDIA_TYPE_TVSHOW, MEDIA_TYPE_VIDEO, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPO...
""" Tests for ga_course_overviews app. """ from datetime import datetime, timedelta from openedx.core.djangoapps.content.course_overviews.models import CourseOverview from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory, check_mongo_calls,...
import json import socket import aprs_source_input import aprslib import time from psas_packet import messages import logging import traceback import sys is_parsed = aprs_source_input.is_parsed class AprsReceiver: def __init__(self, address, port, sio, lock=None, log=None): """ This class is resp...
"""Components store all entity data in a given |World|. You can think of components as tables with entities as their primary keys. Like database tables, components are defined with a "schema" that specifies the data fields. Each field in a component has a name and a type. Component objects themselves have a dict-like ...
"""Tests for query hardy_weinberg.sql. See https://github.com/verilylifesciences/analysis-py-utils for more details about the testing framework. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from jinja2 import Template import os import unittest from ...
#!/usr/bin/python #-*- coding: utf-8 -*- import urllib,urllib2,xbmcplugin,xbmcgui,xbmcaddon,xbmc import re,HTMLParser import os,base64,time import sys from xml.dom.minidom import Document addon_id = 'plugin.video.xbmcTRIPTV' __settings__ = xbmcaddon.Addon(id=addon_id) __language__ = __settings__.getLocalizedString hom...
# -*- coding: utf-8 -*- from djangosanetesting.cases import DatabaseTestCase from esus.phorum.access import AccessManager from unit_project.tests.fixtures import users_usual, table_simple, comment_simple class TestCommentAccess(DatabaseTestCase): def setUp(self): self.manager = AccessManager() u...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # """ HTMLElement class used in DOM representation. """ # Imports ===================================================================== from ..quoter import escape, unescape from ..specialdict import SpecialDict from .shared import NONP...
from datetime import datetime class LogRecord: def __init__(self, time, level, message): self._time = time self._level = level self._message = message @property def time(self): return self._time @property def level(self): return self._level @property ...
import re from cl.celery import app from cl.citations import find_citations, match_citations from cl.search.models import Opinion, OpinionsCited # This is the distance two reporter abbreviations can be from each other if they # are considered parallel reporters. For example, "22 U.S. 44, 46 (13 Atl. 33)" # would have...
""" RHEAS module for main functionality. .. module:: rheas :synopsis: Module for executing the RHEAS system .. moduleauthor:: Kostas Andreadis <<EMAIL>> """ import config import nowcast import forecast import argparse import dbio import datasets from datetime import datetime import logging def parseArgs(): ...
import copy import datetime import json import time import pytest from tests.test_utils import create_generic_job from treeherder.etl.perf import store_performance_artifact from treeherder.model.models import (Push, Repository) from treeherder.perf.models import (PerformanceAlert,...
""" sobol_qsa ============= Part of CHORUS project """ import openturns as ot from math import sin, pi import numpy as np import matplotlib.pylab as plt from matplotlib.backends.backend_pdf import PdfPages from pygosa import plot_quantiles_sensitivities from pygosa.tests import sensitivity_quantiles_evalua...
# -*- encoding: utf-8 -*- from abjad.tools.documentationtools.ReSTDirective import ReSTDirective class ReSTOnlyDirective(ReSTDirective): r'''A ReST `only` directive. :: >>> only = documentationtools.ReSTOnlyDirective(argument='latex') :: >>> heading = documentationtools.ReSTHeading( ...
import proto # type: ignore __protobuf__ = proto.module( package='google.ads.googleads.v7.errors', marshal='google.ads.googleads.v7', manifest={ 'InternalErrorEnum', }, ) class InternalErrorEnum(proto.Message): r"""Container for enum describing possible internal errors. """ class...
#!/usr/bin/env python2 """ Generated objects """ # upconvert - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2012 Upverter, Inc. # # Licensed under the Apache License, Version 2...
""" Created by Alex Hopkins on 5/17/18 Test cases for the newtonian model functions """ from models.kinematics.newtonian_model import * import unittest class TestNewtonian(unittest.TestCase): def test_distance(self): """ Simple test to assert the distance traveled for an object traveling with an initial veloc...
import qm import qm.xmlutil from qm.common import PythonException from qm.test import base from qm.test.result import Result from qm.test.reader_test_run import ReaderTestRun import xml.sax import sys ######################################################################## # Classes ###################################...
from django import forms from models import * from django.db.models import Q LEVEL_CHOICES = ( ('RO', 'Read Only'), ('RW', 'Read Write'), ('GA', 'Global Admin'), ) class BusinessUnitForm(forms.ModelForm): class Meta: model = BusinessUnit widgets = {'users': forms.Checkb...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 16.03.2019 16:57 :Licence MIT Part of grammpy """ from unittest import main, TestCase from grammpy import * from grammpy.transforms import * class A(Nonterminal): pass class B(Nonterminal): pass class C(Nonterminal): pass class D(Nonterminal): pass class Rul...
from disease_link import disease_link import requests from bs4 import BeautifulSoup # extracting actuall links check file # extraction engine def data_extraction(): data_link = disease_link() print("DATA EXTRACTION BEGINS HERE!!!!") data_file = open('data_file.txt', "w+") list_iter = iter...
import json import sys import requests from termcolor import colored def show_running_movies(): """ Fetches movies that are beeing shown in Icelandic theaters and prints them out to stdout """ # Do a get request to cinema api at api.is response = requests.get('http://apis.is/cinema') # I...
import unittest from pythonbacktest.indicator import MinMaxTracker class MinMaxTrackerTests(unittest.TestCase): def test_add_single_collection(self): test_data = [1, 2, 3, 4, 5, 6] expected_result = [(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)] min_max_tracker = MinMaxTracker() ...
import unittest from mygrations.helpers.dotenv import dotenv, DotEnvSyntaxError # mainly just breakning the tests up a little bit. # the ability to recognize and parse around quotes inside # the values does make this a bit more complicated, so it # makes sense to be in another file anyway class test_dotenv_parse_line_...
import pygame from src.gui.GuiElement import GuiElement pygame.font.init() button_images = { "light": pygame.image.load("../resources/gui/button_light.png"), "dark": pygame.image.load("../resources/gui/button_dark.png"), "green": pygame.image.load("../resources/gui/button_green.png"), "blue": pygame.i...
"""Tests of Braze task code.""" import logging from unittest import TestCase import ddt import responses from celery.exceptions import Retry from mock import patch, Mock from requests.exceptions import RequestException from testfixtures import LogCapture from ecommerce_worker.email.v1.braze.exceptions import ( B...
from __future__ import absolute_import from zope.interface import implementer from twisted.protocols.policies import ProtocolWrapper try: # noinspection PyUnresolvedReferences from twisted.web.error import NoResource except ImportError: # starting from Twisted 12.2, NoResource has moved from twisted.w...
"""Custom application specific yamls tags are supported to provide enhancements when reading yaml configuration. These allow inclusion of arbitrary files as a method of having blocks of data managed separately to the yaml job configurations. A specific usage of this is inlining scripts contained in separate files, alt...
"""Contains the logic for `aq show rack --all`.""" from aquilon.worker.broker import BrokerCommand # pylint: disable=W0611 from aquilon.worker.commands.show_location_type import CommandShowLocationType class CommandShowRackAll(CommandShowLocationType): required_parameters = [] def render(self, session, **...
from apscheduler.schedulers.background import BackgroundScheduler from time import sleep from datetime import datetime, timezone from dateutil.parser import parse from dateutil.tz import tz from arrow import Arrow from pytz import utc import atexit GPIO = None try: import RPi.GPIO as GPIO except ImportError: p...
""" Helper methods for operations related to the management of volumes, and storage repositories """ import re import string from nova import db from nova import context from nova import exception from nova import flags from nova import log as logging from nova import utils from nova.virt.xenapi import HelperBase FL...
from pin.lib import p, ui, util from pin.lib.handler import Handler from . import coin class Mode(Handler): def setup(self): self.handlers += [ p.modes["coin"], p.modes["gi"], p.modes["shots"], ] def on_enable(self): for handler in self.handlers: ...
from setuptools import setup setup( name='azure-mixedreality-nspkg', version='1.0.0', description='Microsoft Azure Mixed Reality Namespace Package [Internal]', long_description=open('README.md', 'r').read(), license='MIT License', author='Microsoft Corporation', author_email='<EMAIL>', ...
"""Convergence diagnostics and model validation""" import numpy as np from .stats import statfunc from .util import get_default_varnames __all__ = ['geweke', 'gelman_rubin', 'effective_n'] @statfunc def geweke(x, first=.1, last=.5, intervals=20): R"""Return z-scores for convergence diagnostics. Compare the...
"""Defines the model abstraction for hybrid models.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections from tensorflow.contrib import layers from tensorflow.contrib.tensor_forest.python import tensor_forest from tensorflow.python.ops imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from urllib.parse import urljoin from pyquery import PyQuery from novel import serial, utils, config BASE_URL = 'http://www.yixia.net/book/{}/{}/' class Yixia(serial.SerialNovel): def __init__(self, tid): super().__init__(utils.base_to_url(BASE_...
import re import sys from .ply import lex from .ply.lex import TOKEN class CLexer(object): """ A lexer for the C language. After building it, set the input text with input(), and call token() to get new tokens. The public attribute filename can be set to an initial filaneme, but ...
{ 'name': 'Pay Slip Amendment', 'version': '1.1', 'category': 'Human Resources', 'author':'Michael Telahun Makonnen <<EMAIL>> and One Click Software', 'description': """ Add Amendments to Current and Future Pay Slips ============================================== """, 'website':'http://onecl...
import unittest import numpy as np from msmtools.util.birth_death_chain import BirthDeathChain from tests.numeric import assert_allclose from msmtools.analysis.dense.stationary_vector import stationary_distribution_from_eigenvector from msmtools.analysis.dense.stationary_vector import stationary_distribution_from_back...
""" """ # Standard library modules. import unittest import logging import pickle # Third party modules. # Local modules. from pyhmsa.spec.condition.instrument import Instrument # Globals and constants variables. class TestInstrument(unittest.TestCase): def setUp(self): super().setUp() self.in...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Contains functions to read and write spike data in different formats. """ from __future__ import print_function, division, absolute_import __author__ = "Jörg Encke" import struct import pandas as pd import copy import warnings def read_brainwaref32(filename, stim...
from __future__ import unicode_literals import json import mock import time import unittest from oauthlib.common import urlencode from oauthlib.oauth2 import TokenExpiredError, InvalidRequestError from oauthlib.oauth2 import MismatchingStateError from oauthlib.oauth2 import WebApplicationClient, MobileApplicationClien...