text
stringlengths
475
200k
#! /usr/bin/env python from openturns import * from math import * from math import * def printNumericalPoint(point, digits): oss = "[" eps = pow(0.1, digits) for i in range(point.getDimension()): if i == 0: sep = "" else: sep = "," if fabs(point[i]) < eps:...
#! /usr/bin/env python """Read/write data from an ESRI ASCII file into a RasterModelGrid. ESRI ASCII functions ++++++++++++++++++++ .. autosummary:: ~landlab.io.esri_ascii.read_asc_header ~landlab.io.esri_ascii.read_esri_ascii ~landlab.io.esri_ascii.write_esri_ascii """ import os import pathlib import r...
# Copyright (c) 2010-2012 OpenStack Foundation # # 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...
# Copyright (C) 2011 Mathias Brodala <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is di...
""" Read and write ZIP files. XXX references to utf-8 need further investigation. """ import io import os import re import imp import sys import time import stat import shutil import struct import binascii try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib =...
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
import importlib from importlib import abc from .. import abc as testing_abc from .. import util from . import util as source_util import imp import inspect import io import marshal import os import sys import types import unittest import warnings class SourceOnlyLoaderMock(abc.SourceLoader): # Globals that sh...
from sympy.polys.rings import ring from sympy.polys.domains import ZZ, QQ, AlgebraicField from sympy.polys.modulargcd import ( modgcd_univariate, modgcd_bivariate, _chinese_remainder_reconstruction_multivariate, modgcd_multivariate, _to_ZZ_poly, _to_ANP_poly, func_field_modgcd, _func_fie...
import pytest import numpy as np import scipy.sparse as sp import scipy.sparse.linalg as splin from numpy.testing import assert_allclose try: import sparse except Exception: sparse = None pytestmark = pytest.mark.skipif(sparse is None, reason="pydata/sparse not installed") ...
print(int(False)) print(int(True)) print(int(0)) print(int(1)) print(int(+1)) print(int(-1)) print(int('0')) print(int('+0')) print(int('-0')) print(int('1')) print(int('+1')) print(int('-1')) print(int('01')) print(int('9')) print(int('10')) print(int('+10')) print(int('-10')) print(int('12')) print(int('-12')) prin...
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <[EMAIL]> # Copyright 2003-2006 Thomas Schueppel <[EMAIL]> # Copyright 2003-2006 Dirk Meyer <[EMAIL]> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or modify it under # the terms of ...
# $Id: html.py 4667 2006-07-12 21:40:56Z wiemann $ # Author: David Goodger <[EMAIL]> # Copyright: This module has been placed in the public domain. """ Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers.rst impo...
from datetime import datetime import numpy as np import pytest from pandas.errors import PerformanceWarning import pandas as pd from pandas import ( Categorical, DataFrame, Index, MultiIndex, Series, date_range, isna) from pandas.tests.frame.common import TestData import pandas.util.testing as tm from pandas.uti...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# # MuPIF: Multi-Physics Integration Framework # Copyright (C) 2010-2015 Borek Patzak # # Czech Technical University, Faculty of Civil Engineering, # Department of Structural Mechanics, 166 29 Prague, Czech Republic # # This library is free software; you can redistribute it and/or # modi...
# -*- 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 OpenPNM import scipy as sp class GenericNetworkTest: def setup_class(self): self.net = OpenPNM.Network.Cubic(shape=[10, 10, 10]) def teardown_class(self): mgr = OpenPNM.Base.Workspace() mgr.clear() def test_find_connected_pores_numeric_not_flattend(self): a = self....
# coding: latin-1 import unittest import ctypes from ctypes.test import need_symbol import _ctypes_test @need_symbol('c_wchar') class UnicodeTestCase(unittest.TestCase): @classmethod def setUpClass(cls): dll = ctypes.CDLL(_ctypes_test.__file__) cls.wcslen = dll.my_wcslen cls.wcslen.argt...
from dao import word from samplevars import x def parse(grammar_element, text): x = Var() code = grammar_element(x)+x return eval([code, text]) def match(grammar_element, text): x = Var() code = grammar_element(x) return eval([code, text]) print parse(word, 'hello') print match(word, 'h...
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
#!/usr/bin/env python import sys import os import glob import time class archive: # The archive class represent an archive media with its age related parameters def __init__(self, path): self.path = path self.time = time.gmtime(os.path.getmtime(path)) self.year = time.strftime("%Y", sel...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
# Copyright (c) 2012 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import re import glob import os import bsettings import command class Toolchain: """A single toolchain Public members: gcc: Full path to C compiler path: Directory path containing C compiler cross: ...
# encoding: utf-8 """ vpls.py Created by Nikita Shirokov on 2014-06-16. Copyright (c) 2014-2017 Nikita Shirokov. All rights reserved. Copyright (c) 2014-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from struct import unpack from struct import pack from exabgp.protocol.fa...
import os import re import glob as g import shutil import tempfile from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars class MetaOESourceMirroring(OESelftestTestCase): # Can we download everything from the OpenEmbedded Sources Mirror over http ...
""" Utilities for django models. """ import re import unicodedata from django.conf import settings from django.dispatch import Signal from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country from eventtracking import tracker # The setti...
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from django.utils impor...
__author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = '[EMAIL]' __date__ = '1/24/14' import unittest import os from monty.os.path import which, zpath from monty.os import cd test_dir = os.path.join(os.path.dirname(...
from __future__ import unicode_literals import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class UserForm(forms.Form): full_name = forms.CharField( max_length=50, validators=[ validato...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <[EMAIL]> # # The licence is in the file __manifest__.py # #########...
#!/usr/bin/env python3 import urllib.parse import requests import queue import os import interface class Download_Configer(object): # Init download settings... def __init__(self, url, saveto): self.url = url parse_result = urllib.parse.urlparse(self.url) self.filename = self.url.split...
#!/usr/bin/env python # # Pretty-printer for simple trace backend binary trace files # # Copyright IBM, Corp. 2010 # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # For help see docs/tracing.txt import sys import struct import re header_event_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io from django.conf import settings from django.core.cache import cache from django.http import HttpResponse from django.http.response import HttpResponseBase from django.test import SimpleTestCase UTF8 = 'utf-8' ISO88591 = 'iso-8859-1' class ...
#!/usr/bin/env python from numpy import * from scipy.io import mmread # Loading an example sparse matrix of dimension 479x479, real, unsymmetric mtx=mmread('../../../data/logdet/west0479.mtx') parameter_list=[[mtx,100,60,1]] def mathematics_logdet (matrix=mtx,max_iter_eig=1000,max_iter_lin=1000,num_samples=1): fr...
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
# # partition_gui.py: allows the user to choose how to partition their disks # # Copyright (C) 2001, 2002 Red Hat, Inc. All rights reserved. # # 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; e...
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
#!/usr/bin/env python from saml2 import element_to_extension_element from saml2 import extension_elements_to_elements from saml2 import SamlBase from saml2 import md __author__ = 'rolandh' """ Functions used to import metadata from and export it to a pysaml2 format """ IMP_SKIP = ["_certs", "e_e_", "_extatt"] EXP_SK...
from __future__ import unicode_literals from django import forms from django.forms.formsets import DELETION_FIELD_NAME, BaseFormSet from django.forms.models import ( BaseModelFormSet, inlineformset_factory, modelform_factory, modelformset_factory, ) from django.forms.utils import ErrorDict, ErrorList from djan...
# Copyright (c) 2009, Rotem Yaari <[EMAIL]> # 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 cond...
from __future__ import unicode_literals import datetime from django.core.exceptions import ValidationError from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext as _ from django.db.models import signals from django.db import model...
#!/usr/bin/env python '''This demonstrates controlling a screen oriented application (curses). It starts two instances of gnuchess and then pits them against each other. ''' import pexpect import string import ANSI import sys, os, time class Chess: def __init__(self, engine = "/usr/local/bin/gnuchess -a -h ...
from __future__ import absolute_import from django.test import TestCase from .models import Source, Item class ReverseSingleRelatedTests(TestCase): """ Regression tests for an object that cannot access a single related object due to a restrictive default manager. """ def test_reverse_single_rel...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, sanitized_Request, str_to_int, ) class ExtremeTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?extremetube\.com/(?:[^/]+/)?video/(?P<id>[^/#?&]+)' _TESTS = [{ 'u...
#!venv/bin/python # -*- coding: utf-8 -*- import tornado import tornado.websocket import tornado.wsgi import logging import time import json import random from app import app, db from app.models import User, Game, Fact, Deck, ROLE_USER, ROLE_ADMIN, get_object_or_404 a = {'あ':'a', 'い':'i', 'う':'u', 'え':'e', 'お':'o', ...
# # CapTipper is a malicious HTTP traffic explorer tool # By Omri Herscovici <omriher AT gmail.com> # http://omriher.com # @omriher # # # This file is part of CapTipper, and part of the Whatype library # Whatype is an independent file type identification pyt...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- """ PE-specific Form helpers. """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Select from django.utils.translation import ugettext_lazy as _ class PERegionSelect(Select): """ A Select wi...
# -*- 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 DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FOR...
import sys import unittest from glob import glob import numpy as np class NotAvailable(SystemExit): def __init__(self, msg, code=0): SystemExit.__init__(self, (msg,code,)) self.msg = msg self.code = code # ------------------------------------------------------------------- # Custom test...
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError try: import docutils.core import docutils.nodes import docutils.parsers.rst.roles except ImportError: docutils_is_available = False else: do...
''' We base the NetLapRLS implementation on the one from PyDTI project, https://github.com/stephenliu0423/PyDTI, changes were made to the evaluation procedure [1] Xia, Zheng, et al. "Semi-supervised drug-protein interaction prediction from heterogeneous biological spaces." BMC systems biology 4.Suppl 2 (2010): S6. De...
from operator import attrgetter import pytest from ..config import ( Config, ConfigKey, ConfigKeyTypes, InvalidConfigValue, MissingConfigKey, ) class TestConfigKeyTypes: def test_get_converter_unknown_type(self): """An error is raised if type is unknown.""" with pytest.raises...
#!/usr/bin/env python """Run the py->rst conversion and run all examples. This also creates the index.rst file appropriately, makes figures, etc. """ from __future__ import print_function, division, unicode_literals, absolute_import from builtins import open from past.builtins import execfile # -----------------------...
#!/usr/bin/env python import lief import sys import os # Parse PE file pe = lief.parse(sys.argv[1]) sep = (":") if sys.version_info.minor > 7 else () # Get authenticode print(pe.authentihash_md5.hex(*sep)) # 1c:a0:91:53:dc:9a:3a:5f:34:1d:7f:9b:b9:56:69:4d print(pe.authentihash(lief.PE.ALGORITHMS.SHA_1).hex(*sep)) # ...
#!/usr/bin/env python # Copyright (c) 2011 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 logging import optparse import os import sys import types import unittest from chromedriver_launcher import ChromeDriverLau...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Document.stored_validity_rate' db.alter_column(u'crowdataapp_document', 'stored_validity_...
#!/usr/bin/env python # Copyright (c) 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 os import re import sys import zipfile def main(): ZIP_PATTERN = re.compile('dmprof......\.zip') assert len(sys.argv)...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class JeuxVideoIE(InfoExtractor): _VALID_URL = r'http://.*?\.jeuxvideo\.com/.*/(.*?)\.htm' _TESTS = [{ 'url': 'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita...
# 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...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
# Copyright (C) 2014 Karl R. Wurst # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in ...
import pyaudio import wave import sys import time import cv2 import numpy as np import os from Tkinter import * from pydubtest import play, make_chunks from pydub import AudioSegment from threading import Thread from vidAnalysis import vid2SoundFile from eventBasedAnimationClass import EventBasedAnimationClass import i...
"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import ModuleType, TracebackType from typing import Awaitable, Dict, Iterable, List, Optional, Tuple, Type, Union from homeassistant.loader import bind_hass,...
from __future__ import unicode_literals from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db.models import Q from guardian.utils import get_identity from guardian.utils import get_user_obj_perms_model from guardian.uti...
from __future__ import unicode_literals from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.custom_user import CustomUser from django.core.exceptions import ImproperlyConfigured from django.dispatch import...
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
""" FR-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_re = re.com...
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <[EMAIL]> # (c) 2015, Indrajit Raychaudhuri <[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 Ge...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# coding=utf-8 """ In this module resides the core data structures and logic of the plugin system. It is implemented in an RaionPi-agnostic way and could be extracted into a separate Python module in the future. .. autoclass:: PluginManager :members: .. autoclass:: PluginInfo :members: .. autoclass:: Plugin ...
#!/usr/bin/env python """ C.11.5 Index and Glossary (p211) """ import string, os from plasTeX.Tokenizer import Token, EscapeSequence from plasTeX import Command, Environment, IgnoreCommand, encoding from plasTeX.Logging import getLogger from Sectioning import SectionUtils try: from pyuca import Collator col...
# 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 distributed in the hope that ...
#!/usr/bin/env python # # Copyright 2011-2012 Andreas Wundsam # # 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 applic...
"""Reads and writes the configuration file of PyARTOS. This module provides access to the configuration given in the file 'pyartos.ini', which is searched for in the current working directory. To access the configuration options, the 'config' object in this module's dictionary can be used, which is an instance of...
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
import django_filters from .models import ( CommunityHealthUnit, CommunityHealthWorker, CommunityHealthWorkerContact, Status, CommunityHealthUnitContact, Approver, CommunityHealthUnitApproval, CommunityHealthWorkerApproval, ApprovalStatus ) from common.filters.filter_shared import ...
# Copyright 2013 Google Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, dis- # trib...
# 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 # d...
# -*- 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...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version def _g...
# Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from django.contrib import admin from .models import AbilityList, AbilityExamples, OccupationList, DriveList, DriveExamples, AssociatedOccuDrive, AssociatedOccuAbil, SpecialList # Primary keys you care about #primary_keys = [ # 'occupation', # 'drive', # 'ability' # ] # Inline projects to build the editin...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# This file is part of sbcatalog # # sbcatalog is Copyright © 2015 beFair.it # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License version 3, as published by # the Free Software Foundation. # # This program is distributed in the hope that ...
# # ElementTree # $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # [EMAIL] # http://www.pythonware.com # # ------...
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
import random, time, queue from multiprocessing.managers import BaseManager from multiprocessing import freeze_support task_queue = queue.Queue() result_queue = queue.Queue() class QueueManager(BaseManager): pass def return_task_queue(): global task_queue return task_queue def return...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing index on 'Address', fields ['address'] if db.backend_name != 'sqlite3': # South forg...
#!/usr/bin/env python2 # $Date$ # $Revision$ # $Author$ # $HeadURL$ # $Id$ import sys, re, os import xml.parsers.expat from xml.dom import minidom from Tools.pretty import * from Tools.colours import Colours tokens = [ ['&amp;' , '####amp####'], ['&' , '&amp;'], ['<' , '&lt;'], ['>' , '&gt;'], ...
# 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 base64 import logging import os import unittest import urllib import urllib2 import urlparse import wptserve logging.basicConfig() here = os.path.split(__file__)[0] doc_root = os.path.join(here, "docroot") class Request(urllib2.Request): def __init__(self, *args, **kwargs): urllib2.Request.__init...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = '[EMAIL] (Wesley Chun)' from datetime import datetime import endpoints fr...
#!/usr/bin/env python """ sarcorrelation.py : Calculates interferometric correlation usage:: $ sarcorrelation.py int_file amp_input [options] Parameters ---------- int_file : complex interferogram file amp_input : amplitude file(s); one of: -a bip_amp...
# # db model for psychometrics data # # this data is collected in real time # from django.db import models from courseware.models import StudentModule class PsychometricData(models.Model): """ This data is a table linking student, module, and module performance, including number of attempts, grade, max g...