text
stringlengths
5.09k
178k
domain
stringclasses
106 values
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
# -*- coding: utf-8 -*- ''' GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a fre...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf8 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope th...
codeparrot/github-code-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################################################################## # # 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
## @file # Routines for generating AutoGen.h and AutoGen.c # # Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of...
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 GL_FUNCTIO...
codeparrot/github-code-clean
import unittest from unittest import mock from test import support import subprocess import sys import signal import io import os import errno import tempfile import time import selectors import sysconfig import select import shutil import gc import textwrap try: import threading except ImportError: threading ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Inventory # import wx import wx.grid as gridlib import sys,re import faulthandler import json import time import numpy import xml.etree.cElementTree as ET import wx.lib.masked as masked import datetime import pout import handy_utils as HUD from button_stuff import Butt...
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
##################################################################### # # # Refinement Script with SHELX and CCP4/REFMAC5 # # # # Copyright: Molecular Images 2005 ...
codeparrot/github-code-clean
# This file is part of HamsiManager. # # Copyright (c) 2010 - 2015 Murat Demir <mopened@gmail.com> # # Hamsi Manager 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 yo...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ################################ ######## Red - Discord bot ##### ################################ # made by Twentysix # # import discord import logging import time import datetime import requests import aiohttp import traceback import re import youtube_dl import os import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'VCMBirthRecord.SettlementCode' db.delete_column(u'sourc...
codeparrot/github-code-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
codeparrot/github-code-clean
# Copyright (c) 2014 Dell 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 a...
codeparrot/github-code-clean
#! /usr/bin/env python ##################################################################################################################### # CUICUILCO: A general purpose framework that allows the construction and evaluation of # # hierarchical networks for supervised learning ...
codeparrot/github-code-clean
"""Tools for spectral analysis. """ from __future__ import division, print_function, absolute_import import numpy as np from scipy import fftpack from . import signaltools from .windows import get_window from ._spectral import _lombscargle from ._arraytools import const_ext, even_ext, odd_ext, zero_ext import warning...
codeparrot/github-code-clean
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from sympy.matrices import Matrix from sympy.core import Add, diff, Symbol from sympy.simplify import simplify from tensor_analysis.arraypy import Arraypy, TensorArray, matrix2arraypy, \ matrix2tensor, list2arraypy, list2tensor from tensor_analysis.tensor_methods import is_symmetric from te...
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
# encoding=UTF8 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You m...
codeparrot/github-code-clean
""" Classes for interpolating values. """ from __future__ import division, print_function, absolute_import __all__ = ['interp1d', 'interp2d', 'spline', 'spleval', 'splmake', 'spltopp', 'ppform', 'lagrange', 'PPoly', 'BPoly', 'NdPPoly', 'RegularGridInterpolator', 'interpn'] import itertools imp...
codeparrot/github-code-clean
# Copyright (c) 2012 - 2015 EMC Corporation. # 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 # # Unle...
codeparrot/github-code-clean
# pylint: disable=function-redefined import codecs import string from enum import Enum from itertools import accumulate from typing import Callable, Iterable, List, Optional, Tuple, TypeVar, Union, cast from prompt_toolkit.application.current import get_app from prompt_toolkit.buffer import Buffer, indent, reshape_tex...
codeparrot/github-code-clean
# Copyright (c) 2012 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. """ This module contains classes that help to emulate xcodebuild behavior on top of other build systems, such as make and ninja. """ from __future__ import print_...
codeparrot/github-code-clean
# pylint: disable=E1101,E1103,W0232 import datetime import warnings from functools import partial from sys import getsizeof import numpy as np from pandas._libs import index as libindex, lib, Timestamp from pandas.compat import range, zip, lrange, lzip, map from pandas.compat.numpy import function as nv from pandas ...
codeparrot/github-code-clean
""" libguestfs tools test utility functions. """ import logging import signal import os import re import aexpect from avocado.utils import path from avocado.utils import process from . import propcan class LibguestfsCmdError(Exception): """ Error of libguestfs-tool command. """ def __init__(self,...
codeparrot/github-code-clean
''' Copyright 2015 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 agreed to in ...
codeparrot/github-code-clean
import collections import typing from . import _inspect, _iterate, _update from . import duration as _duration from . import enums as _enums from . import format as _format from . import indicators as _indicators from . import iterate as iterate_ from . import markups as _markups from . import parentage as _parentage ...
codeparrot/github-code-clean
""" Module contains tools for processing files into DataFrames or other objects """ from __future__ import print_function from pandas.compat import range, lrange, StringIO, lzip, zip, string_types, map from pandas import compat import re import csv import numpy as np from pandas.core.index import Index, MultiIndex fr...
codeparrot/github-code-clean
# $HeadURL$ __RCSID__ = "$Id$" import datetime, time import types import threading import random from DIRAC.Core.Base.DB import DB from DIRAC import S_OK, S_ERROR, gConfig from DIRAC.FrameworkSystem.Client.MonitoringClient import gMonitor from DIRAC.Core.Utilities import List, ThreadSafe, Time, DEncode from DIRAC.Acco...
codeparrot/github-code-clean
# The level editor GUI. # The following workflow is expected: # 1) User load a level # 2) main windows display the scene layout # right-side-top-dock display: # - level scene tree # - level tree (a list in fact) # - level resources tree (a list in fact) # 3) user select an element in one of the tree, related p...
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
# 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
# # Cython/Python language types # from __future__ import absolute_import import copy import re try: reduce except NameError: from functools import reduce from .Code import UtilityCode, LazyUtilityCode, TempitaUtilityCode from . import StringEncoding from . import Naming from .Errors import error class...
codeparrot/github-code-clean
from cStringIO import StringIO from datetime import date, datetime, timedelta import json import time from xml.sax.saxutils import escape import mock from nose.tools import eq_, ok_ from nose.plugins.attrib import attr from django.conf import settings from django.core.exceptions import ValidationError from django.tes...
codeparrot/github-code-clean
from typing import Any, Dict EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { # seems like best emoji for happy "1f600": {"canonical_name": "grinning", "aliases": ["happy"]}, "1f603": {"canonical_name": "smiley", "aliases": []}, # the Google emoji for this is not great, so made People/9 'smile' and #...
codeparrot/github-code-clean
import fractions import operator import os import random import sys import struct import time import unittest from test import support from test.test_grammar import (VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS) from math import isinf, isnan, copysign, ldexp INF = float("inf")...
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 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 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import json from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
codeparrot/github-code-clean
""" KVM test utility functions. @copyright: 2008-2009 Red Hat Inc. """ import time, string, random, socket, os, signal, re, logging, commands, cPickle import fcntl, shelve, ConfigParser, threading, sys, UserDict, inspect, tarfile import struct, shutil, glob from autotest_lib.client.bin import utils, os_dep from autot...
codeparrot/github-code-clean
"""This file contains code for use with "Think Stats" and "Think Bayes", both by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division """This file contains class definitions for: H...
codeparrot/github-code-clean
from header_common import * from header_presentations import * from header_mission_templates import * from header_operations import * from header_triggers import * from header_items import * from module_constants import * import header_debug as dbg import header_lazy_evaluation as lazy ################################...
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\x00\xd0\ \x51\ \x4c\x61\x62\x65\x6c\x7b\x0d\x0a\x20\x20\x20\x20\x62\x61\x63\x6b\ \x67\x72\x6f\x75...
codeparrot/github-code-clean
""" handhRL Hulks and Horrors: The Roguelike Copyright 2014 by John S. Berry III 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 versio...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # 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 c...
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
"""Tests for UIAWrapper""" from __future__ import print_function from __future__ import unicode_literals import time import os import sys import collections import unittest import mock import six sys.path.append(".") from pywinauto.windows.application import Application # noqa: E402 from pywinauto.base_application i...
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 import numpy as np from numpy.testing import ( run_module_suite, TestCase, assert_, assert_equa...
codeparrot/github-code-clean
"""Metrics to assess performance on classification task given classe prediction Functions named as ``*_score`` return a scalar value to maximize: the higher the better Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize: the lower the better """ # Authors: Alexandre Gramfort <alexandre.gram...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- import re import string from unicodedata import normalize from lxml import etree from lxml.etree import ElementTree, Element, SubElement from datetime import datetime import time import netsvc from osv import fields, osv import decimal_precision as dp from tools.translate import _ class ac...
codeparrot/github-code-clean
#!/bin/env python """ This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Currently, the following classes are available: atlas_info atlas_threads_info atlas_blas_info atlas_blas_threads_info ...
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 -*- ############################################################################## # # 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 import pickle from io import StringIO from operator import attrgetter from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import management from django.db import DEFAULT_DB_ALIAS, connections, router, transaction from django.db.models ...
codeparrot/github-code-clean
# region Description """ test_network.py: Unit tests for Raw-packet network classes Author: Vladimir Ivanov License: MIT Copyright 2020, Raw-packet Project """ # endregion # region Import from sys import path from os.path import dirname, abspath import unittest # endregion # region Authorship information __author__ =...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2009-2021 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Classes and functions for interfacing with a Davis VantagePro, VantagePro2, or VantageVue weather station""" from __future__ import absolute_import from __future__ import di...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (C) 2006-2012 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
# Orca # # Copyright 2004-2009 Sun Microsystems Inc. # Copyright 2010 Joanmarie Diggs # # 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 your op...
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
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
codeparrot/github-code-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
""" Cisco_IOS_XR_ipv4_acl_oper This module contains a collection of YANG definitions for Cisco IOS\-XR ipv4\-acl package operational data. This module contains definitions for the following management objects\: ipv4\-acl\-and\-prefix\-list\: Root class of IPv4 Oper schema tree Copyright (c) 2013\-2015 by Cisco Sy...
codeparrot/github-code-clean
input = """ 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 0 0 1 7 0 0 1 8 0 0 1 9 0 0 1 10 0 0 1 11 0 0 1 12 0 0 1 13 0 0 1 14 0 0 1 15 0 0 1 16 0 0 1 17 0 0 1 18 0 0 1 19 0 0 1 20 0 0 1 21 0 0 1 22 0 0 1 23 0 0 1 24 0 0 1 25 0 0 1 26 0 0 1 27 0 0 1 28 0 0 1 29 0 0 1 30 0 0 1 31 0 0 1 32 0 0 1 33 0 0 1 34 0 0 1 35 0 0 1 36 0 0 1...
codeparrot/github-code-clean
""" @package mi.instrument.seabird.sbe26plus_v2.driver @file mi/instrument/seabird/sbe16plus_v2/driver.py @author David Everett @brief Driver base class for sbe16plus V2 CTD instrument. """ __author__ = 'David Everett' __license__ = 'Apache 2.0' import time import re from mi.core.log import get_logger, get_loggin...
codeparrot/github-code-clean
# Author: Travis Oliphant # 1999 -- 2002 from __future__ import division, print_function, absolute_import import operator import math import sys import timeit from scipy.spatial import cKDTree from . import sigtools, dlti from ._upfirdn import upfirdn, _output_len, _upfirdn_modes from scipy import linalg, fft as sp_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
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
codeparrot/github-code-clean
""" There are three types of functions implemented in SymPy: 1) defined functions (in the sense that they can be evaluated) like exp or sin; they have a name and a body: f = exp 2) undefined function which have a name but no body. Undefined functions can be defined using a Function cla...
codeparrot/github-code-clean
""" Logistic Regression """ # Author: Gael Varoquaux <gael.varoquaux@normalesup.org> # Fabian Pedregosa <f@bianp.net> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Manoj Kumar <manojkumarsivaraj334@gmail.com> # Lars Buitinck # Simon Wu <s8wu@uwaterloo.ca> # ...
codeparrot/github-code-clean
# orm/relationships.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 """Heuristics related to join conditions as used in :func:`.relationship`. Pro...
codeparrot/github-code-clean
#!/usr/bin/env python # File created on 05 Jun 2011 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso", "Jose Antonio Navas Molina", "Daniel McDonald"] __license__ = "GPL" __version__ = "1.9.1-dev" __maintainer__ = "Greg Capor...
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
# Use of this source code is governed by the MIT license. __license__ = "MIT" try: from collections.abc import Callable # Python 3.6 except ImportError as e: from collections import Callable import re import sys import warnings try: import thlib.side.soupsieve as soupsieve except ImportError as e: soup...
codeparrot/github-code-clean
# # gPrime - A web-based genealogy program # # Copyright (C) 2011 Michiel D. Nauta # # 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 la...
codeparrot/github-code-clean
import math import unittest from datetime import datetime, time, timedelta, tzinfo from asynctest.mock import patch from tests.unittest.base_custom import TestCustomField # Needs to be imported last from lib.data import timezones from lib.data.timedelta import format from ..custom import countdown class TimeZone(...
codeparrot/github-code-clean
from distutils.command.clean import clean import logging import os from crispy_forms.bootstrap import Alert, InlineRadios from crispy_forms.layout import (HTML, Button, Field, Fieldset, Layout, Row, Div) from django import forms from django.conf import settings from django.contrib.con...
codeparrot/github-code-clean
""" Integral Transforms """ from __future__ import print_function, division from sympy.core import S from sympy.core.compatibility import reduce from sympy.core.function import Function from sympy.core.numbers import oo from sympy.core.symbol import Dummy from sympy.integrals import integrate, Integral from sympy.int...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- """ Factory object creation for all CLI methods """ import datetime import json import logging import os import random import time from fauxfactory import ( gen_alphanumeric, gen_choice, gen_integer, gen_ipaddr, gen_mac, gen_netmask, gen_string, ) from os import c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Created on Mon Apr 02 11:54:33 2012 @author: a1185872 """ import os import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pylab from matplotlib.ticker import MultipleLocator, FormatStrFormatter from matplotlib.patches import Ellipse, Rectangle, Arrow from matplotli...
codeparrot/github-code-clean
from __future__ import unicode_literals import calendar import json import logging import os import pycountry import pytz import random import regex import stripe import traceback from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta from decimal import Decimal from django.core.fil...
codeparrot/github-code-clean
# Copyright (c) 2015 Mirantis 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 require...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright 2016 Daniel Nunes # # 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
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
import bz2 from collections import Counter from contextlib import contextmanager from datetime import datetime from functools import wraps import gzip import http.client import os import re from shutil import rmtree import string import tempfile import traceback from typing import Union, cast import warnings import zip...
codeparrot/github-code-clean
# encoding: latin2 """Algorithm utilities G{packagetree core} """ __author__ = "Juan C. Duque" __credits__ = "Copyright (c) 2009-11 Juan C. Duque" __license__ = "GPL" __version__ = "1.0.0" __maintainer__ = "RiSE Group" __email__ = "contacto@rise-group.org" import copy import numpy import dist2Regions imp...
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
# -*- coding: utf-8 -*- import datetime import hashlib import itertools import json import os import re import time import urlparse import uuid from django.conf import settings from django.core.cache import cache from django.core.exceptions import ObjectDoesNotExist from django.core.files.storage import default_storag...
codeparrot/github-code-clean
"""Tests for base_events.py""" import errno import logging import math import os import socket import sys import threading import time import unittest from unittest import mock import asyncio from asyncio import base_events from asyncio import constants from asyncio import events from test.test_asyncio import utils a...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created: Thu May 2 15:49:03 2013 # by: The Resource Compiler for PyQt (Qt v5.0.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x36\xe2\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x...
codeparrot/github-code-clean
from __future__ import print_function __author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Jul 30, 2014 19:35:11 EDT$" import imp import nose import nose.plugins import nose.plugins.attrib import numpy import scipy import scipy.spatial import scipy.spatial.distance import scipy.stats import nan...
codeparrot/github-code-clean
"""Tests for events.py.""" import functools import gc import io import os import platform import re import signal import socket try: import ssl except ImportError: ssl = None import subprocess import sys import threading import time import errno import unittest from unittest import mock import weakref import...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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
"""Tests for http/cookiejar.py.""" import os import re import test.support import time import unittest import urllib.request from http.cookiejar import (time2isoz, http2time, iso2time, time2netscape, parse_ns_headers, join_header_words, split_header_words, Cookie, CookieJar, DefaultCookiePolicy, LWPCookieJa...
codeparrot/github-code-clean
from numpy.testing import assert_array_equal, assert_equal, assert_raises import numpy as np from skimage._shared.testing import test_parallel from skimage.draw import (set_color, line, line_aa, polygon, polygon_perimeter, circle, circle_perimeter, circle_perimeter_aa, ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Cfda', fields ['program_number'] db.create_unique('data_cfda', ['program_numb...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011, 2012 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 ## License, or (at your opt...
codeparrot/github-code-clean