text
stringlengths
475
200k
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# pylint: skip-file # flake8: noqa class OCServiceAccountSecret(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' kind = 'sa' def __init__(self, config, verbose=False): ''' Constructor for OpenshiftOC ''' super(OCServiceAccountSecret, self).__init__(config.namespace, kubeconfi...
""" Defines AnimMgrBase """ import os, wx, math from direct.interval.IntervalGlobal import * from panda3d.core import VBase3,VBase4 import ObjectGlobals as OG import AnimGlobals as AG class AnimMgrBase: """ AnimMgr will create, manage, update animations in the scene """ def __init__(self, editor): ...
# -*- encoding: utf-8 -*- # Copyright: (c) 2016 H2O.ai # License: Apache License Version 2.0 (see LICENSE for details) """ :mod:`h2o.exceptions` -- all exceptions classes in h2o module. All H2O exceptions derive from :class:`H2OError`. """ from __future__ import absolute_import, division, print_function, unicode_lit...
__author__ = 'reggie' ###START-CONF ##{ ##"object_name": "filterhaikus", ##"object_poi": "qpwo-2345", ##"parameters": [ ## { ## "name": "tweet", ## "description": "english tweets", ## "required": true, ## "type": "Twee...
#!/usr/bin/env python '''miscellaneous commands''' import time, math from pymavlink import mavutil from MAVProxy.modules.lib import mp_module from os import kill from signal import signal from subprocess import PIPE, Popen class RepeatCommand(object): '''repeated command object''' def __init__(self, period...
from .common import random_str from rancher import ApiError from kubernetes.client import CustomObjectsApi from kubernetes.client import CoreV1Api import pytest import time import kubernetes import base64 def test_dns_fqdn_unique(admin_mc): client = admin_mc.client provider_name = random_str() access = ra...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Jun. 16, 2014 @author: Olivia Doppelt-Azeroual, CIB-C3BI, Institut Pasteur, Paris @author: Fabien Mareuil, CIB-C3BI, Institut Pasteur, Paris @author: Hervé Ménager, CIB-C3BI, Institut Pasteur, Paris @contact: [EMAIL] @project: ReGaTE @githuborganization: bio...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Virt management features Copyright 2007, 2012 Red Hat, Inc Michael DeHaan <[EMAIL]> Seth Vidal <[EMAIL]> This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of the GNU General Public License along ...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
from django.db import models from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.constants import JOIN_TYPE, LHS_ALIAS, LHS_JOIN_COL, \ TABLE_NAME, RHS_JOIN_COL from django.utils.tree import Node from djangotoolbox.fields import ListField from .lookups import StandardLookup OR = 'OR' #...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # 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 the Software without...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# ---------------------------------------------------------------------- # 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...
"""Tests for the create_fake_certs management command. """ from django.test import TestCase from django.core.management.base import CommandError from nose.plugins.attrib import attr from opaque_keys.edx.locator import CourseLocator from student.tests.factories import UserFactory from certificates.management.commands i...
# Copyright 2007 Matt Chaput. All rights reserved. # # 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...
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """OpenSSL/M2Crypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use i...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServerProject. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """...
""" @name: Modules/House/Family/hue/hue_hub.py @author: D. Brian Kimmel @contact: [EMAIL] @copyright: (c) 2017-2020 by D. Brian Kimmel @note: Created on Dec 19, 2017 @license: MIT License @summary: /config /lights /groups /schedules /scenes /sensors /rules Read the hub info and populate parts of pyho...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'configuredialog.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##########...
"""Astroid hooks for the Python 2 standard library. Currently help understanding of : * hashlib.md5 and hashlib.sha1 """ from astroid import MANAGER, AsStringRegexpPredicate, UseInferenceDefault, inference_tip from astroid import nodes from astroid.builder import AstroidBuilder MODULE_TRANSFORMS = {} # module spe...
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from django.db import models from django.utils.encoding import smart_str, smart_unicode from django.utils import datetime_safe class SerializationError(Exception): """Something bad happened during serialization.""" ...
#!/usr/bin/env python from setuptools import setup, find_packages from distutils.util import convert_path import codecs # Load version information main_ns = {} ver_path = convert_path('xmlrunner/version.py') with codecs.open(ver_path, 'rb', 'utf8') as ver_file: exec(ver_file.read(), main_ns) install_requires = [...
from __future__ import unicode_literals import re import unittest from unittest import skipUnless from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import ( HAS_SPATIAL_DB, no_mysql, no_oracle, no_spatialite, m...
# Copyright 2017 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, soft...
""" Stub implementation of an HTTP service. """ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler import urlparse import threading import json from functools import wraps from lazy import lazy from logging import getLogger LOGGER = getLogger(__name__) def require_params(method, *required_keys): """ ...
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg ([EMAIL]). """ import codecs, binascii ### Codec APIs def hex_enc...
# Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# -*- 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...
import numpy as np # import pandas as pd import theano import theano.tensor as T import layers import cc_layers import custom import load_data import realtime_augmentation as ra import time import csv import os import cPickle as pickle from datetime import datetime, timedelta # import matplotlib.pyplot as plt # plt.i...
import datetime, json, csv from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Group, Permission from tagging.models import Tag, TaggedItem from laws.models import Vote, VoteAction, Bill, La...
""" ====================================== Gradient Boosting Out-of-Bag estimates ====================================== Out-of-bag (OOB) estimates can be a useful heuristic to estimate the "optimal" number of boosting iterations. OOB estimates are almost identical to cross-validation estimates but they can be compute...
#!/usr/bin/env python #============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
import pytest import aiohttp from aiohttp import web from aiohttp.client import _RequestContextManager from collections.abc import Coroutine @pytest.mark.run_loop async def test_await(create_server, loop): async def handler(request): return web.HTTPOk() app, url = await create_server() app.rout...
from p2pool.bitcoin import data as bitcoin_data from p2pool.util import bases def reads_nothing(f): return '', f def protoPUSH(length): return lambda f: bitcoin_data.read(f, length) def protoPUSHDATA(size_len): def _(f): length_str, f = bitcoin_data.read(f, size_len) length = bases.string_t...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
#!/usr/bin/env python3 # Copyright (c) 2014-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 the RBF code.""" from decimal import Decimal from test_framework.blocktools import COINBASE_MATU...
"""Suite Files: Classes representing files Level 1, version 1 Generated from /System/Library/CoreServices/Finder.app AETE/AEUT resource version 0/144, language 0, script 0 """ import aetools import MacOS _code = 'fndr' class Files_Events: pass class alias_file(aetools.ComponentItem): """alias file - An a...
# 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. # Autocompletion config for YouCompleteMe in Chromium. # # USAGE: # # 1. Install YCM [https://github.com/Valloric/YouCompleteMe] # (Googlers s...
import numpy as np from bokeh.palettes import Spectral6 def process_data(): from bokeh.sampledata.gapminder import fertility, life_expectancy, population, regions # Make the column names ints not strings for handling columns = list(fertility.columns) years = list(range(int(columns[0]), int(columns[-...
from flask.ext.wtf import Form from wtforms import TextField, BooleanField, PasswordField, TextAreaField, SelectField from wtforms.validators import Required, Length, email, url, Optional import os class RegisterForm(Form): username = TextField('username', validators = [Required(), Length(min = 4, max = 50)]) passwo...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import re import six from django.c...
# # 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...
# -*- coding: utf-8 -*- """ *************************************************************************** ogr2ogrclipextent.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
#!/usr/bin/env python # Copyright (c) 2011 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. """ Verifies file copies with a trailing slash in the destination directory. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('cop...
# this can be used to upgrade disassemblies that aren't too annotated. # won't do very well on the current zelda disasm. import os import sys def GetPrefixLine(l, a): for s in a: if s[0:len(l)] == l: return s return "" def GetComment(l): comment_start = l.find("//") if comment_start < 0: comm...
# Copyright 2014 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 ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- """ Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U This file is part of Orion Context Broker. Orion Context Broker 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,...
from sympy import symbols, oo, Sum, harmonic, Add, S, binomial, factorial from sympy.series.limitseq import limit_seq from sympy.series.limitseq import difference_delta as dd from sympy.utilities.pytest import raises, XFAIL n, m, k = symbols('n m k', integer=True) def test_difference_delta(): e = n*(n + 1) e...
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from . impor...
#!/usr/bin/env python # 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. """ Tests that filenames that contain colons are handled correctly. (This is important for absolute paths on Windows.) """ import os import...
from django.conf import settings from django.http import HttpResponse from django.db.models import Model from django.contrib.contenttypes.models import ContentType from django.contrib.auth import authenticate from django.shortcuts import redirect from django.template import TemplateDoesNotExist, RequestContext, loader ...
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" from numpy.testing import * from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path from os.path import join, sep, dirname ajoin = lambda *paths: join(*((sep,)+paths)) class TestAppendpath(Test...
# -*- Mode: Python -*- # GObject-Introspection - a framework for introspecting GObject libraries # Copyright (C) 2008 Johan Dahlin # Copyright (C) 2008, 2009 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 publish...
#!/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...
#!/usr/bin/env python """ setup.py file for helium-client-python """ from setuptools import setup, find_packages from setuptools.extension import Extension from setuptools.command.build_ext import build_ext import codecs import versioneer def get_ext_modules(): local_inc = 'helium_client/helium-client' local...
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined # nose, nothing here to test __test__ = False number_r...
#!/usr/bin/env python3 # # Copyright (c) 2020, The OpenThread Authors. # All rights reserved. # # 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 # ...
# -*- 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...
from openelex.base.transform import Transform, registry from openelex.models import RawResult class FixVanBurenTransform(Transform): """ s/VanBuren/Van Buren in RawResults from the source file 20001107__ia__general__state_senate__county.csv """ name = 'fix_van_buren' def __call__(self): ...
from flask import Flask from werkzeug.utils import import_string class NoBlueprintException(Exception): pass class NoRouteModuleException(Exception): pass def _get_imported_stuff_by_path(path): module_name, object_name = path.rsplit('.', 1) module = import_string(module_name) return module, o...
import textwrap from colorama import Fore, Back, Style import colorama colorama.init() class Console(object): """ A simple way to print in a console terminal in color. Instead of using simply the print statement you can use special methods to indicate warnings, errors, ok and regular messages. ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): """ We shall contemplate truth by testing reality, via asserts. """ # Confused? This video should help: # # http://bit.ly/about_assert...
# -*- 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...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <[EMAIL]> # 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', ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import Gaussian2DKernel from astropy.nddata import NDData def test_basic_nddata(): arr = np.zeros((11, 11)) arr[5,...
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # # This file is part of Ansible # # Ansible 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 ver...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1.LoadBalancerIngress import LoadBalancerIngress from kubernetes_py.utils import is_valid_list class LoadBalancer...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
import numpy as np import iir_filter import pi_filter class demodulator: 'General purpose demodulator that supports BPSK, QPSK and OQPSK' def __init__(self, modulation_type, samples_per_symbol): """ Create the classical Costas loop carrier recovery object """ # store the pa...
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <[EMAIL]> # # 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 Software Foundation. # import os import sys import getopt import shutil import...
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
#!/usr/bin/env python3 import sys blocks = [] # # blocks is an array of paths under which we want to block by # default. # # blocks[0] = ['path' = '/sys', 'children' = [A,B] ] # blocks[1] = ['path' = '/proc/sys', 'children' = [ E ] ] # A = [ 'path' = 'fs', children = [C] ] # C = [ 'path' = 'cgroup', children = [...
""" The PortStatCollector collects metrics about ports listed in config file. ##### Dependencies * psutil """ from collections import defaultdict import diamond.collector try: import psutil except ImportError: psutil = None def get_port_stats(port): """ Iterate over connections and count states f...
""" Helper methods for credit card processing modules. These methods should be shared among all processor implementations, but should NOT be imported by modules outside this package. """ from django.conf import settings from microsite_configuration import microsite def get_processor_config(): """ Return a dic...
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import vim from powerline.bindings.vim import vim_get_func, vim_getoption, environ, current_tabpage, get_vim_encoding from powerline.renderer import Renderer from powerline.colorscheme import...
# -*- coding: utf-8 -*- # # SelfTest/Cipher/DES3.py: Self-test for the Triple-DES cipher # # Written in 2008 by Dwayne C. Litzenberger <[EMAIL]> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to th...
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Lic...
""" HTML Widget classes """ from __future__ import unicode_literals import copy import datetime import re from itertools import chain from django.conf import settings from django.forms.utils import flatatt, to_current_timezone from django.utils import datetime_safe, formats, six from django.utils.datastructures impo...
from MenuList import MenuList from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from enigma import eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap def PluginEntryComponent(plugin, width...
# -*- c-file-style: "sourcery" -*- # # Use and distribution of this software and its source code is governed # by the terms and conditions defined in the "LICENSE" file that is part # of this source code package. # from pybuilder.core import use_bldsup from pybuilder.core import use_plugin from pybuilder.core import...
# Copyright 2010 Hakan Kjellerstrand [EMAIL] # # 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...
""" """ import os.path import git REPO_ROOT = os.path.abspath(os.path.dirname(__file__)) DATA_DIR = os.path.join(REPO_ROOT, 'data') CURRENT_EXECUTION_VERSION = 16 NEW_AND_MODIFIED = '.' REMOVED = '-A' COMMIT_MSG='-m "Automated commit {index}. Running through."'.format(index=CURRENT_EXECUTION_VERSION) VERSION_TAG = 'v1...
#!/usr/bin/env python3.8 # Copyright (C) 2018-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. import gzip import http.server import os import sys import pickle import eris.fill3 as fill3 import eris.tools as tools USAGE = """Usage: eris-webserver <directory> Example: eri...
# # The Python Imaging Library. # $Id$ # # FLI/FLC file handling. # # History: # 95-09-01 fl Created # 97-01-03 fl Fixed parser, setup decoder tile # 98-07-15 fl Renamed offset attribute to avoid name clash # # Copyright (c) Secret Labs AB 1997-98. # Copyright (c) Fredrik Lundh 1995-97. # ...
# -*- coding: utf-8 -*- # Copyright 2013 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 require...
#!/usr/bin/env python # 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. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() # Add pylib to the im...
#!/usr/bin/env python """ Subscribe to a feed or a datastream that is visible to the supplied Cosm user API key To use this script you must create a text file containing your API key and pass it to this script using the --keyfile argument as follows: Subscribe for updates to a particular feed: $ simple_subscribe.py ...
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
# Copyright (c) 2016-2019 Chris Reed # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
"Misc. utility functions/classes for admin documentation generator." import re from email.parser import HeaderParser from email.errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes try: import docuti...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python implementation of Huffman Coding This script test the implementation software of Huffman Coding at \'main.py\'. """ __author__ = 'Ismael Taboada' __version__= '1.0' from collections import defaultdict import csv import os.path import time from huffman import...
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...