text
stringlengths
12
6.59M
from agentserver.admin import Admin, color_text, HEADER_COLOR from agentserver.db.models import models, User, UserAuthToken, Agent, AgentAuthToken import mock import unittest import re import sys import os from cStringIO import StringIO from contextlib import contextmanager from datetime import datetime from tempfile ...
"""Split the expression into tokens.""" import re import collections REGEX_OPERATOR = r"^([+\-*/=:()]?|([+\-*/%]=)|)$" REGEX_WHITESPACE = r"^\s+$" REGEX_NUMBER = r"^\-?[0-9]+(\.[0-9]+)?$" REGEX_IDENTIFIER = r"^[a-zA-Z_]+([0-9a-zA-Z_]+)?$" REGEX_STRING = "\"(\\.|[^\"])*(\")?" class TokenType(collections.namedtuple("To...
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
""" Python interface for SNOPT http://ccom.ucsd.edu/~optimizers Elizabeth Wong, University of California, San Diego Philip Gill, University of California, San Diego Feb 2015 """ # Python modules import os, sys import numpy as np import scipy.sparse as sp import snopt7_python as snopt from ...
import unittest import markovify import sys, os import operator def get_sorted(chain_json): return sorted(chain_json, key=operator.itemgetter(0)) with open(os.path.join(os.path.dirname(__file__), "texts/sherlock.txt")) as f: sherlock = f.read() sherlock_model = markovify.Text(sherlock) class MarkovifyTes...
""" homeassistant.components.automation.state ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Offers state listening automation rules. """ import logging from homeassistant.helpers.event import track_state_change from homeassistant.const import MATCH_ALL CONF_ENTITY_ID = "entity_id" CONF_FROM = "from" CONF_TO = "to" CONF...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import sys import traceback import unittest class PageTestResults(unittest.TestResult): def __init__(self): super(PageTestResults, ...
""" <Module Name> rsa.py <Author> Santiago Torres-Arias <santiago@nyu.edu> <Started> Nov 15, 2017 <Copyright> See LICENSE for licensing information. <Purpose> RSA-specific handling routines for signature verification and key parsing """ import binascii import cryptography.hazmat.primitives.hashes as hash...
#! /usr/bin/env python # Copyright (c) 2011 SEOmoz # # 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, mer...
#!/usr/bin/python """ ircAsync -- An asynchronous IRC client interface. This is intended as a component in a semantic web agent with several interfaces, one of them being IRC. It's implemented on top of asyncore so that the same agent can export an HTTP interface in asynchronous, non-blocking style. see Log at end f...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from uuid import uuid4 from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class AccountCashboxLine(models.Model): _inherit = 'account.cashbox.line' ...
#!/usr/bin/env python3 from django_mako_plus.version import __version__ from django_mako_plus.command import run_command import sys, os, os.path, re from rjsmin import jsmin # ensure the version is updated if input('Has the version number in django_mako_plus/version.py been updated? ')[:1].lower() != 'y': sys....
# Copyright 2018 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from pandas import DataFrame, Series import scipy.sparse as sparse from sqlalchemy.sql import bindparam, select from .features import get_span_feats from .models import GoldLabel, GoldLabelKey, Label, LabelKey, Feature, FeatureKey, Candidate from .models.meta import new_sessionmaker from .udf import UDF, UDFRunner fro...
from __future__ import absolute_import from zasim import ca, cagen from random import randrange from .testutil import * import pytest class TestCAGen: @pytest.mark.skipif("not ca.HAVE_WEAVE") def test_compare_weaves(self, rule_num): size = randrange(10, 30) br = ca.binRule(rule_num, size, 1, c...
"""Config flow for Bond integration.""" import logging from typing import Any, Dict, Optional, Tuple from aiohttp import ClientConnectionError, ClientResponseError from bond_api import Bond import voluptuous as vol from homeassistant import config_entries, exceptions from homeassistant.const import ( CONF_ACCESS_...
#! /usr/bin/env python # Copyright (c) 2011 SEOmoz # # 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, mer...
import re # private pallette = {'grey': '\x38', 'blue': '\x39', 'green': '\x3a', 'cyan': '\x3b', 'red': '\x3c', 'magenta': '\x3d'} clearseq = '\x04\x67' # private crankseq = '\x04\x65' def getmaxlen(s, maxlen): if len(s) > maxlen: return len(s) return maxlen def getmaxpad(s, maxlen): return ((...
# See the file "LICENSE" for the full license governing this code. """ Setup script for the RepoGuard distribution. """ from __future__ import with_statement from distutils.command import clean as _clean from distutils import core import os import subprocess import shutil import sys from distribute_setup import us...
import argparse import datetime import getpass import re import subprocess import sys import time from base64 import b64encode from os.path import expanduser import boto3 class SpotClient(object): error_list = [ 'capacity-not-available', 'capacity-oversubscribed', 'not-scheduled-yet', ...
"""Commands subpackage for umdone""" from ast import literal_eval import os import sys import glob import time import builtins import functools import importlib from contextlib import contextmanager from xonsh.proc import QueueReader, NonBlockingFDReader from umdone.sound import Audio AUDIO_PIPELINE_STASH = {} de...
from django.db import models from django.urls import reverse # add options if needed CATEGORY_OPTIONS = [('io', 'I/O'), ('intro', 'Introduction')] LEVEL_OPTIONS = [(1, 'Beginner'), (2, 'Intermediate'), (3, 'Expert')] LANGUAGE = [('de', 'german'), ('en', 'english'), ('fr', 'french')] LICENSE = [('none', 'No'), ('cc0', ...
""" The U.S. Standard Atmosphere 1976 is an idealized, steady-state model of mean annual conditions of Earth's atmosphere from the surface to 1000 km at latitude 45N, as it is assumed to exist during a period with moderate solar activity. The defining meteorological elements are sea-level temperature and pressure, and ...
import os from sqlalchemy import create_engine, event from sqlalchemy.engine import Engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker # Sets connection string snorkel_conn_string = os.environ['SNORKELDB'] if 'SNORKELDB' in os.environ and os.environ['SNORKELDB'] != '...
"""Support for esphome devices.""" from __future__ import annotations from dataclasses import dataclass, field import functools import logging import math from typing import Any, Callable, Generic, NamedTuple, TypeVar, cast, overload from aioesphomeapi import ( APIClient, APIConnectionError, APIIntEnum, ...
from unittest import TestCase from gsdmm.mgp import MovieGroupProcess import numpy class TestGSDMM(TestCase): '''This class tests the Panel data structures needed to support the RSK model''' def setUp(self): numpy.random.seed(47) def tearDown(self): numpy.random.seed(None) def comput...
#!/usr/bin/env python3 # vim: tw=80 ts=4 sts=4 sw=4 smarttab noet # Coerce Py2k to act more like Py3k # https://pypi.python.org/pypi/future from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (bytes, dict, int, list, object, range, str, ascii, chr, hex, input, ...
# seleniumbase package __version__ = "1.51.14"
import random import re from django.contrib.auth.models import User from django.db import models from instances.models import InstanceMixin NUMBER_OF_TOKEN_WORDS = 3 def generate_token(): def useful_word(w): # FIXME: should try to exclude offensive words if len(w) < 4: return False ...
import pytest from encoded.types.file import File, FileFastq, FileFasta, post_upload, force_beanstalk_env from pyramid.httpexceptions import HTTPForbidden import os pytestmark = pytest.mark.working def test_reference_file_by_md5(testapp, file): res = testapp.get('/md5:{md5sum}'.format(**file)).follow(status=200) ...
#!/usr/bin/env python3 URL_BASE = "../blob/master" lines = [] start = "" with open("junk.txt") as in_file: for line in in_file: if len(line.strip()) > 1: if line.startswith("./"): filepath, _, _, _, undefined_name = line.split() undefined_name = undefined_name.re...
import time import click import logging from functools import wraps from requests import HTTPError from requests.packages.urllib3.exceptions import ReadTimeoutError from requests.exceptions import ChunkedEncodingError, ReadTimeout, ContentDecodingError import datetime from tqdm.auto import tqdm log = logging.getLogge...
"""Definition and setup of the Omnilogic Sensors for Home Assistant.""" import logging from homeassistant.components.sensor import DEVICE_CLASS_TEMPERATURE from homeassistant.const import ( CONCENTRATION_PARTS_PER_MILLION, MASS_GRAMS, PERCENTAGE, TEMP_CELSIUS, TEMP_FAHRENHEIT, VOLUME_LITERS, )...
import glob import io import os import sys from pathlib import Path import pytest import numpy as np import torch from PIL import Image, __version__ as PILLOW_VERSION import torchvision.transforms.functional as F from common_utils import get_tmp_dir, needs_cuda from _assert_utils import assert_equal from torchvision....
""" :copyright: (c) 2012 by Satoru SATOH <ssato@redhat.com> :license: BSD-3 """ import jinja2_cui.utils as U import codecs import glob import locale import logging import os.path import sys # Data loaders: Key=file_extension, Value=load_func _LOADERS = {} _ENCODING = locale.getdefaultlocale()[1] or "utf-8" sys.st...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)` salt.utils.vt ~~~~~~~~~~~~~ Virtual Terminal This code has been heavily inspired by Python's subprocess code, the `non blocking version of it`__, some minor online snippets about TTY handling with python...
# seleniumbase package __version__ = "4.8.4"
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets import json import logging from math import inf import ssl from threading import Thread from time import sleep import requests from req...
#!/usr/bin/env python ### # Copyright (c) 2002, Jeremiah Fincher # 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 notice, # ...
__version__ = '1.1.1'
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets from __future__ import absolute_import, print_function import logging import requests from requests.exceptions import Timeout from thre...
import os import re from cloudvolume import paths from cloudvolume.paths import strict_extract, extract, ExtractedPath from cloudvolume.exceptions import UnsupportedProtocolError from cloudvolume import lib def test_path_extraction(): extract = paths.extract(r'file://C:\wow\this\is\a\cool\path', windows=True, disa...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from ast import literal_eval import babel from dateutil.relativedelta import relativedelta import itertools import json from odoo import http, fields, _ from odoo.http import request from odoo.tools import float_round f...
# -*- coding: utf-8 -*- import datetime import json import logging import random import re import sys import time from geopy.geocoders import GoogleV3 from pgoapi import PGoApi from pgoapi.utilities import f2i import logger from cell_workers import PokemonCatchWorker, SeenFortWorker, MoveToFortWorker, InitialTransfe...
import json import uuid from libs.json_utils import dumps, loads from polyaxon.settings import RedisPools, redis class BaseRedisDb(object): REDIS_POOL = None @classmethod def _get_redis(cls): return redis.Redis(connection_pool=cls.REDIS_POOL) class RedisJobContainers(BaseRedisDb): """Track...
import argparse import contextlib import grp import hashlib import logging import io import os import os.path import platform import pwd import re import signal import socket import stat import sys import textwrap import threading import time import unicodedata import uuid from binascii import hexlify from collections ...
#!/bin/python3 def string_parser(string): str_list = [] if string[0] == '"': i = 1 s = '' while string[i] is not '"': s = s + string[i] i = i + 1 str_list.append(s) str_list.append(string[i+1:]) return str_list def jparser(string): va...
import string from sys import stdin from functools import wraps from collections import namedtuple Token = namedtuple('Token', 'type info text') class LexError(Exception): pass class LexerBug(LexError): pass class AbstractLexer(object): """ A lexer keeps the state of lex parsing. This is t...
import os import subprocess as sp import pytest import yaml import tempfile import requests import uuid import contextlib from bioconda_utils import utils from bioconda_utils import pkg_test from bioconda_utils import docker_utils from bioconda_utils import cli from bioconda_utils import build from bioconda_utils impor...
import os import sys import subprocess as sp import pytest import yaml import tempfile import requests import uuid import contextlib import tarfile import logging import shutil from textwrap import dedent from conda_build import metadata from bioconda_utils import utils from bioconda_utils import pkg_test from biocon...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import Counter import logging import unittest import numpy as np from numpy.testing import assert_allclose from torchtext import vocab from .common.test_markers import slow logging.basicConfig(format="%(asctime)s - %(levelname)s " ...
# # import sys import unittest import tempfile import os import errno import xattr from xattr import NS_USER, XATTR_CREATE, XATTR_REPLACE NAMESPACE = os.environ.get("NAMESPACE", NS_USER) if sys.hexversion >= 0x03000000: PY3K = True EMPTY_NS = bytes() else: PY3K = False EMPTY_NS = '' TEST_DIR = os.e...
from dreaml.dataframe.dataframe import DataFrame import dreaml import numpy as np import json class TestDataFrameInternal: def setUp(self): self.item_count = 8 assert self.item_count >= 4 def test_tuple_to_query(self): df = DataFrame() # Test conversion of hashable elements to ...
import sys import unittest try: from unittest.mock import MagicMock except ImportError: import mock from mock import MagicMock import botocore from botocore.exceptions import ClientError ############## # Parameters # ############## # Define the default resource to report to Config Rules DEFAULT_RESOURCE_T...
# # __COPYRIGHT__ # # 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, merge, publish, # distribute, sublicen...
""" <Program Name> secondary.py <Purpose> Provides core functionality for Uptane Secondary ECU clients: - Given an archive of metadata and an image file, performs full verification of both, employing TUF (The Update Framework), determining if this Secondary ECU has been instructed to install the image by...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function import logging # import weakref # FIXME: there should be weakrefs in this module import psd_tools.reader import psd_tools.decoder from psd_tools.constants import TaggedBlock, SectionDivider, ImageResourceID fr...
""" Uqbar Sphinx inheritance graph extension. Install by adding ``'uqbar.sphinx.inheritance'`` to the ``extensions`` list in your Sphinx configuration. Invoke by adding the following directive to your ReST source: :: .. inheritance-graph:: some.python.path This will generate Graphviz output mediated by a :py:c...
import os import asyncio from distutils.version import LooseVersion from pyshark.capture.capture import Capture from pyshark.tshark.tshark import get_tshark_interfaces, get_process_path import sys # Define basestring as str if we're in python3. if sys.version_info >= (3, 0): basestring = str class LiveCapture(...
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" from __future__ import absolute_import from . import features from . import solvers from . import sat from . import pb
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END """FogLAMP Sensor Readings Ingest API""" import asyncio import datetime import logging import time import uuid from typing import List, Union import asyncpg import dateutil.parser import json from foglamp import logger from...
''' Created on Apr 29, 2010 @author: jnaous ''' from django import forms from models import OpenFlowAggregate, OpenFlowSliceInfo, OpenFlowConnection from openflow.plugin.models import OpenFlowInterface, NonOpenFlowConnection from expedient.common.utils import create_or_update from django.forms.models import ModelChoi...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 # encoding=utf-8 # -------------------------------------------------------------------- # # PATH CONFIGURATION # # -------------------------------------------------------------------- # import sys, os filedir = os.p...
# urllib3/contrib/ntlmpool.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://co...
# Copyright (c) 2009-2014, Christian Haintz # 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 # notice, this list of ...
#!/usr/bin/env python import re import sys import utils import getpass import argparse import xlsxwriter import numpy as np from scipy import stats from toil.job import Job from ddb import configuration from ddb_ngsflow import pipeline from variantstore import Variant from collections import defaultdict from variant...
import inspect import re from copy import deepcopy from csv import DictReader from datetime import datetime, timedelta from decimal import Decimal from functools import wraps from gzip import GzipFile from HTMLParser import HTMLParser from logging import getLogger from StringIO import StringIO import requests from b...
{ 'variables': { 'depth': '..', }, 'includes': [ '../build/common.gypi', ], 'target_defaults': { 'include_dirs': [ '..', ], }, 'targets': [ { 'target_name': 'base', 'type': 'static_library', 'dependencies': [ '../third_party/icu38/icu38.gyp:icui18n', ...
#### # This script demonstrates how to log in to Tableau Server Client. # # To run the script, you must have installed Python 3.5 or later. #### import argparse import getpass import logging import tableauserverclient as TSC def main(): parser = argparse.ArgumentParser(description='Logs in to the server.') ...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import RedirectView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^bot/', include('bot.urls')), url(r'^api/v1/', include('config.urls_api', namespace='api')), url(r'^', include('config.urls_we...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2011 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
import Queue from elixir import Field, Unicode, Entity from astral.models.base import BaseEntityMixin import logging log = logging.getLogger(__name__) EVENT_QUEUE = Queue.Queue() class Event(BaseEntityMixin, Entity): message = Field(Unicode(96)) def __init__(self, *args, **kwargs): kwargs['messag...
# ---------------------------------------------------------# # astroNN.datasets.h5: compile h5 files for NN # ---------------------------------------------------------# import os import time from functools import reduce import h5py import numpy as np from astropy.io import fits import astroNN.apogee.downloader fro...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''checkplot.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jan 2017 License: MIT. Contains functions to make checkplots: quick views for determining periodic variability for light curves and sanity-checking results from period-finding functions (e.g., from periodbase)...
""" WSGI Application This application listens for a form. When a form is submitted, this application takes the information submitted, formats it into a python dictionary, then emails it to a specified email """ import os import smtplib import werkzeug import urllib import hashlib from werkzeug.wrappers import Request...
""" Rendering weather data in the Prometheus format. """ EXPORTED_FIELDS = { "FeelsLikeC":("Feels Like Temperature in Celsius", "temperature_feels_like_celsius"), "FeelsLikeF":("Feels Like Temperature in Fahrenheit", "temperature_feels_like_fahrenheit"), "cloudcover":("Cloud Coverage in Percent", "cloudc...
#!/usr/bin/env python '''checkplot.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jan 2017 License: MIT. Contains functions to make checkplots: quick views for determining periodic variability for light curves and sanity-checking results from period-finding functions (e.g., from periodbase). The checkplot_png fun...
import os import urlparse import smtplib import werkzeug import urllib import re from werkzeug.wrappers import Request, Response from werkzeug.routing import Map, Rule from werkzeug.exceptions import HTTPException from werkzeug.wsgi import SharedDataMiddleware from jinja2 import Environment, FileSystemLoader from email...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. ui.py: Provides the main user functions for reading and writing tables. :Copyright: Smithsonian Astrophysical Observatory (2010) :Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu) """ from __future__ ...
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # 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...
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import urllib import zlib from Cookie import SimpleCookie from urlparse import urlparse, urlunparse, urljoin, urlsplit from datetime import datetime from .auth import dispatch as auth_dispa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains simple statistical algorithms that are straightforwardly implemented as a single python function (or family of functions). This module should generally not be used directly. Everything in `__all__` is imported into `astropy.stats...
import sys from copy import deepcopy import numpy as np import collections from astropy.utils import OrderedDict from .structhelper import _drop_fields try: unicode except NameError: unicode = basestring = str AUTO_COLNAME = 'col{0}' def _auto_names(n_cols): return [AUTO_COLNAME.format(i) for i in rang...
import logging; logger = logging.getLogger("robot." + __name__) import random from robots.lowlevel import * from robots.exception import RobotError from robots.action import * from robots.helpers import trajectory import os @tested("04/10/2012") @action @workswith(ROS) def enabledevileye(robot): os.system("rosru...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from .index import TableIndices, TableLoc, TableILoc, TableLocIndices import sys from collections import OrderedDict from collections.abc import Mapping import warnings from copy import deepcopy import numpy as np from numpy import ma from astropy impo...
from functools import reduce from operator import add from fca.context import Context ## Search result -> context def getContextFromSR(searchResult, index): documents = searchResult['documents'] keywords = [x['keywords'] for x in documents] keywords = [[y[0] for y in x] for x in keywords] keywords = list(set(sear...
"""Test cases that are in common among wemo platform modules. This is not a test module. These test methods are used by the platform test modules. """ import asyncio import threading from homeassistant.components.homeassistant import DOMAIN as HA_DOMAIN from homeassistant.components.wemo import wemo_device from homea...
import time import requests import webbrowser import keyring import getpass import lxml.html as html from cStringIO import StringIO from astropy.table import Table from astropy.io import ascii from ..query import QueryWithLogin from . import ROW_LIMIT class EsoClass(QueryWithLogin): ROW_LIMIT = ROW_LIMIT() ...
import pytest from core.run_workflow import service from ..conftest import valid_env import mock @pytest.fixture def run_workflow_input(): return { "app_name": "hi-c-processing-bam", "parameters": { "nthreads_merge": 16, "nthreads_parse_sort": 16 ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import time import sys import os.path import webbrowser import getpass import warnings import keyring import numpy as np from bs4 import BeautifulSoup from astropy.extern.six import BytesIO from astropy.extern import ...
#!/usr/bin/env python # A script for creating an application in spinnaker. # Simply looks to see if the application already exists, if not, creates import argparse import configparser import json import logging import os import sys import gogoutils from jinja2 import Environment, FileSystemLoader import requests c...
import pickle import unittest from unittest import mock import pytest import cupy from cupy.cuda import compiler from cupy import testing def cuda_version(): return cupy.cuda.runtime.runtimeGetVersion() @unittest.skipIf(cupy.cuda.runtime.is_hip, 'CUDA specific tests') class TestNvrtcArch(unittest.TestCase): ...
# Copyright (c) 2013-2015 by Ron Frederick <ronf@timeheart.net>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
import unittest import mock import six import cupy from cupy.cuda import compiler from cupy import testing def cuda_version(): return cupy.cuda.runtime.runtimeGetVersion() @testing.gpu class TestNvrtcArch(unittest.TestCase): def _check_get_arch(self, device_cc, expected_arch): with mock.patch('cu...
# -*- coding: utf-8 -*- """ Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
from pony.py23compat import iteritems import json from datetime import date, datetime from decimal import Decimal from collections import defaultdict from pony.orm.core import Entity, TransactionError from pony.utils import cut_traceback, throw class Bag(object): def __init__(bag, database): bag.database...
"""The app that runs as the executor, invoked by mesos (thanks to the task info sent from the portainer scheduler) as "pid one" of the task. Responsible for invoking the docker daemon, then running `docker build` for the task's staged context file, and communicating with mesos throughout""" import docker import functo...
# -*- coding: utf-8 -*- """Entities, the base of all complex MUD objects.""" # Part of Atria MUD Server (https://github.com/whutch/atria) # :copyright: (c) 2008 - 2015 Will Hutcheson # :license: MIT (https://github.com/whutch/atria/blob/master/LICENSE.txt) from copy import deepcopy from weakref import WeakValueDiction...