src
stringlengths
721
1.04M
from unittest import TestCase import numpy from netception.utils.visualization_util import VisualizationUtil class TestVisualizationUtil(TestCase): @classmethod def setUpClass(cls): cls.inception_shape = (32, 32, 3) cls.inception = numpy.random.random(cls.inception_shape) - 0.5 def test...
# (c) 2015, Joerg Thalheim <joerg@higgsboson.tk> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ author: Joerg Thalheim <joe...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 mengskysama # # 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 requ...
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ This test checks activation of UAHF and the different cons...
from brainhack.datasets import fetch_craddock_2012_test from nilearn.input_data import NiftiMasker from joblib import Memory from sklearn.feature_extraction.image import grid_to_graph import nibabel from sklearn.cluster import spectral_clustering from scipy.sparse import coo_matrix from brainhack.metrics.cluster import...
from html import * TITLE = 'YouFace' SUBTITLE = "A billion dollars and it's yours!" STYLESHEET = '/youface.css' LINKLIST = [('http://cit.cs.dixie.edu/cs/1410/', 'CS 1410'), \ ('http://new.dixie.edu/reg/syllabus/', 'College calendar'),] class Form(BlockContainer): def __init__(self, action): BlockContain...
# -*- coding: utf-8 -*- from nose.tools import assert_equal, assert_in from vcards import VCard, VCardParser TOTO_CARD = """BEGIN:VCARD VERSION:3.0 N:Toto;Tutu;;; FN:Tutu Toto ORG:python; item1.EMAIL;type=INTERNET;type=pref:toto@tutu.com REV:2013-08-29T21:50:13Z UID:1234-5678-9000-1 END:VCARD""" APPLE_CARD = """BEGIN...
# Using this to simply fill up a text file with placeholder names def fill_names(filename, num_of_names, variation, gender = "none"): if gender == "male": if variation == "first": with open("./%s" % str(filename), "w") as opened_file: for i in range(1, num_of_names + 1): ...
#! python import pymongo import motor from os import path from tornado.ioloop import IOLoop from tornado.options import options from requesthandlers.api import ApiHandler from requesthandlers.api.player import PlayerHandler from requesthandlers.api.user import UserHandler from requesthandlers.api.tournament import To...
from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers, validators from user_management.utils.validators import validate_password_strength User = get_user_model() class UniqueEmailValidator(validators.UniqueValidator): def f...
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
""" Demo of the errorbar function, including upper and lower limits """ import numpy as np import matplotlib.pyplot as plt # example data x = np.arange(0.5, 5.5, 0.5) y = np.exp(-x) xerr = 0.1 yerr = 0.2 ls = 'dotted' fig = plt.figure() ax = fig.add_subplot(1, 1, 1) # standard error bars plt.errorbar(x, y, xerr=xerr...
# Copyright (C) 2015-2017 Jan Blechta # # This file is part of FENaPack. # # FENaPack is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
import weighted_dict as weighteddict import pytest class TestWeightedDict(object): def test_keyerror(self): """raise key error if key not in dict""" x = weighteddict.WeightedDict() with pytest.raises(KeyError): x[1] def test_set(self): """check total of weights after ...
# -*- coding: utf-8 -*- """ Unit tests for handling email sending errors """ from itertools import cycle from celery.states import SUCCESS, RETRY from django.test.utils import override_settings from django.conf import settings from django.core.management import call_command from django.core.urlresolvers import reverse...
__author__ = 'Jon' import Tkconstants import tkFileDialog from Tkinter import * import Tkinter as Tk ######################################################################## ## adding a hashinng button, used to test basic functionality of enter text. ## Test commit for pycharm rebuild class MyApp(object): """""" ...
#! /usr/bin/python # -*- coding: utf-8 -*- ''' A cbz writter ''' from mgdpck import actions import os import mimetypes import zipfile class CbzWritter(actions.AbsWritter): @classmethod def get_name(cls): return 'cbz' def __init__(self, outdir): self.outdir = outdir self.out = None def done(se...
# 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 ...
# Bulletproof Arma Launcher # Copyright (C) 2016 Lukasz Taczuk # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # b...
from django.conf.urls import * from django.contrib.auth import views as auth_views from userena import views as userena_views from userena import settings as userena_settings from userena.compat import auth_views_compat_quirks, password_reset_uid_kwarg def merged_dict(dict_a, dict_b): """Merges two dicts and ret...
import argparse import sys import logging import os import csv class ReadItem: def __init__(self, sequence): self.Sequence = sequence self.TotalCount = 0 self.SampleMap = {} class AnnotationItem: def __init__(self, sequence, category): self.Sequence = sequence self.TotalCount = 0 self.Cate...
"""Test the rig module.""" import numpy as np from opensfm import pygeometry, rig, types def test_create_instances_with_patterns() -> None: # A first rig model defined as left/right/top/bottom # A complete instance instance1 = [ "12345_left.jpg", "12345_bottom.jpg", "12345_top.jpg...
# Copyright (c) 2014 Hitachi Data Systems, 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 # # U...
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket 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 applicab...
# -*- coding: utf-8 -*- from __future__ import division import numpy as np import PSim import pickle import csv import simplex fit_type = 'global' scale = 0.003 with open("pickled_data.p", "r") as file: pickled_data = pickle.load(file) powers = pickled_data['powers'] xdata = pickled_data['allxdata'] ydata = pick...
#load data Housing Dataset: https://archive.ics.uci.edu/ml/datasets/Housing import pandas as pd #df = pd.read_csv('https://archive.ics.uci.edu/ml/datasets/housing/Housing.data',header = None,sep = '\s+') df = pd.read_csv('F:/developSamples/ml/housing.data',header = None,sep = '\s+') df.columns = ['CRIM', 'ZN', 'INDUS',...
# Copyright 2013 OpenStack Foundation # 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 requ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from math import ceil import requests from flask import Blueprint, url_for from flask import request import json import jimit as ji import os from jimvc.api.base import Base from jimvc.models import Guest, Config, Disk from jimvc.models import Snapshot, SnapshotDiskMapp...
# -*- coding: utf-8 -*- # This file is part of TextVentures - https://github.com/RMed/textventures # # Copyright (C) 2013 Rafael Medina García <rafamedgar@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free...
# USAGE ''' python deep_learning_with_opencv.py --image images/jemma.png \ --prototxt bvlc_googlenet.prototxt \ --model bvlc_googlenet.caffemodel --labels synset_words.txt python deep_learning_with_opencv.py --image images/traffic_light.png \ --prototxt bvlc_googlenet.prototxt \ --model bvlc_googlenet.caffemodel -...
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option)...
# Copyright 2012 Nebula, Inc. # 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...
from __future__ import unicode_literals from django.apps import apps from django.db import models from django.db.utils import OperationalError, ProgrammingError from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import force_text from django.utils.encoding import python_2_unicode_compat...
# ----------------------------- # # Common simplifications passes # # ----------------------------- # from miasm2.expression.modint import mod_size2int, mod_size2uint from miasm2.expression.expression import * from miasm2.expression.expression_helper import * def simp_cst_propagation(e_s, e): """This passe incl...
import pytest from gitlabform.gitlabform.test import ( run_gitlabform, ) @pytest.fixture(scope="function") def one_owner(gitlab, group, groups, users): gitlab.add_member_to_group(group, users[0], 50) gitlab.remove_member_from_group(group, "root") yield group # we are running tests with root's ...
# Copyright 2018 Cloudbase Solutions Srl # All Rights Reserved. import functools import json from oslo_log import log as logging from webob import exc from coriolis import constants from coriolis import exception from coriolis import schemas LOG = logging.getLogger(__name__) def _get_show_deleted(val): if va...
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# -*- coding: utf-8 -*- from datetime import datetime from application.extensions import db from application.models.inventory import Item __all__ = ['Board', 'ChangeLog'] class ChangeLog(db.EmbeddedDocument): ''' log all user actions of change for a board ''' user = db.StringField() date = db.Dat...
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) a...
# # gPrime - A web-based genealogy program # # Copyright (C) 2011 Helge Herz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any la...
import datetime from django.db import models from django.conf import settings from django.contrib.auth.models import User from django.db.models.signals import post_save from tagging.fields import TagField from markupfield.fields import MarkupField from anthill.models import LocationModel ROLES = ( ('other', 'Commu...
# License: BSD 3 clause """ Tests related to classification experiments. :author: Michael Heilman (mheilman@ets.org) :author: Nitin Madnani (nmadnani@ets.org) :author: Dan Blanchard (dblanchard@ets.org) :author: Aoife Cahill (acahill@ets.org) """ from __future__ import (absolute_import, division, print_function, ...
from __future__ import print_function, division import matplotlib.pyplot as plt import numpy as np import scipy import pandas as pd import seaborn as sns from sklearn.datasets import load_boston from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from sklearn.linear_mod...
# -*- coding: utf-8 -*- # # Copyright (c) 2016 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # ...
########################################################################## # Author: Jane Curry, jane.curry@skills-1st.co.uk # Date: February 28th, 2011 # Revised: Extra debugging added Aug 23, 2011 # # JuniperFPC modeler plugin # # This program can be used under the GNU General Public L...
# coding=utf-8 # # Copyright 2017 F5 Networks 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 a...
# -*- coding: utf-8 -*- # Copyright (c) 2007, 2008, Benoît Chesneau # Copyright (c) 2007 Simon Willison, original work on django-openid # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
# Copyright 2018, The TensorFlow Federated 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...
from django.utils.translation import ugettext_lazy as _ class DefaultRoles(object): VIEWER = 'viewer' OBSERVER = 'observer' PARTICIPANT = 'participant' PROPOSER = 'proposer' CONTRIBUTOR = 'contributor' EDITOR = 'editor' OPERATOR = 'operator' DECIDER = 'decider' MANAGER = 'manager' ...
from . import app import json from flask import request,render_template,redirect,make_response,session @app.route('/upuser') def adduser(): return render_template('up.html',username=session['username']) @app.route('/changeuser',methods=['POST']) def changeuser(): change = request.form.get('change') usern...
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import unittest import uuid from nose.plugins.skip import SkipTest from datetime import datetime, timedelta import pymongo from pymongo.errors import ConfigurationError from pymongo.read_preferences import ReadPreference from bson import ObjectId, DBRef from...
"""Film cooting example""" import numpy as np from matplotlib import pyplot as plt from proptools import convection T_aw = 3200 # Adiabatic wall temperature of core flow [units: kelvin]. T_f = 1600 # Film temperature [units: kelvin]. T_w = 700 # Wall temperature [units: kelvin]. x = np.linspace(0, 1) # Dis...
############################################################################## # # Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # T...
import pulsar as psr def load_ref_system(): """ Returns citric_acid as found in the IQMol fragment library. All credit to https://github.com/nutjunkie/IQmol """ return psr.make_system(""" H 2.1308 0.2221 0.9663 C 1.7122 0.3441 -0.0545 H 2.099...
# 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 ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import warnings from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boo...
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import time from...
# Must satisfy the signature # [t,X,D,P] = sim_function(T,X0,D0,P0,I0); import numpy as np from scipy.integrate import ode import matplotlib.pyplot as PLT PLOT = True class SIM(object): def __init__(self, plt, pvt_init_data): #print I # atol = 1e-10 rtol = 1e-5 # tt,YY,dummy_D,...
from django.contrib.auth.models import ( AbstractBaseUser, AbstractUser, BaseUserManager, Group, Permission, PermissionsMixin, UserManager, ) from django.db import models # The custom User uses email as the unique identifier, and requires # that every user provide a date of birth. This lets us test #...
# 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...
"""AMQP Client implementing the 0-8 spec.""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License...
from ..regex import RegexDispatcher from ..append import append from .csv import CSV import os import datashape import sqlalchemy import subprocess copy_command = RegexDispatcher('copy_command') execute_copy = RegexDispatcher('execute_copy') @copy_command.register('.*sqlite') def copy_sqlite(dialect, tbl, csv): ...
import geohash import logging import operator from functools import partial from itertools import chain, product, combinations, imap from address_normalizer.deduping.duplicates import * from address_normalizer.deduping.storage.base import * from address_normalizer.text.gazetteers import * from address_normalizer.t...
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-07-26 09:15 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import picklefield.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_d...
# -*- coding: utf-8 -*- # mygame/world/batchcode_world.py from evennia import create_object, search_object from typeclasses import rooms, exits from evennia.utils import evtable from world import map_module # We begin by creating our rooms so we can detail them later. centre = create_object(rooms.Room, k...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # models.py # # Copyright 2012 Thomas Grainger <tagrain@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation; version 3. # ...
#!/usr/bin/env python # Copyright (C) 2016 g10 Code GmbH # # This file is part of GPGME. # # GPGME is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any la...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
# # Copyright 2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
""" AMAK: 20050515: This module is the test_select.py from cpython 2.4, ported to jython + unittest """ import errno import os import select import socket import sys import test_socket import unittest from test import test_support HOST = test_socket.HOST PORT = test_socket.PORT + 100 class SelectWrappe...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.test import TestCase from django.utils.timezone import now, timedelta from .factories import BookingType30F, UserF from ..models import Booking, SlotTime from ..forms import BookingCreateForm class BookingCreateFormTest(Tes...
""" Django settings for paul project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
# 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 agreed to in writing, software # dist...
from uuid import uuid4 from rdflib import URIRef, RDF, RDFS from oldman.vocabulary import OLDM_CORRESPONDING_CLASS class HydraSchemaAdapter(object): """Updates some Hydra patterns in the schema graph: - hydra:Link: create a hydra:Class, subclass of the link range that support the same operations "...
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
#!/usr/bin/env python3 # # Copyright (c) 2019 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # Author: Sathish Kuttan <sathish.k.kuttan@intel.com> # This file defines a message class that contains functions to create # commands to the target and to parse responses from the target. import bitstruct class...
# Copyright 2019 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# -*- coding: latin-1 -*- # Copyright (C) 2009-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later...
''' Created on 27. dec. 2012 @author: pcn ''' import wx from widgets.PcnImageButton import PcnImageButton from widgets.PcnCurveDisplayWindget import PcnCurveDisplayWidget from widgets.PcnEvents import EVT_DOUBLE_CLICK_EVENT, EVT_MOUSE_MOVE_EVENT from configurationGui.UtilityDialogs import updateChoices fro...
#!/usr/bin/python import os import sys import clingo import json # # STATS # class Stats: def __init__(self): self.__width = 13 def __ratio(self,x,y): return float(x)/float(y) if float(y)!=0 else 0 def __percent(self,x,y): return 100*self.__ratio(x,y) def __print_key...
from django.shortcuts import render from .d2lstat import process_file, calculateVirtualClassroomStats, facultyNotUsingD2LCalculation from .forms import UploadFileForm, VirtualClassroomUsageForm, FacultyNotUsingD2LForm def index(request): if request.method == 'POST': process_file(request.FILES['usage'].te...
# stdlib import json import os from pathlib import Path import subprocess import time from types import SimpleNamespace # third party import terrascript from terrascript import Module import terrascript.data as data import terrascript.provider as provider import terrascript.resource as resource # grid relative from ....
#!/usr/bin/python import time # Written tng@chegwin.org 3-Jul-2014 # Python runs slower than C, so 18.9 factor below becomes 16.9 (microseconds) sample_length=15.6/1000000.0 # Setup Pin 18 as output (Pin 12 in Pi numbering) import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) #Calculate our on/offs ...
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2019 Bitergia # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This ...
import datetime import itertools import unittest from copy import copy from unittest import mock from django.core.exceptions import FieldError from django.core.management.color import no_style from django.db import ( DatabaseError, DataError, IntegrityError, OperationalError, connection, ) from django.db.models im...
"""Gaussian Process models for Keras 2.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from keras.models import Model as KerasModel from keras.engine.topology import _to_list from keras.engine.training import _standardize_input_data from .callbacks imp...
############################################################################### # MIT License (MIT) # # Copyright (c) # # 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, in...
from cattle import ApiError from common_fixtures import * # NOQA def test_agent_unique(admin_client): agents = admin_client.list_agent(uri='sim://unique') if len(agents) == 0: agent = admin_client.create_agent(uri='sim://unique') agent = admin_client.wait_success(agent) assert agent....
#-*- coding:utf-8 -*- ''' yamlweb - utils Bag of tools. @copyright: 2015 by Mike Miller <mgmiller@studioxps> @license: GNU GPL 3+ ''' import sys, os import logging import yaml log = logging.getLogger(__name__) # figure correct function to import, though used elsewhere try: from ushlex import spl...
from polydatum.middleware import DalCommand, PathSegment def test_deferred_attribute_access(path_segment_factory): """ Verify that we can access non-existent attributes on this class and that we can access arbitrarily deep non-existent attributes. """ dc = DalCommand(lambda: None, path_segment_fac...
# -*- coding: utf-8 -*- # test_git.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os from git.test.lib import TestBase from git.test.lib.helper import...
############################################################################### # # ChartColumn - A class for writing the Excel XLSX Column charts. # # Copyright 2013-2019, John McNamara, jmcnamara@cpan.org # from . import chart class ChartColumn(chart.Chart): """ A class for writing the Excel XLSX Column ch...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # -------------------------------------------------------------------------- # FuME FuPa Match Explorer Copyright (c) 2017 Andreas Feldl <fume@afeldl.de> # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Publi...
"""Implement the Google Smart Home traits.""" import logging from homeassistant.components import ( cover, group, fan, input_boolean, media_player, light, lock, scene, script, switch, vacuum, ) from homeassistant.components.climate import const as climate from homeassistant....
#!/usr/bin/python # # Copyright 2014 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 b...
#!/usr/bin/env python from peacock.Input.InputFileEditor import InputFileEditor from peacock.Input.ExecutableInfo import ExecutableInfo from peacock.utils import Testing class Tests(Testing.PeacockTester): def setUp(self): super(Tests, self).setUp() self.test_input_file = "../../common/fsp_test.i" ...
# -*- coding: utf-8 -*- ############################################################################### # python-proteus - Proteus IPAM Python Library # Copyright (C) 2012 Stephan Adig <sh@sourcecode.de> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
"""Stress test for ndb with Python 2.7 threadsafe.""" import logging import random import threading import time from google.appengine.api import apiproxy_stub_map from google.appengine.datastore import datastore_stub_util from google.appengine.ext import testbed from ndb import model, tasklets INSTANCES = 4 RUNS ...