gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from elasticsearch import Elasticsearch,client from snorkel import SnorkelSession from snorkel.models import Document, Sentence,Span from snorkel.viewer import SentenceNgramViewer import os import json es = Elasticsearch() session = SnorkelSession() class ElasticSession: #define document and index names def __init...
# -*- coding: utf-8 -*- import datetime import os.path import functools from unittest import skipIf from django.conf import settings from django.core.cache import cache from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from dj...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#======================================================================= __version__ = '''0.0.28''' __sub_version__ = '''20040212122352''' __copyright__ = '''(c) Alex A. Naanou 2003''' #----------------------------------------------------------------------- import re ##import acl from pli.functional import rcurry ...
#Assignment 1 #Author: Dylan Kingston #Date started: 16/10/14 #Date submitted : 30/11/14 import httplib2 #Needed to download file from internet, not simply reading a file on the hard drive. YearsOfAge=0 #global variables Workclass=1 #fnlwgt=2 Not needed. #Education=3 Not needed. Education_Number=4 Marital_Status...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/python2 #------------------------------------------------------------------------------- # Filename: asteroids.py # # Author: David C. Drake (https://davidcdrake.com) # # Description: Contains an 'AsteroidsGame' class for managing a modified version # of the classic game Asteroids and a...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
# Copyright (c) 2011 OpenStack, LLC. # # 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...
#!/usr/bin/env python """ Copyright (c) 2015-2018 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,...
### # Copyright (c) 2004-2005, Jeremiah Fincher # Copyright (c) 2009-2010, James McCoy # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above ...
""" Copyright (C) 2005 - 2011 Eric Van Dewoestine 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. This program is distributed...
import time import unittest import six if six.PY3: from unittest import mock else: import mock from engineio import packet from engineio import payload from engineio import socket class TestSocket(unittest.TestCase): def _get_mock_server(self): mock_server = mock.Mock() mock_server.ping_...
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from pandas.compat import range, text_type, zip from pandas import compat from functools import partial import itertools import re import numpy as np from pandas.core.dtypes.common import ( _ensure_platform_int, is_list_like, is_bool_dtyp...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright (c) 2014 Openstack Foundation # # 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 ...
"""Models for ecommerce""" from django.conf import settings from django.contrib.postgres.fields import JSONField from django.db.models import ( CharField, CASCADE, DecimalField, ForeignKey, IntegerField, SET_NULL, PROTECT, TextField, Sum, ) from mitol.common.models import Timestamped...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the classes and utility functions for distance and cartesian coordinates. """ import warnings import numpy as np from astropy import units as u from astropy.utils.exceptions import AstropyWarning from .angles import Angle __al...
#!/usr/bin/env python """ @package mi.core.instrument.test.test_protocol_param_dict @file mi/core/instrument/test/test_protocol_param_dict.py @author Steve Foley @brief Test cases for the base protocol parameter dictionary module """ import json import re from mi.core.exceptions import InstrumentParameterException fr...
import sqlite3, uuid, sys, logging, time, os, json, zlib, hashlib, tempfile, multiprocessing from util import mbtiles_connect, execute_commands_on_tile, process_tile, flip_y, prettify_connect_string from util_check import check_mbtiles from multiprocessing import Pool logger = logging.getLogger(__name__) def proces...
#!/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 # "Li...
#!/usr/bin/env python # encoding: utf-8 import copy import cadnano.util as util from cadnano.strand import Strand from cadnano.cnproxy import ProxyObject, ProxySignal, UndoCommand from .applycolorcmd import ApplyColorCommand from .applysequencecmd import ApplySequenceCommand from .removeoligocmd import RemoveOligoCo...
from __future__ import absolute_import import email import logging import re import time import warnings from collections import namedtuple from itertools import takewhile from ..exceptions import ( ConnectTimeoutError, InvalidHeader, MaxRetryError, ProtocolError, ProxyError, ReadTimeoutError,...
#!/usr/bin/env python import sys import os import dropbox import subprocess import requests import json from dropbox.exceptions import AuthError import yaml import pipes class Config(object): def __init__(self): self.homedir = os.path.expanduser("~") self.our_dir = os.path.join(self.homedir, ".dr...
import warnings from io import StringIO from django.template.base import Lexer, TokenType from django.utils.regex_helper import _lazy_re_compile from . import TranslatorCommentWarning, trim_whitespace TRANSLATOR_COMMENT_MARK = 'Translators' dot_re = _lazy_re_compile(r'\S') def blankout(src, char): """ Cha...
import os, multiprocessing, subprocess from runner import BrowserCore, path_from_root from tools.shared import * def clean_pids(pids): import signal, errno def pid_exists(pid): try: # NOTE: may just kill the process in Windows os.kill(pid, 0) except OSError, e: return e.errno == errno.EPE...
# Copyright 2009, Peter A. Bigot # # 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 ...
# Copyright (c) 2012 - 2015 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. from __future__ import print_function import sys, os, tempfile, time from collections import OrderedDict from .api_base import BuildResult, Progress, UnknownJobException, ApiInvoca...
''' ''' # 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");...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # # 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 # ...
__all__=( 'Ean13BarcodeWidget','isEanString', 'Ean8BarcodeWidget', 'UPCA', 'Ean5BarcodeWidget', 'ISBNBarcodeWidget', ) from reportlab.graphics.shapes import Group, String, Rect from reportlab.lib import colors from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.validators imp...
# Copyright 2015 Curtis Sand # # 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 writing, ...
import sublime, sublime_plugin, sys, os, shutil, re, subprocess from configuration import ConfigurationReader class ProjectMakerCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings("yeoman.sublime-settings") self.non_parsed = settings.get("non_parsed") self.plugin_path = os.pat...
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import datetime import re try: import Image except ImportError: from PIL import Image try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.contrib.sites.models import Site import oembed from oembed.providers import DjangoProvider, DjangoDateBasedProvider,...
import re import numpy as np import pytest import pandas.util._test_decorators as td from pandas import DataFrame import pandas._testing as tm from pandas.tests.plotting.common import ( TestPlotBase, _check_plot_works, ) @pytest.fixture def hist_df(): np.random.seed(0) df = DataFrame(np.random.rand...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
""" Component to make instant statistics about your history. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.history_stats/ """ import datetime import logging import math import voluptuous as vol import homeassistant.components.history as history...
#!/usr/bin/env python """ RS 2013/07/09: Light Curve Models from Arnett 1980, 1982 """ # ---------------------------------------------------------------------------- # Dependencies # ---------------------------------------------------------------------------- import sys import numpy a...
__all__ = ['TestPost', 'TestDraft', 'TestTag', 'TestPostOperator'] import time import unittest from datetime import datetime from ..helpers import TaoblogTestCase from taoblog.models.post import Post, PostText, PostOperator, Tag, Draft from taoblog.models import ModelError class TestTag(TaoblogTestCase): def se...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Copyright (c) 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
""" Utilities module for generic PySAL functionality, mainly centered on translating queries into numpy arrays or PySAL weights objects """ import numpy as np import pysal as ps def construct_neighbor_query(w_type, query_vals): """Return query (a string) used for finding neighbors @param w_type...
""" Copyright (c) 2020, Battelle Memorial Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and...
#!/usr/bin/python # # Helper to create an SPDX license file (http://spdx.org) # # This must be executed when the dist/ directory is otherwise complete, # except for the SPDX license, so that the file lists and such contained # in the SPDX license will be correct. # # The utility outputs RDF/XML to specified file: ...
# -*- coding: utf-8 -*- # FIXME: This test module randomly passes/fails even if all tests are skipped. # Something fishy is going on with the Test fixtures. Behavior seen on CI on # both Linux and Windows # TODO: Remove delay of class creations. Adding SetUp/TearDown may help """Test sub-classing managed types""" imp...
import argparse import json import logging import os import shutil import subprocess import tempfile import requests import yaml from collections import OrderedDict from io import BytesIO from pathlib import Path from . import dockerfile from .constants import LAYERS_HOME, VERSION from .disco import configure_loggin...
# -*- coding: utf-8 -*- """ Created on Wed Nov 18 16:34:59 2015 @author: casimp """ import numpy as np from numpy.polynomial.chebyshev import chebval import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from pyxe.fitting_tools import pawley_hkl, extract_parameters, array_fit_pawley ...
#!/usr/bin/env python ###################################################################### # Software License Agreement (BSD License) # # Copyright (c) 2010, Rice University # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
# This file is part of the ISIS IBEX application. # Copyright (C) 2012-2016 Science & Technology Facilities Council. # All rights reserved. # # This program is distributed in the hope that it will be useful. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License...
import click import sys import json from inspect import signature from mlflow.utils import cli_args from mlflow.deployments import interface from mlflow.utils.proto_json_utils import NumpyEncoder, _get_jsonable_obj def _user_args_to_dict(user_list): # Similar function in mlflow.cli is throwing exception on import...
""" This plugin captures logging statements issued during test execution. When an error or failure occurs, the captured log messages are attached to the running test in the test.capturedLogging attribute, and displayed with the error failure output. It is enabled by default but can be turned off with the option ``--nol...
"""Alexa state report code.""" from __future__ import annotations import asyncio from http import HTTPStatus import json import logging import aiohttp import async_timeout from homeassistant.const import MATCH_ALL, STATE_ON from homeassistant.core import HomeAssistant, State, callback from homeassistant.helpers.sign...
""" Support for interacting with and controlling the cmus music player. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cmus/ """ import logging import voluptuous as vol from homeassistant.components.media_player import ( MEDIA_TYPE_MU...
import json from mock import patch from django.test import TestCase, RequestFactory, Client from django.core.urlresolvers import reverse from django.contrib.auth.models import Group from django.contrib.messages.storage.fallback import FallbackStorage from django.db import transaction from django.utils.http import int_...
import StringIO import csv import datetime import json import logging import shutil from stat import S_IRUSR import pytest from retrying import retry from subprocess import Popen import mazerunner import os from mazerunner.api_client import Service, AlertPolicy, Decoy, Breadcrumb, \ DeploymentGroup, Endpoint, CI...
# Copyright (c) "Neo4j" # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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...
""" quilt.Quilter Object to stitch a page based on quilt {: .lead} 1. use [quilt file](#quiltfile) to create quilt 2. replace all [patch files](#patchfile) by matching `patch#id` tags in quilt with a `patch/id.html` file 3. parses [page file](#pagefile) using the following format: 1. `key: value` page variable *h...
# Copyright 2009 Shikhar Bhushan # Copyright 2011 Leonidas Poulopoulos # # 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...
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
import asyncio import logging from collections import OrderedDict from typing import Dict, Union, Any from applebot.exceptions import EventNotFoundError log = logging.getLogger(__name__) class EventManager(object): def __init__(self): self._events = {} # type: Dict[str, Event] self._event_type ...
import time import json import re import traceback import requests import threading from slacksocket import SlackSocket from slackclient import SlackClient from block_io import BlockIo version = 2 # API version from key_pin import * block_io_doge = BlockIo(blockio_api_doge_key, blockio_secret_pin, version) block_io_bt...
# -*- coding: utf-8 -*- """ Project Tracking & Management """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) mode_task = settings.get_project_mode_task() # =================================================...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
from __future__ import print_function import re import os import sys import subprocess import inspect import pypro.console import argparse import traceback import threading import tempfile import time try: import ConfigParser except ImportError: import configparser as ConfigParser version = '0.1.1' release = ...
# Copyright 2012 AMG.lab, a Bull Group Company # # 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 ag...
from eve.tests import TestBase from eve.tests.utils import DummyEvent from eve.tests.test_settings import MONGO_DBNAME from eve import ETAG from bson import ObjectId class TestDelete(TestBase): def setUp(self): super(TestDelete, self).setUp() # Etag used to delete an item (a contact) self....
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
#pylint: skip-file from contextlib import contextmanager import struct import six from mock import patch, sentinel from . import unittest from kafka.codec import has_snappy, gzip_decode, snappy_decode from kafka.errors import ( ChecksumError, KafkaUnavailableError, UnsupportedCodecError, ConsumerFetchSizeTooS...
import os, sys import numpy as np import itertools import glob import random import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import tensorflow as tf import data ''' data transformations ''' class Identity: de...
import traceback import xml.dom.minidom from spitfire.compiler.ast import * import spitfire.compiler.util enable_debug = False def debug(func_name, dom_node): if not enable_debug: return if dom_node.attributes: print func_name, dom_node.nodeName, dom_node.attributes.keys() else: print func_name, do...
#!/usr/bin/env python3 from __future__ import unicode_literals import subprocess import sys import threading from time import sleep import re from texttable import Texttable from pyfeld.pingTest import ping_test_alive try: from pyfeld.rfcmd import RfCmd except: pass sshcmd = "ssh -o StrictHostKeyChecking...
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
import zipfile import io from datetime import datetime from util.ncconv.experimental.ocg_converter.subocg_converter import SubOcgConverter #from xml.sax.saxutils import escape class KmlConverter(SubOcgConverter): '''Converts data to a KML string''' def _convert_(self,request): from pykml.factory i...
#!/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. ...
"""Support for monitoring OctoPrint 3D printers.""" from datetime import timedelta import logging from pyoctoprintapi import ApiError, OctoprintClient, PrinterOffline import voluptuous as vol from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry from homeassistant.const import ( CONF_API_KEY, CO...
"""Base for all node resource services. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import collections import contextlib import errno import functools import glob import importlib import io import l...
"""Test suite for 2to3's parser and grammar files. This is the place to add tests for changes to 2to3's grammar, such as those merging the grammars for Python 2 and 3. In addition to specific tests for parts of the grammar we've changed, we also make sure we can parse the test_grammar.py files from both Python 2 and P...
# Copyright 2014 Cloudbase Solutions Srl # # 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 l...
import numpy as np import pytest from pandas.compat.numpy import _np_version_under1p16 import pandas as pd from pandas.core.arrays.numpy_ import PandasArray, PandasDtype import pandas.util.testing as tm from . import base @pytest.fixture(params=['float', 'object']) def dtype(request): return PandasDtype(np.dty...
import errno import filecmp import os import shutil import stat import textwrap import time from unittest.mock import call, patch import colorama import pytest import dvc as dvc_module from dvc.dvcfile import DVC_FILE_SUFFIX from dvc.exceptions import ( DvcException, InvalidArgumentError, OutputDuplicatio...
# -*- encoding: utf-8 -*- """Test the views at /api/v1/reviews.""" import uuid import pytest from ceraon.models.reviews import Review from tests.utils import BaseViewTest @pytest.mark.usefixtures('db') class TestFindReview(BaseViewTest): """Test GET /api/v1/reviews/ID.""" base_url = '/api/v1/reviews/{}' ...
#!/usr/bin/env python """ mbed Copyright (c) 2017-2017 ARM Limited 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 applicab...
try: # Only exists in Python 2.4+ from threading import local except ImportError: # Import copy of _thread_local.py from Python 2.4 from django.utils._threading_local import local try: set except NameError: # Python 2.3 compat from sets import Set as set try: import decimal except Impor...
# -*- coding: utf-8 -*- import abc import logging import datetime import functools import httplib as http import urlparse import uuid from flask import request from oauthlib.oauth2.rfc6749.errors import MissingTokenError from requests.exceptions import HTTPError as RequestsHTTPError from modularodm import fields, Q ...
# -*- coding: utf-8 -*- from webob import Response, Request from tg.controllers import TGController, RestController from tg.decorators import expose from tg.util import no_warn from tests.base import ( TestWSGIController, make_app, setup_session_dir, teardown_session_dir) def setup(): setup_session_dir() ...
import urllib2 import ast import psycopg2 import ConfigParser import json import threading import sys import re import time import datetime import boto import os import boto.dynamodb2 from boto import kinesis from boto.dynamodb2.fields import HashKey, RangeKey, KeysOnlyIndex, AllIndex from boto.dynamodb2.table import T...
""" sentry.conf.server ~~~~~~~~~~~~~~~~~~ These settings act as the default (base) settings for the Sentry-provided web-server :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.conf.global_settings import * # NOQA import hashlib...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # 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 o...
from abc import ABCMeta, abstractmethod from pywps._compat import text_type, StringIO import tempfile, os from pywps.inout.literaltypes import LITERAL_DATA_TYPES from pywps import OWS, OGCUNIT, NAMESPACES from pywps.validator.mode import MODE from pywps.validator.base import emptyvalidator from pywps.validator import g...
""" Test module for the command-line interface of SLAM. It imports the differents functions used by the CLI and call them directly with various arguments simulating a call from a shell. Note: This module decrease the logging level to minimize the message flow to the console during the test. It also replaces stdout by...
# # -*- coding: utf-8 -*- """ """ from __future__ import absolute_import from ctypes import * from itertools import count, takewhile from pkg_resources import resource_filename from shutil import copyfileobj import tempfile import pytest from six.moves import map from six import text_type from libtcd.compat import b...
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # # Contact: Leighton Pritchard, Scottish Crop Research Institute, # ...
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 re...
import sublime import sublime_plugin import re import os import time import ntpath import glob SETTINGS_FILE = 'FileConcatenator.sublime-settings' MESSAGE_HEADER = 'Sublime File Concatenator\n===========================\n\n' MSG_TYPE = {} MSG_TYPE['INFO'] = 1 MSG_TYPE['WARNING'] = 2 MSG_TYPE['ERROR'] = 3 MSG_TYP...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
""" Examples: To smear an already smeared spectrum with a light yield of 200 to a a light yield of 190 then the following lines are required:: >>> smearer = smear.SmearEnergySmearLY() >>> ly = smearer.calc_smear_ly(190., cur_ly=200.) >>> smearer.set_resolution(ly) >>> smeared_spec = smearer.weighte...
## @file # This file is for installed package information database operations # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distributi...