gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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
# d... | |
# python libs
import copy
# rasmus libs
from rasmus import stats
from rasmus import util
# rasmus bio libs
from compbio import fasta
from compbio import regionlib
import compbio.regionlib
from compbio.regionlib import iter_chrom
# graphics libs
from summon.core import *
from summon import shapes
import summon
# g... | |
import pytest
from selenium.common.exceptions import UnexpectedAlertPresentException
from nerodia.exception import UnknownObjectException
@pytest.fixture
def cleanup_hooks(browser):
yield
browser.window(index=0).use()
browser.after_hooks.after_hooks = []
@pytest.fixture
def clear_alert(browser):
yi... | |
# Copyright 2016 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... | |
from datetime import datetime
import protocol
from threading import Event
from lifx.color import modify_color
import color
DEFAULT_DURATION = 200
DEFAULT_TIMEOUT = 5
class Device(object):
def __init__(self, device_id, host, client):
# Our Device
self._device_id = device_id
self._host = hos... | |
# Copyright 2014-2016 Morgan Delahaye-Prat. All Rights Reserved.
#
# Licensed under the Simplified BSD License (the "License");
# you may not use this file except in compliance with the License.
"""Implements a RESTful provider for CRUD operations."""
import asyncio
from collections import defaultdict
from hypr.glob... | |
#!/usr/bin/env python2
#
# Epour - A bittorrent client using EFL and libtorrent
#
# Copyright 2012-2013 Kai Huuhko <kai.huuhko@gmail.com>
#
# 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; e... | |
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# 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... | |
# The 'grammar' of quex's regular expressions:
#
# complete expression: expression
# expression / expression = post conditioned expression
# expression / expression / = pre conditioned expression
# expression / expression /... | |
"""
This is an implementation of the Linear Fascicle Evaluation (LiFE) algorithm
described in:
Pestilli, F., Yeatman, J, Rokem, A. Kay, K. and Wandell B.A. (2014). Validation
and statistical inference in living connectomes. Nature Methods 11:
1058-1063. doi:10.1038/nmeth.3098
"""
import numpy as np
import scipy.sparse... | |
#!/usr/bin/env python
# Copyright (c) 2013 Intel Corporation. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Make webapps for both android and tizen
Sample usage from shell script:
Build all apps for both Tizen and Android
python mak... | |
import os
def get_date_based_deletable_inventory(keep_after, logger, target=None, folders=None, files=None, links=None, trigger=None):
"""
Finds all of the items within an inventory that can be deleted based on
their last modification date.
:param keep_after: a unix timestamp; any files or directorie... | |
"""Tests for deCONZ config flow."""
from unittest.mock import Mock, patch
import asyncio
from homeassistant.components.deconz import config_flow
from homeassistant.components.ssdp import ATTR_MANUFACTURERURL, ATTR_SERIAL
from tests.common import MockConfigEntry
import pydeconz
async def test_flow_works(hass, aiocl... | |
"""
Tests for the mhlib module
Nick Mathewson
"""
### BUG: This suite doesn't currently test the mime functionality of
### mhlib. It should.
import unittest
from test.test_support import run_unittest, TESTFN, TestSkipped, import_module
import os, StringIO
import sys
mhlib = import_module('mhlib', deprecat... | |
# encoding: utf-8
import logging
import inspect
import re
from copy import copy
from django.conf.urls.defaults import patterns, url
from django.http import HttpResponse, HttpResponseRedirect
from django.core.exceptions import ObjectDoesNotExist
from django.core.urlresolvers import reverse, NoReverseMatch
from surle... | |
# Copyright (c) 2017 Huawei Technologies India Pvt.Limited.
# 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-... | |
"""
Image handling for PySide with fast color transformation and sampling, intended
for use in a Nuke style image viewer.
"""
import traceback
from PySide.QtGui import *
import cv2
import Imath
import OpenEXR as exr
import numpy as np
# Ignore floating-point errors
np.seterr(all='ignore')
class LUT(object):
"... | |
# Copyright 2016 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... | |
#
# 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
# distributed under ... | |
# coding=utf-8
# Copyright 2020 The TF-Agents 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
######################## gentex package ###########################
""" The gentex or general texture analysis package provides a suite
of routines that combine standard texture analysis methods and
entropy/statistical complexity analysis methods to provide a number
of the standard algorithms required for ... | |
from pymongo import MongoClient
import multiprocessing
import threading
import datetime
import time
cache = MongoClient(host='10.8.8.111', port=27017, connect=False)['cache25']
db30 = MongoClient(host='10.8.8.111', port=27017, connect=False)['onionsBackupOnline']
events = db30['events']
userAttr = cache['userAttr']
d... | |
# Copyright 2017 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.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import datetime
import json
import unittest
fr... | |
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
aztec_code_generator
~~~~~~~~~~~~~~~~~~~~
Aztec code generator.
:copyright: (c) 2016-2018 by Dmitry Alimov.
:license: The MIT License (MIT), see LICENSE for more details.
"""
import math
import numbers
import sys
try:
from PIL import Image, Im... | |
from selenium import webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
import time
import datetime
import csv
import random
import sys
import urllib2
#---------------------------------------------------... | |
# -*- coding: utf-8 -*-
"""
sphinx.config
~~~~~~~~~~~~~
Build configuration file handling.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from os import path, environ
import shlex
from six import PY2, PY3, iteritems, string_... | |
from __future__ import absolute_import
# Copyright (c) 2010-2016 openpyxl
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors import (
Alias,
Bool,
Integer,
Set,
NoneSet,
Typed,
MinMax,
Sequence,
)
from openpyxl.descriptors.excel import Relation
from op... | |
from __future__ import unicode_literals
import os
from django.core.cache import cache
from reviewboard.scmtools.core import HEAD
from reviewboard.scmtools.models import Repository, Tool
from reviewboard.scmtools.signals import (checked_file_exists,
checking_file_exists,
... | |
import unittest
from MuseParse.classes.ObjectHierarchy.TreeClasses.PieceTree import PieceTree
from MuseParse.classes.ObjectHierarchy.ItemClasses import Piece, Note, Part
from MuseParse.classes.Input import MxmlParser
class notes(unittest.TestCase):
def setUp(self):
self.tags = ["note"]
self.char... | |
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
import os
import re
# 3p
try:
import psutil
except ImportError:
psutil = None
# project
from checks import AgentCheck
from config import _is_affirmative
from util import Platform
from utils.subp... | |
# Copyright 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 json
from extensions_paths import CHROME_EXTENSIONS
from third_party.json_schema_compiler.json_parse import OrderedDict
from test_file_system import ... | |
# The MIT License (MIT)
#
# Copyright (c) 2013 Kyle Heath
#
# 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, modi... | |
import io
from typing import BinaryIO, List, Tuple, Union
import cv2
import numpy
from .base import BaseSegmentationHelper
class OpenCVSegmentationHelper(BaseSegmentationHelper):
@classmethod
def loadImage(cls, imageDataStream: Union[BinaryIO, io.BytesIO]) -> numpy.ndarray:
"""
Load an image... | |
import unittest
import Tkinter
import ttk
from test.test_support import requires, run_unittest
import support
from test_functions import MockTclObj, MockStateSpec
requires('gui')
class WidgetTest(unittest.TestCase):
"""Tests methods available in every ttk widget."""
def setUp(self):
support.root_dei... | |
#*****************************************************************************
# Copyright 2004-2008 Steve Menard
#
# 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://w... | |
#---------------------------------------------------------------------------------------------------------------|
# Organization: AllenRing |
# -- Created by Ritch ... | |
#!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (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.mozil... | |
import inspect as _py_inspect
import sqlalchemy as sa
from sqlalchemy import event
from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import select
from sqlalchemy import Sequence
from sqlalchemy import String
from sqlalchemy import testing
from sqlalchemy i... | |
"""WMEL diagrams."""
# --- import --------------------------------------------------------------------------------------
import numpy as np
import matplotlib.pyplot as plt
# --- define --------------------------------------------------------------------------------------
# --- subplot --------------------------... | |
#!/usr/bin/env python
"""
Copyright (c) 2020 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, merg... | |
# -*- coding: utf-8 -*-
"""Simple Clarifai Custom Model Training API Wrapper
This module provides a simple wrapper around the Clarifai API in order to
make it very easy to train your first custom model and then use it for
predictions.
"""
from __future__ import absolute_import
import json
import re
import uuid
from... | |
# 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... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES = [
'django.contrib.sessions.middleware.SessionMiddleware',
'... | |
#-------------------------------------------------------------------------------
# Copyright: (c) Nanosmasher 2014
# Licence: The MIT License (MIT)
#-------------------------------------------------------------------------------
import math
from fractions import *
from tkinter import *
from tkinter import ttk
fr... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | |
# Copyright 2012 the V8 project authors. 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 conditi... | |
# 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 ... | |
"""Client Classification DHCPv6"""
# pylint: disable=invalid-name,line-too-long
import pytest
import srv_msg
import misc
import srv_control
@pytest.mark.v6
@pytest.mark.classification
def test_v6_client_classification_member():
misc.test_setup()
srv_control.config_srv_subnet('2001:db8:a::/64', '2001:db8:a:... | |
# for python 3
# You'll need to customize this according to your needs. Proper orientation of
# the kinect is vital; if participants are able to maintain their head or wrists
# continuously inside the word rects, they will repeatedly trigger the collision
# detection
from pykinect2 import PyKinectV2
from pykinect2.PyKi... | |
#!/usr/bin/env python
# Copyright (c) 2011 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.
"""Dromaeo benchmark automation script.
Script runs dromaeo tests in browsers specified by --browser switch and saves
results to a... | |
"""Ipython parallel ready entry points for parallel execution
"""
import contextlib
try:
from ipyparallel import require
except ImportError:
from IPython.parallel import require
from bcbio import heterogeneity, hla, chipseq, structural, upload
from bcbio.bam import callable
from bcbio.rnaseq import sailfish
f... | |
import numpy as np
from math import *
import sys
from calc_dmod import calc_lumd
#from calc_kcor import calc_kcor
'''
# get_colors
#
# Takes a list of lines from an SN data file and parses the SN parameters and host colors
# Returns two arrays, one containing arrays of SN peak mag, SALT s, SALT2 x0, x1, and c param... | |
# Copyright 2011 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 ... | |
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information.
from generate import generate
import System
import clr
import exceptions
def collect_excs():
ret = []
... | |
# -*- coding: utf-8 -*-
'''
Work with linux containers
:depends: lxc package for distribution
'''
# Import python libs
import logging
import tempfile
import os
#import salt libs
import salt.utils
# Set up logging
log = logging.getLogger(__name__)
# Don't shadow built-in's.
__func_alias__ = {
'list_': 'list'
}
... | |
"""This platform enables the possibility to control a MQTT alarm."""
import logging
import re
import voluptuous as vol
from homeassistant.components import mqtt
import homeassistant.components.alarm_control_panel as alarm
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
... | |
# Copyright (c) 2013 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 writ... | |
"""Boolean algebra module for SymPy"""
from sympy.core.basic import Basic
from sympy.core.operations import LatticeOp
from sympy.core.function import Application, sympify
class Boolean(Basic):
"""A boolean object is an object for which logic operations make sense."""
__slots__ = []
def __and__(self, othe... | |
"""
instances.py:
Class to help manage the 'instances.json' file that has the data
we'll use to determine cluster pricing.
The thought here is that while the 'instances.json' file isn't
_huge_, it's not small either, so I really don't want to fetch
it more often than I have to. I'd rather fetch it ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 NetApp
# 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/... | |
from .cost import Cost
from .layers.particle_vector_n import ParticleVectorN
from .layers.particle_vector_n import ParticleVectorNInput
import numpy as np
import json
class ParticleVectorNNetwork(object):
def __init__(self, particle_input=None, cost="mse", regularizer=None):
self.layers = []
se... | |
from __future__ import absolute_import, division, unicode_literals
from six import string_types
try:
from functools import reduce
except ImportError:
pass
from ..constants import voidElements, booleanAttributes, spaceCharacters
from ..constants import rcdataElements, entities, xmlEntities
from .. import utils... | |
# Copyright IBM Corp. 2016 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 a... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cairo
import gtk, gobject
from numpy import cos, sin, pi, sqrt, sort, square,array, zeros, diff,\
column_stack, ones, reshape, linspace, argsort, arctan2,\
concatenate, cumsum, row_stack, arange
from numpy.random import random, see... | |
# -*- coding: utf-8 -*-
#
#
# Copyright 2013 Netflix, 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 ... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
from collections import deque
from datetime import datetime
import operator
import pytest
from numpy import nan, random
import numpy as np
from pandas.compat import lrange, range
from pandas import compat
from pandas import (DataFrame, Series, MultiIndex... | |
"""
Margin implementations for a :class:`~prompt_toolkit.layout.containers.Window`.
"""
from abc import ABCMeta, abstractmethod
from typing import TYPE_CHECKING, Callable, Optional
from prompt_toolkit.filters import FilterOrBool, to_filter
from prompt_toolkit.formatted_text import (
StyleAndTextTuples,
fragmen... | |
#!/usr/bin/env python2.5
#
# Copyright 2008 the Melange 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 applic... | |
# coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | |
# Copyright 2017 Google 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, ... | |
# $Id$
#
# Created by Greg Landrum, July 2008
#
from rdkit import RDConfig
import os, sys
import unittest
from rdkit import DataStructs, Chem
from rdkit.Avalon import pyAvalonTools
struchk_conf_path = os.path.join(RDConfig.RDDataDir, 'struchk', '')
struchk_log_path = ''
STRUCHK_INIT = '''-tm
-ta %(struchk_conf_path)s... | |
# -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals, with_statement
from subprocess import Popen, PIPE
try:
from urllib import unquote
except ImportError: # python 3
from urllib.parse import unquote
import re
import os
import sys
try:
import json # for reading logs
except Im... | |
#!/usr/bin/python
"""
Two Column Virtual Terminal.
"""
# Copyright 2011 Helmut Grohne <helmut@subdivi.de>. 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 mu... | |
#
# Copyright (c) 2014, Arista Networks, 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 condit... | |
"""Implements the graph generation for computation of gradients."""
import collections
import warnings
import tensorflow.python.platform
import numpy as np
from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import tensor_util
from tensor... | |
#!/usr/bin/env python
#--------------------------------------------------------------
# The functions for the lattice modifications to replace the base
# RF gap nodes with
# 1. The Axis Fields nodes.
# The initial base RF gap nodes have zero length, and the length
# of new nodes is defined by the RF fields on... | |
# -*- coding: utf-8 -*-
from math import sqrt
__author__ = 'fyabc'
class Vector2:
"""A class for 2d vector.
Values of this vector are float.
"""
__slots__ = ('_v', )
def __init__(self, x=0., y=0.):
if hasattr(x, '__getitem__'):
x, y = x
self._v = [float(x), float(y)]... | |
from __future__ import print_function
from __future__ import division
import numpy as np
from types import MethodType
import sqaod
from sqaod import algorithm as algo
from sqaod.common import checkers
from . import formulas
class BipartiteGraphAnnealer :
""" python implementation of bipartite graph annealer.
... | |
#
# Cassandra Cluster Management lib
#
from __future__ import absolute_import
import copy
import fnmatch
import logging
import os
import platform
import re
import shutil
import signal
import socket
import stat
import subprocess
import sys
import time
from distutils.version import LooseVersion #pylint: disable=import... | |
from pytest import fixture, raises
from ebu_tt_live.config import AppConfig, UniversalNodes
import ebu_tt_live.config.node as node_config
import ebu_tt_live.config.carriage as carriage_config
import ebu_tt_live.node as processing_node
from ebu_tt_live.config.common import ConfigurableComponent
from ebu_tt_live.errors ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Parse RANCID db files so they can be converted into Trigger NetDevice objects.
.. versionadded:: 1.2
Far from complete. Very early in development. Here is a basic example.
>>> from trigger import rancid
>>> rancid_root = '/path/to/rancid/data'
>>> r = Ra... | |
#!/usr/bin/env python3
"""Config logic validation"""
# Copyright 2019 IBM Corp.
#
# 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/license... | |
import os
import sys
import time
import numpy as np
import mahotas
import glob
import h5py
execfile('full_image_cnn.py')
#from full_image_cnn import *
#param_path = 'D:/dev/Rhoana/membrane_cnn/results/resonance/'
#param_file = param_path + 'LGN1_MembraneSamples_65x65x1_mp0.50_train10000_valid2000_test2000_seed7.pr... | |
import itertools
import textwrap
import warnings
from datetime import datetime
from distutils.version import LooseVersion
from inspect import getfullargspec
import numpy as np
import pandas as pd
from ..core.options import OPTIONS
from ..core.utils import is_scalar
try:
import nc_time_axis
if LooseVersion(nc... | |
#! /usr/bin/env python
############################################################
# Program is part of PySAR v1.0 #
# Copyright(c) 2013, Heresh Fattahi #
# Author: Heresh Fattahi #
#####################################################... | |
#!/bin/env python2
"""Analizer module."""
from __future__ import division
import cv2
import magic
import random
import numpy as np
from scipy import ndimage
from key_frame_extractor import get_key_frames
PERCENTAGE_OF_FRAMES_TO_ANALIZE = 0.1
BYTES_PER_PIXEL = 3
class SkinRegion(object):
def __init__(self, im... | |
# -*- coding: utf-8 -*-
"""
celery.apps.worker
~~~~~~~~~~~~~~~~~~
This module is the 'program-version' of :mod:`celery.worker`.
It does everything necessary to run that module
as an actual application, like installing signal handlers,
platform tweaks, and so on.
"""
from __future__ import abs... | |
# 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... | |
"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2014 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 righ... | |
import asyncio
import datetime
from http import HTTPStatus
import os.path
import shutil
import textwrap
from pathlib import Path
import freezegun
import pytest
import time
import uuid
import json
from _pytest.monkeypatch import MonkeyPatch
from _pytest.logging import LogCaptureFixture
from aioresponses import aiorespo... | |
# -*- coding: utf-8 -*-
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
# (mostly translation, see implementation details)
# Licence: BSD 3 clause
from __future__ import print_function
import numpy as np
from scipy import linalg, optimize
from ..base import BaseEstimator, RegressorMixin
from ..metrics... | |
#!/usr/bin/python
import os
import sys, getopt
import subprocess
import time,atexit
import fcntl
import logging,signal,atexit
import logging.handlers
import zmq
# no need to create class (OOB), define all as global variable
# old config intf mac address and gw mac address
g_CfgOldIntfMacAddr = ''
g_CfgOldGwMacAddr = '... | |
# coding: utf-8
"""
Talon.One API
The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #... | |
# Copyright 2015 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 (c) 2012 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... | |
import numpy as np
def affine_forward(x, w, b):
"""
Computes the forward pass for an affine (fully-connected) layer.
The input x has shape (N, d_1, ..., d_k) and contains a minibatch of N
examples, where each example x[i] has shape (d_1, ..., d_k). We will
reshape each input into a vector of dimension D = ... | |
# 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 ... | |
#!/usr/bin/env python
# This file is part of Scapy
# Scapy 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 2 of the License, or
# any later version.
#
# Scapy is distributed in the hope that it... | |
# Copyright (c) 2012 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.