text
stringlengths
475
200k
""" Template for PDF Receipt/Invoice Generation """ import logging from django.conf import settings from django.utils.translation import ugettext as _ from PIL import Image from reportlab.lib import colors from reportlab.lib.pagesizes import letter from reportlab.lib.styles import getSampleStyleSheet from reportlab.li...
# -*- 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...
#!/usr/bin/python """ Copyright 2008 (c) Frederic Weisbecker <[EMAIL]> Licensed under the terms of the GNU GPL License version 2 This script parses a trace provided by the function tracer in kernel/trace/trace_functions.c The resulted trace is processed into a tree to produce a more human view of the call stack by dr...
"""Base Command class, and related routines""" from __future__ import absolute_import import logging import os import sys import traceback import optparse import warnings from pip._vendor.six import StringIO from pip import cmdoptions from pip.locations import running_under_virtualenv from pip.download import PipSes...
#! /usr/bin/env python import sys from optparse import OptionParser import random # finds the highest nonempty queue # -1 if they are all empty def FindQueue(): q = hiQueue while q > 0: if len(queue[q]) > 0: return q q -= 1 if len(queue[0]) > 0: return 0 return -1 ...
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- ##---------------------------------------------------------------------------## ## ## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer ## Copyright (C) 2003 Mt. Hood Playing Card Co. ## Copyright (C) 2005-2009 Skomoroh ## ## This program is free ...
#!/usr/bin/env python """ mtpy/mtpy/uofa/convert_coordinates_in_edis.py This is a convenience script for converting coordinates in EDI files. Files are parsed and if a 'lat' or 'lon' is detected, the argument on the other side of an '=' is converted into decimal degrees. The rest of the file remains unchanged. arg...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Pi-Swarm Simulator is a simple graphical simulation environment for the Pi-Swarm robots # Copyright (C) 2014 Becky Naylor, Jon Timmis, University of York # 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 ...
from __future__ import division import libtbx.test_utils.parallel from libtbx.utils import Sorry, Usage import libtbx.phil import random import os import sys master_phil = libtbx.phil.parse(""" directory = None .type = path .multiple = True module = None .type = str .multiple = True nproc = 1 .type= int sh...
# gozerbot/pdod.py # # """ pickled dicts of dicts """ ## jsb imports from jsb.utils.lazydict import LazyDict from jsb.lib.persist import Persist ## Pdod class class Pdod(Persist): """ pickled dicts of dicts """ def __getitem__(self, name): """ return item with name """ if self.data.has_ke...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, qualities, unified_strdate, clean_html, ) class UltimediaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ultimedia\.com/default/index/video[^/]+/id/(?P<i...
""" Unit test for Linear Programming """ from __future__ import division, print_function, absolute_import import sys import numpy as np from numpy.testing import (assert_, assert_allclose, assert_equal, assert_array_less) from pytest import raises as assert_raises from scipy.optimize import ...
""" support for skip/xfail functions and markers. """ import os import sys import traceback import py import pytest from _pytest.mark import MarkInfo, MarkDecorator def pytest_addoption(parser): group = parser.getgroup("general") group.addoption('--runxfail', action="store_true", dest="runxfail", ...
# Copyright (c) 2011 X.commerce, a business unit of eBay 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 req...
#!/usr/bin/env python ## \file package_tests.py # \brief _____________. # \author T. Lukaczyk # \version 7.0.3 "Blackbird" # # SU2 Project Website: https://su2code.github.io # # The SU2 Project is maintained by the SU2 Foundation # (http://su2foundation.org) # # Copyright 2012-2020, SU2 Contributors (cf. AUTHORS....
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2014 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
from django.core import checks from django.db import models from django.test import SimpleTestCase from .tests import IsolateModelsMixin class TestDeprecatedField(IsolateModelsMixin, SimpleTestCase): def test_default_details(self): class MyField(models.Field): system_check_deprecated_details ...
import re import random from collections import defaultdict, deque """ Codecademy Pro Final Project supplementary code Markov Chain generator This is a text generator that uses Markov Chains to generate text using a uniform distribution. num_key_words is the number of words that compose a key (suggested: 2 or ...
# -*- coding: utf-8 -*- import logging import functools from django.contrib.gis.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.gis.geos import fromstr, LineString from mapentity.models import MapEntityMixin from geotrek.authent.models imp...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Daniel Jaouen <[EMAIL]> # Based on homebrew (Andrew Dunham <[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 Fou...
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full # Queue is im...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDateTimeEdit .. note:: 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. """ __...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter,tkFont import math import glob import os class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.HOME = os.getcwd() if not...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The frontend for the Mojo bindings system.""" import argparse import imp import os import pprint import sys # Disable lint check ...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # 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 you...
#! /usr/bin/env python ''' Copyright (C) 2012 Diego Torres Milano Created on Sep 8, 2012 @author: diego @see: http://code.google.com/p/android/issues/detail?id=36544 ''' import re import sys import os # This must be imported before MonkeyRunner and MonkeyDevice, # otherwise the import fails. # PyDev sets PYTHONPA...
from base64 import b64encode from ..packages.six import b ACCEPT_ENCODING = 'gzip,deflate' def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None): """ Shortcuts for generating request headers. :param keep_ali...
#!/usr/bin/env python """ This file contains Python code illustrating the creation and manipulation of vtkTable objects. """ from __future__ import print_function from vtk import * #------------------------------------------------------------------------------ # Script Entry Point (i.e., main() ) #-------------------...
# Copyright (c) 2003-2005 The Regents of The University of Michigan # 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 ...
# language codes, as used in PE file ressources # this file is used by pefile.py langcodes = { 1: 'ar', 2: 'bg', 3: 'ca', 4: 'zh_Hans', 5: 'cs', 6: 'da', 7: 'de', 8: 'el', 9: 'en', 10: 'es', 11: 'fi', 12: 'fr', 13: 'he', 14: 'hu', 15: 'is', 16: 'it', ...
"""Logging configuration""" import os import platform import sys from logging.handlers import SysLogHandler def get_logger_config(log_dir='/var/tmp', logging_env="no_env", edx_filename="edx.log", dev_env=False, debug=False, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 VMware, 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/li...
""" Parsers are used to parse the content of incoming HTTP requests. They give us a generic way of being able to handle various media types on the request, such as form content or json encoded data. """ from __future__ import unicode_literals import json from django.conf import settings from django.core.files.upload...
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ from django.conf import settings from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper, BaseDatabaseValidation) from django.db.backends.postgresql_psycopg2.operations import DatabaseOperation...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Populate the pagure db with some dev data. """ from __future__ import print_function, unicode_literals, absolute_import import argparse import os import tempfile import pygit2 import shutil import six from sqlalchemy import create_engine, MetaData import pagure imp...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Kim Nørgaard # Written by Kim Nørgaard <[EMAIL]> # Based on pkgng module written by bleader <[EMAIL]> # that was based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com> # that was based on pacman module written by Afterburn <https://github.com/after...
#!/usr/bin/python # # 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 distribut...
# Copyright (c) 2012 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import command import gitutil import os def FindGetMaintainer(): """Look for the get_maintainer.pl script. Returns: If the script is found we'll return a path to it; else None. """ try_list = [ os.pa...
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. This is just a copy of the Python 2.2 HMAC module, modified to work when used on versions of Python before 2.2. """ __revision__ = "$Id: HMAC.py,v 1.5 2002/07/25 17:19:02 z3p Exp $" import strin...
from . import ProxyTerminus from flask import Flask from flask import request from flask import make_response import urllib2 import socket import json import threading import datetime import ssl import logging log = logging.getLogger('werkzeug') log.setLevel(logging.ERROR) network_times = open('times', 'w') network...
import io import types import textwrap import unittest import email.policy import email.parser import email.generator from email import headerregistry def make_defaults(base_defaults, differences): defaults = base_defaults.copy() defaults.update(differences) return defaults class PolicyAPITests(unittest.T...
#!/usr/bin/python """short_description: Check or wait for migrations between nodes""" # Copyright: (c) 2018, Albert Autin # 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_METADA...
from __future__ import absolute_import from allauth.socialaccount.tests import create_oauth2_tests from allauth.socialaccount.providers import registry from allauth.tests import MockedResponse from .provider import VKProvider class VKTests(create_oauth2_tests(registry.by_id(VKProvider.id))): def get_mocked_res...
"""Base option parser setup""" from __future__ import absolute_import import sys import optparse import os import re import textwrap from distutils.util import strtobool from pip._vendor.six import string_types from pip._vendor.six.moves import configparser from pip.locations import ( legacy_config_file, config_b...
from django import forms from django.conf import settings from django.contrib.admin.util import flatten_fieldsets, lookup_field from django.contrib.admin.util import display_for_field, label_for_field from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from d...
from datetime import datetime, timedelta from nose.tools import eq_ from django.test.client import RequestFactory from kitsune.community import api from kitsune.products.tests import product from kitsune.questions.tests import answer, answervote, question from kitsune.search.tests import ElasticTestCase from kitsune...
from tastypie.resources import ModelResource from apps.survey.models import Profile, SurveyUser, Survey from apps.survey.survey import parse_specification from apps.survey.spec import Question, Branch, Else from pickle import loads from inspect import isclass class EpiwebModelResource(ModelResource): class Meta: ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'DamageScenario.ahn_version' db.add_column(u'lizard_damage...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Project.programming_language' db.add_column(u'projects_pr...
#!/usr/bin/python2.7 # -*- encoding=utf-8 -*- import gevent from gevent import monkey import itertools from urlparse import urljoin from utils import flatten, get_json, get_xpath, parse_cell, sanitize, split monkey.patch_all() class BaseCrawler(object): url_image_base = 'http://info.nec.go.kr' attrs = [] ...
# Copyright (C) 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 conditions and the f...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import re import traceback import urllib from collections import OrderedDict from urllib.parse import urljoin import validators from sickchill import logger from sickchill.helper.common import convert_size, try_int from sickchill.oldbeard import tvcache from sickchill.oldbeard.bs4_parser import BS4Parser from sickchi...
from django.utils.timezone import utc as timezone_utc from zerver.lib.test_classes import ZulipTestCase from zerver.lib.timestamp import floor_to_hour, floor_to_day, ceiling_to_hour, \ ceiling_to_day, timestamp_to_datetime, datetime_to_timestamp, \ TimezoneNotUTCException, convert_to_UTC from datetime import...
## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2014 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 ...
# -*- coding: utf-8 -*- import logging from uuid import uuid4 from flask import Blueprint, request, current_app, jsonify _logger = logging.getLogger(__name__) mod = Blueprint('jssdk', __name__, template_folder='templates') @mod.route('/cgi-bin/ticket/getticket', methods=['GET']) def getticket(): """ 获取 j...
# -*- coding: utf-8 -*- from __future__ import division from os import getenv from os.path import isfile from sys import exit import click @click.command() @click.option("--n", default=10, help="How many commands to show.") @click.option("--plot", is_flag=True, help="Plot command usage in pie chart.") @click.option(...
from sympy.core import (Rational, Symbol, S, Float, Integer, Number, Pow, Basic, I, nan, pi, symbols) from sympy.core.tests.test_evalf import NS from sympy.functions.elementary.miscellaneous import sqrt, cbrt from sympy.functions.elementary.exponential import exp, log from sympy.functions.elementary.trigonometric impor...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Scott Anderson <[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 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <[EMAIL]> # # Copyright (C) 2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free Software Foundat...
# coding: utf-8 # # Copyright (C) 2015-2016 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe 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,...
"""Test Z-Wave climate devices.""" import pytest from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, HVAC_MODE_COOL, HVAC_MODE_HEAT, HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF, HVAC_MODES, PRESET_AWAY, ...
# ext/associationproxy.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 """Contain the ``AssociationProxy`` class. The ``AssociationProxy`` is a Py...
# 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 applica...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Tipo_User' db.create_table(u'demo_tipo_user', ( ...
import os import subprocess from . import base from . import filetype from . import status class CompileCheck(base.PerFileCheck): COMPILECOMMAND = [] ONLY_IF_OLDFILE_COMPILES = True def prepareOldFileDir(self, dirname): return dirname def checkOldFile(self, changedFile): with base.T...
"""This plugin provides test results in the standard XUnit XML format. It's designed for the `Jenkins`_ (previously Hudson) continuous build system, but will probably work for anything else that understands an XUnit-formatted XML representation of test results. Add this shell command to your builder :: nosetests...
"""Implementation of JSONEncoder """ import re from decimal import Decimal def _import_speedups(): try: import _speedups return _speedups.encode_basestring_ascii, _speedups.make_encoder except ImportError: return None, None c_encode_basestring_ascii, c_make_encoder = _import_speedups() ...
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides methods and Pythonic idioms that make it easy to navigate...
# orm/path_registry.py # Copyright (C) 2005-2017 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 """Path tracking utilities, representing mapper graph traversals. """ from .. ...
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
import re from django.db.backends import BaseDatabaseIntrospection # This light wrapper "fakes" a dictionary interface, because some SQLite data # types include variables in them -- e.g. "varchar(30)" -- and can't be matched # as a simple dictionary lookup. class FlexibleFieldLookupDict: # Maps SQL types to Django...
#!/usr/bin/env python # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Linux network utilities import sys import socket import fcntl import struct import array import os import bin...
# -*- 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...
import numpy import opengm import os import sys import random import opengm.learning class TestAllExampes: def test_run(self): for r, d, f in os.walk("examples"): for files in f: if files.endswith(".py"): if(not str(files).endswith('gui.py')): ...
# Copyright 2014 Mirantis.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 ...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2010 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
from .main import Core from uuid import uuid4 def start(): return Core() config = [{ 'name': 'core', 'order': 1, 'groups': [ { 'tab': 'general', 'name': 'basics', 'description': 'Needs restart before changes take effect.', 'wizard': True, ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt_wfm_interface.ui' # # Created: Thu Jun 18 23:41:03 2009 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_InterfaceWindow(object): def setupUi(...
from django.db import models from django.contrib.auth.models import User CAMPSTATUS = ( (0, 'Deleted'), (1, 'Accepting new members'), (2, 'Closed to new members'), (3, 'Camp will not come to Midburn 2016'), ) # Create your models here. class Camp(models.Model): users = models.ManyToManyField(User) ...
"""DXR plugin for Rust. Relies on output from running rustc with -Zsave-analysis It is somewhat painful dealing with the untyped-ness of the CSV input. We want to treat all ids as ints rather than strings, getting this wrong causes annoying bugs because Python will not check the type of things, but does distinguish be...
# Authors: Denis A. Engemann <[EMAIL]> # simplified BSD-3 license import numpy as np from ..utils import read_str def _unpack_matrix(fid, rows, cols, dtype, out_dtype): """Unpack matrix.""" dtype = np.dtype(dtype) string = fid.read(int(dtype.itemsize * rows * cols)) out = np.frombuffer(st...
# ----------------------------------------------------------------------------- # yacc_error3.py # # Bad p_error() function # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tokens # ...
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Employee and Attendance"), "items": [ { "type": "doctype", "name": "Employee", "description": _("Employee records."), }, { "type": "doctype", "name": "Employee Attendance To...
import sys, os # Delay import _tkinter until we have set TCL_LIBRARY, # so that Tcl_FindExecutable has a chance to locate its # encoding directory. # Unfortunately, we cannot know the TCL_LIBRARY directory # if we don't know the tcl version, which we cannot find out # without import Tcl. Fortunately, Tcl will itself ...
import psycopg2 import psycopg2.extras from steersuitedb.Util import getTime from Sequence import TestSequence # this is not completely encapsulated by another transaction so it should # be used by the client when inserting data class Test(object): """A simple example class""" __id_name = "test_id" __tabl...
#!/usr/bin/python # # Copyright (C) 2008 Google 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 NTT Innovation Institute 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...
import numpy as np from pylearn2.datasets.dense_design_matrix import DenseDesignMatrix from pylearn2.datasets.dense_design_matrix import DenseDesignMatrixPyTables from pylearn2.datasets.dense_design_matrix import DefaultViewConverter from pylearn2.datasets.dense_design_matrix import from_dataset from pylearn2.utils im...
### $ANTLR 2.7.7 (20060930): "xlwt/excel-formula.g" -> "ExcelFormulaParser.py"$ ### import antlr and other modules .. import sys from . import antlr ### header action >>> import struct from . import Utils from .UnicodeUtils import upack1 from .ExcelMagic import * _RVAdelta = {"R": 0, "V": 0x20, "A": 0x...
from contextlib import closing import pytest import sqlalchemy from sqlalchemy.sql.schema import Table as DbTable from osmaxx.utils.frozendict import frozendict from tests.conftest import TagCombination from tests.conversion.converters.inside_worker_test.conftest import slow from tests.conversion.converters.inside_wo...
# -*- coding: utf-8 -*- import unittest2 import mock import openerp.tests.common as common from openerp.addons.connector.unit.mapper import ( Mapper, ImportMapper, ImportMapChild, MappingDefinition, changed_by, only_create, convert, m2o_to_backend, backend_to_m2o, none, Map...
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
# Copyright 2010 Matt Chaput. 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 list of conditions and the...
""" A Django settings file for use on AWS while running database migrations, since we don't want to normally run the LMS with enough privileges to modify the database schema. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=...
# coding: utf-8 # ETHERCUT SUITE # Author: Ivan 'evilgroot' Luengo # Email: [EMAIL] # This project is released under a GPLv3 license """ Master: Handles the program loop """ import pcap, Queue, logging import contextlib import ethercut.ui as ui import ethercut.log as log import ethercut.sniff ...
"""distutils.ccompiler Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" __revision__ = "$Id$" import sys import os import re from distutils.errors import (CompileError, LinkError, UnknownFileError, Distut...
from django.test import TestCase from django.conf import settings import mock from oscar.apps.basket import forms from oscar.test import factories class TestBasketLineForm(TestCase): def setUp(self): self.basket = factories.create_basket() self.line = self.basket.all_lines()[0] def mock_ava...