gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('entities', '0001_initial'), ) def forwards(self, orm): # Adding model 'Template' db.create_table(u'...
# 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Isaku Yamahata <yamahata at private email ne jp> # 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 #...
# This file implements a MultiIsoVisual class that can be used to show # multiple layers of isosurface simultaneously. It is derived from the original # VolumeVisual class in vispy.visuals.volume, which is releaed under a BSD license # included here: # # =================================================================...
""" @copyright Copyright (c) 2016 - 2017, Intel Corporation. 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 agr...
# Copyright 2012, Intel, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# Copyright 2016 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...
#!/usr/bin/env python #Adam Bowen - Apr 2016 #This script deletes a vdb #requirements #pip install docopt delphixpy #The below doc follows the POSIX compliant standards and allows us to use #this doc to also define our arguments for the script. This thing is brilliant. """Delete a VDB Usage: dx_delete_db.py (--gro...
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import datetime import decimal import sys import warnings def _setup_environment(environ): import platform # Cygwin requires some special voodoo to set the environment va...
import math import random import numpy as np from numpy.core.umath_tests import inner1d from neupy.utils import format_data from neupy.core.properties import Property from .base import DiscreteMemory __all__ = ('DiscreteHopfieldNetwork',) def bin2sign(matrix): return np.where(matrix == 0, -1, 1) def hopfiel...
#!/usr/bin/env python # # Copyright 2010 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 o...
from ichnaea.api.locate.constants import DataAccuracy, DataSource from ichnaea.api.locate.query import Query from ichnaea.api.locate.result import ( Position, PositionResultList, Region, RegionResultList, Result, ResultList, ) from ichnaea.models import encode_mac from ichnaea.tests.factories im...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module contains an algorithm to solve the Linear Assignment Problem """ __author__ = "Will Richards" __copyright__ = "Copyright 2011, The Materials ...
""" Unit test for localdisk_service - Treadmill local disk service """ import collections import os import shutil import subprocess import tempfile import unittest import mock import treadmill from treadmill.services import localdisk_service class LocalDiskServiceTest(unittest.TestCase): """Unit tests for the ...
""" Tests for zipline.data.ffc.frame.DataFrameFFCLoader """ from unittest import TestCase from mock import patch from numpy import arange from numpy.testing import assert_array_equal from pandas import ( DataFrame, DatetimeIndex, Int64Index, ) from zipline.lib.adjustment import ( Float64Add, Float...
# -*- coding: utf-8 -*- # Copyright 2022 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...
import copy from django.db import models from django.db.models.base import ModelBase from django.conf import settings from django.utils.translation import ugettext_lazy as _ from linguo.exceptions import MultilingualFieldError from linguo.managers import MultilingualManager from linguo.utils import get_real_field_nam...
""" Reduces ACS WFC polarimetry data. :requires: astrodither / astrodrizzle :requires: PyRAF :requires: IRAF :requires: NumPy :requires: SciPy :requires: matplotlib :author: Sami-Matias Niemi :contact: sammy@sammyniemi.com :version: 0.6 """ import matplotlib matplotlib.use('PDF') import os, glob, shutil, datetime fr...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # # # This file contains authentication/authorization functionality for VNC-CFG # subsystem. It also currently contains keystone adaptation which can in # future by moved to vnc_auth_keystone.py # import gevent from gevent import monkey monkey.patch_al...
import unittest import numpy as np import numpy.testing as npt from .. import graphs, nodes, inference, rv class TestInference(unittest.TestCase): def setUp(self): # Create factor graph self.fg = graphs.FactorGraph() # Create variable nodes self.x1 = nodes.VNode("x1", rv.Discre...
""" This module handles serialization of arbitrary python structural data, intended primarily to be stored in the database. It also supports storing Django model instances (which plain pickle cannot do). This serialization is used internally by the server, notably for storing data in Attributes and for piping data to ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, workspace from hypothesis import given import caffe2.python.hypothesis_test_util as hu import hypothesis.strategies as st import numpy as n...
""" Test lldb data formatter subsystem. """ import lldb from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil class AdvDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) ...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
from dateutil import rrule from django.db.models.aggregates import Avg from corehq.apps.locations.models import SQLLocation from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn from custom.ilsgateway.filters import ProgramFilter, ILSDateFilter, ILSAsyncLocationFilter from custom.ilsgateway.tanz...
############################################################################### # # Workbook - A class for writing the Excel XLSX Workbook file. # # Copyright 2013-2016, John McNamara, jmcnamara@cpan.org # # Standard packages. import sys import re import os import operator from warnings import warn from datetime impor...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Core control stuff for coverage.py.""" import atexit import inspect import os import platform import sys import traceback from coverage import env, files from ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: brython (http://brython.info) (like python3) # # Imports ===================================================================== from browser import html from browser import alert from browser import window from browser import document from virtual_...
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file import os,sys from waflib import Utils,Options,Errors,Logs,Task,Node from waflib.TaskGen import extension,before_method,after_method,feature from waflib.Configure import conf FRAG=''' #include <Pytho...
######## # Copyright (c) 2018 Cloudify Platform Ltd. 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 requi...
# 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...
"""The tests for Alarm control panel device conditions.""" import pytest from homeassistant.components.alarm_control_panel import DOMAIN import homeassistant.components.automation as automation from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_CUSTOM_BYPASS, STATE_ALARM_ARMED_HOME...
# 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 the Li...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import subprocess import sys import time # Add the telemetry directory to Python's search paths. current_directory = os.path.dirnam...
from rest_framework import generics from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from rest_framework.response import Response from rest_framework.settings import api_settings from rest_framework.views import APIView from django.conf import settings from django.http import Http404 from dj...
"""Support to use flic buttons as a binary sensor.""" import logging import threading import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import ( CONF_HOST, CONF_PORT, CONF_DISCOVERY, CONF_TIMEOUT, EVENT_HOMEASSISTANT_STOP, ) from homeassistant.c...
import os import pytest from unittest.mock import patch from PIL import Image from sigal import init_logging from sigal.image import (generate_image, generate_thumbnail, get_exif_tags, get_exif_data, get_size, process_image, get_iptc_data) from sigal.settings import create_settings, Status CU...
"""Test Zeroconf component setup process.""" from unittest.mock import call, patch from zeroconf import InterfaceChoice, IPVersion, ServiceInfo, ServiceStateChange from homeassistant.components import zeroconf from homeassistant.components.zeroconf import CONF_DEFAULT_INTERFACE, CONF_IPV6 from homeassistant.const imp...
import demistomock as demisto from CommonServerPython import * import subprocess import glob import os import re import errno import shutil import json from typing import List URL_EXTRACTION_REGEX = r'(?:(?:https?|ftp|hxxps?):\/\/|www\[?\.\]?|ftp\[?\.\]?)(?:[-\w\d]+\[?\.\]?)+' \ r'[-\w\d]+(?::\...
import os import sys import traceback import zstackwoodpecker.operations.resource_operations as res_ops import zstackwoodpecker.header.checker as checker_header import zstackwoodpecker.header.vm as vm_header import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstackwoodpe...
#!/usr/bin/env python from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, ServerError, InvalidRequestE...
""" Support for Dutch Smart Meter (also known as Smartmeter or P1 port). For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.dsmr/ """ import asyncio from datetime import timedelta from functools import partial import logging import voluptuous as vol ...
""" The microblaze architecture """ from ... import ir from ..arch import Architecture from ..arch_info import ArchInfo, TypeInfo, Endianness from ..generic_instructions import Label, RegisterUseDef, Alignment from ..data_instructions import Db from ..stack import StackLocation, FramePointerLocation from ...binutils.a...
# Copyright 2013: 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...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
# Copyright 2019 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...
# -*- coding: utf-8 -*- # Copyright 2019 The Chromium OS 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 keys from legacy signer config.""" from __future__ import print_function import os from six.moves import configparser...
from collections import namedtuple import itertools import networkx as nx import numpy as np from pgmpy.factors.discrete import factor_product from pgmpy.inference import Inference from pgmpy.models import BayesianModel, MarkovChain, MarkovModel from pgmpy.utils.mathext import sample_discrete from pgmpy.extern.six.mo...
#!/usr/bin/env python import sys import subprocess import os from math import floor, ceil import numpy try: from mpi4py import MPI except: pass import h5py import hifive import heatmap def write_heatmap_dict(datafname, modelprefix, outfname, binsize=1000000, includetrans=False, chroms=[]): # check if M...
# # Toy base classes. # # This file is part of PINTS (https://github.com/pints-team/pints/) which is # released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # import numpy as np import pints import scipy class ToyLogPDF(pints.LogPDF): """ Abstrac...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # Copyright (C) 2018 University of Chicago. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Pytest configuration.""" import json ...
import numpy as np import theano import theano.tensor as T from robo.task.base_task import BaseTask class LogisticRegression(BaseTask): def __init__(self, train, train_targets, valid, valid_targets, test, test_targets, n_classes): ''' Logistic ...
""" desispec.scripts.qproc ======================== Run DESI qproc on a given exposure """ import argparse import sys,os import time import numpy as np import astropy.io.fits as fits from desiutil.log import get_logger from desispec.util import option_list from desispec.io import read_raw,read_image,read_fibermap,wr...
#!/usr/bin/env python from __future__ import print_function from builtins import range from builtins import object import os.path import re import time import fitsio import astropy.io.fits as pyfits import opscore.protocols.keys as keys import opscore.protocols.types as types import actorcore.utility.fits as actorF...
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_py39 openapi_schema = { "openapi": "3.0.2", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/files/": { "post": { "responses": { ...
import pytest from anchore_engine.common.models.policy_engine import ( Artifact, FixedArtifact, Vulnerability, VulnerabilityMatch, ) from anchore_engine.services.policy_engine.engine.vulns.providers import GrypeProvider class TestGrypeProvider: @pytest.mark.parametrize( "test_input", ...
""" Provides various throttling policies. """ from __future__ import unicode_literals import time from django.core.cache import cache as default_cache from django.core.exceptions import ImproperlyConfigured from rest_framework.settings import api_settings class BaseThrottle(object): """ Rate throttling of ...
# Graph class import numpy as np from node import FacNode, VarNode import pdb """ Factor Graph classes forming structure for PGMs Basic structure is port of MATLAB code by J. Pacheco Central difference: nbrs stored as references, not ids (makes message propagation easier) """ class Graph: """ Put...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python # Copyright (C) 2010, 2012 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...
#!/usr/bin/env python # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Version 2.0 (the "Licen...
from __future__ import absolute_import from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse from django import forms from django.test import TestCase from django.utils.unittest import expectedFailure from django.views.generic.base import View from django.views.generic.ed...
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ from django.test.client import Client from django.test import TestCase from django.utils import unittest impo...
# -*- coding: utf-8 -*- import bson.json_util import dateutil.parser import inspect import jsonschema import os import six import cherrypy from collections import OrderedDict from girder import constants, logprint from girder.api.rest import getCurrentUser, getBodyJson from girder.constants import SortDir, VERSION fro...
# -*- coding: utf-8 -*- from PyQt4 import QtGui, QtCore from ..Stage import Stage, StageInterface, MoveFuture from acq4.drivers.ThorlabsMFC1 import MFC1 as MFC1_Driver from acq4.util.Mutex import Mutex from acq4.util.Thread import Thread from acq4.pyqtgraph import debug import time class ChangeNotifier(QtCore.QObject)...
# -*- coding: utf-8 -*- """ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re, itertools from pygments.filter import apply_filters, Filter from pygments.filters import get_filt...
# Copyright 2012 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 ...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
''' Tratihubis converts Trac tickets to Github issues by using the following steps: 1. The user manually exports the Trac tickets to convert to a CSV file. 2. Tratihubis reads the CSV file and uses the data to create Github issues and milestones. Installation ============ To install tratihubis, use ``pip`` or ``eas...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 - 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
# # 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 ...
# 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 agreed to in ...
import copy import operator import warnings from functools import total_ordering, wraps from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning # You can't trivially replace this with `functools.partial` because this binds # to classes and returns bound instances, whereas functools...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
#!/usr/bin/env python # cardinal_pythonlib/ui.py """ =============================================================================== Original code copyright (C) 2009-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of cardinal_pythonlib. Licensed under the Apache License, Version 2.0 (the "Lic...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not...
# Copyright (C) 2010 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 writ...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.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 by applicabl...
''' Compare pressure models on GMC-scales in M33. ''' from astropy.io import fits from spectral_cube import Projection import numpy as np import astropy.units as u import matplotlib.pyplot as plt import matplotlib as mpl import matplotlib.cm as cm import seaborn as sb from corner import hist2d from os.path import jo...
# coding: utf-8 from __future__ import division, unicode_literals """ This module provides classes that define a chemical reaction. """ __author__ = "Shyue Ping Ong, Anubhav Jain" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "2.0" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail....
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- """__init__.py Project related views, such as project creation and details. """ from functools import wraps from flask import ( Blueprint, render_template, g, redirect, url_for, abort, request ) from flask.ext import wtf from notifico import d...
import errno import os import sys import time import traceback import warnings from eventlet.green import urllib from eventlet.green import socket from eventlet.green import BaseHTTPServer from eventlet import greenpool from eventlet import greenio from eventlet.support import get_errno DEFAULT_MAX_SIMULTANEOUS_REQUE...
# coding=utf-8 # Copyright 2022 The TensorFlow Datasets 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 appl...
# # 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...
''' datetime.tzinfo timezone definitions generated from the Olson timezone database: ftp://elsie.nci.nih.gov/pub/tz*.tar.gz See the datetime section of the Python Library Reference for information on how to use these modules. ''' # The Olson database is updated several times a year. OLSON_VERSION = '2015g' VERSI...
from __future__ import print_function, division from collections import defaultdict from .basic import Basic from .compatibility import cmp_to_key, reduce, is_sequence, range from .logic import _fuzzy_group, fuzzy_or, fuzzy_not from .singleton import S from .operations import AssocOp from .cache import cacheit from ....
# 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...
"""Compressed Sparse Row matrix format""" __docformat__ = "restructuredtext en" __all__ = ['csr_matrix', 'isspmatrix_csr'] import numpy as np from ._base import spmatrix from ._sparsetools import (csr_tocsc, csr_tobsr, csr_count_blocks, get_csr_submatrix) from ._sputils import upcast, get...
""" This module contains functions to handle markers. Used by both the marker functionality of `~matplotlib.axes.Axes.plot` and `~matplotlib.axes.Axes.scatter`. All possible markers are defined here: ============================== =============================================== marker descrip...
# -*- coding: utf-8 -*- # Copyright (C) 2012-2015 MUJIN Inc """ Mujin controller client """ # System imports import os import datetime import base64 import email.utils # Mujin imports from . import ControllerClientError from . import controllerclientraw from . import ugettext as _ from . import json from . import url...
# Natural Language Toolkit: Stemmers # # Copyright (C) 2001-2017 NLTK Project # Author: Steven Tomcavage <stomcava@law.upenn.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ A word stemmer based on the Lancaster stemming algorithm. Paice, Chris D. "Another Stemmer." ACM SIGIR Forum 24.3 (1...
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from django.utils import six from django.utils.six.moves.urllib.parse import quote as urllib_quote from djblets.util.decorators import augment_method_from from djblets.util.http import get...
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 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", ...
########################################################################## # # Copyright (c) 2014, Esteban Tovagliari. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribution...
#!/usr/bin/env python """ DESCRIPTION: This is an extremely simple Python application that demonstrates how to use Elbrys SDN Developer Lab (dev.elbrys.com) to control endpoint user sessions access to the network. This application will connect to one of the switches that you have connected in the SDN Devel...
################################################################################ # 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...
# # Copyright 2014-2017 University of Southern California # Distributed under the (new) BSD License. See LICENSE.txt for more info. # import re import sys import os import csv import random import tempfile import numpy as np from numpy import array, float32, int32, empty, newaxis, dot, cross, zeros, ones from numpy.l...
"""The tests for numeric state automation.""" from datetime import timedelta import pytest import voluptuous as vol import homeassistant.components.automation as automation from homeassistant.components.automation import numeric_state from homeassistant.core import Context from homeassistant.setup import async_setup_...
"""Alexa capabilities.""" from __future__ import annotations import logging from homeassistant.components import ( cover, fan, image_processing, input_number, light, timer, vacuum, ) from homeassistant.components.alarm_control_panel import ATTR_CODE_FORMAT, FORMAT_NUMBER from homeassistant...