text
stringlengths
475
200k
""" SQLite3 backend for django. Python 2.4 requires pysqlite2 (http://pysqlite.org/). Python 2.5 and later can use a pysqlite2 module or the sqlite3 module in the standard library. """ import re import sys import datetime from django.db import utils from django.db.backends import * from django.db.backends.signals i...
# 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 u...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # Copyright © 2015 Mattia Rizzolo <[EMAIL]> # Copyright © 2015-2017 Holger Levsen <[EMAIL]> # Based on reproducible_scheduler.sh © 2014-2015 Holger Levsen <[EMAIL]> # Licensed under GPL-2 # # Depends: python3 python3-debian # # Schedule packages to be build. import sys impo...
"""Support for LIFX Cloud scenes.""" import asyncio import logging from typing import Any import aiohttp from aiohttp.hdrs import AUTHORIZATION import async_timeout import voluptuous as vol from homeassistant.components.scene import Scene from homeassistant.const import ( CONF_PLATFORM, CONF_TIMEOUT, CONF...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
import re ASSIGNMENT_NAME = 'P6' ASSIGNMENT_TEST_NUM = 7 EMAIL_SEND = 0 EAMIL_SEND_UPPER_BOUND = 0 def toset(x): if x != None: return set(x) else: return None OUTPUT_RESULT_REG_EXP = [] SCRIPT_REG_EXP = [] SCRIPT_EXISTENCE_REG_EXP = [] FUNCTION_ORDER = ['get_level', 'g...
#!/usr/bin/env python """Executable Python script for testing the action proxy. /* * 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 thi...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import cstr, getdate from frappe.utils.file_manager import save_file from .default_website import w...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gzip import random import re from io import BytesIO from unittest import skipIf from django.conf import settings from django.core import mail from django.http import ( FileResponse, HttpRequest, HttpResponse, HttpResponsePermanentRedirect, ...
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # Module to define chemical reaction functionality ############################################################################### from math import exp, log import sqlite3 from numpy import pol...
import skimage from lxml import etree import os import glob from sklearn.cross_validation import train_test_split import numpy as np from progress_bar import ProgressBar from skimage import io from scipy import misc def create_sets(img_dir, train_set_proportion=.6, test_set_proportion=.2, val_set_proportion=.2): '...
# $Id$ # Copyright (C) 1998-2003 Michael Haggerty <[EMAIL]> # # This file is licensed under the GNU Lesser General Public License # (LGPL). See LICENSE.txt for details. """gp_unix -- an interface to gnuplot used for unix platforms. This file implements a low-level interface to a gnuplot program for a unix platform ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # # 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...
from datetime import date, timedelta from django.template.defaultfilters import add from django.test import SimpleTestCase from ..utils import setup class AddTests(SimpleTestCase): """ Tests for #11687 and #16676 """ @setup({'add01': '{{ i|add:"5" }}'}) def test_add01(self): output = se...
# 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...
#!/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. """Embeds Chrome user data files in C++ code.""" import base64 import optparse import os import StringIO import sys import zipfile im...
import pytest from pytest_django.lazy_django import get_django_version from pytest_django_test.db_helpers import ( db_exists, drop_database, mark_database, mark_exists, skip_if_sqlite_in_memory, ) def test_db_reuse_simple(django_testdir): "A test for all backends to check that `--reuse-db` wo...
#!/usr/bin/env python from __future__ import print_function import sys import numpy import pmagpy.pmag as pmag def main(): """ NAME di_eq.py DESCRIPTION converts dec, inc pairs to x,y pairs using equal area projection NB: do only upper or lower hemisphere at a time: does not dist...
import os from django import forms, http from django.conf import settings from django.contrib.formtools import preview, wizard, utils from django.test import TestCase from django.utils import unittest success_string = "Done was called!" class TestFormPreview(preview.FormPreview): def get_context(self, request, ...
# -*- coding: utf-8 -*- # # # Authors: Adrien Peiffer # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # consequences result...
#!/usr/bin/env python3 import sys import re def entry_is_device(entry): first_arg_type = entry[1][1:].split(' ')[0] device_types = ['VkDevice', 'VkCommandBuffer', 'VkQueue'] return (first_arg_type in device_types) and (entry[0] != 'vkGetDeviceProcAddr') def main(): pure_entrypoints = [] entrypoin...
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from ansible.modules.unarchive import ZipArchive, TgzArchive class AnsibleModuleExit(Exception): def __init__(self, *args, **kwargs): self.args = args self.kwargs = kwargs class ExitJson(Ansib...
"""Functions to parse datetime objects.""" # We're using regular expressions rather than time.strptime because: # - They provide both validation and parsing. # - They're more flexible for datetimes. # - The date/datetime/time constructors produce friendlier error messages. import datetime import re from django.utils...
#!/usr/bin/env python """Manage site and releases. Usage: manage.py release [<branch>] manage.py site """ from __future__ import print_function import datetime, docopt, errno, fileinput, json, os import re, requests, shutil, sys, tempfile from contextlib import contextmanager from distutils.version import LooseV...
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode class ContentTypeManager(models.Manager): # Cache to avoid re-looking up ContentType objects all over the place. # This cache is shared by all the get_for_* methods. _cache ...
import unittest import rugby_rankings.ratings_input class TestRatingsInput(unittest.TestCase): def test_construct(self): inputObj = rugby_rankings.ratings_input.RatingsInput(0.0, 0.0, 0, 0) self.assertTrue( isinstance(inputObj, rugby_rankings.ratings_input.RatingsInput) ) ...
import base64 import json from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import splitString from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Pushbullet' class Pushbullet(Notifica...
# # 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 n...
# coding=utf-8 """Example usage of custom parameters.""" import sys from safe.definitions.constants import INASAFE_TEST from safe.test.utilities import get_qgis_app QGIS_APP, CANVAS, IFACE, PARENT = get_qgis_app(qsetting=INASAFE_TEST) from qgis.PyQt.QtWidgets import QApplication, QWidget, QGridLayout # NOQA from ...
import csv import itertools from itertools import izip import operator import os from os import path import sys import yaml from expr import * from align_txt2csv import convert_txt_align # TODO # - filter fields: output only those which are actually used (comment out # the rest) # - convert "leaf" ...
#!/usr/bin/env python # # Copyright 2007,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
# -*- coding: utf-8 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. :par...
# 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 th...
# file openpyxl/workbook.py # Copyright (c) 2010 openpyxl # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modif...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: David Coninckx <[EMAIL]> # # The licence is in the file __openerp__.py ...
# vi: syntax=python:et:ts=4 import sys, os from config_check_utils import backup_env, restore_env import distutils.sysconfig def exists(): return True def PythonExtension(env, target, source, **kv): return env.SharedLibrary(target, source, SHLIBPREFIX='', SHLIBSUFFIX=distutils.sysconfig.get_config_var("SO"), ...
# Copyright (c) 2013 Chris Lucas, <[EMAIL]> # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish...
"""Views for debugging and diagnostics""" import pprint import traceback from django.http import Http404, HttpResponse, HttpResponseNotFound from django.contrib.auth.decorators import login_required from django.utils.html import escape from django.views.decorators.csrf import ensure_csrf_cookie from edxmako.shortcut...
"""Test student engagement metrics""" import json import luigi from ddt import ddt, data, unpack from edx.analytics.tasks.student_engagement import StudentEngagementTask, SUBSECTION_VIEWED_MARKER from edx.analytics.tasks.tests import unittest from edx.analytics.tasks.tests.opaque_key_mixins import InitializeOpaqueKe...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
# -*- 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 os import sys # os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") APP_DIR=os.path.dirname(__file__) LOG_FILE="/tmp/paloma.log" #: celery worker logfile PID_FILE="/tmp/paloma.pid" #: celery worker PID file PID_CAM="/tmp/paloma.pid" NODE="celery" #: celery = default node LOG_LEVEL="DEBU...
""" Purpose The purpose of the argParseWrapper module is to create an easy way to use the native argparse module from python distribution in order to parse command line arguments. Description It contains a simple wrapper class for the argparse.Action class, which adds the action attribute and a return_args me...
''' Default entity collection implementation ''' import sys import re class BaseCollection(list): def __init__(self, entities=None): list.__init__(self) if entities is not None: self.extend(entities) def extend(self, entities): for e in entities: self.append(e) ...
"""Logging """ import sys import os import logging from pip import backwardcompat from pip._vendor import colorama, pkg_resources def _color_wrap(*colors): def wrapped(inp): return "".join(list(colors) + [inp, colorama.Style.RESET_ALL]) return wrapped def should_color(consumer, environ, std=(sys.s...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, Guewen Baconnier # Copyright 2012-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
"""Websocket API for mobile_app.""" import voluptuous as vol from homeassistant.components.cloud import async_delete_cloudhook from homeassistant.components.websocket_api import ( ActiveConnection, async_register_command, async_response, error_message, result_message, websocket_command, ws_...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 OpenStack, LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
__all__ = ['logspace', 'linspace'] import numeric as _nx from numeric import array def linspace(start, stop, num=50, endpoint=True, retstep=False): """ Return evenly spaced numbers over a specified interval. Returns `num` evenly spaced samples, calculated over the interval [`start`, `stop` ]. Th...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2012, 2013, 2014, 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...
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. A wrapper around the standard Python unittest library, adding features we need for various unittests within this directory. """ import errno import os import shutil impo...
# Based on local.py (c) 2012, Michael DeHaan <[EMAIL]> # Based on chroot.py (c) 2013, Maykel Moya <[EMAIL]> # (c) 2013, Michael Scherer <[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 # ...
# 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 agreed...
from flask import request, session, g, redirect, url_for, abort from . import api from ..exceptions import ExistsError from ..models import Category from .main import BaseMethodView class CategoryView(BaseMethodView): def get(self, id=None): if id: instance = Category(id) if not...
''' Find and delete GCE resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete your *ENTIRE* GCE infrastructure. ''' import os import re import sys import optparse import yaml try: from libclo...
# 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 use ...
#! /usr/bin/env python # # Copyright (C) 2014 Connor Abbott # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modi...
# -*- test-case-name: twisted.test.test_strcred -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """ Support for resolving command-line strings that represent different checkers available to cred. Examples: - passwd:/etc/passwd - memory:admin:asdf:user:lkj - unix """ import sys fro...
from OWWidget import * import OWGUI import re, os.path from exceptions import Exception NAME = "Save" DESCRIPTION = "Saves data to file." LONG_DESCRIPTION = "" ICON = "icons/Save.svg" PRIORITY = 90 AUTHOR = "Janez Demsar" AUTHOR_EMAIL = "janez.demsar(@at@)fri.uni-lj.si" INPUTS = [("Data", Orange.data.Table, "dataset",...
import random import time from locust import User, TaskSet, between, constant, constant_pacing from locust.exception import MissingWaitTimeError from .testcases import LocustTestCase class TestWaitTime(LocustTestCase): def test_between(self): class MyUser(User): wait_time = between(3, 9) ...
from .helper import UnitHelper from github3.null import NullObject import pytest class TestNullObject(UnitHelper): described_class = NullObject def create_instance_of_described_class(self): return self.described_class() def test_returns_empty_list(self): assert list(self.instance) == []...
# coding: utf-8 from __future__ import absolute_import import flask import auth import config import model import util from main import app twitter_config = dict( access_token_url='https://api.twitter.com/oauth/access_token', authorize_url='https://api.twitter.com/oauth/authorize', base_url='https://api.twit...
#!/usr/bin/env python # Copyright (c) 2012 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. # For instructions see: # http://www.chromium.org/developers/tree-sheriffs/perf-sheriffs import hashlib import math import optpars...
import inspect from common import common_logging_elasticsearch_httpx async def db_metadata_guid_from_media_guid(self, guid, db_connection=None): await common_logging_elasticsearch_httpx.com_es_httpx_post_async(message_type='info', message_text=...
from django.contrib.auth import models from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin, ) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.test import Re...
#!/usr/bin/env python # Copyright 2014 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 os import unittest from checker import Checker from processor import FileCache, Processor ASSERT_FILE = os.path.join("..", "....
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
from django.conf.urls import url from django.contrib.admindocs import views urlpatterns = [ url('^$', views.BaseAdminDocsView.as_view(template_name='admin_doc/index.html'), name='django-admindocs-docroot'), url('^bookmarklets/$', views.BookmarkletsView.as_view(), name='django-ad...
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): serialised_items = [d.name for d in frappe.get_all("Item", filters={"has_serial_no": 1})] if not serialised_items: return for dt in ["Stoc...
#!/usr/bin/env python # File created on 09 Feb 2010 from __future__ import division __author__ = "Justin Kuczynski" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Justin Kuczynski"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Justin Kuczynski" __email__ = "[EMAIL]" from qiime...
# -*- coding: utf-8 -*- from cms.forms.fields import PageSelectFormField from cms.models.pagemodel import Page from cms.models.placeholdermodel import Placeholder from cms.utils.placeholder import PlaceholderNoAction, validate_placeholder_name from django.db import models class PlaceholderField(models.ForeignKey): ...
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
# Input arguments: (Those with '[*]' at end are used here.) # 2) genome : [String]: defines genome in use for project. (ex. 'Ca_a') [*] # 3) workingDir : [String]: Directory where links in system are stored. (ex. '/home/bermanj/shared/links/) [*] # # Process input files: # 1) Restriction-...
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified under the terms of # the GNU Lesser General Pub...
# -*- coding: utf-8 -*- """ gshop.allegro ~~~~~~~~~~~~~~~~~~~ A lightweight wrapper around the Allegro webapi. """ import sys import time import logging from zeep import Client from zeep.exceptions import Fault from requests.exceptions import ConnectionError # from socket import error as socketError from decimal im...
#***************************************************************************** # Copyright (C) 2010 Dario Malchiodi <[EMAIL]> # # This file is part of yaplf. # yaplf is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # So...
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
"""Bytecode manipulation for coverage.py""" import opcode, types from coverage.backward import byte_to_int class ByteCode(object): """A single bytecode.""" def __init__(self): # The offset of this bytecode in the code object. self.offset = -1 # The opcode, defined in the `opcode` mod...
from django.test import TestCase from django.db.backends import BaseDatabaseWrapper class DummyDatabaseWrapper(BaseDatabaseWrapper): pass class DummyObject(object): alias = None class DbBackendTests(TestCase): def test_compare_db_wrapper_with_another_object(self): wrapper = BaseDatabaseWrapper...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from astropy import units as u from astropy.utils.decorators import format_doc from astropy.coordinates import representation as r from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMap...
# # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge...
# URI Online Judge | 1006 # Média 2 # # Adaptado por Neilor Tonin, URI Brasil # Timelimit: 1 # # Leia 3 valores, no caso, variáveis A, B e C, que são as três notas de um aluno. A seguir, calcule a média do aluno, # sabendo que a nota A tem peso 2, a nota B tem peso 3 e a nota C tem peso 5. Considere que cada nota pode ...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
""" Asset Management - Events: Create and update functions. """ __author__ = 'Edna Donoughe' from ooiservices.app.uframe.uframe_tools import (uframe_get_asset_by_uid, get_uframe_event, uframe_put_event, uframe_postto, uframe_create_cruise, uframe_create_calibration) fr...
# Copyright 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). import re from base64 import b16encode from collections import namedtuple from django.contrib import messages from django.contrib.auth.views import redirect_to_login from django.c...
# This module contains abstractions for the input stream. You don't have to # looks further, there are no pretty code. # # We define two classes here. # # Mark(source, line, column) # It's just a record and its only use is producing nice error messages. # Parser does not use it for any other purposes. # # Reader(so...
# Copyright (c) 2001-2007 Twisted Matrix Laboratories. # See LICENSE for details. """ DEPRECATED since Twisted 8.0. Utility functions for reporting bytecode frequencies to Skip Montanaro's stat collector. This module requires a version of Python build with DYNAMIC_EXCUTION_PROFILE, and optionally DXPAIRS, defined to...
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.ConfigList import ConfigListScreen from Components.MenuList import MenuList from Components.Sources.StaticText import StaticText from Components.config import config, ConfigNumber, Conf...
data = ( 'Xi ', # 0x00 'Kao ', # 0x01 'Lang ', # 0x02 'Fu ', # 0x03 'Ze ', # 0x04 'Shui ', # 0x05 'Lu ', # 0x06 'Kun ', # 0x07 'Gan ', # 0x08 'Geng ', # 0x09 'Ti ', # 0x0a 'Cheng ', # 0x0b 'Tu ', # 0x0c 'Shao ', # 0x0d 'Shui ', # 0x0e 'Ya ', # 0x0f 'Lun ', # 0x10 'Lu '...
""" sentry.filters ~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # Widget api is pretty ugly from __future__ import absolute_import from django.conf import settings as django_settings from django.utils.datastructures import Sort...
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Kyle A. Beauchamp # Contributors: # # MDTraj is free software:...
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request.""...
""" A generic Jam-o-Drum input interface for the Jam-o-Drum that uses the OptiPAC for both spinners and pads. @author: U{Ben Buchwald <[EMAIL]>} Last Updated: 2/27/2006 """ from direct.showbase.DirectObject import DirectObject import string, sys, md5 from pandac.PandaModules import Filename from pandac.PandaModules i...
from __future__ import unicode_literals import os import paramiko from django.utils import six from reviewboard.ssh.client import SSHClient from reviewboard.ssh.errors import (BadHostKeyError, SSHAuthenticationError, SSHError, SSHInvalidPortError) from reviewboard.ssh.policy impor...
""" CAUTION: Running this script can take very long! """ from numpy import arange from yade import pack import pylab # define the section shape as polygon in 2d; repeat first point at the end to close the polygon poly=((1e-2,5e-2),(5e-2,2e-2),(7e-2,-2e-2),(1e-2,-5e-2),(1e-2,5e-2)) # show us the meridian shape #pylab....
# -*- coding: utf-8 -*- ## Very simple unit support: ## - creates variable names like 'mV' and 'kHz' ## - the value assigned to the variable corresponds to the scale prefix ## (mV = 0.001) ## - the actual units are purely cosmetic for making code clearer: ## ## x = 20*pA is identical to x = 20*1e-12 #...
# -*- coding: utf-8 -*- import logging import simplejson import os import openerp from openerp.addons.web.controllers.main import manifest_list, module_boot, html_template class PointOfSaleController(openerp.addons.web.http.Controller): _cp_path = '/pos' @openerp.addons.web.http.httprequest def app(self,...