gt
stringclasses
1 value
context
stringlengths
2.49k
119k
## @file # This file is used to define class objects of INF file [Binaries] section. # It will consumed by InfParser. # # Copyright (c) 2011, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License...
# Copyright (c) 2012 Cloudera, Inc. All rights reserved. # # This module is used for common utilities related to parsing test files import collections import codecs import logging import re from collections import defaultdict from os.path import isfile, isdir from tests.common.test_dimensions import TableFormatInfo lo...
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i, h2o_exec, h2o_glm, h2o_jobs import h2o_print as h2p SCIPY_INSTALLED = True try: import scipy as sp import numpy as np import sklearn as sk print "numpy, scipy and sklearn are installed. W...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
#!/usr/bin/env python3 # # genetic.py # import random from math import pi, sqrt from simulation import Simulation MAXIMIZE, MINIMIZE = 11, 22 class Individual(object): alleles = (0,1) length = 10 seperator = '' optimization = MINIMIZE def __init__(self, chromosome=None): self.chromosome ...
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including wi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# Copyright (C) 2010, 2011 Ali Tofigh # # This file is part of PhylTr, a package for phylogenetic analysis # using duplications and transfers. # # PhylTr is released under the terms of the license contained in the # file LICENSE. """Utility functions useful when working with the PhylTr-package Description will follow...
import six import grab.spider.base from grab import Grab from grab.spider import Spider, Task, SpiderMisuseError, NoTaskHandler from grab.spider import inline_task from test.util import (BaseGrabTestCase, build_grab, build_spider, multiprocess_mode) from grab.spider.error import SpiderError cl...
from sympy.utilities.pytest import XFAIL, raises from sympy import ( symbols, lambdify, sqrt, sin, cos, tan, pi, acos, acosh, Rational, Float, Matrix, Lambda, Piecewise, exp, Integral, oo, I, Abs, Function, true, false, And, Or, Not, ITE, Min, Max) from sympy.printing.lambdarepr import LambdaPrinter import ...
import sys try: from gurobipy import GRB, quicksum, Var except: pass from Heuristics import RealGPS from Models import FixedWaitingTimeModel, TEGModel from Problem import Problem, SolvinType from Solver import Solver from optimizedGPS.structure.DriversStructure import DriversStructure from optimizedGPS.struct...
__author__ = 'tylin' __version__ = '2.0' # Interface for accessing the Microsoft COCO dataset. # Microsoft COCO is a large image dataset designed for object detection, # segmentation, and caption generation. pycocotools is a Python API that # assists in loading, parsing and visualizing the annotations in COCO. # Pleas...
import cuttsum.events import cuttsum.corpora from cuttsum.pipeline import InputStreamResource from cuttsum.classifiers import NuggetRegressor import cuttsum.judgements import pandas as pd import numpy as np from datetime import datetime from cuttsum.misc import event2semsim from sklearn.cluster import AffinityPropagat...
"""Convenience functions for running common Picard utilities. """ import os import collections import pysam from bcbio.utils import file_exists from bcbio.distributed.transaction import file_transaction, tx_tmpdir def picard_rnaseq_metrics(picard, align_bam, ref, ribo="null", out_file=None): """ Collect RNASeq ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import importlib import re from flask import request, url_for, g from flask_restful import Resource, abort from marshmallow.exceptions import ValidationError from sqlalchemy.exc import IntegrityError from twisted.logger ...
#!/usr/bin/env python ############################################################################### # Name: PlateButtonDemo.py # # Purpose: PlateButton Test and Demo File # # Author: Cody Precord <cprecord@editra.org> ...
# -*- coding: utf-8 -*- """ This module contains the Branch class (one branch of the tree) and the Nodes class """ import numpy as np from multiprocessing.dummy import Pool as ThreadPool from scipy.spatial import cKDTree pool = ThreadPool(16) class Branch: """Class that contains a branch of the fractal tree ...
import datetime from django.core.exceptions import PermissionDenied from django.db.models import Q, Subquery from django.utils.encoding import force_str from django.utils.translation import gettext_lazy as _ from django.views.generic.base import TemplateResponseMixin from django.views.generic.list import BaseListView ...
# -*- coding: utf-8 -*- """This file contains SkyDrive log file parser in plaso.""" import pyparsing from dfdatetime import time_elements as dfdatetime_time_elements from plaso.containers import events from plaso.containers import time_events from plaso.lib import errors from plaso.lib import definitions from plaso....
# -*- coding: utf-8 -*- ''' Manage RabbitMQ Users ===================== Example: .. code-block:: yaml rabbit_user: rabbitmq_user.present: - password: password - force: True - tags: - monitoring - user - perms: - '/': - '.*' ...
# Copyright (C) 2010 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...
#!/usr/bin/env python # # Copyright (C) 2017 ShadowMan # import abc from urllib import parse from websocket.utils import generic, exceptions class KeyValuePairs(object): """ A Key-Value Pairs :param self._key: Key in the key-value pairs :param self._index: Lowercase keys :param self._value: Value in ...
import sys import unittest from test import support from test.test_grammar import (VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS) L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), ...
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# -*- coding: utf-8 -*- """ Features ------ Extra features Elements. """ import json from jinja2 import Template from six import text_type, binary_type from branca.utilities import ( _parse_size, _locations_mirror, _locations_tolist, image_to_url, none_min, none_max, iter_points ) from branca.element impor...
"""Sensitive variant calling using VarDict. Defaults to using the faster, equally sensitive Java port: https://github.com/AstraZeneca-NGS/VarDictJava if 'vardict' or 'vardict-java' is specified in the configuration. To use the VarDict perl version: https://github.com/AstraZeneca-NGS/VarDict specify 'vardict-perl'....
# Copyright (c) 2021 UAVCAN Consortium # This software is distributed under the terms of the MIT License. # Author: Pavel Kirienko <pavel@uavcan.org> from __future__ import annotations import sys from typing import Iterator, Optional, Sequence, Callable import itertools import pyuavcan from .register import ValueProxy...
#!/usr/bin/env python import json import sys from os import path import re from markdown.extensions.toc import slugify if __package__ is None: sys.path.append( path.dirname( path.dirname( path.abspath(__file__) ) ) ) from apib_extra_parse_utils import get_nested_parameter_values_description from apib_ext...
#!/usr/bin/env python # Author : Pierre Schnizer """ Wrapper for the ode solver of gsl. This solver wraps all features as descirbed in Chapter 25 of the gsl documentation. The _odeiv file provides the low level wrapper. Direct usage at your special own risk. Here is the pythonic version of the example from the gsl d...
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
from six import binary_type from typing import Any, AnyStr, Callable, Dict, Iterable, List, MutableMapping, Optional, Text from django.conf import settings from django.core.exceptions import DisallowedHost from django.utils.translation import ugettext as _ from django.utils.deprecation import MiddlewareMixin from ze...
import time from unittest import TestCase from mock import Mock, PropertyMock, patch from carbon.cache import ( MetricCache, _MetricCache, DrainStrategy, MaxStrategy, RandomStrategy, SortedStrategy, TimeSortedStrategy, BucketMaxStrategy ) class MetricCacheTest(TestCase): def setUp(self): settings = { ...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distr...
import asyncio import random import logging import hashlib import inspect from aiohttp import web, hdrs from sockjs.session import SessionManager from sockjs.protocol import IFRAME_HTML, json from sockjs.transports import handlers from sockjs.transports.utils import session_cookie from sockjs.transports.utils import c...
# -*- coding: utf-8 -*- """trying out VAR filtering and multidimensional fft Note: second half is copy and paste and does not run as script incomplete definitions of variables, some I created in shell Created on Thu Jan 07 12:23:40 2010 Author: josef-pktd update 2010-10-22 2 arrays were not defined, copied from fft...
#!/usr/bin/env python3 # -*- mode: python -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 The Electrum developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without...
import time import numpy as np from numpy.lib.function_base import average import taichi as ti ti.init(arch=ti.gpu) res = (800, 800) color_buffer = ti.Vector.field(3, dtype=ti.f32, shape=res) count_var = ti.field(ti.i32, shape=(1, )) tonemapped_buffer = ti.Vector.field(3, dtype=ti.f32, shape=res) max_ray_depth = 10...
import operator from sys import version_info from unittest import TestCase from xml.etree import ElementTree from genologics.entities import StepActions, Researcher, Artifact, \ Step, StepPlacements, Container, Stage, ReagentKit, ReagentLot, Sample, Project from genologics.lims import Lims if version_info[0] == 2...
########################################################################## # # Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
# -*- coding: utf-8 -*- """ pygments.lexers.actionscript ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for ActionScript and MXML. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, using,...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
from django import forms from django.forms import ModelForm from tasks.models import Task_Foci_001 class Form_Task_Foci_001_00(ModelForm): class Meta: model = Task_Foci_001 fields = ('cell_a0', 'cell_b0', 'cell_c0', 'cell_d0', 'cell_e0', 'cell_f0', 'cell_g0', 'cell_h0', 'cell_i0'...
import atexit import logging import os import threading import cherrypy import ifcfg import requests from django.conf import settings from django.core.management import call_command from .system import kill_pid from .system import pid_exists from kolibri.content.utils import paths from kolibri.utils.conf import KOLIB...
"""Translation helper functions.""" import locale import os import re import sys import warnings import gettext as gettext_module from cStringIO import StringIO from threading import local from django.utils.importlib import import_module from django.utils.safestring import mark_safe, SafeData # Translations are cac...
# Copyright (c) 2003-2010 Sylvain Thenault (thenault@gmail.com). # Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 t...
"""Test the validation module""" from __future__ import division import sys import warnings import tempfile import os from time import sleep import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.uti...
"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import TracebackType from typing import ( # noqa: F401 pylint: disable=unused-import Awaitable, Dict, Iterable, List, Optional, Tuple, Type, Union) from...
import time import cv2 from ev3control.rpc import Robot from rick.controllers import * from rick.A_star_planning import * from rick.core import State from rick.core import main_loop from rick.async import AsyncCamera from rick.utils import TrackerWrapper,plot_bbox from nn_object_detection.object_detectors import NNObje...
#!/usr/bin/env python2 from __future__ import print_function from bs4 import BeautifulSoup as bs import requests import sys import os def readConfig(): """ Read conf file and returns (editorName, pathToSave) """ confPath = os.path.expanduser("~") confFile = os.path.join(confPath, ".forcecode") ...
""" Tests for the pandas custom headers in http(s) requests """ import gzip import http.server from io import BytesIO import multiprocessing import socket import time import urllib.error import pytest from pandas.compat import is_ci_environment import pandas.util._test_decorators as td import pandas as pd import pan...
from __future__ import unicode_literals import argparse import json import re import sys from threading import Lock import six from flask import Flask from flask.testing import FlaskClient from six.moves.urllib.parse import urlencode from werkzeug.routing import BaseConverter from werkzeug.serving import run_simple ...
import collections import operator import os import json import logging import mimetypes import md5 from django.core.urlresolvers import reverse from django.core.cache import cache from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.http import H...
import random import unittest from hearthbreaker.agents.basic_agents import DoNothingAgent, PredictableAgent from tests.agents.testing_agents import OneCardPlayingAgent, PlayAndAttackAgent, CardTestingAgent,\ SelfSpellTestingAgent, EnemyMinionSpellTestingAgent from tests.testing_utils import generate_game_for from...
import numpy as np from numpy.testing import assert_equal, assert_array_equal from scipy.stats import rankdata, tiecorrect import pytest class TestTieCorrect(object): def test_empty(self): """An empty array requires no correction, should return 1.0.""" ranks = np.array([], dtype=np.float64) ...
"""The tests for the device tracker component.""" from datetime import datetime, timedelta import json import logging import os from unittest.mock import Mock, call, patch import pytest from homeassistant.components import zone import homeassistant.components.device_tracker as device_tracker from homeassistant.compon...
# -*- coding: utf-8 -*- from datetime import datetime import argparse import json import requests from flask import Flask, request, render_template from requests.packages.urllib3.exceptions import InsecureRequestWarning import config import db import utils from names import POKEMON_NAMES requests.packages.urllib3.di...
# 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...
from __future__ import division import numpy as np import datetime import rosbag import rospy from copy import copy, deepcopy from exceptions import KeyError, ValueError from segway_rmp.msg import SegwayStatusStamped from geometry_msgs.msg import PoseStamped import matplotlib.pyplot as plt import matplotlib.animation a...
# -*- coding: utf-8 -*- """ pygments.lexers.monte ~~~~~~~~~~~~~~~~~~~~~ Lexer for the Monte programming language. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.token import Comment, Error, Keyword, Name, Number, Operat...
# Copyright 2016 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. import argparse import json import os import sys # This is the list of tests to run. It is a dictionary with the following # fields: # # name (required): Th...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from datetime import datetime from warnings import warn from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.utils import timezone from django.utils.html import format_html from django.utils...
import logging import os import shutil from django.conf import settings from readthedocs.doc_builder.config import ConfigWrapper from readthedocs.doc_builder.loader import get_builder_class from readthedocs.projects.constants import LOG_TEMPLATE log = logging.getLogger(__name__) class PythonEnvironment(object): ...
"""``tornado.gen`` is a generator-based interface to make it easier to work in an asynchronous environment. Code using the ``gen`` module is technically asynchronous, but it is written as a single generator instead of a collection of separate functions. For example, the following asynchronous handler: .. testcode:: ...
""" Benching joblib pickle I/O. Warning: this is slow, and the benchs are easily offset by other disk activity. """ import os import time import shutil import numpy as np import joblib import gc from joblib.disk import disk_used try: from memory_profiler import memory_usage except ImportError: memory_usage =...
#!/usr/bin/env python """ Release script for botan (https://botan.randombit.net/) This script requires Python 2.7 or 3.6 (C) 2011,2012,2013,2015,2016,2017 Jack Lloyd Botan is released under the Simplified BSD License (see license.txt) """ import datetime import errno import hashlib import io import logging import ...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
#!/usr/bin/env python2.7 """opencachehttp.py: HTTP Server - serves cached HTTP objects to requesting clients.""" import BaseHTTPServer import collections import hashlib import httplib import os import signal import SocketServer import sys import threading import opencache.lib.opencachelib as lib import opencache.nod...
### BEGIN LICENSE ### ### Use of the triage tools and related source code is subject to the terms ### of the license below. ### ### ------------------------------------------------------------------------ ### Copyright (C) 2011 Carnegie Mellon University. All Rights Reserved. ### Portions Copyright 2013 BlackBerry Ltd....
from django.db.models import Exists, F, IntegerField, OuterRef, Value from django.db.utils import DatabaseError, NotSupportedError from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models import Number, ReservedName @skipUnlessDBFeature('supports_select_union') class QuerySetSetOperationTe...
import os import shutil import subprocess import sys import tempfile import unittest import warnings import numpy import six import chainer from chainer.backends import cuda from chainer import testing from chainer.testing import attr class TestDummyDeviceType(unittest.TestCase): def test_int(self): as...
# -*- coding: utf-8 -*- """ Utilities """ super_entity = s3mgr.model.super_entity super_link = s3mgr.model.super_link super_key = s3mgr.model.super_key s3_action_buttons = s3base.S3CRUD.action_buttons # ----------------------------------------------------------------------------- def s3_register_validation(): ""...
from stubydoo import double from tn.plonebehavior.template import interfaces from tn.plonebehavior.template import NullTemplateConfiguration from tn.plonebehavior.template.compilation_strategy import StyledPageCompilationStrategy from tn.plonebehavior.template.compilation_strategy import CompilationStrategy from zope.a...
import datetime from functools import partial import inspect import pydoc import numpy as np import pandas as pd import break4w._defaults as b4wdefaults class Question: u"""A base object class for handling Data dictionary entries """ true_values = b4wdefaults.true_values false_values = b4wdefaults.f...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.template} """ from cStringIO import StringIO from zope.interface.verify import verifyObject from twisted.internet.defer import succeed, gatherResults from twisted.python.filepath import FilePath from twisted.trial....
import os os.environ["CUDA_VISIBLE_DEVICES"] = "0" import numpy as np from rfho.models import LinearModel, vectorize_model from rfho.utils import cross_entropy_loss, stepwise_pu, unconditional_pu, PrintUtils, norm from rfho.datasets import load_iris, ExampleVisiting from rfho.hyper_gradients import ReverseHG, ForwardH...
#!/usr/bin/env python # Copyright 2013 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. """This is a python sync server used for testing Chrome Sync. By default, it listens on an ephemeral port and xmpp_port and sends the ...
# Copyright (C) 2013 by Yanbo Ye (yeyanbo289@gmail.com) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Classes and methods for tree construction""" __docformat__ = "restructuredtext en" import it...
""" Title: Writing a training loop from scratch Author: [fchollet](https://twitter.com/fchollet) Date created: 2019/03/01 Last modified: 2020/04/15 Description: Complete guide to writing low-level training & evaluation loops. """ """ ## Setup """ import tensorflow as tf from tensorflow import keras from tensorflow.ker...
#!/usr/bin/env python3 # coding: utf-8 # vim: set ts=4 sts=4 sw=4 expandtab cc=80: # Copyright (c) 2014, 2016, chys <admin@CHYS.INFO> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistr...
from collections import namedtuple from typing import Dict, List from eth_utils import to_canonical_address from raiden.constants import GENESIS_BLOCK_NUMBER, UINT64_MAX from raiden.exceptions import InvalidBlockNumberInput, UnknownEventType from raiden.network.blockchain_service import BlockChainService from raiden....
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# # CORE # Copyright (c)2010-2012 the Boeing Company. # See the LICENSE file included in this distribution. # # authors: core-dev@pf.itd.nrl.navy.mil # ''' vnode.py: SimpleJailNode and JailNode classes that implement the FreeBSD jail-based virtual node. ''' import os, signal, sys, subprocess, threading, string import...
import os import sys from configparser import ConfigParser import pytest import radon.cli as cli import radon.complexity as cc_mod from radon.cli.harvest import CCHarvester, Harvester, MIHarvester, RawHarvester from radon.tests.test_cli_harvest import ( BASE_CONFIG, CC_CONFIG, MI_CONFIG, RAW_CONFIG, )...
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime import imp from myPersonalFunctions import * import glob import numpy # Useful codes # os.system("awk '{print $NF}' all_wham.dat > e_total") # tr " " "\n" ...
# Copyright (c) 2015-2016 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import os import cPickle as pickle import mock import flask from google.appengine.api import taskqueue from flask.ext import gae from flask.ext.gae import queuehandler @gae.pushqueue('testqueue') def execute(*args, **kwargs): return "OK" tq_bp = flask.Blueprint('test_blueprint', __name__) @tq_bp.route('/queue...
__author__ = 'volodymyr' from gizer.util import * import json import re def test_get_cleaned_field_name(): field_name = '_test_' assert get_cleaned_field_name(field_name) == 'test_' field_name = '__test_' assert get_cleaned_field_name(field_name) == 'test_' field_name = '_ _test' assert get_c...
# postgresql/psycopg2.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+psycopg2 :name: psycopg2 :dbapi: psycopg2 ...
# Copyrigh 2014 Cisco Systems. # 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...
import unittest from actuator.exceptions import InvalidDefinitionArguments, \ InvalidDefinitionName, \ InvalidSubstringInDefinitionName, \ DefinitionNamesAmbiguity from actuator._command_line_parser import _CommandLineParse...
''' Carousel ======== .. image:: images/carousel.gif :align: right .. versionadded:: 1.4.0 The :class:`Carousel` widget provides the classic mobile-friendly carousel view where you can swipe between slides. You can add any content to the carousel and have it move horizontally or vertically. The carousel can disp...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ============= Model Parsers ============= :Authors: Moritz Emanuel Beber Nikolaus Sonnenschein :Date: 2011-04-07 :Copyright: Copyright(c) 2011 Jacobs University of Bremen. All rights reserved. :File: parsers.py """ __all__ = ["parse"] import o...
# Copyright (c) 2013-2021 khal contributors # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publi...
#!/usr/bin/env python ################################################################################ # Copyright (C) The Qt Company Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * R...
# -------------------------------------------------------- # Caffe @ Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- import dragon.ops as ops from dragon.core.tensor import Tensor from ..layer import Layer class InnerProductLayer(Layer): """Th...
import time import re import inspect import numpy as np import pandas as pd from scipy import stats, optimize, interpolate, signal, linalg import patsy as ps import statsmodels.api as sm import sklearn.metrics as met import sklearn.linear_model as lm from sklearn.base import BaseEstimator, TransformerMixin, RegressorM...
"""Template platform that aggregates meteorological data.""" from __future__ import annotations import voluptuous as vol from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, ATTR_CONDITION_EXCEPTIONAL, ATTR_CONDITION_FOG, ATTR_CONDITION_HAIL, ATTR_C...
from datetime import datetime, timedelta import logging from django.core.cache import cache from django.db import models import bleach import caching.base as caching from tower import ugettext_lazy as _ import amo.models from amo import helpers from amo.celery import task from translations.fields import save_signal,...