text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# Copyright 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 requi...
codeparrot/github-code-clean
########################################################################## # # Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
codeparrot/github-code-clean
""" Provides full versioning CRUD and representation for collections of xblocks (e.g., courses, modules, etc). Representation: * course_index: a dictionary: ** '_id': a unique id which cannot change, ** 'org': the org's id. Only used for searching not identity, ** 'course': the course's catalog number ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServer API. From build dir, run: ctest -R PyQgsServerApi -V .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the Licens...
codeparrot/github-code-clean
#!/usr/bin/env python # # run-tests.py - Run a set of tests on Mercurial # # Copyright 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # Modifying this script is tricky because it has many modes...
codeparrot/github-code-clean
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
codeparrot/github-code-clean
#################################################################################################### # neuropythy/vision/retinotopy.py # Tools for registering the cortical surface to a particular potential function # By Noah C. Benson import numpy as np import numpy.linalg as np...
codeparrot/github-code-clean
from __future__ import absolute_import, print_function, division from copy import copy import sys from textwrap import dedent import warnings import logging import numpy from six import integer_types from six.moves import xrange import theano from theano.compat import izip from theano.gradient import DisconnectedType...
codeparrot/github-code-clean
import copy from datetime import timedelta from textwrap import dedent from typing import Dict, Optional, Union, no_type_check import numpy as np from pandas._libs import lib from pandas._libs.tslibs import ( IncompatibleFrequency, NaT, Period, Timedelta, Timestamp, to_offset, ) from pandas._t...
codeparrot/github-code-clean
import tempfile import sys import os import numpy as np from numpy.testing import * from numpy.core import * from numpy.core.multiarray_tests import test_neighborhood_iterator, test_neighborhood_iterator_oob from numpy.compat import asbytes, getexception, strchar from test_print import in_foreign_locale class TestFl...
codeparrot/github-code-clean
#!/usr/bin/env python # # Please follow # http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines # # Author: Pearu Peterson # Created: July 2009 """ See http://pylibnidaqmx.googlecode.com/ """ from __future__ import print_function __all__ = ['AnalogInputTask', 'AnalogOutputTask', 'DigitalInputTask',...
codeparrot/github-code-clean
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ desitarget.randoms ================== Monte Carlo Legacy Surveys imaging at the pixel level to model the imaging footprint """ import os import numpy as np import astropy.io.fits as fits from astropy.wcs import WCS from time im...
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
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE 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
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify # it under the terms of ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.forms import * from django.forms.widgets import RadioFieldRenderer from django.utils import formats from django.utils.s...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Unit tests for instructor.api methods. """ import datetime import functools import io import json import random import shutil import tempfile import ddt from boto.exception import BotoServerError from django.conf import settings from django.contrib.auth.models import User from django.core i...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * otData = [ # # common # ('LookupOrder', []), ('ScriptList', [ ('uint16', 'ScriptCount', None, None, 'Number of ScriptRecords'), ('struct', 'ScriptRecord', 'ScriptCount', 0, 'Array of ScriptRec...
codeparrot/github-code-clean
#!/usr/bin/python # Working script to generate maps from wrfout netCDF files # using matplot lib with basemap # Basemap coding from David John Gagne II # Written by Luke Madaus for use with operational WRF domains from matplotlib.colors import LinearSegmentedColormap def RdBufloat(valrange): # Will define ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """pefile, Portable Executable reader module All the PE file basic structures are available with their default names as attributes of the instance returned. Processed elements such as the import table are made available with lowercase names, to differentiate them from the upp...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import curses from copy import deepcopy from textwrap import wrap import glob import csv from os import path, sep, remove from sys import platform from .common import * from .window_stack import Window_Stack_Constants from .cjkwrap import cjklen from .config import SUPPORTED_PLAYERS from .encod...
codeparrot/github-code-clean
#---------------------------------------------------------------------- # This file was generated by encode_bitmaps.py # from wx.lib.embeddedimage import PyEmbeddedImage Mondrian = PyEmbeddedImage( "iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABHNCSVQICAgIfAhkiAAAAHFJ" "REFUWIXt1jsKgDAQRdF7xY25cpcWC60kioI6F...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Loaders and downloaders for data files and models required for the examples in NLP in Action >>> df = get_data('cities_us') >>> df.iloc[:3,:2] geonameid city 131484 4295856 Indian Hills Cherokee Section 137549 5322551 ...
codeparrot/github-code-clean
# TODO: OSErrors / can.CanErrors are thrown if the CAN bus goes down, need to do threaded Exception handling # See http://stackoverflow.com/questions/2829329/catch-a-threads-exception-in-the-caller-thread-in-python # TODO: Check for BUS-OFF before attempting to send # TODO: NMT error handler (CiA302-2) from binasc...
codeparrot/github-code-clean
# -*- encoding: utf8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Li...
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
# Py2 compat from __future__ import print_function from future import standard_library standard_library.install_aliases() from past.builtins import basestring # standard lib import copy import datetime from decimal import * from functools import reduce import imp import json import math import os import random import ...
codeparrot/github-code-clean
""" .. module:: tests.test :platform: Unix, Windows :synopsis: Graph-talk unit tests .. moduleauthor:: Stas Kravets (krvss) <stas.kravets@gmail.com> """ import unittest from inspect import ArgSpec import os from gt.debug import * from gt.export import * # Test functions def state_v_starter(**context): i...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for commands.""" from __future__ import print_function import base64 import collections import datetime as dt i...
codeparrot/github-code-clean
#!/usr/bin/env python #============================================================================ # Copyright (c) Microsoft Corporation. All rights reserved. See license.txt for license information. #============================================================================ import os import sys import imp import co...
codeparrot/github-code-clean
from __future__ import unicode_literals import bz2 from django.core.files.uploadedfile import SimpleUploadedFile from django.http import HttpResponse from django.test import RequestFactory from django.utils.six.moves import zip_longest from djblets.cache.backend import cache_memoize from djblets.db.fields import Base...
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
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2015 GEM Foundation # # The Catalogue Toolkit 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 ...
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 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
# # Author: Travis Oliphant, 2002 # from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy._lib.six import xrange from numpy import (pi, asarray, floor, isscalar, iscomplex, real, imag, sqrt, where, mgrid, sin, place, issubdtype, extract, ...
codeparrot/github-code-clean
#! /usr/bin/env python """ This page is in the table of contents. Fill is a script to fill the perimeters of a gcode file. The fill manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Fill Allan Ecker aka The Masked Retriever has written the "Skeinforge Quicktip: Fill" at: http://blog.thingiver...
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
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 # -------------------------------------------------------------------------- # 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 # -------------------------------------------------------------------------- # 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
""" Author: Justin Cappos Module: A shell for Seattle called seash (pronounced see-SHH). It's not meant to be the perfect shell, but it should be good enough for v0.1 Start date: September 18th, 2008 This is an example experiment manager for Seattle. It allows a user to locate vessels they control and ...
codeparrot/github-code-clean
"""Base Class and Utilities for C/C++ Compiler Tools. @see: Cake Build System (http://sourceforge.net/projects/cake-build) @copyright: Copyright (c) 2010 Lewis Baker, Stuart McMahon. @license: Licensed under the MIT license. """ import sys import weakref import os import os.path import datetime import tempfile import...
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
""" Student Views """ import datetime import logging import uuid import time import json import warnings from collections import defaultdict from pytz import UTC from pprint import pprint from ipware.ip import get_ip from django.conf import settings from django.contrib.auth import logout, authenticate, login from djan...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Library to extract EXIF information from digital camera image files # http://sourceforge.net/projects/exif-py/ # # VERSION 1.1.0 # # To use this library call with: # f = open(path_name, 'rb') # tags = EXIF.process_file(f) # # To ignore MakerNote tags, pass the -q or --quick # command l...
codeparrot/github-code-clean
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
codeparrot/github-code-clean
# 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. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
codeparrot/github-code-clean
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 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 (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright no...
codeparrot/github-code-clean
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
codeparrot/github-code-clean
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright 2010 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 ...
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
#!/usr/bin/python -t """Handle actual output from the cli.""" # 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
import re from typing import ( Iterable, List, Tuple, ) from pcs.cli.common.output import format_with_indentation from pcs.cli.reports.output import print_to_stderr from pcs.common.str_tools import ( indent, outdent, ) # pylint: disable=too-many-lines, too-many-branches, global-statement examples...
codeparrot/github-code-clean
""" Name: u3.py Desc: Defines the U3 class, which makes working with a U3 much easier. All of the low-level functions for the U3 are implemented as functions of the U3 class. There are also a handful additional functions which improve upon the interface provided by the low-level functions. To learn a...
codeparrot/github-code-clean
import numpy as np from astropy.table import Table from astropy.io import fits import matplotlib.pyplot as plt import matplotlib import pickle from TheCannon_2 import dataset,apogee from TheCannon_2 import model pkl_file = open('wl.pkl', 'rb') wl = pickle.load(pkl_file) pkl_file.close() # load path pkl_file = op...
codeparrot/github-code-clean
from __future__ import absolute_import import wx from wx.lib.pubsub import pub import wx.lib.layoutf as layoutf import numpy as np import threading import warnings import psutil import time import os import sys import pickle import glob from astropy.io import fits from astropy import wcs from astropy.coordinates import...
codeparrot/github-code-clean
import time, os.path, platform, stat, re, simplejson, struct import mock from twisted.trial import unittest from twisted.internet import defer from twisted.application import service from foolscap.api import fireEventually import itertools from allmydata import interfaces from allmydata.util import fileutil, hashuti...
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 2 # of the License, or (at your option) any later version. # # This program is distributed ...
codeparrot/github-code-clean
# (C) British Crown Copyright 2010 - 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
codeparrot/github-code-clean
# Lint as: python2, python3 # Copyright 2019 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 # ...
codeparrot/github-code-clean
# Copyright (c) 2014 Red Hat, 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
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # NOQA from ibeis.algo.verif import vsone from ibeis.scripts._thesis_helpers import DBInputs from ibeis.scripts._thesis_helpers import Tabular, upper_one, ave_str from ibeis.scripts._thesis_helpers import TMP_RC,...
codeparrot/github-code-clean
# Copyright 2014 Red Hat, 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 writing, ...
codeparrot/github-code-clean
""" In this module, we define the coordinate representation classes, which are used to represent low-level cartesian, spherical, cylindrical, and other coordinates. """ import abc import functools import operator import inspect import warnings import numpy as np import astropy.units as u from erfa import ufunc as erf...
codeparrot/github-code-clean
from __future__ import print_function, division from sympy.core import Expr, S, sympify, oo, pi, Symbol from sympy.core.compatibility import as_int, range from sympy.functions.elementary.complexes import sign from sympy.functions.elementary.piecewise import Piecewise from sympy.functions.elementary.trigonometric impor...
codeparrot/github-code-clean
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Cros unit test library, with utility functions.""" from __future__ import print_function import collections import contextlib import cookielib im...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """The documentation functions.""" # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) from copy import deepcopy import inspect import os import os.path as op import sys import warnings import webbrowser from .config import get_config from ..defaults import HEAD_SIZE_D...
codeparrot/github-code-clean
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import sys import platform from decimal import Decimal import warnings import itertools import numpy as np from numpy.core import * from numpy.random import rand, randint, randn from numpy.testing import * from numpy.core.multiarray import dot as dot_ ...
codeparrot/github-code-clean
"""Tests for the user API at the HTTP request level. """ import datetime import json from unittest import skipUnless import ddt import httpretty import mock from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse from djang...
codeparrot/github-code-clean
# # Copyright (c) 2017 Intel Corporation # SPDX-License-Identifier: BSD-2-Clause # import numpy import operator from numba.core import types, ir, config, cgutils, errors from numba.core.ir_utils import ( mk_unique_var, find_topo_order, dprint_func_ir, get_global_func_typ, guard, require, ge...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS 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 versio...
codeparrot/github-code-clean
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
codeparrot/github-code-clean
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order to get ...
codeparrot/github-code-clean
# VMware vCloud Python SDK # Copyright (c) 2014 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...
codeparrot/github-code-clean
""" Class hierarchies for constructing and working with finite element spaces .. inheritance-diagram:: proteus.FemTools :parts: 1 """ from __future__ import print_function from __future__ import absolute_import from __future__ import division from builtins import zip from builtins import str from builtins import ra...
codeparrot/github-code-clean
# Script control setup area # script info __script__.title = 'KKB Plot and Reduction 14.12.2021' __script__.version = '2.0' # 15.6.2017 Allow to reduce the detector range # 15.6. Throw out points below resolution # 16.6. Tidy up run time to display in the reduction; tidy up display properties # 11.7...
codeparrot/github-code-clean
#!/usr/bin/python import wx import string from sys import stderr from math import sqrt, sin, cos, pi from random import Random # Not actually used in this module; rather, imported to ensure that # colorsys gets imported in py2exe'd packages. import colorsys ALPHA = 1 NUMERIC = 2 DIGITS = 3 MULTI = 1 SINGLE = 2 # #...
codeparrot/github-code-clean
# size limit at 1280x1280 # http://maps.googleapis.com/maps/api/staticmap?size=500x500&path=color:0x000000|weight:10|44.35789,11.3093|44.4378,11.3935&format=GIF&maptype=satellite&scale=2 import os import sys import subprocess import platform from xml.sax import saxutils, parse, handler if __name__ == '__main__': ...
codeparrot/github-code-clean
# This script generates the PyQt configuration and generates the Makefiles. # # Copyright (c) 2015 Riverbank Computing Limited <info@riverbankcomputing.com> # # This file is part of PyQt4. # # This file may be used under the terms of the GNU General Public License # version 3.0 as published by the Free Software Found...
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
# 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
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a c...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Created on Mon Jun 20 15:55:59 2016 @author: ganong """ import os os.environ["R_HOME"] = "/Library/Frameworks/R.framework/Resources" os.chdir("/Users/ganong/repo/HARK-comments-and-cleanup/gn") out_path = "~/dropbox/hampra/out/" import settings import sys sys.path.insert(0,'../') sys.path.i...
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 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 2012 Managed I.T. # Copyright 2013 - 2014 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 a...
codeparrot/github-code-clean
from __future__ import absolute_import, division, print_function from collections import Iterator from distutils.version import LooseVersion import operator from operator import getitem, setitem from pprint import pformat import uuid import warnings from toolz import merge, partial, first, unique, partition_all impor...
codeparrot/github-code-clean
# Copyright 2017 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. """Main Python API for analyzing binary size.""" import argparse import bisect import calendar import collections import datetime import gzip import itertoo...
codeparrot/github-code-clean
# Copyright (c) 2012 Rackspace Hosting # 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
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Apr 2011: Jeffrey Armstrong <jeff@approximatrix.co...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import pytz import re import time import openerp import openerp.service.report import uuid import collections import babel.dates from werkzeug.exceptions import BadRequest from datetime import datetime, timedelta from dateutil import parser from dateutil import rrule from dateutil.relativedelta...
codeparrot/github-code-clean
#!/usr/local/bin/python2.6 -tt # # 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 (...
codeparrot/github-code-clean
# coding: utf-8 """ Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path opera...
codeparrot/github-code-clean