text
stringlengths
475
200k
""" Base file upload handler classes, and the built-in concrete subclasses """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import TemporaryUplo...
# coding: utf8 { '!langcode!': 'fr', '!langname!': 'Français', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" est une expression optionnelle comme "champ1=\'nouvellevaleur\'". Vous ne pouvez mettre à jour ou supprimer les résultats d\'un JOI...
""" ========================================================== Sample pipeline for text feature extraction and evaluation ========================================================== The dataset used in this example is the 20 newsgroups dataset which will be automatically downloaded and then cached and reused for the do...
# iSCSI configuration dialog # # Copyright (C) 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distribute...
# This file is part of Acacia+, a tool for synthesis of reactive systems using antichain-based techniques # Copyright (C) 2011-2013 UMONS-ULB # # 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; ei...
import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt from scipy.ndimage.filters import maximum_filter from scipy.ndimage.morphology import (generate_binary_structure, iterate_structure, binary_erosion) import hashlib from operator import itemgetter IDX...
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import random import socket from furl import furl import bzrest import requests from requests import RequestException...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 NEC Corporation. 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.or...
""" Use this module to get and run all tk tests. tkinter tests should live in a package inside the directory where this file lives, like test_tkinter. Extensions also should live in packages following the same rule as above. """ import os import sys import unittest import importlib import test.support this_dir_path ...
""" Helper functions """ import numpy as np def xgrad(gray_image): """ Returns the X gradient of grayscale image, imitating MatLab's gradient function Parameters ---------- gray_image : numpy.ndarray Grayscale image Returns ------- numpy.ndarray X gradient of imag...
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.exif, implementing the exif namespace in gdata # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not...
# Copyright (c) 2013 Andreas Sandberg # 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 fol...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata from __future__ import unicode_literals import frappe, os from frappe.model.meta import Meta from frappe.modules import scrub, get_module_path, load_doctype_module from frappe.model.workflow import get_wo...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014 Peter Oliver <[EMAIL]> # # 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 la...
# coding=utf-8 import struct import time import os, sys def parse_hst_csv(src_path, des_path, time_from=None, time_to=None): content = open(src_path, 'rb').read() # 读取头文件结构信息 # 基础版本 print "basic verison: %i" % struct.unpack("i", content[0:4])[0] # 版本信息 print "versoin: %s" % "".join(struct.unpack("64c"...
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Steve English <[EMAIL]> # # Copyright 2012 Vincent Jacques <[EMAIL]> # # Copyrig...
# -*- coding: utf-8 -*- """ *************************************************************************** contour.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander bruy at gmail dot com *******************...
from durable.lang import * import math import datetime import json _fact_count = 0 def create_and_post(host, fact): global _fact_count fact['id'] = _fact_count fact['sid'] = 1 host.post('waltzdb', fact) _fact_count += 1 def create_and_assert(host, fact): global _fact_count fact['id'] = _fa...
from django.conf import settings from django.core.checks.security import base, csrf, sessions from django.core.checks.utils import patch_middleware_message from django.test import SimpleTestCase from django.test.utils import override_settings class CheckSessionCookieSecureTest(SimpleTestCase): @property def f...
# -*- coding: utf-8 -*- # # # Authors: Guewen Baconnier # Copyright 2015 Camptocamp SA # # 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, either version 3 of the # Licens...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible 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 #...
# # 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 us...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
""" interface device support class(es) http://libvirt.org/formatdomain.html#elementsNICS http://libvirt.org/formatnwfilter.html#nwfconceptsvars """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.devices import base, librarian class Interface(base.TypedDeviceBase): __slots__ = ('so...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'PendingProjectMember', fields ['project', 'email'] db.delete_unique('sentry_pendi...
import hypothesis import hypothesis.strategies as strategies import pytest from testix import fake from testix import scenario from testix import testixexception from testix import argumentexpectations class TestArgumentExpectations: @hypothesis.given(A=strategies.integers(),B=strategies.integers()) def test_a...
from django.template.defaultfilters import slugify from django.contrib import admin from cms.models import * from django.conf import settings from PIL import Image import glob, os from cms.forms import * class SubNavInline(admin.TabularInline): model = SubNav extra = 0 class NavAdmin(admin.ModelAdmin): li...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import filecmp import os import shutil import subprocess import sys i...
# Copyright 2015-2016 Yelp 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 writin...
# coding:utf-8 ''' Created on 2017/12/8. @author: chk01 ''' import scipy.io as scio # data = scio.loadmat(file) # from sklearn.model_selection import train_test_split # # print(data['X'].shape) # print(data['Y'].shape) # X_train, X_test, Y_train, Y_test = train_test_split(data['X'], data['Y'], test_size=0.2) # print(...
# Copyright (c) 2009-2010 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # # 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 limitat...
from django.core.exceptions import ValidationError from django.core.validators import ( MaxLengthValidator, MaxValueValidator, MinLengthValidator, MinValueValidator, ) from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _, ngettext_lazy class ArrayMaxLengt...
#!/usr/bin/env python import queue import sched import time import unittest from test import support try: import threading except ImportError: threading = None TIMEOUT = 10 class Timer: def __init__(self): self._cond = threading.Condition() self._time = 0 self._stop = 0 def ...
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible 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. # # Ansible is dis...
from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback class EchoLayer(YowInterfaceLayer): @ProtocolEntityCallback("message") def onMessage(self, messageProtocolEntity): if messageProtocolEntity.getType() == 'text': self.onTextMessage(messa...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <[EMAIL]> # # This file is part of Ansible # # Ansible 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 # (...
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
from __future__ import absolute_import from django.test import TestCase from .models import Place, Restaurant, Bar, Favorites, Target, UndergroundBar class OneToOneRegressionTests(TestCase): def setUp(self): self.p1 = Place(name='Demon Dogs', address='944 W. Fullerton') self.p1.save() s...
#!/usr/bin/env python #========================================================================== # # Copyright Insight Software Consortium # # 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 Licen...
"""Redo the builtin repr() (representation) but with limits on most sizes.""" __all__ = ["Repr", "repr", "recursive_repr"] import builtins from itertools import islice try: from _thread import get_ident except ImportError: from _dummy_thread import get_ident def recursive_repr(fillvalue='...'): 'Decorato...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import warnings from typing import Optional, Union import numpy as np import pandas as pd import typic from solarpy import declination from tstoolbox import tsutils from . import meteolib, utils warnings.filterwarnings("ignore...
# -*- coding: utf-8 -*- # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:[EMAIL] # # 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 Li...
""" File-like objects that read from or write to a bsddb record. This implements (nearly) all stdio methods. f = DBRecIO(db, key, txn=None) f.close() # explicitly release resources held flag = f.isatty() # always false pos = f.tell() # get current position f.seek(pos) # set current position ...
import gc import os import sys import signal import weakref from cStringIO import StringIO import unittest @unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill") @unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows") @unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on f...
# Copyright 2018 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 applicable ...
# 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 # distributed under t...
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License from __future__ import print_function try: import nltk.corpus except ImportError: print("nltk n...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Response.answer_number' db.add_column(u'survey_response', 'answer_number', ...
# -*- 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...
# The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/ # # Software distributed under the License is distributed on an "AS IS"basis, #...
#! /usr/bin/env python ''' Run this script from Source/Core/ to find all the #include cycles. ''' import subprocess def get_local_includes_for(path): lines = open(path).read().split('\n') includes = [l.strip() for l in lines if l.strip().startswith('#include')] return [i.split()[1][1:-1] for i in include...
# 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-2.0 # # Unless required by...
# -*- coding: utf-8 -*- # # 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 #...
"""Support for binary sensor using the PiFace Digital I/O module on a RPi.""" import voluptuous as vol from homeassistant.components import rpi_pfio from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME import homeassistant...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2011 Geisha Tokyo Entertainment, Inc. # # 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 witho...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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 ...
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a ...
#!/usr/bin/env python # vim: fileencoding=utf-8 et ts=4 sts=4 sw=4 tw=0 fdm=indent """ A simple RPC server that shows how to: * start several worker processes * use zmq proxy device to load balance requests to the workers * make each worker to serve multiple RPC services asynchronously using the Python Threading mu...
# Generated by Django 2.2.12 on 2020-05-04 20:29 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('adventures', '0016_auto_20200503_1924'), ] operations = [ migrations.RemoveField( model_name='...
""" Preference models, queryset and managers that handle the logic for persisting preferences. """ from django.db import models from django.db.models.query import QuerySet from django.conf import settings from django.utils.functional import cached_property from dynamic_preferences import user_preferences_registry, gl...
# A demo of the Windows CE Remote API # # This connects to a CE device, and interacts with it. import wincerapi import win32event import win32api import win32con import os import sys import getopt from repr import repr def DumpPythonRegistry(): try: h = wincerapi.CeRegOpenKeyEx(win32con.HKEY_LOCAL_MACHIN...
# 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...
""" Test suite for PictureHandler and ItemPictureHandler """ from tests.test_case import TestCase import json from io import BytesIO import os import uuid import http.client as client from models import Item, Picture from tests import test_utils import utils EXPECTED_RESULTS = test_utils.RESULTS['pictures'] TEST_...
from eve.tests import TestBase from eve.tests.utils import DummyEvent from eve.tests.test_settings import MONGO_DBNAME from eve import ETAG from bson import ObjectId from eve.utils import ParsedRequest import simplejson as json import copy from eve.methods.delete import deleteitem_internal class TestDelete(TestBase)...
from moto.core import BaseBackend import boto.ec2.cloudwatch import datetime class Dimension(object): def __init__(self, name, value): self.name = name self.value = value class FakeAlarm(object): def __init__(self, name, comparison_operator, evaluation_periods, period, thres...
## This file is part of Invenio. ## Copyright (C) 2008, 2010, 2011 CERN. ## ## Invenio 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 versio...
# -*- coding: utf-8 -*- # # Copyright (c) 2018, Marcelo Jorge Vieira <[EMAIL]> # # 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, either version 3 of the License, or (at your # option)...
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, 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 # n...
#!/usr/bin/env python # # # Copyright 2009-2016 Ghent University # # This file is part of hanythingondemand # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), ...
# Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware imp...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Autoreloading launcher. # Borrowed from Peter Hunt and the CherryPy project (http://www.cherrypy.org). # Some taken from Ian Bicking's Paste (http://pythonpaste.org/). # # Portions copyright (c) 2004, CherryPy Team ([EMAIL]) # All rights reserved. # # Redistribution and use in source and binary forms, with or without...
############################################################################# ## ## Copyright (C) 2010 Hans-Peter Jansen <[EMAIL]>. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENSE:BSD$ ## You may use th...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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.apac...
"""Read the balance of your bank accounts via FinTS.""" from collections import namedtuple from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_USERNAME, CONF_PIN, CONF_URL, CONF_NAME import homeassistan...
""" Django's support for templates. The django.template namespace contains two independent subsystems: 1. Multiple Template Engines: support for pluggable template backends, built-in backends and backend-independent APIs 2. Django Template Language: Django's own template engine, including its built-in loaders, ...
""" Copyright 2017 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
# -*- coding: utf-8 -*- """ *************************************************************************** user.py --------------------- Date : January 2015 Copyright : (C) 2015 by Nathan Woodrow Email : woodrow dot nathan at gmail dot com ********************...
from math import tanh from pysqlite2 import dbapi2 as sqlite def dtanh(y): #this effectively creates a smaller change multiplier when the value is closest to 0 (when the slope is steepest) P_D controller? return 1.0-y*y class SearchNet: def __init__(self, dbname): self.con = sqlite.connect(dbname) def __del__(...
import datetime, json, urllib2, os, errno, requests # Open/create file, deleting info already in it so that we can make fresh info file_name = open('data/311.json', 'w') issues = [] working = {'issues':issues} data = {} # Get date in the past to start start_date = (datetime.datetime.today() + datetime.timedelta(-180...
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class StorageClassConfig(object): ''' Handle service options ''' # pylint: disable=too-many-arguments def __init__(self, name, provisioner, parameters=None, ...
#!/usr/bin/env python # ........................................................................... # # # IzPack - Copyright 2008 Julien Ponge, All Rights Reserved. # # http://izpack.org/ # http://izpack.codehaus.org/ # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License,...
from flask_wtf import Form from wtforms import StringField, PasswordField, SubmitField from wtforms.validators import DataRequired, Email, Length class SignupForm(Form): first_name = StringField('First name', validators=[DataRequired("Please enter your first name.")]) last_name = StringField('Last name', validato...
# -*- coding: utf-8 -*- """ flask.helpers ~~~~~~~~~~~~~ Implements various helpers. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys import pkgutil import posixpath import mimetypes from time import time from zlib import adler32 from th...
# -*- encoding: utf-8 -*- '''HTTPHandler that supports a callback method for progress reports. ''' import urllib2 import httplib import logging __all__ = ['urlopen'] logging.basicConfig() LOG = logging.getLogger(__name__) progress_callback = None class ReportingSocket(object): '''Wrapper around a socket. Give...
# # setup.py # # Copyright (C) 2010 Antoine Mercadal <[EMAIL]> # 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, either version 3 of the # License, or (at your option) any later version. # ...
#!/usr/bin/env python ## Copyright (c) 2012 The WebM project authors. All Rights Reserved. ## ## Use of this source code is governed by a BSD-style license ## that can be found in the LICENSE file in the root of the source ## tree. An additional intellectual property rights grant can be found ## in the file PATENT...
"""Unit tests for host collections. :Requirement: Hostcollection :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: HostCollections :Assignee: swadeley :TestType: Functional :CaseImportance: High :Upstream: No """ from random import choice from random import randint import pytest from broker imp...
from setuptools import setup, find_packages from chamber.version import get_version setup( name='django-chamber', version=get_version(), description='Utilities library meant as a complement to django-is-core.', author='Lubos Matl, Oskar Hollmann', author_email='[EMAIL], [EMAIL]', url='http://...
"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix composed of characters in the identchars member. 3. A ...
""" @author: Jonah Haefner and Lane Carasik Title: master_example.py The purpose of this script is to ensure the four functions included in this package are functioning properly and as an example of use for the user. It currently only provides checks for the inline geometry with the fluid at a Reynolds number ...
#!/usr/bin/python # # Copyright 2014 Microsoft Corporation # # 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...
# 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 applicable ...
#!/usr/bin/env python # # Copyright 2011 The Closure Linter 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 #...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from numpy import abs, sum, cos, pi from .go_benchmark import Benchmark class YaoLiu04(Benchmark): r""" Yao-Liu 4 objective function. This class defines the Yao-Liu function 4 [1]_ global optimization problem. This...
""" local path implementation. """ from __future__ import with_statement from contextlib import contextmanager import sys, os, re, atexit, io import py from py._path import common from py._path.common import iswin32 from stat import S_ISLNK, S_ISDIR, S_ISREG from os.path import abspath, normpath, isabs, exists, isdir...