text
stringlengths
475
200k
from __future__ import absolute_import from .Errors import error, message from . import ExprNodes from . import Nodes from . import Builtin from . import PyrexTypes from .. import Utils from .PyrexTypes import py_object_type, unspecified_type from .Visitor import CythonTransform, EnvTransform try: reduce except N...
from frappe import _ def get_data(): return [ { "label": _("Documents"), "icon": "icon-star", "items": [ { "type": "doctype", "name": "Lead", "description": _("Database of potential customers."), }, { "type": "doctype", "name": "Customer", "description": _("Custome...
############################################### # Snakemake rules associated with combined # analysis of each biosample from subsample resutls # this file must be included into another # Snakemake file ############################################### # rename each contig with subsample information # this rule is no lo...
import datetime from django.contrib.auth.models import User from django.shortcuts import render_to_response from django.template.context import RequestContext from django.views.generic.list_detail import object_list from taggit.models import Tag from cab.models import Snippet, Language, Bookmark from cab.utils impor...
import unittest import time class GpMgmtTestRunner(unittest.TextTestRunner): def _makeResult(self): return GpMgmtTextTestResult(self.stream, self.descriptions, self.verbosity) class GpMgmtTextTestResult(unittest.TextTestResult): def __init__(self, stream, descriptions, verbosity): super(GpMgm...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('instruct...
from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSException from django.forms.widgets import Textarea from django.template.loader import render_to_string class OpenLayersWidget(Textarea): """ Renders an OpenLayers map using the WKT of the geometry. """ ...
import logging import os from . import constants from .counter import Counter, CounterRecord error = logging.getLogger("purgecounter").error info = logging.getLogger("purgecounter").info class PurgeCounter(object): def __init__(self, prefs): self.filename = os.path.join(prefs['WORK_DIR'], ...
#!/usr/bin/python3 # Copyright (c) 2017-2020, Jan Varho # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE ...
# Copyright 2016 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 applicable ...
import arrow from sqlalchemy.dialects.postgresql import ARRAY from sqlalchemy.orm import aliased, contains_eager, joinedload import sqlalchemy as sa import web from libweasyl.models.content import Report, ReportComment from libweasyl.models.users import Login from libweasyl import constants, staff from weasyl.error im...
# Copyright (c) 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/LICENSE-2.0 # # Unless ...
"""Notification testing.""" from django.test import TransactionTestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from apps.managers.challenge_mgr import challenge_mgr from apps.utils import test_utils from apps.widgets.notifications import get_unread_notifications from ...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
# ---------------------------------------------------------------------- # 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...
''' ''' # 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");...
# (c) 2012-2014, Michael DeHaan <[EMAIL]> # # 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 version. ...
"""Stochastic optimization methods for MLP """ # Authors: Jiyuan Qian <[EMAIL]> # License: BSD 3 clause import numpy as np class BaseOptimizer(object): """Base (Stochastic) gradient descent optimizer Parameters ---------- params : list, length = len(coefs_) + len(intercepts_) The concatena...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.tap}. """ try: import Crypto.Cipher.DES3 except: Crypto = None try: import pyasn1 except ImportError: pyasn1 = None try: from twisted.conch import unix except ImportError: unix = None if Cr...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <[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', ...
"""SCons.Tool.tlib XXX """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 restr...
# -*- coding: utf-8 -*- """ *************************************************************************** SelectByExpression.py --------------------- Date : July 2014 Copyright : (C) 2014 by Michael Douchin ***********************************************************************...
# Copyright 2018 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...
#!/bin/env python import os from distutils.core import setup, Extension if hasattr(os, 'uname'): OSNAME = os.uname()[0] else: OSNAME = 'Windows' define_macros = [] libraries = [] extra_link_args = [] extra_compile_args = ['-I../../../'] sources = ['rtaudiomodule.cpp', '../../../RtAudio.cpp'] if OSNAME == ...
# -*- coding: utf-8 -*- import re from ..internal.Account import Account class QuickshareCz(Account): __name__ = "QuickshareCz" __type__ = "account" __version__ = "0.11" __status__ = "testing" __description__ = """Quickshare.cz account plugin""" __license__ = "GPLv3" __authors__ = [("zo...
import time import boto import boto.ec2 from fabric.api import task, settings, sudo, execute, env, run, cd, local, put, abort, get, hosts from fabric.operations import prompt from ec2_deploy.connections import AWS from ec2_deploy.notifications import Notification def create_instance(instance_type='web', address=No...
import logging import time import os from coala_utils.decorators import enforce_signature from coalib.misc.CachingUtilities import ( pickle_load, pickle_dump, delete_files) class FileCache: """ This object is a file cache that helps in collecting only the changed and new files since the last run. Exa...
#!/usr/bin/env python """ Configuration script for the analyzer of B0s -> K*0 Ds+ Ds- background events | | |-> pi- pi- pi+ pi0 | |-> pi+ pi+ pi- pi0 ...
from model.group import Group class GroupHelper: def __init__(self, app): self.app = app def open_groups_page(self): wd = self.app.wd if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0): wd.find_element_by_link_text("groups").click()...
# util/langhelpers.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Routines to help with the creation, loading and introspection of modules, class...
# -*- coding: utf-8 -*- """ Spectral bipartivity measure. """ import networkx as nx __author__ = """Aric Hagberg ([EMAIL])""" # Copyright (C) 2011 by # Aric Hagberg <[EMAIL]> # Dan Schult <[EMAIL]> # Pieter Swart <[EMAIL]> # All rights reserved. # BSD license. __all__ = ['spectral_bipartivity'] def ...
import os try: from hashlib import sha1 as sha except ImportError: from sha import sha def gitsha(path): h = sha() data = file(path, 'rb').read() h.update("blob %d\0" % len(data)) h.update(data) return h.hexdigest() def git_info(): commithash = os.popen('git rev-parse --verify HEAD 2>/dev/null...
import os def split_path(path): folders = [] while True: path, folder = os.path.split(path) if folder != "": folders.append(folder) else: if path != "": folders.append(path) break folders.reverse() return folders def lex_file(...
#!/usr/bin/env python '''Example of a custom replaced element for XHTML layout. ''' __docformat__ = 'restructuredtext' __version__ = '$Id: xml_css.py 322 2006-12-26 12:53:18Z Alex.Holkner $' from ctypes import * from pyglet.gl import * from pyglet.window import Window from pyglet import clock from layout import * ...
from pip._vendor.pkg_resources import yield_lines from pip._vendor.six import ensure_str from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Dict, Iterable, List class DictMetadata: """IMetadataProvider that reads metadata files from a dictionary. """ ...
# -*- Mode: Python; -*- # Copyright (c) 2009 INESC Porto # # 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; # # This program is distributed in the hope that it will be useful, #...
# Copyright 2011-2015 MongoDB, 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 writin...
import myhdl from myhdl import * from myhdl import ToVHDLWarning import pytest import tempfile import shutil import sys import string import importlib import os from keyword import kwlist as python_kwlist import warnings _vhdl_keywords = ["abs", "access", "after", "alias", "all", "and", "architectu...
import logging import shutil import json from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotAllowed, Http404 fro...
#! /usr/bin/env python # libcluster -- A collection of hierarchical Bayesian clustering algorithms. # Copyright (C) 2013 Daniel M. Steinberg ([EMAIL]) # # This file is part of libcluster. # # libcluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public Licens...
# -*- coding: utf-8 -*- """core -- core behaviors for Owyl. Copyright 2008 David Eyk. All rights reserved. $Author$\n $Rev$\n $Date$ """ __author__ = "$Author$"[9:-2] __revision__ = "$Rev$"[6:-2] __date__ = "$Date$"[7:-2] import logging try: from mx.Stack import Stack, EmptyError except ImportError: from s...
# -*- coding: utf-8 -*- """ flask ~~~~~ A microframework based on Werkzeug. It's extensively documented and follows best practice patterns. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ __version__ = '0.11.dev0' # utilities we import from Werkzeug ...
# Copyright (C) 2020 The Android Open Source Project # # 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 ...
#!/usr/bin/env python ### submit cosmomc jobs #### by Zhiqi Huang ([EMAIL]) import re import os import sys import glob import string def search_value(fname, pattern): fp = open(fname, 'r') file_content = fp.read() fp.close() m = re.search(pattern, file_content, flags = re.M + re.I) if m: r...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <[EMAIL]> # # 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 # (...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
import sys import time import logging import datetime from django.db import transaction from django.utils import timezone from framework.celery_tasks import app as celery_app from website.app import setup_django setup_django() from osf.models import Session from scripts.utils import add_file_logger logger = logging...
from django.contrib.localflavor.cl.forms import CLRutField, CLRegionSelect from django.test import SimpleTestCase class CLLocalFlavorTests(SimpleTestCase): def test_CLRegionSelect(self): f = CLRegionSelect() out = u'''<select name="foo"> <option value="RM">Regi\xf3n Metropolitana de Santiago</opt...
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_cwed_ascii.py ------------------ Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr **********************...
# Font generation script from FontCustom # https://github.com/FontCustom/fontcustom/ # http://fontcustom.com/ import fontforge import os import md5 import subprocess import tempfile import json import copy SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__)) INPUT_SVG_DIR = os.path.join(SCRIPT_PATH, '..', '..', '...
#!/usr/bin/env python import datetime import XenAPI import sanitychecklib #parameters for the shared storage to be created storage_type='nfs' device_config={'server':sanitychecklib.network_storage_server, 'serverpath':sanitychecklib.network_storage_path } physical_size = '100000' name_label = 'created by sharedstor...
import re from pandasqt.compat import QtCore, QtGui, Qt, Slot, Signal from pandasqt.models.SupportedDtypes import SupportedDtypes import numpy from pandas import Timestamp from pandas.tslib import NaTType class DefaultValueValidator(QtGui.QValidator): def __init__(self, parent=None): super(DefaultValueV...
# -*- 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/env python # Copyright 2009 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...
# system call counts, by pid # (c) 2010, Tom Zanussi <[EMAIL]> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.environ['PERF_...
# Copyright (C) 2015 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
from __future__ import unicode_literals import os import re from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm, ReadOnlyPasswordHashField, ReadO...
# Copyright 2010 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...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class VierIE(InfoExtractor): IE_NAME = 'vier' _VALID_URL = r'https?://(?:www\.)?vier\.be/(?:[^/]+/videos/(?P<display_id>[^/]+)(?:/(?P<id>\d+))?|video/v3/embed/(?P<embed_id>\d+))' _TESTS = [{ 'url'...
from docutils import writers from docutils import nodes class LitreTranslator(nodes.GenericNodeVisitor): def __init__(self, document, config): nodes.GenericNodeVisitor.__init__(self,document) self._config = config def default_visit(self, node): pass # print '**visiting...
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import pandas import numpy as np import statsmodels.formula.api as smf import st...
import unittest import six from w3lib.encoding import resolve_encoding from scrapy.http import (Request, Response, TextResponse, HtmlResponse, XmlResponse, Headers) from scrapy.selector import Selector from scrapy.utils.python import to_native_str class BaseResponseTest(unittest.TestCase): ...
import datetime #import simplejson as json from django.utils import simplejson as json from django.db.models.query_utils import Q from django.shortcuts import get_object_or_404 from django.template.loader import render_to_string from django.contrib.auth.models import User from django.http import HttpResponse from dja...
# import RPi.GPIO as gpio # import time # #use board numbering on the pi # gpio.setmode(gpio.BOARD) # # output_pins = [40, 38] # output_pins = 16 # gpio.setup(output_pins, gpio.OUT) # #true and 1 are the same # # gpio.output(40, True) # # gpio.output(38, 1) # while True: # gpio.output(output_pins, (True, False))...
# Copyright (C) 2011 Google Inc. 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 conditions and the ...
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, Inc. # # 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 Licens...
# coding: utf-8 from __future__ import unicode_literals import datetime import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urlparse, ) from ..utils import ( parse_iso8601, str_to_int, ) class CamdemyIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?ca...
# -*- coding: utf-8 -*- """ jinja2.debug ~~~~~~~~~~~~ Implements the debug interface for Jinja. This module does some pretty ugly stuff with the Python traceback system in order to achieve tracebacks with correct line numbers, locals and contents. :copyright: (c) 2010 by the Jinja Team. :...
import datetime import random import unittest import uuid from nose.plugins.attrib import attr import mock from opaque_keys.edx.locator import CourseLocator, BlockUsageLocator from xmodule.modulestore import ModuleStoreEnum from xmodule.x_module import XModuleMixin from xmodule.modulestore.inheritance import Inherita...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Andrew Gaffney <[EMAIL]> # # 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 #...
# mako/_ast_util.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
# coding=utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) class JpopsukiIE(InfoExtractor): IE_NAME = 'jpopsuki.tv' _VALID_URL = r'https?://(?:www\.)?jpopsuki\.tv/(?:category/)?video/[^/]+/(?P<id>\S+)' _TEST = { ...
''' Based on the OpenSearch Python module by Ed Summers <[EMAIL]> from https://github.com/edsu/opensearch . This module is heavily modified and does not implement all the features from the original. The ability for the the module to perform a search and retrieve search results has been removed. The original module us...
# Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt # # 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 la...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # 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...
""" Test functions for linalg module using the matrix class.""" import numpy as np from numpy.linalg.tests.test_linalg import ( LinalgCase, apply_tag, TestQR as _TestQR, LinalgTestCase, _TestNorm2D, _TestNormDoubleBase, _TestNormSingleBase, _TestNormInt64Base, SolveCases, InvCases, EigvalsCases, EigCases, ...
import unittest from test import test_support from contextlib import closing import gc import pickle import select import signal import subprocess import traceback import sys, os, time, errno if sys.platform in ('os2', 'riscos'): raise unittest.SkipTest("Can't test signal on %s" % sys.platform) class HandlerBCal...
# Copyright 2011 Citrix Systems. # 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 ...
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import os import posixpath from django.conf import settings from django.contrib.staticfiles import finders from django.http import Http404 from django.utils.six.moves.url...
# -*- encoding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Haltu Oy, http://haltu.fi # # 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 ...
#!/usr/bin/env python from functools import wraps from typing import Callable, Dict, List, Optional, Tuple, TypeVar from genes.debian.traits import is_debian from genes.lib.logging import log_error, log_warn from genes.lib.traits import ErrorLevel T = TypeVar('T') def is_ubuntu(versions: Optional[List[str]] = None)...
################################################################ # # kim_compare_lammps # ################################################################ # # Copyright 2018 the potfit development team # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated doc...
######################## BEGIN LICENSE BLOCK ######################## # 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.1 of the License, or (at your option) any later ve...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operati...
import datetime from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, \ BaseDatabaseWrapper, BaseDatabaseClient, BaseDatabaseValidation, \ BaseDatabaseIntrospection from .creation import NonrelDatabaseCreation class NonrelDatabaseFeatures(BaseDatabaseFeatures): can_return_id_from_in...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# encoding: UTF-8 import sys from time import sleep from PyQt4 import QtGui from vnksotptd import * #---------------------------------------------------------------------- def print_dict(d): """按照键值打印一个字典""" for key,value in d.items(): print key + ':' + str(value) #----------------...
import logging import copy import yaml import os from lxml import etree from collections import namedtuple from pkg_resources import resource_listdir, resource_string, resource_isdir from xmodule.modulestore import Location from xmodule.modulestore.exceptions import ItemNotFoundError from xblock.core import XBlock, ...
# osutil.py - pure Python version of osutil.c # # Copyright 2009 Matt Mackall <[EMAIL]> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import os import stat as statmod def _mode_to_kind(mode): if statmod.S_ISREG(...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright (c) 2012 Google Inc. 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 conditions and the ...
# # Copyright 2018 Red Hat | Ansible # # 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 version. # # ...
import copy from django.core.urlresolvers import reverse from rest_framework.test import APIClient from tests import test_utils from treeherder.client import TreeherderResultSetCollection from treeherder.model.models import (FailureClassification, Job, ...
#!/usr/bin/env python #! -*- coding: utf-8 -*- """Listado y creación del consolidado anual""" import cgi import cgitb; cgitb.enable() import funciones import datos import pagina import htm import csv import StringIO def listado(): """Listado de consolidado""" pag = pagina.Pagina("Consolidado anual", 4) prin...
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from nagios import N...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 compli...
# 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 version. # # Ansible is distributed in the hope that ...
""" DIRAC DirectoryTree base class """ from __future__ import absolute_import from __future__ import division from __future__ import print_function __RCSID__ = "$Id$" import six import time import threading import os import stat from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.DataManagementSystem.DB.FileCatalogC...
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= The Iris Dataset ========================================================= This data sets consists of 3 different types of irises' (Setosa, Versicolour, and Virginica) petal and sepal length, stored in a 150x4 numpy...