gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Test the Bond config flow.""" from __future__ import annotations from http import HTTPStatus from typing import Any from unittest.mock import MagicMock, Mock, patch from aiohttp import ClientConnectionError, ClientResponseError from homeassistant import config_entries, core from homeassistant.components import ze...
# module for the <eadheader/> or <control/> portion import xml.etree.cElementTree as ET import globals from messages import error from mixed_content import mixed_content import wx def eadheader(EAD, CSheet): eadheader_root = EAD[0] #update GUI progress bar from wx.lib.pubsub import pub wx.CallAfter(pub.sendMessa...
from unittest.mock import patch from hc.payments.models import Subscription from hc.test import BaseTestCase class UpdateSubscriptionTestCase(BaseTestCase): def _setup_mock(self, mock): """ Set up Braintree calls that the controller will use. """ mock.Subscription.create.return_value.is_success ...
from .base import BaseLibLinear, BaseSVC, BaseLibSVM from ..base import RegressorMixin from ..linear_model.base import LinearClassifierMixin, SparseCoefMixin from ..feature_selection.from_model import _LearntSelectorMixin class LinearSVC(BaseLibLinear, LinearClassifierMixin, _LearntSelectorMixin, Spar...
# -*- test-case-name: twisted.web.test -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Interface definitions for L{twisted.web}. @var UNKNOWN_LENGTH: An opaque object which may be used as the value of L{IBodyProducer.length} to indicate that the length of the entity body is not...
#-*- encoding: utf8 -*- import ConfigParser class Opt(object): """Opt is a Abstract Base Class which is used to wrap the options in configuration file. """ def __init__(self, key, group='default', default=None): self.group = group self.key = key self.default = default def parse(...
# Copyright 2014 Mellanox Technologies, 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 t...
from globals import * import life as lfe import language import graphics import bad_numbers import timers import items import alife import logging import random def get_puncture_value(item, target_structure, target_structure_name='object', debug=True): _damage = (((item['speed']/float(item['max_speed']))*item['da...
# 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...
""" Test for the harmonization operation """ import calendar from datetime import datetime from unittest import TestCase import numpy as np import pandas as pd import xarray as xr from jdcal import gcal2jd from numpy.testing import assert_array_almost_equal from cate.core.op import OP_REGISTRY from cate.core.opimpl ...
# 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...
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
import json import logging from django.core.management.base import BaseCommand from django.db import transaction from osf.models import PreprintProvider, PreprintService, Subject from osf.models.preprint_provider import rules_to_subjects from scripts import utils as script_utils from osf.models.validators import vali...
# 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) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
# 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...
"""Tango Parser. The objective of the preliminary parsing phase is to (try to) uncover the overall structure of the input document. In particular it handles : - line comments - latex-style commands \cmd[<opt>]{<arg1>}{...}{<argN>} - special preformated commands \cmd[<opt>]{{{ <preformated>}}} - latex-style envir...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from sympy import Integer from threading import RLock from pyglet.gl import * from plot_object import PlotObject from plot_axes import PlotAxes from plot_window import PlotWindow from plot_mode import PlotMode import plot_modes from time import sleep from os import getcwd, listdir from util import parse_option_stri...
import os import sys import zipfile import tarfile import glob from CityscapeMask2Pascal import cityscapeMask2Pascal from xml.etree import ElementTree as et #--------------------------------------------------------------------------------------------- def createFolder(directory): try: if not os.path.exis...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import * # NOQA from future import standard_library standard_library.install_aliases() # NOQA from logging import getLogger import chainer from chainer i...
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2015 Tom Barron. All rights reserved. # Copyright (c) 2016 Mike Rooney. 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...
import re import os.path from django.core.urlresolvers import reverse from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _, ugettext from guardian.shortcuts import assign, get_objects_for_user from taggit.managers import TaggableManager from projects.m...
import json from datetime import datetime, timedelta from random import random import mock from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core import mail from nose.tools import eq_ from rest_framework.test import APIClient from kitsune.sumo.helpers import urlpara...
import cv2 import xml.etree.ElementTree as ET import os from rod import * import pprint pp = pprint.PrettyPrinter(depth=6) def xml_load_point(point): return (int(point.split(',')[0]), int(point.split(',')[1])) def xml_load_rect(rect): return (int(rect.find("X").text), int(rect.find("Y").text), int(rect.find("W").t...
#!/usr/bin/env python ''' harvest.py A set of modules to support downloading and synchronizing a WAF ''' from catalog_harvesting.waf_parser import WAFParser from catalog_harvesting.erddap_waf_parser import ERDDAPWAFParser from catalog_harvesting.csw import download_csw from catalog_harvesting import get_logger, get_re...
#========================================================================= # ast_visitor_test.py #========================================================================= # Tests for Python AST Visitors. import pytest from ast_visitor import * from ..ast_helpers import get_method_ast, print_simple_ast from pymtl ...
''' Estimate the impact of beam smearing by running a standard deviation filter over the peak velocity surface (since we use it for stacking) at different resolutions. ''' import numpy as np import scipy.ndimage as nd from astropy.io import fits import astropy.units as u from spectral_cube import Projection import ma...
from django.contrib import admin from django import forms from django.forms.models import ModelForm, ModelChoiceField from django.forms import ValidationError from mptt.admin import MPTTModelAdmin, MPTTAdminForm from mptt.fields import TreeNodeChoiceField from pidman.admin import admin_site from pidman.pid.ark_utils i...
import json from collections import OrderedDict from datetime import datetime from dateutil.relativedelta import relativedelta from dateutil.rrule import rrule, MONTHLY from django.http import JsonResponse from django.utils.decorators import method_decorator from django.views.generic.base import View from corehq.apps...
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
"""Support for Minut Point.""" import asyncio import logging from httpx import ConnectTimeout from pypoint import PointSession import voluptuous as vol from homeassistant import config_entries from homeassistant.components import webhook from homeassistant.config_entries import ConfigEntry from homeassistant.const im...
from __future__ import print_function, division from .str import StrPrinter from sympy.utilities import default_sort_key class LambdaPrinter(StrPrinter): """ This printer converts expressions into strings that can be used by lambdify. """ def _print_MatrixBase(self, expr): return "%s(%s)...
# 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 The Forseti Security 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 ap...
# # Client connect to an Electrum server. # # Runtime check for optional modules from importlib import util as importutil import json, warnings, asyncio, ssl from .protocol import StratumProtocol # Check if aiosocks is present, and load it if it is. if importutil.find_spec("aiosocks") is not None: import aiosocks...
# 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 ...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains base implementation of both spines and leafs """ from db import * from dm_utils import DMUtils from ansible_conf import AnsibleConf from ansible_conf import JunosInterface from abstract_device_api.abstract_device_xsd import * ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
import sys from logging import getLogger from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.figure import Figure from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import (QMainWindow, QHBoxLayout, QVBoxLayout, QSizePolicy, QWidget,...
from typing import Tuple import numpy as np import numpy.ma as ma from sdcit.cython_impl.cy_sdcit import cy_sdcit, cy_split_permutation, cy_dense_permutation from sklearn.linear_model import LinearRegression from sdcit.utils import K2D, p_value_of, random_seeds, cythonize def permuted(D, dense=True): out = np.z...
""" test parquet compat """ import datetime from io import BytesIO import os import pathlib from warnings import ( catch_warnings, filterwarnings, ) import numpy as np import pytest from pandas._config import get_option from pandas.compat import is_platform_windows from pandas.compat.pyarrow import ( pa_...
# -*- coding: utf-8 -*- """ This code uses a loop along with our set of coupled differential equations and matrix math to create arrays of 4-vector quaternions. The old plotting functions need to be updated and incorperated into the end of this code or a better visualization solution needs to be found. """ #--------...
#!/usr/bin/env python import inspect import os import sys import time import traceback import cv2 import numpy as np import utilscv dir_file = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(dir_file, "../../..")) import gabriel import gabriel.proxy LOG = gabriel.logging.getLogger(__name...
# -*- coding: 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 field 'OrganizationDocument.created' db.add_column(u'organizations_organizationdocument', 'created'...
"""The tests for the Template light platform.""" import logging import pytest from homeassistant import setup from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_HS_COLOR, ATTR_WHITE_VALUE, ) from homeassistant.const import STATE_OFF, STATE_ON, STATE_UNAVAILABLE from h...
# -*- coding: utf-8 -*- # File: conv2d.py from ..compat import tfv1 as tf # this should be avoided first in model code from ..tfutils.common import get_tf_version_tuple from ..utils.argtools import get_data_format, shape2d, shape4d, log_once from .common import VariableHolder, layer_register from .tflayer import co...
#!/usr/bin/env python # Copyright (c) 2012 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. # # Xcode supports build variable substitutions and CPP; sadly, that doesn't work # because: # # 1. Xcode wants to do the Info.pli...
"""The tests for the MQTT statestream component.""" import homeassistant.components.mqtt_statestream as statestream from homeassistant.core import State from homeassistant.setup import async_setup_component from tests.async_mock import ANY, call from tests.common import mock_state_change_event async def add_statestr...
from proximal.tests.base_test import BaseTest import proximal as px from proximal.lin_ops.vstack import vstack from proximal.algorithms import admm, pc, hqs, ladmm, absorb_offset from proximal.utils.cuda_codegen import PyCudaAdapter import cvxpy as cvx import numpy as np class TestAlgs(BaseTest): def test_admm(s...
import sqlalchemy as sa from sqlalchemy import Computed from sqlalchemy import event from sqlalchemy import Identity from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import testing from sqlalchemy.testing import eq_ from sqlalchemy.testing import fixtures from sqlalchemy.testing.assertsql im...
# # 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...
# 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): # Changing field 'Option.value' db.alter_column('sentry_option', 'value', self.gf('picklefield.fields.PickledObjec...
import datetime import os from django import forms from django.contrib.auth.models import User from django.core.files import * from django.core.files.storage import FileSystemStorage from django.db import models from django.db.models.signals import post_save from settings import MEDIA_ROOT # Create the list of years...
""" tests.test_invalid_forms.py --------------------------- Flask-User automated tests: Tests all forms with as many invalid field values as possible :copyright: (c) 2013 by Ling Thio :author: Ling Thio (ling.thio@gmail.com) :license: Simplified BSD License, see LICENSE.txt for more details...
""" search.py """ from flask import Flask, request, redirect, abort, make_response from flask import render_template, flash import bibserver.dao from bibserver import auth import json, httplib from bibserver.config import config import bibserver.util as util import logging from logging.handlers import RotatingFileHand...
# -*- coding: utf-8 -*- import random from cadnano.views.pathview import pathstyles from cadnano.proxies.cnproxy import UndoCommand from cadnano.strand import Strand class SplitCommand(UndoCommand): """ The SplitCommand takes as input a strand and "splits" the strand in two, such that one new strand 3' end i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # copyright 2014 Hamilton Kibbe <ham@hamiltonkib.be> # # 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/LICEN...
import tables as T import numpy as N import subprocess import threading import SimpleXMLRPCServer import SocketServer import time,xmlrpclib,httplib import cPickle as pickle import ConfigParser import sys, os import imp # xmlrpc mit timeout def Server(url, *args, **kwargs): t = TimeoutTransport() t.timeout = kw...
#!/usr/bin/env python # The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/li...
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope...
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2015 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 required by applicable law or agre...
# 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...
__author__ = 'stuart' import os, sys, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from datastreams import DataSet, DataStream, Datum, DictSet, DictStream if sys.version_info[0] == 2 and sys.version_...
import mxnet as mx from mxnet import gluon from mxnet.gluon import nn import numpy as np def test_parameter(): p = gluon.Parameter('weight', shape=(10, 10)) p.initialize(init='xavier', ctx=[mx.cpu(0), mx.cpu(1)]) assert len(p.list_data()) == 2 assert len(p.list_grad()) == 2 assert p.data(mx.cpu(1)...
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification and regression using Stochastic Gradient Descent (SGD).""" from abc import ABCMeta, abstractmethod import numpy as np from .sgd_fast import EpsilonIns...
import logging import servercommands # Globals invalidNames = ['NONE'] def configLog(filepath): logging.basicConfig(level=logging.DEBUG, filename=filepath, format='%(asctime)s | %(message)s') def logMsg(msg): """Logs the specified message to std out and the file set my the logging config.""" print msg l...
# 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...
#!/usr/bin/env python #Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com) # #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 rig...
# 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...
""" Various complex queries that have been problematic in the past. """ import datetime from django.db import models from django.db.models.query import Q class Tag(models.Model): name = models.CharField(max_length=10) parent = models.ForeignKey('self', blank=True, null=True) def __unicode__(self): ...
# 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...
# coding: utf-8 """ This module defines the Node class that is inherited by Task, Work and Flow objects. """ from __future__ import division, print_function, unicode_literals import sys import os import time import collections import abc import six import numpy as np from pprint import pprint from atomicfile import A...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Australian Government, Department of the Environment # # 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 limi...
# # 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...
# Copyright 2014 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. """Generates java source files from a mojom.Module.""" import argparse import ast import contextlib import os import re import shutil import tempfile import...
#!/usr/bin/env python3 # 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 ...
from __future__ import division, print_function import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from train_semisupervised.train import ( PREVIOUS_STATES_DISTANCES, MODEL_HEIGHT, MODEL_WIDTH, MODEL_PREV_HEIGHT, MODEL_PREV_WIDTH ) from batching import states_to_ba...
from dateutil.parser import parse as dtparse import locale locale.setlocale(locale.LC_ALL, '') class ReleaseNoteTxt(object): def __init__(self, changes): self.changes = changes #pprint(self.changes) def save(self, filepath): try: import prettytable except ImportEr...
#!/usr/bin/env python # # Use the raw transactions API to spend sinertalers received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a sinertalerd ...
# # Copyright 2014 Red Hat # # Author: Chris Dent <chdent@redhat.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
#!/usr/bin/python # (c) 2016, Marcin Skarbek <github@skarbek.name> # (c) 2016, Andreas Olsson <andreas@arrakis.se> # (c) 2017, Loic Blot <loic.blot@unix-experience.fr> # # This module was ported from https://github.com/mskarbek/ansible-nsupdate # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/l...
#! /usr/bin/env python # -*- coding: utf-8 -*- # copyright 2014 Hamilton Kibbe <ham@hamiltonkib.be> # # 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/LICE...
# Copyright 2013 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...
from collections import defaultdict from .common import error_info from .common import fail, warn from .env import env from .errors import Errors, Warnings from .scope import Scope from .ir import CONST, TEMP, MOVE from .irvisitor import IRVisitor, IRTransformer from .type import Type from .typecheck import TypePropaga...
from __future__ import absolute_import from __future__ import print_function import sys, os, yaml, glob import subprocess import pandas as pd import gzip import re import string import shutil import numpy as np from matplotlib import pyplot as plt from nougat import common, align from nougat.pdf.peakdetect import peakd...
import datetime import hashlib import json from bson.objectid import ObjectId try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import render from crits.core.class_mapper import class_from_id, class_...
from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import range from builtins import * from past.utils import old_div ...
from tcga_encoder.utils.helpers import * from tcga_encoder.data.data import * from tcga_encoder.definitions.tcga import * #from tcga_encoder.definitions.nn import * from tcga_encoder.definitions.locations import * #from tcga_encoder.algorithms import * import seaborn as sns from sklearn.manifold import TSNE, locally_li...
import logging import os import threading from django.apps import apps from django.conf import settings from django.core.cache import cache from django.db import models, connection from boardinghouse import signals LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.NullHandler()) _thread_locals = thread...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.provision.test.test_install -*- """ Install flocker on a remote node. """ import posixpath from textwrap import dedent from urlparse import urljoin from effect import Func, Effect import yaml from characteristic import attribu...
# 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) 2008-2009 Pedro Matiello <pmatiello@gmail.com> # Salim Fadhley <sal@stodge.org> # # 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...
import collections from supriya import CalculationRate from supriya.synthdefs import PureUGen, UGen class COsc(PureUGen): """ A chorusing wavetable oscillator. :: >>> cosc = supriya.ugens.COsc.ar( ... beats=0.5, ... buffer_id=23, ... frequency=440, .....
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Unit test for the AlarmItem class. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # Licensed under The MIT License (MIT), a copy can be found in the LICENSE file # from __future__ import unicode_literals, absolute_import import unittest import moc...
# 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...
import os import numpy as np import taichi as ti from tests import test_utils this_dir = os.path.dirname(os.path.abspath(__file__)) model_file_path = os.path.join(this_dir, 'ell.json') @test_utils.test(require=ti.extension.mesh) def test_mesh_patch_idx(): mesh_builder = ti.Mesh.Tet() mesh_builder.verts.pla...
from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError SSLContext = None HAS_SNI = False create_default_context = None import errno import ssl try: # Test for SSL features from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import HAS_S...