gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#
# Copyright John Reid 2006
#
import numpy, numpy.random
from _maths import *
def reverse_complement( s ):
result = numpy.zeros_like( s )
for i in xrange( len( s ) ):
result[ len(s) - i - 1 ] = 3 - s[i]
return result
class GappedPssm( object ):
def __init__(
self,
phi... | |
from common_fixtures import * # NOQA
def test_host_deactivate(super_client, new_context):
host = new_context.host
agent = super_client.reload(host).agent()
assert host.state == 'active'
agent = super_client.wait_success(agent)
assert agent.state == 'active'
host = super_client.wait_success(... | |
"""
Wrap the internal caffe C++ module (_caffe.so) with a clean, Pythonic
interface.
"""
from collections import OrderedDict
from itertools import izip_longest
import numpy as np
from ._caffe import Net, SGDSolver
import caffe.io
# We directly update methods from Net here (rather than using composition or
# inherita... | |
# Copyright (c) 2013 Mirantis Inc.
# Copyright (c) 2013 Hortonworks, 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... | |
"""
S. Van Hoey
2016-06-06
"""
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
from skimage.feature import canny
from skimage.segmentation import clear_border
from skimage.morphology import dilation, rectangle
from skimage.measure import re... | |
from xscontainer import util
from xscontainer.util import log
import os
import tempfile
import threading
import XenAPI
XSCONTAINER_PRIVATE_SECRET_UUID = 'xscontainer-private-secret-uuid'
XSCONTAINER_PUBLIC_SECRET_UUID = 'xscontainer-public-secret-uuid'
XSCONTAINER_SSH_HOSTKEY = 'xscontainer-sshhostkey'
XSCONTAINER_US... | |
from bottle import request, response
from six.moves.urllib.parse import quote
import os
import datetime
from webrecorder.basecontroller import BaseController, wr_api_spec
from webrecorder.webreccork import ValidationException
from webrecorder.models.base import DupeNameException
from webrecorder.models.datshare impor... | |
import operator
import re
import warnings
import numpy as np
import pytest
from pandas._libs.sparse import IntIndex
import pandas.util._test_decorators as td
import pandas as pd
from pandas import isna
from pandas.core.sparse.api import SparseArray, SparseDtype, SparseSeries
import pandas.util.testing as tm
from pan... | |
r"""
=====================================================================
The Johnson-Lindenstrauss bound for embedding with random projections
=====================================================================
The `Johnson-Lindenstrauss lemma`_ states that any high dimensional
dataset can be randomly projected i... | |
from datetime import time
from decimal import Decimal
import numpy as np
import pandas as pd
import pytest
from multipledispatch.conflict import ambiguities
from pandas.api.types import CategoricalDtype, DatetimeTZDtype
import ibis
import ibis.expr.datatypes as dt
import ibis.expr.schema as sch
def test_no_infer_am... | |
#!/usr/bin/env python
"""
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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 ... | |
"""Release data for NetworkX.
When NetworkX is imported a number of steps are followed to determine
the version information.
1) If the release is not a development release (dev=False), then version
information is read from version.py, a file containing statically
defined version information. This file... | |
# Copyright (C) 2010 Google Inc. 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 conditions and the ... | |
"""Azure Image Creation, Management, Testing"""
import json
import re
import sys
import urllib
from copy import deepcopy
import pkg_resources
import yaml
import gen
import gen.build_deploy.util as util
import gen.template
import pkgpanda.build
from gen.internals import Late, Source
from pkgpanda.util import split_by... | |
#!/usr/bin/env python3
#
# Copyright (c) 2019 Roberto Riggio
#
# 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 applicabl... | |
# Copyright 2014-2016 OpenMarket Ltd
#
# 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 w... | |
import math
from functools import reduce
import numpy as np
import operator
from llvmlite import ir
from llvmlite.llvmpy.core import Type, Constant
import llvmlite.llvmpy.core as lc
from numba.core.imputils import lower_builtin, lower_getattr, lower_getattr_generic, lower_cast, lower_constant, iternext_impl, call_ge... | |
"""
Performance test for asset metadata in the modulestore.
"""
from path import Path as path
import unittest
from tempfile import mkdtemp
import itertools
from shutil import rmtree
from bson.code import Code
import datetime
import ddt
#from nose.plugins.attrib import attr
from nose.plugins.skip import SkipTest
from x... | |
'''File adapted from Keras'''
'''This script demonstrates how to build a variational autoencoder with Keras.
Reference: "Auto-Encoding Variational Bayes" https://arxiv.org/abs/1312.6114
'''
import numpy as np
import os
import matplotlib.pyplot as plt
from keras.layers import Input, Dense, Lambda
from keras.models imp... | |
"""
SAX-based adapter to copy trees from/to the Python standard library.
Use the `ElementTreeContentHandler` class to build an ElementTree from
SAX events.
Use the `ElementTreeProducer` class or the `saxify()` function to fire
the SAX events of an ElementTree against a SAX ContentHandler.
See http://codespeak.net/lx... | |
# -*- coding: utf-8 -*-
# Copyright 2012-2017 Luc Saffre
# License: BSD (see file COPYING for details)
"""Some diagnostic utilities."""
from __future__ import unicode_literals
from builtins import str
from builtins import object
import six
# from textwrap import fill
from atelier import rstgen
from atelier.utils impo... | |
import unittest
import tethys_apps.base.workspace as base_workspace
import os
import shutil
from unittest import mock
from ... import UserFactory
from django.http import HttpRequest
from django.contrib.auth.models import User
from django.core.exceptions import PermissionDenied
import tethys_apps.base.app_base as tethys... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""Test desitarget.brightmask.
"""
import unittest
from pkg_resources import resource_filename
import os
import fitsio
import numpy as np
import numpy.lib.recfunctions as rfn
from glob import glob
import healpy as hp
import tempfile... | |
import os
import logging
from django.conf import settings
from django.contrib.gis.db import models
from django.db.models.query_utils import Q
from django.utils.translation import gettext_lazy as _
from django.utils.formats import date_format
from colorfield.fields import ColorField
from easy_thumbnails.alias import a... | |
#!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import argparse
import ConfigParser
#from ginkgo import Service
#from fabric.api import env
#from fabric.api import run
#from fabric.context_managers import settings
import eventlet
import os
import sys
# eventlet.monkey_patch(thr... | |
from django.test import TestCase
from django.template import Template, Context, TemplateSyntaxError
from django.contrib.auth.models import AnonymousUser
from mock import patch
from waliki.models import ACLRule
from waliki.acl import check_perms
from .factories import UserFactory, GroupFactory, ACLRuleFactory
class Te... | |
# Copyright 2014 Cloudera 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 writing... | |
"""Built-in template filters used with the ``|`` operator."""
import math
import random
import re
from collections import abc
from collections import namedtuple
from itertools import chain
from itertools import groupby
from markupsafe import escape
from markupsafe import Markup
from markupsafe import soft_str
from .e... | |
"""Tests for transfer.py."""
import string
import mock
import six
from six.moves import http_client
import unittest2
from apitools.base.py import base_api
from apitools.base.py import http_wrapper
from apitools.base.py import transfer
class TransferTest(unittest2.TestCase):
def assertRangeAndContentRangeCompat... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page ... | |
import warnings
import six
import sys
import qrcode
import qrcode.util
import qrcode.image.svg
try:
import qrcode.image.pure
import pymaging_png # ensure that PNG support is installed
except ImportError: # pragma: no cover
pymaging_png = None
import qrcode
from qrcode.image.base import BaseImage
from qr... | |
import datetime
import math
import urlparse
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import connection
from django.utils.encoding import smart_str
import jinja2
from jingo import env, register
from tower import ugettext as _
from tower import ugettext_lazy as _lazy
... | |
#
# 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... | |
from unittest import TestCase
import time
import datetime
import os
import glob
from shutil import rmtree
class FunctionalityTest(TestCase):
"""
Test Suite:
----Single File----
1.1. Single file.
1.2. Single file and an empty folder.
1.3. Single file in a folder.
1.4. Single file in a fold... | |
# encoding: 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 model 'ChatRoom'
db.create_table('foundry_chatroom', (
('id', self.gf('django.db.mode... | |
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import logging
from dataclasses import dataclass
from pathlib import Path
from typing import Any, ClassVar, Iterable, List, Optional, Tuple, Type, cast
... | |
import asyncio
import platform
import sys
from datetime import datetime
import discord
from bot import Language, Manager, constants
from bot.lib.guild_configuration import GuildConfiguration
from bot.database import BotDatabase
from bot.lib.configuration import BotConfiguration
from bot.logger import new_logger
from ... | |
def load_multiclass_scores(self):
# convert simple scores to multiclass scores
import vtool_ibeis as vt
self.multiclass_scores = {}
for key in self.samples.simple_scores.keys():
scores = self.samples.simple_scores[key].values
# Hack scores into the range 0 to 1
normer = vt.ScoreN... | |
"""Tests for Monomial, Posynomial, and Signomial classes"""
import math
import unittest
from gpkit import Variable, Monomial, Posynomial, Signomial, SignomialsEnabled
from gpkit import VectorVariable, NomialArray
from gpkit.nomials import NomialMap
from gpkit.small_classes import HashVector
import gpkit
class TestMon... | |
import logging
import warnings
import inspect
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.orm import joinedload, aliased
from sqlalchemy.sql.expression import desc, ColumnElement
from sqlalchemy import Boolean, Table, func, or_
from sqlalchemy.exc import IntegrityError
from sqlalchemy.s... | |
# Copyright 2013 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 law or agreed to in... | |
import math
import logging
from time import time
from collections import deque, namedtuple
# Based on a fork of Arduino PID AutoTune Library
# See https://github.com/t0mpr1c3/Arduino-PID-AutoTune-Library
class PIDAutotune(object):
"""Determines viable parameters for a PID controller.
Args:
setpoint (... | |
#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test... | |
"""
These functions are mostly related to transitioning data from the Zotero app
to the IsisData app.
TODO: many of these functions could use refactoring, or at least modularizing
for easier testing.
"""
from __future__ import unicode_literals
from django.db.models import Q
from isisdata.models import *
from zotero.... | |
import os
import shutil
from biicode.client.exception import ClientException
from biicode.common.utils import file_utils
from biicode.common.find.policy import Policy
from biicode.client.store import hivedb
from biicode.common.utils.file_utils import save, load
from biicode.common.settings.settings import Settings
from... | |
#!/usr/bin/env python
"""Ninja toolchain abstraction for Microsoft compiler suite"""
import os
import subprocess
import toolchain
import vslocate
class MSVCToolchain(toolchain.Toolchain):
def initialize(self, project, archs, configs, includepaths, dependlibs, libpaths, variables, subninja):
#Local variable d... | |
import getpass
import os
import re
import shutil
import signal
import time
import pytest
from unit.applications.lang.php import TestApplicationPHP
from unit.option import option
class TestPHPApplication(TestApplicationPHP):
prerequisites = {'modules': {'php': 'all'}}
def before_disable_functions(self):
... | |
# Copyright 2014 Cisco Systems, 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 requir... | |
import unittest
from nose.tools import *
from sqlalchemy import *
from bson.objectid import ObjectId
from randomdomain.libs.mongodb import mongo_backend
from randomdomain.libs.dates import unix_utc_now
from mailsync.models.sync import Sync
from mailsync.models.adapter import Adapter
from mailsync.api.mailchimp import... | |
#lims
from SBaaS_LIMS.lims_experiment_postgresql_models import *
from SBaaS_LIMS.lims_sample_postgresql_models import *
from .stage01_physiology_data_postgresql_models import *
from SBaaS_base.sbaas_base_query_update import sbaas_base_query_update
from SBaaS_base.sbaas_base_query_drop import sbaas_base_query_drop
fro... | |
#!/usr/bin/env python
from datetime import datetime
from elasticsearch import Elasticsearch
import json
import screepsapi
from settings import getSettings
import six
import time
import os
import services.screeps as screeps_service
import sys
MAXPAGES = 200
es_settings_dir = os.path.join(os.path.dirname(__file__), 'ma... | |
import abc
import time
import typing
import asyncio
import logging
import weakref
import functools
import itertools
from urllib import parse
import furl
import aiohttp
from waterbutler.core import streams
from waterbutler.core import exceptions
from waterbutler.core import path as wb_path
from waterbutler import sett... | |
# Natural Language Toolkit: Sequential Backoff Taggers
#
# Copyright (C) 2001-2008 University of Pennsylvania
# Author: Edward Loper <[email protected]>
# Steven Bird <[email protected]> (minor additions)
# Tiago Tresoldi <[email protected]> (original affix tagger)
# URL: <http://n... | |
from __future__ import print_function
import requests
import sys
import robot_util
import json
import schedule
import platform
import subprocess
import tts.tts as tts
import watchdog
from socketIO_client import SocketIO, LoggingNamespace
if (sys.version_info > (3, 0)):
# import _thread as thread
import urlli... | |
#
# 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 us... | |
"""Device automation helpers for toggle entity."""
from __future__ import annotations
from typing import Any
import voluptuous as vol
from homeassistant.components.automation import (
AutomationActionType,
AutomationTriggerInfo,
)
from homeassistant.components.homeassistant.triggers import state as state_tri... | |
# #!/usr/bin/python
# last edit abigailc@Actaeon on october 24 2016
### usage $ python Concatenate_2.py /Users/abigailc/Documents/Test/ -f "Asco1.fasta Asco2.fasta Asco3.fasta Asco4.fasta" -o AscoCC.fasta
#this program will open n aligned files, and concatenate them.
#sequences must either have exactly identicle ti... | |
"""Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function imported from ... | |
from __future__ import unicode_literals
from datetime import timedelta
from django.core.exceptions import ValidationError
from django.test import TransactionTestCase
from django.utils import timezone
from chamber.exceptions import PersistenceException
from chamber.models import ChangedFields, Comparator
from german... | |
# 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... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os, sys, math, glob
total = {}
ccxx = {}
def reporttotals(n):
print 'GREPABILITY1, ',n,
for x in ('void','nearly void','perfect','nearly perfect','nearly exclusive','probable','inclusion','embracing','block','probable block','max','none'):
if x in total.keys():
... | |
# -*- coding:utf-8 -*-
import ast
import sys
from high_entropy_string import PythonStringData
import bandit
from bandit.core import test_properties as test
def gen_config(name):
"""
Default configuration for available configuration options.
"""
if name == 'patterns_to_ignore' or name == 'entropy_pa... | |
# 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... | |
"""
>>> from blaze import *
>>> accounts = symbol('accounts', 'var * {name: string, amount: int}')
>>> deadbeats = accounts[accounts['amount'] < 0]['name']
>>> from sqlalchemy import Table, Column, MetaData, Integer, String
>>> t = Table('accounts', MetaData(),
... Column('name', String, primary_key = True... | |
"""
This module contains a set of similarity measures that was designed for use
within the Lucas-Kanade framework. They therefore expose a number of methods
that make them useful for inverse compositional and forward additive
Lucas-Kanade.
These similarity measures are designed to be dimension independent where
possib... | |
# Copyright (c) 2018 PaddlePaddle 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 appli... | |
"""A POP3 client class.
Based on the J. Myers POP3 draft, Jan. 96
"""
# Author: David Ascher <[email protected]>
# [heavily stealing from nntplib.py]
# Updated: Piers Lauder <[email protected]> [Jul '97]
# String method conversion and test jig improvements by ESR, February 2001.
# Added the POP3_SSL clas... | |
#!/home/jhjguxin/blogserver/bin/python
"""PILdriver, an image-processing calculator using PIL.
An instance of class PILDriver is essentially a software stack machine
(Polish-notation interpreter) for sequencing PIL image
transformations. The state of the instance is the interpreter stack.
The only method one will no... | |
#
# 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, software
# ... | |
from pymongo import MongoClient, ReadPreference, uri_parser
import six
from mongoengine.python_support import IS_PYMONGO_3
__all__ = ['MongoEngineConnectionError', 'connect', 'register_connection',
'DEFAULT_CONNECTION_NAME']
DEFAULT_CONNECTION_NAME = 'default'
if IS_PYMONGO_3:
READ_PREFERENCE = Read... | |
# Module 'os2emxpath' -- common operations on OS/2 pathnames
"""Common pathname manipulations, OS/2 EMX version.
Instead of importing this module directly, import os and refer to this
module as os.path.
"""
import os
import stat
__all__ = ["normcase","isabs","join","splitdrive","split","splitext",
"basena... | |
from __future__ import absolute_import
from collections import OrderedDict
from modelcluster.models import get_all_child_relations
from taggit.managers import _TaggableManager
from django.db import models
from django.utils.encoding import force_text
from django.shortcuts import get_object_or_404
from django.conf.url... | |
"""
Return/control aspects of the grains data
Grains set or altered with this module are stored in the 'grains'
file on the minions. By default, this file is located at: ``/etc/salt/grains``
.. Note::
This does **NOT** override any grains set in the minion config file.
"""
import collections
import logging
impo... | |
"""
Static site generator.
Copyright (c) 2009 Liam Cooke
Licensed under the terms of the MIT license.
"""
import codecs
import locale
import os
import re
import shutil
import sys
import time
from collections import defaultdict
from datetime import datetime
from itertools import izip
from os import path
import dateut... | |
from tqdm import tqdm
class Core(object):
"""
Implements the functions to run a generic algorithm.
"""
def __init__(self, agent, mdp, callbacks_fit=None, callback_step=None,
preprocessors=None):
"""
Constructor.
Args:
agent (Agent): the agent movi... | |
# Copyright 2012 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 requ... | |
import nose
from decorator import decorator
import claripy
from test_backend_smt import TestSMTLibBackend
# use of decorator instead of the usual pattern is important because nose2 will check the argspec and wraps does not
# preserve that!
@decorator
def if_installed(f, *args, **kwargs):
try:
return f(*ar... | |
# Copyright 2020 Tom Caruso & individual contributors
#
# 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 applicabl... | |
from __future__ import unicode_literals
from .abc import ABCIE
from .abc7news import Abc7NewsIE
from .academicearth import AcademicEarthCourseIE
from .addanime import AddAnimeIE
from .adobetv import (
AdobeTVIE,
AdobeTVVideoIE,
)
from .adultswim import AdultSwimIE
from .aftenposten import AftenpostenIE
from .a... | |
#!/usr/bin/env python
"""
Name : qconcurrency.widgets._dictmodelqcombobox_.py
Created : Apr 16, 2017
Author : Will Pittman
Contact : [email protected]
________________________________________________________________________________
Description : A QComboBox designed to work with a `Di... | |
# ~~ Email:Notifications~~
from flask import url_for
import json
from portality import models, app_email, constants
from portality.core import app
from portality.dao import Facetview2
from portality.ui.messages import Messages
from portality.lib import dates
def send_admin_ready_email(application, editor_id):
"""... | |
# coding: utf-8
# flake8: noqa
"""
MINDBODY Public API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolu... | |
import os
import uuid
from osipkd.tools import row2dict, xls_reader
from datetime import datetime
from sqlalchemy import not_, func
from pyramid.view import (
view_config,
)
from pyramid.httpexceptions import (
HTTPFound,
)
import colander
from deform import (
Form,
widget,
ValidationFailure... | |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from indra.preassembler.sitemapper import default_mapper as sm, MappedStatement
from indra.statements import *
from indra.util import unicode_strs
def test_check_agent_mod():
mapk1_valid = Agent('MAPK1',
... | |
# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import logging
import os
from . import nxprocess
from ..visualization import scene
from ..visualization import scene_view
from ..visualization import defaultsettings
from ..utils import instance
from ..utils import units
fr... | |
# Copyright 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 req... | |
#
# Copyright (c) SAS Institute 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 w... | |
# Copyright 2015 OpenStack LLC.
# 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 b... | |
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | |
"""Listens to Treadmill cleanup events.
When a treadmill app needs to be cleaned up then there will exist a symlink
to the app in the cleanup directory. A cleanup app will be created to do
the cleanup work necessary:
<treadmillroot>/
cleanup/
<instance>
cleaning/
<instance>... | |
import requests, json, datetime, string, pytz
from django.conf import settings
from broLogTypes import broLogs
import logging
logger = logging.getLogger('elasticsearch_requests')
def getIndices():
"""Get a list of all bro indices
"""
result = Request(index="@bro-meta")._doRequest({"size": 65535})
ind... | |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI... | |
from __future__ import unicode_literals
import re
from datetime import date, datetime
from decimal import Decimal
from django import template
from django.conf import settings
from django.template import defaultfilters
from django.utils.encoding import force_text
from django.utils.formats import number_format
from djan... | |
# Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: [email protected]
# Maintained By: [email protected]
"""gGRC Collection REST services implementation. Common to all gGRC collectio... | |
# Copyright 2017 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 2013 IBM Corp.
# Copyright 2013 Red Hat, 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 r... | |
#!/usr/bin/env python2.7
# Copyright 2015 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 la... | |
import theano.tensor as T
from .. import init
from .. import nonlinearities
from ..utils import as_tuple
from ..theano_extensions import conv
from .base import Layer
__all__ = [
"Conv1DLayer",
"Conv2DLayer",
]
def conv_output_length(input_length, filter_size,
stride, border_mode, pa... | |
# -*- coding: utf-8 -*-
"""Persistence layer for the google drive addon.
"""
import os
from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings,
BaseStorageAddon)
from django.db import models
from framework.auth import Auth
from framework.exceptions import HTTPError
... | |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
from six.moves import xrange
from nose.tools import assert_equal, assert_true
from matplotlib.testing.decorators import image_comparison, cleanup
from matplotlib.axes import Axes
import matplotlib.p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.