code
stringlengths
1
199k
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("configuration", "0001_initial"), ] operations = [ migrations.AlterModelOptions( name="setting", options={"verbose_name": "Setting", "verbose_name_plural": "Settings"}, )...
import curses from curses import A_UNDERLINE, color_pair, A_REVERSE from plasma.lib.custom_colors import * from plasma.lib.consts import * from plasma.lib.ui.widget import Widget ALPHANUM = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" def check_match_word(line, idx, word): if idx != 0 and line[i...
import sys import bpy language_id = "python" _BPY_MAIN_OWN = True def add_scrollback(text, text_type): for l in text.split("\n"): bpy.ops.console.scrollback_append(text=l.replace("\t", " "), type=text_type) def replace_help(namespace): def _help(*args): ...
import frappe def execute(): company = frappe.get_all('Company', filters = {'country': 'India'}) if not company: return field = frappe.db.get_value("Custom Field", {"dt": "Sales Invoice", "fieldname": "ewaybill"}) if field: ewaybill_field = frappe.get_doc("Custom Field", field) ewaybill_field.flags.ignore_val...
import discord async def resume(cmd, message, args): if message.author.voice: same_bound = True if message.guild.voice_client: if message.guild.voice_client.channel.id != message.author.voice.channel.id: same_bound = False if same_bound: if message.gui...
from __future__ import nested_scopes import os, tempfile from twisted.web import domhelpers, microdom import latex, tree, lint, default class MathLatexSpitter(latex.LatexSpitter): start_html = '\\documentclass{amsart}\n' def visitNode_div_latexmacros(self, node): self.writer(domhelpers.getNodeText(node)...
from __future__ import absolute_import, division, unicode_literals from datetime import date, datetime, timedelta from decimal import Decimal import math import re from mo_dots import Data, FlatList, Null, NullType, SLOT, is_data, wrap, wrap_leaves from mo_dots.objects import DataObject from mo_future import PY2, integ...
from __future__ import print_function, unicode_literals import os import os.path as path import subprocess import sys import shutil from time import time from mach.decorators import ( CommandArgument, CommandProvider, Command, ) from servo.command_base import CommandBase, cd def is_headless_build(): ret...
import urllib from datetime import datetime from logging import warning from weboob.deprecated.browser import Browser, BrowserIncorrectPassword, BrowserPasswordExpired from weboob.capabilities.bank import TransferError, Transfer from .perso.accounts_list import AccountsList, AccountPrelevement from .perso.transactions ...
from collections import defaultdict from itertools import groupby from math import ceil import csv import datetime import logging from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.exceptions import ValidationError fr...
from spack import * class PyJupyterServerMathjax(PythonPackage): """MathJax resources as a Jupyter Server Extension.""" homepage = "http://jupyter.org/" pypi = "jupyter_server_mathjax/jupyter_server_mathjax-0.2.3.tar.gz" version('0.2.3', sha256='564e8d1272019c6771208f577b5f9f2b3afb02b9e2bff3b34c042c...
from spack import * class Star(Package): """STAR is an ultrafast universal RNA-seq aligner.""" homepage = "https://github.com/alexdobin/STAR" url = "https://github.com/alexdobin/STAR/archive/2.5.3a.tar.gz" version('2.5.3a', 'baf8d1b62a50482cfa13acb7652dc391', url='https://github.com/ale...
from spack import * class PyFallocate(PythonPackage): """Module to expose posix_fallocate(3), posix_fadvise(3) and fallocate(2) """ homepage = "https://github.com/trbs/fallocate" url = "https://pypi.io/packages/source/f/fallocate/fallocate-1.6.4.tar.gz" version('1.6.4', sha256='85ebeb2786761fbe...
import pyuaf import time import threading import sys import unittest from pyuaf.util.unittesting import parseArgs import pyuaf from pyuaf.client import Client from pyuaf.client.settings import ClientSettings, SessionSettings from pyuaf.util import Address, NodeId, ExtensionObject, SdkStatus, Rela...
import os import pecan from oslo_config import cfg from pecan.middleware.static import StaticFileMiddleware from st2api import config as st2api_config from st2common import hooks from st2common import log as logging from st2common.util.monkey_patch import monkey_patch from st2common.constants.system import VERSION_STRI...
import jarray import inspect from java.lang import System from java.util.logging import Level from org.sleuthkit.datamodel import SleuthkitCase from org.sleuthkit.datamodel import AbstractFile from org.sleuthkit.datamodel import ReadContentInputStream from org.sleuthkit.datamodel import BlackboardArtifact from org.sleu...
import sys trace_fn = sys._getframe(0).f_trace if trace_fn is None: trace_name = "None" else: # Get the name of the tracer class. Py3k has a different way to get it. try: trace_name = trace_fn.im_class.__name__ except AttributeError: try: trace_name = trace_fn.__self__.__cla...
""" Prints statistics about a run """ import sys import csv import numpy as np def statScores(inFile): scores1 = [] scores2 = [] try: f = open(inFile, 'r') reader = csv.reader(f, delimiter=',') for row in reader: scores1.append(float(row[0])) scores2.append(fl...
import hashlib import os from oslo_concurrency import lockutils from oslo_log import log as logging import yaml from tempest import clients from tempest.common import cred_provider from tempest.common import fixed_network from tempest import config from tempest import exceptions CONF = config.CONF LOG = logging.getLogg...
"""## Control Flow Operations TensorFlow provides several operations and classes that you can use to control the execution of operations and add conditional dependencies to your graph. @@identity @@tuple @@group @@no_op @@count_up_to @@cond @@case @@while_loop TensorFlow provides several operations that you can use to ...
from oslo_serialization import jsonutils as json from tempest.lib.common import rest_client class ProjectTagsClient(rest_client.RestClient): api_version = "v3" def update_project_tag(self, project_id, tag): """Updates the specified tag and adds it to the project's list of tags. """ url =...
"""Tests for tensorflow.learning.training_ops.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.fra...
import os import dj_database_url BASE_DIR = os.path.dirname(os.path.abspath(__file__)) SECRET_KEY = 'mu3^rw&x_s*jbgrm_0e&v!@5!8u6^qm6)__f(l$p*qt*8zfzwj' DEBUG = True ALLOWED_HOSTS = [] INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessio...
import cPickle import gzip import os import sys import time import numpy import theano import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams from models.drn import DNN from models.dropout_nnet import DNN_Dropout from io_func.model_io import _nnet2file, _cfg2file, _file2nnet, log from ut...
import benchexec.tools.template class Tool(benchexec.tools.template.BaseTool2): # Needed for benchexec to run, but irrelevant for p4 extension def executable(self, tool): return "/" def name(self): return "P4 Test" def determine_result(self, run): # Traverse through the output an...
"""Classes for creating and populating PostgreSQL table with search data.""" import logging from common import exceptions import psycopg2 from serve.push.search.util import search_schema_parser logger = logging.getLogger("ge_search_publisher") class SearchSchemaTableUtil(object): """Creates and populates table for PO...
try: import pickle except ImportError: import cPickle as pickle import numpy as np import os import sys def load_dataset(filepath): with open(filepath, 'rb') as fd: try: cifar10 = pickle.load(fd, encoding='latin1') except TypeError: cifar10 = pickle.load(fd) image...
""" This module contains some useful functions for Strings, Files and Lists. """ import collections from decimal import Decimal import glob import io import logging import os import urllib.request import platform class TaskId(collections.namedtuple("TaskId", "name property expected_result runset")): """Uniquely ide...
"""Viessmann ViCare climate device.""" import logging import requests import voluptuous as vol from homeassistant.components.climate import ClimateEntity from homeassistant.components.climate.const import ( CURRENT_HVAC_HEAT, CURRENT_HVAC_IDLE, HVAC_MODE_AUTO, HVAC_MODE_HEAT, HVAC_MODE_OFF, PRES...
from django.urls import reverse import mock from openstack_dashboard import api from openstack_dashboard.test import helpers as test INDEX_URL = reverse('horizon:project:images:index') class SnapshotsViewTests(test.TestCase): def test_create_snapshot_get(self): server = self.servers.first() url = re...
from PySide import QtCore, QtGui class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.setWindowModality(QtCore.Qt.ApplicationModal) Dialog.resize(1043, 414) self.horizontalLayout_5 = QtGui.QHBoxLayout(Dialog) self.horizontalLayout_5.setObj...
""" Script for building the example. Usage: python setup.py py2app """ from distutils.core import setup import py2app setup( name="PyObjC Launcher", app=["PyObjCLauncher.py"], data_files=["English.lproj"], options=dict(py2app=dict( plist='Info.plist', )), )
import re from streamlink.plugin import Plugin from streamlink.plugin.api import useragents from streamlink.stream import HLSStream class MeTube(Plugin): _url_re = re.compile(r"""https?://(?:www\.)?metube\.id/ (?P<type>live|videos)/\w+(?:/.*)?""", re.VERBOSE) # extracted from webpage so...
''' YARA dumper for MISP by Christophe Vandeplas ''' import keys from pymisp import PyMISP import yara import re def dirty_cleanup(value): changed = False substitutions = (('”', '"'), ('β€œ', '"'), ('β€³', '"'), ('`', "'"), ('\r...
""" forms.py :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ from flask_wtf import Form from wtforms import TextField, TextAreaField, SelectField, DecimalField, \ validators from wtforms.validators import ValidationError from nereid...
from __future__ import print_function import argparse import json import os _FILE_URL = 'https://repo.maven.apache.org/maven2/org/checkerframework/dataflow-errorprone/3.15.0/dataflow-errorprone-3.15.0.jar' _FILE_NAME = 'dataflow-errorprone-3.15.0.jar' _FILE_VERSION = '3.15.0' def do_latest(): print(_FILE_VERSION) d...
import os basedir = os.path.abspath(os.path.dirname(__file__)) CSRF_ENABLED = True SECRET_KEY = 'robotcloud_secret_key' SQLALCHEMY_DATABASE_URI = 'sqlite:///../database/robotcloud.db'
from io import StringIO from antlr4.CommonTokenFactory import CommonTokenFactory from antlr4.atn.LexerATNSimulator import LexerATNSimulator from antlr4.InputStream import InputStream from antlr4.Recognizer import Recognizer from antlr4.Token import Token from antlr4.error.Errors import IllegalStateException, LexerNoVia...
from django.conf.urls.defaults import * from django.views.generic import RedirectView import views urlpatterns = patterns('', (r'^get_view/$', views.get_view), (r'^post_view/$', views.post_view), (r'^header_view/$', views.view_with_header), (r'^raw_post_view/$', views.raw_post_view), (r'^redirect_vi...
""" ===================================== Cross-Correlation (Phase Correlation) ===================================== In this example, we use phase correlation to identify the relative shift between two similar-sized images. The ``register_translation`` function uses cross-correlation in Fourier space, optionally emplo...
import unittest import subprocess import os import imath import six import IECore import Gaffer import GafferTest class MetadataTest( GafferTest.TestCase ) : class DerivedAddNode( GafferTest.AddNode ) : def __init__( self, name="DerivedAddNode" ) : GafferTest.AddNode.__init__( self, name ) IECore.registerRunTime...
import time import os.path import numpy as np import ctypes import threading from distutils.version import LooseVersion from OpenGL import GL as gl from ginga.vec import CanvasRenderVec as vec from ginga.canvas import render, transform from ginga.cairow import CairoHelp from ginga import trcalc, RGBMap from ginga.util ...
from __future__ import absolute_import from rest_framework import serializers from sentry.models import SERVICE_HOOK_EVENTS from sentry.api.serializers.rest_framework.list import ListField class ServiceHookValidator(serializers.Serializer): url = serializers.URLField(required=True) events = ListField(child=seri...
import os import sys import drf_nested_resource try: from setuptools import setup except ImportError: from distutils.core import setup version = drf_nested_resource.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("You probably want to also tag the version now:")...
""" Testing array coords """ import numpy as np from nipy.core.api import (AffineTransform, CoordinateSystem, CoordinateMap, Grid, ArrayCoordMap) import nipy.core.reference.array_coords as acs from nose.tools import assert_true, assert_false, \ assert_equal, assert_raises from numpy.test...
from mygengo import MyGengo gengo = MyGengo( public_key = 'your_public_key', private_key = 'your_private_key', sandbox = True, # possibly false, depending on your dev needs ) gengo.updateTranslationJob(id = 42, action = { 'action': 'reject', 'reason': 'quality', 'comment': 'My grandmother does better.', ...
import time, logging from totalimpact.providers.provider import Provider from totalimpact.providers.provider import ProviderClientError, ProviderServerError from totalimpact import item def dao_init_mock(self, config): pass class MockDao(object): responses = [] index = 0 def get(self, id): ret =...
from os_client_config.config import OpenStackConfig # noqa
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cloudly.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
import sys import numpy def main(): script = sys.argv[0] if len(sys.argv) == 1: # no arguments, so print help message print 'Usage: python readings-08.py action filenames\n \ action must be one of --min --mean --max\n \ if filenames is blank, input is taken from stdin;\n \ ...
from netforce.model import Model, fields, get_model class BarcodeValidateLine(Model): _name = "barcode.validate.line" _transient = True _fields = { "wizard_id": fields.Many2One("barcode.validate", "Wizard", required=True, on_delete="cascade"), "product_id": fields.Many2One("product", "Produc...
"""Common structures used on OpenFlow Protocol."""
import os import sys import textwrap import pytest from tests.lib import ( assert_all_changes, pyversion, _create_test_package, _change_test_package_version, ) from tests.lib.local_repos import local_checkout def test_no_upgrade_unless_requested(script): """ No upgrade if not specifically requested. ...
from netforce.model import Model, fields, get_model from netforce.database import get_connection import time from datetime import * from netforce.utils import get_file_path from netforce.access import get_active_company class ReportStock(Model): _name = "report.stock" _store = False def get_data_pick_intern...
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_compatible from django.contrib.auth.models import User from authors.models import Author @python_2_unicode_compatible class BookCategory(models.Model): name = models.CharField(_('n...
""" Support for Ubiquiti mFi sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.mfi/ """ import logging import requests from homeassistant.components.sensor import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_USERNAME, TEMP_CELCI...
from .base.helper import key_for_cypher, value_for_cypher from .base.func import Average, Count, Sum, InterquartileRange, Max, Min, Median, Quantile, Stdev
from __future__ import print_function from .MosaicEditor import MosaicEditor
""" Copyright 2006-2009, Red Hat, Inc and Others Michael DeHaan <michael.dehaan AT gmail> John Eckersberg <jeckersb@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the ...
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 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. ...
'''OpenGL extension EXT.depth_bounds_test This module customises the behaviour of the OpenGL.raw.GL.EXT.depth_bounds_test to provide a more Python-friendly API Overview (from the spec) This extension adds a new per-fragment test that is, logically, after the scissor test and before the alpha test. The depth bounds ...
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer, reactor from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p fro...
import angr import claripy import sys def main(argv): path_to_binary = argv[1] project = angr.Project(path_to_binary) initial_state = ??? # The save_unconstrained=True parameter specifies to Angr to not throw out # unconstrained states. Instead, it will move them to the list called # 'simulation.unconstrain...
''' fakeEnvironment this module allows to create the documentation without having to do any kind of special installation. The list of mocked modules is: GSI ''' import mock import sys class MyMock(mock.Mock): def __len__(self): return 0 mockGSI = MyMock() mockGSI.__version__ = "1" mockGSI.version.__versi...
import traceback from couchpotato.core.event import addEvent from couchpotato.core.helpers.encoding import simplifyString, toUnicode, ss from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.base import MovieProvider import tmdb3 log =...
"""provides xmlrpc server functionality for wxPython applications via a mixin class **Some Notes:** 1) The xmlrpc server runs in a separate thread from the main GUI application, communication between the two threads using a custom event (see the Threads demo in the wxPython docs for more info). 2) Nei...
from __future__ import absolute_import from autobahn.websocket.types import ConnectionRequest, ConnectionResponse, \ ConnectionAccept, ConnectionDeny, Message, IncomingMessage, OutgoingMessage from autobahn.websocket.interfaces import IWebSocketChannel __all__ = ( 'IWebSocketChannel', 'Message', 'Incomi...
from PyQt4.QtCore import QAbstractItemModel, QModelIndex, QVariant, Qt from ert_gui.ide.wizards import TreeItem class TreeModel(QAbstractItemModel): def __init__(self, tree_root, parent=None): QAbstractItemModel.__init__(self, parent) self.__root = tree_root def data(self, q_model_index, role=Qt...
import snapshot
import os import csv from nose.tools import ok_, eq_ from kuma.core.tests import KumaTestCase from ..models import Event, Calendar fixtures = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'fixtures') MOZILLA_PEOPLE_EVENTS_CSV = os.path.join(fixtures, 'Mozillapeopleevents.csv') XSS_CSV = os.path.join(fixtures...
from . import stock_picking_type
from openerp import models, fields class adhoc_base_configuration(models.TransientModel): _inherit = 'adhoc.base.config.settings' # Fixes module_account_voucher_multic_fix = fields.Boolean( 'FiX voucher in multi-company father/son environment', help="""Installs the account_voucher_multic_fix...
from spack import * class Cmaq(Package): """Code base for the U.S. EPA's Community Multiscale Air Quality Model (CMAQ).""" homepage = "https://www.epa.gov/CMAQ" url = "https://github.com/USEPA/CMAQ/archive/CMAQv5.3.1_19Dec2019.tar.gz" version('5.3.1', sha256='659156bba27f33010e0fdc157a8d33f3b5b...
from PyQt5 import QtWidgets, QtCore from peacock.utils import WidgetUtils class TabbedPreferences(QtWidgets.QWidget): """ For each plugin, store a preference widget in its own tab. """ def __init__(self, plugins): super(TabbedPreferences, self).__init__() self._widgets = [] self....
import sys from resources.datatables import Options def setup(core, object): object.setAttachment('radial_filename', 'object/conversation'); object.setAttachment('conversationFile','junk_dealer') object.setOptionsBitmask(Options.CONVERSABLE | Options.INVULNERABLE) object.setStfFilename('mob/creature_names') object...
import collections from oslo_concurrency import lockutils from oslo_log import log from stevedore import dispatch from ironic.common import exception from ironic.common.i18n import _ from ironic.conf import CONF from ironic.drivers import base as driver_base from ironic.drivers import fake_hardware from ironic.drivers ...
import mock from oslo_config import cfg from nova.tests.functional.api_sample_tests import test_servers CONF = cfg.CONF CONF.import_opt('osapi_compute_extension', 'nova.api.openstack.compute.legacy_v2.extensions') class ServerPasswordSampleJsonTests(test_servers.ServersSampleBase): extension_name = ...
''' args.py ''' import os import heron.tools.common.src.python.utils.config as config DEFAULT_TRACKER_URL = "http://127.0.0.1:8888" def add_config(parser): """ add config """ # the default config path default_config_path = config.get_heron_conf_dir() parser.add_argument( '--config-path', metavar='(a...
from RHEVM import RHEVM as delegate_class
import ast import binascii import urllib import oauth2 as oauth from urlparse import urlparse, urlunparse from Crypto.PublicKey import RSA from Crypto.Util.number import long_to_bytes, bytes_to_long from hashlib import sha1 as sha from django.conf import settings from django.http import HttpResponse, HttpResponseBadReq...
import argparse import os from tests.contrib.utils.logging_command_executor import LoggingCommandExecutor from tests.providers.google.cloud.utils.gcp_authenticator import GCP_AI_KEY, GcpAuthenticator GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID", "example-project") GCP_BUCKET_NAME = os.environ.get("GCP_VIDEO_INTELLI...
"""This code example creates new labels. To determine which labels exist, run get_all_labels.py. This feature is only available to DFP premium solution networks.""" __author__ = 'api.shamjeff@gmail.com (Jeff Sham)' import os import sys sys.path.insert(0, os.path.join('..', '..', '..', '..')) from adspygoogle import Df...
import time import unittest from fb303 import * from thrift import protocol, transport from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from scribe import scribe class TestReconnection(unittest.TestCase): def setUp(self): self.sender_ho...
"""Operations for embeddings.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange # pylint: disable=redefined-builtin from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorfl...
"""This example gets all teams. To create teams, run create_teams.py. The LoadFromStorage method is pulling credentials and properties from a "googleads.yaml" file. By default, it looks for this file in your home directory. For more information, see the "Caching authentication information" section of our README. Tags: ...
"""Tests for context_managers module.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.py2tf.utils import context_managers from tensorflow.python.framework import constant_op from tensorflow.python.framework import ops from tensorflo...
""" Voting system servlet: shows the charts made by the cartoonist :author: Thomas Calmant :license: Apache Software License 2.0 :version: 1.0.0 .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import schema from caffe2.python.layers.layers import ModelLayer class Dropout(ModelLayer): def __init__( self, model, ...
from selenium import webdriver from selenium.test.selenium.webdriver.common import driver_element_finding_test from selenium.test.selenium.webdriver.common.webserver import SimpleWebServer def setup_module(module): webserver = SimpleWebServer() webserver.start() IeDriverElementFindingTests.webserver = webse...
from gnuradio import gr, eng_notation, optfir from gnuradio import usrp from gnuradio import audio from gnuradio import ucla from gnuradio.ucla_blks import cc1k_sos_pkt from gnuradio.eng_option import eng_option from optparse import OptionParser import math import struct, time import wx def pick_subdevice(u): """ ...
from __future__ import division, print_function, absolute_import import numpy as np from numpy import array, poly1d from scipy.interpolate import interp1d from scipy.special import beta _tukeylambda_var_pc = [3.289868133696453, 0.7306125098871127, -0.5370742306855439, 0.17292046290190008, ...
from bson.objectid import ObjectId from examples.models import User, Address, Things, TypelessAddress, TypelessUser from mongoengine.connection import connect def add_dataset1(): address = Address(street="123 Main St") address.save() address.reload() typeless_address = TypelessAddress(street="123 Main S...
""" The ``agar.counter`` module contains classes to help work with scalable counters. """ import datetime import re import time from google.appengine.api import memcache, taskqueue from google.appengine.ext import db, deferred from pytz import utc def get_interval_number(ts, duration): """ Returns the number of...
""" Record Arrays ============= Record arrays expose the fields of structured arrays as properties. Most commonly, ndarrays contain elements of a single type, e.g. floats, integers, bools etc. However, it is possible for elements to be combinations of these using structured types, such as:: >>> a = np.array([(1, 2.0...
from __future__ import division, absolute_import, print_function import os.path import shutil from mock import patch, MagicMock import tempfile import unittest from test import _common from test.helper import TestHelper from mediafile import MediaFile from beets import config, logging, ui from beets.util import syspath...
from sos.report.plugins import Plugin, RedHatPlugin class Ssmtp(Plugin, RedHatPlugin): short_desc = 'sSMTP information' plugin_name = 'ssmtp' profiles = ('mail', 'system') packages = ('ssmtp',) def setup(self): self.add_copy_spec([ "/etc/ssmtp/ssmtp.conf", "/etc/ssmtp...
import sys if sys.version_info >= (2, 7): from json import * else: try: from simplejson import * except: from json import *
{ 'name': 'Purchase and MRP Management', 'version': '1.0', 'category': 'Hidden', 'description': """ This module provides facility to the user to install mrp and purchase modules at a time. ======================================================================================== It is basically used when ...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import atexit import configparser import os import os.path import sys import stat import tempfile import traceback from collections import namedtuple from ansible.config.data import ConfigData from ansible.errors import AnsibleOptio...
from subprocess import call, check_call,Popen, PIPE import os, tarfile, sys, time from optparse import OptionParser import smtplib import email from email.mime.text import MIMEText from email.mime.base import MIMEBase from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from...