gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import uuid import logging import re import time from openerp.osv import osv, fields from openerp import tools, SUPERUSER_ID from openerp.tools.translate import _ from openerp.exceptions import UserError _logger = logg...
import re import functools import datetime import calendar import operator from struct import pack import six from six.moves import reduce from pyhessian.protocol import Call, Object, Remote, Binary from .utils import toposort_flatten from .data_types import long # Implementation of Hessian 1.0.2 serialization # ...
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, 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: # 1. Redistributions of source code must retain the above copyright n...
# -*- coding: utf-8 -*- """TODO(e-carlin): Doc :copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkconfig, pkio from pykern.pkcollections import PKDict fro...
# 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...
#!/urs/bin/python3 """ Test Segmentation """ import random import string import unittest from bacpypes.debugging import ModuleLogger, bacpypes_debugging from bacpypes.primitivedata import CharacterString from bacpypes.constructeddata import Any from bacpypes.comm import Client, bind from bacpypes.pdu import Addres...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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 ...
# -*- test-case-name: twisted.names.test.test_names -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Asynchronous client DNS The functions exposed in this module can be used for asynchronous name resolution and dns queries. If you need to create a resolver with specific requi...
# -*- coding: utf-8 -*- """ vimbuffer ~~~~~~~~~~ VimBuffer and VimBufferContent are the interface between liborgmode and vim. VimBuffer extends the liborgmode.document.Document(). Document() is just a general implementation for loading an org file. It has no interface to an actual file or vim buffer. This is ...
# Copyright (c) 2016, Nordic Semiconductor # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions ...
from django import template from django.template.loader import get_template from django.template.base import FilterExpression from ..sitetreeapp import get_sitetree register = template.Library() # All utility methods are implemented in SiteTree class sitetree = get_sitetree() @register.tag def sitetree_tree(parser,...
import rlp import opcodes import utils import time import blocks import transactions import trie import sys import json import fastvm import copy import specials import bloom import vm from exceptions import * sys.setrecursionlimit(100000) from pyethereum.slogging import get_logger log_tx = get_logger('eth.tx') log_m...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError from ccxt.base.errors import ArgumentsReq...
import mimetypes import sys import typing as t from collections import defaultdict from datetime import datetime from datetime import timedelta from http.cookiejar import CookieJar from io import BytesIO from itertools import chain from random import random from tempfile import TemporaryFile from time import time from ...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
# Copyright 2012 OpenStack Foundation # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ht...
#/******************************************************************************* #* Portions Copyright (C) 2008 Novell, 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: #* #* - Redistributi...
"""SQLite database backend.""" import logging import operator import sqlite3 import struct from contextlib import closing from sqlalchemy import ( Column, INTEGER, MetaData, Table, create_engine, inspect, ) from sqlalchemy.exc import DatabaseError from sqlalchemy.sql import ( cast, ali...
""" Procedure for unit-testing with images: 1. Run unit tests at least once; this initializes a git clone of vispy/test-data in config['test_data_path']. This path is `~/.vispy/test-data` unless the config variable has been modified. The config file is located at `vispy/vispy/util/config.py` 2. Run individ...
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
# -*- 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): # Deleting field 'Order.external_order_id' db.delete_column('shop_order', 'external_order_id') # Ad...
__pyc_insert_c_header__('pyc_c_runtime.h') class __pyc_any_type__: def __str__(self): return __pyc_primitive__(__pyc_symbol__("__pyc_to_str__"), self) def __pyc_tuplify__(self): return __pyc_primitive__(__pyc_symbol__("make_tuple"), self) def __pyc_getslice__(self, i, j, s): return self.__getitem__(s...
"""Test the helper method for writing tests.""" from __future__ import annotations import asyncio import collections from collections import OrderedDict from contextlib import contextmanager from datetime import datetime, timedelta import functools as ft from io import StringIO import json import logging import os imp...
from contextlib import contextmanager import datetime import faulthandler import os import re import signal import subprocess import sys from test import support from test.support import script_helper, is_android, requires_android_level import tempfile import unittest from textwrap import dedent try: import thread...
# Copyright 2013 IBM Corp. # # 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...
# Copyright (c) 2014 VMware, 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...
"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * from distutil...
from evoplotter import utils from evoplotter import plotter from evoplotter import printer from evoplotter import reporting from evoplotter.dims import * import numpy as np # This processor is to be used for exp3 onward. def load_correct_props(folders, name = ""): props_cdgpError = utils.load_properties_dirs(fo...
import classifiers import numpy as np from sklearn import metrics group_names = ["CCA", "PSDA_h1", "PSDA_h2", "PSDA_sum"] col_names = { "CCA": ["CCA_f1", "CCA_f2", "CCA_f3"], "PSDA_h1": ["PSDA_h1_f1", "PSDA_h1_f2", "PSDA_h1_f3"], "PSDA_h2": ["PSDA_h2_f1", "PSDA_h2_f2", "PSDA_h2_f3"], "PSDA_sum": ["PSD...
import warnings from . import expected from gffutils import example_filename, create, parser, feature import gffutils import gffutils.helpers as helpers import gffutils.gffwriter as gffwriter import gffutils.inspect as inspect import gffutils.iterators as iterators import sys import os import six import shutil import t...
#! /usr/bin/env python # Copyright (c) 2016 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# -*- coding: utf-8 -*- ''' @author: Gabriele Girelli @contact: gigi.ga90@gmail.com @description: chromatic aberration correction library. ''' # DEPENDENCIES ================================================================= import numpy as np from skimage import filters from scipy.interpolate import griddata from sk...
import re import sys import types import unittest import inspect import linecache from UserList import UserList from UserDict import UserDict from test.test_support import run_unittest, check_py3k_warnings from test.test_support import check_impl_detail with check_py3k_warnings( ("tuple parameter unpacking ha...
# 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...
# urllib3/util.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from base64 import b64encode from binascii import hexlify, unhexlify from collections import name...
# 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 applicab...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2012 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
#!/usr/bin/python # Copyright 2011 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 appli...
#!/usr/bin/python import sys import os,sympy,time from sympy.galgebra.GA import set_main, make_symbols, types, MV, ZERO, ONE, HALF from sympy import collect set_main(sys.modules[__name__]) def F(x): """ Conformal Mapping Function """ Fx = HALF*((x*x)*n+2*x-nbar) return(Fx) def make_vector(a,n = 3...
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # 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 with...
""" This test suite contains tests to validate certificate create/edit/delete with different possible way and with different roles of users. Test requirement: Below Env variables need to be set CATTLE_TEST_URL - url to rancher server ADMIN_TOKEN - Admin token from rancher USER_TOKEN - User token from rancher RANCHER_CL...
from __future__ import division import pandas as pd import numpy as np import argparse import itertools import glob import os.path as op from skimage import feature from skimage.filters import threshold_otsu from sklearn import preprocessing from scipy.stats import linregress from scipy.cluster import vq import zlib d...
#!/usr/bin/env python from signal import SIGINT, SIGKILL import os import re from servicemanager import subprocess def kill_pid(context, pid, force=False): if _is_system_or_smserver_or_test_process(pid): return "Not allowed to kill system, test or smserver process (pid = %d)" % pid try: if ...
# 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 ...
# -*- coding: utf-8 -*- # Copyright 2021 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 agr...
from __future__ import print_function import os import os.path as op from nose.tools import assert_true, assert_raises from nose.plugins.skip import SkipTest import numpy as np from numpy.testing import assert_array_equal, assert_allclose, assert_equal import warnings from mne.datasets import testing from mne import ...
import math import uuid from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, UserManager from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import models from django.db import IntegrityError from django.utils import tim...
#!/usr/bin/env python """A data store server.""" from BaseHTTPServer import BaseHTTPRequestHandler from BaseHTTPServer import HTTPServer import socket import SocketServer import time import urlparse import uuid import urllib3 from urllib3 import connectionpool # pylint: disable=unused-import,g-bad-import-order from...
# Copyright 2020 The TensorFlow 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 law or agreed to i...
'''python server logic for coordinate daemon .. Your use of this software is governed by your license agreement. Copyright 2012-2015 Diffeo, Inc. ''' from __future__ import absolute_import import logging import sqlite3 import time import cbor from .fifolock import FifoLock logger = logging.getLogger(__name__) ...
# coding: utf8 from gluon.admin import * from gluon.fileutils import abspath from glob import glob import shutil import platform if DEMO_MODE and request.function in ['change_password','pack','pack_plugin','upgrade_web2py','uninstall','cleanup','compile_app','remove_compiled_app','delete','delete_plugin','create_file...
import json from django import forms from django.conf import settings from django.contrib.admin.utils import ( display_for_field, flatten_fieldsets, help_text_for_field, label_for_field, lookup_field, ) from django.core.exceptions import ObjectDoesNotExist from django.db.models.fields.related import ManyToMany...
import datetime from django import http from django.core.cache import cache from django.shortcuts import render_to_response from django.template.defaultfilters import slugify from django.utils.translation import ugettext_lazy as _ from django.views.generic.detail import BaseDetailView from ad_manager.mixins.views imp...
"""ML-ENSEMBLE :author: Sebastian Flennerhag :copyright: 2017-2018 :licence: MIT Base classes for partitioning training data. """ from __future__ import division from abc import abstractmethod import numpy as np from ..externals.sklearn.base import BaseEstimator def prune_train(start_below, stop_below, start_abo...
# 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...
""" This module contains an C{L{OpenIDStore}} implementation backed by flat files. """ import string import os import os.path import time from errno import EEXIST, ENOENT try: from tempfile import mkstemp except ImportError: # Python < 2.3 import warnings warnings.filterwarnings("ignore", ...
# Copyright 2018 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 """Main Labeler task.""" import uuid import urllib import base64 import os import json import datetime import math import tempfile from server_common import mturk_template, create_app, \ database_session, mturk_save from flask import jsonify, request from flask.ext.restful import reqparse ...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ The maths module provides higher-level interfaces to some of the operations that can be performed with the fslmaths command-line program. """ import os import numpy as np from nipype.interfaces...
""" Structural Completeness Testbench Copyright 2013-2014 The Pennsylvania State University """ from xml.etree import ElementTree import os import sys import json import argparse import itertools import uuid import traceback import urllib def id_in_path(id, path): for entry in path: if entry.id == id: ...
# -*- coding: utf-8 -*- """ theflasktest.testsuite.blueprints ~~~~~~~~~~~~~~~~~~~~~~~~~~ Blueprints (and currently modules) :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import flask import unittest import warnings from flask.testsuite import FlaskTestCa...
import logging import pytest import sdk_cmd import sdk_install import sdk_plan import sdk_marathon import sdk_utils import sdk_upgrade from tests import config log = logging.getLogger(__name__) ENFORCED_ROLE = "quota" SERVICE_NAME = "/{}/hello-world".format(ENFORCED_ROLE) LEGACY_ROLE = "{}-role".format(SERVICE_NAME....
#!/usr/bin/python """ @package nilib @file nifwd.py @brief Command line client to perform a NetInf 'get' operation using http convergence layer. @version $Revision: 0.05 $ $Author: stephen $ @version Copyright (C) 2012 Trinity College Dublin and Folly Consulting Ltd This is an adjunct to the NI URI library developed...
import sys import time from datetime import date, datetime from decimal import Decimal from .otypes import OrientRecordLink, OrientRecord, OrientBinaryObject from .exceptions import PyOrientBadMethodCallException class OrientSerializationBinary(object): def __init__(self): self.className = None se...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Run Windows Registry plugin.""" from __future__ import unicode_literals import unittest from plaso.parsers.winreg_plugins import run from tests.parsers.winreg_plugins import test_lib class AutoRunsPluginTest(test_lib.RegistryPluginTestCase): """Tes...
"""Renewable certificates storage.""" import datetime import logging import os import re import configobj import parsedatetime import pytz from letsencrypt import constants from letsencrypt import crypto_util from letsencrypt import errors from letsencrypt import error_handler from letsencrypt import le_util logger ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Deployment model for distributed gasifiers # Jose Daniel Lara # Import from __future__ import division from pyomo.environ import * import googlemaps import matplotlib.pyplot as plt # Replace the API key below with a valid API key. gmaps = googlemaps.Client(key='AIzaSyAh...
"""Test config utils.""" # pylint: disable=protected-access import asyncio import copy import os import unittest.mock as mock from collections import OrderedDict from ipaddress import ip_network import asynctest import pytest from voluptuous import MultipleInvalid, Invalid import yaml from homeassistant.core import S...
# Copyright 2015 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 ...
from pydgraph.client import DgraphClient #Stable client initialization class staticClient(): def __init__(self, ip, port): print("InitClient") self.dg_client = DgraphClient(ip, port) def client(self): return self.dg_client def query(self, cmd): ...
#1 #v 0.001 import COMMON #file vars and functions for import/export processing import VIEWER #mainly for the toggles from VIEWER import __GL,__GLU#,__GLUT #GL functions ''' from COMMON import Scripts #Shapes (private) #Widgets (private) def Button(Text,X,Y,W,H,): pass def Browser(): import os Dir='C:/';...
# # Copyright 2015 Naver Corp. # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import logging import ebstall.errors as errors import collections import re import ebstall.util as util import subprocess import types import ebstall.osutil as osutil import shutil import pkg_resources __author__ = 'dusankl...
# -*- coding: utf-8 -*- # # 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 #...
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime import mock from django.conf import settings as django_settings from django.core.urlresolvers import reverse from django.utils import timezone from raven import Client from sentry.models import Group, Event, Project, User from sentry.tes...
# Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
import asyncio import json import uuid from datetime import datetime import asynqp from asynqp import amqptypes from asynqp import message from asynqp import spec from asynqp import frames from .base_contexts import QueueContext class WhenGettingTheContentHeader: def given_a_message(self): self.correlatio...
# -*- coding: utf-8 -*- """ Sahana Eden Messaging Model @copyright: 2009-2012 (c) Sahana Software Foundation @license: MIT 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 wit...
"""Axis network device abstraction.""" import asyncio import async_timeout import axis from axis.configuration import Configuration from axis.errors import Unauthorized from axis.event_stream import OPERATION_INITIALIZED from axis.mqtt import mqtt_json_to_event from axis.streammanager import SIGNAL_PLAYING, STATE_STO...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import socket from .models import Response from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response impo...
# 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...
""" Classes representing documents in the GenLIMS database. """ import logging import re import datetime from .. import util from .. import parsing logger = logging.getLogger(__name__) def convert_keys(obj): """ Convert keys in a dictionary (or nested dictionary) from snake_case to camelCase; ignore '_i...
# 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. import collections import copy import datetime import json import logging import os import random import sys import tempfile import traceback from py_utils ...
# Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. # NOTE: If you make changes to this file, be sure to restart Mr. Do! import os import sys import traceback import yaml import conf import g from gwis.query_overlord import Query_Overlord from item.feat imp...
capitalized_html_colors = { "Blue": ( 0, 0, 255 ), "Pink": ( 255, 192, 203 ), "Darkorange": ( 255, 140, 0 ), "Fuchsia": ( 255, 0, 255 ), "LawnGreen": ( 124, 252, 0 ...
import struct import subprocess import bisect import collections SAMP = struct.Struct("IIQ4QIIQ") class SamplerFile(object): NTRACE = 4 FLAGS, COUNT, RIP, TRACE0 = range(4) LATENCY, SOURCE, LOAD_ADDRESS = range(TRACE0+NTRACE, TRACE0+NTRACE+3) def __init__(self, fp): if isinstance(fp, basestri...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Olivier Grisel <olivier.grisel@ensta.org> # Andreas Mueller <amueller@ais.uni-bonn.de> # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, TransformerMixin from ....
# 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 (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
try: set except NameError: from sets import Set as set try: sorted except NameError: def sorted(l): l = list(l) l.sort() return l inlineGroupInstance = (list, tuple, set) class KernFeatureWriter(object): """ This object will create a kerning feature in FDK syntax...
""" Module. Includes classes for all TEAPOT elements. The approach is based on the original ORBIT approach developed by J. Holmes. """ import sys import os import math # import teapot base functions from wrapper around C++ functions from orbit.teapot_base import TPB # import the function that creates multidimensiona...
__author__ = 'Ryba' import numpy as np import matplotlib.pyplot as plt import skimage.exposure as skexp from skimage.segmentation import mark_boundaries import os import glob import pydicom # import cv2 # from skimage import measure import skimage.measure as skimea import skimage.morphology as skimor import skimage.fil...
"""Implement the Google Smart Home traits.""" import logging from homeassistant.components import ( alarm_control_panel, binary_sensor, camera, cover, fan, group, input_boolean, light, lock, media_player, scene, script, sensor, switch, vacuum, ) from homeassi...
# 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. """Generates C++ source files from a mojom.Module.""" import mojom.generate.generator as generator import mojom.generate.module as mojom import mojom.genera...
# Copyright 2014 OneConvergence, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import collections from django.apps import apps from framework.postcommit_tasks.handlers import run_postcommit from modularodm.exceptions import NoResultsFound from osf.modm_compat import Q from website.notifications import constants from website.notifications.exceptions import InvalidSubscriptionError from website.p...
# -*- coding: utf-8 -*- """ WSGI container, that handles the HTTP requests. This object is passed to the WSGI server and represents our WsgiDAV application to the outside. On init: Use the configuration dictionary to initialize lock manager, property manager, domain controller. Create a dictionary of ...
# 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 applicable ...