text
stringlengths
5.09k
178k
domain
stringclasses
106 values
# -*- coding: utf-8 -*- # Copyright 2022 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import django.test from django.conf import settings from django.forms import ValidationError from django.test.utils import override_settings from django.utils.datastructures import MultiValueDict import pytest import six from mock import Mock, patch from pyquery import PyQuery as...
codeparrot/github-code-clean
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
codeparrot/github-code-clean
# SimpleCV Feature library # # Tools return basic features in feature sets # # x = 0.00 # y = 0.00 # _mMaxX = None # _mMaxY = None # _mMinX = None # _mMinY = None # _mWidth = None # _mHeight = None # _mSrcImgW = None # mSrcImgH = None #load system libraries from SimpleCV.base im...
codeparrot/github-code-clean
#!/usr/bin/python # NBT-NS/LLMNR Responder # Created by Laurent Gaffie # Copyright (C) 2014 Trustwave Holdings, Inc. # # 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 Lic...
codeparrot/github-code-clean
#!/usr/bin/env python # # 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 applicable law o...
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
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 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
codeparrot/github-code-clean
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ The initial version of this module was based on a similar implementation present in FireWorks (https://pypi.python.org/pypi/FireWorks). Work done by D. Waroquiers, A. Jain, and M. Kocher. The main differenc...
codeparrot/github-code-clean
import difflib import datetime import time import random import re import math import mongoengine as mongo import zlib import hashlib import redis import pymongo from collections import defaultdict from operator import itemgetter from bson.objectid import ObjectId # from nltk.collocations import TrigramCollocationFinde...
codeparrot/github-code-clean
""" Python 3.4 HTML5 entity unescaping for all! Based on https://hg.python.org/cpython/file/500d3d6f22ff/Lib/html/__init__.py """ import sys import re as _re __all__ = ['_unescape'] _html5 = { 'Aacute': u'\xc1', 'aacute': u'\xe1', 'Aacute;': u'\xc1', 'aacute;': u'\xe1', 'Abreve;': u'\u0102', ...
codeparrot/github-code-clean
from sqlalchemy.testing import fixtures, eq_, is_, is_not_ from sqlalchemy import testing from sqlalchemy.testing import assert_raises_message from sqlalchemy.sql import column, desc, asc, literal, collate, null, true, false from sqlalchemy.sql.expression import BinaryExpression, \ ClauseList, Grouping, \ Unary...
codeparrot/github-code-clean
# # This file is part of the "UpLib 1.7.11" release. # Copyright (C) 2003-2011 Palo Alto Research Center, Inc. # # 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...
codeparrot/github-code-clean
import os import math def rotatePoint(centerPoint,point,angle): angle = math.radians(angle) temp_point = point[0]-centerPoint[0] , point[1]-centerPoint[1] temp_point = ( temp_point[0]*math.cos(angle)-temp_point[1]*math.sin(angle) , temp_point[0]*math.sin(angle)+temp_point[1]*math.cos(angle)) temp_point...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Tests of responsetypes """ from cStringIO import StringIO from datetime import datetime import json import os import pyparsing import random import textwrap import unittest import zipfile import mock import itertools from pytz import UTC import requests from capa.tests.helpers import new_...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # This file is part of the python-chess library. # Copyright (C) 2012-2015 Niklas Fiekas <niklas.fiekas@tu-clausthal.de> # # 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
keyconfig_version = (2, 93, 21) keyconfig_data = \ [("3D View", {"space_type": 'VIEW_3D', "region_type": 'WINDOW'}, {"items": [("view3d.cursor3d", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "shift": True}, None), ("transform.translate", {"type": 'EVT_TWEAK_R', "value": 'ANY', "shift": True}, {"prope...
codeparrot/github-code-clean
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
codeparrot/github-code-clean
"""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 = [('C...
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 # d...
codeparrot/github-code-clean
# coding: utf-8 import unittest from nose.tools import ok_, eq_ from ryu.lib.packet import icmpv6 from ryu.ofproto import ether, inet from ryu.ofproto import ofproto_v1_3 as ofproto from ryu.ofproto.ofproto_v1_3_parser import OFPActionPopVlan, OFPActionPopPbb from mld.app.flowmod_gen import flow_mod_generator, flow_...
codeparrot/github-code-clean
""" A generic n-dimensionnal Array class serving as base for arbitrary length VectorN and MatrixN classes """ # NOTE: modified and added some methods that are closer to how Numpy works, as some people pointed out # they didn't want non-Python dependencies. # For instance implemented partially the neat multi index slic...
codeparrot/github-code-clean
import contextlib import itertools import sys from numbers import Number import pytest from numpy import AxisError from dask.delayed import delayed np = pytest.importorskip("numpy") import dask.array as da from dask.array.utils import assert_eq, same_keys def test_array(): x = np.ones(5, dtype="i4") d = d...
codeparrot/github-code-clean
# FST functionality tests # Copyright (c) 2015, Qualcomm Atheros, Inc. # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging logger = logging.getLogger() import struct import subprocess import time import os import re import hwsim_utils from hwsim impor...
codeparrot/github-code-clean
""" Find a few eigenvectors and eigenvalues of a matrix. Uses ARPACK: http://www.caam.rice.edu/software/ARPACK/ """ # Wrapper implementation notes # # ARPACK Entry Points # ------------------- # The entry points to ARPACK are # - (s,d)seupd : single and double precision symmetric matrix # - (s,d,c,z)neupd: single,d...
codeparrot/github-code-clean
# MIT License # # Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, ...
codeparrot/github-code-clean
#!/usr/bin/env python # Copyright (c) 2001-2006, MetaSlash Inc. All rights reserved. # Portions Copyright (c) 2005, Google, Inc. All rights reserved. """ Find warnings in byte code from Python source files. """ import string import types from pychecker import msgs from pychecker import utils from pychecker import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify...
codeparrot/github-code-clean
#from ctypes import * # Used by playmp3.py windows based mp3 player. # http://www.mailsend-online.com/blog/play-mp3-files-with-python-on-windows.html from ctypes import * # Used by playmp3.py windows based mp3 player http://bit.ly/1MgaGCh import datetime # Used in RSS generation and to convert song duration in secon...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' /************************************************************************************************************************** SemiAutomaticClassificationPlugin The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images, provid...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. ### ### Author: Chris Iatrou (ichrispa@core-vector.net) ### Version: rev...
codeparrot/github-code-clean
#---------------------------------------------------------------------- # This file was generated by encode_bitmaps.py # from wx import ImageFromStream, BitmapFromImage from wx import EmptyIcon import cStringIO def getMondrianData(): return \ '\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\...
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
#!/usr/bin/env python # # 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 applicable law o...
codeparrot/github-code-clean
""" Python 3.4 HTML5 entity unescaping for all! Based on https://hg.python.org/cpython/file/500d3d6f22ff/Lib/html/__init__.py """ from __future__ import unicode_literals import sys import re as _re __all__ = ['_unescape'] _html5 = { 'Aacute': '\xc1', 'aacute': '\xe1', 'Aacute;': '\xc1', 'aacute;': '\...
codeparrot/github-code-clean
# # epytext.py: epydoc formatted docstring parsing # Edward Loper # # Created [04/10/01 12:00 AM] # $Id: epytext.py 1652 2007-09-26 04:45:34Z edloper $ # """ Parser for epytext strings. Epytext is a lightweight markup whose primary intended application is Python documentation strings. This parser converts Epytext st...
codeparrot/github-code-clean
"""DLKit Services implementations of repository service.""" # pylint: disable=no-init # osid specification includes some 'marker' interfaces. # pylint: disable=too-many-ancestors # number of ancestors defined in spec. # pylint: disable=too-few-public-methods,too-many-public-methods # number of methods defin...
codeparrot/github-code-clean
#!/usr/bin/env python3 """ Creates C code from a table of NCP type 0x2222 packet types. (And 0x3333, which are the replies, but the packets are more commonly refered to as type 0x2222; the 0x3333 replies are understood to be part of the 0x2222 "family") The data-munging code was written by Gilbert Ramirez. The NCP da...
codeparrot/github-code-clean
# Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # sparse.py - allow sparse checkouts of the working directory """allow sparse checkouts of the working directory Sparse file format ------------------...
codeparrot/github-code-clean
#!/usr/bin/env python3 import pgeif import pygame import sys import struct import time import math from pygame.locals import * colour_t, box_t, circle_t, spring_t, fb_box_t, fb_circle_t, fb_text_t = list(range(7)) id2ob = {} ob2id = {} batch_d, pyg_d = list(range(2)) device = None opened = False output = None lastDe...
codeparrot/github-code-clean
# -*- Mode: Python -*- # GDBus - GLib D-Bus Library # # Copyright (C) 2008-2011 Red Hat, Inc. # # This library 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 2 of the License, or (at ...
codeparrot/github-code-clean
""" Routines to set up a minion """ import binascii import contextlib import copy import functools import logging import multiprocessing import os import random import signal import stat import sys import threading import time import traceback import types import salt import salt.beacons import salt.channel.client imp...
codeparrot/github-code-clean
""" Integrate functions by rewriting them as Meijer G-functions. There are three user-visible functions that can be used by other parts of the sympy library to solve various integration problems: - meijerint_indefinite - meijerint_definite - meijerint_inversion They can be used to compute, respectively, indefinite i...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- import json import datetime from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.sites import site, AdminSite from django.contrib.aut...
codeparrot/github-code-clean
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see PYFITS.rst from __future__ import division, with_statement import copy import warnings import collections from io import StringIO, BytesIO import numpy as np from ....extern import six from ....extern.six import u, iterkeys, itervalues, i...
codeparrot/github-code-clean
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
codeparrot/github-code-clean
# pylint: skip-file # -*- coding: utf-8 -*- # Author: asciidisco # Module: default # Created on: 13.01.2017 # License: MIT https://goo.gl/5bMj3H """Netflix API management""" import os import sys import json from time import time from urllib import quote, unquote from re import compile as recompile, DOTALL from base64...
codeparrot/github-code-clean
# -*- python -*- # ex: set syntax=python: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from buildbot.process import factory from buildbot.steps.source import Merc...
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 -*- from process_gram import process_grammar import codecs import re first_pp = ['мы', 'я', 'наш', 'мой'] second_pp = ['ты', 'вы', 'ваш', 'твой'] third_pp = ['он', 'она', 'они', 'оно', 'их', 'ee', 'его', 'ихний', 'ихним', 'ихнем'] indef_pron = ['некто', 'некого', 'некому', 'некем', 'нечто', 'нечег...
codeparrot/github-code-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web.client.Agent} and related new client APIs. """ import zlib from io import BytesIO from zope.interface.verify import verifyObject from twisted.trial.unittest import TestCase from twisted.web import client, error, htt...
codeparrot/github-code-clean
# Python modules from os import chdir, getcwd, listdir, mkdir, path from subprocess import call import string # Python extension module NumPy (requires extension installation) import numpy as np # Tool library module from MpFileExtractorAndGeneratorHelper import MpFileExtractorAndGeneratorHelper from MpParameterBound...
codeparrot/github-code-clean
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2012 Varnish Software AS # # 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
"""When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback functions that return the value then. This module implements a much more powerful syste...
codeparrot/github-code-clean
# configobj.py # A config file reader/writer that supports nested sections in config files. # Copyright (C) 2005-2010 Michael Foord, Nicola Larosa # E-mail: fuzzyman AT voidspace DOT org DOT uk # nico AT tekNico DOT net # ConfigObj 4 # http://www.voidspace.org.uk/python/configobj.html # Released subject to th...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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 Fre...
codeparrot/github-code-clean
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
codeparrot/github-code-clean
""" Test functions for stats module """ from __future__ import division, print_function, absolute_import import warnings import re import sys from numpy.testing import (TestCase, run_module_suite, assert_equal, assert_array_equal, assert_almost_equal, assert_array_almost_equal, assert_allclose, assert_, asse...
codeparrot/github-code-clean
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
codeparrot/github-code-clean
# encoding: UTF-8 structDict = {} #////////////////////////////////////////////////////////////////////// #@system 新一代交易所系统 #@company 上海期货信息技术有限公司 #@file ThostFtdcUserApiStruct.h #@brief 定义了客户端接口使用的业务数据结构 #@history #////////////////////////////////////////////////////////////////////// #信息分发 CThostFtdcDis...
codeparrot/github-code-clean
"""JSON implementations of authorization sessions.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allow...
codeparrot/github-code-clean
#!/usr/bin/env python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> # Copyright (C) 2014-2016 Ian Lee <ianlee1521@gmail.com> # # Permission is hereby granted, free...
codeparrot/github-code-clean
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
codeparrot/github-code-clean
from Screen import Screen from Components.Button import Button from Components.ActionMap import HelpableActionMap, ActionMap, NumberActionMap from Components.ChoiceList import ChoiceList, ChoiceEntryComponent from Components.MenuList import MenuList from Components.MovieList import MovieList, resetMoviePlayState, AUDIO...
codeparrot/github-code-clean
import os from contextlib import closing from copy import deepcopy from datetime import datetime from io import StringIO from json import loads from math import degrees from time import sleep from urllib.request import urlopen import numpy import requests from PIL import Image, ImageOps from bulk_update.manager import...
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
# -*- coding: utf-8 -*- # Copyright 2010-2011 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/...
codeparrot/github-code-clean
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
codeparrot/github-code-clean
# Copyright 2020 Google Research. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
codeparrot/github-code-clean
### Necessary imports import numpy as np import os import copy import matplotlib.pyplot as plt import matplotlib.patches as mp import lsst.sims.photUtils.Sed as Sed import lsst.sims.photUtils.Bandpass as Bandpass from atmo2mags.atmo import Atmo from astroML.plotting.mcmc import convert_to_stdev from astroML.decorator...
codeparrot/github-code-clean
from __future__ import absolute_import from __future__ import division import deprecation import numpy as np import scipy.ndimage as scind from scipy.ndimage import ( binary_erosion, convolve, gaussian_filter, generate_binary_structure, label, map_coordinates, ) from . import _filter from .rank...
codeparrot/github-code-clean
from sympy import ( Add, Abs, Chi, Ci, CosineTransform, Dict, Ei, Eq, FallingFactorial, FiniteSet, Float, FourierTransform, Function, IndexedBase, Integral, Interval, InverseCosineTransform, InverseFourierTransform, InverseLaplaceTransform, InverseMellinTransform, InverseSineTransform, Lambda, Lapla...
codeparrot/github-code-clean
from __future__ import generators from mapping import * from sequence import SequenceBase, DNA_SEQTYPE, RNA_SEQTYPE, PROTEIN_SEQTYPE import types from classutil import ClassicUnpickler,methodFactory,standard_getstate,\ override_rich_cmp,generate_items,get_bound_subclass,standard_setstate,\ get_valid_path,st...
codeparrot/github-code-clean
__version__ = '3.4.4' __author__ = "Avinash Kak (kak@purdue.edu)" __date__ = '2015-July-19' __url__ = 'https://engineering.purdue.edu/kak/dist/BitVector-3.4.4.html' __copyright__ = "(C) 2015 Avinash Kak. Python Software Foundation." __doc__ = ''' BitVector.py Version: ''' + __version__ + ''' Author: Avin...
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. """code generator for GL/GLES extension wrangler.""" import optparse import os import collections import re import platform import...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either versio...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## Comments and reviews for records. ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 ...
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 -*- # # # =========================================================================== # # EDXMLDefinitions Python class # # Copyright (c) 2010 - 2016 by D.H.J. Takken # (d.h.j.takken@xs4all.nl) # # This file is part of the E...
codeparrot/github-code-clean
# some functions from __future__ import print_function from __future__ import absolute_import try: # For Python 2 basestring = basestring except NameError: basestring = str def poly(c,x): """ y = Sum { c(i)*x^i }, i=0,len(c)""" import numpy as N y=N.zeros(len(x)) for i in range(len(c)): ...
codeparrot/github-code-clean
#!/usr/bin/env python # # # This file is part of do_x3dna # # Author: Rajendra Kumar # Copyright (C) 2014-2019 Rajendra Kumar # # do_x3dna uses 3DNA package (http://x3dna.org). # Please cite the original publication of the 3DNA package: # Xiang-Jun Lu & Wilma K. Olson (2003) # 3DNA: a software package for the analysis...
codeparrot/github-code-clean
""" Frontend to MySQL DB AccountingDB """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import six import datetime import time import threading import random from DIRAC.Core.Base.DB import DB from DIRAC import S_OK, S_ERROR, gConfig fr...
codeparrot/github-code-clean
#!/bin/python # -*- coding: utf-8 -*- ############################################### #Dresscode : class : uppercase # function : begins with a capital # variable : words separated by capital # object : words separated by underscore from functionObjectVCF_creator import * import re impo...
codeparrot/github-code-clean
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@fr...
codeparrot/github-code-clean
# -*- coding: UTF-8 -*- #-------------------------------------------------------------------------- # package : GenroPy core - see LICENSE for details # module gnrbag : an advanced data storage system # Copyright (c) : 2004 - 2007 Softwell sas - Milano # Written by : Giovanni Porcari, Michele Bertoldi # ...
codeparrot/github-code-clean
# coding=utf-8 # Copyright 2021 Microsoft and The HuggingFace Inc. team. 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....
codeparrot/github-code-clean
''' Build a attention-based neural machine translation model ''' import theano import theano.tensor as tensor from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from ipdb import set_trace as dbg import cPickle as pkl import numpy import numpy as np import copy import os import warnings import sys ...
codeparrot/github-code-clean
from distutils.version import LooseVersion from datetime import date, datetime, timedelta import pytest import pytz from pandas.compat import range from pandas import compat import numpy as np from pandas.compat.numpy import np_datetime64_compat from pandas.core.series import Series from pandas._libs.tslibs import ...
codeparrot/github-code-clean
""" Building and world design commands """ from django.conf import settings from src.objects.models import ObjectDB, ObjAttribute from src.players.models import PlayerAttribute from src.utils import create, utils from src.utils.ansi import raw from src.commands.default.muxcommand import MuxCommand from src.commands.c...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
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 copy import re import os from collections import namedtuple from fortls.jsonrpc import path_to_uri # Global variables sort_keywords = True # Regexes CLASS_VAR_REGEX = re.compile(r'(TYPE|CLASS)[ ]*\(', re.I) DEF_KIND_REGEX = re.compile(r'([a-z]*)[ ]*\((?:KIND|LEN)?[ =]*([a-z_][a-z0-9_]*)', re.I) OBJBREAK_REGEX = ...
codeparrot/github-code-clean
# coding=utf-8 #============================================================================= # gpx_gui.py # Copyright 2013--2018, Trinity College # Last modified: 24 May 2018 #============================================================================= import sys import os import gtk import math import glob import r...
codeparrot/github-code-clean
#!/usr/bin/env python # This file is part of Diamond. # # Diamond is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # ...
codeparrot/github-code-clean
# -*- encoding: utf8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # ...
codeparrot/github-code-clean
""" Cisco_IOS_XR_l2_eth_infra_oper This module contains a collection of YANG definitions for Cisco IOS\-XR l2\-eth\-infra package operational data. This module contains definitions for the following management objects\: mac\-accounting\: MAC accounting operational data vlan\: vlan ethernet\-encapsulation\: eth...
codeparrot/github-code-clean
##############################TESTS ON ORBITS################################## from __future__ import print_function, division import warnings import os, os.path import sys import platform WIN32= platform.system() == 'Windows' MACOS= platform.system() == 'Darwin' import time import signal import subprocess import pyte...
codeparrot/github-code-clean
#!/usr/bin/env python """Translate Promela to linear temporal logic (LTL)""" from __future__ import absolute_import import argparse import copy import json import logging import pprint import textwrap import warnings try: from dd import cudd as _bdd except ImportError: from dd import bdd as _bdd import dd.bdd i...
codeparrot/github-code-clean