text
stringlengths
5.09k
178k
domain
stringclasses
106 values
#!/usr/bin/python import re from numpy import array import argparse import sys import csv import pysam import warnings from operator import itemgetter, attrgetter import itertools from math import floor #### This program is Copyright (C) 2013, Peter Hickey (peter.hickey@gmail.com) #### ## This program is free softwar...
codeparrot/github-code-clean
# Copyright 2010 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
codeparrot/github-code-clean
from __future__ import absolute_import, unicode_literals import base64 import hashlib import hmac import json import phonenumbers import plivo import pycountry import pytz import time import requests from datetime import datetime, timedelta from django import forms from django.conf import settings from django.contrib...
codeparrot/github-code-clean
""" Student Views """ import datetime import logging import uuid import json import warnings from collections import defaultdict from urlparse import urljoin, urlsplit, parse_qs, urlunsplit from django.views.generic import TemplateView from pytz import UTC from requests import HTTPError, ConnectionError from ipware.ip...
codeparrot/github-code-clean
#!/usr/bin/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 can redis...
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): # Adding model 'Poke' db.create_table(u'core_poke', ( (u'base...
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 2012, Nachi Ueno, NTT MCL, 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 # # Unles...
codeparrot/github-code-clean
# Copyright (C) 2020 NTT DATA # 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
# # Parse tree nodes # from __future__ import absolute_import import cython cython.declare(sys=object, os=object, copy=object, Builtin=object, error=object, warning=object, Naming=object, PyrexTypes=object, py_object_type=object, ModuleScope=object, LocalScope=object, ClosureScope=obje...
codeparrot/github-code-clean
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA 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 cop...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Figure classes for MNE-Python's 2D plots. Class Hierarchy --------------- MNEFigParams Container object, attached to MNEFigure by default. Sets close_key='escape' plus whatever other key-value pairs are passed to its constructor. matplotlib.figure.Figure ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ S3 SQL Forms @copyright: 2012-15 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restrict...
codeparrot/github-code-clean
#!/usr/bin/env python # # upgrade_tests.py: test the working copy upgrade process # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) und...
codeparrot/github-code-clean
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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 lat...
codeparrot/github-code-clean
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
codeparrot/github-code-clean
# May you do good and not evil # May you find forgiveness for yourself and forgive others # May you share freely, never taking more than you give. -- SQLite source code # # As we enjoy great advantages from the inventions of others, we should be glad # of an opportunity to serve others by an invention of ours, and thi...
codeparrot/github-code-clean
#!/usr/bin/env/python # qsgen.py - Generate XPConnect quick stubs. # # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (the "License"); you may not use this file except in compliance with # the License. You may obt...
codeparrot/github-code-clean
# testCube.py import unittest from ..src import cube class TestCube(unittest.TestCase): def test_start_faces(self): myCube = cube.Cube() for i in range(0, 9): self.assertEqual(myCube.face['right'][i], 'w') self.assertEqual(myCube.face['bottom'][i], 'o') self.as...
codeparrot/github-code-clean
import os from time import time from enigma import eDVBDB, eEPGCache, setTunerTypePriorityOrder, setPreferredTuner, setSpinnerOnOff, setEnableTtCachingOnOff, eEnv, Misc_Options, eBackgroundFileEraser, eServiceEvent from Components.About import about from Components.Harddisk import harddiskmanager from config import Co...
codeparrot/github-code-clean
#pylint: disable-msg=C0103,C0301,C0302 # This file gets automatically extended by ctypeslib.dynamic_module, so don't # edit it yourself. from ctypes import * #pylint: disable-msg=W0401,W0614 from ctypes.wintypes import * #pylint: disable-msg=W0401,W0614 _user32 = WinDLL("user32") _kernel32 = WinDLL("kernel32"...
codeparrot/github-code-clean
# Copyright (C) 2003 - 2015 The Board of Regents of the University of Wisconsin System # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope...
codeparrot/github-code-clean
# coding=UTF-8 """ Tests courseware views.py """ import itertools import json import unittest from datetime import datetime, timedelta from HTMLParser import HTMLParser from urllib import quote, urlencode from uuid import uuid4 import ddt from django.conf import settings from django.contrib.auth.models import Anonymou...
codeparrot/github-code-clean
############################################################################### # HNet GUI # Copyright (C) 2016-2017 Heejo You # # 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 versi...
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 # ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2008-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. #...
codeparrot/github-code-clean
import re import pytest import numpy as np import warnings from scipy.sparse import csr_matrix from sklearn import datasets from sklearn import svm from sklearn.utils.extmath import softmax from sklearn.datasets import make_multilabel_classification from sklearn.random_projection import _sparse_random_matrix from skl...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Ricardo Garcia Silva <ricardo.garcia.silva@gmail.com> # # Copyright (c) 2017 Tom Kralidis # Copyright (c) 2016 James F. Dickens # Copyright (c) 2017 Ricardo Garcia Sil...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitsend Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import BitsendTestFramework from test...
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 applicabl...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
codeparrot/github-code-clean
# Copyright (c) 2003-2012 CORE Security Technologies) # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # $Id: smbserver.py 611 2012-07-15 19:25:01Z bethus@gmail.com $ # # Author: Alberto Solino # TODO: # [...
codeparrot/github-code-clean
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
codeparrot/github-code-clean
# @author zfedoran / http://github.com/zfedoran import os import sys import math import operator import re import json import types import shutil # ##################################################### # Globals # ##################################################### option_triangulate = True option_textures = True o...
codeparrot/github-code-clean
"""Wrapper functions for Tcl/Tk. Tkinter provides classes which allow the display, positioning and control of widgets. Toplevel widgets are Tk and Toplevel. Other widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton, Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox LabelFrame and PanedWindow. ...
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 -*- version = "3.12" # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 Foundati...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2010, Greg Riker' import datetime, htmlentitydefs, os, platform, re, shutil, unicodedata, zlib from copy import deepcopy from xml.sax.saxutils import escape from calibre import (prepare_string_for_xml, strftime, force_unicode, isbytestring) fr...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Unit tests for instructor.api methods. """ import datetime import ddt import random import pytz import io import json import requests import shutil import tempfile from urllib import quote from unittest import skip from django.conf import settings from django.contrib.auth.models import User ...
codeparrot/github-code-clean
# Author: Steven J. Bethard <steven.bethard@gmail.com>. """Command-line parsing library This module is an optparse-inspired command-line parsing library that: - handles both optional and positional arguments - produces highly informative usage messages - supports parsers that dispatch to sub-parsers The...
codeparrot/github-code-clean
from numpy import array import matplotlib as mpl LUTSIZE = mpl.rcParams['image.lut'] del mpl import matplotlib.colors as colors #These are standard National Weather Service Radar Colortables _NWSRef_data = { 'blue': [(0.0, 0.92549019607843142, 0.92549019607843142), (0.07142857, 0.96470588235294119, 0...
codeparrot/github-code-clean
from sympy import ( Abs, acos, acosh, Add, And, asin, asinh, atan, Ci, cos, sinh, cosh, tanh, Derivative, diff, DiracDelta, E, Ei, Eq, exp, erf, erfc, erfi, EulerGamma, Expr, factor, Function, gamma, gammasimp, I, Idx, im, IndexedBase, integrate, Interval, Lambda, LambertW, log, Matrix, Max, meijerg, Mi...
codeparrot/github-code-clean
"""Line-like geometrical entities. Contains ======== LinearEntity Line Ray Segment LinearEntity2D Line2D Ray2D Segment2D LinearEntity3D Line3D Ray3D Segment3D """ from __future__ import division, print_function from sympy import Expr from sympy.core import S, sympify from sympy.core.compatibility import ordered fro...
codeparrot/github-code-clean
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import itertools import math import os import random import shutil import tempfile import unittest impor...
codeparrot/github-code-clean
#!/usr/bin/env python """ Module that contains classes holding cross-correlations and related processing, such as frequency-time analysis (FTAN) to measure dispersion curves. """ from seissuite.ant import pserrors, psstation, psutils, pstomo import obspy.signal import obspy.xseed import obspy.signal.cros...
codeparrot/github-code-clean
from itertools import product import pytest import re import numpy as np from scipy.sparse import ( bsr_matrix, coo_matrix, csc_matrix, csr_matrix, dok_matrix, lil_matrix, issparse, ) from sklearn import metrics from sklearn import neighbors, datasets from sklearn.base import clone from sk...
codeparrot/github-code-clean
# will need to get this converted to units for other force fields if # required for the input parameter format def get_cmap_charts(): cmap_charts = [] cmap_charts.append(""" ffio_cmap1[576] { r_ffio_ai r_ffio_aj r_ffio_c1 ::: 1 -180 -180 0.12679 2 -180 -165 0.7687 3 -180 -150 0....
codeparrot/github-code-clean
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
codeparrot/github-code-clean
import nose import numpy as np from numpy.random import randn from datetime import datetime from pandas.compat import StringIO, iteritems import pandas as pd from pandas import (DataFrame, concat, read_csv, isnull, Series, date_range, Index, Panel, MultiIndex, Timestamp, ...
codeparrot/github-code-clean
import copy import re from . import util from . import types from . import syntax from . import grammar from . import xpath from .error import err_add ### Functions that plugins can use def add_validation_phase(phase, before=None, after=None): """Add a validation phase to the framework. Can be used by plugi...
codeparrot/github-code-clean
''' Module of learners used to determine what parameters to try next given previous cost evaluations. Each learner is created and controlled by a controller. ''' from __future__ import absolute_import, division, print_function __metaclass__ = type import threading import numpy as np import random import numpy.random ...
codeparrot/github-code-clean
# Generated from SmallC.g4 by ANTLR 4.6 # encoding: utf-8 from antlr4 import * from io import StringIO def serializedATN(): with StringIO() as buf: buf.write("\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\39") buf.write("\u0189\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7") buf.writ...
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 from collections import defaultdict import re import csv import warnings import numpy as np...
codeparrot/github-code-clean
# ScWindow.py: Dark Age of Camelot Spellcrafting Calculator (main Window) # # See http://kscraft.sourceforge.net/ for updates # # See NOTICE.txt for copyrights and grant of license from PyQt4.QtCore import * from PyQt4.QtGui import * from B_ScWindow import * from Item import * from Character import * from constants im...
codeparrot/github-code-clean
""" Generator extracts data from a master and slave database of product information, then synchronizes that information on several layers. In a typical configuration, the master is a spreadsheet of product information in the generator format, which is a custom heirarchical representation of product and category data de...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # Copyright (C) 2013-present Neil MacLeod (texturecache@nmacleod.com) # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
codeparrot/github-code-clean
# Copyright (C) 2008 CSC - Scientific Computing Ltd. """This module defines an ASE interface to VASP. Developed on the basis of modules by Jussi Enkovaara and John Kitchin. The path of the directory containing the pseudopotential directories (potpaw,potpaw_GGA, potpaw_PBE, ...) should be set by the environmental flag...
codeparrot/github-code-clean
#!/usr/bin/env python """ Utilities used in NGA classes """ import os, time import numpy as np # =================== # General Functions # =================== def cpt_sqrt( a,b ): a = np.array( a ) b = np.array( b ) return np.sqrt( a**2 + b**2 ) def RMScalc( V1,V2, Ratio=True ): N = len(V1) if ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Custom UI Widgets @requires: U{B{I{gluon}} <http://web2py.com>} @copyright: 2009-2012 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the...
codeparrot/github-code-clean
########################################################### # # Copyright (c) 2010, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
codeparrot/github-code-clean
from enigma import eTimer, eDVBSatelliteEquipmentControl, eDVBResourceManager, eDVBDiseqcCommand, eDVBFrontendParametersSatellite, iDVBFrontend from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.Satconfig import NimSetup from Screens.InfoBar...
codeparrot/github-code-clean
"""The request for analysis by a client. It contains analysis instances. """ import logging from dependencies.dependency import ClassSecurityInfo from dependencies.dependency import DateTime from dependencies.dependency import RecordsField from dependencies.dependency import indexer from dependencies.dependency 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 from sentry.utils.db import is_postgres class Migration(SchemaMigration): # Flag to indicate if this migration is too risky # to run online and...
codeparrot/github-code-clean
## Copyright (c) 2001-2010, Scott D. Peckham ## January 2009 (converted from IDL) ## May, August 2009 ## May 2010 (changes to unit_test() and read_cfg_file() ## June 2010 (Bug fix: Added qH_val and eta_val in ## set_computed_input_vars(). Unit test. ) #----------------------------------------------------...
codeparrot/github-code-clean
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
codeparrot/github-code-clean
"""Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipula...
codeparrot/github-code-clean
#! /usr/bin/env python import numpy as np import itertools from six.moves import range from ..grid.base import (CORE_NODE, FIXED_GRADIENT_BOUNDARY, FIXED_VALUE_BOUNDARY, TRACKS_CELL_BOUNDARY, CLOSED_BOUNDARY, BAD_INDEX_VALUE) def node_count(shape): """ The to...
codeparrot/github-code-clean
#!/usr/bin/env python # file test_demultiplex_fasta.py __author__ = "Rob Knight" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Rob Knight", "William Walters"] # remember to add yourself __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "William Walters" __email__ = "william.a.walter...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Natural Language Toolkit: Snowball Stemmer # # Copyright (C) 2001-2011 NLTK Project # Author: Peter Michael Stahl <pemistahl@gmail.com> # Peter Ljunglof <peter.ljunglof@heatherleaf.se> (revisions) # Algorithms: Dr Martin Porter <martin@tartarus.org> # URL: <http://www.nltk.org/> # Fo...
codeparrot/github-code-clean
import builtins import sys import types import unittest import warnings from copy import deepcopy from test import support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) self.binops = { 'add': '+', ...
codeparrot/github-code-clean
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
codeparrot/github-code-clean
import json import uuid from datetime import datetime import pytz import responses from django.conf import settings from django.db import IntegrityError from django.http import HttpResponse from django.test import override_settings, RequestFactory, tag from unittest import mock from casepro.contacts.models import Con...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import IntegrityError, models, transaction class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." db.commit_tr...
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 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from sentry.utils.db import is_postgres class Migration(SchemaMigration): # Flag to indicate if this migration is too risky # to run online and...
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
#Copyright 2008 Orbitz WorldWide # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable law or agreed to in writing, so...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created: Tue Sep 11 17:35:21 2012 # by: The Resource Compiler for PyQt (Qt v4.8.2) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = b"\ \x00\x00\x02\xb3\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright (c) 2015-2018 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 block processing.""" import copy import struct import time from test_framework.blocktools import ...
codeparrot/github-code-clean
#*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@frii.com> * #* ...
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
#!/usr/bin/env python import os, sys, re, math import numpy as np import IO from UI import QApp, GLMeshes # TODO move this colin from GCore import State, Calibrate, Character from copy import deepcopy g_transformTypes = {'transform', 'joint', 'locator','ikHandle', 'airField','hikFKJoint'} # derived from transform g_c...
codeparrot/github-code-clean
import sqlalchemy as sa from sqlalchemy import and_ from sqlalchemy import cast from sqlalchemy import column from sqlalchemy import desc from sqlalchemy import event from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import inspect from sqlalchemy import ...
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 for editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported. The :cl...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Inventory Management A module to record inventories of items at a locations (sites), including Warehouses, Offices, Shelters & Hospitals """ if not settings.has_module(c): raise HTTP(404, body="Module disabled: %s" % c) # --------------------------------------------------...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ######################################################################## # # # python-OBD: A python OBD-II serial module derived from pyobd # # # # C...
codeparrot/github-code-clean
#!/usr/bin/python import logging logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s") import procgame.game, sys, os import procgame.config import random import procgame.sound sys.path.insert(0,os.path.pardir) import bingo_emulator.common.units as units import bingo_em...
codeparrot/github-code-clean
#!/usr/bin/env python3 import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("-m", "--midiout", help="enable midi output", action="store_true") parser.add_argument("-c", "--midiport", type=int, help="connect to midi port") parser.add_argument("-l", "--listmidiports", help="list mid...
codeparrot/github-code-clean
""" Test Scipy functions versus mpmath, if available. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import dec, run_module_suite, assert_, assert_allclose from numpy import pi import scipy.special as sc from scipy._lib.six import with_metaclass from scipy....
codeparrot/github-code-clean
#!/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2016, Mario Vilas # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above cop...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright 2013 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. """Chromium auto-bisect tool This script bisects a range of commits using binary search. It starts by getting reference values for the...
codeparrot/github-code-clean
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
codeparrot/github-code-clean
# -*- 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 s3 import ICON, S3DataListLayout, s3_unicode, S3SQ...
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
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Sets options for IPOPT. """ from pypower._compat import PY2 from pypower.util import feval if not PY2: basestring = str def ipopt_options(overrides=Non...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Helpers for various transformations.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD-3-Clause import os import os.path as op import glob import numpy as np from copy import deepcopy from .fixes impor...
codeparrot/github-code-clean