text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# Author: Travis Oliphant, 2002 # # Further enhancements and tests added by numerous SciPy developers. # from __future__ import division, print_function, absolute_import import warnings import numpy as np from common_tests import check_named_results from numpy.random import RandomState from numpy.testing import (Tes...
codeparrot/github-code-clean
### ############################################################################################################ ### # ### # Project: # KissManga.com - by The Highway 2013. ### # Author: # The Highway ### # Version: # v0.3.5 ### # Description: # http://www.KissManga.com ### # ### ########################...
codeparrot/github-code-clean
#!/usr/bin/env python ''' Fly ArduPlane in SITL AP_FLAKE8_CLEAN ''' from __future__ import print_function import math import os import signal import sys import time from pymavlink import quaternion from pymavlink import mavextra from pymavlink import mavutil from common import AutoTest from common import AutoTestT...
codeparrot/github-code-clean
""" Ported using Python-Future from the Python 3.3 standard library. An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the...
codeparrot/github-code-clean
#!/usr/bin/env python3 # xas99: A TMS9900 cross-assembler # # Copyright (c) 2015-2022 Ralph Benzinger <r@0x01.de> # # This program is part of the TI 99 Cross-Development Tools (xdt99). # # xdt99 is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder 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 Licens...
codeparrot/github-code-clean
# -*- 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): # Changing field 'SourceDataPoint.error_msg' db.alter_column(u'source_da...
codeparrot/github-code-clean
# Generated from tsql.g4 by ANTLR 4.5.2 from antlr4 import * from io import StringIO def serializedATN(): with StringIO() as buf: buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2\u01bb") buf.write("\u12f7\b\1\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7") buf.write("\t\7\4\b\...
codeparrot/github-code-clean
# -*- test-case-name: txdav.caldav.datastore.test.test_sql,txdav.carddav.datastore.test.test_sql -*- ## # Copyright (c) 2010-2017 Apple 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...
codeparrot/github-code-clean
""" @package mi.instrument.seabird.sbe16plus_v2.ctdpf_jb.test.test_driver @file marine-integrations/mi/instrument/seabird/sbe16plus_v2/ctdpf_jb/driver.py @author Tapana Gupta @brief Test cases for ctdpf_jb driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test...
codeparrot/github-code-clean
#!/usr/bin/env python # encoding: utf-8 import os import re import logging from time import sleep from collections import OrderedDict, defaultdict instance = os.environ.get('instance') or '' logger = logging.getLogger('otto' + instance + '.appliances') logger.addHandler(logging.NullHandler()) from otto.connections.c...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import sys import platform import warnings from numpy.testing import * from numpy.testing.utils import _gen_alignment_data import numpy.core.umath as ncu import numpy as np def on_powerpc(): """ True if we are running on a Power PC platform.""" ...
codeparrot/github-code-clean
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License" import os...
codeparrot/github-code-clean
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
codeparrot/github-code-clean
""" mbed SDK Copyright (c) 2011-2014 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 wr...
codeparrot/github-code-clean
# Copyright (C) 2012-2013 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 # # Unless required by applicable la...
codeparrot/github-code-clean
from __future__ import unicode_literals from operator import attrgetter import warnings from django.apps import apps from django.core import checks from django.core.exceptions import FieldDoesNotExist from django.db import connection, connections, router, transaction from django.db.backends import utils from django.d...
codeparrot/github-code-clean
"""Test the validation module""" import os import re import sys import tempfile import warnings from functools import partial from time import sleep import pytest import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.exceptions import FitFailedWarning from sklearn.model_selection.tests.test_...
codeparrot/github-code-clean
""" This modules contains objects that make it simple for the user to create python scripts that build Condor DAGs to run code on the LSC Data Grid. This file is part of the Grid LSC User Environment (GLUE) GLUE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
codeparrot/github-code-clean
""" Test functions for stats module """ from __future__ import division, print_function, absolute_import import warnings import re import sys from numpy.testing import (TestCase, run_module_suite, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_allclose, assert_, asse...
codeparrot/github-code-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Common codegen classes. import operator import re import string import textwrap import functools from WebIDL import ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to check recently uploaded files. This script checks if a file description is present and if there are other problems in the image's description. This script will have to be configured for each language. Please submit translations as addition to the Pywikibot frame...
codeparrot/github-code-clean
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
codeparrot/github-code-clean
#!/usr/bin/env python # pyinotify.py - python interface to inotify # Copyright (c) 2005-2015 Sebastien Martini <seb@dbzteam.org> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without res...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ (c) 2015 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from __future__ import unicode_literals, absolute_import import datetime import unittest import shutil import sys import os import json from mock import patch, MagicMock sys.path.insert(0, os.p...
codeparrot/github-code-clean
#!/usr/bin/python3 '''! @file rm-inventory.py @package rm-inventory.py @brief This is a little tool for creating and keeping track of character's inventory This tool handles @li buying/finding/selling/dropping items @li enchanting items @li design special items @li equipp items/pack items into containers and calculate...
codeparrot/github-code-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # 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 License,...
codeparrot/github-code-clean
'''Vowel evolution program. Run with Vowel, Prototype, Game_fns, Agent, Word Also import time, random and graphics modules Last update July 2017 HJMS''' import Vowel, Prototype, time, random, Word, re, Agent, Segment from graphics import * class Convention: ''' A convention is a set of prototypical ...
codeparrot/github-code-clean
""" The MIT License (MIT) Copyright (c) 2017 Dino Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,...
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
"""Implemented support for Common Workflow Language (CWL) for Toil.""" # Copyright (C) 2015 Curoverse, Inc # Copyright (C) 2015-2021 Regents of the University of California # Copyright (C) 2019-2020 Seven Bridges # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 (t...
codeparrot/github-code-clean
""" Classes which provide the shared base for GitFS, git_pillar, and winrepo """ import contextlib import copy import errno import fnmatch import glob import hashlib import io import logging import os import shlex import shutil import stat import subprocess import time import weakref from datetime import datetime im...
codeparrot/github-code-clean
#!/usr/local/bin/python # -*- coding: latin-1 -*- """ OleFileIO_PL: Module to read Microsoft OLE2 files (also called Structured Storage or Microsoft Compound Document File Format), such as Microsoft Office documents, Image Composer and FlashPix files, Outlook messages, ... version 0.22 2012-02-16 Philippe ...
codeparrot/github-code-clean
# orm/query.py # Copyright (C) 2005-2016 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 Query class and support. Defines the :class:`.Query` class, the central constru...
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
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides a variety of device interactions based on adb. Eventually, this will be based on adb_wrapper. """ # pylint: disable=unused-argument import coll...
codeparrot/github-code-clean
# -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*- # # $Id$ # # Tix.py -- Tix widget wrappers. # # For Tix, see http://tix.sourceforge.net # # - Sudhir Shenoy (sshenoy@gol.com), Dec. 1995. # based on an idea of Jean-Marc Lugrin (lugrin@ms.com) # # NOTE: In order to minimi...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@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 Lice...
codeparrot/github-code-clean
# 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...
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
# # # lmpsdata.py # # For reading, writing and manipulating lammps data files # For calculation of certain properities using lammps data files # For creating VMD input text files using lammps data files # All x,y,z calculations assume the information includes image flags class Lmpsdata: def __init__(self,...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { "'Cancel' will indicate an asset log entry did not occur": "'Abbrechen' wird angeben, dass ein Asset Log Eintrag nicht eingetreten ist", "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2007 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 o...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Optical elements ---------------- Module :mod:`~xrt.backends.raycing.oes` defines a generic optical element in class :class:`OE`. Its methods serve mainly for propagating the beam downstream the beamline. This is done in the following sequence: for each ray transform the beam from global to...
codeparrot/github-code-clean
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2006-2016 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012-2014 Google, Inc. # Copyright (c) 2013-2018 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Brett Cannon <brett@python.org> # Copyri...
codeparrot/github-code-clean
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
codeparrot/github-code-clean
# orm/query.py # Copyright (C) 2005-2019 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 Query class and support. Defines the :class:`.Query` class, the central constru...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2018-2018 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from django.db import IntegrityError from django.db.models import Q, Max from django.conf import settings from django.http import HttpResponse from django.test import TestCase, override_settings from django.utils.timezone import now as timezone_now from django.utils.timezone import utc as timezo...
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
# Copyright 2012-2017 The Meson development team # 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...
codeparrot/github-code-clean
"""The abstract values used by typegraphvm. An abstract value in effect represents a type. Groups of types are combined using typegraph and that is what we compute over. """ # Because of false positives: # pylint: disable=unpacking-non-sequence # pylint: disable=abstract-method import collections import hashlib impo...
codeparrot/github-code-clean
# Lint as: python3 # 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 ...
codeparrot/github-code-clean
# Copyright 2013 IBM Corp. # Copyright 2012 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/LIC...
codeparrot/github-code-clean
import random import math import unittest import pyrtl import pyrtl.rtllib.matrix as Matrix class MatrixTestBase(unittest.TestCase): def check_against_expected(self, result, expected_output, floored=False): """ :param Matrix result: matrix that is the result of some operation we're testing ...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function try: # Accessing collections abstract classes from collections # has been deprecated since Python 3.3 import collections.abc as collections_abc except ImportError: import collections as collections_abc import functools import itertools im...
codeparrot/github-code-clean
# pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl <johann@rocholl.net> # # 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 restr...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # update_backscatter.py, Angeline G. Burrell (AGB), UoL # # Comments: Update the beam's groundscatter flag, calculate the virtual height # and propagation path, determine the origin fie...
codeparrot/github-code-clean
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from copy import deepcopy from datetime import timedelta from openprocurement.api.utils import get_now from openprocurement.tender.belowthreshold.tests.base import test_organization # TenderStage2EU(UA)LotResourceTest def create_tender_lot_invalid(self): """ Try create invalid lot """ ...
codeparrot/github-code-clean
# Copyright 2014 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 # # Unless required by applicable law or agreed to in writing, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # (C) British Crown Copyright 2013-2018 Met Office. # # This program 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 Sof...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Test for lms courseware app, module render unit """ import ddt import itertools import json from nose.plugins.attrib import attr from functools import partial from bson import ObjectId from django.http import Http404, HttpResponse from django.core.urlresolvers import reverse from django.con...
codeparrot/github-code-clean
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2013 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/license...
codeparrot/github-code-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta import relativedelta from openerp imp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ S3 RESTful CRUD Methods @see: U{B{I{S3XRC}} <http://eden.sahanafoundation.org/wiki/S3XRC>} @requires: U{B{I{gluon}} <http://web2py.com>} @requires: U{B{I{lxml}} <http://codespeak.net/lxml>} @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT Permis...
codeparrot/github-code-clean
"""Library to perform pre/post test setup for virt test.""" from __future__ import division import os import logging import time import re import random import math import shutil import platform import netaddr import six import resource from abc import ABCMeta from abc import abstractmethod from avocado.utils import ...
codeparrot/github-code-clean
import base64 import DbQuery import SystemSettings from decimal import Decimal from LevelUp import LevelUpWizard from ManageDefs import Manage from GuiDefs import * class Characters( Manage ): def __init__( self ): empty_widget = Widget( '', 'Empty' ) hr = Widget( 'hr', 'hr', col_span=4 ) ...
codeparrot/github-code-clean
from time import localtime, mktime from datetime import datetime import xml.etree.cElementTree from os import path from enigma import eDVBSatelliteEquipmentControl as secClass, \ eDVBSatelliteLNBParameters as lnbParam, \ eDVBSatelliteDiseqcParameters as diseqcParam, \ eDVBSatelliteSwitchParameters as switchParam, \...
codeparrot/github-code-clean
__DESCRIPTION__=""" grasp_lib.py V 0.6 - 3 Feb 2012 - 23 Mar 2012 (0.4) - 2012 Nov 27 (0.5) - 2013 Dec 12 - M.Maris, M.Sandri, F.Villa From a set of routines created by M.Sandri e F.Villa This library allows to import a grasp file in GRASP format and to convert it in an healpix map, it also performs interpol...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- wikilist = ["http://www.wikidata.org/entity/Q56720867", \ "http://www.wikidata.org/entity/Q29582724", \ "http://www.wikidata.org/entity/Q29537053", \ "http://www.wikidata.org/entity/Q50088973", \ "http://www.wikidata.org/entity/Q51099572", \ "http://www.wikidata.org/entity/Q5...
codeparrot/github-code-clean
# Copyright (c) 2015-2019, 2021-2022 by Rocky Bernstein # # 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...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Optimized `Latent Dirichlet Allocation (LDA) <https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation>` in Python. For a faster im...
codeparrot/github-code-clean
from __future__ import with_statement import urlparse from django.core import exceptions, urlresolvers from django.test import client, utils from django.utils import simplejson as json import tastypie from tastypie import authorization as tastypie_authorization from tastypie_mongoengine import resources as tastypie...
codeparrot/github-code-clean
import constants as const import json import netaddr import os import socket import string import subprocess32 as subprocess import yaml from bridge import Bridge from membership_rule import MembershipRule from node import Node from rest import RestLib from util import safe_print class Helper(object): @staticmet...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 OpenStack, 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 obtai...
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
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import io import sys import os import re import itertools import warnings import weakref from operator import itemgetter, index as opindex import numpy as np from . import format from ._datasource import DataSource from numpy.core.multiarray import pack...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Interface to Mediawiki's api.php.""" # # (C) Pywikibot team, 2007-2015 # # Distributed under the terms of the MIT license. # from __future__ import unicode_literals __version__ = '$Id$' from collections import Container, MutableMapping from email.mime.nonmultipart import MIMENonMultipart i...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Custom UI Widgets @requires: U{B{I{gluon}} <http://web2py.com>} @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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import re __author__ = 'f0x11' str_f = ''' kAewtloYgcFQaJNhHVGxXDiQmzjfcpYbzxlWrVcqsmUbCunkfxZWDZjUZMiGqhRRiUvGmYmvnJIHEmbT MUKLECKdCthezSYBpIElRnZugFAxDRtQPpyeCBgBfaRVvvguRXLvkAdLOeCKxsDUvBBCwdpMMWmuELeG ENihrpCLhujoBqPRDPvfzcwadMMMbkmkzCCzoTPfbRlzBqMblmxTxNniNoCufprWXxgHZpldkoLCrHJq vYuyJFCZ...
codeparrot/github-code-clean
""" Module for managing the installation of DIRAC components: MySQL, DB's, NoSQL DBs, Services, Agents, Executors and Consumers It only makes use of defaults in LocalInstallation Section in dirac.cfg The Following Options are used:: /DIRAC/Setup: Setup to be used for any operation /LocalInstallation/...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' The module used to execute states in salt. A state is unlike a module execution in that instead of just executing a command it ensure that a certain state is present on the system. The data sent to the state calls is as follows: { 'state': '<state module name>', 'fun': '<state fun...
codeparrot/github-code-clean
""" Data objects in group "Fans" """ from collections import OrderedDict import logging from pyidf.helper import DataObject logger = logging.getLogger("pyidf") logger.addHandler(logging.NullHandler()) class FanConstantVolume(DataObject): """ Corresponds to IDD object `Fan:ConstantVolume` Constant volu...
codeparrot/github-code-clean
# -*- 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 #...
codeparrot/github-code-clean
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2013 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 appl...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ ASSET is a statistical method :cite:`asset-Torre16_e1004939` for the detection of repeating sequences of synchronous spiking events in parallel spike trains. ASSET analysis class object of finding patterns ----------------------------------------------- .. autosummary:: :toctree: toct...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os.path import subprocess import unittest import PRESUBMIT from PRESUBMIT_test_mocks import MockFile, MockAffectedFile fro...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # Marijn van Vliet...
codeparrot/github-code-clean
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
codeparrot/github-code-clean
# As a test suite for the os module, this is woefully inadequate, but this # does add tests for a few functions which have been determined to be more # portable than they had been thought to be. import os import errno import unittest import warnings import sys import signal import subprocess import time import shutil ...
codeparrot/github-code-clean
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides a variety of device interactions based on adb. Eventually, this will be based on adb_wrapper. """ # pylint: disable=unused-argument import cale...
codeparrot/github-code-clean
#! /usr/bin/env python ############################################################################# ## ## ## inet6.py --- IPv6 support for Scapy ## ## see http://natisbad.org/IPv6/ ...
codeparrot/github-code-clean