text
stringlengths
5.09k
178k
domain
stringclasses
106 values
import logging import os import salt.modules.aixpkg as aixpkg import salt.modules.pkg_resource as pkg_resource from salt.exceptions import CommandExecutionError from tests.support.mock import MagicMock, patch try: import pytest except ImportError: pytest = None log = logging.getLogger(__name__) @pytest.fix...
codeparrot/github-code-clean
#!/usr/bin/env python # package name: Threads # creater: Wayne K Dawson # creation date: 170106 # last update: 170126 # This module is used primarily by "chreval.py". However, as with many # packages that are building up, the package has become complicated # enough, that the objects in this module are used by...
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
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## 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. ## ## ...
codeparrot/github-code-clean
""" Test functions for stats module """ import warnings import re import sys import pickle import os import json import platform from numpy.testing import (assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_allclose, assert_, a...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Organisation 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...
codeparrot/github-code-clean
# See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. # # This module is closely integrated with zerver/lib/event_schema.py # and zerver/lib/data_types.py systems for validating the schemas of # events; it also uses the OpenAPI tools to valid...
codeparrot/github-code-clean
""" Test split modulestore w/o using any django stuff. """ import datetime import unittest import uuid from importlib import import_module from path import path import re import random from xblock.fields import Scope from xmodule.course_module import CourseDescriptor from xmodule.modulestore import ModuleStoreEnum...
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. """Meta checkout manager supporting both Subversion and GIT.""" # Files # .gclient : Current client configuration, written b...
codeparrot/github-code-clean
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module implements representations of slabs and surfaces, as well as algorithms for generating them. If you use this module, please consider citing the following work:: R. Tran, Z. Xu, B. Radhakrishnan, D. Winston...
codeparrot/github-code-clean
# sql/schema.py # Copyright (C) 2005-2018 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
#!/usr/bin/env python # vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0: # -*- coding: UTF8 -*- # # A sword KJV indexed search module. # Copyright (C) 2012 Josiah Gordon <josiahg@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...
codeparrot/github-code-clean
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright(C) 2011,2012,2013 by Abe developers. # 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 ve...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Tests for account creation""" import json from datetime import datetime from unittest import skipIf, skipUnless import ddt import httpretty import mock import six from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user...
codeparrot/github-code-clean
# ./_dsig.py # -*- coding: utf-8 -*- # PyXB bindings for NM:f1c343a882e7a65fb879f4ee813309f8231f28c8 # Generated 2015-11-23 16:43:38.618395 by PyXB version 1.2.4 using Python 3.4.2.final.0 # Namespace http://www.w3.org/2000/09/xmldsig# [xmlns:dsig] from __future__ import unicode_literals import pyxb import pyxb.bindin...
codeparrot/github-code-clean
# (C) British Crown Copyright 2010 - 2018, Met Office # # This file is part of Iris. # # Iris 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) any l...
codeparrot/github-code-clean
# stdlib from random import sample # third party import numpy as np import pytest # syft absolute from syft.core.adp.entity import Entity from syft.core.adp.vm_private_scalar_manager import VirtualMachinePrivateScalarManager from syft.core.tensor.autodp.initial_gamma import IntermediateGammaTensor as IGT from syft.co...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyright (c) 2012 University Of Minho # (c) Copyright 2013 Hewlett-Pa...
codeparrot/github-code-clean
import datetime from django.utils import timezone from django.core.exceptions import ValidationError as DjangoValidationError from modularodm import Q from modularodm.exceptions import ValidationError as MODMValidationError import mock import pytest import pytz from framework.exceptions import PermissionsError from w...
codeparrot/github-code-clean
# # Bindings.py -- Bindings classes for Ginga FITS viewer. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. import math from ginga.misc import Bunch, Settings, Callback ...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 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....
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
#!/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. """code generator for GL/GLES extension wrangler.""" import optparse import os import collections import re import sys """In case...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import date, datetime import os import sys import traceback import unittest import warnings from django import template from django.conf import settings from django.contrib.auth.models import Group from django.core import urlresolvers from ...
codeparrot/github-code-clean
import copy import itertools import re import operator from datetime import datetime, timedelta, date from collections import defaultdict import numpy as np from pandas.core.base import PandasObject from pandas.core.dtypes.dtypes import ( ExtensionDtype, DatetimeTZDtype, CategoricalDtype) from pandas.core.dt...
codeparrot/github-code-clean
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
codeparrot/github-code-clean
#!/usr/bin/env python """Fortran 2003 Syntax Rules. """ #Author: Pearu Peterson <pearu@cens.ioc.ee> #Created: Oct 2006 import re import logging from splitline import string_replace_map import pattern_tools as pattern from readfortran import FortranReaderBase logger = logging.getLogger("fparser") ####################...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import copy import pickle import sys import platform import gc import copy import warnings import tempfile from os import path from io import BytesIO from itertools import chain import numpy as np from numpy.testing import ( run_module_suite, Te...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with URL parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
codeparrot/github-code-clean
import logging import re import urllib import dateutil.parser from django.conf import settings from django.contrib import auth from django.contrib.auth.models import User, SiteProfileNotAvailable from django.contrib.sites.models import Site from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from d...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Person Registry Model @copyright: 2009-2021 (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 Softwa...
codeparrot/github-code-clean
# Linear Regression from data reading from text file """ Created on Monday June 15 17:00:00 2015 @author: Ali Abbasi [aliabbasi.civileng@gmail.com] """ #from __future__ import print_function import pdb import os # operating system routines import scipy # Scientific Python functions from scipy import stats import pyl...
codeparrot/github-code-clean
""" aurora.py A WeeWX driver for Power One Aurora inverters. Copyright (C) 2016-2020 Gary Roderick gjroderick<at>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 ve...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
codeparrot/github-code-clean
# 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. # # This program is distributed in the hope that it will be usefu...
codeparrot/github-code-clean
# Copyright 2022 The Magenta Authors. # # 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 ...
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
# # 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...
codeparrot/github-code-clean
# Copyright (c) 2020 NTT DATA # # 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
from modularodm import Q from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import PermissionDenied, ValidationError, NotFound, MethodNotAllowed from rest_framework.status import HTTP_204_NO_CONTENT from rest_framework.response import Response from framework.auth.oauth_s...
codeparrot/github-code-clean
#!/usr/bin/python ''' Cloud project: - Software Defined Networking (SDN) -- project related algorithm (template) Tony Lin ''' #import re import numpy as np #from scipy.optimize import minimize #import scipy.io TEM_OUT = 'fmin_iteration_out.txt' ''' ['EM', 'res_ratio', 'D', 'Weight', 'I', 'H', 'Beta'...
codeparrot/github-code-clean
from .test_helper import SKDSPCommTest import numpy as np from numpy.random import randn from scipy import signal import numpy.testing as npt from sk_dsp_comm import sigsys as ss class TestSigsys(SKDSPCommTest): _multiprocess_can_split_ = True def test_cic_case_1(self): correct = np.ones(10) / 10 ...
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 may ...
codeparrot/github-code-clean
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser 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 Sof...
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, print_function import warnings import numpy as np from functools import partial from itertools import product from sklearn import datasets from sklearn import svm from sklearn.preprocessing import LabelBinarizer from sklearn.datasets import make_multilabel_classification from sklear...
codeparrot/github-code-clean
#!/usr/bin/env python2.4 """A set of unit tests for httplib2.py.""" __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __license__ = "MIT" __version__ = "0.1 ($Rev: 118 $)" import base64 import httplib import httplib2 import os import pickle import so...
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 (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 applicable law or agree...
codeparrot/github-code-clean
# engine/base.py # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Basic components for SQL execution and interfacing with DB-API. Defines the b...
codeparrot/github-code-clean
#!/usr/bin/env python #****************************************************************************** # $Id: gdal2tiles.py 19288 2010-04-02 18:36:17Z rouault $ # # Project: Google Summer of Code 2007, 2008 (http://code.google.com/soc/) # Support: BRGM (http://www.brgm.fr) # Purpose: Convert a raster into TMS (Tile...
codeparrot/github-code-clean
# Sunpath shading # # Ladybug: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Ladybug. # # Copyright (c) 2013-2015, Djordje Spasic <djordjedspasic@gmail.com> # Ladybug is free software; you can redistribute it and/or modify # it under the terms of the GNU...
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. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License,...
codeparrot/github-code-clean
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. # DEVs: For help testing this module, see: # # scripts/dev/testing/search_map_test.sh # # it's got a bunch of ccp.py commands you can run that should # hopefully cover all of the code path...
codeparrot/github-code-clean
from Quartz import * import Images import DataProvidersAndConsumers import Utilities import sys def exportImageWithMaskFromURLWithDestination(context, imageURL, imagewidth, imageheight, bitsPerComponent, theMaskingImageURL, maskwidth, maskheight): imageBitsPerPixel = bitsPerComponent * 3 byt...
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. """Meta checkout manager supporting both Subversion and GIT.""" # Files # .gclient : Current client configuration, written b...
codeparrot/github-code-clean
# This is a slightly modified version of the doctest.py that shipped with Python 2.5 # It incorporates changes that have been submitted to the Python ticket tracker # as ticket #1521051. These changes allow for a DoctestRunner and Doctest base # class to be specified when constructing a DoctestSuite. # Module doctest....
codeparrot/github-code-clean
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django.test import TestCase from rest_framework.test import APITestCase from rest_framework import status from django.urls import reverse from django.core.exceptions import ValidationError from django.apps ...
codeparrot/github-code-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Mads Jensen <mje.mads@gmail.com> # # License: BSD (3-clause) from .externals.six import string_types import os import copy from...
codeparrot/github-code-clean
""" CBMPy: MiriamIds module ======================= Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm) Copyright (C) 2009-2017 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands This program is free software: you can redistribute it and/or modify it under the terms of th...
codeparrot/github-code-clean
""" Test script for doctest. """ from test import test_support import doctest import warnings ###################################################################### ## Sample Objects (used by test cases) ###################################################################### def sample_func(v): """ Blah blah ...
codeparrot/github-code-clean
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
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 us...
codeparrot/github-code-clean
""" Objects for dealing with Chebyshev series. This module provides a number of objects (mostly functions) useful for dealing with Chebyshev series, including a `Chebyshev` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Mon Feb 24 13:50:17 2014 by generateDS.py version 2.3b. # import sys import getopt import re as re_ etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_l...
codeparrot/github-code-clean
# pylint: disable=g-bad-file-header # 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/LICENS...
codeparrot/github-code-clean
#!/usr/bin/env python # # Unit tests for the multiprocessing package # import unittest import Queue import time import sys import os import gc import signal import array import socket import random import logging import errno import test.script_helper from test import test_support from StringIO import StringIO _multi...
codeparrot/github-code-clean
#### PATTERN | TEXT | PARSER ####################################################################### # -*- coding: utf-8 -*- # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ############...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ h2/connection ~~~~~~~~~~~~~ An implementation of a HTTP/2 connection. """ import base64 from enum import Enum, IntEnum from hyperframe.exceptions import InvalidPaddingError from hyperframe.frame import ( GoAwayFrame, WindowUpdateFrame, HeadersFrame, DataFrame, PingFrame, PushPromi...
codeparrot/github-code-clean
""" Python test discovery, setup and run of test functions. """ import re import fnmatch import functools import py import inspect import sys import pytest from _pytest.mark import MarkDecorator, MarkerError from py._code.code import TerminalRepr try: import enum except ImportError: # pragma: no cover # Only ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2007, 2008, 2011 Uninett AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 as published by the Free # Software Foundation. # # Thi...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 import binascii import calendar import codecs import contextlib import ctypes import datetime import email.utils import errno import functools import gzip import io import itertools import json import locale import mat...
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
#!/usr/bin/env python # -*- coding: utf-8 -*- # # (c) Copyright 2003-2007 Hewlett-Packard Development Company, L.P. # # 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 Lice...
codeparrot/github-code-clean
"""Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipula...
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
# Copyright 2014 Rackspace # Copyright 2016 Blue Box, an IBM Company # # 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 # # ...
codeparrot/github-code-clean
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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: # # 1. Redistributions of source code must retain the above ...
codeparrot/github-code-clean
# mysql/base.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 """ .. dialect:: mysql :name: MySQL Supported Versions and Features ------------...
codeparrot/github-code-clean
import datetime import pickle import unittest import uuid from copy import deepcopy from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( Avg, BooleanField, Case, CharField, Count, DateField, DateTim...
codeparrot/github-code-clean
from datetime import ( date, datetime, timedelta, ) from itertools import product import numpy as np import pytest import pandas as pd from pandas import ( Categorical, DataFrame, Grouper, Index, MultiIndex, Series, concat, date_range, ) import pandas._testing as tm from pa...
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
""" Test functions for stats module """ from __future__ import division, print_function, absolute_import import warnings import re import sys import pickle from numpy.testing import (assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_allclose, assert_, assert_warns) impo...
codeparrot/github-code-clean
"""Tools for spectral analysis. """ import numpy as np from scipy import fft as sp_fft from . import _signaltools from .windows import get_window from ._spectral import _lombscargle from ._arraytools import const_ext, even_ext, odd_ext, zero_ext import warnings __all__ = ['periodogram', 'welch', 'lombscargle', 'csd'...
codeparrot/github-code-clean
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import argparse import logging import re import time from copy import copy from datetime import datetime, timedelta from past.builtins import basestring from sqlalchemy im...
codeparrot/github-code-clean
""" The :mod:`sklearn.model_selection._split` module includes classes and functions to split the data based on a preset strategy. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>, # Gael Varoquaux <gael.varoquaux@normalesup.org>, # Olivier Grisel <olivier.grisel@ensta.org> # Ragha...
codeparrot/github-code-clean
""" A module for converting numbers or color arguments to *RGB* or *RGBA* *RGB* and *RGBA* are sequences of, respectively, 3 or 4 floats in the range 0-1. This module includes functions and classes for color specification conversions, and for mapping numbers to colors in a 1-D array of colors called a colormap. Color...
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
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, myPath + '/../') sys.path.insert(0, myPath + '/../src') import io import configparser import unittest from OrderList import OrderList from datetime import datetime import pytz from httpretty import HTTPretty, httprettified import sure...
codeparrot/github-code-clean
# # # Copyright 2013-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 (...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVectorLayer. .. note:: 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. """ __...
codeparrot/github-code-clean
#!/usr/bin/env python # # This file is part of the python-chess library. # Copyright (C) 2012-2020 Niklas Fiekas <niklas.fiekas@backscattering.de> # # 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 Foundatio...
codeparrot/github-code-clean
#!/usr/bin/env python # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2016 NIWA # # 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 yo...
codeparrot/github-code-clean
""" ================== ModEM ================== # Generate files for ModEM # revised by JP 2017 # revised by AK 2017 to bring across functionality from ak branch """ import numpy as np import os from matplotlib import pyplot as plt, gridspec as gridspec from matplotlib.ticker import MultipleLocator from matplotlib....
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
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function """ This module implements a friendly (well, friendlier) interface between the raw JSON responses from JIRA and the Resource/dict abstractions provided by this library. Users will construct a JIRA ob...
codeparrot/github-code-clean
from __future__ import annotations from datetime import ( datetime, time, timedelta, tzinfo, ) from typing import ( TYPE_CHECKING, Literal, cast, overload, ) import warnings import numpy as np from pandas._libs import ( lib, tslib, ) from pandas._libs.arrays import NDArrayBack...
codeparrot/github-code-clean
import sys import pytest import numpy as np from numpy.dual import cholesky, eigh, svd from numpy.linalg import LinAlgError from numpy.testing import ( assert_, assert_raises, assert_equal, assert_allclose, assert_warns, assert_no_warnings, assert_array_equal, assert_array_almost_equal, suppress_warnings)...
codeparrot/github-code-clean