code
stringlengths
1
199k
import unittest from domain.usuario import DTOUsuario, Usuario from domain.usuario.nivel_acesso import * from domain.usuario import ServicoCRUDUsuario from domain.excecoes import * from repositorios_memoria import RepositorioUsuarioEmMemoria from .suporte import ServicoEmailEmMemoria from domain.email import * class Te...
class FastqStanza(object): """ Encapsulates the four-line chunks of a fastq file. """ @classmethod def parse(cls, line_str, delim="\n"): return FastqStanza(*line_str.rstrip().split(delim)) def __init__(self, sequence_id, sequence, quality_id, quality): self.sequence_id = sequence_id ...
from .kang_schafer import * from .lalonde import *
from esdvd import ESCommon from lru import lru_cache_function import json import random import time import os class QueryData(ESCommon): def __init__(self): ESCommon.__init__(self) @staticmethod @lru_cache_function(max_size=1024*8, expiration=60) def get_id(q, rindex): path = q.get_file_...
messages_str = "/home/rafa/wsdift/src/haws/msg/Tags.msg;/home/rafa/wsdift/src/haws/msg/Conflict.msg;/home/rafa/wsdift/src/haws/msg/Warning_Levels.msg" services_str = "" pkg_name = "haws" dependencies_str = "std_msgs;geometry_msgs;nav_msgs" langs = "gencpp;geneus;genlisp;genpy" dep_include_paths_str = "haws;/home/rafa/w...
from Selenium2Library.base import LibraryComponent, keyword from Selenium2Library.locators import TableElementFinder class TableElementKeywords(LibraryComponent): def __init__(self, ctx): LibraryComponent.__init__(self, ctx) self._table_element_finder = TableElementFinder(ctx) @keyword def g...
import mock from cloudferry.actions.prechecks import check_networks from cloudferry.lib.base import exception from tests import test class CheckNetworksTestCase(test.TestCase): @staticmethod def get_action(src_net_info, dst_net_info=None, src_compute_info=None): if not dst_net_info: dst_net_...
import os from datetime import datetime from recharge.etrm_processes import Processes def run(date_range, input_root, output_root, taw_modification): etrm = Processes(date_range, input_root, output_root) etrm.modify_taw(taw_modification) etrm.run() if __name__ == '__main__': start_year = 2013 start_...
"""Tests for inference_gym.targets.brownian_motion.""" import functools import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.internal import test_util as tfp_test_util from inference_gym.internal import test_util from inference_gym.targets import brownian_motion _fake_observed_data = ...
from flask import Blueprint checkin = Blueprint('checkin', __name__) @checkin.route('/api/checkin') def get_checkin_data(): return 'TODO: return JSON data here'
"""Constructor APIs""" from ...._ffi.function import _init_api _init_api("relay.qnn.op._make", __name__)
import unittest from unittest import mock from airflow.contrib.task_runner.cgroup_task_runner import CgroupTaskRunner class TestCgroupTaskRunner(unittest.TestCase): @mock.patch("airflow.task.task_runner.base_task_runner.BaseTaskRunner.__init__") @mock.patch("airflow.task.task_runner.base_task_runner.BaseTaskRun...
"""The tests for the Dark Sky platform.""" import re import unittest from unittest.mock import MagicMock, patch from datetime import timedelta from requests.exceptions import HTTPError import requests_mock import forecastio from homeassistant.components.darksky import sensor as darksky from homeassistant.setup import s...
''' From BIFF8 on, strings are always stored using UTF-16LE text encoding. The character array is a sequence of 16-bit values4. Additionally it is possible to use a compressed format, which omits the high bytes of all characters, if they are all zero. The following tables describe the standard format of t...
import sys, time, os import Tkinter from Tkinter import YES, NO, X, Y, BOTH, LEFT, TOP, BOTTOM, RIGHT, SUNKEN CHARSET = 'utf-8' APPHOME = os.path.abspath(os.path.split(sys.argv[0])[0]) sys.path.append(os.path.abspath(os.path.join(APPHOME, '../lib'))) if sys.platform[:3] == 'win': TMP = os.environ.get('TMP', os.environ...
STATES = ( ('AK', 'Alaska'), ('AL', 'Alabama'), ('AZ', 'Arizona'), ('AR', 'Arkansas'), ('CA', 'California'), ('CO', 'Colorado'), ('CT', 'Connecticut'), ('DE', 'Delaware'), ('DC', 'District of Columbia'), ('FL', 'Florida'), ('GA', 'Georgia'), ('HI', 'Hawaii'), ('ID', '...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from scipy import stats from tensorflow.contrib import distributions as distributions_lib from tensorflow.python.framework import dtypes from tensorflow.python.framework import errors from ten...
import ctypes from ctypes import windll from ctypes import wintypes from cloudbaseinit import exception kernel32 = windll.kernel32 class Win32_DiskGeometry(ctypes.Structure): FixedMedia = 12 _fields_ = [ ('Cylinders', wintypes.LARGE_INTEGER), ('MediaType', wintypes.DWORD), ('TracksPerCyl...
""" Set of SQLAlchemy database schemas supported in MLflow for tracking server backends. """ POSTGRES = "postgresql" MYSQL = "mysql" SQLITE = "sqlite" MSSQL = "mssql" DATABASE_ENGINES = [POSTGRES, MYSQL, SQLITE, MSSQL]
from pycuda.compiler import SourceModule from pycuda.tools import context_dependent_memoize from neon.backends.cuda_templates import (_common_round, _common_kepler, _ew_types, _common_fp16_to_fp...
from argparse import ArgumentParser import logging import random from uriutils import URIFileType logger = logging.getLogger(__name__) def main(): parser = ArgumentParser(description='Script to partition file by lines.') parser.add_argument('-i', '--instances', type=URIFileType('r'), nargs='+', metavar='<instan...
from pathlib import Path from os.path import relpath from subprocess import check_call from shutil import which, copytree, rmtree THEME = 'hauntr' INPUT = 'presentations' OUTPUT = 'presentations' def main(): rst2s5 = which('rst2s5.py') assert rst2s5, 'rst2s5.py not found!' rst2html5 = which('rst2html5.py') ...
import argparse import re import shutil import subprocess import sys import tempfile import zipfile from pathlib import Path from convert_to_generic_platform_wheel import convert_to_generic_platform_wheel def main(): if sys.platform.startswith("linux"): os_ = "linux" elif sys.platform == "darwin": ...
""" Mako Renderer for Salt """ import io import salt.utils.templates from salt.exceptions import SaltRenderError def render(template_file, saltenv="base", sls="", context=None, tmplpath=None, **kws): """ Render the template_file, passing the functions and grains into the Mako rendering system. :rtype: s...
import csv import json import math import pytz import six import time from collections import defaultdict from datetime import datetime from io import StringIO, BytesIO from flask import Flask from structlog import get_logger from werkzeug.http import http_date from .config import configure from .encoders import JSONEn...
import os import sys sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', #'sphinx.ext.intersphinx', 'oslosphinx' ] source_suffix = '.rst' master_doc = 'index' project = u'magnum' copyright = u'2013, OpenStack Foundation' add_function_parentheses = True add_module_names = True p...
from . import DeploymentUpdateBase class TestDeploymentUpdateModification(DeploymentUpdateBase): def test_modify_relationships(self): deployment, modified_bp_path = \ self._deploy_and_get_modified_bp_path('modify_relationship') node_mapping = { 'target': 'site1', ...
from oslo_versionedobjects import base as object_base from barbican.common import utils from barbican.model import models from barbican.model import repositories as repos from barbican.objects import base from barbican.objects import fields class OrderRetryTask(base.BarbicanObject, base.BarbicanPersistentObject, ...
import logging import os from dvc.config import Config from dvc.exceptions import InitError, InvalidArgumentError from dvc.ignore import init as init_dvcignore from dvc.repo import Repo from dvc.scm import SCM from dvc.scm.base import SCMError from dvc.utils import relpath from dvc.utils.fs import remove logger = loggi...
"""MetaGraph and related functions.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import os.path import re from collections import OrderedDict, deque import six from google.protobuf.any_pb2 import Any from google.protobuf import text_format f...
from django.test import TestCase from datetime import time, datetime from .models import Report, User, Team, Membership, Question import recurrence class TestNegativeReport(TestCase): def setUp(self): all_days_but_today = list(range(7)) all_days_but_today.remove(datetime.today().weekday()) r...
from http import client as http_client from ironic.api.controllers.v1 import versions from ironic.tests.unit.api import base class TestRoot(base.BaseApiTest): def test_get_root(self): response = self.get_json('/', path_prefix='') # Check fields are not empty [self.assertNotIn(f, ['', []]) fo...
from collections import ChainMap import os import yaml class RosdocIndex(object): def __init__(self, rosdoc_index_paths): self.forward_deps = self._read_folder(rosdoc_index_paths, 'deps') self.reverse_deps = {} self._build_reverse_deps() self.metapackage_deps = self._read_folder( ...
import argparse import os import sys import json import requests import uuid debug = False version = "1.0.0" def load_credentials(filepath = "~/.ega.json"): """Load credentials for EMBL/EBI EGA from ~/.ega.json""" filepath = os.path.expanduser(filepath) if not os.path.exists(filepath): print("{} doe...
""" Copyright 2016 Junhui Lee (ohenwkgdj@gmail.com) 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 wr...
import example_echo_idl
""" .. module:: pytfa :platform: Unix, Windows :synopsis: Thermodynamics-based Flux Analysis .. moduleauthor:: pyTFA team MILP-fu to reformulate problems """ import sympy from collections import namedtuple from .variables import LinearizationVariable from .constraints import LinearizationConstraint ConstraintTupl...
"""Tests for random-number generation ops in the XLA JIT compiler.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import numpy as np from tensorflow.compiler.tests import xla_test from tensorflow.python.framework import dtypes from tensorflow....
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0002_auto_20160602_1001'), ] operations = [ migrations.AlterModelOptions( name='probesource', options={'ordering': ('na...
import time class PID(object): """ Simple PID control. This class implements a simplistic PID control algorithm. When first instantiated all the gain variables are set to zero, so calling the method gen_out will just return zero. """ # pylint: disable=E0202 # (pylint 0.25.1 ca...
""" Recover the toy dataset generated by example/generate_toy/bnmf/generate_bnmtf.py using ICM, and plot the MSE against timestamps. We can plot the MSE, R2 and Rp as it converges, on the entire dataset. We have I=100, J=80, K=5, L=5, and no test data. We give flatter priors (1/10) than what was used to generate the da...
import os.path DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', # O...
from setuptools import setup from distutils.command.build import build from setuptools.command.install import install from setuptools.command.develop import develop import os BASEPATH = os.path.dirname(os.path.abspath(__file__)) setup(name='aloe', py_modules=['aloe'], )
import sys from film_data import * from film_store_io import * from film_eval import * f = create_film_from_imdb(sys.argv[2]) evalScore = load_eval_scores(sys.argv[1]) explain = False if len(sys.argv)>3 and sys.argv[3] == "explain": explain = True score = eval_film(f, evalScore, explain) sys.stdout.write(f.title) p...
"""ruamel.yaml utility functions.""" import logging import os from os import O_CREAT, O_TRUNC, O_WRONLY, stat_result from collections import OrderedDict from typing import Union, List, Dict, Optional import ruamel.yaml from ruamel.yaml import YAML from ruamel.yaml.constructor import SafeConstructor from ruamel.yaml.err...
import uuid from openstack.tests.unit import base from openstack.accelerator.v2 import device EXAMPLE = { 'id': '1', 'uuid': uuid.uuid4(), 'created_at': '2019-08-09T12:14:57.233772', 'updated_at': '2019-08-09T12:15:57.233772', 'type': 'test_type', 'vendor': '0x8086', 'model': 'test_model', ...
"""Tools for working with tf.data.Datasets.""" import tensorflow as tf def build_dataset_mixture(a, b, a_probability, seed=None): """Build a new dataset that probabilistically returns examples. Args: a: The first `tf.data.Dataset`. b: The second `tf.data.Dataset`. a_probability: The `float` probability ...
def usage(message, parser): import sys sys.stderr.write(message + '\n') parser.print_help() sys.exit(1) def fatal(message): import sys sys.stderr.write(message + '\n') sys.exit(1) def resolve(master): import subprocess process = subprocess.Popen( ['mesos-resolve', master], ...
"""e-SNLI: Natural Language Inference with Natural Language Explanations.""" import csv import os import tensorflow as tf import tensorflow_datasets.public_api as tfds _CITATION = """ @incollection{NIPS2018_8163, title = {e-SNLI: Natural Language Inference with Natural Language Explanations}, author = {Camburu, Oana-Ma...
import os import logging def rename_files(path): for filename in os.listdir(path): name,ext = os.path.splitext(filename) logging.info('name=%s,ext=%s'%(name,ext)) if ext=='.png': logging.info('old:%s,new:%s'%(os.path.join(path,filename),os.path.join(path,name[:3]+ext))) ...
""" Build service item action for AWS Glacier vault blueprint. """ from common.methods import set_progress from infrastructure.models import CustomField from infrastructure.models import Environment import boto3 def generate_options_for_env_id(server=None, **kwargs): envs = Environment.objects.filter( resou...
""" Herald HTTP transport directory :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.4 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with th...
""" Robots middleware denies access for search engines """ from webob import Request, Response class RobotsMiddleware(object): """ Robots middleware denies access for search engines If the path is /robots.txt, it will respond with Deny All. """ def __init__(self, app, *args, **kwargs): s...
""" Copyright (c) 2016,小忆机器人 All rights reserved. 摘 要: 创 建 者:余菲 创建日期:16/7/8 """
""" vote test cases """ import unittest from pyzab.state import State from pyzab.vote import Vote class VoteTestCase(unittest.TestCase): """ test Vote class """ def setUp(self): pass def test_serialize_deserialize(self): v1 = Vote(1, State.LOOKING, 3, 0xdeadbeef) v2 = Vote.parse(str(...
""" Copied+modified from rest_framework.fields, which is licensed under the BSD license: ******************************************************************************* Copyright (c) 2011-2016, Tom Christie All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitt...
import whois import flask from flask import Flask app = Flask(__name__) app.config['DEBUG'] = True fileName = "urllist" @app.route("/geturl", methods = ["POST"]) def getUrl(): url = flask.request.form['url'] email = flask.request.form['email'] info = getUrlAvailability(url) if info: logRequest(u...
ELEMENT = "Element" RELATIONSHIP = "Relationship" PERSON = "Person" SOFTWARE_SYSTEM = "Software System" CONTAINER = "Container" COMPONENT = "Component" SYNCHRONOUS = "Synchronous" ASYNCHRONOUS = "Asynchronous"
from setuptools import find_packages, setup setup( name='tensorflow_custom_op', version='0.0.1', packages=find_packages(), data_files=[('', ['libtensorflow-zero-out-operator.so'])], )
from rogerthat.rpc.service import ServiceApiException class BrandingValidationException(ServiceApiException): def __init__(self, message): ServiceApiException.__init__(self, ServiceApiException.BASE_CODE_BRANDING + 0, message) class BrandingAlreadyExistsException(ServiceApiException): def __init__(self)...
""" Tool for paper management with Zotero. """ __version__ = '0.3.0' __all__ = ['Zotero', 'ZoteroError'] from .zotero import Zotero, ZoteroError
import mock from heat.common import exception from heat.common import template_format from heat.engine.clients.os import mistral as client from heat.engine import resource from heat.engine.resources.openstack.mistral import external_resource from heat.engine import scheduler from heat.engine import template from heat.t...
import json import logging from django.conf import settings from django.utils import html from django.utils.translation import ugettext_lazy as _ from django.views.decorators.debug import sensitive_variables # noqa from oslo_utils import strutils import six from horizon import exceptions from horizon import forms from...
from oslo_config import cfg from neutron._i18n import _ DEFAULT_OVSDB_TIMEOUT = 10 OPTS = [ cfg.IntOpt('ovsdb_timeout', default=DEFAULT_OVSDB_TIMEOUT, help=_('Timeout in seconds for ovsdb commands. ' 'If the timeout expires, ovsdb commands will fail with ' ...
"""Some common utils wrapping snaps functions """ from functest.utils import config from functest.utils import constants from functest.utils import env from snaps.openstack.tests import openstack_tests from snaps.openstack.utils import neutron_utils, nova_utils def get_ext_net_name(os_creds): """ Returns the co...
""" Current thoughts: * Remove by: ** Root ** Path ** File In all cases, it is necessary to ensure that we will never remove all files with the same hash value. """ import re from os.path import isdir, abspath from optparse import make_option from django.core.management.base import BaseCommand, CommandError from storag...
from .factory import Factory from .config import load_configuration from .plugins import plugin_decorator, load_plugin
from tuskar.common import exception from tuskar.db.sqlalchemy import api as dbapi from tuskar.tests.db import base as db_base from tuskar.tests.db import utils class TestDbResourceClasses(db_base.DbTestCase): db = dbapi.get_backend() def setup(self): super(TestDbResourceClasses, self).setUp() def te...
from model.group import Group def test_add_group(app, db, json_groups): group = json_groups old_groups = db.get_group_list() app.group.create(group) # assert len(old_groups) + 1 == app.group.count() This hashing isn't needed it any more new_groups = db.get_group_list() old_groups.append(group) ...
__source__ = 'https://leetcode.com/problems/diagonal-traverse/' import unittest class Solution(object): def findDiagonalOrder(self, matrix): """ :type matrix: List[List[int]] :rtype: List[int] """ m, n = len(matrix), len(matrix and matrix[0]) return [matrix[i][d-i] ...
from nca47.db import api as db_api from nca47.db.sqlalchemy.models import ZoneRecord from nca47.objects import base from nca47.objects import fields as object_fields class DnsZoneRrs(base.Nca47Object): VERSION = '1.0' fields = { 'rrs_id': object_fields.StringField(), 'zone_id': object_fields.Str...
import traceback import sys from gribapi import * INPUT = '../../data/tp_ecmwf.grib' OUTPUT = 'out.samples.grib' VERBOSE = 1 # verbose error reporting def example(): sample_id = grib_new_from_samples("regular_ll_sfc_grib1") fin = open(INPUT) fout = open(OUTPUT, 'w') keys = { 'dataDate': 2008010...
""" Python API for controlling Google+ Hangouts =========================================== """ from .base import Hangouts from hangout_api import settings from hangout_api import gadgets
""" WSGI config for djangoapp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoapp.settings") from django.core.w...
from google.appengine.api import users def do_filter(): user = users.get_current_user() if user == None: return None, None if user.nickname(): return user, user.nickname() if user.email(): return user, user.email().split('@')[0] return user, user.user_id()
from abc import abstractmethod from l1_driver_resource_info import L1DriverResourceInfo class L1HandlerBase: @abstractmethod def login(self, address, username, password): """ :param address: str :param username: str :param password: str :return: None """ p...
from typing import ( Any, AsyncIterator, Awaitable, Callable, Sequence, Tuple, Optional, Iterator, ) from google.cloud.pubsublite_v1.types import admin from google.cloud.pubsublite_v1.types import common class ListTopicsPager: """A pager for iterating through ``list_topics`` requests...
""" Package for data handling ========================= Use this Package for easiest way to handle the data for GPTwoSample. """
"""Application logic for Mimic. The Mimic application must serve two distinct types of requests: * Control requests are used to interact with Mimc and are handled internally. * Target requests represent the user's application and processed according to the files retrieved from the provided tree. The target applicatio...
import argparse from oauth2client import client import certclient import os from urllib import parse import requests from http import server import socket import ssl import subprocess import tempfile parser = argparse.ArgumentParser(description='oauthproxy') parser.add_argument( '--allowed-domain', dest='allowe...
from distutils.core import setup from distutils.version import LooseVersion import os def is_package(path): return ( os.path.isdir(path) and os.path.isfile(os.path.join(path, '__init__.py')) ) def find_packages(path, base="" ): """ Find all packages in path """ packages = {} for ...
import itertools, pprint, functools SIZE = 6 l = [list(itertools.combinations(range(1, SIZE+1), n)) for n in range(1, SIZE+1)] pprint.pprint (l) lm = lambda s: functools.reduce(lambda d,el: d.extend(el) or d, s, []) pprint.pprint(lm(l)) #~ [(1, 2), #~ (1, 3), #~ (1, 4), #~ (1, 5), #~ (1, 6), #~ (2, 3), #~ ...
"""Used by test_load.py""" import non_existant # noqa
import webob from oslo_config import cfg from oslo_log import log from oslo_messaging._drivers import common as rpc_common from oslo_utils import encodeutils from senlin.common import consts from senlin.common import wsgi from senlin.tests.unit.common import utils def request_with_middleware(middleware, func, req, *arg...
import hashlib import operator import functools import itertools import collections import vstruct import envi.bits as e_bits from vivisect.const import * def symcache(f): def docache(*args, **kwargs): ret = args[0].cache.get(f.__name__) if ret is not None: return ret ret = f(*ar...
from django.core.management import BaseCommand from django.core.management import call_command from django.db import connection import os import shutil import re import tempfile def delete_line(filename, pattern, stdout): pattern_compiled = re.compile(pattern) with tempfile.NamedTemporaryFile(mode='w', delete=F...
from numpy import sum from gwlfe.Memoization import memoize @memoize def RurAreaTotal(NRur, Area): result = 0 for l in range(NRur): result += Area[l] return result @memoize def RurAreaTotal_f(NRur, Area): return sum(Area[0:NRur])
import requests import os import json import dns.resolver from flask import Flask from flask import request from flask import redirect from flask import render_template from flask import send_from_directory from flask import jsonify app = Flask(__name__) dcs = ['f5-1', 'f5-2' ] dcdict = { 'f5-1':{'address':['1.1.1....
from collections import OrderedDict import os import re from typing import Dict, Optional, Sequence, Tuple, Type, Union import pkg_resources from google.api_core import client_options as client_options_lib from google.api_core import gapic_v1 from google.api_core import retry as retries from google.auth import credenti...
import os.path from galaxy.util import in_directory from .action_mapper import FileActionMapper from .action_mapper import path_type from .staging import CLIENT_INPUT_PATH_TYPES from .util import PathHelper class PathMapper(object): """ Ties together a FileActionMapper and remote job configuration returned by t...
""" GPTwoSample plot ================ The easiest way to plot your results in an easy and convenient way. """
import os import GameController as gc from File import File from Database import Database from Directory import Directory from MessageBox import MessageBox from termcolor import colored class Computer: def __init__(self, owner_id = -1, id = -1, ip = '0.0.0.0'): self.owner_id = owner_id self.ram = 51...
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_auth.tests.settings' import openstack_auth extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Django OpenStack Auth' copyright = u'2012, Gabriel Hurley' version = o...
__author__ = "Simone Campagna" __all__ = [ 'RubikTestBandwidth', ] import collections from rubik.units import Bandwidth from ...rubik_test_case import RubikTestCase, testmethod class RubikTestBandwidth(RubikTestCase): METHOD_NAMES = [] @testmethod def constructor(self): bw0 = Ba...
import subprocess from absl.testing import absltest from xls.common import runfiles from xls.contrib.xlscc import hls_block_pb2 XLSCC_MAIN_PATH = runfiles.get_path("xls/contrib/xlscc/xlscc") FUNC_CPP_SRC = """ int my_function(int a, int b){ return a+b; } """ BLOCK_CPP_SRC = """ void my_function(int& dir, ...
from google.cloud import datacatalog_v1 def sample_delete_tag_template_field(): # Create a client client = datacatalog_v1.DataCatalogClient() # Initialize request argument(s) request = datacatalog_v1.DeleteTagTemplateFieldRequest( name="name_value", force=True, ) # Make the reque...
import webapp2 from pages import author_list class AuthorPage(webapp2.RequestHandler): """The asessom author page of the GiR App Labs at AAMU app.""" def get(self): """HTTP GET handler for the tlarsen Users page.""" self.response.headers['Content-Type'] = 'text/plain' self.response.write...
import copy import sys import os import re import operator import shlex import warnings import heapq import bisect import random import socket from subprocess import Popen, PIPE from tempfile import NamedTemporaryFile from threading import Thread from collections import defaultdict from itertools import chain from func...
"""A visitor class that generates protobufs for each pyton object.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.platform import tf_logging as logging from tensorflow.python.util import tf_decorator from tensorflow.python.util impo...
import sys from six.moves.urllib import parse from rally.common.i18n import _ from rally.common import logging from rally.deployment import engine # XXX: need a ovs one? from rally.deployment.serverprovider import provider from rally_ovs.plugins.ovs.deployment.engines import get_updated_server from rally_ovs.plugins.ov...