text
stringlengths
5.09k
178k
domain
stringclasses
106 values
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
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
#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_common_def(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def ip_dns_dom_name_domain_name(self, **kwargs): """Auto Generated Code ""...
codeparrot/github-code-clean
import numpy as np from openmc.mgxs.groups import EnergyGroups from openmc.mgxs.library import Library from openmc.mgxs.mgxs import * from openmc.mgxs.mdgxs import * GROUP_STRUCTURES = {} """Dictionary of commonly used energy group structures: - "CASMO-X" (where X is 2, 4, 8, 16, 25, 40 or 70) from the CASMO_ lattic...
codeparrot/github-code-clean
"""Tests for the Google Assistant traits.""" from datetime import datetime, timedelta import pytest from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, cover, fan, group, input_boolean, input_select, light, lock, media_player, scene, s...
codeparrot/github-code-clean
""" This module contain solvers for all kinds of equations: - algebraic or transcendental, use solve() - recurrence, use rsolve() - differential, use dsolve() - nonlinear (numerically), use nsolve() (you will need a good starting point) """ from __future__ import print_function, division f...
codeparrot/github-code-clean
# Resource object code (Python 3) # Created by: object code # Created by: The Resource Compiler for Qt version 5.15.2 # WARNING! All changes made in this file will be lost! from PySide2 import QtCore qt_resource_data = b"\ \x00\x00]0\ \x89\ PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\ \x00\x00\x91\x00\x00\x00\x91\x08...
codeparrot/github-code-clean
# Really simple expression types to handle arithmetic expressions referring # to other # defines class MacroExp: pass class MacroRef(MacroExp): def __init__(s, name): s._name = name; def eval(s): return lookup(s._name) def __add__(s, o): return MacroAdd(s, o) def __radd__(s, o): return Macro...
codeparrot/github-code-clean
# Copyright (C) 2009 Robert Collins <robertc@robertcollins.net> # Copyright (C) 2009 Canonical Ltd # Copyright (C) 2009 Duncan McGreggor <oubiwann@adytum.us> # Licenced under the txaws licence available at /LICENSE in the txaws source. from datetime import datetime import os from twisted.internet import reactor from ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script to check recently uploaded files. This script checks if a file description is present and if there are other problems in the image's description. This script will have to be configured for each language. Please submit translations as addition to the Pywikibot frame...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Project Model @copyright: 2011-2014 (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 witho...
codeparrot/github-code-clean
# This file is part of cldoc. cldoc 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the ...
codeparrot/github-code-clean
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
codeparrot/github-code-clean
# flake8: noqa # -*- coding: utf-8 -*- # PyXB bindings for NM:32e521a6da5b62d07147ea75b23acb0fb9726893 # Generated 2019-07-04 14:12:27.049172 by PyXB version 1.2.6 using Python 2.7.15.candidate.1 # Namespace http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2 from __future__ import unicode_literals import lo...
codeparrot/github-code-clean
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
codeparrot/github-code-clean
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this m...
codeparrot/github-code-clean
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # """ # - Author: steve simmert # - E-mail: steve.simmert@uni-tuebingen.de # - Copyright: 2015 # """ from . import ureg from . import name_constants as co from .plotting import add_plot_to_figure from .plotting import col_dict from .psd import apply_aliasing from .psd import apply_low_pass_fi...
codeparrot/github-code-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # final level Graphical User Interface for stagecontrol.py # Swapped to PyQt5 from Tkinter, because the former is more powerful/intuitive to implement features # microgui will pair functions with commands imported from stagecontrol.py which uses raster in turn # I'm sorr...
codeparrot/github-code-clean
# Copyright 2021 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 or agreed to in writing, ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Views tests for the OSF.''' from __future__ import absolute_import import unittest import json import datetime as dt import mock import httplib as http import math import time from nose.tools import * # noqa PEP8 asserts from tests.test_features import requires_searc...
codeparrot/github-code-clean
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('VVU', doc=""" These methods are not a class. Utility methods perform various operations on :class:`VV` objects, including pruning, splining, clipping and f...
codeparrot/github-code-clean
# Copyright (c) 2020, 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 sys import itertools import numpy as np import pytest import torch.nn as nn from .testing_uti...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import mock import pytest from urlparse import urlparse from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from osf.models import NodeLog from osf.models.licenses import NodeLicense from osf.utils.sanitize import strip_html from osf.utils import permissions fr...
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 ############################## ## ## MLTreeMap TSN v. 0.0 ## ############################## try: import sys import os from os import path, _exit import shutil import re import glob import subprocess from optparse import OptionParser import time except: print ""...
codeparrot/github-code-clean
""" Python test discovery, setup and run of test functions. """ import fnmatch import functools import inspect import re import types import sys import py import pytest from _pytest._code.code import TerminalRepr from _pytest.mark import MarkDecorator, MarkerError try: import enum except ImportError: # pragma: n...
codeparrot/github-code-clean
#!/usr/bin/env python ################################################################################ # # A bunch of regression type tests for the builder and parser. # ################################################################################ ident = '$Id: SOAPtest.py,v 1.19 2004/04/01 13:25:46 warnes Exp $' ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ pygments.lexers.compiled ~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for compiled languages. :copyright: Copyright 2006-2012 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 __future__ import absolute_import from __future__ import division from builtins import zip from builtins import str from builtins import range from past.utils import old_div import proteus from proteus import Profiling import numpy as np from proteus.Transport import OneLevelTransport from proteus.Transport import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' Created on 19 Nov 2014 @author: alasdaire ''' import numpy as np import pandas as pd import quantipy as qp from quantipy.core.cluster import Cluster from quantipy.core.chain import Chain from quantipy.core.helpers import functions as helpers from quantipy.core.tools.dp.io import unicoder f...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007 Johan Gonqvist <johan.gronqvist@gmail.com> # Copyright (C) 2007-2009 Gary Burton <gary.burton@zen.co.uk> # Copyright (C) 2007-2009 Stephane Charet...
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 # Copyright 2022 The Trax Authors. # # 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
# 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 requ...
codeparrot/github-code-clean
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # encoding=UTF8 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file ...
codeparrot/github-code-clean
import re from django.apps import apps from modularodm import Q from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import PermissionDenied, ValidationError, NotFound, MethodNotAllowed, NotAuthenticated from rest_framework.response import Response from rest_framework.stat...
codeparrot/github-code-clean
# coding: utf-8 import re import datetime from django.core.files import temp as tempfile from django.test import TestCase from django.contrib.auth import admin # Register auth models with the admin. from django.contrib.auth.models import User, Permission, UNUSABLE_PASSWORD from django.contrib.contenttypes.models impor...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 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 by the Free Software Found...
codeparrot/github-code-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Mads Jensen <mje.mads@gmail.com> # # License: BSD-3-Clause import contextlib import copy import os.path as op from types import GeneratorTy...
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
# -*- coding: utf-8 -*- # Resource object code # # Created: Sun Dec 28 15:03:07 2014 # by: The Resource Compiler for PyQt (Qt v5.4.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x05\x9a\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\...
codeparrot/github-code-clean
<<<<<<< HEAD <<<<<<< HEAD import unittest from test import support from random import random from math import atan2, isnan, copysign import operator INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing class ComplexTest(unittest.TestCase): def assertAlmostEqual(self,...
codeparrot/github-code-clean
''' The main functions of this program are: 1) Thread a protein sequence using: ThreadSeq(seq) seq is string of amino acids in the form seq = 'SELNIYQYGGGNSALALQTDARNSDLTITQHGGGNGADVGQGSDDSSIDLTQ' You can use more options: ThreadSeq(seq,ScoreTolerance=2,ProteinName = '') ScoreTolerance is the threads score ...
codeparrot/github-code-clean
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module:...
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
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt4 (Qt v4.8.7) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x2c\x9d\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x02\x00\x00...
codeparrot/github-code-clean
from __future__ import division, print_function import numpy as np from bct.utils import BCTParamError, normalize, get_rng def ci2ls(ci): ''' Convert from a community index vector to a 2D python list of modules The list is a pure python list, not requiring numpy. Parameters ---------- ci : Nx...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
# 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
# -*- coding: utf-8 -*- # # PySPED - Python libraries to deal with Brazil's SPED Project # # Copyright (C) 2010-2012 # Copyright (C) Aristides Caldeira <aristides.caldeira at tauga.com.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Library General Public Lic...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # analytics_uvetest.py # # UVE and Alarm tests # import os import sys import threading threading._DummyThread._Thread__stop = lambda x: 42 import signal import gevent from gevent import monkey monkey.patch_all() import unitt...
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
#!/usr/bin/env python3 ## -*- coding: utf-8 -*- from __future__ import print_function from triton import * from unicorn import * from unicorn.arm_const import * import pprint import random import sys ADDR = 0x100000 STACK = 0x200000 HEAP = 0x300000 SIZE = 5 * 1024 * 1024 CODE ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2015 Spotify AB. All rights reserved. # # The contents of this file are 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/LICE...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function """ This module implements a friendly (well, friendlier) interface between the raw JSON responses from JIRA and the Resource/dict abstractions provided by this library. Users will construct a JIRA ob...
codeparrot/github-code-clean
from lib.common import helpers class Stager: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Js Launcher StarFighter', 'Author': ['@Cn33liz'], 'Description': ('Generates a .js launcher for Empire.'), 'Comments': [ 'https:/...
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
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
codeparrot/github-code-clean
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import math import warnings from base64 import b64decode, b64encode from itertools import tee from django.apps import apps from django.db import connection from django.db.models.lookups import...
codeparrot/github-code-clean
"""Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes.""" # Notes for authors of new mailbox subclasses: # # Remember to fsync() changes to disk before closing a modified file # or returning from a flush() method. See functions _sync_flush() and # _sync_close(). import os import time import calendar...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the me...
codeparrot/github-code-clean
#!/usr/bin/env python # encoding: utf-8 from __future__ import division import sys sys.path[0:0] = ["."] import unittest from mocodo.relations import * from mocodo.mcd import Mcd import json from mocodo.file_helpers import read_contents from mocodo.argument_parser import parsed_arguments clauses = """ PASS, 11 PEAK,...
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 distrib...
codeparrot/github-code-clean
# pylint: disable=E1101 from pandas.compat import u, range, map, openpyxl_compat, BytesIO, iteritems from datetime import datetime, date, time import sys import os from distutils.version import LooseVersion import warnings import operator import functools import nose from numpy import nan import numpy as np from num...
codeparrot/github-code-clean
# devicetree.py # Device management for anaconda's storage configuration module. # # Copyright (C) 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your opt...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.7.0) # # WARNING! All changes made in this file will be lost! from pyqode.qt import QtCore qt_resource_data = b"\ \x00\x00\x07\xe0\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x3...
codeparrot/github-code-clean
#!/env python # -*- coding: utf-8 -*- """ This file is part of web2py Web Framework (Copyrighted, 2007-2010). Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>. License: GPL v2 Thanks to * Niall Sweeny <niall.sweeny@fonjax.com> for MS SQL support * Marcel Leuthi <mluethi@mlsystems.ch> for Oracle suppor...
codeparrot/github-code-clean
# Help # Output a help topic. # License {{{1 # Copyright (C) 2016-2022 Kenneth S. Kundert # # 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) ...
codeparrot/github-code-clean
from __future__ import print_function, division from collections import defaultdict from sympy import SYMPY_DEBUG from sympy.core import (Basic, S, C, Add, Mul, Pow, Rational, Integer, Derivative, Wild, Symbol, sympify, expand, expand_mul, expand_func, Function, Equality, Dummy, Atom, count_ops, Expr, factor...
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 datetime import timedelta from gluon import current, Field from gluon.html import * from gluon.storage import Storage from gluon.valida...
codeparrot/github-code-clean
#!/usr/bin/env python """ crackfortran --- read fortran (77,90) code and extract declaration information. Copyright 1999-2004 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSE...
codeparrot/github-code-clean
# define the KCC object # # Copyright (C) Dave Craft 2011 # Copyright (C) Andrew Bartlett 2015 # # Andrew Bartlett's alleged work performed by his underlings Douglas # Bagnall and Garming Sam. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: latin-1 -*- # **************************************************************************** # * Software: FPDF for python * # * Version: 1.7.1 * # * Date: 2010-09-10 ...
codeparrot/github-code-clean
# $Id: VS.py,v 1.4 2005-07-14 01:36:41 gosselin_a Exp $ # $Log: not supported by cvs2svn $ # Revision 1.3 2004/08/02 17:06:20 gosselin # pyhdf-0.7.2 # # Revision 1.2 2004/08/02 15:36:04 gosselin # pyhdf-0.7-1 # # Author: Andre Gosselin # Maurice-Lamontagne Institute # gosselina@dfo-mpo.gc.ca """ VS...
codeparrot/github-code-clean
""" Python test discovery, setup and run of test functions. """ import re import fnmatch import functools import py import inspect import sys import pytest from _pytest.mark import MarkDecorator, MarkerError from py._code.code import TerminalRepr try: import enum except ImportError: # pragma: no cover # Only ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Vulnerability Controller """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # @ToDo: deployment_setting #countries = ["TL", "VN"] countries = ["VN"] #DEBUG = True #s...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright: See the LICENSE file. """Tests using factory.""" import datetime import functools import os import sys import warnings import factory from factory import errors from .compat import is_python2, unittest from . import utils class TestObject(object): def __init__(self, one=N...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """Module to transliterate text.""" # # (C) Pywikibot team, 2006-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals class transliterator(object): """Class to transliterating text.""" def __init__(self, encoding): ...
codeparrot/github-code-clean
# Author: Hubert Kario, (c) 2015 # Released under Gnu GPL v2.0, see LICENSE file for details """Objects for generating TLS messages to send.""" from tlslite.messages import ClientHello, ClientKeyExchange, ChangeCipherSpec,\ Finished, Alert, ApplicationData, Message, Certificate, \ CertificateVerify, C...
codeparrot/github-code-clean
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function FILE_ATTRIBUTE...
codeparrot/github-code-clean
# sql/elements.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 """Core sql expression elements, including :class:`.ClauseElement`, :class:`.ColumnE...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright 2006,2009,2011 Steve Stavropoulos <steve@math.upatras.gr> # # This file is part of Flexy. # # Flexy 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
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2017 - 2020 Mario Mlačak, mmlacak@gmail.com # Licensed under GNU GPL v3+ license. See LICENSING, COPYING files for details. from util import in_range import gen_steps as GS from piece import PieceType from board import BoardType, Board from board_view i...
codeparrot/github-code-clean
''' diacamma.condominium tests package @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios 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
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, datetime from dateutil import relativedelta import json import time import sets import openerp from openerp.osv import fields, osv from openerp.tools.float_utils import float_compare, float_ro...
codeparrot/github-code-clean
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www...
codeparrot/github-code-clean
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
codeparrot/github-code-clean
# Copyright (c) 2013 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...
codeparrot/github-code-clean
# Copyright 2013 IBM Corp. # 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/LIC...
codeparrot/github-code-clean
try: import json except ImportError: import simplejson as json import time import hashlib import uuid as uuid_lib import random import sys from base64 import urlsafe_b64encode from base64 import encodestring, decodestring import hmac from Crypto.Cipher import AES from Crypto.Hash import MD5 try: from ha...
codeparrot/github-code-clean
""" OLC Prototype menu nodes """ import json import re from random import choice from django.db.models import Q from django.conf import settings from evennia.objects.models import ObjectDB from evennia.utils.evmenu import EvMenu, list_node from evennia.utils import evmore from evennia.utils.ansi import strip_ansi fr...
codeparrot/github-code-clean
# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function __author__ = "Pierre GF Gerard-Marchant" import warnings import pickle i...
codeparrot/github-code-clean
""" Tests from Michael Wester's 1999 paper "Review of CAS mathematical capabilities". http://www.math.unm.edu/~wester/cas/book/Wester.pdf See also http://math.unm.edu/~wester/cas_review.html for detailed output of each tested system. """ from sympy import (Rational, symbols, factorial, sqrt, log, exp, oo, zoo, pr...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ ########## # Fields # ########## Each Field class does some sort of validation. Each Field has a clean() method, which either raises django.forms.ValidationError or returns the "clean" data -- usually a Unicode object, but, in some rare cases, a list. Each Field's __init__() takes at least...
codeparrot/github-code-clean
# rarfile.py # # Copyright (c) 2005-2016 Marko Kreen <markokr@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED...
codeparrot/github-code-clean
# This is Kconfiglib, a Python library for scripting, debugging, and extracting # information from Kconfig-based configuration systems. To view the # documentation, run # # $ pydoc kconfiglib # # or, if you prefer HTML, # # $ pydoc -w kconfiglib # # The examples/ subdirectory contains examples, to be run with e.g. # ...
codeparrot/github-code-clean
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals, division, print_function import unittest import os import warnings import numpy as np from pymatgen.io.cif import CifParser, CifWriter, CifBlock from pymatgen.io.vasp...
codeparrot/github-code-clean
#!/usr/bin/env python from __future__ import print_function ## NOTE: If you edit this, set your "tab" to be 4 spaces in your text editor. import math import sys import argparse import quakelib import gc import operator import os scipy_available = True try: import scipy.stats except ImportError: scipy_availa...
codeparrot/github-code-clean