content
string
""" Guide renderers for various kinds of axes that can be added to Bokeh plots """ from __future__ import absolute_import from ..properties import Int, Float, String, Enum, Bool, Datetime, Auto, Instance, Tuple, Either, Include from ..mixins import LineProps, TextProps from ..enums import Location from .renderers im...
# -*- coding: utf-8 -*- """Dalite XBlock utils.""" from lazy.lazy import lazy def _(text): # pylint: disable=invalid-name """ Make '_' a no-op so we can scrape strings. :return text """ return text # pylint: disable=protected-access class FieldValuesContextManager(object): """ Allow u...
"""Byrd-Omojokun Trust-Region SQP method.""" from __future__ import division, print_function, absolute_import from scipy.sparse import eye as speye from .projections import projections from .qp_subproblem import modified_dogleg, projected_cg, box_intersections import numpy as np from numpy.linalg import norm __all__ ...
"""This example creates a new activity group for a floodlight configuration. To get a floodlight configuration ID, run get_advertisers.py. """ import argparse import sys from apiclient import sample_tools from oauth2client import client # Declare command-line flags. argparser = argparse.ArgumentParser(add_help=Fals...
from pkgutil import extend_path # we're not the only ones in this namespace __path__ = extend_path(__path__, __name__) #@ReservedAssignment
''' Task Coach - Your friendly task manager Copyright (C) 2011 Task Coach developers <<EMAIL>> Task Coach 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 l...
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False create_default_context = None IS_PYOPENSSL = F...
"""A VIRR reader for FY3-B and maybe A.... """ import numpy as np import os import logging from datetime import datetime from ConfigParser import ConfigParser from mpop import CONFIG_PATH import h5py from pyspectral.blackbody import blackbody_wn_rad2temp as rad2temp LOGGER = logging.getLogger('virr') def load(satsce...
from .abstract_trimming_input_stream import AbstractTrimmingInputStream class H264PictureTimingTrimmingInputStream(AbstractTrimmingInputStream): def __init__(self, input_stream_id, start_pic_timing=None, end_pic_timing=None, id_=None, custom_data=None, name=None, description=None): super...
import json from oneview_redfish_toolkit.api.ethernet_interface import \ EthernetInterface from oneview_redfish_toolkit.tests.base_test import BaseTest class TestEthernetInterface(BaseTest): """Tests for EthernetInterface class""" def setUp(self): """Tests preparation""" with open( ...
from __future__ import unicode_literals from . import Progress from .helpers import WritelnMixin class Bar(WritelnMixin, Progress): width = 32 message = '' suffix = '%(index)d/%(max)d' bar_prefix = ' |' bar_suffix = '| ' empty_fill = ' ' fill = '#' hide_cursor = True def update(...
from datetime import datetime, timedelta from apscheduler.scheduler import Scheduler from webapps.lib.db import get_db from webapps.lib.util import get_internal_coll_name EXPIRE_SESSION_EVERY = 600 EXPIRE_SESSION_DURATION = 1800 def run_scheduler(app): scheduler = Scheduler() expire_wrapper = lambda: expire...
import sys from twisted.internet import reactor from autobahn.twisted.websocket import WebSocketClientFactory, \ WebSocketClientProtocol, \ connectWS class EchoClientProtocol(WebSocketClientProtocol): def __init__(self, message): ...
from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION from django.conf import settings as django_settings from wiki.conf import settings as wiki_settings SLUG = 'images' # This is deprecated in django 1.7+ APP_LABEL = 'images' if VERSION < (1, 7) else None # Where ...
"Thread-safe in-memory cache backend." import time try: import cPickle as pickle except ImportError: import pickle from django.core.cache.backends.base import BaseCache from django.utils.synch import RWLock class CacheClass(BaseCache): def __init__(self, _, params): BaseCache.__init__(self, param...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para gaypornshare.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import os import re from core import config from core ...
from cinder.api import common class ViewBuilder(common.ViewBuilder): """Model scheduler-stats API responses as a python dictionary.""" _collection_name = "scheduler-stats" def __init__(self): """Initialize view builder.""" super(ViewBuilder, self).__init__() def summary(self, reques...
import os import sys import shutil import logging import tempfile from optparse import OptionParser from flvlib import __versionstr__ from flvlib.constants import TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT from flvlib.constants import FRAME_TYPE_KEYFRAME from flvlib.astypes import MalformedFLV, FLVObject from fl...
"""RAND Health Insurance Experiment Data""" __docformat__ = 'restructuredtext' COPYRIGHT = """This is in the public domain.""" TITLE = __doc__ SOURCE = """ The data was collected by the RAND corporation as part of the Health Insurance Experiment (HIE). http://www.rand.org/health/projects/hie/ This data...
from functools import wraps from nose.tools import eq_ from js_helper import TestCase def uses_feature(name): def wrap(func): @wraps(func) def inner(self, *args, **kw): func(self, *args, **kw) self.assert_has_feature(name) return inner return wrap class Feat...
""" parser.http.characterParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a character. E.g., for "Jesse James" the referred pages would be: main details: http://www.imdb.com/character/ch0000001/ biography: ...
from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website_event.controllers.main import website_event from openerp.addons.website_sale.controllers.main import get_pricelist from openerp.tools.translate import _ class website_event(webs...
"""The command to list installed/available gcloud components.""" from googlecloudsdk.calliope import base from googlecloudsdk.core import log from googlecloudsdk.core.resource import resource_printer_base class List(base.SilentCommand): """List the status of all Cloud SDK components. List all components in the ...
#!python # This file was obtained from: # http://peak.telecommunity.com/dist/ez_setup.py # on 2009/4/17. """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2012 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.stanza import Message from sleekxmpp.util import unicode from sleekxmpp.thirdparty import OrderedDict from sleekxmpp.xmlstream im...
from django.contrib.postgres.indexes import BrinIndex, GinIndex, GistIndex from django.db import connection from django.test import skipUnlessDBFeature from . import PostgreSQLTestCase from .models import CharFieldModel, DateTimeArrayModel, IntegerArrayModel @skipUnlessDBFeature('has_brin_index_support') class BrinI...
""" RemoteObject Tests. @since: 0.1 """ import unittest import pyamf from pyamf import remoting from pyamf.remoting import amf3, gateway from pyamf.flex import messaging class RandomIdGeneratorTestCase(unittest.TestCase): def test_generate(self): x = [] for i in range(5): id_ = amf...
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from .amp import AMPIE from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class BleacherReportIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bleacherreport\.com/articles/(?P<id>\d+)' _...
from PIL import Image from xml.dom import minidom from numpy import * from pylab import * from scipy import ndimage, linalg from scipy.misc import imsave import os def read_points_from_xml(xmlFileName): """ Reads control points for face alignment. """ xmldoc = minidom.parse(xmlFileName) facelist = xmldoc...
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterface'], 'supported_by': 'certified'} DOCUMENTATION = r''' --- module: bigip_snmp short_description: Manipulate general SN...
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib import auth from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render_to_response from django.template import RequestContext from django.views.decorators.http import requir...
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import AngelListProvider class AngelListOAuth2Adapter(OAuth2...
# -*- coding: utf-8 -*- from typing import List import pygal from flask_babel import gettext from pygal import Graph from pygal.colors import hsl_to_rgb from pygal.style import Style from sipa.units import (format_as_traffic, max_divisions, reduce_by_base) from sipa.utils.babel_utils import ge...
from . import common from odoo.exceptions import except_orm class TestWarehouse(common.TestMrpCommon): def test_manufacturing_route(self): warehouse_1_stock_manager = self.warehouse_1.sudo(self.user_stock_manager) manu_rule = self.env['procurement.rule'].search([ ('action', '=', 'manu...
#!/usr/bin/env python3 """Script to encrypt config files. Usage: scripts/encrypt_conf.py confname1 confname2 ... confnameN scripts/encrypt_conf.py credentials """ import io import click import yaycl_crypt from cfme.scripting import link_config from cfme.utils import conf @click.group(help='Functions affecti...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.utils.translation import ugettext_lazy as _ from django.conf import settings from django.db import models from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic fro...
from resource_management import * from resource_management.libraries.script.script import Script from resource_management.libraries.functions.validate import call_and_match_output from resource_management.libraries.functions.format import format from resource_management.core.logger import Logger class EagleServiceChec...
# -*- encoding: utf-8 -*- def remove_elements( sequence, indices=None, period=None, ): '''Removes `sequence` elements at `indices`. .. container:: example Removes all elements: :: >>> sequencetools.remove_elements(range(15)) [] .. container:: ...
from openerp.osv import fields, osv class mrp_workcenter_load(osv.osv_memory): _name = 'mrp.workcenter.load' _description = 'Work Center Load' _columns = { 'time_unit': fields.selection([('day', 'Day by day'),('week', 'Per week'),('month', 'Per month')],'Type of period', required=True), 'm...
""" Movie module (imdb package). This module provides the Movie class, used to store information about a given movie. Copyright 2004-2010 Davide Alberani <<EMAIL>> 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 Softwa...
import decimal import math import re from oslo_utils import units import six from django.conf import settings from django.contrib.auth import logout # noqa from django import http from django.utils.encoding import force_text from django.utils.functional import lazy # noqa from django.utils import translation def ...
""" I/O classes provide a uniform API for low-level input and output. Subclasses will exist for a variety of input/output mechanisms. """ __docformat__ = 'reStructuredText' import sys import re import codecs from docutils import TransformSpec from docutils._compat import b from docutils.error_reporting i...
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['preview'], 'supported_by': 'community'} from ansible.module_utils.basic import AnsibleModule try: from ansible.module_utils.avi import ( avi_common_argument_spec, HAS_AVI, avi_ansible_api) except ImportError:...
"""SCons.Tool.hplink Tool-specific initialization for the HP linker. 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. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foun...
""" TimeSeriesSimulationView.py This file ... """ from django.views.generic import TemplateView from signetsim.views.HasWorkingModel import HasWorkingModel from .SedmlWriter import SedmlWriter from .TimeSeriesSimulationForm import TimeSeriesSimulationForm from signetsim.models import Experiment, Condition, Treatmen...
"""gflags2man runs a Google flags base program and generates a man page. Run the program, parse the output, and then format that into a man page. Usage: gflags2man <program> [program] ... """ # TODO(csilvers): work with windows paths (\) as well as unix (/) # This may seem a bit of an end run, but it: doesn't bl...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from absl.testing import parameterized from tensorflow.core.protobuf import config_pb2 from tensorflow.python import tf2 from tensorflow.python.client import session from tensorflow.python.eager imp...
""" ACE parser From wotsit.org and the SDK header (bitflags) Partial study of a new block type (5) I've called "new_recovery", as its syntax is very close to the former one (of type 2). Status: can only read totally file and header blocks. Author: Christophe Gisquet <<EMAIL>> Creation date: 19 january 2006 """ from...
import os import subprocess as sp from cosmos.api import Cosmos, Dependency, draw_stage_graph, draw_task_graph, \ pygraphviz_available, default_get_submit_args from functools import partial from tools import echo, cat, word_count def recipe(workflow): # Create two Tasks that echo "hello" and "world" respectiv...
from django import template from django.template.base import Node from django.utils.encoding import iri_to_uri from django.utils.six.moves.urllib.parse import urljoin register = template.Library() class PrefixNode(template.Node): def __repr__(self): return "<PrefixNode for %r>" % self.name def __in...
#! /usr/bin/env python # This script requires that you have watchdog installed. You can install # watchdog via 'pip install watchdog' import sys import time import logging import os from subprocess import Popen from signal import SIGTERM from watchdog.observers import Observer from watchdog.events import LoggingEvent...
#!/usr/bin/env python """ 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");...
"""Classes for wrapping a model to operate on different data shapes.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc from tensorflow.contrib.timeseries.python.timeseries import feature_keys from tensorflow.contrib.timeseries.python.timeseries...
from __future__ import unicode_literals import datetime import re import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.encoding import force_text, smart_bytes from django.core.serializers import json as djangojson from tas...
# -*- coding: utf-8 -*- """ pygments.plugin ~~~~~~~~~~~~~~~ Pygments setuptools plugin interface. The methods defined here also work if setuptools isn't installed but they just return nothing. lexer plugins:: [pygments.lexers] yourlexer = yourmodule:YourLexer formatter pl...
''' This study is a Bogazici University - NETAS Nova V-Gate collaboration and funded by TEYDEB project "Realization of Anomaly Detection and Prevention with Learning System Architectures, Quality Improvement, High Rate Service Availability and Rich Services in a VoIP Firewall Product'', by the Scientific and Technolog...
# -*- coding: utf-8 -*- """ Django settings for PyCon Canada 2017 project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, u...
from __future__ import absolute_import, division, print_function __metaclass__ = type import pytest from units.modules.utils import set_module_args, exit_json, fail_json, AnsibleExitJson from ansible.module_utils import basic from ansible.modules.network.check_point import cp_mgmt_service_dce_rpc OBJECT = { "nam...
""" ==================================================================== Plot the decision surfaces of ensembles of trees on the iris dataset ==================================================================== Plot the decision surfaces of forests of randomized trees trained on pairs of features of the iris dataset. ...
"""Code signing build tool. This module sets up code signing. It is used as follows: env = Environment(tools = ["code_signing"]) To sign an EXE/DLL do: env.SignedBinary('hello_signed.exe', 'hello.exe', CERTIFICATE_FILE='bob.pfx', CERTIFICATE_PASSWORD='123', ...
#! /usr/bin/env python from __future__ import print_function from openturns import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: # Instanciate one distribution object distribution = ZipfMandelbrot(15, 1.2, 2.) print("Distribution ", repr(distribution)) print("Distribution ", distribution) # I...
import os import commands from os.path import dirname, abspath, join, curdir from nose.tools import assert_equals, with_setup from tests.asserts import prepare_stdout def test_imports_terrain_under_path_that_is_run(): old_path = abspath(curdir) os.chdir(join(abspath(dirname(__file__)), 'simple_features', '1s...
""" Test that inherited fields work correctly when parsing XML """ from nose.tools import assert_equals, assert_in # pylint: disable=no-name-in-module from xmodule.tests.xml import XModuleXmlImportTest from xmodule.tests.xml.factories import CourseFactory, SequenceFactory, ProblemFactory, XmlImportFactory class Tes...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
"""Tests for the Plum Lightpad config flow.""" from aiohttp import ContentTypeError from requests.exceptions import HTTPError from homeassistant.components.plum_lightpad.const import DOMAIN from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component from tests.async_mock import ...
from . import AWSObject, AWSProperty from .validators import integer try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class RedrivePolicy(AWSProperty): props = { 'deadLetterTargetArn': (basestring, False), 'maxReceiveCount': (intege...
from gnuradio import gr from gnuradio import blocks import sys try: from gnuradio import qtgui from PyQt4 import QtGui, QtCore import sip except ImportError: sys.stderr.write("Error: Program requires PyQt4 and gr-qtgui.\n") sys.exit(1) try: from gnuradio import analog except ImportError: s...
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from six import text_type class AnsibleBaseYAMLObject(object): ''' the base class used to sub-class python built-in objects so that we can add attributes to them during yaml parsing ''' _data_source = None ...
# coding=utf-8 import sys import struct import unittest from test_000_config import TestConfig from test_020_connection import TestConnection from gi.repository import Midgard from gi.repository import GObject class TestUser(unittest.TestCase): mgd = None def setUp(self): if self.mgd == None: self.mgd...
from nova.compute import arch from nova.compute import cpumodel from nova import objects from nova.tests.unit.objects import test_objects fake_cpu_model_feature = { 'policy': cpumodel.POLICY_REQUIRE, 'name': 'sse2', } fake_cpu_model_feature_obj = objects.VirtCPUFeature( **fake_cpu_model_feature) fake_vcp...
import os, sys sys.path.insert(0, os.getcwd()) from code.common import logging, dict_get, run_command, args_to_string from code.common import BENCHMARKS, SCENARIOS from code.common.harness import BaseBenchmarkHarness, scenario_result_regex import code.common.arguments as common_args import pycuda import pycuda.autoinit...
import itertools import pickle import numpy as np from numpy.testing import assert_array_almost_equal import scipy from scipy.spatial.distance import cdist from sklearn.neighbors.dist_metrics import DistanceMetric from nose import SkipTest def dist_func(x1, x2, p): return np.sum((x1 - x2) ** p) ** (1. / p) de...
from openerp.osv import osv, fields from itertools import groupby def grouplines(self, ordered_lines, sortkey): """Return lines from a specified invoice or sale order grouped by category""" grouped_lines = [] for key, valuesiter in groupby(ordered_lines, sortkey): group = {} group['categor...
import logging from .util import has_service from cattle.utils import get_or_create_map, get_or_create_list from cattle.agent.handler import BaseHandler log = logging.getLogger('docker') class IpsecTunnelSetup(BaseHandler): def __init__(self): pass def before_start(self, instance, host, config, sta...
''' The general form of the surface_points file. Each new species or class of materials is defined as a function, the function contains a dictionary of the known surfaces of that material or class. The surfaces contain the 2D projection of the under-coordinated surface atoms, there may be several possible terminations...
""" 'ctypes_configure' source for resource.py. Run this to rebuild _resource_cache.py. """ from ctypes import sizeof import dumpcache from ctypes_configure.configure import (configure, ExternalCompilationInfo, ConstantInteger, DefinedConstantInteger, SimpleType) _CONSTANTS = ( 'RLIM_INFINITY', 'RLIM...
ANSIBLE_METADATA = {'metadata_version': '1.0', 'status': ['stableinterface'], 'supported_by': 'core'}
import re from collections import OrderedDict from urllib.parse import parse_qsl, quote_plus, urlencode, urljoin, urlparse, urlunparse _re_uri_implicit_scheme = re.compile(r"""^[a-z0-9][a-z0-9.+-]*://""", re.IGNORECASE) def update_scheme(current: str, target: str) -> str: """ Take the scheme from the curren...
"""Tests for hermite_e module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.hermite_e as herme from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run...
import unittest import numpy as np import GPy class MappingGradChecker(GPy.core.Model): """ This class has everything we need to check the gradient of a mapping. It implement a simple likelihood which is the sum of the outputs of the mapping. the gradients are checked against the parameters of the mapp...
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import sys class TestExec(object): __tmp__ = True config = """ templates: global: set: temp_dir: '__tmp__' acc...
# -*- coding: utf-8 -*- """ requests.auth ~~~~~~~~~~~~~ This module contains the authentication handlers for Requests. """ import os import re import time import hashlib from base64 import b64encode from .compat import urlparse, str from .cookies import extract_cookies_to_jar from .utils import parse_dict_header ...
# Script to update base/inc/RVersion.h. # Called by main Makefile as soon as build/version_number has been updated. # import os, subprocess, re from datetime import date, datetime versionline = "" with open("build/version_number", "r") as file: versionline = file.read().replace('\n', '') matches = re.match(r'^(\d+...
from __future__ import unicode_literals from django.db.models.fields.files import ImageFieldFile from django.forms import CharField from django.contrib.auth.models import User from django.test.testcases import TestCase from tests.models import UserProfile, ModelWithImage from moderation.forms import BaseModeratedObjec...
import argparse import sys import beakerx from notebook import notebookapp as app from .install import install, uninstall from .bkr2ipynb import main def install_subparser(subparser): install_parser = subparser.add_parser('install', help='installs BeakerX extensions') install_parser.set_defaults(func=install) ...
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
from solent import Engine from solent import log from solent import ns from solent import RailLineFinder from solent import SolentQuitException # -------------------------------------------------------- # model # -------------------------------------------------------- I_NEARCAST = ''' i message h i field h...
# base class for tk common dialogues # # this module provides a base class for accessing the common # dialogues available in Tk 4.2 and newer. use filedialog, # colorchooser, and messagebox to access the individual # dialogs. # # written by Fredrik Lundh, May 1997 # from tkinter import * class Dialog: command ...
from msrest.serialization import Model class TrendingVideosSubcategory(Model): """TrendingVideosSubcategory. :param title: :type title: str :param tiles: :type tiles: list[~azure.cognitiveservices.search.videosearch.models.TrendingVideosTile] """ _validation = { 'title': {'r...
import json import collections import matplotlib matplotlib.use('Agg') # requirement of matplotlib import matplotlib.pyplot as plt import numpy as np from textwrap import wrap myinput = """[ { "url":"https://api.etais.ee/api/invoices/9e67980771a94de3bd0075fe84522b05/", "uuid":"9e67980771a94de3bd0075f...
"""GradientDescent optimizer for TensorFlow.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.optimizer_v2 import optimizer_v2 from tensorflow.python.framework import ops from tensorflow.python.ops import resource_variable_ops from ...
import copy import imp import json import os from os.path import join, splitext, expanduser from .vendor import six if six.PY3: from .vendor import yaml3 as yaml else: from .vendor import yaml2 as yaml from .env import Environment from .exceptions import UnknownFileType from .util import debug class DataPro...
# -*- coding: utf-8 -*- import logging import re from babelfish import Language, language_converters from guessit import guessit from requests import Session from . import ParserBeautifulSoup, Provider from .. import __short_version__ from ..cache import SHOW_EXPIRATION_TIME, region from ..exceptions import Authentic...
#!/usr/bin/env python import os import sys import requests from db_s3_utils import ( get_db_checksum, get_git_sha, get_prev_db_data, set_db_data, JSON_DATA_FILE, DB_FILE, ) BUCKET_NAME = os.getenv('AWS_DB_S3_BUCKET', 'bedrock-db-dev') REGION_NAME = os.getenv('AWS_DB_REGION', 'us-west-2') S3...
# USBEndpoint.py # # Contains class definition for USBEndpoint. class USBEndpoint: direction_out = 0x00 direction_in = 0x01 transfer_type_control = 0x00 transfer_type_isochronous = 0x01 transfer_type_bulk = 0x02 transfer_type_interrupt = 0x03 ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Region.geoname_id' db.add_column('cities_light_region', 'geoname_id', ...
import struct import pytest from kafka.record import util varint_data = [ (b"\x00", 0), (b"\x01", -1), (b"\x02", 1), (b"\x7E", 63), (b"\x7F", -64), (b"\x80\x01", 64), (b"\x81\x01", -65), (b"\xFE\x7F", 8191), (b"\xFF\x7F", -8192), (b"\x80\x80\x01", 8192), (b"\x81\x80\x01", -...
#!/usr/bin/env python import os, sys, re, shutil from optparse import OptionParser, OptionGroup, Values # Determine the MOOSE Directory MOOSE_PYTHON_DIR = None if os.environ.has_key('MOOSE_DIR'): MOOSE_PYTHON_DIR = os.path.join(os.environ['MOOSE_DIR'], 'python') else: MOOSE_PYTHON_DIR = os.path.join(os.path.split(...
#-*- coding: utf-8 -*- """ This function is snatched from https://github.com/ojii/django-load/blob/3058ab9d9d4875589638cc45e84b59e7e1d7c9c3/django_load/core.py#L49 local changes: * added check for basestring to allow values that are already an object or method. """ from django.utils.importlib import import_module ...