gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# # 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...
import cgi import urllib import time import random import urlparse import hmac import binascii VERSION = '1.0' # Hi Blaine! HTTP_METHOD = 'GET' SIGNATURE_METHOD = 'PLAINTEXT' # Generic exception class class OAuthError(RuntimeError): def __init__(self, message='OAuth error occured.'): self.message = messag...
import io import itertools import os import sys from collections import defaultdict from copy import deepcopy from pkgutil import get_data from urllib.parse import urljoin import lxml.html import requests from cf_units import Unit from lxml import etree from netCDF4 import Dataset, Dimension, Variable from pkg_resou...
"""Unit test for Switch objects.""" from unittest.mock import AsyncMock, Mock from xknx import XKNX from xknx.devices import Switch from xknx.dpt import DPTBinary from xknx.telegram import GroupAddress, Telegram from xknx.telegram.apci import GroupValueRead, GroupValueResponse, GroupValueWrite class TestSwitch: ...
from collections import Iterable from difflib import get_close_matches from numbers import Real import re from warnings import warn import numpy as np import h5py import openmc.checkvalue as cv from openmc.mixin import EqualityMixin from . import HDF5_VERSION, HDF5_VERSION_MAJOR from .data import K_BOLTZMANN, ATOMIC_...
#!/usr/bin/env python # Copyright (c) 2017-2021 F5 Networks, 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 appl...
from __future__ import print_function, division from collections import defaultdict from sympy.core.function import expand_log, count_ops from sympy.core import sympify, Basic, Dummy, S, Add, Mul, Pow, expand_mul, factor_terms from sympy.core.compatibility import ordered, default_sort_key, reduce from sympy.core.numb...
#!/usr/bin/env python3 import os from subprocess import ( check_output, CalledProcessError, STDOUT ) import random import shutil from shutil import copyfile from crontab import CronTab from charmhelpers.core import unitdata from charmhelpers.core.host import ( lsb_release, service_running, ser...
from enum import Enum, auto from typing import Any, Dict, List, Optional, Tuple from django.core.exceptions import ValidationError from django.utils.translation import gettext as _ class ErrorCode(Enum): BAD_REQUEST = auto() # Generic name, from the name of HTTP 400. REQUEST_VARIABLE_MISSING = auto() RE...
#!/usr/bin/env python # Copyright 2015 The Shaderc 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 ...
from __future__ import absolute_import from django import forms from django.db.models import BLANK_CHOICE_DASH from django.template.defaultfilters import slugify from starslib import base from . import models from six.moves import range from six.moves import zip class CreateGameForm(forms.ModelForm): class Meta...
# Copyright (c) 2015 Jonathan M. Lange <jml@mumak.net> # # 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...
import cmd import sys import textwrap import loadJSON DESC = 'desc' NORTH = 'north' SOUTH = 'south' EAST = 'east' WEST = 'west' UP = 'up' DOWN = 'down' GROUND = 'ground' SHOP = 'shop' GROUNDDESC = 'grounddesc' SHORTDESC = 'shortdesc' LONGDESC = 'longdesc' TAKEABLE = 'takeable' EDIBLE = 'edible' DESCWORDS = 'descwords'...
import configparser import unittest from pathlib import Path from TM1py import Element from TM1py.Exceptions import TM1pyException from TM1py.Objects import Dimension, Hierarchy, Subset from TM1py.Services import TM1Service class TestHierarchyService(unittest.TestCase): tm1: TM1Service prefix = 'TM1py_Tests_...
from django.urls import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from django.core.cache import cache from django.db import connection from lfs.core.fields.thumbs import ImageWithTh...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Character.characterImage' db.add_column('main_character',...
import numpy as np from neupy import layers from neupy.utils import asfloat from neupy.exceptions import LayerConnectionError from base import BaseTestCase class OldInlineDefinitionsTestCase(BaseTestCase): def test_inline_network_python_compatibility(self): network = layers.Input(1) > layers.Relu(2) ...
#-*- coding: utf-8 -*- class ScratchCommands: def __init__(self): self.catNames = [ "operators", "sensing", "data", "looks", "motion", "events", "control", ...
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # Unles...
# Prototyping of libgeos_c functions, now using a function written by # `tartley`: http://trac.gispython.org/lab/ticket/189 import ctypes class allocated_c_char_p(ctypes.c_char_p): pass EXCEPTION_HANDLER_FUNCTYPE = ctypes.CFUNCTYPE(None, ctypes.c_char_p, ctypes.c_char_p) def prototype(lgeos, geosVersion): ...
#!/usr/bin/env python """Unit tests for Credential Wallet class NERC DataGrid Project """ __author__ = "P J Kershaw" __date__ = "03/10/08" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __revis...
import unittest import charitycheck import re import datetime import anydbm as dbm class TestIRSNonprofitDataContextManager(unittest.TestCase): # we break test the principle of keeping tests # independent below, sometimes with good reason, # sometimes for convenience because this is a small # module. ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Simple Mac OS X Application Bundler for Mumble # # Loosely based on original bash-version by Sebastian Schlingmann (based, again, on a OSX application bundler # by Thomas Keller). # import sys, os, string, re, shutil, plistlib, tempfile, exceptions, datetime, tarfile f...
#!/usr/bin/env python ''' Compliance Test Suite for testing the netcdf file name http://www.imos.org.au/ ''' import sys import argparse import os.path import datetime import re import yaml from pkg_resources import resource_filename from compliance_checker.base import BaseCheck, BaseNCCheck, Result # Initial refer...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import tempfile from pathlib import Path from typing import AsyncGenerator from unittest import mock from idb.common.d...
# Copyright (c) 2014 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...
#!/usr/bin/env python ''' Created February, 2011 @author: Dr. Rainer Hessmer DeadReckoning.py - A Python implementation of the tutorial http://www.ros.org/wiki/pr2_controllers/Tutorials/Using%20the%20base%20controller%20with%20odometry%20and%20transform%20information Copyright (c) 2011 Dr. Rainer Hessmer. All ...
# Copyright 2016 Twitter. 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 agree...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from ... import units as u from .py3_test_quantity_annotations import * # list of pairs (target unit/physical type, input unit) x_inputs = [(u.arcsec, u.deg), ('angle', u.deg), (u.kpc/u.Myr, u.km/u.s), ...
import logging import numpy as np import pydart from fileinfoworld import FileInfoWorld from controller import Controller import gltools from spring_stair import SpringStair from motion import * from hyper import * from plotter_torque import PlotterTorque # from guppy import hpy class Simulation(object): def __in...
# 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 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
# Temporary version of simplejson in a single file to get around older packaging # restrictions in previous releases of Access Grid 2. # --------------------------------------------------------------------------------------- # simplejson/scanner.py """ Iterator based sre token scanner """ import sre_parse, sre_compi...
"""Example running MemN2N on a single bAbI task. Download tasks from facebook.ai/babi """ from __future__ import absolute_import from __future__ import print_function import random from itertools import chain from six.moves import range, reduce import logging import sys from sklearn import metrics import tensorflow a...
#!/usr/bin/python # Copyright (c) 2013 Dropbox, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
""" old_api.py: adapter for nengo_theano and [Jython] nengo-1.4 The purpose of this emulation layer is to run scripts and tests that were written for nengo-1.4 and theano_nengo. Authors are encouraged to use the "api.py" file instead of this file for their current work. """ import logging import random import numpy...
__author__ = 'Administrator' import json import time import random from cinder.volume import driver from hwcloud.database_manager import DatabaseManager from hwcloud.hws_service.client import HWSClient from cinder.openstack.common import log as logging from cinder.volume.drivers.hws import sshutils as sshclient from ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import pytest pytest.importorskip('numpy') import itertools from operator import getitem from dask.compatibility import skip import dask.array as da from dask.array.slicing import (slice_array, _slice_1d, take, new_blockdim, sanitize_index) from dask.array.utils import assert_eq import...
import sqlite3 from math import sqrt import sys class DGFAnalyzer: DebugLevel = 0 def __init__(self,Filename): self.Filename=Filename self.FunctionNames={} self.Address2Function={} conn=sqlite3.connect(self.Filename) conn.text_factory = str self.Cursor=conn.cursor() def CacheFunctionInfo(self): TmpCu...
# -*- coding: UTF-8 -*- """plistlib.py -- a tool to generate and parse MacOSX .plist files. The PropertList (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. To write out a plist file, use the writePl...
########################################################################### # # 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 # # https://www.apache.org/l...
""" Test api_objects.py """ import mock import unittest from fmcapi import api_objects class TestApiObjects(unittest.TestCase): def test_ip_host_required_for_put(self): self.assertEqual(api_objects.Hosts.REQUIRED_FOR_PUT, ["id", "name", "value"]) @mock.patch("fmcapi.api_objects.APIClassTemplate.pars...
# MIT License # # Copyright (c) 2017, Stefan Webb. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
#!/usr/bin/env python # vim:ts=4:sw=4:et: from __future__ import absolute_import, division, print_function import binascii import collections import inspect import os import sys import tempfile import uuid from pywatchman import ( SocketConnectError, SocketTimeout, Transport, WatchmanError, bser, ...
# 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 ...
from django import forms from django.contrib.auth import authenticate from django.utils.encoding import smart_text from django.utils.translation import ugettext as _ from .. import scope from ..constants import RESPONSE_TYPE_CHOICES, SCOPES from ..forms import OAuthForm, OAuthValidationError from ..scope import SCOPE_N...
# 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 requir...
"""Support for Rflink devices.""" import asyncio from collections import defaultdict import logging import async_timeout from rflink.protocol import create_rflink_connection from serial import SerialException import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, CONF_COMMAND, CONF_HOS...
""" Tests of the core auth models (Role, Membership, Collection, FacilityUser, etc). """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.db.utils import IntegrityError from django.test im...
# -*- coding: utf-8 -*- """ celery.app.defaults ~~~~~~~~~~~~~~~~~~~ Configuration introspection and defaults. """ from __future__ import absolute_import import sys from collections import deque from datetime import timedelta from celery.utils import strtobool from celery.utils.functional import memoize...
""" Second-Hand-Shop Project @author: Malte Gerth @copyright: Copyright (C) 2015 Malte Gerth @license: MIT @maintainer: Malte Gerth @email: mail@malte-gerth.de """ import logging from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from rest_framework.de...
# -*- coding: utf-8 -*- # Copyright (c) 2013, First Party Software # 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 notice, # t...
#!/usr/bin/env python """Tests for administrative flows.""" import subprocess import sys import time import psutil from grr.lib import aff4 from grr.lib import config_lib from grr.lib import email_alerts from grr.lib import flow from grr.lib import maintenance_utils from grr.lib import rdfvalue from grr.lib impor...
# File: CeFs.py ; This file is part of Twister. # version: 3.026 # Copyright (C) 2012-2014, Luxoft # Authors: # Andrei Costachi <acostachi@luxoft.com> # Cristi Constantin <crconstantin@luxoft.com> # Daniel Cioata <dcioata@luxoft.com> # Mihai Tudoran <mtudoran@luxoft.com> # Licensed under the Apache Lic...
# # 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 # ...
# Analyzes an object and outputs numeric properties import cv2 import numpy as np from . import fatal_error from . import print_image from . import plot_image from . import rgb2gray_hsv from . import find_objects from . import binary_threshold from . import define_roi from . import roi_objects from . import object_com...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import difflib import json import textwrap from typing import Dict, cast from typing_extensions import Literal from pants.base.build_environment import pants_version from pants.help.help...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Zhijiang Yao, Jie Dong and Dongsheng Cao # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ #####...
#!/usr/bin/env python """Module with GRRWorker implementation.""" import pdb import time import traceback import logging from grr.lib import aff4 from grr.lib import config_lib from grr.lib import flags from grr.lib import flow from grr.lib import master from grr.lib import queue_manager as queue_manager_lib from ...
# 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) 2020 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import copy import io import os import pathlib from ruamel.yaml import YAML from ruamel.yaml.comments import CommentedMap import pytest imp...
# 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 ...
# -*- coding:utf-8 -*- # # 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 re...
import base64 import binascii import functools import os from datetime import datetime from urllib.parse import quote_plus from django.conf import settings from django.contrib.auth import login, logout from django.contrib.auth.signals import user_logged_in from django.core import signing from django.db.models import ...
from __future__ import absolute_import import csv import functools import logging import os import sys import tempfile import warnings from pip._vendor import pkg_resources from pip.compat import uses_pycache, WINDOWS, cache_from_source from pip.compat import get_stdlib from pip.exceptions import UninstallationError...
''' Functions for helping with serialization and deserialization of Bokeh objects. Certain NunPy array dtypes can be serialized to a binary format for performance and efficiency. The list of supported dtypes is: {binary_array_types} ''' from __future__ import absolute_import import logging log = logging.getLogger(_...
# Natural Language Toolkit: Chunk parsing API # # original file: http://www.nltk.org/_modules/nltk/chunk/named_entity.html # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Named entity chunker """ from __future_...
import sys import types import inspect import re import optparse from collections import defaultdict from textwrap import wrap from scriptine import misc, log def parse_and_run_function(function, args=None, command_name=None, add_dry_run_option=True, add_verbosity_option=True): #TODO refactor me, I'm too ...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Tests for plugins.""" import os.path import coverage from coverage import env from coverage.backward import StringIO from coverage.control import Plugins from ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import mock import time import unittest import logging import functools from nose.tools import * # noqa: F403 import pytest from framework.auth.core import Auth from website import settings import website.sea...
import sys from PyQt4 import QtGui, QtCore from PyQt4.QtCore import Qt from ext import * class Main(QtGui.QMainWindow): def __init__(self,parent=None): QtGui.QMainWindow.__init__(self,parent) self.filename = "" self.changesSaved = True self.initUI() def initToolbar(self): ...
import os import sys import pytest from os.path import join from sqlalchemy.exc import InvalidRequestError from textwrap import dedent from ...api import Gradebook from .. import run_nbgrader from .base import BaseTestApp class TestNbGraderAssign(BaseTestApp): def test_help(self): """Does the help disp...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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/...
#!/usr/bin/python # convert LLVM GenSystemRegister.inc for Capstone disassembler. # by Nguyen Anh Quynh, 2019 import sys if len(sys.argv) == 1: print("Syntax: %s <GenSystemRegister.inc>" %sys.argv[0]) sys.exit(1) f = open(sys.argv[1]) lines = f.readlines() f.close() #arch = sys.argv[2].upper() print(""" /*...
# ----------------------------------------------------------------------------- # Copyright (c) 2015 Ralph Hempel <rhempel@hempeldesigngroup.com> # Copyright (c) 2015 Anton Vanhoucke <antonvh@gmail.com> # Copyright (c) 2015 Denis Demidov <dennis.demidov@gmail.com> # Copyright (c) 2015 Eric Pascual <eric@pobot.org> # # ...
""" This module contains objects related to experimental design abstractions. Public objects are imported in ``__init__.py``. """ from collections.abc import Iterable import itertools import collections from copy import copy import numpy as np from schema import Schema, Or, Optional, And, Use import experimentator.or...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import print_function from mock import patch from mock import Mock from mock import ANY import os import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest try: sys.path.append(os.path.dirname(os.path.realpat...
# Copyright (c) 2019 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Test the simplified plotting interface.""" from datetime import datetime from io import BytesIO import warnings import cartopy.crs as ccrs import cartopy.feature as cfeature ...
""" Copyright (C) 2010 David Fong and Michael Saunders Distributed under the same license as SciPy Testing Code for LSMR. 03 Jun 2010: First version release with lsmr.py David Chin-lung Fong clfong@stanford.edu Institute for Computational and Mathematical Engineering Stanford University Michael Saunders ...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Tickformatstop(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "densitymapbox.colorbar" _path_str = "densitymapbox.colorbar.tickformatstop" _valid_p...
# -*- coding: utf-8 -*- """User views.""" from datetime import date from dateutil.relativedelta import relativedelta from flask import Blueprint, abort, flash, jsonify, request, url_for from flask_login import current_user, login_required from shop.cart.models import Sale from shop.user.forms import AccountForm, Addre...
# Copyright 2018 Internap. # # 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, so...
from discord.ext import commands from . import util from .util import m class TimerCategory (util.Cog): @commands.group('timer', aliases=['t'], invoke_without_command=True) async def group(self, ctx, *, input: str): ''' Manages character timers Timers help track values that change ov...
""" Create a boolean mask for if the pixels of a texture is constrained, True, or free, False. Written by Zachary Ferguson """ import itertools import logging import numpy import scipy import scipy.sparse from tqdm import tqdm from .seam_intervals import compute_edge_intervals from .points_in_triangle import points...
#!/usr/bin/env python """ A program to solve the 3D incompressible magnetohydrodynamics equations using the implicit midpoint rule The program is based on the Orszag-Patterson algorithm as documented on pg. 98 of C. Canuto, M.Y. Hussaini, A. Quarteroni and T.A. Zhang "Spectral Methods: Evolution to Complex Geometri...
import sys import numpy as np from AnyQt.QtWidgets import QLayout from Orange.base import SklLearner from Orange.classification import OneClassSVMLearner, EllipticEnvelopeLearner from Orange.data import Table, Domain, ContinuousVariable from Orange.widgets import widget, gui from Orange.widgets.settings import Settin...
#!/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. """Unit tests for gclient.py. See gclient_smoketest.py for integration tests. """ import Queue import copy import logging import ...
""" #;+ #; NAME: #; fN.data #; Version 2.0 #; #; PURPOSE: #; Module for fN data constraints #; 12-Mar-2015 by JXP edited by Alix Feinsod #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function, absolute_import, division, unicode_literals ...
#!/usr/bin/python # Naomi Hiebert coded this #import our data structures from accMacDict import accMac from unaMacDict import unaMac from binMacDict import binMac from jmpMacDict import jmpMac from asmDicts import opcodes, unaryOpcodes, dataTypes #import global variables import globalVars # The real heart of th...
# -*- coding: utf-8 -*- from datetime import datetime as dt import pytz import logging import re import os import json import shutil import requests import tempfile from django.core.management.base import BaseCommand from osf.utils.permissions import ADMIN, WRITE from osf.models import ( ApiOAuth2PersonalToken, ...
# Paper -> Font and Background Color # Independent Text Binarization # using egde boxes to isolate and identify # characters; edge boxes with intensity values # will be stord in one of the intermediate images import cv2 import numpy as np import sys import os.path # check args if len(sys.argv) != 3: print "%s [inp...
""" Test the functions that load libgmt. """ import ctypes import shutil import subprocess import sys import types from pathlib import PurePath import pytest from pygmt.clib.loading import check_libgmt, clib_full_names, clib_names, load_libgmt from pygmt.exceptions import GMTCLibError, GMTCLibNotFoundError, GMTOSError...
# Copyright (C) 2012 # See LICENSE.txt for details. """ Epytext (and general Python docstring) wrapper ============================================== Utility for wrapping docstrings in Python; specifically, docstrings in U{Epytext <http://epydoc.sourceforge.net/manual-epytext.html>} format, or those that are close en...
# -*- coding: utf-8 -*- """ zine.pluginsystem ~~~~~~~~~~~~~~~~~ This module implements the plugin system. Plugin Distribution ------------------- The best way to distribute plugins are `.plugin` files. Those files are simple zip files that are uncompressed when installed from the plugin...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# # 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...
"""Support for Mikrotik routers as device tracker.""" import logging import ssl import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner) from homeassistant.const import ( CONF_HOST, CONF_PASSWOR...
from django.utils.translation import ugettext from livesettings import values from livesettings.exceptions import SettingNotSet from livesettings.utils import is_string_like import logging import warnings log = logging.getLogger('configuration') _NOTSET = object() class ConfigurationSettings(object): _instance ...
#!/usr/bin/env python # # Copyright (c) 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. """Provisions Android devices with settings required for bots. Usage: ./provision_devices.py [-d <device serial number>] """ ...