text
stringlengths
5.09k
178k
domain
stringclasses
106 values
""" Testing for the tree module (sklearn.tree). """ import copy import pickle from functools import partial from itertools import product import struct import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_projection import s...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Inventory Model @copyright: 2009-2012 (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 wit...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # camera_models.py # Copyright (c) 20012-2016, Carlos Jaramillo # Produced at the Laboratory for Robotics and Intelligent Systems of the City College of New York # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
codeparrot/github-code-clean
import copy import pyglet from pyglet.font import base from pyglet.image.codecs.wic import IWICBitmap, GUID_WICPixelFormat32bppBGR, WICDecoder, GUID_WICPixelFormat32bppBGRA, \ GUID_WICPixelFormat32bppPBGRA from pyglet import image import ctypes import math from pyglet import com from pyglet.libs.win32 import _ker...
codeparrot/github-code-clean
_lcid = 0 # change this if required import ctypes import comtypes from ctypes import * from comtypes import * from comtypes import GUID from ctypes import HRESULT from comtypes import helpstring from comtypes import COMMETHOD from comtypes import dispid STRING = c_char_p INT_PTR = c_int from ctypes.wintypes import _LA...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import numpy as np import scipy.stats as ss import itertools as it from statsmodels.sandbox.stats.multicomp import multipletests from statsmodels.stats.multicomp import pairwise_tukeyhsd from statsmodels.stats.libqsturng import psturng from pandas import DataFrame def __convert_to_df(a, val_c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import urllib, socket, time, os, base64 import xbmcplugin, xbmcgui, xbmc, xbmcaddon, xbmcvfs try: from sqlite3 import dbapi2 as sqlite except: from pysqlite2 import dbapi2 as sqlite from functions import * from net import * try: from TSCore import TSengine as tsengine torrmo...
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
#!/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 -*- # # Copyright 2018 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
# 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 re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
codeparrot/github-code-clean
__author__ = 'aleaf' import sys sys.path.insert(0, '..') import textwrap import os import numpy as np from numpy.lib import recfunctions from ..pakbase import Package from flopy.utils.util_list import MfList from ..utils.flopy_io import line_parse class ModflowSfr2(Package): """ Streamflow-R...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import connection, models, transaction class Migration(DataMigration): # remove the old default regression rule (now covered by workflow) def forwards(self, orm...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.core.validators import django.db.models.deletion import django_countries.fields import enumfields.fields import filer.fields.file import filer.fields.image import jsonfield.fields import mptt.fields import parler.models import timezone_field...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import datetime import dateutil import email import hashlib import hmac import lxml import logging import pytz import re import socket import time import xmlrpclib from collections import namedtuple from e...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # 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 ...
codeparrot/github-code-clean
# Copyright (C) 2001-2010 Python Software Foundation # Contact: email-sig@python.org # email package unit tests import re import time import base64 import unittest import textwrap from io import StringIO, BytesIO from itertools import chain from random import choice from socket import getfqdn from threading import Th...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import print_function import copy import shutil from datetime import timedelta from functools import wraps from json import loads from textwrap import dedent from unittest import SkipTest from uuid import uuid4 import ddt import lxml.html import mock from django.conf import se...
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
# 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
# coding=utf-8 import datetime import re import time from flask import Flask from flask import request from waitress import serve app = Flask(__name__) @app.route('/', methods=['POST']) def mock(): request_body = request.data.decode('utf-8') if request_body == '{stopsByRadius(lat:60.293571, lon:25.044250, r...
codeparrot/github-code-clean
import strjump data = [ '1:', strjump.Reference('1-10'), ',', '2:', strjump.Reference('2-15'), ',', '3:', strjump.Reference('3-20'), ',', '4:', strjump.Reference('4-27'), ',', '5:', strjump.Reference('5-69'), ',', '6:', strjump.Reference('6-106'), ...
codeparrot/github-code-clean
# # # Copyright (C) 2006, 2007, 2010, 2011, 2012 Google 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...
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
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2011 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you ...
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
import datetime from email.headerregistry import Address from typing import Any, Dict, Iterable, List, Mapping, Optional, TypeVar, Union from unittest import mock import orjson from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError...
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
# Copyright (c) 2012 - 2015 EMC Corporation, 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 # # ...
codeparrot/github-code-clean
# -*- coding:utf-8 -*- import logging import sys import re import random import struct import platform __version__ = '0.3' if sys.version_info < (3, 0): raise Exception('Sorry, Python 3+ only\n') if platform.system() != 'Windows': try: from multiprocessing import Pool, cpu_count except: ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 # t...
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
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Matti Hamalainen <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 <w.m.vanvli...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import base64 import datetime import json import time import mock from nose.tools import eq_, ok_ from nose.plugins.attrib import attr from pyquery import PyQuery as pq from urlparse import urlparse from django.conf import settings from django.contrib.sites.models import Site from django.core...
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
from ..broker import Broker class DevicePhysicalBroker(Broker): controller = "device_physicals" def show(self, **kwargs): """Shows the details for the specified device physical. **Inputs** | ``api version min:`` None | ``api version max:`` None | `...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test verify the usage of hosts and services templates """ import os import json import time import shlex import subprocess import requests import unittest2 from alignak_backend.models.host import get_schema as host_schema from alignak_backend.models.service import...
codeparrot/github-code-clean
#Copyright 2008 Orbitz WorldWide # #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, so...
codeparrot/github-code-clean
## # Copyright (c) 2014-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 of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
codeparrot/github-code-clean
# Copyright 2012 OpenStack Foundation # All Rights Reserved # Copyright (c) 2012 NEC 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/lic...
codeparrot/github-code-clean
""" Mocker Graceful platform for test doubles in Python: mocks, stubs, fakes, and dummies. Copyright (c) 2007-2010, Gustavo Niemeyer <gustavo@niemeyer.net> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
codeparrot/github-code-clean
#!/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2016, Mario Vilas # 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 cop...
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
""" This is only meant to add docs to objects defined in C-extension modules. The purpose is to allow easier editing of the docstrings without requiring a re-compile. NOTE: Many of the methods of ndarray have corresponding functions. If you update these docstrings, please keep also the ones in core/fromnum...
codeparrot/github-code-clean
# rarfile.py # # Copyright (c) 2005-2019 Marko Kreen <markokr@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED...
codeparrot/github-code-clean
# ***** BEGIN LICENSE BLOCK ***** # # For copyright and licensing please refer to COPYING. # # ***** END LICENSE BLOCK ***** # NOTE: Autogenerated code by codegen.py, do not edit import struct from pika import amqp_object from pika import data PROTOCOL_VERSION = (0, 9, 1) PORT = 5672 ACCESS_REFUSED = 403 CHANNEL_E...
codeparrot/github-code-clean
# TODO: no need to test codelist fields separately; instead test the whole # serializer in once along with the code and vocabulary fields. Or is # testing the fields separately preferable? import datetime from decimal import Decimal from unittest import skip from django.core.exceptions import ObjectDoesNotExist # Run...
codeparrot/github-code-clean
from __future__ import print_function ''' python module for ASE2-free and Numeric-free dacapo U{John Kitchin<mailto:jkitchin@andrew.cmu.edu>} December 25, 2008 This module supports numpy directly. * ScientificPython2.8 is required - this is the first version to use numpy by default. see https://wiki.fysik.dtu.dk/...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """Script to generate different versions of Visual Studio (express) files. Currently supported input formats: * libyal source directory (configure.ac and Makefile.am) * 2008 (10.0) Currently supported output formats: * 2008 (10.0) * 2010 (11.0) * 2012 (12.0) * 2013 (13.0) Co...
codeparrot/github-code-clean
# ********************************************************************** # # Copyright (c) 2003-2015 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
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
"""Test whether all elements of cls.args are instances of Basic. """ # NOTE: keep tests sorted by (module, class name) key. If a class can't # be instantiated, add it here anyway with @SKIP("abstract class) (see # e.g. Function). import os import re import warnings import io from sympy import (Basic, S, symbols, sqr...
codeparrot/github-code-clean
# coding: utf8 { ' Module is the main communications hub of the Sahana system. It is used to send alerts and/or messages using SMS & Email to various groups and individuals before, during and after a disaster.': ' Module is the main communications hub of the Sahana system. It is used to send alerts and/or messages us...
codeparrot/github-code-clean
# # Copyright (C) 2008, 2013, 2014, 2015 Red Hat, Inc. # Copyright (C) 2008 Cole Robinson <crobinso@redhat.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 version 2 of the License,...
codeparrot/github-code-clean
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + # pylint: disable=too-many-lines, invalid-nam...
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 https://mozilla.org/MPL/2.0/. from numbers import Integral import warnings import functools as ftool import itertools import operator from collections...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
codeparrot/github-code-clean
# coding=UTF-8 """ Tests courseware views.py """ from urllib import urlencode, quote import ddt import json import itertools import unittest from datetime import datetime, timedelta from HTMLParser import HTMLParser from nose.plugins.attrib import attr from freezegun import freeze_time from django.conf import setting...
codeparrot/github-code-clean
#!/usr/bin/env python # coding: utf-8 # Copyright 2017 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 a...
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
# 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
# -*- 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
# Copyright 2017 Google 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 by applicable law or a...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, # 2015 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 Software ...
codeparrot/github-code-clean
# python version 1.0 DO NOT EDIT # # Generated by smidump version 0.4.8: # # smidump -f python JUNIPER-MIB FILENAME = "mib-jnx-chassis.txt" MIB = { "moduleName" : "JUNIPER-MIB", "JUNIPER-MIB" : { "nodetype" : "module", "language" : "SMIv2", "organization" : """J...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013 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 Software Foundation; either version 2 of the ## ...
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
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
codeparrot/github-code-clean
from __future__ import print_function, division import random from collections import defaultdict from sympy.core import Basic from sympy.core.compatibility import is_sequence, reduce, range from sympy.utilities.iterables import (flatten, has_variety, minlex, has_dups, runs) from sympy.polys.polytools import lcm ...
codeparrot/github-code-clean
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 i...
codeparrot/github-code-clean
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
#!/usr/bin/python #Audio Tools, a module and set of tools for manipulating audio data #Copyright (C) 2007-2012 Brian Langenberger #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...
codeparrot/github-code-clean
import numpy as _np from scipy import __version__ as _scipy_version from scipy import stats as _stats from scipy.stats import norm as _norm from scipy import interpolate as _interpolate from scipy import integrate as _integrate import json as _json import sys as _sys import importlib as _importlib import random as _ran...
codeparrot/github-code-clean
""" Copyright(C) 2014-2016, Stamus Networks Written by Eric Leblond <eleblond@stamus-networks.com> This file is part of Scirius. Scirius 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 Li...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright(C) 2011,2012 by John Tobey <John.Tobey@gmail.com> # 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)...
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
# # Cython/Python language types # from __future__ import absolute_import import copy import re from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode from . import StringEncoding from . import Naming from .Errors import error class BaseType(object): # # Base class for all Cython types incl...
codeparrot/github-code-clean
# Docstrings for generated ufuncs # # The syntax is designed to look like the function add_newdoc is being # called from numpy.lib, but in this file add_newdoc puts the # docstrings in a dictionary. This dictionary is used in # generate_ufuncs.py to generate the docstrings for the ufuncs in # scipy.special at the C lev...
codeparrot/github-code-clean
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files ...
codeparrot/github-code-clean
# Copyright 2012 VMware, 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 by a...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ The astropy.time package provides functionality for manipulating times and dates. Specific emphasis is placed on supporting time scales (e.g. UTC, TAI, UT1) and time representations (e.g. JD, MJD, ISO 8601) that are used in astr...
codeparrot/github-code-clean
from collections.abc import Iterable, MutableSequence import copy from functools import partial, reduce from itertools import product from numbers import Integral, Real import operator from pathlib import Path from xml.etree import ElementTree as ET import h5py import numpy as np import pandas as pd import scipy.spars...
codeparrot/github-code-clean
# mock.py # Test tools for mocking and patching. # Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # mock 1.0 # http://www.voidspace.org.uk/python/mock/ # Released subject to the BSD License # Please see http://www.voidspace.org.uk/python/license.shtml # Scripts m...
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
from __future__ import print_function from __future__ import division from __future__ import absolute_import from Screens.Screen import Screen from Screens.ServiceScan import ServiceScan from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider...
codeparrot/github-code-clean
#!/usr/bin/env python #=============================================================================== # Copyright 2014 NetApp, Inc. All Rights Reserved, # contribution by Jorge Mora <mora@netapp.com> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public...
codeparrot/github-code-clean
""" cgroup autotest test (on KVM guest) @author: Lukas Doktor <ldoktor@redhat.com> @copyright: 2011 Red Hat, Inc. """ import logging, os, re, time from autotest.client.shared import error from autotest.client import utils from virttest.utils_cgroup import Cgroup from virttest.utils_cgroup import CgroupModules from virt...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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
# -*- coding: utf-8 -*- """ Created on Fri Apr 8 16:36:26 2011 @author: ProfMobius, Searge, Fesh0r @version: v1.2 """ import sys import fnmatch import logging import os import shutil import zipfile import csv import re import subprocess import ConfigParser import urllib import time import stat import errno import sh...
codeparrot/github-code-clean
# -*- coding: UTF-8 -*- import threading from django.conf import settings from django.db import models from geonode.maps.owslib_csw import CatalogueServiceWeb from geoserver.catalog import Catalog from geonode.core.models import PermissionLevelMixin from geonode.core.models import AUTHENTICATED_USERS, ANONYMOUS_USERS, ...
codeparrot/github-code-clean
# Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 21817 $ # Date: $Date: 2005-07-21 13:39:57 -0700 (Thu, 21 Jul 2005) $ # Copyright: This module has been placed in the public domain. """ This is the ``docutils.parsers.restructuredtext.states`` module, the core of the reStructuredT...
codeparrot/github-code-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# 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
# Zulip's main markdown implementation. See docs/subsystems/markdown.md for # detailed documentation on our markdown syntax. import functools import html import logging import os import re import time import urllib import urllib.parse from collections import defaultdict, deque from dataclasses import dataclass from da...
codeparrot/github-code-clean
# # Copyright 2016 Quantopian, 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 wr...
codeparrot/github-code-clean
# Copyright (c) 2015 Infortrend Technology, 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 # # ...
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
#!/usr/bin/env python # Fly ArduCopter in SITL from __future__ import print_function import copy import math import os import shutil import time from pymavlink import mavutil from pymavlink import mavextra from pysim import util, rotmat from common import AutoTest from common import NotAchievedException, AutoTestTi...
codeparrot/github-code-clean
from django.http import HttpResponse from django.template import loader from django.http import JsonResponse from django.core import serializers import json import sys import OmniDB_app.include.Spartacus as Spartacus import OmniDB_app.include.Spartacus.Database as Database import OmniDB_app.include.Spartacus.Utils as...
codeparrot/github-code-clean