text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# $Id: pjsua.py 2976 2009-10-29 08:16:46Z bennylp $ # # Object oriented PJSUA wrapper. # # Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org> # # 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 Foundat...
codeparrot/github-code-clean
from boxbranding import getMachineBrand, getMachineName from cPickle import dump, load from os import path as os_path, stat, mkdir, makedirs, listdir, access, remove, W_OK, R_OK, F_OK from time import time from stat import ST_MTIME from enigma import eTimer, getDesktop, ePicLoad, eRCInput, getPrevAsciiCode, eEnv from ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ High-level objects for fields. """ from collections import OrderedDict, defaultdict from datetime import date, datetime from functools import partial from operator import attrgetter from types import NoneType import...
codeparrot/github-code-clean
########################################################################### # OCRFeeder - The complete OCR suite # Copyright (C) 2009-2013 Joaquim Rocha <me@joaquimrocha.com> # Copyright (C) 2009-2012 Igalia, S.L. # # This program is free software: you can redistribute it and/or modify # it under the ter...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2022 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
codeparrot/github-code-clean
""" JobMover: top level mover to copy all Job files This functionality actually needs to be incorporated directly into RunJob, because it's just a workflow of RunJob but since RunJob at the moment is implemented as a Singleton it could be dangerous because of Job instance stored in the class object. :autho...
codeparrot/github-code-clean
defines = { "DT_ALPHA_NUM": 0x1, "DT_IA_64_NUM": 0x1, "DT_MIPS_NUM": 0x35, "DT_MIPS_RLD_VERSION": 0x70000001, "DT_MIPS_TIME_STAMP": 0x70000002, "DT_MIPS_ICHEC...
codeparrot/github-code-clean
from kqml import KQMLList, KQMLString from tfta.tfta import TFTA from tfta.tfta_module import TFTA_Module from bioagents.tests.util import ekb_from_text, ekb_kstring_from_text, \ get_request from bioagents.tests.integration import _IntegrationTest, _FailureTest from indra.sources.trips....
codeparrot/github-code-clean
#!/usr/bin/python """ The module symbolicGA implements symbolic Geometric Algebra in python. The relevant references for this module are: 1. "Geometric Algebra for Physicists" by C. Doran and A. Lazenby, Cambridge University Press, 2003. 2. "Geometric Algebra for Computer Science" by Leo Dorst, Daniel...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Event Model @copyright: 2009-2015 (c) Sahana Software Foundation @license: MIT 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Event Model @copyright: 2009-2014 (c) Sahana Software Foundation @license: MIT 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...
codeparrot/github-code-clean
# orm/events.py # Copyright (C) 2005-2021 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php """ORM event interfaces. """ import weakref from . import instrumentation from . im...
codeparrot/github-code-clean
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
codeparrot/github-code-clean
#!/usr/bin/python # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """This module provides shared functionality for the system to generate Dart:html APIs fr...
codeparrot/github-code-clean
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
codeparrot/github-code-clean
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # 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 lat...
codeparrot/github-code-clean
<<<<<<< HEAD <<<<<<< HEAD """distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import sys, os, re from email import message_from_file try: import warnings except ImportError: warnings = None from distutils.errors import * from dis...
codeparrot/github-code-clean
"""Tests suite for Period handling. Parts derived from scikits.timeseries code, original authors: - Pierre Gerard-Marchant & Matt Knox - pierregm_at_uga_dot_edu - mattknow_ca_at_hotmail_dot_com """ from datetime import datetime, date, timedelta from numpy.ma.testutils import assert_equal from pandas import Timesta...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Natural Language Toolkit: Probability and Statistics # # Copyright (C) 2001-2014 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> (additions) # Trevor Cohn <tacohn@cs.mu.oz.au> (additions) # Peter Ljunglöf <peter.ljunglof@heatherleaf.se> (additions)...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.8.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\xc1\xf9\ \x47\ \x49\x46\x38\x39\x61\x78\x00\x78\x00\xf7\x00\x00\x00\x00\x00\x01\ \x01\x01\x02\x0...
codeparrot/github-code-clean
from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from direct.gui import DirectGuiGlobals from direct.gui.DirectGui import * from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil from direct.showbase.PythonUtil import * from direct.task import T...
codeparrot/github-code-clean
# Copyright (C) 2016 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. # # Bootstrap: # # Supersedes and replaces both the init/add/remove cluster scripts, # and the ha-cluster-bootstrap scripts. # # Implemented as a straight-forward set of python functions for # simplicity and flexibility...
codeparrot/github-code-clean
import re import os import socket import fcntl import errno import struct import logging import random import math import time import shelve import signal import netifaces import netaddr import platform import uuid import hashlib import aexpect from avocado.core import exceptions from avocado.utils import path as util...
codeparrot/github-code-clean
# -*- coding: utf8 -*- #!/usr/bin/python # # This is derived from a cadquery script for generating QFP/GullWings models in X3D format. # # from https://bitbucket.org/hyOzd/freecad-macros # author hyOzd # # Dimensions are from Jedec MS-026D document. ## file of parametric definitions import collections ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' import os, glob, functools, re from calibre import guess_type from calibre.customize import (FileTypePlugin, MetadataReaderPlugin, MetadataWriterPlugin, PreferencesPlugin, InterfaceActionBase, StoreBase)...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # # # # iSida Jabber Bot # # Copyright (C) diSabler <dsy@dsy....
codeparrot/github-code-clean
# Hop --- a framework to analyze solvation dynamics from MD simulations # Copyright (c) 2007-2010 Oliver Beckstein <orbeckst@gmail.com> # # 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 v...
codeparrot/github-code-clean
# -*- coding:utf-8 -*- # 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 ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Tests for Requests.""" from __future__ import division import json import os import pickle import collections import contextlib import warnings import re import io import requests import pytest from requests.adapters import HTTPAdapter from requests.auth import HTTPDigestAuth, _basic_auth_...
codeparrot/github-code-clean
r""" This module contains specific inner product matrices for the different bases in the Chebyshev family. A naming convention is used for the first capital letter for all matrices. The first letter refers to type of matrix. - Mass matrices start with `B` - One derivative start with `C` - Two derivatives ...
codeparrot/github-code-clean
########################################################################## # # Copyright (c) 2016, 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: # # * Redistrib...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import hashlib import json import mock import os from datetime import datetime from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django.db import transaction from django.test.utils import override_settings ...
codeparrot/github-code-clean
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings from sympy import Basic, S, symbols, sqrt, sin, oo,...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from acq4.Manager import getManager from acq4.util.metaarray import * from acq4.pyqtgraph.ImageView import * from acq4.pyqtgraph.GraphicsView import * from acq4.pyqtgraph.graphicsItems import * from acq4.pyqtgraph.graphicsWindows import * from acq4.pyqtgraph.PlotWidget import * from acq4.pyqtgra...
codeparrot/github-code-clean
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
codeparrot/github-code-clean
# -*- 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...
codeparrot/github-code-clean
# Copyright 1999-2000 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patches by Mike Poidinger to support multiple databases. # Updated by Peter Cock in 2007...
codeparrot/github-code-clean
import numpy import pytest import sys from numina.array.peaks import peakdet from .._kernels import kernel_peak_function @pytest.mark.skipif(sys.version_info < (3, 0), reason="requires python3") def test_pycapsule(): m = kernel_peak_function(20) # This seems to be the only way to check that something is a P...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import requests import logging from emoji import emojize from lxml import html from telegram.ext import CommandHandler, MessageHandler, Filters, CallbackQueryHandler from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ReplyKeyboardMarkup, InlineQuery...
codeparrot/github-code-clean
""" This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change the feature configuration ...
codeparrot/github-code-clean
#!/usr/bin/env python """Semantic Protobufs are serialization agnostic, rich data types.""" import base64 import copy import struct # pylint: disable=g-import-not-at-top try: from grr.accelerated import _semantic except ImportError: _semantic = None from google.protobuf import any_pb2 from google.protobuf impo...
codeparrot/github-code-clean
# Author: Travis Oliphant, 2002 # # Further updates and enhancements by many SciPy developers. # from __future__ import division, print_function, absolute_import import math import warnings from collections import namedtuple import numpy as np from numpy import (isscalar, r_, log, around, unique, asarray, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2012 Christopher Gilbert <christopher.john.gilbert@gmail.com> # # Copyright 2012 Steve English <steve.english@naveta...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: iso-8859-1 -*- #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustäbel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, fre...
codeparrot/github-code-clean
# Copyright (c) Gary Strangman. All rights reserved # # Disclaimer # # This software is provided "as-is". There are no expressed or implied # warranties of any kind, including, but not limited to, the warranties # of merchantability and fitness for a given application. In no event # shall Gary Strangman be liable fo...
codeparrot/github-code-clean
# Python MSI Generator # (C) 2003 Martin v. Loewis # See "FOO" in comments refers to MSDN sections with the title FOO. import msilib, schema, sequence, os, glob, time, re, shutil, zipfile from msilib import Feature, CAB, Directory, Dialog, Binary, add_data import uisample from win32com.client import constants from dist...
codeparrot/github-code-clean
import pytest from numpy.testing import assert_almost_equal from pyproj import CRS from pyproj.crs import ProjectedCRS from pyproj.crs._cf1x8 import _try_list_if_string from pyproj.crs.coordinate_operation import ( LambertAzumuthalEqualAreaConversion, LambertCylindricalEqualAreaConversion, MercatorAConvers...
codeparrot/github-code-clean
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
codeparrot/github-code-clean
# sql/schema.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The schema module provides the building blocks for database metadata. Each element...
codeparrot/github-code-clean
""" This module provides all the functionality required to control a KCube Stepper Motor (KST101). """ import os from ctypes import c_short, c_int16, c_int, c_uint, c_int32, c_int64, c_double, byref, create_string_buffer from msl.equipment.resources import register from msl.equipment.resources.utils import WORD, DWORD...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt4 (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x01\x0b\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x19\x00...
codeparrot/github-code-clean
""" Classes and routines to represent coils and circuits License ------- Copyright 2016-2019 Ben Dudson, University of York. Email: benjamin.dudson@york.ac.uk This file is part of FreeGS. FreeGS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as pu...
codeparrot/github-code-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of transforming user-exposed VNC configuration model/schema to a representation needed by VNC Control Plane (BGP-based) """ import gevent # Import kazoo.client before monkey patching from cfgm_common.zkclient im...
codeparrot/github-code-clean
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2011-2013 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the abov...
codeparrot/github-code-clean
#!/usr/bin/python # Copyright (c) 2011-2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module that contains unittests for validation_pool module.""" from __future__ import print_function import collections imp...
codeparrot/github-code-clean
from sympy import ( Abs, And, Derivative, Dummy, Eq, Float, Function, Gt, I, Integral, LambertW, Lt, Matrix, Or, Piecewise, Poly, Q, Rational, S, Symbol, Wild, acos, asin, atan, atanh, cos, cosh, diff, erf, erfinv, erfc, erfcinv, erf2, erf2inv, exp, expand, im, log, pi, re, sec, sin, sinh, solve, so...
codeparrot/github-code-clean
from __future__ import unicode_literals from .. import Provider as PersonProvider class Provider(PersonProvider): formats_female = { '{{first_name_female}} {{last_name}}': 0.97, '{{prefix_female}} {{first_name_female}} {{last_name}}': 0.015, '{{first_name_female}} {{last_name}} {{suffix_fe...
codeparrot/github-code-clean
# encoding: utf-8 from beaker.cache import cache_region from collections import OrderedDict from email.mime.text import MIMEText from pypi.trashfinder.cli import process_package from pyramid.security import has_permission from yolk.pypi import CheeseShop from . import config from . import mkcfg as d2 from . import trov...
codeparrot/github-code-clean
""" Copyright 2014-2021 Vincent Texier <vit@free.fr> DuniterPy 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. DuniterPy is distributed in...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import datetime from django.core.cache import cache from django.contrib import admin from django.contrib.sites.models import Site from django.forms.models import model_to_dict from django.http import HttpRequest from django.test.html import HTMLParseError, Parser from django.test.utils import o...
codeparrot/github-code-clean
import datetime import re from datetime import date from decimal import Decimal from django import forms from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelFormSet, _get_foreign_key, inlineformset_factory, modelformset_factory, ) from...
codeparrot/github-code-clean
""" Interpolation inside triangular grids. """ from __future__ import print_function from matplotlib.tri import Triangulation from matplotlib.tri.trifinder import TriFinder from matplotlib.tri.tritools import TriAnalyzer import numpy as np import warnings __all__ = ('TriInterpolator', 'LinearTriInterpolator', 'CubicTr...
codeparrot/github-code-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """JSON Schemas for request/response pairs used with Viewfinder ops. All times are expressed in seconds (possibly subsecond floating-point precision) since the epoch (January 1st, 1970) in UTC. Every mutating request may be run synchronously by specifying 'synchr...
codeparrot/github-code-clean
""" File containing analyses for readout. This includes - readout discrimination analysis - single shot readout analysis - multiplexed readout analysis (to be updated!) Originally written by Adriaan, updated/rewritten by Rene May 2018 """ import itertools from copy import deepcopy from collections import O...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Utilities @requires: U{B{I{gluon}} <http://web2py.com>} @copyright: (c) 2010-2015 Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Softwa...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import sys import platform import warnings import fnmatch import itertools from numpy.testing.utils import _gen_alignment_data import numpy.core.umath as ncu from numpy.core import umath_tests as ncu_tests import numpy as np from numpy.testing import ( ...
codeparrot/github-code-clean
#!/usr/bin/python from h264 import * import unittest def binData( s ): "convert 0/1/<space> string into byte buffer string" ret = "" mask = 1<<7 val = 0 for c in s: if c == ' ': continue if c == '1': val += mask mask /= 2 if mask == 0: ret += chr(val) val = 0 mas...
codeparrot/github-code-clean
### ############################################################################################################ ### # ### # Project: # MovieFork.com - by The Highway 2013. ### # Author: # The Highway ### # Version: # v0.2.7 ### # Description: # http://www.moviefork.com ### # ### ########################...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- #from numpy import * import numpy as np import scipy.linalg import scipy.interpolate import copy as copyModule # avoids conflict with copy function from numpy from numpy.linalg import cholesky, det, inv, eigh import pyhrf from pyhrf import xmlio from pyhrf.xmlio.xmlnum...
codeparrot/github-code-clean
from __future__ import absolute_import, print_function, division import sys from textwrap import dedent import warnings import logging import numpy from six import integer_types from six.moves import xrange import theano from theano.compat import izip from theano.gradient import DisconnectedType from theano import go...
codeparrot/github-code-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012-2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
codeparrot/github-code-clean
# encoding=UTF8 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 m...
codeparrot/github-code-clean
import itertools import time import vlcp.service.sdn.ioprocessing as iop from vlcp.config import defaultconfig from vlcp.event import Event from vlcp.event import RoutineContainer from vlcp.event import withIndices from vlcp.protocol.openflow import OpenflowAsyncMessageEvent from vlcp.protocol.openflow import Openfl...
codeparrot/github-code-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
codeparrot/github-code-clean
from bika.lims.exportimport.dataimport import SetupDataSetList as SDL from bika.lims.idserver import renameAfterCreation from bika.lims.interfaces import ISetupDataSetList from Products.CMFPlone.utils import safe_unicode, _createObjectByType from bika.lims.utils import tmpID, to_unicode from bika.lims.utils import to_u...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' Control Linux Containers via Salt :depends: lxc package for distribution lxc >= 1.0 (even beta alpha) is required ''' # Import python libs from __future__ import absolute_import, print_function import datetime import copy import textwrap import difflib import logging import tempfile impo...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: latin-1 -*- """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydo...
codeparrot/github-code-clean
#!/usr/bin/env python # # Generated Mon May 2 14:23:33 2011 by parse_xsd.py version 0.4. # import saml2 from saml2 import SamlBase import xmldsig as ds import xmlenc as xenc from saml2 import saml NAMESPACE = 'urn:oasis:names:tc:SAML:2.0:metadata' class EntityIDType_(SamlBase): """The urn:oasis:names:tc:SAML...
codeparrot/github-code-clean
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "surface" _path_str = "surface.colorbar" _valid_props = { "bgcolor", "borde...
codeparrot/github-code-clean
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
codeparrot/github-code-clean
# Copyright (c) 2015 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # # Cont...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
codeparrot/github-code-clean
# -*- 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...
codeparrot/github-code-clean
""" Tests for Shopping Cart views """ import json from collections import OrderedDict from datetime import datetime, timedelta from decimal import Decimal from urlparse import urlparse import ddt import pytz from django.conf import settings from django.contrib.admin.sites import AdminSite from django.contrib.auth.mode...
codeparrot/github-code-clean
# Copyright 2015 Red Hat, Inc. # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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/L...
codeparrot/github-code-clean
# 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...
codeparrot/github-code-clean
## Copyright (c) 2001-2012, Scott D. Peckham ## October 2012 (CSDMS Standard Names with BMI) ## January 2009 (converted from IDL) ## May, July, August, October 2009 ## May 2010 (changes to initialize() and read_cfg_file() ## NB! TF expects d8.codes vs. d8.flow_grid ###############################################...
codeparrot/github-code-clean
"""The tests for the MQTT light platform. Configuration for RGB Version with brightness: light: platform: mqtt name: "Office Light RGB" state_topic: "office/rgb1/light/status" command_topic: "office/rgb1/light/switch" brightness_state_topic: "office/rgb1/brightness/status" brightness_command_topic: "offic...
codeparrot/github-code-clean
""" GUI neutral widgets =================== Widgets that are designed to work for any of the GUI backends. All of these widgets require you to predefine a :class:`matplotlib.axes.Axes` instance and pass that as the first arg. matplotlib doesn't try to be too smart with respect to layout -- you will have to figure out...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Application Template for Rhineland-Palatinate (RLP) Crisis Management - used to manage COVID-19 test stations @license MIT """ from collections import OrderedDict from gluon import current, URL, A, DIV, TAG, \ IS_EMPTY_OR, IS_IN_SET, IS_INT_IN_RANGE, IS_NOT_...
codeparrot/github-code-clean
""" records.qti.basic """ from __future__ import unicode_literals import json import os import re from bs4 import BeautifulSoup, Tag from dlkit.json_ import types from dlkit.json_.osid import record_templates as osid_records from dlkit.json_.osid.metadata import Metadata from dlkit.json_.id.objects import IdList fr...
codeparrot/github-code-clean
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2021 Keeper Security Inc. # Contact: ops@keepersecurity.com # import argparse import ipaddress import itertools import json import base64 import string import logging...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Keysight_B2900.py driver for Keysight B2900 series source measure unit # Micha Wildermuth, micha.wildermuth@kit.edu 2019 # # 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 Foundati...
codeparrot/github-code-clean
##################################################### # Permanent Timeshift Plugin for Enigma2 Dreamboxes # Coded by Homey (c) 2011 # # Version: 1.3h(modifed for openPLi Dima73) # Support: www.dreambox-plugins.de ##################################################### from Components.ActionMap import ActionMap, HelpableA...
codeparrot/github-code-clean
# Copyright 2005 Duke University # Copyright (C) 2012-2016 Red Hat, Inc. # # 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 versio...
codeparrot/github-code-clean
""" Class for the LCG File Catalog Client """ from __future__ import print_function from __future__ import absolute_import from __future__ import division __RCSID__ = "$Id" from past.builtins import long import six from stat import * import os import re import time import DIRAC from DIRAC import S_OK, S_ERROR, gLog...
codeparrot/github-code-clean