text
stringlengths
5.09k
178k
domain
stringclasses
106 values
#!/usr/bin/env python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> # Copyright (C) 2014 Ian Lee <ianlee1521@gmail.com> # # Permission is hereby granted, free of c...
codeparrot/github-code-clean
import csv import datetime import json import mock import os import re import shutil import tempfile import urllib from cStringIO import StringIO from nose.tools import eq_, ok_ from nose.plugins.skip import SkipTest from django.test import TestCase from django.test.client import RequestFactory from django.test.utils ...
codeparrot/github-code-clean
############################################################################ # # Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). # Contact: http://www.qt-project.org/legal # # This file is part of Qt Creator. # # Commercial License Usage # Licensees holding valid commercial Qt licenses may use this file in # ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' This module contains all of the routines needed to set up a master server, this involves preparing the three listeners and the workers needed by the master. ''' # Import python libs from __future__ import absolute_import import copy import os import re import sys import time import errno im...
codeparrot/github-code-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # Opserver # # Operational State Server for VNC # from gevent import monkey monkey.patch_all() import sys import json import socket import time import copy import traceback import signal import logging logging.getLogger('kafka').addHandler(logging...
codeparrot/github-code-clean
from __future__ import annotations import asyncio import bisect import builtins import errno import heapq import logging import os import random import sys import threading import warnings import weakref from collections import defaultdict, deque from collections.abc import ( Callable, Collection, Containe...
codeparrot/github-code-clean
""" Test functions for stats module WRITTEN BY LOUIS LUANGKESORN <lluang@yahoo.com> FOR THE STATS MODULE BASED ON WILKINSON'S STATISTICS QUIZ http://www.stanford.edu/~clint/bench/wilk.txt Additional tests by a host of SciPy developers. """ from __future__ import division, print_function, absolute_impo...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import pytest from datetime import datetime, timedelta from collections import defaultdict import pandas.util.testing as tm from pandas.core.dtypes.common import is_unsigned_integer_dtype from pandas.core.indexes.api import Index, MultiIndex from pandas.tests.indexes.common import Base from...
codeparrot/github-code-clean
""" Pythonic wrapper for libusb-1.0. The first thing you must do is to get an "USB context". To do so, create an USBContext instance. Then, you can use it to browse available USB devices and open the one you want to talk to. At this point, you should have a USBDeviceHandle instance (as returned by USBContext or USBDev...
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 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
# -*- coding: utf-8 -*- """ ########## # Fields # ########## Each Field class does some sort of validation. Each Field has a clean() method, which either raises django.forms.ValidationError or returns the "clean" data -- usually a Unicode object, but, in some rare cases, a list. Each Field's __init__() takes at least...
codeparrot/github-code-clean
# # Author: Joris Vankerschaver 2013 # from __future__ import division, print_function, absolute_import import numpy as np import scipy.linalg from scipy.misc import doccer from scipy.special import gammaln, psi, multigammaln from scipy._lib._util import check_random_state __all__ = ['multivariate_normal', ...
codeparrot/github-code-clean
#!/usr/bin/env python """Functions for calculating nucleotide coordinates""" # Copyright 2010, 2011, 2012 Kevin Keating # # Licensed under the Educational Community 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 # # h...
codeparrot/github-code-clean
import os import re import sys import imp import copy import glob import atexit import tempfile import subprocess import shutil from distutils.errors import DistutilsError try: set except NameError: from sets import Set as set from numpy.distutils.compat import get_exception __all__ = ['Configuration', 'get...
codeparrot/github-code-clean
########################################################################## # # Copyright (c) 2008-2011, 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: # # * Redis...
codeparrot/github-code-clean
"""HTML form handling for web clients. ClientForm is a Python module for handling HTML forms on the client side, useful for parsing HTML forms, filling them in and returning the completed forms to the server. It has developed from a port of Gisle Aas' Perl module HTML::Form, from the libwww-perl library, but the inte...
codeparrot/github-code-clean
from random import randint ''' This is an easy copy/paste for creating dicts: Table = { '': , '': , '': , '': , '': , '': , '': , '': } ''' def random_choice(chances_dict): chances = chances_dict.values() strings = list(chances_dict.keys()) return strings[random_choice_index(chances)...
codeparrot/github-code-clean
## # Copyright 2012-2020 Ghent University # # This file is part of EasyBuild, # 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), # Flemish Research Foundation (F...
codeparrot/github-code-clean
import textwrap from skoolkittest import SkoolKitTestCase from skoolkit.ctlparser import CtlParser CTL = """; Test control file for parse_ctl @ 30000 start b $7530 Data at 30000 N 30000 Block start comment T 30002,10 Message in the data block N 30012 Mid-block comment M 30012,15 This comment covers the following two...
codeparrot/github-code-clean
# the following line needed for unicode character in convert_anglestring # -*- coding: latin-1 -*- import ast import constants as c import copy import datetime import dateutil import logging import math import meteorologicalfunctions as mf import netCDF4 import numpy import os import platform import pytz import sys imp...
codeparrot/github-code-clean
# (C) British Crown Copyright 2011 - 2019, Met Office # # This file is part of cartopy. # # cartopy 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 3 of the License, or # (at your option)...
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 applica...
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
""" test to_datetime """ import calendar from collections import deque from datetime import ( datetime, timedelta, ) from decimal import Decimal import locale from dateutil.parser import parse from dateutil.tz.tz import tzoffset import numpy as np import pytest import pytz from pandas._libs import tslib from...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2018, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> from ..x3 import XArm, Studio class XArmAPI(object): def __init__(self, port=None, is_radian=False, do_not...
codeparrot/github-code-clean
#!/usr/bin/env python """ Mappings from Adobe glyph names to Unicode characters. In some CMap tables, Adobe glyph names are used for specifying Unicode characters instead of using decimal/hex character code. The following data was taken by $ wget https://partners.adobe.com/public/developer/en/opentype/glyphlist.t...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import difflib import re import string import subprocess import sys import tempfile knownpropsets = { "PSETID_PostRss" : "{00062041-0000-0000-C000-000000000046}", "PSETID_Sharing" : "{00062040-0000-0000-C000-000000000046}", "PS_...
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
#!/usr/bin/env python # # revert_tests.py: testing 'svn revert'. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or mo...
codeparrot/github-code-clean
# Copyright (c) 2010 Citrix Systems, 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 applicab...
codeparrot/github-code-clean
#!/usr/bin/python #====================================================================# # Script to get the eigenvalues from an abinit _EIG.nc netcdf file # #====================================================================# ######### #IMPORTS# ######### import numpy as N import matplotlib.pyplot as P import ne...
codeparrot/github-code-clean
# IMPORTANT: the same tests are run from "test_xml_etree_c" in order # to ensure consistency between the C implementation and the Python # implementation. # # For this purpose, the module-level "ET" symbol is temporarily # monkey-patched when running the "test_xml_etree_c" test suite. import html import io import oper...
codeparrot/github-code-clean
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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
# -*- 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
from test.support import verbose, run_unittest, gc_collect, bigmemtest, _2G, \ cpython_only, captured_stdout import io import re from re import Scanner import sre_compile import sre_constants import sys import string import traceback import unittest from weakref import proxy # Misc tests from Tim Peters' re.do...
codeparrot/github-code-clean
#!/usr/bin/env python3 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # A database of locale data for all the languages known to glibc # To regene...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the me...
codeparrot/github-code-clean
from itertools import product import pytest from hatch.plugin.manager import PluginManager from hatch.project.config import ProjectConfig from hatch.project.env import RESERVED_OPTIONS from hatch.utils.structures import EnvVars from hatch.version.scheme.standard import StandardScheme from hatchling.version.source.reg...
codeparrot/github-code-clean
import json import datetime import traceback import re from base64 import b64encode from ast import literal_eval from flask import Blueprint, render_template, render_template_string, make_response, url_for, current_app, request, redirect, jsonify, abort, flash, session from flask_login import login_required, current_us...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 Softwar...
codeparrot/github-code-clean
#! /usr/bin/env python ############################################################################# ## ## ## inet6.py --- IPv6 support for Scapy ## ## see http://natisbad.org/IPv6/ ...
codeparrot/github-code-clean
#!/usr/bin/env python """ Features front-end import/export functions for kMC Projects. Currently import and export is supported to XML and export is supported to Fortran 90 source code. """ # Copyright 2009-2013 Max J. Hoffmann (mjhoffmann@gmail.com) # This file is part of kmos. # # kmos is free software: you ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'User_interface.ui' # # Created: Tue May 16 10:33:40 2017 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except...
codeparrot/github-code-clean
# -*- Mode: Python -*- # coding=utf-8 # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2018 Red Hat, Inc. # Copyright (C) 2018 Iñigo Martínez <inigomartinez@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as publishe...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PySide2 (Qt v5.9.3) # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore qt_resource_data = b"\ \x00\x00\x07\xa0\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x2...
codeparrot/github-code-clean
#!/usr/bin/python #-*- coding: utf-8 -*- """ .. currentmodule:: pylayers.measures.mesuwb RAW_DATA Class ============== .. autosummary:: :toctree: generated/ RAW_DATA.__init__ CAL_DATA Class ============== .. autosummary:: :toctree: generated/ CAL_DATA.__init__ CAL_DATA.plot CAL_DATA.getw...
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 u...
codeparrot/github-code-clean
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 c...
codeparrot/github-code-clean
# $ANTLR 3.1 ./Java.g 2013-07-16 16:21:24 import sys from antlr3 import * from antlr3.compat import set, frozenset # for convenience in actions HIDDEN = BaseRecognizer.HIDDEN # token types T__159=159 T__158=158 T__160=160 LEFT_SHIFT_ASSIGN=65 T__167=167 T__168=168 EOF=-1 T__165=165 T__166=166 T__163=163 T__164=164 ...
codeparrot/github-code-clean
# coding=utf-8 from decimal import Decimal from .. import BaseProvider localized = True class Provider(BaseProvider): """ land_coords data extracted from geonames.org, under the Creative Commons Attribution 3.0 License. Coordinates are in decimal format for mapping purposes. Country code is in Alpha...
codeparrot/github-code-clean
from __future__ import unicode_literals 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 (_get_foreign_key, inlineformset_factory, modelforms...
codeparrot/github-code-clean
from django.test import TestCase, RequestFactory from unittest import skip from django.core.urlresolvers import reverse from django.contrib.auth.models import User, Permission from django.contrib.sessions.middleware import SessionMiddleware from collections import OrderedDict from urllib import urlencode from django.ut...
codeparrot/github-code-clean
import sys import numpy as np import pandas as pd from pvlib import iam, modelchain, pvsystem, temperature, inverter from pvlib.modelchain import ModelChain from pvlib.pvsystem import PVSystem from pvlib.tracking import SingleAxisTracker from pvlib.location import Location from pvlib._deprecation import pvlibDeprecat...
codeparrot/github-code-clean
#!/usr/bin/env python # coding: utf-8 # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # import sys import unittest2 as unittest import tempfile, os, shutil from gppylib.commands.base import CommandResult, Command, ExecutionError from gppylib.operations.backup_utils import * from gppylib.operations.restore ...
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
#!/usr/bin/env python # scapy.contrib.description = PPI # scapy.contrib.status = loads """ 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 you...
codeparrot/github-code-clean
"""Mongodb implementations of assessment objects.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowe...
codeparrot/github-code-clean
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 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 # # ...
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\xd9\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x17\x00...
codeparrot/github-code-clean
# # Copyright 2009-2011 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 version. # # This program is distributed ...
codeparrot/github-code-clean
from django.forms import models, DateTimeField __author__ = 'chelox' #from django.db import models from django.contrib.auth.models import User, Group, Permission from usuarios.models import Usuario from proyectos.models import Proyecto from sprint.models import Estado from clientes.models import Cliente from sprint.m...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011-2017 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (C) 2016-2018 Mathew Topper # # 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging # from numpy import round from numpy import zeros from . import LoadReductions from .Input.Animals.TotAEU import TotAEU_f from .Input.Animals.TotLAEU import TotLAEU fro...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
codeparrot/github-code-clean
"""Defines the unit tests for the :mod:`colour.characterisation.aces_it` module.""" from __future__ import annotations import numpy as np import os import unittest from colour.characterisation import ( MSDS_ACES_RICD, MSDS_CAMERA_SENSITIVITIES, SDS_COLOURCHECKERS, sd_to_aces_relative_exposure_values,...
codeparrot/github-code-clean
import unittest import sys import py65.assembler import py65.devices.mpu6502 class Common6502Tests: """Tests common to 6502-based microprocessors""" # Reset def test_reset_sets_registers_to_initial_states(self): mpu = self._make_mpu() mpu.reset() self.assertEqual(0xFF, mpu.sp) ...
codeparrot/github-code-clean
import contextlib import warnings import weakref import xml.etree.ElementTree from itertools import product from operator import add import numpy as np import pandas as pd import pytest from pandas.io.formats import format as pandas_format import dask import dask.array as da import dask.dataframe as dd import dask.da...
codeparrot/github-code-clean
""" :mod: DataManager .. module: DataManager :synopsis: DataManager links the functionalities of StorageElement and FileCatalog. This module consists of DataManager and related classes. """ # # RSCID __RCSID__ = "$Id$" # # imports from datetime import datetime, timedelta import fnmatch import os import time from ...
codeparrot/github-code-clean
# Blender rock creation tool # # Based on BlenderGuru's asteroid tutorial and personal experimentation. # Tutorial: http://www.blenderguru.com/how-to-make-a-realistic-asteroid/ # Update with another tutorial shared by "rusted" of BlenderArtists: # Tutorial: http://saschahenrichs.blogspot.com/2010/03/3dsmax-environm...
codeparrot/github-code-clean
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
codeparrot/github-code-clean
import sys import os import time import string import __builtin__ from panda3d.core import * from direct.showbase.MessengerGlobal import * from direct.showbase.DirectObject import DirectObject from direct.showbase.EventManagerGlobal import * from direct.task.MiniTask import MiniTask, MiniTaskManager from direct.directn...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
codeparrot/github-code-clean
import argparse import logging import math import random import re import string import warnings from abc import ABC, abstractmethod from enum import Enum from functools import lru_cache, reduce from itertools import groupby, product from pathlib import Path from typing import Any, Callable, Dict, FrozenSet, Iterable, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Master Dictionary Translations 0: English 1: Chinese 2: Dutch 3: French 4: Italian 5: Japanese 6: Korean 7: Portuguese 8: Russian 9: Spanish """ class MD_F: # Master Dictionary Functions def get_languages_list(): languages = [] languages.append("English") ...
codeparrot/github-code-clean
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Scatter(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "scatter" _valid_props = { "cliponaxis", "connectgaps", "customdata", "c...
codeparrot/github-code-clean
#!/usr/bin/env python # ============================================================================= # MODULE DOCSTRING # ============================================================================= """ Classes that represent a portion of the state of an OpenMM context. """ # ====================================...
codeparrot/github-code-clean
import six import pytest from unittest.mock import Mock from crabpy.gateway.exception import ( GatewayRuntimeException, GatewayResourceNotFoundException ) from crabpy.gateway.crab import ( Gewest, Provincie, Gemeente, Deelgemeente, Taal, Bewerking, Organisatie, Aardsubadres, Aardadres, Aar...
codeparrot/github-code-clean
""" Utility classes and functions to handle Virtual Machine creation using qemu. :copyright: 2008-2009, 2014 Red Hat Inc. """ import time import os import logging import fcntl import re import commands import aexpect from avocado.core import exceptions from avocado.utils import process from avocado.utils import cryp...
codeparrot/github-code-clean
# Copyright (c) 1999-2002 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright 2013 National Renewable Energy Laboratory, Golden CO, USA # This file is part of NREL MatDB. # # NREL MatDB 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...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
codeparrot/github-code-clean
# Ariane ProcOS plugin # Gears # # Copyright (C) 2015 echinopsii # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version...
codeparrot/github-code-clean
# Copyright (c) 2012 NetApp, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
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 u...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import AppKit from math import radians import os from drawBot.misc import DrawBotError, optimizePath from fontTools.misc.py23 import basestring from drawBot.context.imageContext import _makeBitmapImageRep class ImageObject(object): """ An ima...
codeparrot/github-code-clean
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
codeparrot/github-code-clean
# -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This file is part of the LibreOffice project. # # 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/. # fr...
codeparrot/github-code-clean
""" Test Scipy functions versus mpmath, if available. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_, assert_allclose from numpy import pi import pytest import itertools from distutils.version import LooseVersion import scipy.special as sc f...
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
#!/usr/bin/env python # txt2tags - generic text conversion tool # http://txt2tags.sf.net # # Copyright 2001, 2002, 2003, 2004 Aurelio Marinho Jargas # # 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 F...
codeparrot/github-code-clean
import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import asc from sqlalchemy import desc from sqlalchemy import exc as sa_exc from sqlalchemy import exists from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Integer from sqlalchemy import literal_column from sqlalchemy...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Editor Plugin""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 from spyderlib.qt.QtGui import (QVB...
codeparrot/github-code-clean
""" pySSN is available under the GNU licence providing you cite the developpers names: Ch. Morisset (Instituto de Astronomia, Universidad Nacional Autonoma de Mexico) D. Pequignot (Meudon Observatory, France) """ import time import os import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets ...
codeparrot/github-code-clean
# coding: utf-8 # pylint: disable=W0201,R0915,R0912 """ Main BDF class. Defines: - BDF see https://docs.plm.automation.siemens.com/tdoc/nxnastran/10/help/#uid:index """ from __future__ import (nested_scopes, generators, division, absolute_import, print_function, unicode_literals) import os i...
codeparrot/github-code-clean
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
codeparrot/github-code-clean
#!/usr/bin/env python3 # -*- python -*- #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # 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...
codeparrot/github-code-clean