text
stringlengths
475
200k
import os import sys from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools import setup, find_packages version = '0.1.5b' # Provided as an attribute, so you can append to these instead # of replicating them: standard_exclude = ('*.py', '*.pyc', '*$py.class', '*~', '.*', '*.bak') stan...
# Copyright 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
__doc__ = """ Graphical python script to talk to a GPS, and display all sorts of useful information from it. Can talk to a NMEA Bluetooth GPS, or an internal GPS on a 3rd Edition Phone. mk: Saves a log in a format acceptable by Symbian GPS emulator (In Symbian documentation: S60 3rd Edition SDK for Symbian OS, S...
# -*- coding: utf-8 -*- # # Copyright (C) 2009 GazpachoKing <[EMAIL]> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <[EMAIL]> # Copyright (C) 2007-2009 Andrew Resch <[EMAIL]> # Copyright (C) 2009 Damien Churchill <[EMAIL]> # # This file is part of Deluge and is licensed under GNU General Pu...
# coding=utf8 # # TODO load from blueprints import sys from flask import Blueprint from werkzeug.routing import Rule from wheel.core.app import WheelModule from wheel.core.models.content import Content from wheel.core.wheel_themes import Theme from pymongo.mongo_client import MongoClient if sys.version_info.major =...
# Сценарий предназначен для построения файла mnas_acad_utils.nsi # # Для запуска данного сценария необходимо: # 1 Создать ярлык для запуска "Python 3.x (command line - 32 bit)" # 2 Параметр "Рабочая папка" вновь созданного ярлыка для запуска # "Python 3.x (command line - 32 bit)" установить равным пути, # где н...
#!/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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os from bocho import assemble def main(): """Command-line entry point for key functionality.""" parser = argparse.ArgumentParser() parser.add_argument('pdf_file') parser.add_argument('--pages', type=int, nargs='*') parser.add_a...
#========================================================================= # pisa_bltz_test.py #========================================================================= import pytest import random import pisa_encoding from pymtl import Bits from PisaSim import PisaSim from pisa_inst_test_utils import * #--------...
# -*- coding: utf-8 -*- """Colorize terminal text with regular expressions. This module implements all functionality required for grec. """ import sys import argparse import re try: # Python 2 from itertools import izip_longest as zip_longest except ImportError: # Python 3 from itertools import zip...
import unittest from libgraph import graphs class Tests(unittest.TestCase): def test_creation(self): g = graphs.Graph() def test_nodes_and_edges(self): g = graphs.Graph() nodes = [1,2,3,4] g.add_nodes(*nodes) g.add_edges((1,2), (2,3), (3,4), (4,5)) for k in no...
#!/usr/bin/env python # -*- coding: utf-8 -*- import multiprocessing import Queue import time from multiprocessing.managers import BaseManager from lib.core.logger import LOG from lib.core.logger import REPORT class SwarmManager(BaseManager): """ Task and Result Queue Manager. Use its subclass MSwarmManag...
#!/usr/bin/env python ############################################################################### # # Copyright 2010 Locomatix, 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 # # ...
import logging import os import functools import random import threading import sys from concurrent.futures import ThreadPoolExecutor from tornado.web import StaticFileHandler from tornado.ioloop import IOLoop, PeriodicCallback from tornado.web import Application from tornado.log import enable_pretty_logging from gem...
from django.db import migrations from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def delete_messages_sent_to_stream_stat( apps: StateApps, schema_editor: DatabaseSchemaEditor ) -> None: UserCount = apps.get_model("analytics", "UserCount") ...
from ..externals.tempita import Template info_template = Template(""" <table class="table table-hover"> <tr> <th>Measurement date</th> {{if meas_date is not None}} <td>{{meas_date}}</td> {{else}}<td>Unknown</td>{{endif}} </tr> <tr> <th>Experimenter</th> {{if...
""" beep on highlight """ import sushi import string def do_beep(): """ tries several beep methods for different platforms and frameworks and returns if one method was successful. """ try: import winsound return winsound.Beep(30, 1) except: pass try: import MacOS # not in 64 bit return MacOS.S...
# 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...
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <[EMAIL]> # # 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/LICENS...
# -*- coding: utf-8 -*- # # we set up default information for our locale. # Translators should use this file as the basis of their translation. # Copy this file and rename it for you locale. # # For example, Spanish uses: # defaults_es.py # # British English uses: # defaults_en_GB.py # # Please fill in the below fields...
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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 os import json import logging #from django.utils.translation import ugettext as _ from django.core.exceptions import ValidationError from django.contrib.gis.db import models from django.contrib.gis.geos import GEOSGeometry, Polygon, MultiPolygon, Point from django.contrib.auth.models import User from django.app...
''' Created on Mar 12, 2011 @author: johnsalvatier ''' from scipy import optimize import numpy as np from numpy import isfinite, nan_to_num, logical_not import pymc3 as pm from ..vartypes import discrete_types, typefilter from ..model import modelcontext, Point from ..theanof import inputvars from ..blocking import Di...
from collections import namedtuple from decimal import Decimal as D from . import availability, prices # A container for policies StockInfo = namedtuple('StockInfo', ['price', 'availability', 'stockrecord']) class Selector(object): """ Responsible for returning the appropriate strategy class for a given ...
# -*- coding: utf-8 -*- from base64 import decode import sys #stdin, stdout, stderr ######### CTI # funkce pro nacitani ze vstupniho souboru # je implementovana jako iterator, vracejici jeden nacteny token i s jeho obsahem (např. nazev identifikatoru) class cti: def __init__(self, input, case_insensitiv): #string...
import os import torch class Dictionary(object): def __init__(self): self.word2idx = {} self.idx2word = [] def add_word(self, word): if word not in self.word2idx: self.idx2word.append(word) self.word2idx[word] = len(self.idx2word) - 1 return self.word2id...
#----------------------------------------------------------------------------- # Copyright (c) 2005-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
from __future__ import unicode_literals from datetime import datetime import errno import os import re import sys import socket from django.core.management.base import BaseCommand, CommandError from django.core.servers.basehttp import run, get_internal_wsgi_application from django.db import connections, DEFAULT_DB_AL...
from airbnb import config from datetime import datetime, timedelta import dryscrape from urllib import urlencode import requests import json from pprint import pprint import copy def from_datetime_to_string(dt): return "{}-{}-{}".format(dt.year, str(dt.month).zfill(2), str(dt.day).zfill(2)) def make_start_to_en...
""" This sample shows to backup assignments Python 2.x/3.x ArcREST 3.5 """ from __future__ import print_function import arcrest from arcresthelper import securityhandlerhelper from arcresthelper import common import time def trace(): """ trace finds the line, the filename and error message...
#-*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <[EMAIL]>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3...
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>' from collections import namedtuple from calibre.ebooks.docx.writer.utils im...
# vim: expandtab:tabstop=4:shiftwidth=4 # # Copyright 2016 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
#! /usr/bin/env python from __future__ import print_function from openturns import * from math import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Problem parameters dimension = 3 a = 7.0 b = 0.1 # Reference analytical values meanTh = a / 2 covTh = (b ** 2 * pi ** 8) / 18.0 + \ ...
import cm # Hacky interface to avoid Swig linking issues and use ui namespace in python hasFocus = cm.ui_hasFocus begin = cm.ui_begin end = cm.ui_end modified = cm.ui_modified dragger = cm.ui_dragger highlightDragger = cm.ui_highlightDragger #line = cm.ui_line handle = cm.ui_handle lengthHandle = cm.ui_lengthHandle af...
""" Parser and evaluator for FormulaResponse and NumericalResponse Uses pyparsing to parse. Main function as of now is evaluator(). """ import math import numbers import operator import numpy import scipy.constants from pyparsing import ( CaselessLiteral, Combine, Forward, Group, Literal, Mat...
import json from . import domain_model from . import models def get_cloud_provider(view, zone=None): """ Returns a cloud provider for the current user. The relevant cloud is discovered from the view and the credentials are retrieved from the request or user profile. Return ``None`` if no credentials ...
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
# -*- coding: utf-8 -*- """ :copyright: (c) 2015 by Jan-Hendrik Dolling. :license: Apache 2.0, see LICENSE for more details. """ import sys import re from setuptools import setup, find_packages version = '' with open('configvalidator/__init__.py', 'r') as fd: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2009 by the FIFE team # http://www.fifengine.de # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Le...
# Copyright 1999-2009 University of Chicago # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
import logging import re import traceback import click from django.utils import timezone from ESSArch_Core.exceptions import ValidationError from ESSArch_Core.fixity.models import Validation from ESSArch_Core.fixity.validation.backends.base import BaseValidator logger = logging.getLogger('essarch.fixity.validation.r...
""" Acceptance tests for grade settings in Studio. """ from __future__ import absolute_import from bok_choy.promise import EmptyPromise from six.moves import range from common.test.acceptance.fixtures.course import XBlockFixtureDesc from common.test.acceptance.pages.studio.settings_graders import GradingPage from com...
# Copyright 2012 Nebula, 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 agree...
############################################################################## # Copyright (c) 2013-2018, 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...
import unittest from flask import url_for from app import current_app as app from app.helpers.data import save_to_db from tests.unittests.api.utils_post_data import POST_SESSION_DATA, POST_SPEAKER_DATA from tests.unittests.object_mother import ObjectMother from tests.unittests.views.view_test_case import OpenEventVie...
import copy import logging import math import libtbx from dxtbx.model.experiment_list import Experiment, ExperimentList from dials.algorithms.indexing import DialsIndexError, DialsIndexRefineError from dials.algorithms.indexing.indexer import Indexer from dials.algorithms.indexing.known_orientation import IndexerKnow...
## Copyright Luc Saffre 2003-2004. ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later versio...
# Copyright (C) 2019 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that it w...
import os import sys import re import requests import shutil from subprocess import check_call from collections import defaultdict from pathlib import Path # Exall is an exception manager based on decorator/context/callback # Check it out: https://github.com/nongiach/exall from exall import exall, ignore from pySmartD...
import copy import json import urlparse import requests from keystoneclient.v2_0 import services from tests import utils class ServiceTests(utils.TestCase): def setUp(self): super(ServiceTests, self).setUp() self.TEST_REQUEST_HEADERS = { 'X-Auth-Token': 'aToken', 'User-Ag...
"""Clean Plugin for EasyEngine.""" from ee.core.shellexec import EEShellExec from ee.core.aptget import EEAptGet from ee.core.services import EEService from ee.core.logging import Log from cement.core.controller import CementBaseController, expose from cement.core import handler, hook import os import urllib.request ...
from tests import BaseTestCase class TestQueryResultsCacheHeaders(BaseTestCase): def test_uses_cache_headers_for_specific_result(self): query_result = self.factory.create_query_result() query = self.factory.create_query(latest_query_data=query_result) rv = self.make_request('get', '/api/q...
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
import sys from os import getcwd, chdir, path, makedirs, listdir, mkdir from os import remove, walk, system, access, R_OK from SDPic import SDPic from Tkinter import Tk, Toplevel # Widgets from Tkinter import Button, Checkbutton, Entry, Text, Fram...
# 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 (t...
#!/usr/bin/env python """ @package mi.dataset.parser.test @file marine-integrations/mi/dataset/parser/test/test_ctdpf_j_cspp.py @author Joe Padula modified by C. Goodrich for uFrame @brief Test code for a ctdpf_j_cspp data parser ctdpf_j_cspp is based on cspp_base.py test_dosta_abcdjm_cspp.py fully tests all of the c...
import logging from functools import partial import math import json from django.http import HttpResponseBadRequest from django.contrib.auth.decorators import login_required from django.views.decorators.csrf import ensure_csrf_cookie from django.views.decorators.http import require_http_methods, require_POST from djan...
import pwm from numpy import allclose, isnan def test_create(): m = pwm.FrequencyMatrix.from_rows( ['A','C','G','T'], get_ctcf_rows() ) # Alphabet sort assert m.sorted_alphabet == [ 'A', 'C', 'G', 'T' ] # Character to index mapping assert m.char_to_index[ ord('A') ] == 0 assert m.char_to_index[...
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
# goto_assignments command tests are different in syntax definition = 3 #! 0 ['a = definition'] a = definition #! [] b #! ['a = definition'] a b = a c = b #! ['c = b'] c cd = 1 #! 1 ['cd = c'] cd = c #! 0 ['cd = e'] cd = e #! ['module math'] import math #! ['import math'] math #! ['import math'] b = math #! ['b =...
# Copyright 2012 Nebula, 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 agree...
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <[EMAIL]> * # * (c) 2009, 2010 Ken Cline <[EMAIL]> * # * (c) 2020 Eliud Cabrera Castillo <[EMAIL]> * # * ...
#!/usr/bin/env python """Some utility functions used by the main code base.""" # KaFKA A fast Kalman filter implementation for raster based datasets. # Copyright (c) 2017 J Gomez-Dans. All rights reserved. # # This file is part of KaFKA. # # KaFKA is free software: you can redistribute it and/or modify # it under the ...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr, flt, cint from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webnotes import msgpr...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------- # drawElements Quality Program utilities # -------------------------------------- # # Copyright 2015 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
from PyQt4 import QtGui,QtCore from PyQt4.QtCore import Qt from PIL import ImageGrab, ImageFilter, Image import cv2 from PyQt4.QtGui import QPalette from pytank.Core import Settings from pytank.Core import SystemFunctions import os class MyWindow(QtGui.QDialog): def __init__(self,parent): super(MyWin...
""" The MIT License (MIT) Copyright © 2017 RealDolos 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, publi...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from dateutil.relativedelta import relativedelta from werkzeug.urls import url_encode from odoo import api, fields, models STATUS_COLOR = { 'on_track': 10, # green 'at_risk': 2, ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_labe...
""" ProofResourceMockup.py ====================== A ProofResource mockup implementation. """ import logging import proof.ProofResource as ProofResource class ProofResourceMockup(ProofResource.ProofResource): def __init__( self, config_filename, schema_name = '', ...
#!/usr/bin/env python # # rpclib - Copyright (C) Rpclib contributors. # # This library 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 Software Foundation; either # version 2.1 of the License, or (at your option) any later ...
# Copyright 2017 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. """Create function which removes the specified device policies from ChromeDeviceSettingsProto. This function is primarily intended to be used for the impleme...
from . import header def ylabel(text, side='left', offset=0, **args): """Put y-axis label text - string of text to place side - location of label. Either left or right offset - Offset for y label added to default offset Supported optional arguments: angle - text angle. D...
from requests.auth import HTTPBasicAuth import requests class ProfileRequestFactory(): """ An Encapsulation for building Profile Requests """ def get(self): raise NotImplementedError('`get()` must be implemented.') # Static Factory def create(node): if node.team_number == 5: ...
"""$Id: channel.py 511 2006-03-07 05:19:10Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 511 $" __date__ = "$Date: 2006-03-07 18:19:10 +1300 (Tue, 07 Mar 2006) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim" __lice...
# Copyright 2015-2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
""" Syslog notification service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.syslog/ """ import logging import voluptuous as vol from homeassistant.components.notify import ( ATTR_TITLE, ATTR_TITLE_DEFAULT, PLATFORM_SCHEMA, BaseNotificati...
#!python # coding=utf-8 import random import string import itertools from pyaxiom.urn import IoosUrn from pyaxiom import logger class DotDict(object): def __init__(self, *args, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) def __repr__(self): import pprint r...
# -*- coding: utf-8 -*- """ *************************************************************************** DefineGrassRegionAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************...
""" The MIT License (MIT) Copyright (c) 2015 Stephen J. Butler 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, m...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# ARCHIVO DONDE SE HACEN TODAS LAS OPERACIONES Y SE CREA UN MENÚ # Se importan las clases a usar from agencia import Agencia from vendedor import Vendedor from cliente import Cliente from automovil import Automovil from camion import Camion from motocicleta import Motocicleta # Se declara la agencia donde se realizan...
#! /usr/bin/env jython # Copyright (C) 2011 Sun Ning<[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, mo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function from __future__ import unicode_literals import nose from nose.tools import * from sknano.generators import UnrolledSWNTGenerator from sknano.testing import GeneratorTestFixtures class TestCase(GeneratorTestFixtures): def t...
# -*- 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): # Deleting field 'Branch.last_error' db.delete_column(u'parsr_branch', 'l...
# -*- coding: utf-8 -*- """ werkzeug.contrib.kickstart ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides some simple shortcuts to make using Werkzeug simpler for small scripts. These improvements include predefined `Request` and `Response` objects as well as a predefined `Application` object whi...
# -*- coding: utf-8 -*- import os import re import sys import time import copy import json import hashlib import zipfile from datetime import datetime from collections import Iterable import six import boto3 from botocore.exceptions import ClientError import yaml import jinja2 import troposphere from troposphere impor...
# 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 requi...
# -*- coding: utf-8 -*- # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ from __future__ import unicode_literals import json import os import unittest import mozunit import mozbuild.action.generate_browsersearch as generate_browsersearch from mozfile.mozfile i...
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2013 Stanford University and the Authors # # Authors: Kyle A. Beachamp # Contributors: Robert McGibbon # # MDTraj is...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): if not db.dry_run: for team in orm.Team.objects.all(): team.slug = 'team_%s' % team.pk ...
from Server import ThreadedServer, ForkingServer import traceback class WSGIMixIn: def handle(self, req): environ = req.environ environ['wsgi.input'] = req.stdin environ['wsgi.errors'] = req.stderr environ.update(self._environ) if environ.get('HTTPS','off') in...
# Copyright (C) 2013-2016 Free Software Foundation, Inc. # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. import sys import re import ...
# -*- coding: utf-8 -*- # Copyright 2010-2021, 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...
""" fImageD11.compute_gv? Type: fortran String Form:<fortran object> Docstring: compute_gv - Function signature: gv = compute_gv(xlylzl,omega,wvln,wedge,chi,t,[n]) Required arguments: xlylzl : input rank-2 array('f') with bounds (3,n) omega : input rank-1 array('f') with bounds (n) wvln : input float w...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Issue.is_feedback' db.add_column('core_issue', 'is_feedback', self.gf(...
# Copyright 2015: 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 applicab...
# Copyright 2016 Chr. Hansen A/S and The Novo Nordisk Foundation Center for Biosustainability, DTU. # 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....