text
stringlengths
475
200k
import urllib2 import lxml.html import numpy import scipy import scipy.misc import scipy.cluster import urlparse import struct import operator import gzip import datetime import requests import httplib from PIL import BmpImagePlugin, PngImagePlugin, Image from socket import error as SocketError from boto.s3.key import ...
"""Read and cache directory listings. The listdir() routine returns a sorted list of the files in a directory, using a cache to avoid reading the directory more often than necessary. The annotate() routine appends slashes to directories.""" from warnings import warnpy3k warnpy3k("the dircache module has been rem...
# Copyright 2011-2013 James McCauley # # 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 ...
# Test of compaction code in server/db.py import array from collections import defaultdict from os import environ, urandom from struct import pack import random from lib.hash import hash_to_str from server.env import Env from server.db import DB def create_histories(db, hashX_count=100): '''Creates a bunch of r...
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it...
# -*- coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # Also if needed: retab ''' Regression test ''' from __future__ import (unicode_literals, absolute_import, \ print_function, division) import argparse import matplotlib.pyplot as plt import numpy as np import os i...
# # * This program is free software; you can redistribute it and/or modify # * it under the terms of the GNU General Public License version 2 as # * published by the Free Software Foundation; # * # * This program is distributed in the hope that it will be useful, # * but WITHOUT ANY WARRANTY; without even the implied w...
# -*- 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...
# -*- coding: utf-8 -*- # # libcaca Colour ASCII-Art library # Python language bindings # Copyright (c) 2010 Alex Foulon <[EMAIL]> # All Rights Reserved # # This library is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute i...
from django.test import TestCase from geonode.base.models import ResourceBase from geonode.utils import OGC_Servers_Handler class ThumbnailTests(TestCase): def setUp(self): self.rb = ResourceBase.objects.create() def tearDown(self): t = self.rb.thumbnail if t: t.delete() ...
############################################################################### ## ## Copyright 2011,2012 Tavendo GmbH ## ## 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:...
import numpy as np from scipy.sparse import csr_matrix from sklearn.utils.testing import assert_array_equal, assert_equal, assert_true from sklearn.utils.testing import assert_not_equal from sklearn.utils.testing import assert_array_almost_equal, assert_raises from sklearn.utils.testing import assert_less_equal from ...
''' Created on 2010/12/20 @author: Nachi Ueno <[EMAIL]> ''' import boto import base64 import boto.ec2 from boto_v6.ec2.instance import ReservationV6 from boto.ec2.securitygroup import SecurityGroup class EC2ConnectionV6(boto.ec2.EC2Connection): ''' EC2Connection for OpenStack IPV6 mode ''' def get_a...
# orm/scoping.py # Copyright (C) 2005-2015 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 from .. import exc as sa_exc from ..util import ScopedRegistry, ThreadLocalRegistry, ...
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
""" mbed CMSIS-DAP debugger Copyright (c) 2016 ARM Limited 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 muntjac.api import VerticalLayout, Label, Embedded, Button, Alignment from muntjac.terminal.theme_resource import ThemeResource from muntjac.ui.css_layout import CssLayout from muntjac.ui.button import IClickListener from muntjac.ui.custom_component import CustomComponent from muntjac.ui.horizontal_layout import ...
from bson import ObjectId import json import logging from bson.errors import InvalidId from django.http import JsonResponse, HttpResponseNotFound, HttpResponseBadRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from api.models import db_model from api.models.auth import RequireLogin from api...
# Copyright (C) 2011 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 ...
# -*- coding: utf-8 -*- from numpy import * # importation du module numpy from numpy.linalg import * # importation du module numpy.linalg from numpy.random import * from matplotlib.pyplot import * from mpl_toolkits.mplot3d import Axes3D #Calcul l'erreur en faisant varier Ns def Ud(x): y = sin(2*pi*x)*sinh(2*pi) ...
from common_fixtures import * # NOQA test_network_policy = os.environ.get( 'TEST_NETWORK_POLICY', "False") np_reason = \ 'Intended to not execute this network policy test' if_network_policy = pytest.mark.skipif(test_network_policy != "ALL", reason=np_reason) if_network_...
# -*- coding: utf-8 -*- ############################################################################## # # Odoo Addon, Open Source Management Solution # Copyright (C) 2014-now Equitania Software GmbH(<http://www.equitania.de>). # # This program is free software: you can redistribute it and/or modify # it un...
""" Support for Unifi WAP controllers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.unifi/ """ import logging import urllib from homeassistant.components.device_tracker import DOMAIN from homeassistant.const import CONF_HOST, CONF_USERN...
#! /usr/bin/python # # Copyright (c) 2011-2014, Intel Corporation # 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 notice, this...
from __future__ import absolute_import try: from corehq.apps.app_manager.tests.test_app_manager import * from corehq.apps.app_manager.tests.test_xml_parsing import * from corehq.apps.app_manager.tests.test_xform_parsing import * from corehq.apps.app_manager.tests.test_form_versioning import * from ...
"""Description of YANG & YIN syntax.""" import re ### Regular expressions - constraints on arguments # keywords and identifiers identifier = r"[_A-Za-z][._\-A-Za-z0-9]*" prefix = identifier keyword = '((' + prefix + '):)?(' + identifier + ')' comment = '(/\*([^*]|[\r\n\s]|(\*+([^*/]|[\r\n\s])))*\*+/)|(//.*)|(/\*.*)'...
# convcmd - convert extension commands definition # # Copyright 2005-2007 Matt Mackall <[EMAIL]> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from common import NoRepo, MissingTool, SKIPREV, mapfile from cvs import convert_cvs ...
#!python """\ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ http://peak.telecommunity.com/DevCenter/EasyInstall """ import sys, os.path, ...
# # 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...
import socket import sys import math def bytes_needed(n): if type(n) is str: return len(n) elif type(n) is list: if type(n[0]) is int: return 4 * len(n) if n == 0: return 1 return int(math.log(n, 256)) + 1 class Communication: def __init__(self, address, port):...
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
import os from django.db import models from tagging.managers import ModelTaggedItemManager from tagging.models import Tag if os.environ.get('READTHEDOCS'): TagField = lambda *args, **kwargs: None else: from tagging.fields import TagField class Event(models.Model): when = models.DateTimeField() what =...
"""Deal with pyface backend issues.""" # Author: Christian Brodbeck <[EMAIL]> # # License: BSD (3-clause) import os import sys from ..utils import warn, _check_pyqt5_version def _get_pyface_backend(): """Check the currently selected Pyface backend. Returns ------- backend : str Name of the ...
# Copyright (c) 2015 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...
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_array_almost_equal, run_module_suite import scipy.ndimage as ndimage def test_byte_order_median(): """Regression test for #413: median_filter does not handle bytes orders.""" a = np.arange(9,...
""" ========================================= Nested versus non-nested cross-validation ========================================= This example compares non-nested and nested cross-validation strategies on a classifier of the iris data set. Nested cross-validation (CV) is often used to train a model in which hyperparam...
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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 l...
#!/usr/bin/python # -*- coding: utf-8 -*- '''ISO K-line protocol decoder Decodes ISO9141 and ISO14230 automotive data bus protocols ''' # Copyright © 2013 Kevin Thibedeau # This file is part of Ripyl. # Ripyl is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General ...
# -*- 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...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2018 Florian Bruhin (The Compiler) <[EMAIL]> # # This file is part of qutebrowser. # # qutebrowser 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 Found...
#!/usr/bin/env python3 import sys import time import os from collections import OrderedDict from itertools import count from gettext import gettext as _ from PyQt4 import QtCore, QtGui, uic from pingpung import pplib from pingpung.pplib import pping from pingpung.pplib import audio __date__ = "$Date: 2015/03/17 $" _...
import json from moto.core.responses import BaseResponse from .models import config_backends class ConfigResponse(BaseResponse): @property def config_backend(self): return config_backends[self.region] def put_configuration_recorder(self): self.config_backend.put_configuration_recorder(se...
from django import forms from django.forms.widgets import HiddenInput from crits.core import form_consts from crits.core.handlers import get_source_names from crits.core.user_tools import get_user_organization class AddScreenshotForm(forms.Form): """ Django form for adding an Object. """ error_css_cla...
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Skeleton for python-based regression tests using # JSON-RPC # Add python-bitcoinrpc to module search pa...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2015 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...
# coding=utf-8 # # This file is part of SickGear. # # SickGear 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. # # SickGear is distribu...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
#!/usr/bin/env python3 import re import importlib import sqlite3 import sys def parse_tollens(part): keys = list(part.keys()); for key in keys: if(key[-2:] == '_l' and key[:-2] + '_h' in part): part[key[:-2]] = TolLen(float(part[key[:-2] + '_l']), float(part[key[:-2] + '_h'])) part.pop(key[:-2] + '_l')...
#!/usr/bin/python2.4 # Copyright 2009, 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...
#coding=utf-8 # This module implement prefork model, used for spawn and manage child process import os import sys import time import errno import signal import random import select import traceback from in_trip.lib.pidfile import Pidfile from in_trip.lib.config import Config from in_trip.lib.errors import HaltServer...
#!/usr/bin/env python """ @package mi.dataset.parser.test @fid marine-integrations/mi/dataset/parser/test/test_auv_eng_auv.py @author Jeff Roy @brief Test code for a auv_eng_auv data parser NOTE: there have been several other parsers built on auv_common tested already all negative paths through the code are not again...
""" Utility functions for working with images. """ import logging import numpy as np plt = None axes = None from theano.compat.six.moves import xrange from theano.compat.six import string_types import warnings try: import matplotlib.pyplot as plt import matplotlib.axes except (RuntimeError, ImportError, TypeErr...
# Copyright (c) The PyAMF Project. # See LICENSE.txt for details. """ AMF Remoting support. A Remoting request from the client consists of a short preamble, headers, and bodies. The preamble contains basic information about the nature of the request. Headers can be used to request debugging information, send authenti...
# -*- coding: utf-8 -*- from cms.cache.permissions import clear_user_permission_cache from cms.models import PageUser, PageUserGroup from menus.menu_pool import menu_pool def post_save_user(instance, raw, created, **kwargs): """Signal called when new user is created, required only when CMS_PERMISSION. Assign...
# -*- 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...
#!/usr/bin/env python # Copyright 2008-2015 Canonical # # 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. # # This...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE # # Adopted from Geomdl library: ht...
""" raven.transport.base ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import class Transport(object): """ All transport implementations need to subclass this class You mus...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.UserList.as_view(), name=views.UserList.view_name), url(r'^(?P<user_id>\w+)/$', views.UserDetail.as_view(), name=views.UserDetail.view_name), url(r'^(?P<user_id>\w+)/addons/$', views.UserAddonList.as_view(), name=views.U...
# Copyright 2011, 2014 Christoph Reiter # # 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. from gi.repository import Gtk...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import numpy as np from system.take_snapshot import take_snapshot from copy import deepcopy def within_energized(ps, island_1, bus_ids, spad_lim): # Take preliminary snapshot of the system state_list, island_list = take_snapshot(ps, 'Preliminary state', [], []) # Set opf constraint to SPA diff # Mak...
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre, sys import sre_parse from sre_constants impo...
from __future__ import absolute_import import logging import os import warnings from raven.utils.compat import PY2, text_type from raven.exceptions import InvalidDsn from raven.utils.encoding import to_string from raven.utils.urlparse import parse_qsl, urlparse ERR_UNKNOWN_SCHEME = 'Unsupported Sentry DSN scheme: {0...
#!/usr/bin/env python import time from hashlib import md5 from gluon.dal import DAL def motp_auth(db=DAL('sqlite://storage.sqlite'), time_offset=60): """ motp allows you to login with a one time password(OTP) generated on a motp client, motp clients are available for practically all platfo...
# 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. import unittest from telemetry.core.backends.chrome import desktop_browser_finder from telemetry.core import browser_options from telemetry.core.platform imp...
# Copyright 2014 Mellanox Technologies, Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class SoundgasmIE(InfoExtractor): IE_NAME = 'soundgasm' _VALID_URL = r'https?://(?:www\.)?soundgasm\.net/u/(?P<user>[0-9a-zA-Z_\-]+)/(?P<title>[0-9a-zA-Z_\-]+)' _TEST = { 'url': 'http://soundgasm....
""" Miscellaneous view helpers -------------------------- Helper functions for view handlers. All items in this module can be imported directly from :mod:`coaster.views`. """ from urllib.parse import urlsplit import re from flask import Response, current_app, json, request from flask import session as request_sessi...
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import AxesGrid def get_demo_image(): import numpy as np from matplotlib.cbook import get_sample_data f = get_sample_data("axes_grid/bivariate_normal.npy", asfileobj=False) z = np.load(f) # z is a numpy array of 15x15 return z, (-3,4,...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import collections import itertools import re from ._structures import In...
# Copyright (c) 2007 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 implemen...
# django import django from django import template from django.conf import settings from django.shortcuts import get_object_or_404 from badger.models import Award, Badge from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse import hashlib import urllib from django.utils....
# Copyright (C) 2014-2016 Andrey Antukh <[EMAIL]> # Copyright (C) 2014-2016 Jesús Espino <[EMAIL]> # Copyright (C) 2014-2016 David Barragán <[EMAIL]> # Copyright (C) 2014-2016 Alejandro Alonso <[EMAIL]> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
""" This config file extends the test environment configuration so that we can run the lettuce acceptance tests. This is used in the django-admin call as acceptance.py contains random seeding, causing django-admin to create a random collection """ # We intentionally define lots of variables that aren't used, and # wan...
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_int64, c_void_p from functools import partial from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_const_string, check_errcode, check_geom, ...
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget'] if args.kvm: programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker: dockers = ['docker.io',...
import datetime from calendar import monthrange, month_name from pprint import pprint from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.db.models import Count, Sum from django.http import HttpResponse from django.views.generic import TemplateView from d...
# Copyright 2011 Andreas Wundsam # # This file is part of POX. # # POX 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. # # POX is distr...
#!/usr/bin/python # coding: utf-8 -*- # Copyright (c) 2016, Mario Santos <[EMAIL]> # 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 ANSIBLE_METADATA = {'status': ['preview'], ...
from enigma import getPrevAsciiCode from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Input import Input from Components.config import config from Tools.BoundFunction import boundFunction from T...
# (c) 2014, Michael DeHaan <[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 # (at your option) any later version. # # A...
from sqlalchemy import Column, Enum, Integer from sqlalchemy.types import BLOB from sqlalchemy.orm import validates from inbox.models.base import MailSyncBase from inbox.security.oracles import get_encryption_oracle, get_decryption_oracle class Secret(MailSyncBase): """Simple local secrets table.""" _secret ...
# -*- coding: utf-8 -*- """ jinja2.defaults ~~~~~~~~~~~~~~~ Jinja default filters and tags. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2._compat import range_type from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner # defaults for ...
#!/usr/bin/env python from nose.tools import * import networkx as nx from networkx import NetworkXNotImplemented class TestStronglyConnected: def setUp(self): self.gc=[] G=nx.DiGraph() G.add_edges_from([(1,2),(2,3),(2,8),(3,4),(3,7), (4,5),(5,3),(5,6),(7,4),(7,6),...
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/license...
#!/usr/bin/env python from __tools__ import MyParser from __tools__ import XmlParser from __tools__ import XmlWriter from __tools__ import make_sure_path_exists from __tools__ import addsuffixtofile from __cluster__ import write_cluster_batch from __xtpJobfile__ import splittjobfile from __xtpJobfile__ import mergejobf...
# (c) 2012-2014, Michael DeHaan <[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 # (at your option) any later version. ...
# Volatility # Copyright (c) 2008-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <[EMAIL]> # # This file is part of Volatility. # # Volatility 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 Foundati...
from unittest.mock import MagicMock import boto.swf.layer2 as swf from boto.swf import layer1 import pytest from garcon import activity from garcon import decider def mock(monkeypatch): for base in [swf.Decider, swf.WorkflowType, swf.ActivityType, swf.Domain]: monkeypatch.setattr(base, '__init__', MagicM...
# mbedRPC.py - mbed RPC interface for Python # ##Copyright (c) 2010 ARM Ltd ## ##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 ##t...
# # Code that drops files on the filesystem (/PKG-UPLOAD) # # # Copyright (c) 2008--2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITN...
''' Econometrics for a Datarich Environment ======================================= Introduction ------------ In many cases we are performing statistical analysis when many observed variables are available, when we are in a data rich environment. Machine learning has a wide variety of tools for dimension reduction an...
### ## * << Haru Free PDF Library 2.0.0 >> -- outline_demo_jp.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <[EMAIL]> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that the above copyright n...
# -*- 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...
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
import rethinkdb as r from mockthink.test.common import as_db_and_table, assertEqUnordered, assertEqual from mockthink.test.functional.common import MockTest from pprint import pprint class TestLogic1(MockTest): @staticmethod def get_data(): data = [ {'id': 'joe', 'has_eyes': True, 'age': 2...
# -*- 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 #...
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...