code
stringlengths
1
199k
""" Test lldb data formatter subsystem. """ import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil class AdvDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) # Find...
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.views.decorators.cache import cache_page from django.utils import timezone from django.conf import settings from datetime import datetime from datetime import date from icalendar i...
"""Django ORM models for Social Auth""" import base64 import six from social.storage.base import UserMixin, AssociationMixin, NonceMixin, \ CodeMixin, BaseStorage class DjangoUserMixin(UserMixin): """Social Auth association model""" @classmethod def changed(cls, user): ...
from __future__ import print_function import shutil import sys import os import errno import string import re import traceback import time import datetime import copy import glob from math import ceil, trunc import collections import subprocess from testglobals import * from testutil import * if config.use_threads: ...
from msrest.serialization import Model class JobConstraints(Model): """The execution constraints for a job. :param max_wall_clock_time: The maximum elapsed time that the job may run, measured from the time the job is created. If the job does not complete within the time limit, the Batch service termin...
my_int = 7 my_int = 3 print my_int
"""This module contains classes relating to Sonos Alarms.""" from __future__ import unicode_literals import logging import re import weakref from datetime import datetime from . import discovery from .core import PLAY_MODES from .xml import XML log = logging.getLogger(__name__) # pylint: disable=C0103 TIME_FORMAT = "%...
import numpy as np import theano import theano.tensor as T import math import theano.compile import anglepy.ndict as ndict from anglepy.misc import lazytheanofunc import anglepy.logpdfs import inspect def shared32(x, name=None, borrow=False): return theano.shared(np.asarray(x, dtype='float32'), name=name, borrow=bo...
from datetime import datetime, timedelta from netforce.model import Model, fields class PayPeriod(Model): _name = "hr.pay.period" _string = "Pay Period" _fields = { "name": fields.Char("Name", required=True, search=True), "year": fields.DateTime("Year"), 'lines': fields.One2Many("hr....
__all__ = ['ttypes', 'constants', 'ZipkinCollector']
from django.conf.urls import url, patterns, include from rest_framework import routers from .views.model_views import BuildViewSet, ProjectViewSet, NotificationViewSet, VersionViewSet from readthedocs.comments.views import CommentViewSet router = routers.DefaultRouter() router.register(r'build', BuildViewSet) router.re...
from KerbalStuff.config import _cfg from KerbalStuff.objects import * import json import os
from ....const import GRAMPS_LOCALE as glocale _ = glocale.translation.gettext from .. import RegExpIdBase from ._memberbase import father_base class FatherHasIdOf(RegExpIdBase): """Rule that checks for a person with a specific Gramps ID""" labels = [ _('Person ID:') ] name = _('Families having ...
from sos.report.plugins import Plugin, IndependentPlugin, SoSPredicate class Wireless(Plugin, IndependentPlugin): short_desc = 'Wireless Device Information' plugin_name = 'wireless' profiles = ('hardware', 'desktop', 'network') commands = ('iw', ) def setup(self): wireless_pred = SoSPredicat...
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin class OpenStackSahara(Plugin): """OpenStack Sahara""" plugin_name = 'openstack_sahara' profiles = ('openstack', 'openstack_controller') option_list = [] def setup(self): self.add_copy_spec("/etc/sahara/") self.a...
DOCUMENTATION = ''' --- module: gce_net version_added: "1.5" short_description: create/destroy GCE networks and firewall rules description: - This module can create and destroy Google Compute Engine networks and firewall rules U(https://developers.google.com/compute/docs/networking). The I(name) paramet...
import bitcoin from bitcoin import * from util import print_error import time import struct import struct import StringIO import mmap import random NO_SIGNATURE = 'ff' class SerializationError(Exception): """ Thrown when there's a problem deserializing or serializing """ class BCDataStream(object): def __init__...
from BoostBuild import Tester t = Tester() t.set_tree('prebuilt') t.expand_toolset("ext/project-root.jam") t.expand_toolset("project-root.jam") t.run_build_system("debug release", subdir="ext") t.copy("ext/Jamfile2", "ext/Jamfile") t.expand_toolset("ext/Jamfile") t.run_build_system("debug release") t.expect_addition("b...
from ...utils.pascal_voc_clean_xml import pascal_voc_clean_xml from numpy.random import permutation as perm from .predict import preprocess from copy import deepcopy import pickle import numpy as np import os def parse(self, exclusive = False): meta = self.meta ext = '.parsed' ann = self.FLAGS.annotation ...
from django.contrib.auth.models import User from django.test import TestCase from accounts.models import Profile, UserStatus class BaseTestCase(TestCase): def setUp(self): self.user = User.objects.create( username='user', email='user@test.com', password='password') class ...
HOST = "ip-172-31-29-102.us-west-2.compute.internal:27017,ip-172-31-29-103.us-west-2.compute.internal:27017,ip-172-31-29-104.us-west-2.compute.internal:27017,ip-172-31-29-105.us-west-2.compute.internal:27017,ip-172-31-29-101.us-west-2.compute.internal:27017,ip-172-31-29-106.us-west-2.compute.internal:27017,ip-172-31-29...
import matplotlib.colors import matplotlib.pyplot as plt import numpy as np import iris import iris.analysis import iris.plot as iplt global_air_temp = iris.load_cube(iris.sample_data_path("air_temp.pp")) regional_ash = iris.load_cube(iris.sample_data_path("NAME_output.txt")) regional_ash = regional_ash.collapsed("flig...
"""Base for pygal charts""" from __future__ import division import os from functools import reduce from uuid import uuid4 from pygal._compat import is_list_like from pygal.adapters import decimal_to_float, not_zero, positive from pygal.config import Config, SerieConfig from pygal.serie import Serie from pygal.state imp...
__version__ = "2.3.1"
"""A class to serve as proxy for the target engine for testing. Receives documents from the oplog worker threads and indexes them into the backend. Please look at the Solr and ElasticSearch doc manager classes for a sample implementation with real systems. """ from threading import RLock from mongo_connector import con...
import collections import json import os.path import re import signal import time from ducktape.services.service import Service from ducktape.utils.util import wait_until from ducktape.cluster.remoteaccount import RemoteCommandError from config import KafkaConfig from kafkatest.directory_layout.kafka_path import KafkaP...
""" CLI interface for cinder management. """ from __future__ import print_function import logging as python_logging import os import sys import time from oslo_config import cfg from oslo_db import exception as db_exc from oslo_db.sqlalchemy import migration from oslo_log import log as logging import oslo_messaging as...
import repository import unittest class RepositoryTest(unittest.TestCase): def test_can_get_path_to_cell(self): repo = repository.Repository('/root', {'cell': '/cell'}) self.assertEqual('/cell', repo.get_cell_path('cell')) def test_can_get_path_to_default_cell(self): repo = repository.Re...
import netaddr from webob import exc from nova.api.openstack import extensions from nova.api.openstack import wsgi from nova import exception from nova.i18n import _ from nova import network from nova.objects import base as base_obj from nova.objects import fields as obj_fields ALIAS = 'os-networks' authorize = extensi...
import pythoncom from win32com.shell import shell, shellcon import win32gui import win32con class ShellExtension: _reg_progid_ = "Python.ShellExtension.ContextMenu" _reg_desc_ = "Python Sample Shell Extension (context menu)" _reg_clsid_ = "{CED0336C-C9EE-4a7f-8D7F-C660393C381F}" _com_interfaces_ = [shel...
from __future__ import print_function import sys sys.path.insert(1,"../../") import h2o import time from tests import pyunit_utils def hdfs_orc_parser(): # Check if we are running inside the H2O network by seeing if we can touch # the namenode. hadoop_namenode_is_accessible = pyunit_utils.hadoop_namenode_is...
"""Base layer code and base model (Network) code. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import json import os import numpy as np from six.moves import zip # pylint: disable=redefined-builtin from tensorflow.python.eager import conte...
"""System tests for Google Cloud Build operators""" from tests.providers.google.cloud.operators.test_gcs_to_sftp_system_helper import GcsToSFTPTestHelper from tests.providers.google.cloud.utils.gcp_authenticator import GCP_GCS_KEY from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, provide_gcp_context, sk...
import horizon from horizon.dashboards.syspanel import dashboard class Instances(horizon.Panel): name = "Instances" slug = 'instances' roles = ('admin',) dashboard.Syspanel.register(Instances)
"""Tests for `tf.data.Dataset.from_tensors().""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np from tensorflow.core.protobuf import config_pb2 from tensorflow.python.client import session from tensor...
import datetime from django.contrib.auth.models import User from django.contrib.comments.managers import CommentManager from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.db import models from django.core im...
"""Wrapper for using the Scikit-Learn API with Keras models. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import types import numpy as np from tensorflow.python.keras._impl.keras.models import Sequential from tensorflow.python.keras._impl.k...
import importlib import sys import warnings from inspect import isabstract from unittest import mock import pytest from airflow.models.baseoperator import BaseOperator from tests.deprecated_classes import ALL, RENAMED_ALL class TestDeprecations: @staticmethod def assert_warning(msg: str, warnings): erro...
"""HomeKit session fixtures.""" from unittest.mock import patch import pytest from homeassistant.components.homekit.const import EVENT_HOMEKIT_CHANGED from homeassistant.core import callback as ha_callback from pyhap.accessory_driver import AccessoryDriver @pytest.fixture(scope="session") def hk_driver(): """Return...
""" SQLite3 backend for django. Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ from __future__ import unicode_literals import datetime import decimal import re import warnings from django.conf import settings from django.db import utils from django.db.backends import utils as ...
""" """ from smartcard.System import readers from smartcard.scard import (SCARD_ATTR_VENDOR_NAME, SCARD_SHARE_DIRECT, SCARD_LEAVE_CARD, SCARD_ATTR_DEVICE_FRIENDLY_NAME, SCARD_ATTR_VENDOR_IFD_VERSION, SCARD_ATTR_VENDOR_IFD_SERIAL_NO) import smartcard.Exceptions def main(): """ Ask the first reader/driver to ...
from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from templatesadmin import TemplatesAdminException from templatesadmin.edithooks import TemplatesAdminHook from mercurial import hg, ui, match import os TEMPLATESADMIN_HG_ROOT = getattr( settings, '...
import _grid print '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++' print 'Testing grid module ...' print 'nlev = ', _grid.get_nlev() print 'nlat = ', _grid.get_nlat() print 'nlon = ', _grid.get_nlon() print ' ' print 'Success!' print '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++...
import numpy as np from ..base import BaseEstimator, MetaEstimatorMixin, RegressorMixin, clone from ..utils import check_random_state, check_array, check_consistent_length from ..utils.random import sample_without_replacement from ..utils.validation import check_is_fitted from .base import LinearRegression _EPSILON = n...
from sqlalchemy.orm.scoping import ScopedSession, _ScopedExt from sqlalchemy.util import warn_deprecated from sqlalchemy.orm import create_session __all__ = ['SessionContext', 'SessionContextExt'] class SessionContext(ScopedSession): """Provides thread-local management of Sessions. Usage:: context = Sessi...
"""SCons.Tool.mwcc Tool-specific initialization for the Metrowerks CodeWarrior compiler. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ __revision__ = "src/engine/SCons/Tool/mwcc.py 4720 2010/03/24 03:14:11 jar...
from unittest import main from gnucash import Book, Account, Split, Transaction from test_book import BookSession class SplitSession( BookSession ): def setUp(self): BookSession.setUp(self) self.split = Split(self.book) class TestSplit( SplitSession ): def test_memo(self): MEMO = "cookie...
"""Does google-lint on c++ files. The goal of this script is to identify places in the code that *may* be in non-compliance with google style. It does not attempt to fix up these problems -- the point is to educate. It does also not attempt to find all problems, or to ensure that everything it does find is legitimate...
"""Debugger basics""" import sys import os import types __all__ = ["BdbQuit","Bdb","Breakpoint"] class BdbQuit(Exception): """Exception to give up completely""" class Bdb: """Generic Python debugger base class. This class takes care of details of the trace facility; a derived class should implement user...
""" <plugin key="MultiThread" name="Multi-threaded example" author="dnpwwo" version="1.0.0" > <description> <h2>Multi-threaded example</h2><br/> Starts a Queue on a thread to write log messages and shuts down properly<br/> </description> <params> <param field="Mode6" label="Debug" wi...
""" sym_match - Match all symbols in a list against a list of regexes. """ from argparse import ArgumentParser import sys from sym_check import util, match, extract def main(): parser = ArgumentParser( description='Extract a list of symbols from a shared library.') parser.add_argument( '--blackl...
import pytest from helpers import utils @pytest.mark.parametrize('val1, val2', [ ({'a': 1}, {'a': 1}), ({'a': 1, 'b': 2}, {'a': 1}), ({'a': [1, 2, 3]}, {'a': [1]}), ({'a': [1, 2, 3]}, {'a': [..., 2]}), (1.0, 1.00000001), ("foobarbaz", "foo*baz"), ]) def test_partial_compare_equal(val1, val2): ...
"""Echo module based on the GFAL2_StorageBase class.""" import os from DIRAC.Resources.Storage.GFAL2_StorageBase import GFAL2_StorageBase from DIRAC import gLogger, S_ERROR, S_OK class EchoStorage(GFAL2_StorageBase): """ .. class:: EchoStorage Interface to the Echo storage. This plugin will work with both gsi...
from __future__ import unicode_literals import re from requests.compat import urljoin from requests.utils import dict_from_cookiejar from sickbeard import logger, tvcache from sickbeard.bs4_parser import BS4Parser from sickrage.helper.common import convert_size, try_int from sickrage.providers.torrent.TorrentProvider i...
from tests.support.asserts import assert_error, assert_success from tests.support.image import png_dimensions from tests.support.inline import inline from . import element_dimensions def take_element_screenshot(session, element_id): return session.transport.send( "GET", "session/{session_id}/element...
from spack import * class Renderproto(AutotoolsPackage): """X Rendering Extension. This extension defines the protcol for a digital image composition as the foundation of a new rendering model within the X Window System.""" homepage = "http://cgit.freedesktop.org/xorg/proto/renderproto" url = "...
import os import re import io import sys from git import * from shutil import move if sys.version_info[0] >= 3: # strings are already parsed to unicode def unicode(s): return s authorFullName = { 'staldert': 'Thomas Stalder, Blue Time Concept SA', 'mark giraud': 'Mark Giraud, Fraunhofer IOSB', ...
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER FEC CMTE ID', 'number': '2'}, {'name': 'ENTITY TYPE', 'number': '3'}, {'n...
"""\ ================================================= Support functions for parsing DVB data structures ================================================= A collection of functions for parsing 'descriptor' elements of information tables in DVB data streams. Descriptors contain data such as channel names, tuning informa...
"""Tests for training routines.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools from absl.testing import parameterized import numpy as np from tensorflow.python import keras from tensorflow.python.data.ops import dataset_ops from tensorflo...
import logging from django.utils.translation import ugettext as _ LOG = logging.getLogger(__name__) class Credentials(object): NAME_TO_CLASS_MAPPING = { "hcat": "org.apache.oozie.action.hadoop.HCatCredentials", "hive2": "org.apache.oozie.action.hadoop.Hive2Credentials", "hbase": "org.apache.oozie.ac...
"""Utilities related to FeatureColumn.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.framework.python.framework import checkpoint_utils from tensorflow.contrib.framework.python.framework import experimental from tensorflow.contrib...
from __future__ import print_function from BinPy import * ic = IC_7486() print(ic.__doc__) inp = {1: 1, 2: 0, 4: 0, 5: 0, 7: 0, 9: 1, 10: 1, 12: 0, 13: 0, 14: 1} ic.setIC({14: 1, 7: 0}) ic.setIC(inp) ic.drawIC() print (ic.run()) ic.setIC(ic.run()) ic.drawIC() ic.setIC(ic.run()) ic.drawIC() print (ic.run()) c = Connecto...
from cyder.cydhcp.workgroup.models import Workgroup from cyder.api.v1.tests.base import APITests, APIEAVTestMixin class WorkgroupAPI_Test(APITests, APIEAVTestMixin): __test__ = True model = Workgroup def create_data(self): return Workgroup.objects.create(name='workgroup')
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the Bar class which lets you build your Bar charts just passing the arguments to the Chart class and calling the proper functions. It also add a new chained stacked method. """ from __future__ import abso...
""" This package contains directive implementation modules. The interface for directive functions is as follows:: def directive_fn(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): code... # Set function attributes: directive_fn.argume...
from reflib.renamemodule import mod1, importer
doc = """Perform package move updates for installed and binary packages.""" __doc__ = doc module_spec = { 'name': 'move', 'description': doc, 'provides':{ 'module1': { 'name': "moveinst", 'sourcefile': "move", 'class': "MoveInstalled", 'description': doc, 'options': ['check', 'fix'], 'functions':...
import pytest import subprocess import sys PY3 = sys.version_info[0] == 3 if PY3: # py.test has a pep8 plugin, however it has considerably fewer options # for configuration, hence the use of the stand-alone pep8 checker instead. pep8_result = subprocess.call(["pep8", "--statistics", "--show-source"]) else: ...
''' Created on Aug 1, 2011 @author: mkiyer ''' import logging import os import collections import subprocess import pysam from chimerascan.lib import config from chimerascan.lib.chimera import Chimera from chimerascan.bx.intersection import IntervalTree, Interval def get_mapped_read_intervals(c, min_isize, max_isize, h...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: nios_cname_record version_added: "2.6" author: "Blair Rampling ...
test_records = [[{ "doctype":"Employee", "employee_name": "_Test Employee", "naming_series": "_T-Employee-", "date_of_joining": "2010-01-01", "date_of_birth": "1980-01-01", "gender": "Female", "status": "Active", "company": "_Test Company", "user_id": "test@example.com", "department": "_Test Department" }], [...
"""Unit tests for the `iris.fileformats.um` package."""
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
from __future__ import absolute_import, unicode_literals import argparse import unittest from streamparse.cli.run import subparser_hook from nose.tools import ok_ class RunTestCase(unittest.TestCase): def test_subparser_hook(self): parser = argparse.ArgumentParser() subparsers = parser.add_subparser...
from oslo_policy import policy from nova.policies import base BASE_POLICY_NAME = 'os_compute_api:os-multinic' multinic_policies = [ policy.DocumentedRuleDefault( BASE_POLICY_NAME, base.RULE_ADMIN_OR_OWNER, """Add or remove a fixed IP address from a server. These APIs are proxy calls to the N...
import ConfigParser import logging import logging.handlers import os import string from nova.openstack.common.rootwrap import filters class NoFilterMatched(Exception): """This exception is raised when no filter matched.""" pass class FilterMatchNotExecutable(Exception): """ This exception is raised when...
import mimetypes import io import copy from xml.parsers.expat import ExpatError from django.core.files.uploadedfile import InMemoryUploadedFile from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.http import HttpRequest from onadata.apps.logger.xform_instance_parse...
from __future__ import division import re import textwrap import wifi.subprocess_compat as subprocess from wifi.utils import db2dbm from wifi.exceptions import InterfaceError class Cell(object): """ Presents a Python interface to the output of iwlist. """ def __init__(self): self.bitrates = [] ...
"""Runs nm on specified .a and .o file, plus some analysis. CollectAliasesByAddress(): Runs nm on the elf to collect all symbol names. This reveals symbol names of identical-code-folded functions. CollectAliasesByAddressAsync(): Runs CollectAliasesByAddress in a subprocess and returns a promise. RunNmOnIntermedia...
import logging from prompt_toolkit.keys import Keys from prompt_toolkit.key_binding.manager import KeyBindingManager from prompt_toolkit.filters import Condition _logger = logging.getLogger(__name__) def pgcli_bindings(get_vi_mode_enabled, set_vi_mode_enabled): """ Custom key bindings for pgcli. """ ass...
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import ApiKey from sentry.testutils import TestCase, PermissionTestCase class OrganizationApiKeySettingsPermissionTest(PermissionTestCase): def setUp(self): super(OrganizationApiKeySettingsPermissionTest, ...
JS(""" local __bitops__ = require('bit') __NULL_OBJECT__ = {} __concat_tables_array = function(t1, t2) for i=1,#t2 do t1[ #t1+1 ] = t2[i] end return t1 end __concat_tables = function(t1, t2) for k,v in pairs(t2) do t1[k] = v end return t1 end function table.shallow_copy(t) local t2 = {} for k,v in pairs(t) ...
import unittest import sys, os, time import json sys.path.append('./') import browser.firefox as firefox import cspages.login.loginpage as loginpage import common.shared as shared from cstests.smoketests.smokecfg import smokecfg class TestCSLoginLogout(unittest.TestCase): def setUp(self): # Create a new ins...
def preprocessImage(img): # crop to 160x160 roi = (0, 33, 160, 193) # region of interest (roi) is lines 33 to 193 img = img.crop(roi) # downscale to 84x84 newSize = 84, 84 img.thumbnail(newSize) # resizing step #img.show() # show image return img def preprocessSequenceWithAct...
""" ======================= A simple Ntuple example ======================= This example demonstrates how to create a simple Ntuple. """ print(__doc__) from rootpy.tree import Ntuple from rootpy.io import root_open from random import gauss f = root_open("test.root", "recreate") ntuple = Ntuple(('a', 'b', 'c'), name="te...
import sigrokdecode as srd import os EDID_HEADER = [0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00] OFF_VENDOR = 8 OFF_VERSION = 18 OFF_BASIC = 20 OFF_CHROM = 25 OFF_EST_TIMING = 35 OFF_STD_TIMING = 38 OFF_DET_TIMING = 54 OFF_NUM_EXT = 126 OFF_CHECKSUM = 127 est_modes = [ '720x400@70Hz', '720x400@88Hz', '64...
revision = '559cfc0613d2' down_revision = '2aad9deb5e37' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('flight_meetings', sa.Column('id', sa.Integer(), nullable=False), sa.Column('source_id', sa.Integer(), nullab...
from __future__ import absolute_import import sys PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 def python_2_unicode_compatible(cls): """Taken from Django project (django/utils/encoding.py) & modified a bit to always have __unicode__ method available. """ if '__str__' not in cls.__dict__...
from datetime import datetime from model import * from photo import create_photo, PhotoError from utils import * from detect_spam import SpamDetector import simplejson from django.utils.translation import ugettext as _ def validate_date(string): """Parses a date in YYYY-MM-DD format. This is a special case for m...
from __future__ import unicode_literals LOAD_CONTENT_CACHE = False SITEURL = '' SITENAME = u'ipynb-test' TIMEZONE = 'UTC' DEFAULT_LANG = 'en' MARKUP = ('md', 'ipynb') PLUGIN_PATHS = ['../../../../plugins'] PLUGINS = ['ipynb.markup'] THEME = 'theme'
"""The Wolf SmartSet Service integration.""" from datetime import timedelta import logging from httpx import ConnectError, ConnectTimeout from wolf_smartset.token_auth import InvalidAuth from wolf_smartset.wolf_client import FetchFailed, WolfClient from homeassistant.config_entries import ConfigEntry from homeassistant...
import numpy as np import folium as fm import pysal as ps import pandas as pd import geojson as gj import os as os from IPython.display import HTML def inline_map(Map): ''' Embeds the HTML source of the map directly into the IPython notebook. This method will not work if the map depends on any files (json d...
from django.contrib.gis.db import models from django.test import ignore_warnings from django.utils.deprecation import RemovedInDjango50Warning from ..admin import admin class City(models.Model): name = models.CharField(max_length=30) point = models.PointField() class Meta: app_label = 'geoadmini_dep...
import rmc.models as m import rmc.shared.constants as c import mongoengine as me def normalize_user_course_ratings(): """Normalize user course ratings to be 0/1 for Yes/No. Before it was 0.2,0.4,0.6,0.8.1.0 OR possible 0.0,0.25,0.5,0.75,1.0""" num_changes = [0] def normalize(value): # Ranges to ...
from __future__ import absolute_import from django import forms from ckeditor.fields import RichTextFormField class CkEditorForm(forms.Form): content = RichTextFormField()
class ModuleDocFragment(object): # Standard files documentation fragment DOCUMENTATION = r''' options: url: description: - HTTP, HTTPS, or FTP URL in the form (http|https|ftp)://[user[:pass]]@host.domain[:port]/path type: str force: description: - If C(yes) do not get a cached copy. ...
from openerp import api, fields, models class AccountMoveLine(models.Model): """ Overriding Account move line in order to add last_rec_date. Last rec date is the date of the last reconciliation (full or partial) account move line """ _inherit = 'account.move.line' last_rec_date = fields.Date...
from pixie.vm.libs.pxic.tags import * from pixie.vm.object import runtime_error, Object, Type, InterpreterCodeInfo from rpython.rlib.runicode import unicode_encode_utf_8 from pixie.vm.string import String from pixie.vm.keyword import Keyword from pixie.vm.symbol import Symbol from pixie.vm.numbers import Integer, BigIn...
"""Define APIs for the servicegroup access.""" from oslo_log import log as logging from oslo_utils import importutils import nova.conf from nova.i18n import _LW LOG = logging.getLogger(__name__) _driver_name_class_mapping = { 'db': 'nova.servicegroup.drivers.db.DbDriver', 'mc': 'nova.servicegroup.drivers.mc.Mem...