text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
codeparrot/github-code-clean
# Copyright 2017 The Sonnet 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 applicable l...
codeparrot/github-code-clean
#! /usr/bin/python # Python ctypes bindings for VLC # # Copyright (C) 2009-2012 the VideoLAN team # $Id: $ # # Authors: Olivier Aubert <contact at olivieraubert.net> # Jean Brouwers <MrJean1 at gmail.com> # Geoff Salmon <geoff.salmon at gmail.com> # # This library is free software; you can redistribu...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Sahana Eden Human Resources Management @copyright: 2011-2015 (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 S...
codeparrot/github-code-clean
# encoding: utf-8 # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it w...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2014 Institute for Theoretical Information Technology, # RWTH Aachen University # www.ti.rwth-aachen.de # # This 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 S...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2012 Christopher Gilbert <christopher.john.gilbert@gmail.com> # # Copyright 2012 Steve English <steve.english@naveta...
codeparrot/github-code-clean
# @INVIENT_COPYRIGHT@ # @MUNTJAC_LICENSE@ try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict from muntjac.util \ import OrderedSet from datetime \ import datetime from muntjac.ui.abstract_component \ import AbstractComponent from muntjac.ui.componen...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright 2010, Michael Cohen <scudette@gmail.com>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
codeparrot/github-code-clean
# # Licensed to 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
# -*- coding: ISO-8859-1 -*- import matplotlib.pyplot as mpl import re import datetime import Common import Metric import numpy as np import sys reload(sys) sys.setdefaultencoding('ISO-8859-1') #from matplotlib.dates import * import os import inspect def getAllOutputs(): temp = inspect.getmembers(sys.modules[__name...
codeparrot/github-code-clean
"""Diff Match and Patch Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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 U...
codeparrot/github-code-clean
""" Utility function to facilitate testing. """ from __future__ import division, absolute_import, print_function import os import sys import re import operator import warnings from functools import partial, wraps import shutil import contextlib from tempfile import mkdtemp, mkstemp from unittest.case import SkipTest ...
codeparrot/github-code-clean
""" Test functions for stats module WRITTEN BY LOUIS LUANGKESORN <lluang@yahoo.com> FOR THE STATS MODULE BASED ON WILKINSON'S STATISTICS QUIZ http://www.stanford.edu/~clint/bench/wilk.txt Additional tests by a host of SciPy developers. """ from __future__ import division, print_function, absolute_impo...
codeparrot/github-code-clean
#!/usr/bin/env python # # This is PNCconf, a graphical configuration editor for LinuxCNC # Copyright 2007 Jeff Epler <jepler@unpythonic.net> # Pncconf 1.1 revamped by Chris Morley 2014 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public ...
codeparrot/github-code-clean
import os, random, struct from zope.interface import implements from twisted.internet import defer from twisted.internet.interfaces import IPullProducer from twisted.python import failure from twisted.application import service from twisted.web.error import Error as WebError from foolscap.api import flushEventualQueue,...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 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; eith...
codeparrot/github-code-clean
#! /usr/bin/env python __version__ = '1.4.dev' # Copyright (c) 2015-2016 Matthieu Moy and others # Copyright (c) 2012-2014 Michael Haggerty and others # Derived from contrib/hooks/post-receive-email, which is # Copyright (c) 2007 Andy Parkins # and also includes contributions by other authors. # # This file is part o...
codeparrot/github-code-clean
from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector from Components.ActionMap import ActionMap, HelpableActionMap from Components.ActionMap import NumberActionMap from Components.Harddisk import harddiskmanager from Components.Input import Input from Components.Label import Label from...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # This module is also sponsored by E.T.A.I. (www.etai.fr) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version...
codeparrot/github-code-clean
# # LDAP integration test # # Copyright (c) 2015 Red Hat, Inc. # Author: Nikolai Kondrashov <Nikolai.Kondrashov@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 3 of ...
codeparrot/github-code-clean
#!/usr/bin/env python3 # # Unit tests for the multiprocessing package # import unittest import queue as pyqueue import time import io import itertools import sys import os import gc import errno import signal import array import socket import random import logging import struct import test.support import test.script_...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ .. module:: EDI :synopsis: Deal with EDI files. The Edi class can read and write an .edi file, the 'standard format' of magnetotellurics. Each section of the .edi file is given its own class, so the elements of each section are attributes for easy ...
codeparrot/github-code-clean
PROJECTIONS_TEMPLATE =\ """ <projection id="NC_ADAL_ADAR_Generic_GJ" postsynapticPopulation="ADAR" presynapticPopulation="ADAL" synapse=""> <connection id="0" preCellId="../ADAL/0/" postCellId="../ADAR/0/"/> </projection> <projection id="NC_ADAL_ADFL_Generic_GJ" postsynapticPopulatio...
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 ...
codeparrot/github-code-clean
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
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
import uuid from datetime import date, timedelta from unittest.mock import ANY, MagicMock, Mock import graphene import pytest from django.core.exceptions import ValidationError from freezegun import freeze_time from prices import Money, TaxedMoney from saleor.account.models import CustomerEvent from saleor.core.permi...
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
# -*- coding: utf-8 -*- """ Custom UI Widgets used by the survey application @copyright: 2011-2013 (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 de...
codeparrot/github-code-clean
#!/usr/bin/env python # coding: utf-8 # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
codeparrot/github-code-clean
import json from unittest import mock import pytest from httplib2 import Response import demistomock as demisto PROXY_MOCK = { "proxy": "0.0.0.0" } SUCCESS_ASSET_NAME = 'www.google.com' FAILURE_ASSET_NAME = 'www.xyz.com' PARAMS = { 'malicious_categories': 'APT-Activity', 'suspicious_categories': 'Obser...
codeparrot/github-code-clean
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'StateLaborForceParticipation' db.delete_table('data_statelaborforceparticipation') ...
codeparrot/github-code-clean
"""This module contains the HERMES data reduction class. """ #Example setup analysis for all channels: #import hermes #hermes.go_all('/Users/mireland/data/hermes/140310/data/', '/Users/mireland/tel/hermes/140310/', '/Users/mireland/python/pyhermes/cal/') #Example setup analysis for a full night: blue #hm = he...
codeparrot/github-code-clean
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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...
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. # # Author: Alberto Solino (@agsolino) # # Description: # [MS-SAMR] Interface...
codeparrot/github-code-clean
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
codeparrot/github-code-clean
# -*- 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 and with no dependencies...
codeparrot/github-code-clean
from __future__ import absolute_import, unicode_literals import json import logging import plivo import six from collections import OrderedDict from datetime import datetime from decimal import Decimal from django import forms from django.conf import settings from django.contrib import messages from django.contrib.au...
codeparrot/github-code-clean
# ---------------------------------------------------------------------- # 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 apply: # # This progra...
codeparrot/github-code-clean
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
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 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 req...
codeparrot/github-code-clean
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
codeparrot/github-code-clean
import logging import re import string import struct from collections import defaultdict from itertools import count import capstone import cle import networkx import pyvex from . import Analysis from .cfg.cfg_emulated import CFGEmulated from .ddg import DDG from .cfg.cfg_fast import CFGFast from ..knowledge_plugins...
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): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline ...
codeparrot/github-code-clean
######################################################################## ## ## This file, makepandacore, contains all the global state and ## global functions for the makepanda system. ## ######################################################################## import sys,os,time,stat,string,re,getopt,fnmatch,threading...
codeparrot/github-code-clean
from __future__ import print_function import numpy as np #import sys import scipy.stats as stats import numpy.polynomial.polynomial as nppoly from metallicity import get_keys, printsafemulti niter = 5 # number of iteations+1 for KD02 methods k_Ha = 2.535 # CCM Rv=3.1 k_Hb = 3.609 # CCM Rv=3.1 #k_O1=2.661 # CCM...
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 python2 import unittest, time, ssl from socket import socket, AF_INET, SOCK_STREAM from common.unittests import ProtocolTest from common.astron import * from common.dcfile import * from common.tls import * CONFIG = """\ messagedirector: bind: 127.0.0.1:57123 threaded: %s general: dc_files: ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Authors: Mark Wronkiewicz <wronk.mark@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # Jussi Nurminen <jnu@iki.fi> # License: BSD (3-clause) from math import factorial from os import path as op import numpy as np from scipy import linalg from .. import __version__ fr...
codeparrot/github-code-clean
#! /usr/bin/env python ## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # # Copyright (c) 2009 University of Washington # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free ...
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
"""scons.Node.FS File system nodes. These Nodes represent the canonical external objects that people think of when they think of building software: files and directories. This holds a "default_fs" variable that should be initialized with an FS that can be used by scripts or modules looking for the canonical default....
codeparrot/github-code-clean
import heapq, traceback, array, stat, struct from types import NoneType from stat import S_IFREG, S_IFDIR from time import time, strftime, localtime from zope.interface import implements from twisted.python import components from twisted.application import service, strports from twisted.conch.ssh import factory, keys...
codeparrot/github-code-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file...
codeparrot/github-code-clean
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['prev...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ .. module:: djstripe.stripe_objects :synopsis: dj-stripe - Abstract model definitions to provide our view of Stripe's objects .. moduleauthor:: Bill Huneke (@wahuneke) .. moduleauthor:: Alex Kavanaugh (@kavdev) .. moduleauthor:: Lee Skillen (@lskillen) This module is an effort to isolat...
codeparrot/github-code-clean
""" Defines the PyAgg Canvas class, where most of the PyAgg functinoality is defined. """ ############################## # Startup and imports # Import future stuff from __future__ import division # Import dependencies import PIL, PIL.Image, PIL.ImageDraw, PIL.ImageFont import PIL.ImageOps, PIL.ImageChops, PIL.Imag...
codeparrot/github-code-clean
# # # This test is currently disabled. It needs to be changed to not use server # API classes and instead set up the auth directly, however I just don't have # the time during the git refactor to do it now. # jdob, June 12, 2012 # # from ConfigParser import SafeConfigParser, NoOptionError import shutil import os 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, 2015 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 Foun...
codeparrot/github-code-clean
from Screen import Screen from ServiceScan import ServiceScan from Components.config import config, ConfigSubsection, ConfigSelection, \ ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable from Components.ActionMap import NumberActionMap, ActionMap from Components.ConfigList import Config...
codeparrot/github-code-clean
import sys import numpy as np from scipy import rand from scipy.linalg import toeplitz, eigvalsh from scipy.sparse.linalg import eigsh, lobpcg, eigs from scipy.sparse import lil_matrix, diags, block_diag, csr_matrix, bmat, kron import matplotlib.pyplot as plt import argparse from mpl_toolkits.mplot3d import Axes3D from...
codeparrot/github-code-clean
#!/usr/bin/env python # # VMEncryption extension # # Copyright 2015 Microsoft 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 #...
codeparrot/github-code-clean
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
codeparrot/github-code-clean
# # Pyrex - Parse tree nodes # import string, sys import Code from Errors import error, one_time_warning, InternalError import Naming import PyrexTypes from PyrexTypes import py_object_type, c_int_type, error_type, \ CTypedefType, CFuncType from Symtab import ModuleScope, LocalScope, \ StructOrUnionScope, P...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Denis Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # Marijn van Vliet...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import os import socket from datetime import datetime, timedelta from decimal import Decimal from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage import jingo import mock import waffle from jingo.helpers impo...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2003-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. # # T...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008-2011 University of Dundee. # # 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...
codeparrot/github-code-clean
#!/usr/bin/env python # # (C) 2001 by Argonne National Laboratory. # See COPYRIGHT in top-level directory. # """ usage: mpiexec [-h or -help or --help] # get this message mpiexec -file filename # (or -f) filename contains XML job description mpiexec [global args] [local args] executable [args] ...
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 -*- import re import os import sys import locale import datetime import decimal import copy import time import base64 import types import json from .._compat import PY2, pjoin, exists, pickle, hashlib_md5, iterkeys, \ iteritems, with_metaclass, to_unicode, integer_types, basestring, \ strin...
codeparrot/github-code-clean
import json import os from datetime import datetime, timedelta from unittest.mock import Mock, patch from django import forms from django.conf import settings from django.core import mail from django.db import IntegrityError from django.utils import translation import pytest from waffle.testutils import override_swi...
codeparrot/github-code-clean
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2009, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Andrew Jewett (jewett.aij at g mail) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. """ ltemplify.py The "ltemplify.py" script...
codeparrot/github-code-clean
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://setuptools.readthedocs.io/en/latest/easy_install.html ""...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import six from nose.plugins.skip import SkipTest import datetime import unittest import uuid import math import itertools import re import six try: import dateutil except ImportError: dateutil = None from decimal import Decimal from bson import Binary, DBRef, ObjectId try: from ...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # CAVEAT UTILITOR # # This file was automatically generated by Grako. # # https://pypi.python.org/pypi/grako/ # # Any changes you make to it will be overwritten the next time # the file is generated. from __future__ import print_function, division, absolute_import, un...
codeparrot/github-code-clean
import os import sys import time import shlex import shutil import random import inspect import logging import asyncio import pathlib import traceback import math import re import aiohttp import discord import colorlog from io import BytesIO, StringIO from functools import wraps from textwrap import dedent from datet...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Utilities for Natural Language Processing (NLP): * Vocabulary and dimension reduction * Word statistics calculation * Add a timezone to a datetime * Slice a django queryset * Genereate batches from a long list or sequence * Inverse dict/hashtable lookup * Generate a val...
codeparrot/github-code-clean
""" Mouse class """ import re from openrazer_daemon.hardware.device_base import RazerDeviceBrightnessSuspend as __RazerDeviceBrightnessSuspend, RazerDeviceSpecialBrightnessSuspend as __RazerDeviceSpecialBrightnessSuspend, RazerDevice as __RazerDevice from openrazer_daemon.misc.battery_notifier import BatteryManager as ...
codeparrot/github-code-clean
## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import datetime import unittest import shutil import sys import tempfile import os import json import pygit2 from mock import patch, MagicMock sys.path.insert(0, os.path.join(os.path.dirname( os.path.abspath(__file__)), '..')) imp...
codeparrot/github-code-clean
def borders(left, right, *args): if not args: return [-left / 2, left / 2, -right / 2, right / 2] else: return [left, right, args[0], args[1]] obstacles = [ {"images": "iso_tree_stump.png", "borders": borders(0.60, 0.60)}, {"images": "iso_wall_grey_ns.png", "borders": borde...
codeparrot/github-code-clean
#!/usr/bin/env python """ File Catalog Client Command Line Interface. """ __RCSID__ = "$Id$" import cmd import commands import os.path import time import sys from types import DictType, ListType from DIRAC.Core.Security.ProxyInfo import getProxyInfo from DIRAC.Core.Utilities.List import uniqueElements from DIRAC.In...
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
# Copyright 2020 Google # # 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, soft...
codeparrot/github-code-clean
# Copyright 2015-2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
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
""" CUDA driver bridge implementation NOTE: The new driver implementation uses a *_PendingDeallocs* that help prevents a crashing the system (particularly OSX) when the CUDA context is corrupted at resource deallocation. The old approach ties resource management directly into the object destructor; thus, at corruptio...
codeparrot/github-code-clean
from __future__ import division from warnings import warn import numpy as np import PIL.Image as PILImage from menpo.compatibility import basestring from menpo.base import Vectorizable, MenpoDeprecationWarning from menpo.shape import PointCloud from menpo.landmark import Landmarkable from menpo.transform import (Tran...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import unittest import pickle import cPickle import StringIO import cStringIO import pickletools import copy_reg import sys from test import test_support as support from test.test_support import TestFailed, verbose, have_unicode, TESTFN try: from test.test_support import _2G, _1M, precision...
codeparrot/github-code-clean
# Rekall Memory Forensics # Copyright (C) 2007,2008 Volatile Systems # Copyright 2013 Google Inc. All Rights Reserved. # # Copyright (C) 2005,2006 4tphi Research # Author: {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters) # Author: Michael Cohen scudette@gmail.com. # # This program is free software; you ca...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import unittest import io from lxml import isoschematron, etree from packtools.catalogs import SCHEMAS SCH = etree.parse(SCHEMAS['sps-1.8']) def TestPhase(phase_name, cache): """Factory of parsed Schematron phases. :param phase_name: the phase name ...
codeparrot/github-code-clean
import builtins import copyreg import gc import itertools import math import pickle import sys import types import unittest import warnings import weakref from copy import deepcopy from test import support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__i...
codeparrot/github-code-clean
# # Custom partitioning classes. # # Copyright (C) 2012-2014 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 option) any later version. # This program is d...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015 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...
codeparrot/github-code-clean
# $ANTLR 3.5.1 /Users/montselozanod/Documents/Tec/Compilers/Chabuildly/chabuildly.g 2016-03-02 22:50:02 import sys from antlr3 import * from antlr3.compat import set, frozenset # for convenience in actions HIDDEN = BaseRecognizer.HIDDEN # token types EOF=-1 T__11=11 T__12=12 T__13=13 T__14=14 T__15=15 T__16=16 T__...
codeparrot/github-code-clean