text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------------- # Copyright © 2016, Continuum Analytics, Inc. All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -------------------------------------------------------------------...
codeparrot/github-code-clean
#!/usr/bin/python # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # # GNU Zebra 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, or (at your option) any # later version. # # GN...
codeparrot/github-code-clean
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE specification ={} specification['commercial'] = { #commercial 1: [ #('urbansim.gridcell.building_age', 'BAGE_BL'), #('urbansim.gridcell.is_near_arterial', 'BART'), ('zone....
codeparrot/github-code-clean
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your ...
codeparrot/github-code-clean
#! /usr/bin/python3.4 """Generate Python documentation in HTML or text for interactive use. At the Python interactive prompt, calling help(thing) on a Python object documents the object, and calling help() starts up an interactive help session. Or, at the shell command line outside of Python: Run "pydoc <name>" to s...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf_8 -*- # Autopsy Forensic Browser # # Copyright 2013 Basis Technology Corp. # # 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/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
# -*- coding: utf-8 -*- # Resource object code # # Created: Wed Mar 4 11:11:45 2015 # by: The Resource Compiler for PyQt (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore qt_resource_data = "\ \x00\x00\x0a\x69\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x4...
codeparrot/github-code-clean
P={('B', 'a'): {('E', 'a'): -0.0050648453069648755, ('M', 'a'): -5.287963037107507}, ('B', 'ad'): {('E', 'ad'): -0.0007479013978476627, ('M', 'ad'): -7.198613337130562}, ('B', 'ag'): {}, ('B', 'an'): {('E', 'an'): 0.0}, ('B', 'b'): {('E', 'b'): -0.06753917715798491, ('M', ...
codeparrot/github-code-clean
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2009 Blazingamer ...
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/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 python """ A front-end module to run a compiled kMC model. The actual model is imported in kmc_model.so and all parameters are stored in kmc_settings.py. The model can be used directly like so:: from kmos.model import KMC_Model model = KMC_Model() model.parameters.T = 500 model.do_step...
codeparrot/github-code-clean
# Hidden Markov Models # # Author: Ron Weiss <ronweiss@gmail.com> # and Shiqiao Du <lucidfrontier.45@gmail.com> # API changes: Jaques Grobler <jaquesgrobler@gmail.com> # Modifications to create of the HMMLearn module: Gael Varoquaux """ The :mod:`hmmlearn.hmm` module implements hidden Markov models. """ import string...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Unit tests for instructor.api methods. """ import datetime import ddt import functools import random import pytz import io import json import requests import shutil import tempfile from urllib import quote from django.conf import settings from django.contrib.auth.models import User from dja...
codeparrot/github-code-clean
# y_serial Python module Version 0.60 Date : 2010-08-20 # -*- coding: iso-8859-1 -*- # http://yserial.sourceforge.net ''' _______________ y_serial :: warehouse compressed Python objects with SQLite Dependencies: at least Python v2.5 because it includes the sq...
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
""" Unit test for Linear Programming """ import sys import numpy as np from numpy.testing import (assert_, assert_allclose, assert_equal, assert_array_less, assert_warns, suppress_warnings) from pytest import raises as assert_raises from scipy.optimize import linprog, OptimizeWarning from sc...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-3 B{Entropy Package Manager Rigo Daemon}. """ import os import stat import random random.seed() # entropy.i18n will pick this up os.env...
codeparrot/github-code-clean
""" @package mi.instrument.satlantic.suna_deep.ooicore.driver @file marine-integrations/mi/instrument/satlantic/suna_deep/ooicore/driver.py @author Rachel Manoni @brief Driver for the ooicore Release notes: initial_rev """ import re import time import datetime from mi.core.common import BaseEnum, Units, Prefixes from...
codeparrot/github-code-clean
from __future__ import print_function, division from sympy.core.add import Add from sympy.core.compatibility import as_int, is_sequence, range from sympy.core.exprtools import factor_terms from sympy.core.function import _mexpand from sympy.core.mul import Mul from sympy.core.numbers import Rational from sympy.core.nu...
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
import calendar import unittest from test import support from test.script_helper import assert_python_ok, assert_python_failure import time import locale import sys import datetime import os result_2004_01_text = """\ January 2004 Mo Tu We Th Fr Sa Su 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18...
codeparrot/github-code-clean
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
codeparrot/github-code-clean
#!/usr/bin/env python ''' GOAL: - read catalog of spirals that is generated by LCSmergespiralscats.py - make plots for paper - run correlation/KS tests - print latex tables with resulting KS statistics. these are written to SamplePlots directory USAGE: - in ipython %run LCSanalysespirals.py - all spirals are ...
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 # Copyright 2016 Stanford University, NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
codeparrot/github-code-clean
#!/usr/bin/env python ''' 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")...
codeparrot/github-code-clean
"""Test the validation module""" import sys import warnings import tempfile import os from time import sleep import pytest import numpy as np from scipy.sparse import coo_matrix, csr_matrix from sklearn.exceptions import FitFailedWarning from sklearn.model_selection.tests.test_search import FailingClassifier from s...
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
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 -*- class Charset(object): common_name = 'NotoSansYi-Regular' native_name = '' def glyphs(self): glyphs = [] glyphs.append(0x02FA) #uniA2F6 glyphs.append(0x02FB) #uniA2F7 glyphs.append(0x02F8) #uniA2F4 glyphs.append(0x02F9) #uniA2F5 ...
codeparrot/github-code-clean
""" <ms_standard> NON-BREAKING HYPEHN:_:8290:&#x2011; LEFT DOUBLE QUOTATION MARK:ldblquote:8220:&#x201C; RIGHT DOUBLE QUOTATION MARK:rdblquote:8221:&#x201D; LEFT SINGLE QUOTATION MARK:lquote:8216:&#x2018; RIGHT SINGLE QUOTATION MARK:rquote:8217:&#x2019; EN DASH:endash:8211:&#x2013; EM DASH:emdash:8212:&#x2014; MIDDLE D...
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 2012 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
codeparrot/github-code-clean
""" """ """ """ """ >>> # --- >>> # SETUP >>> # --- >>> import os >>> import logging >>> logger = logging.getLogger('PT3S.Rm') >>> # --- >>> # path >>> # --- >>> if __name__ == "__main__": ... try: ... dummy=__file__ ... logger.debug("{0:s}{1:s}{2:s}".format('DOCTEST: __main__ Context: ','p...
codeparrot/github-code-clean
import sqlalchemy as sa from sqlalchemy import delete from sqlalchemy import event from sqlalchemy import ForeignKey from sqlalchemy import inspect from sqlalchemy import Integer from sqlalchemy import literal_column from sqlalchemy import select from sqlalchemy import String from sqlalchemy import testing from sqlalch...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (C) 2009-2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.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 2 of the Li...
codeparrot/github-code-clean
""" Utility classes and functions to handle Virtual Machine creation using qemu. :copyright: 2008-2009, 2014 Red Hat Inc. """ from __future__ import division import time import os import logging import fcntl import re import random import sys import math import json import ast from functools import partial, reduce f...
codeparrot/github-code-clean
''' python module for ASE2-free and Numeric-free dacapo U{John Kitchin<mailto:jkitchin@andrew.cmu.edu>} December 25, 2008 This module supports numpy directly. * ScientificPython2.8 is required - this is the first version to use numpy by default. see https://wiki.fysik.dtu.dk/stuff/nc/ for dacapo netcdf variable d...
codeparrot/github-code-clean
import unittest import cPickle import numpy import sys import os from os.path import join # Import InaSAFE modules from safe.engine.core import calculate_impact from safe.engine.interpolation import interpolate_polygon_raster from safe.engine.interpolation import interpolate_raster_vector_points from safe.engine.inter...
codeparrot/github-code-clean
# todo SpaceA = { /home/user/Dropbox /home/user/Videos /home/user/Music } SpaceB = { /home/user/Downloads } : Problem; B\A Indikator zeigt jenseit 13.000 an # todo: Übersicht Files mit ähnlicher Laenge anbieten. Binning; aehnlich wie bei dedup group # todo: photos are in B-1 although they should be in A /\ B z.B. IMG...
codeparrot/github-code-clean
import os import platform import pickle import serial import socket import Queue import threading import time import gtk import copy #Inform gtk that threads will be used gtk.gdk.threads_init() if os.environ.get('DESKTOP_SESSION') == 'ubuntu': import appindicator from classes import * #gobject.threads_init() st...
codeparrot/github-code-clean
#!/usr/bin/python3 # # Copyright (C) 2015-2021 Sustainable Energy Now Inc., Angus King # # makeweatherfiles.py - This file is part of SIREN. # # SIREN 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...
codeparrot/github-code-clean
# (C) British Crown Copyright 2010 - 2015, 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
# coding=utf-8 import json import os import shutil import time from unittest import skipUnless import yaml from bzt import ToolError, TaurusConfigError, TaurusInternalException from bzt.jmx import JMX from bzt.jmx.tools import ProtocolHandler from bzt.modules.aggregator import ConsolidatingAggregator from bzt.modules...
codeparrot/github-code-clean
# # Module parse tree node # from __future__ import absolute_import import cython cython.declare(Naming=object, Options=object, PyrexTypes=object, TypeSlots=object, error=object, warning=object, py_object_type=object, UtilityCode=object, EncodedString=object) import os import operator...
codeparrot/github-code-clean
# $ANTLR 3.0.1 C.g 2010-02-23 09:58:53 from __future__ import print_function from __future__ import absolute_import from antlr3 import * from antlr3.compat import set, frozenset ## @file # The file defines the parser for C source files. # # THIS FILE IS AUTO-GENERATED. PLEASE DO NOT MODIFY THIS FILE. # Thi...
codeparrot/github-code-clean
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
codeparrot/github-code-clean
""" @package mi.instrument.uw.hpies.ooicore.driver @file marine-integrations/mi/instrument/uw/hpies/ooicore/driver.py @author Dan Mergens @brief Driver for the ooicore Release notes: initial_rev """ __author__ = 'Dan Mergens' __license__ = 'Apache 2.0' import time import re import tempfile from mi.core.exceptions i...
codeparrot/github-code-clean
import functools import re from unittest import mock from django.apps import apps from django.conf import settings from django.contrib.auth.models import AbstractBaseUser from django.core.validators import RegexValidator, validate_slug from django.db import connection, models from django.db.migrations.autodetector imp...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import os import sys import warnings import collections from numpy.core import multiarray from . import umath from .umath import (invert, sin, UFUNC_BUFSIZE_DEFAULT, ERR_IGNORE, ERR_WARN, ERR_RAISE, ERR_CALL, ERR_PRINT, ERR_LOG, ...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This is a simple HTTP/FTP/SYNC/TCP/UDP/ server used for testing Chrome. It supports several test URLs, as specified by the hand...
codeparrot/github-code-clean
"""SCons.Environment Base class for construction Environments. These are the primary objects used to communicate dependency and construction information to the build engine. Keyword arguments supplied when the construction Environment is created are construction variables used to initialize the Environment """ # # ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """Generate Python documentation in HTML or text for interactive use. In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. Or, at the shell command line outside of Python: Run "pydoc ...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import sys import platform import warnings from numpy.testing.utils import _gen_alignment_data import numpy.core.umath as ncu import numpy as np from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises, assert...
codeparrot/github-code-clean
# orm/mapper.py # Copyright (C) 2005-2017 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 """Logic to map Python classes to and from selectables. Defines the :class:`~sqlalche...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Assessments This module currently contains 2 types of Assessments * Flexible Impact Assessments (including Mobile access) * Rapid Assessment Tool (from ECB: http://www.ecbproject.org/page/48) @ToDo: Migrate this to a Template in the Survey module @ToDo...
codeparrot/github-code-clean
from os import path from info import __VERSION__ # <p>Copyright (c) 2005-2012 Stephen John Machin, Lingfo Pty Ltd</p> # <p>This module is part of the xlrd package, which is released under a # BSD-style licence.</p> import licences ## # <p><b>A Python module for extracting data from MS Excel (TM) spreadsheet files. ...
codeparrot/github-code-clean
from __future__ import print_function import json import time import unittest from copy import deepcopy from parameterized import parameterized from pprint import pprint from test_helper import ApiTestCase, unique_zone_name, is_auth, is_auth_lmdb, is_recursor, get_db_records, pdnsutil_rectify def get_rrset(data, qnam...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) Mercurial Contributors. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # isort:skip_file from __future__ import absolute_import import ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # TAMkin is a post-processing toolkit for normal mode analysis, thermochemistry # and reaction kinetics. # Copyright (C) 2008-2012 Toon Verstraelen <Toon.Verstraelen@UGent.be>, An Ghysels # <An.Ghysels@UGent.be> and Matthias Vandichel <Matthias.Vandichel@UGent.be> # Center for Molecular Modeling...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Produce word vectors with deep learning via word2vec's "skip-gram and CBOW models", using either hierarchical softmax or negative samp...
codeparrot/github-code-clean
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for ``flocker.node._deploy``. """ from uuid import uuid4 from eliot.testing import validate_logging from ipaddr import IPAddress from pyrsistent import pset, pvector from twisted.internet.defer import fail, FirstError, succeed, Deferred from t...
codeparrot/github-code-clean
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
codeparrot/github-code-clean
from __future__ import print_function import os, sys import unittest from pathlib import Path import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * import logging import csv from slicer.util import VTKObservationMixin import platform import time from RigidAlignmentModule import RigidAlignmentModuleLog...
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
# 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 # pylint: disable-msg=E1101,W0612 import re import sys from datetime import datetime, timedelta import operator import string from inspect import getargspec from itertools import product, starmap from distutils.version import LooseVersion import warnings import random import nose from numpy import nan...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- { "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": '一个位置指定对此区域的地理区域。 这可以是一个位置的位置层次结构,或者一组位置",或位置的一个界限的区域。', "Acronym of the organization's name, eg. IFRC...
codeparrot/github-code-clean
""" .. _view-api: Experiment Controller ===================== Runs, controls, and displays Ceed experiments on screen, both during a "real" experiment and when previewing it. The purpose of Ceed is to run visual-temporal experiments. Once a :mod:`~ceed.stage` containing one or more :mod:`~ceed.function` a...
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 -*- #!/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
#!/usr/bin/env python3 # feedme: download RSS/Atom feeds and convert to HTML, epub, Plucker, # or other formats suitable for offline reading on a handheld device, # # Copyright 2009-2017 by Akkana Peck <akkana@shallowsky.com> # and licensed under the GPLv2 or later. # # This program is free software: you can redistrib...
codeparrot/github-code-clean
from math import pi, atan2, hypot #from self.AIs import * from common import ids from common import config from common import gfxs class ObjectStats: def __init__(self,id,radius): self.img = id self.radius = radius self.maxRadius = self.radius self.orbitable = False self....
codeparrot/github-code-clean
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved. # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Description: # Partial C706.pdf + [MS-RPCE] implementation # # Best way...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.org> # # 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 Foundatio...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright 2008-2015 Canonical # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) # # 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 ...
codeparrot/github-code-clean
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.support': raise ImportError('support must be imported from the test package') import collections.abc import contextlib import errno import faulthandler import fnmatch import functools import gc import importlib import importlib.uti...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import os import re import uuid import urllib import logging import datetime import urlparse from collections import OrderedDict import pytz import blinker from flask import request from HTMLParser import HTMLParser from modularodm import Q from modularodm import fields from modularodm.validat...
codeparrot/github-code-clean
# coding=UTF-8 """All the REST Complex Objects used by the FCO REST API.""" import resttypes.enums as enums from resttypes import to_str from resttypes import is_acceptable as c_is_acceptable from resttypes import construct_data as c_construct_data from typed import Typed from typed.builtins import (List, Dict) from...
codeparrot/github-code-clean
import datetime import pytz test_date_range_short = [ datetime.datetime(2016, 5, 13, 23, 44, 19, 55552, tzinfo=pytz.utc), """ Timestamp,Interface Name,Point ID,Flow (MWH),Positive Limit (MWH),Negative Limit (MWH) 05/13/2016 00:00,CENTRAL EAST - VC,23330,2310.91,2410,-9999 05/13/2016 00:00,DYSINGER EAST,23326,67...
codeparrot/github-code-clean
# Copyright 2019 Google LLC. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
codeparrot/github-code-clean
""" ======================================================== Hierarchical clustering (:mod:`scipy.cluster.hierarchy`) ======================================================== .. currentmodule:: scipy.cluster.hierarchy These functions cut hierarchical clusterings into flat clusterings or find the roots of the forest f...
codeparrot/github-code-clean
from datetime import timedelta import mock from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.core import mail, paginator from django.db.models.signals import pre_delete, post_...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import MaxValueValidator, RegexValidator from django.forms i...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of t...
codeparrot/github-code-clean
# Natural Language Toolkit: Drawing utilities # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Tools for graphically displaying and interacting with the objects and processing classes defined by...
codeparrot/github-code-clean
from __future__ import division, absolute_import, print_function import pickle import warnings import numpy import numpy as np import datetime from numpy.compat import asbytes from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_raises, dec ) # Use pytz to test out various ti...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Copyright (c) 2011 Christopher D. Lasher # # This software is released under the MIT License. Please see # LICENSE.txt for details. """States for the BPN Markov chain.""" import bisect import collections import copy import math import random import numpy import scip...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2016 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
codeparrot/github-code-clean
# coding=utf-8 """ InaSAFE Disaster risk assessment tool by AusAid **GUI InaSAFE Wizard Dialog.** Contact : ole.moller.nielsen@gmail.com .. 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 Found...
codeparrot/github-code-clean
# This Python file uses the following encoding: utf-8 # # Copyright (c) 2009-2021 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Test routines for weeutil.weeutil.""" from __future__ import with_statement import unittest from weeutil.weeutil import * # @UnusedWildImport...
codeparrot/github-code-clean
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _, throw from webnotes.utils import flt, cint from webnotes.utils import load_json, nowdate, cstr from webnotes....
codeparrot/github-code-clean
from __future__ import unicode_literals from datetime import datetime import boto3 import json import six import sure # noqa from botocore.exceptions import ClientError import pytest from moto import mock_organizations from moto.core import ACCOUNT_ID from moto.organizations import utils from .organizations_test_ut...
codeparrot/github-code-clean
#!/usr/bin/env python """AFF4 interface implementation. This contains an AFF4 data model implementation. """ import __builtin__ import abc import StringIO import time import zlib import logging from grr.lib import access_control from grr.lib import config_lib from grr.lib import data_store from grr.lib import lex...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ werkzeug.datastructures ~~~~~~~~~~~~~~~~~~~~~~~ This module provides mixins and classes with an immutable interface. :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import codecs import ...
codeparrot/github-code-clean
""" This module contains various functions that are special cases of incomplete gamma functions. It should probably be renamed. """ from __future__ import print_function, division from sympy.core import Add, S, C, sympify, cacheit, pi, I from sympy.core.function import Function, ArgumentIndexError from sympy.func...
codeparrot/github-code-clean
import sublime, sublime_plugin import re def multiple_replace(dict, text): pattern = re.compile("^(%s)\=" % "|".join(map(re.escape, dict.keys()))) lines = text.split("\x01") newLines = [] for line in lines: new_line = pattern.sub(lambda match: dict[match.string[match.start():match.end()-1]] + "=", line) new...
codeparrot/github-code-clean
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
codeparrot/github-code-clean