gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""QuizReports API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from base import BaseCanvasAPI from base import BaseModel class QuizReportsAPI(BaseCanvasAPI): """QuizReports API Version 1.0.""" ...
from __future__ import print_function # Author: Denis Engemann <denis.engemann@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) import os import os.path as op import warnings from nose.tools import assert_true, assert_raises, assert_equal from copy import ...
# -*- 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...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases for L{twisted.protocols.haproxy.V2Parser}. """ from twisted.trial import unittest from twisted.internet import address from .._exceptions import InvalidProxyHeader from .. import _v2parser V2_SIGNATURE = b'\x0D\x0A\x0D\x0A\x00\x0...
######### # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
from doom import wad from doom.map.data import MapData from nav.config import Config from nav.mesh import Mesh from navedit import pathfind from util.vector import Vector2, Vector3 import cProfile import camera import pygame import random import render import sys COLOR_BACKGROUND = pygame.Color(0, 31, 63, 255) COLOR_...
import numpy from .core import get_constant class Data: """ Provides an interface to load data from files into [`numpy.ndarray`][1] objects. Example: #!python >>> data = Data() >>> data.path = 'path/to/data.csv' >>> data.scale = (1, 'kilo') >>> data.array ...
""" Diagnostics for regression estimations. """ __author__ = "Luc Anselin luc.anselin@asu.edu, Nicholas Malizia nicholas.malizia@asu.edu " import pysal from pysal.common import * import scipy.sparse as SP from math import sqrt from utils import spmultiply, sphstack, spmin, spmax __all__ = [ "f_stat", "...
# One Convergence, Inc. CONFIDENTIAL # Copyright (c) 2012-2015, One Convergence, Inc., USA # All Rights Reserved. # # All information contained herein is, and remains the property of # One Convergence, Inc. and its suppliers, if any. The intellectual and # technical concepts contained herein are proprietary to One Conv...
import re from In.core.object_meta import ObjectMetaBase class ValuatorContainer(dict): def __missing__(self, key): vcls = IN.register.get_class(key, 'Valuator') obj = vcls() self[key] = obj return obj class ValuatorEngine: '''Valuator class that valuate values based on validation rules. Instance availa...
# 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 ...
""" Actions which modifies the rate at which other Actions execute, usually by some geometric curve. """ from IntervalAction import * from Geometry import * from Color import * import math # TODO: have tables for math.pow and math.cos instead of doing calculations on the fly. might save some # TODO: CPU cycles, and t...
#!/bin/python ###################################### # Generate contact maps contactCount.gz # # Author: Fabian Buske (22/05/2015) ###################################### import os, sys, re import traceback from optparse import OptionParser import fileinput import datetime from readData import * from quicksect import I...
#!/usr/bin/env python from __future__ import print_function import logging import os import subprocess import sys from datetime import datetime from builtins import input import argparse import dateutil.parser import airflow from airflow import jobs, settings, utils from airflow import configuration from airflow.exec...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Benchmark concurrent tests for checking consistency of cache on object changes CREATE GET PUT DELETE The threads are started for simultaneous GET/PUT/DELETE operation """ import requests import js...
# Copyright 2020 The TensorFlow Probability 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 o...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
<<<<<<< HEAD <<<<<<< HEAD """Queues""" __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', 'QueueFull', 'QueueEmpty'] import collections import heapq from . import events from . import futures from . import locks from .tasks import coroutine class QueueEmpty(Exception): """Exception r...
""" Base implementation of the Page Object pattern. See https://github.com/SeleniumHQ/selenium/wiki/PageObjects and http://www.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern """ from abc import ABCMeta, abstractmethod from collections import defaultdict from functools import wraps fro...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
# Copyright 2011 OpenStack, 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...
# # Copyright 2014 Red Hat, 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 writi...
#!/usr/bin/env python # # Copyright 2017 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
from lxml import etree from django.db.models import Model as djangoModel from django.core.exceptions import ObjectDoesNotExist class FieldError(ValueError): pass class ForeignKeyFieldError(FieldError): def __init__(self, msg, model, value): self.model = model self.value = value self...
from direct.distributed import DistributedObject from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import ToontownGlobals from pandac.PandaModules import * from math import * import math from direct.fsm.FSM import FSM from toontown.minigame import ArrowKeys from direct.showbase import PythonUtil...
import collections assignments = [] rows = 'ABCDEFGHI' cols = '123456789' def cross(A, B): "Cross product of elements in A and elements in B." return [s + t for s in A for t in B] boxes = cross(rows, cols) row_units = [cross(r, cols) for r in rows] column_units = [cross(rows, c) for c in cols] square_units ...
from lxml.etree import Element, SubElement, tostring from pyuntl import UNTL_XML_ORDER, HIGHWIRE_ORDER XSI = 'http://www.w3.org/2001/XMLSchema-instance' # Namespaces for the DC XML. DC_NAMESPACES = { 'oai_dc': 'http://www.openarchives.org/OAI/2.0/oai_dc/', 'dc': 'http://purl.org/dc/elements/1.1/', 'xsi'...
import http import xml.etree.ElementTree as ET import pytest from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.select import Select from selenium.webdriver.support.wait import WebDriverWait from sqlalchemy import text from tests.conftest import TEST_PROXY_URL, TEST_RADIO_DNS_PORT from te...
# Copyright 2013 Josh Durgin # Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
# -*- coding: utf-8 -*- from eve.tests import TestBase from eve.utils import api_prefix from eve.tests.test_settings import MONGO_DBNAME import simplejson as json class TestRenders(TestBase): def test_default_render(self): r = self.test_client.get('/') self.assertEqual(r.content_type, 'applicati...
# 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 ...
import json import pytest import demistomock as demisto from CommonServerPython import DemistoException integration_params = { 'port': '443', 'vsys': 'vsys1', 'server': 'https://1.1.1.1', 'key': 'thisisabogusAPIKEY!', } mock_demisto_args = { 'threat_id': "11111", 'vulnerability_profile': "mo...
import pytest from .utils import MockedTime from .sample_data import sample_data_holder_1, sample_data_holder_2 from hystrix.rolling_percentile import RollingPercentile, PercentileSnapshot def test_rolling(): time = MockedTime() percentile = RollingPercentile(time, 60000, 12, 1000, True) percentile.add_...
import pickle import unittest import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_greater from sklearn.utils.testing ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2016 ASMlover. 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 copyrig...
# Copyright 2019 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 sklearn.model_selection import learning_curve import matplotlib.pyplot as plt import numpy as np import collections def draw_learning_curve(estimator, X, y, ylim=None, cv=None, scoring=None, train_sizes=np.linspace(.2, 1.0, 5), train_axis='n_examples', estimator_ti...
# Copyright 2014 Intel Corp. # # 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, soft...
import numpy as np import theano import theano.tensor as T from theano.tensor.signal import downsample from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams # from theano.tensor.shared_randomstreams import RandomStreams from .. import init from .. import nonlinearities from .. import utils from ..thea...
import socket import ctds from .base import TestExternalDatabase from .compat import long_, PY3, unicode_ class TestTdsConnection(TestExternalDatabase): def test__doc__(self): self.assertEqual( ctds.connect.__doc__, # pylint: disable=line-too-long '''\ connect(server,...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os.path import tornado.ioloop import tornado.web import tornado.wsgi import HTMLParser import requests import json import base64 import re import time from random import random from urlparse import urlparse fake_headers = { 'Accept': 'text/html,appl...
# 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 datetime import datetime from StringIO import StringIO import requests from dateutil import parser from granoclient.loader import Loader BOOL_TRUISH = ['t', 'true', 'yes', 'y', '1'] def is_empty(value): if value is None or not len(value.strip()): return True return False class RowException(Ex...
#!/usr/bin/env python3 # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
from . import collision, entity class Map: """ Map which houses the current game information/metadata. :ivar my_id: Current player id associated with the map :ivar width: Map width :ivar height: Map height """ def __init__(self, my_id, width, height): """ :param my_id: Use...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # 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 agr...
from __future__ import division, print_function import numpy as np from itertools import product import warnings from sklearn import datasets from sklearn import svm from sklearn import ensemble from sklearn.datasets import make_multilabel_classification from sklearn.random_projection import sparse_random_matrix fro...
from datetime import datetime from django.conf import settings from django.db.models import ( DateField, DateTimeField, DurationField, Field, IntegerField, TimeField, Transform, ) from django.db.models.lookups import ( YearExact, YearGt, YearGte, YearLt, YearLte, ) from django.utils import timezone class...
# # 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...
"""Usage: constituentretrofit_word2vec.py -v <vectorsFile> [options] constituentretrofit_word2vec.py (-h | --help) Arguments: -v <vectorsFile> to specify word2vec input file Options: -t <testPhrase> specify test phrases to leave out -o <outputFile> set output word sense v...
import numpy as np from .cython.bbox import bbox_overlaps_cython BBOX_XFORM_CLIP = np.log(1000. / 16.) def bbox_overlaps(boxes, query_boxes): return bbox_overlaps_cython(boxes, query_boxes) def bbox_overlaps_py(boxes, query_boxes): """ determine overlaps between boxes and query_boxes :param boxes: ...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Maxwell Morais and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr, encode import os import sys import inspect import traceback import linecache import pydoc import cgitb im...
# Copyright 2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
""" ColorHelper. Copyright (c) 2015 - 2017 Isaac Muse <isaacmuse@gmail.com> License: MIT """ import sublime import sublime_plugin from .lib.coloraide import Color import threading from time import time, sleep import re import os import mdpopups from .lib import colorbox from . import ch_util as util import traceback f...
#!/usr/bin/env python # Copyright 2013 IBM Corp. # # 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 app...
# Copyright 2013, Mirantis 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 agre...
#!/usr/bin/env python from spider import * import re sys.path.append("..") from record import Record class VideolecturesSpider(Spider): def __init__(self): Spider.__init__(self) self.school = 'videolectures' self.type_map = {'Lecture ' : 'vl',\ 'Tutorial' : 'vtt',...
import copy from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django....
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
#!/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. """Creates windows and posix stub files for a given set of signatures. For libraries that need to be loaded outside of the standar...
from collections import OrderedDict from django import forms from django.core.exceptions import PermissionDenied from django.db import router from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.response import TemplateResponse from django.utils.encoding imp...
# Copyright (c) 2001 - 2016 The SCons Foundation # # Benchmarks for testing various possible implementations # of the is_Dict(), is_List() and is_String() functions in # src/engine/SCons/Util.py. import types try: from collections import UserDict, UserList, UserString except ImportError: # No 'collections' mod...
################ NLP Runner ################## # This will be the program that runs all NLP # # routines. It will call different NLP tools # # depending on language and function # ############################################## import csv import json import tempfile import time from collections import defau...
import json import requests from requests.auth import HTTPBasicAuth from tabpy.tabpy_tools.rest import RequestsNetworkWrapper, ServiceClient import unittest from unittest.mock import Mock class TestRequestsNetworkWrapper(unittest.TestCase): def test_init(self): RequestsNetworkWrapper() def test_init_...
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import (TestCase, assert_almost_equal, assert_equal, assert_, assert_raises, run_module_suite, assert_allclose, assert_array_equal) import scipy.signal.waveforms...
"""Support for Met.no weather service.""" import logging from random import randrange import metno import voluptuous as vol from homeassistant.components.weather import PLATFORM_SCHEMA, WeatherEntity from homeassistant.const import ( CONF_ELEVATION, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME, EVENT_...
"""Extract wikilinks from pages. The output format is csv. """ import csv import datetime import functools import collections import mwxml import jsonable import more_itertools import fuzzywuzzy.process from typing import Iterable, Iterator, Mapping, NamedTuple, Optional from .. import dumper, extractors, utils s...
from __future__ import absolute_import __all__ = ("Csp", "Hpkp", "ExpectCT", "ExpectStaple") from six.moves.urllib.parse import urlsplit, urlunsplit from sentry.interfaces.base import Interface from sentry.utils import json from sentry.utils.cache import memoize from sentry.web.helpers import render_to_string # Def...
# Copyright 2015 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...
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # mininode.p...
# # ================================================================= # ================================================================= """ This is a Task Module that binds the host_seas Network REST API with the DOM Model by creating AOMs that are used as view objects for the user. """ from nova import db from nova...
from collections import OrderedDict from itertools import zip_longest from typing import Iterable, Sequence, Tuple, Union from lxml import etree from requests import Response from requests_toolbelt.multipart.decoder import BodyPart from rets.errors import RetsParseError, RetsApiError, RetsResponseError from rets.http...
import json from sqlalchemy import ( Column, Integer, String, Text, Boolean, ) from superset import utils from superset.models.helpers import AuditMixinNullable, ImportMixin class BaseDatasource(AuditMixinNullable, ImportMixin): """A common interface to objects that are queryable (tables and datasources)"""...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Cutting Edge QA Marcin Koperski import os import os.path import time from robot.api import logger from robot.libraries import DateTime from selenium.webdriver import FirefoxProfile, ChromeOptions from selenium.webdriver.common.keys import Keys from T...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
import networkx as nx import matplotlib.pyplot as plt import exact_controllability as ECT from networkx.utils import powerlaw_sequence import operator import random import csv import copy import subprocess, os import time import numpy as np from ControllabilityRobustnessBasedOnEdgeAttack import RandomEdgeAttack from Co...
import time import typing import json import jsonpickle import logging import uuid from dateutil import parser from typing import List, Dict, Text, Any, Type, Optional if typing.TYPE_CHECKING: from rasa.core.trackers import DialogueStateTracker logger = logging.getLogger(__name__) def deserialise_events(serial...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2019 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
"""fips verb to build the oryol samples webpage""" import os import yaml import shutil import subprocess import glob from string import Template from mod import log, util, project, emscripten, android from tools import texexport # what to build BuildEmscripten = True BuildWasm = True ExportAssets = True ExtensionSa...
""" sqmpy.job.saga_helper ~~~~~ Provides ways to interact with saga classes """ import os import pwd import time import base64 import hashlib from threading import Thread import saga import flask from flask_login import current_user from sqmpy.job import helpers from sqmpy.job.helpers import send_state_c...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata from __future__ import unicode_literals import frappe, json from frappe.utils import cstr, cint from frappe.model import integer_docfield_properties, default_fields, no_value_fields, optional_fields from fra...
import logging from gluon import A from gluon import DIV from gluon import H3 from gluon import H4 from gluon import H5 from gluon import I from gluon import IS_IN_SET from gluon import LI from gluon import P from gluon import MARKMIN from gluon import SQLFORM from gluon import SPAN from gluon import TAG from gluon imp...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import mimetypes from io import BytesIO from flask import flash,...
import re import frappe import psycopg2 import psycopg2.extensions from six import string_types from frappe.utils import cstr from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT from frappe.database.database import Database from frappe.database.postgres.schema import PostgresTable # cast decimals as floats DEC...
# Copyright 2021 The TensorFlow Ranking 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 ag...
# Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
""" @package mi.instrument.um.thsph.thsph.test.test_driver @file marine-integrations/mi/instrument/um/thsph/ooicore/driver.py @author Richard Han @brief Test cases for thsph driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t testname] ...
# -*- coding: utf-8 -*- '''Base TestCase class for OSF unittests. Uses a temporary MongoDB database.''' import os import re import shutil import logging import unittest import functools import datetime as dt from flask import g from json import dumps import blinker import httpretty from webtest_plus import TestApp fro...
# -*- coding: utf-8 -*- """ Django settings for Congress project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.pa...
''' FileChooser =========== .. versionadded:: 1.0.5 .. versionchanged:: 1.2.0 In the chooser template, the `controller` is not a direct reference anymore but a weak-reference. You must update all the notation `root.controller.xxx` to `root.controller().xxx`. Simple example -------------- main.py ....
# coding: utf-8 """ Copyright 2015 SmartBear Software 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...
""" ========================================================= Connectivity Matrices, ROI Intersections and Density Maps ========================================================= This example is meant to be an introduction to some of the streamline tools available in dipy. Some of the functions covered in this example...
''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from .config import DEFAULT_CONFIG as CONFIG from .metric_mock import MetricMock from .sys_info import get_distinct_id, get_sys_info, get_versio...
""" Custom report definitions - control display of reports. The BaseReport is somewhat general, but it's currently specific to monthly reports. It would be pretty simple to make this more general and subclass for montly reports , but I'm holding off on that until we actually have another use case for it. """ from col...
# -*- coding: utf-8 -*- # # SQLAlchemy documentation build configuration file, created by # sphinx-quickstart on Wed Nov 26 19:50:10 2008. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
"""Wrapper to call Phabricator's Conduit API.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # phlsys_conduit # # Public Classes: # ConduitException # Conduit # .set_act_as_user # .cl...
#/*+*********************************************************************************** # * The contents of this file are subject to the Vtiger CRM Public License Version 1.0 # * ("License"); You may not use this file except in compliance with the License # * The Original Code is: Vtiger CRM Open Source # * The Initia...
"""Cubic spline functions used for interpolation. """ import numpy as np import numpy from flare.mgp.cubic_splines_numba import * class PCASplines: """ Build splines for PCA decomposition, mainly used for the mapping of the variance :param l_bounds: lower bound for the interpolation. \ E.g. 1-d ...
#!/usr/bin/env python # ======================================================================== # 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 l...