text
stringlengths
5.09k
178k
domain
stringclasses
106 values
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import json import xml.etree.ElementTree from youtube_dl.u...
codeparrot/github-code-clean
ID_AUTHOR = { "2434": "Aelius Dius Hist.", "2035": "Athanasius Theol.", "2012": "Acta Eupli", "1578": "Phaenias Phil.", "1220": "Batrachomyomachia", "1222": "Beros(s)us Astrol. et Hist.", "0474": "Magnes Comic.", "0559": "Heron Mech.", "4138": "Ephraem Syrus Theol.", "1639": "Pse...
codeparrot/github-code-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # Copyright: (c) 2013, Matt Hite <mhite@hotmail.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type AN...
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
# -*- coding: utf-8 -*- """ pygments.lexers.compiled ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for compiled languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from string import Template from pygments.lexer import Lexer, Rege...
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 -*- from __future__ import print_function from __future__ import absolute_import from __future__ import division import numpy as np import types as python_types import warnings import copy import os from six.moves import zip from .. import backend as K from ..utils.io_utils import ask_to_proceed_...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of charge, t...
codeparrot/github-code-clean
""" tinyjs.py ~~~~~~~~~ simple file javascript interpreter :author: atupal :email: me@atupal.org :time: 12/9/2014 """ from StringIO import StringIO from utils import * TINYJS_H = 1 TINYJS_CALL_STACK = 1 _CRTDBG_MAP_ALLOC = 1 TRACE = 'printf' TINYJS_LOOP_MAX_ITERATIONS = 8192 s_null = "null" s_undefi...
codeparrot/github-code-clean
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
"""Parameters and ParameterSets. General logic for all Parameters and ParameterSets which makeup the overall framework of the PHOEBE 2.0 frontend. """ from phoebe.constraints.expression import ConstraintVar # from phoebe.constraints import builtin from phoebe.parameters.twighelpers import _uniqueid_to_uniquetwig from...
codeparrot/github-code-clean
""" parser.http.movieParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a movie. E.g., for Brian De Palma's "The Untouchables", the referred pages would be: combined details: http://akas.imdb.com/title/tt0094226/combi...
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
# Copyright 2011 Tomo Krajina # # 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, sof...
codeparrot/github-code-clean
import numpy as np import glob import sys import os import traceback import argparse import yaml from collections import OrderedDict from scipy.ndimage.interpolation import map_coordinates from astropy.coordinates import SkyCoord from astropy.io import fits from astropy.table import Table, Column from fermipy.catalog...
codeparrot/github-code-clean
# Copyright 2011 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 ...
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 from sympy import Basic, S, symbols, sqrt, sin, oo,...
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
# # peepdf is a tool to analyse and modify PDF files # http://peepdf.eternal-todo.com # By Jose Miguel Esparza <jesparza AT eternal-todo.com> # # Copyright (C) 2011-2015 Jose Miguel Esparza # # This file is part of peepdf. # # peepdf is free software: you can redistribute it and/or modify # ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import tempfile from itertools import groupby import numpy as np from numpy import rec as records from numpy import testing as npt import tables from tables import ( Col, StringCol, BoolCol, IntCol, FloatCol, ComplexCol, Cols, Col...
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 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 maintained ...
codeparrot/github-code-clean
# Copyright 2005 Duke University # Copyright (C) 2012-2015 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 versi...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created: Fri Jan 20 17:26:07 2012 # by: The Resource Compiler for PyQt (Qt v4.7.0) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x05\x86\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x...
codeparrot/github-code-clean
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import resource import socket import fixtures import subprocess from util import retry from mockredis import mockredis from mockkafka import mockkafka import redis import urllib2 import copy import os import json import gevent import datetime from fc...
codeparrot/github-code-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright (c) 2014 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Licen...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' Interact with Consul https://www.consul.io ''' # Import Python Libs from __future__ import absolute_import # Import 3rd-party libs # pylint: disable=import-error,no-name-in-module,redefined-builtin from salt.ext.six.moves.urllib.parse import urljoin as _urljoin import salt.ext.six import...
codeparrot/github-code-clean
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import copy import gzip from dateutil import tz import jinja2 import logging import argparse import magic import os import re import datetime import locale import cPickle import bokeh.charts from itertools import islice import pdfkit import pytz import Util import webcolor...
codeparrot/github-code-clean
""" Test functions for stats module WRITTEN BY LOUIS LUANGKESORN <lluang@yahoo.com> FOR THE STATS MODULE BASED ON WILKINSON'S STATISTICS QUIZ http://www.stanford.edu/~clint/bench/wilk.txt """ from numpy.testing import * from numpy import array, arange, zeros, ravel, float32, float64, power import numpy a...
codeparrot/github-code-clean
"""Functions to plot M/EEG data e.g. topographies.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Robert Luke <mail@robertluke.net> # #...
codeparrot/github-code-clean
# -*- coding: mbcs -*- # Created by makepy.py version 0.5.01 # By python version 3.5.2 |Continuum Analytics, Inc.| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] # On Fri Dec 9 00:04:35 2016 'ClearImage COM Server' makepy_version = '0.5.01' python_version = 0x30502f0 import win32com.client.CLSIDToClass,...
codeparrot/github-code-clean
"""The blocking connection adapter module implements blocking semantics on top of Pika's core AMQP driver. While most of the asynchronous expectations are removed when using the blocking connection adapter, it attempts to remain true to the asynchronous RPC nature of the AMQP protocol, supporting server sent RPC comman...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """Module serving as a specific API for AGROGENOMDB PostgreSQL database. It notably populates this database with descriptions of gene tree reconciliations based on Prunier software output for transfer detection. """ import sys import os import tree2 import numpy as np impo...
codeparrot/github-code-clean
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
codeparrot/github-code-clean
# # imap.py -- intensity maps for fits viewing # # 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 numpy # Some built in intensity maps imap_equa = ( ...
codeparrot/github-code-clean
import pytest, py, sys from _pytest import python as funcargs from _pytest.python import FixtureLookupError from _pytest.pytester import get_public_names from textwrap import dedent def test_getfuncargnames(): def f(): pass assert not funcargs.getfuncargnames(f) def g(arg): pass assert funcargs.getfunc...
codeparrot/github-code-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test running processes. @var CONCURRENT_PROCESS_TEST_COUNT: The number of concurrent processes to use to stress-test the spawnProcess API. This value is tuned to a number of processes which has been determined to stay below various ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Tests for the Wikidata parts of the page module.""" # # (C) Pywikibot team, 2008-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals import copy import json from decimal import Decimal import pywikibot from pywikibot import p...
codeparrot/github-code-clean
import importlib.util import sys from collections.abc import Hashable from decimal import Decimal from enum import Enum from typing import Any, Dict, FrozenSet, Generic, List, Optional, Sequence, Set, Tuple, Type, TypeVar, Union import pytest from pydantic import ( BaseModel, BaseSettings, Extra, None...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # pylint: disable=E1101,E1103,W0232 from datetime import datetime from pandas.compat import range, lrange, u import os import pickle import re from distutils.version import LooseVersion import numpy as np import pandas as pd from pandas import Categorical, Index, Series, DataFrame, PeriodInde...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # vim:set et sts=4 sw=4: # # libzhuyin - Library to deal with zhuyin. # # Copyright (c) 2010 BYVoid <byvoid1@gmail.com> # Copyright (C) 2011 Peng Wu <alexepico@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published b...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Wed Feb 04 10:09:07 2015 by generateDS.py version 2.14a. # # Command line options: # ('-o', 'tpn_autogen.py') # # Command line arguments: # tpn.xsd # # Command line: # generateDS.py -o "tpn_autogen.py" tpn.xsd # # Current working directory (os.getcwd())...
codeparrot/github-code-clean
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ###################################################################### # DO NOT UPDATE THIS FILE WITHOUT SIGN-OFF FROM A...
codeparrot/github-code-clean
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('DU', doc=""" :class:`DU` functions provide a variety of common utilities that can be applied efficiently to the contents of a database. Most :class:`DU` library functions t...
codeparrot/github-code-clean
from __future__ import print_function import types import warnings import sys import traceback import pickle from copy import deepcopy import numpy as np from scipy import sparse from scipy.stats import rankdata import struct from sklearn.externals.six.moves import zip from sklearn.externals.joblib import hash, Memor...
codeparrot/github-code-clean
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
codeparrot/github-code-clean
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Gael Varoquaux <gael.varoquaux@inria.fr> # # License: BSD 3 clause import sys import warnings import numbers from abc import ABCMeta, abstractm...
codeparrot/github-code-clean
""" A wrap of Maya's Vector, Point, Color, Matrix, TransformationMatrix, Quaternion, EulerRotation types """ import sys import math, copy import operator, colorsys import pymel.util as util import pymel.api as _api from pymel.util.arrays import * from pymel.util.arrays import _toCompOrArrayInstance import pymel.inter...
codeparrot/github-code-clean
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ A package providing :class:`iris.cube.Cube` analysis support. This module defines a suite of :class:`~iris.analysis.Aggreg...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
codeparrot/github-code-clean
# -*- encoding: utf-8 -*- ''' Text Input ========== .. versionadded:: 1.0.4 .. image:: images/textinput-mono.jpg .. image:: images/textinput-multi.jpg The :class:`TextInput` widget provides a box of editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported. .. note:...
codeparrot/github-code-clean
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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, ...
codeparrot/github-code-clean
import math from sympy.mpmath import * def test_bessel(): mp.dps = 15 assert j0(1).ae(0.765197686557966551) assert j0(pi).ae(-0.304242177644093864) assert j0(1000).ae(0.0247866861524201746) assert j0(-25).ae(0.0962667832759581162) assert j1(1).ae(0.440050585744933516) assert j1(pi).ae(0.284...
codeparrot/github-code-clean
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
codeparrot/github-code-clean
import struct import codecs from contextlib import contextmanager import logging import socket import sys from datetime import datetime, date, time, timedelta from decimal import Decimal, localcontext from . import tz import re import uuid import six import types from six.moves import reduce from six.move...
codeparrot/github-code-clean
#A* ------------------------------------------------------------------- #B* This file contains source code for the PyMOL computer program #C* Copyright (c) Schrodinger, LLC. #D* ------------------------------------------------------------------- #E* It is unlawful to modify or remove this copyright notice. #F* -------...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## begin license ## # # "Meresco Oai" are components to build Oai repositories, based on # "Meresco Core" and "Meresco Components". # # Copyright (C) 2007-2008 SURF Foundation. http://www.surf.nl # Copyright (C) 2007-2011 Seek You Too (CQ2) http://www.cq2.nl # Copyright (C) 2007-2009 Stichting K...
codeparrot/github-code-clean
import numpy import Shadow import Shadow.ShadowLibExtensions as sd import sys import inspect import os try: import matplotlib.pylab as plt from matplotlib import collections except ImportError: print(sys.exc_info()[1]) pass #TODO: remove ShadowToolsPrivate import Shadow.ShadowToolsPrivate as stp fr...
codeparrot/github-code-clean
# 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.apache.org/licenses/LICENSE-2.0 # # Unless...
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 # distributed under t...
codeparrot/github-code-clean
""" Linear mixed effects models are regression models for dependent data. They can be used to estimate regression relationships involving both means and variances. These models are also known as multilevel linear models, and hierarchical linear models. The MixedLM class fits linear mixed effects models to data, and p...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: September 4, 2002 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """Create PyTables files and the object tree...
codeparrot/github-code-clean
# # Author: Damian Eads # Date: April 17, 2008 # # Copyright (C) 2008 Damian Eads # # 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 copyright # notice, this...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ @author: Stéphane Clinchant """ import math import random import warnings import numpy as np import tensorflow as tf try: tf.train.AdamOptimizer except AttributeError: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import sklearn.metrics #TODO Clean this # Animesh ...
codeparrot/github-code-clean
# ***** BEGIN GPL LICENSE BLOCK ***** # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distri...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """Views tests for the OSF.""" from __future__ import absolute_import import datetime as dt import httplib as http import json import math import time import unittest import urllib import datetime import mock from nose.tools import * # noqa PEP8 asserts from modularodm...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright (c) 2016-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test segwit transactions and blocks on P2P network.""" from decimal import Decimal import random import...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
codeparrot/github-code-clean
#__docformat__ = "restructuredtext en" # ******NOTICE*************** # optimize.py module by Travis E. Oliphant # # You may copy and use this module as you see fit with no # guarantee implied provided you keep this notice in all copies. # *****END NOTICE************ # A collection of optimization algorithms. Version ...
codeparrot/github-code-clean
# Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. """A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ __version__ = '1.0' import functools IPV4LENGTH = 32 IPV6LENGTH = 128 class Add...
codeparrot/github-code-clean
# sql/selectable.py # Copyright (C) 2005-2014 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 :class:`.FromClause` class of SQL expression elements, representing SQL table...
codeparrot/github-code-clean
import sublime import sublime_plugin import re import operator import datetime import time import uuid import subprocess import tempfile import os import json import sys import hashlib import shlex import unittest import itertools from os.path import expanduser, normpath, join, isfile from decimal import * SETTINGS_F...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Test cases related to XSLT processing """ import io import sys import copy import gzip import os.path import unittest import contextlib from textwrap import dedent from tempfile import NamedTemporaryFile this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert...
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
# -*- 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
#! /usr/bin/python # coding: utf-8 from __future__ import print_function ''' OneDrive class version 1.0 : 10 february 2015 : paulvh Initial version Version 2.0 / December 2015 / paulvh bug fixes included caching (OneDrive REST is Soooo slow) Version 2.0.1 / December 2015 / paulvh include support for working direct...
codeparrot/github-code-clean
talks = [ "Bren Brown - The power of vulnerability", "Isabel Behncke - Evolutions gift of play from bonobo apes to humans", "Josette Sheeran - Ending hunger now", "Iain Hutchison - Saving faces A facial surgeons craft", "Fred Jansen - How to land on a comet", "Clayton Cameron - A-rhythm-etic. Th...
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
# 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
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
# Copyright (C) 2009 Google Inc. All rights reserved. # Copyright (C) 2009, 2016 Apple Inc. All rights reserved. # Copyright (C) 2011 Daniel Bates (dbates@intudata.com). All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ This file contains some classical ciphers and routines implementing a linear-feedback shift register (LFSR) and the Diffie-Hellman key exchange. .. warning:: This module is intended for educational purposes only. Do not use the functions in this module for real cryptographic applica...
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
#!/usr/bin/env python # # ESP8266 & ESP32 ROM Bootloader Utility # Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton, Espressif Systems (Shanghai) PTE LTD, other contributors as noted. # https://github.com/espressif/esptool # # This program is free software; you can redistribute it and/or modify it under # the ter...
codeparrot/github-code-clean
import numpy as np def gsh_basis_info(): indxvec = np.array([[0, 0, 1], [2, -2, 1], [2, -1, 1], [2, 0, 1], [2, 1, 1], [2, 2, 1], [4, -4, 1], [4, ...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.html import * from gluon.storage import Storage from gluon.validators import IS_NOT_EMPTY from s3.s3fie...
codeparrot/github-code-clean
""" test_validate.py Testing code for Validation class Contributors: mitra.siddhartha@gmail.com """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import str try: basestring except NameError: b...
codeparrot/github-code-clean
#------------------------------------------------------------------ WSPR # $Date: 2008-03-17 08:29:04 -0400 (Mon, 17 Mar 2008) $ $Revision: 2326 $ # #from Tkinter import * #from tkFileDialog import * #import tkMessageBox from tkrep import * import os,time,sys #from WsprMod import g,Pmw from WsprMod import palettes from...
codeparrot/github-code-clean
# coding: utf-8 # pylint: disable= too-many-lines, redefined-builtin, protected-access # pylint: disable=import-error, no-name-in-module, undefined-variable """NDArray API of MXNet.""" from __future__ import absolute_import from __future__ import division try: from __builtin__ import slice as py_slice except Import...
codeparrot/github-code-clean
# Copyright 2015-2018 Altova GmbH # # 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 wri...
codeparrot/github-code-clean
#!/usr/bin/env python # # Generated Sun Apr 21 10:04:52 2013 by parse_xsd.py version 0.5. # import saml2 from saml2 import SamlBase NAMESPACE = 'urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword' class PhysicalVerification(SamlBase): """The urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocol...
codeparrot/github-code-clean
# # The BSD License (BSD) # # Copyright (c) 2016 Tintri, 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 copyright notice,...
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
## @file # Generate AutoGen.h, AutoGen.c and *.depex files # # Copyright (c) 2007 - 2014, 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 t...
codeparrot/github-code-clean
from __future__ import unicode_literals from collections import OrderedDict import datetime from operator import attrgetter import pickle import unittest import warnings from django.core.exceptions import FieldError from django.db import DatabaseError, connection, connections, DEFAULT_DB_ALIAS from django.db.models i...
codeparrot/github-code-clean