text
stringlengths
5.09k
178k
domain
stringclasses
106 values
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: latin-1 -*- """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 "pydo...
codeparrot/github-code-clean
import time from copy import deepcopy from Foundation import NSArray from AppKit import NSOnOffButton, NSRoundRectBezelStyle, NSDate, NSColor, NSFontNameAttribute, \ NSFormatter, NSTextField, NSTextView, NSTextFieldCell, NSView, NSNoTabsNoBorder, NSButton, NSObject, \ NSDecimalNumber, NSString, NSInsetRect, NSN...
codeparrot/github-code-clean
####################################################################### # # Copyright 2009-2011 by Ullrich Koethe # # This file is part of the VIGRA computer vision library. # The VIGRA Website is # http://hci.iwr.uni-heidelberg.de/vigra/ # Please direct questions, bug reports, and contributions...
codeparrot/github-code-clean
# Neural networks, from the simple perceptron to deep learning ## To do list * write code for single perceptron model and make link with linear regression * revise initial info and add references * Update tensorflow material, with keras * think of adding material about pytorch * rework pulsar example and breast c...
codeparrot/github-code-clean
#!/usr/bin/env python """Module cma implements the CMA-ES (Covariance Matrix Adaptation Evolution Strategy). CMA-ES is a stochastic optimizer for robust non-linear non-convex derivative- and function-value-free numerical optimization. This implementation can be used with Python versions 2.6, 2.7, 3.x. CMA-ES...
codeparrot/github-code-clean
from __future__ import division from copy import copy, deepcopy from six import PY2 from enigma import BT_SCALE, RT_HALIGN_CENTER, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_BOTTOM, RT_VALIGN_CENTER, RT_VALIGN_TOP, eListboxPythonMultiContent, getPrevAsciiCode, gFont import six from skin import fonts, parameters from ...
codeparrot/github-code-clean
# patch.py - patch file parsing routines # # Copyright 2006 Brendan Cully <brendan@kublai.com> # Copyright 2007 Chris Mason <chris.mason@oracle.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_i...
codeparrot/github-code-clean
# coding=utf-8 import json import logging from collections import Counter from datetime import datetime from typing import Iterable from homematicip.base.enums import * from homematicip.base.helpers import get_functional_channel, get_functional_channels from homematicip.base.HomeMaticIPObject import HomeMaticIPObject ...
codeparrot/github-code-clean
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2014 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas 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
#!/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
# -*- 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: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@frii...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- '''Unit tests for models and their factories.''' import mock import unittest from nose.tools import * # noqa (PEP8 asserts) import pytz import datetime import urlparse from dateutil import parser from modularodm.exceptions import ValidationError, ValidationValueError, ValidationTypeError fr...
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
""" Data objects in group "Setpoint Managers" """ from collections import OrderedDict import logging from pyidf.helper import DataObject logger = logging.getLogger("pyidf") logger.addHandler(logging.NullHandler()) class SetpointManagerScheduled(DataObject): """ Corresponds to IDD object `SetpointManager:Sched...
codeparrot/github-code-clean
############################################################################### # # Worksheet - A class for writing the Excel XLSX Worksheet file. # # Copyright 2013-2016, John McNamara, jmcnamara@cpan.org # # Standard packages. import re import tempfile import codecs import os from warnings import warn # Standard p...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ This ...
codeparrot/github-code-clean
from functools import wraps from sys import getsizeof from typing import ( TYPE_CHECKING, Any, Callable, Hashable, Iterable, List, Optional, Sequence, Tuple, Union, ) import warnings import numpy as np from pandas._config import get_option from pandas._libs import algos as lib...
codeparrot/github-code-clean
""" A MathML printer. """ from __future__ import print_function, division from sympy import sympify, S, Mul from sympy.core.compatibility import range, string_types, default_sort_key from sympy.core.function import _coeff_isneg from sympy.printing.conventions import split_super_sub, requires_partial from sympy.printi...
codeparrot/github-code-clean
""" Provide a generic structure to support window functions, similar to how we have a Groupby object. """ from __future__ import annotations import copy from datetime import timedelta from functools import partial import inspect from textwrap import dedent from typing import ( TYPE_CHECKING, Any, Callable,...
codeparrot/github-code-clean
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # Eric Martin <eric@ericmart.in> # Giorgio Patrini <giorgio.patrini@anu.edu.au> # Lic...
codeparrot/github-code-clean
import json import unittest2 import webtest from datetime import datetime from google.appengine.ext import ndb from google.appengine.ext import deferred from google.appengine.api import taskqueue from google.appengine.ext import testbed import api_main import tba_config from consts.award_type import AwardType from c...
codeparrot/github-code-clean
from sqlalchemy.test.testing import eq_, assert_raises, assert_raises_message import datetime, re, operator from sqlalchemy import * from sqlalchemy import exc, sql, util from sqlalchemy.sql import table, column, label, compiler from sqlalchemy.sql.expression import ClauseList from sqlalchemy.engine import default from...
codeparrot/github-code-clean
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
codeparrot/github-code-clean
import xbmcaddon, xbmcvfs from htmltoxbmc import HTMLConverter import re, os, sys, time, urllib2, urlparse import xbmc, xbmcgui #@UnresolvedImport import mechanize, threading # @UnresolvedImport import YDStreamExtractor as StreamExtractor import YDStreamUtils as StreamUtils StreamExtractor.overrideParam('noplaylist',...
codeparrot/github-code-clean
## NIFTY (Numerical Information Field Theory) has been developed at the ## Max-Planck-Institute for Astrophysics. ## ## Copyright (C) 2013 Max-Planck-Society ## ## Author: Marco Selig ## Project homepage: <http://www.mpa-garching.mpg.de/ift/nifty/> ## ## This program is free software: you can redistribute it and/or mod...
codeparrot/github-code-clean
## This module comprehends some routines to generate a simple datafile ## with/without header, that can be read in by pgfplots ## and routines to write a tex file to plot from a given file import os import commands from io_routines import convert_filename_to_path_and_filename, sorted_nicely, sortdiff, get_relative_path...
codeparrot/github-code-clean
#!/usr/bin/env python2 # # Email: Hagen Paul Pfeifer <hagen@jauu.net> # URL: http://research.protocollabs.com/captcp/ # Captcp 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, ...
codeparrot/github-code-clean
# Copyright (C) 2006--2015 Kipp Cannon # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any later version. # # This program is distribute...
codeparrot/github-code-clean
# coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 import cherrypy # 導入 Python 內建的 os 模組, 因為 os 模組為 Python 內建, 所以無需透過 setup.py 安裝 import os # 導入 random 模組 import random import math from cherrypy.lib.static import serve_file # ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ''' *GSASIIstrMath - structure math routines* ----------------------------------------- ''' ########### SVN repository information ################### # $Date: 2018-06-13 20:58:28 +0300 (Wed, 13 Jun 2018) $ # $Author: vondreele $ # $Revision: 3433 $ # $URL: https://subversion.xray.aps.a...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- #!/usr/bin/python """Test of line navigation output of Firefox on the Orca wiki. Note that this is based on the following Firefox 3 build: Gecko/2007122122 Minefield/3.0b3pre. In addition, it is using the current patch to bug 505102 to handle a significant change made in the current Firefox. ...
codeparrot/github-code-clean
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
codeparrot/github-code-clean
# Copyright 2011 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
# Copyright (c) 2013 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 agreed to ...
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
""" Cisco_IOS_XR_snmp_agent_oper This module contains a collection of YANG definitions for Cisco IOS\-XR snmp\-agent package operational data. This module contains definitions for the following management objects\: snmp\: SNMP operational data Copyright (c) 2013\-2015 by Cisco Systems, Inc. All rights reserved. ...
codeparrot/github-code-clean
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### end...
codeparrot/github-code-clean
from collections import defaultdict from sympy import SYMPY_DEBUG from sympy.core import (Basic, S, C, Add, Mul, Pow, Rational, Integer, Derivative, Wild, Symbol, sympify, expand, expand_mul, expand_func, Function, Equality, Dummy, Atom, count_ops, Expr, factor_terms, expand_multinomial) from sympy.core....
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 -*- # Test the support for SSL and sockets import sys import unittest from test import test_support as support from test.script_helper import assert_python_ok import asyncore import socket import select import time import datetime import gc import os import errno import pprint import tempfile impor...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ Utilities @requires: U{B{I{gluon}} <http://web2py.com>} @copyright: (c) 2010-2015 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 "Softwa...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from __future__ import division import numpy as np import types as python_types import warnings import copy import os from six.moves import zip from .. import backend as K from ..utils.io_utils import ask_to_proceed_...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: vboxshell.py $ """ VirtualBox Python Shell. This program is a simple interactive shell for VirtualBox. You can query information and issue commands from a simple command line. It also provides you with examples on how to use VirtualBox's Python API. This shell is e...
codeparrot/github-code-clean
"""A set of classes used during the parsing of VB code""" # << Definitions >> StopSearch = -9999 # Used to terminate searches for parent properties # -- end -- << Definitions >> # << Classes >> (1 of 75) class VBElement(object): """An element of VB code""" # << VBElement methods >> (1 of 2) def __init__(s...
codeparrot/github-code-clean
""" matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas. Transforms are composed into trees of :class:`TransformNode` objects whose actual value depends on their children. When the contents of children change, their pare...
codeparrot/github-code-clean
#! /usr/bin/env python # -*- coding: utf-8 -*- #====================================================================== # # emake.py - emake version 3.30 # # history of this file: # 2009.08.20 skywind create this file # 2009.11.14 skywind new install() method # 2009.12.22 skywind implementation execute inter...
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 -*- from __future__ import absolute_import, unicode_literals from django.conf import settings if __name__ == '__main__': # When running this file in isolation, we need to set up the configuration # before importing 'template'. settings.configure() from datetime import date, datetime, ...
codeparrot/github-code-clean
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytest import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm from pandas import (Series, Dat...
codeparrot/github-code-clean
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( create_coinbase, c...
codeparrot/github-code-clean
# coding: utf-8 from __future__ import unicode_literals import binascii import collections import email import getpass import io import optparse import os import re import shlex import shutil import socket import struct import subprocess import sys import itertools import xml.etree.ElementTree try: import urllib...
codeparrot/github-code-clean
""" Modulestore backed by Mongodb. Stores individual XModules as single documents with the following structure: { '_id': <location.as_dict>, 'metadata': <dict containing all Scope.settings fields> 'definition': <dict containing all Scope.content fields> 'definition.children': <list of all child locati...
codeparrot/github-code-clean
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTCP} and the TCP parts of L{IReactorSocket}. """ from __future__ import division, absolute_import __metaclass__ = type import errno import socket from functools import wraps from zope.interface impor...
codeparrot/github-code-clean
from collections import Iterable from numbers import Real, Integral import sys from six import string_types import numpy as np import h5py import openmc import openmc.mgxs from openmc.checkvalue import check_type, check_value, check_greater_than, \ check_iterable_type, check_less_than # Supported incoming parti...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: interval.py # Purpose: music21 classes for representing intervals # # Authors: Michael Scott Cuthbert # Jackie Rogoff # Amy Hailes # Christopher A...
codeparrot/github-code-clean
"""tests of joined-eager loaded attributes""" from sqlalchemy.testing import eq_, is_, is_not_ import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy.orm import joinedload, deferred, undefer, \ joinedload_all, backref, eagerload, Session, immediateload from sqlalchemy import Integer, String, Date, ...
codeparrot/github-code-clean
################################################################################ # Copyright 2016-2022 Advanced Micro Devices, Inc. All rights reserved. # # 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 t...
codeparrot/github-code-clean
from nose.tools import assert_equal from nose.tools import assert_raises import numpy as np from numpy import ma import matplotlib from matplotlib.testing.decorators import image_comparison, cleanup import matplotlib.pyplot as plt @image_comparison(baseline_images=['formatter_ticker_001', ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ A Cell A cell is a single input/output block. Worksheets are built out of a list of cells. """ ########################################################################### # Copyright (C) 2006 William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public ...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- """ /*************************************************************************** topog4qgis A QGIS plugin Tools for managing Topographic tool on vector layers ----------------------------- begin : 2013-10-30 copyright ...
codeparrot/github-code-clean
#!/usr/bin/python # -*- coding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2013 Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> # Copyright (C) 2013 Olivier Médoc <o_medoc@yahoo.fr> # # This program is free software; you can redistribute it and/or # modify it under the ...
codeparrot/github-code-clean
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #from time import sleep from fakeclassRdm import fakeRdm, fakeReadXMLString #from classEditor import Editor import unittest #from xml.dom import minidom class barreSimpleTestCase(unittest.TestCase) : def setUp(self): self.rdm = self._genere_instance() def _...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import time from datetime import datetime import uuid import sets from functools import partial import openerp import openerp.addons.decimal_precision as dp from openerp import tools, models, SUPERUSER_I...
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
# ------------------------------------------------------------------------------ # Copyright 2021 Esri # 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/LICEN...
codeparrot/github-code-clean
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
codeparrot/github-code-clean
from collections import OrderedDict from itertools import product import pytest import warnings from warnings import catch_warnings from datetime import datetime, timedelta from numpy.random import randn import numpy as np import pandas as pd from pandas import (Series, DataFrame, bdate_range, isn...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011, 2019 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 ...
codeparrot/github-code-clean
#!/usr/bin/env python3 import ipaddress import random import socket import struct import unittest from io import BytesIO import scapy.compat from framework import VppTestCase, VppTestRunner from ipfix import IPFIX, Set, Template, Data, IPFIXDecoder from scapy.all import bind_layers, Packet, ByteEnumField, ShortField,...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- from boxbranding import getMachineBuild, getMachineBrand, getMachineName from Tools.Profile import profile from Screen import Screen import Screens.InfoBar import Components.ParentalControl from Components.Button import Button from Components.ServiceList import ServiceList, refreshServiceList f...
codeparrot/github-code-clean
""" Instructor Dashboard API views JSON views which the instructor dashboard requests. Many of these GETs may become PUTs in the future. """ import StringIO import json import logging import re import time import requests from django.conf import settings from django.views.decorators.csrf import ensure_csrf_cookie fro...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- # These expanded material design icons are maintained by Austin Andrews # (Templarian on Github). They can be found at materialdesignicons.com. # # LAST UPDATED: Version 1.7.22 # # For those updating from an older version of KivyMD, icon names have # changed/updated (e.g. square-o is now checkb...
codeparrot/github-code-clean
"""tfutils tests. These tests show basic procedures for training, validating, and extracting features from models. Note about MongoDB: The tests require a MongoDB instance to be available on the port defined by "testport" in the code below. This db can either be local to where you run these tests (and therefore on ...
codeparrot/github-code-clean
from sqlalchemy.testing import eq_, assert_raises_message, assert_raises, is_ from sqlalchemy import testing from sqlalchemy.testing import fixtures, engines from sqlalchemy import util import datetime from sqlalchemy import * from sqlalchemy import exc, sql from sqlalchemy.engine import default, result as _result from...
codeparrot/github-code-clean
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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
r""" ciscoconfparse.py - Parse, Query, Build, and Modify IOS-style configs Copyright (C) 2021-2022 David Michael Pennington Copyright (C) 2021 David Michael Pennington Copyright (C) 2020-2021 David Michael Pennington at Cisco Systems Copyright (C) 2019 David Michael Pennington at Thousand...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from lxml import etree as ET except ImportError: import xml.etree.ElementTree as ET #import xml.etree.ElementTree as ET # ТЕКСТ НИЖЕ НИ В КОЕМ СЛУЧАЕ НЕЛЬЗЯ РЕДАКТИРОВАТЬ! info = ''' Created on 18 октября 2016 г. Relise : 16.11.2016 @author: Ан...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with URL parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
codeparrot/github-code-clean
# SimpleCV Cameras & Devices #load system libraries from SimpleCV.base import * from SimpleCV.ImageClass import Image, ImageSet, ColorSpace from SimpleCV.Display import Display from SimpleCV.Color import Color from collections import deque import time import ctypes as ct import subprocess import cv2 import numpy as np...
codeparrot/github-code-clean
""" A Printer which converts an expression into its LaTeX equivalent. """ from __future__ import print_function, division from sympy.core import S, Add, Symbol from sympy.core.function import _coeff_isneg from sympy.core.sympify import SympifyError from sympy.core.alphabets import greeks from sympy.core.operations im...
codeparrot/github-code-clean
from collections import OrderedDict import copy import itertools from numbers import Integral import os import numpy as np import openmc import openmc.checkvalue as cv from openmc.mgxs import MGXS from .mgxs import _DOMAIN_TO_FILTER # Supported cross section types MDGXS_TYPES = ( 'delayed-nu-fission', 'chi-...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from datetime import timedelta from gluon import current, Field, URL from gluon.html import * from gluon.storage import Storage from gluon.v...
codeparrot/github-code-clean
#! /usr/bin/env python """ This script performs event averaging for particle spectra and anisotropic flow coefficients calculated from event-by-event simulations v_n is analyzed up to n = 6 Format for particle_XXX_vndata.dat file: n_order real_part real_part_err imag_part imag_part...
codeparrot/github-code-clean
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import binascii import ipaddress import os import pytest import six fr...
codeparrot/github-code-clean
#!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. __version__ = "1.8.4" # following best practices virtualenv_version = __version__ # legacy, again import base64 import sys import os import codecs import optparse i...
codeparrot/github-code-clean
#!/usr/bin/env python3 import logging from collections import defaultdict from errno import ENOENT from stat import S_IFDIR, S_IFLNK, S_IFREG, S_ISDIR, S_ISREG from sys import argv, exit from time import time, sleep from fuse import FUSE, FuseOSError, Operations, LoggingMixIn import socket import sys import select im...
codeparrot/github-code-clean
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single file an...
codeparrot/github-code-clean
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2010, 2011, 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 Free Software Foundation; either version 2 of the ## ...
codeparrot/github-code-clean
#!/usr/bin/env python """Create a "virtual" Python installation """ # If you change the version here, change it in setup.py # and docs/conf.py as well. virtualenv_version = "1.6" import base64 import sys import os import optparse import re import shutil import logging import tempfile import zlib import errno import ...
codeparrot/github-code-clean
__author__ = 'Benjamin Moran' from pyglet import compat_platform # def get_guid(device): # """Generate a Game Controller GUID from a joystick device. # # :param device: a pyglet joystick device # :return: SDL2 format Game Controller GUID # # """ # if compat_platform.startswith("linux"): # ...
codeparrot/github-code-clean
# -*- coding:utf-8 -*- ## src/config.py ## ## Copyright (C) 2003-2005 Vincent Hanquez <tab AT snarc.org> ## Copyright (C) 2003-2014 Yann Leboulanger <asterix AT lagaule.org> ## Copyright (C) 2005 Alex Podaras <bigpod AT gmail.com> ## Stéphan Kochen <stephan AT kochen.nl> ## Copyright (C) 2005-2006 Di...
codeparrot/github-code-clean
# Copyright 2014 Red Hat, 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 ClusterHQ. See LICENSE file for details. """ Tests for `libzfs_core` operations. These are mostly functional and conformance tests that validate that the operations produce expected effects or fail with expected exceptions. """ import unittest import contextlib import errno import filecmp import os ...
codeparrot/github-code-clean
# Copyright (c) 2010-2013 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 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
from __future__ import absolute_import from __future__ import print_function from typing import Tuple from django.conf import settings from django.core import validators from django.contrib.sessions.models import Session from zerver.lib.cache import flush_user_profile from zerver.lib.context_managers import lockfile f...
codeparrot/github-code-clean
# coding: utf-8 """ RedfishvApi.py Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
codeparrot/github-code-clean
# Copyright (c) Gary Strangman. All rights reserved # # Disclaimer # # This software is provided "as-is". There are no expressed or implied # warranties of any kind, including, but not limited to, the warranties # of merchantability and fitness for a given application. In no event # shall Gary Strangman be liable fo...
codeparrot/github-code-clean