text
stringlengths
475
200k
"""Test settings and readings of program variables.""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class SetValuesTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp()....
# -*- coding:iso-8859-1 -*- """ Copyright (c) 2003-2007 Gustavo Niemeyer <[EMAIL]> This module offers extensions to the standard Python datetime module. """ from __future__ import unicode_literals __license__ = "Simplified BSD" import datetime import string import time import collections try: from io import St...
""" Create a wheel (.whl) distribution. A wheel is a built archive format. """ import csv import hashlib import os import subprocess import warnings import shutil import json import wheel try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig i...
import copy_reg import unittest from test import test_support from test.pickletester import ExtensionSaver class C: pass class WithoutSlots(object): pass class WithWeakref(object): __slots__ = ('__weakref__',) class WithPrivate(object): __slots__ = ('__spam',) class WithSingleString(object): ...
# Copyright (c) 2001-2006 Twisted Matrix Laboratories. # See LICENSE for details. import sys from twisted.internet import reactor from twisted.names.srvconnect import SRVConnector from twisted.words.xish import domish from twisted.words.protocols.jabber import xmlstream, client, jid class XMPPClientConnector(SRVConn...
"""Sanity test to check integration test aliases.""" from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import textwrap import os from ... import types as t from . import ( SanityVersionNeutral, SanityMessage, SanityFailure, SanitySuccess, SanityTa...
#!/usr/local/bin/python # Copyright (c) 2011 GhostBSD # # See COPYING for licence terms. import gtk from subprocess import Popen lyrics = """ Please report to , and be sure to provide /tmp/.pc-sysinstall/pc-sysinstall.log. """ class PyApp: def on_reboot(self, widget): Popen('sudo reboot', shell=True) ...
"""A parser for SGML, using the derived class as a static DTD.""" # XXX This only supports those SGML features used by HTML. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are ...
from ..base import * try: from ..translators.translator import translate_js except: pass @Js def Function(): # convert arguments to python list of strings a = [e.to_string().value for e in arguments.to_list()] body = ';' args = () if len(a): body = '%s;' % a[-1] args = a[:-...
# Spawn Group file created with PSWG Planetary Spawn Tool import sys from java.util import Vector from services.spawn import DynamicSpawnGroup from services.spawn import MobileTemplate def addDynamicGroup(core): dynamicGroup = DynamicSpawnGroup() mobileTemplates = Vector() mobileTemplates.add('kunga_clan_leader') ...
# Setup script for the pycvc package # # Usage: python setup.py install # import os from setuptools import setup, find_packages DESCRIPTION = "pycvc: Analyze CVC stormwater data" LONG_DESCRIPTION = DESCRIPTION NAME = "pycvc" VERSION = "0.3.0" AUTHOR = "Paul Hobson (Geosyntec Consultants)" AUTHOR_EMAIL = "[EMAIL]" URL ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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', ...
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher ([EMAIL]) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany # Copyright (C) 201...
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = ''' --- module: campfire version_added: "1.2" short_description: Send a message to Campfire description: - Send a message to Campfire. - Messages with newlines will result in a "Paste" message being sent. version_added: "1.2" options: subscription: ...
# coding=utf-8 ######################################################################################################################## plugin_identifier = "ScreenSquish" plugin_package = "octoprint_%s" % plugin_identifier plugin_name = "OctoPrint-ScreenSquish" plugin_version = "0.4" plugin_description = "Scalable UI ...
# ASN.1 "universal" data types import operator, sys, math from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap from pyasn1.codec.ber import eoo from pyasn1.compat import octets from pyasn1 import error # "Simple" ASN.1 types (yet incomplete) class Integer(base.AbstractSimpleAsn1Item): tagSet...
# -*- coding: utf-8 -*- """ Необходимые классы для создания страниц с текстом """ from outwiker.core.tree import WikiPage from outwiker.pages.text.textpanel import TextPanel from outwiker.core.factory import PageFactory class TextWikiPage (WikiPage): """ Класс текстовых страниц """ def __init__(self...
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <[EMAIL]> # License: http://pysnmp.sf.net/license.html # try: from hashlib import md5 except ImportError: import md5 md5 = md5.new from pyasn1.type import univ from pysnmp.proto.secmod.rfc3414.auth import base from pysnmp.pr...
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-16 21:25 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone import model_utils.fields class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0008_alte...
""" parse voteview partisanship data """ HOUSE_DAT = "../data/crawl/voteview/HL01110C21_PRES_BSSE.DAT" SENATE_DAT = "../data/crawl/voteview/SL01110C21_BSSE.dat" state_map = { #@@ import to state json as icpsr 41: 'AL', 81: 'AK', 61: 'AZ', 42: 'AR', 71: 'CA', 62: 'CO', 1: 'CT', 11: 'DE', 43: 'FL', 44: 'GA', 82: 'H...
#!/usr/bin/env python ''' ansible module for zabbix users ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix user ansible module # # # Copyright 2015 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 ma...
# Unix SMB/CIFS implementation. # Copyright (C) Andrew Bartlett 2012 # # Based on user.py: # Copyright (C) Sean Dague <[EMAIL]> 2011 # # 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 vers...
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
# (c) 2018, Arigato Machine Inc. # (c) 2018, 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 from units.compat import unittest from units.compat.mock import patch, call f...
#! /usr/bin/env python3 import os import sys import math import numpy as np from itertools import product from mule_local.JobGeneration import * from mule.JobParallelization import * from mule.JobParallelizationDimOptions import * p = JobGeneration() verbose = False #verbose = True ###############################...
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
#!/usr/bin/env python # Copyright 2015 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. """Script to download LLVM gold plugin from google storage.""" import find_depot_tools import json import os import shutil import subp...
# SecuML # Copyright (C) 2016-2017 ANSSI # # SecuML 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. # # SecuML is distributed in the h...
import datetime import json import logging from dateutil.parser import parse as dateutil_parse import pykube.exceptions import autoscaler.utils as utils logger = logging.getLogger(__name__) class KubePodStatus(object): RUNNING = 'Running' PENDING = 'Pending' CONTAINER_CREATING = 'ContainerCreating' ...
import argparse import json import sys from cgi import escape from collections import defaultdict import types def html_escape(item, escape_quote=False): if isinstance(item, types.StringTypes): rv = escape(item) if escape_quote: rv = rv.replace('"', "&quot;") return rv els...
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
#!/usr/bin/python # (c) 2016, Dag Wieers <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview...
# 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...
# # (c) 2015, Peter Sprygada <[EMAIL]> # # Copyright (c) 2016 Dell Inc. # # 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 yo...
import os import unittest from tests.utils import ( setup_test_env, ) setup_test_env() from softwarecenter.backend.login import get_login_backend from softwarecenter.backend.login_impl.login_sso import ( LoginBackendDbusSSO) from softwarecenter.backend.login_impl.login_fake import ( LoginBackendDbusSSOFake...
# coding=utf-8 # Author: Nic Wolfe <[EMAIL]> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 ...
from ..Qt import QtGui, QtCore __all__ = ['JoystickButton'] class JoystickButton(QtGui.QPushButton): sigStateChanged = QtCore.Signal(object, object) ## self, state def __init__(self, parent=None): QtGui.QPushButton.__init__(self, parent) self.radius = 200 self.setCheckable(True)...
#!/usr/bin/python # encoding: utf-8 # (c) 2016, Jiri Tyr <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import io import logging import os import re import sys from gunicorn._compat import unquote_to_wsgi_str from gunicorn.six import string_types, binary_type, reraise from gunicorn import SERVE...
"""Contains the functions used to read the input file and print the checkpoint files with xml formatting. Copyright (C) 2013, Joshua More and Michele Ceriotti 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 Fou...
# -*- coding: utf-8 -*- """ Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib from logging import DEBUG, getLogger from traceback import format_exc #...
# coding: utf-8 from .. import fixtures, config from ..assertions import eq_ from ..config import requirements from sqlalchemy import Integer, Unicode, UnicodeText, select from sqlalchemy import Date, DateTime, Time, MetaData, String, \ Text, Numeric, Float from ..schema import Table, Column from ... impor...
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
"""SCons.Tool.midl Tool-specific initialization for midl (Microsoft IDL compiler). There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby ...
# system call counts, by pid # (c) 2010, Tom Zanussi <[EMAIL]> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.environ['PERF_...
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets from ArduCopter flashlog using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from optparse import OptionParser parser = OptionParser("magfit_flashlog.py [options]") parser.add_option("--verbose", ac...
""" Utility function to facilitate testing. """ import os import sys import re import operator import types import warnings from nosetester import import_nose __all__ = ['assert_equal', 'assert_almost_equal','assert_approx_equal', 'assert_array_equal', 'assert_array_less', 'assert_string_equal', ...
import unittest from django.core.exceptions import ImproperlyConfigured from django.db import ProgrammingError try: from django.contrib.gis.db.backends.postgis.operations import PostGISOperations HAS_POSTGRES = True except ImportError: HAS_POSTGRES = False except ImproperlyConfigured as e: # If psycop...
import unittest from coalib.results.AbsolutePosition import AbsolutePosition, calc_line_col from coalib.misc.Constants import COMPLEX_TEST_STRING class AbsolutePositionTest(unittest.TestCase): def test_calc_line_col_newlines(self): # no newlines text = ("find position of 'z'",) z_pos = t...
"""Filename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function...
# 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...
__author__ = 'chris' import sys, os, time, atexit from signal import SIGTERM class Daemon(object): """ A generic daemon class. Usage: subclass the Daemon class and override the run() method """ # pylint: disable=file-builtin def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', st...
""" script for determing the peak in the spectrum Andre 10 July 2009 Usage python3 ./determinepeak.py [# of RCUs] """ # INIT import array import operator import os import time import sys import math import numpy # Read directory with the files to processs def open_dir(dirname) : files = list(filter(os.path.isfil...
# -*- coding: utf-8 -*- # Copyright (C) 2014 @threatlead # # 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 prog...
"""Facility to use the Expat parser to load a minidom instance from a string or file. This avoids all the overhead of SAX and pulldom to gain performance. """ # Warning! # # This module is tightly bound to the implementation details of the # minidom DOM and can't be used with other DOM implementations. This # is due...
#!/usr/bin/env python # # 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 ...
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl 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 t...
#Lab: Distance Converter #Student: Dana Stubkjaer def convert(distance, unit1, unit2): if unit1 == "mi": if unit2 == "mi": print (distance + " " + unit2) if unit2 == "km": print ((float(distance) * 1.60934)) if unit2 == "ft": print ((float...
#!/usr/bin/env python2 # coding: utf-8 # THIS SOFTWARE IS LICENSED UNDER THE BSD LICENSE CONDITIONS. # FOR LICENCE DETAILS SEE share/LICENSE.TXT # # (c) 2005-2009, Marco Hoehle <[EMAIL]> # (c) 2010, Hanspeter Spalinger <[EMAIL]> """ housekeeping jobs, run this script as cronjob. Do not forget to change KEYTAB to the l...
from __future__ import print_function, division import os.path import CoolProp import CoolProp.CoolProp import subprocess import sys import numpy as np import matplotlib matplotlib.use('Agg') #Force mpl to use a non-GUI backend import matplotlib.pyplot as plt web_dir = os.path.abspath(os.path.join(os.path.dirname(__...
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verify that a hard_dependency that is not exported is not pulled in as a dependency for a target if the target does not explicitly speci...
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:[EMAIL] # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by th...
from Source import Source from Components.Element import cached class List(Source, object): """The datasource of a listbox. Currently, the format depends on the used converter. So if you put a simple string list in here, you need to use a StringList converter, if you are using a "multi content list styled"-list, you ...
#coding: UTF-8 import sys import traceback from pygmapslib import PyGMaps, PyGMapsError __all__ = ['GeocodingError', 'Geocoding', 'request'] class GeocodingError(Exception): def __init__(self, error_status, params): self.error_status = error_status self.params = params def __str__(self): ...
""" Unittests for exporting to git via management command. """ import copy import os import shutil import StringIO import subprocess import unittest from uuid import uuid4 from django.conf import settings from django.core.management import call_command from django.core.management.base import CommandError from django....
# -*- coding: utf-8 -*- ############################################## # # Swing Entwicklung betrieblicher Informationssysteme GmbH # (<http://www.swing-system.com>) # Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH # all rights reserved # 08-JUN-2012 (GK) created # # WARNING: This program as such is intende...
#!/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...
# -*- coding: latin-1 -*- # # Copyright 2009-2021 Ghent University # # This file is part of vsc-ldap, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Fl...
# # Abstraction for an XML importer with a disk base # # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # F...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Microsoft Internet Explorer WebCache database.""" import unittest from plaso.lib import definitions from plaso.parsers.esedb_plugins import msie_webcache from tests.parsers.esedb_plugins import test_lib class MsieWebCacheESEDBPluginTest(test_lib.ESEDB...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('sampleapp', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='category', name='l...
import avango import avango.script from avango.script import field_has_changed import avango.gua from examples_common.GuaVE import GuaVE STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_CYAN # STEREO_MODE = avango.gua.StereoMode.ANAGLYPH_RED_GREEN # STEREO_MODE = avango.gua.StereoMode.SIDE_BY_SIDE # STEREO_MODE = avan...
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
# This file is part of Copernicus # http://www.copernicus-computing.org/ # # Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Soft...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # ...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Red...
#* #* GRUB -- GRand Unified Bootloader #* Copyright (C) 2009 Free Software Foundation, Inc. #* #* GRUB 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...
# # (c) 2015, Peter Sprygada <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # #...
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.data import conf from lib.core.data import kb from lib.core.dicts import DBMS_DICT from lib.core.enums import DBMS from lib.c...
from __future__ import absolute_import, division, print_function, with_statement import collections from contextlib import closing import errno import gzip import logging import os import re import socket import sys from tornado import gen from tornado.httpclient import AsyncHTTPClient from tornado.httputil import HT...
# note: py.io capture tests where copied from # pylib 1.4.20.dev2 (rev 13d9af95547e) from __future__ import with_statement import pickle import os import sys import _pytest._code import py import pytest import contextlib from _pytest import capture from _pytest.capture import CaptureManager from _pytest.main import E...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-25 00:34 from __future__ import unicode_literals from django.db import migrations, models import pdfapp.validators class Migration(migrations.Migration): dependencies = [ ('pdfapp', '0009_auto_20170223_2247'), ] operations = [ ...
import ast import os from .context import Context class BaseAnalyzer(object): """ Base code analyzer class. Takes dict `file path => ast node` as first param and path to repository as second. Subclass this class and implement `analyze_file` method if you want to create new code analyzer. """ ...
#! /usr/bin/python #coding: utf-8 import sys import os import re def findAllFile(dir): folder = [dir] file = [] while len(folder) > 0: curDir = folder[0] folder.pop(0) lst = os.listdir(curDir) for i in lst: name = curDir + '\\' + i if os.path.isfile(name) == True: file.append(name) else...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010 Google # Copyright (c) 2008 rPath, Inc. # Copyright (c) 2009 The Echo Nest Corporation # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems Inc. # All...
from PyQt4.Qt import * from numpy import * import Avogadro import sys import unittest from util import * class TestCamera(unittest.TestCase): def setUp(self): # create the GLWidget and load the default engines self.glwidget = Avogadro.GLWidget() self.glwidget.loadDefaultEngines() self.molecule ...
#!/usr/bin/env python """Gather information from the registry on windows.""" from grr_response_core import config from grr_response_core.lib import artifact_utils from grr_response_core.lib.rdfvalues import file_finder as rdf_file_finder from grr_response_core.lib.rdfvalues import paths as rdf_paths from grr_response_...
from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from typing import Text from zerver.decorator import to_non_negative_int from zerver.lib.actions import do_update_pointer from zerver.lib.request import has_request_variables, JsonableError, REQ from zerver.lib.respon...
""" :mod: DErrno ========================== .. module: DErrno :synopsis: Error list and utilities for handling errors in DIRAC This module contains list of errors that can be encountered in DIRAC. It complements the errno module of python. It also contains utilities to manipulate these err...
# Copyright 2015-2016 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ A poll() based implementation of the twisted main loop. To install the event loop (and you should do this before any connections, listeners or connectors are added):: from twisted.internet import pollreactor pollreactor.in...
import os,sys,inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) cqsdir = os.path.abspath(os.path.dirname(currentdir) + "/CQS") sys.path.insert(0,cqsdir) import logging import argparse import string import subprocess from LocusItem import LocusItem, readBedFile from FileLis...
#!/usr/bin/env python # encoding: utf-8 """ run_lastz.py Created by Brant Faircloth on 2010-02-24. Copyright (c) 2010 Brant Faircloth. All rights reserved. # Description A helper script to run lastz. """ import pdb import sys import os import time import optparse import tempfile import subprocess import bx.seq.two...
# Copyright 2014 Cisco Systems, 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 requir...
#!/usr/bin/python # # CCLib_proxy Utilities # Copyright (c) 2014 Ioannis Charalampidis # # 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) an...
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
# (c) 2012-2014, Michael DeHaan <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.trial._dist.disttrial}. """ import os import sys from cStringIO import StringIO from twisted.internet.protocol import ProcessProtocol from twisted.internet.defer import fail, succeed from twisted.internet.task import Coop...
# Copyright 2010 Ramon Xuriguera # # This file is part of BibtexIndexMaker. # # BibtexIndexMaker is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any late...