gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import curses import curses.textpad from mbf import * # http://docs.python.org/2/library/curses.html class MainScreen: def __init__( self, screen, month ): self.filedir = "" self.whichwin = "cat" self.screen = screen self.month = month self.loadscreens() def loadscr...
import logging from datetime import datetime, timedelta from .models import Challenge from .utils import get_challenge_id as _id from users.models import UserNode, Profile from users.utils import user_node from geo.continents import (AFRICA, ASIA, EUROPE, NORTH_AMERICA, SOUTH_AMERICA, OCE...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Line(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "funnel.marker" _path_str = "funnel.marker.line" _valid_props = { "autocolorscale", ...
import speech_recognition as sr import argparse import sys import time import base64 import enum class SpeechController(): def __init__(self, gestureController, state_machine=None): self._state_machine = state_machine self._gesture_controller = gestureController self.init_state = enum.SpeechState.INIT self.d...
from collections import OrderedDict, defaultdict, namedtuple, Counter from collections.abc import Iterable from copy import deepcopy from numbers import Real from pathlib import Path import re import warnings from xml.etree import ElementTree as ET import numpy as np import openmc import openmc.data import openmc.che...
r""" Convert a restructured text document to html. Inline math markup can uses the *math* directive, or it can use latex style *\$expression\$*. Math can be rendered using simple html and unicode, or with mathjax. """ import re from contextlib import contextmanager # CRUFT: locale.getlocale() fails on some versions...
# oxy.io # File: oxyio/views/object.py # Desc: Flask routes for internal object calls from flask import abort, request, g from jinja2 import TemplateNotFound from oxyio.models.user import User from oxyio.data import get_object_or_404 from oxyio.web.route import html_api_route from oxyio.web.request import get_reques...
import time, os from store import HTree, HStore from fnv1a import get_hash as fnv1a import unittest import pickle TEST_KEY = 'test' TEST_VER = 2 TEST_HASH = (fnv1a(TEST_KEY)* 3) & 0xffff class TestHTree(unittest.TestCase): def setUp(self): self.htree = HTree("t.tch", 0) self.htree.clear() de...
# Copyright 2012 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 agree...
# -*- coding: utf-8 -*- __doc__ = """ WebSocket within CherryPy is a tricky bit since CherryPy is a threaded server which would choke quickly if each thread of the server were kept attached to a long living connection that WebSocket expects. In order to work around this constraint, we take some advantage of some inter...
# Run the tests in Programs/_testembed.c (tests for the CPython embedding APIs) from test import support import unittest from collections import namedtuple import contextlib import json import os import re import shutil import subprocess import sys import tempfile import textwrap MS_WINDOWS = (os.name == 'nt') MACOS...
from __future__ import division, print_function, absolute_import import numpy as np from . import BPoly, PPoly from .polyint import _isscalar __all__ = ["PchipInterpolator", "pchip_interpolate", "pchip", "Akima1DInterpolator"] class PchipInterpolator(object): """PCHIP 1-d monotonic cubic interpolat...
from __future__ import division """ Author: Emmett Butler """ __license__ = """ Copyright 2015 Parse.ly, 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/LICE...
import datetime import re from warnings import ( catch_warnings, simplefilter, ) import numpy as np import pytest from pandas._libs.tslibs import Timestamp import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, _testing as tm, bdate_range, read_hdf, ) from ...
# Copyright 2020 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
from itertools import product import os import os.path as op import pytest import numpy as np from numpy.testing import assert_equal, assert_allclose, assert_array_equal from mne.channels import make_standard_montage from mne.datasets import testing from mne.io import read_raw_fif, read_raw_kit, read_raw_bti, read_in...
# -*- coding: utf-8 -*- # Copyright (c) 2021, Michael Boyle # See LICENSE file for details: <https://github.com/moble/quaternion/blob/main/LICENSE> from __future__ import division, print_function, absolute_import import numpy as np from quaternion.numba_wrapper import njit, jit, xrange def fd_derivative(f, t): ...
import numpy as np from itertools import combinations import pickle from multiprocessing import Pool import sys class DataManager(object): def __init__(self, explanans_size, random_size, file_name=sys.argv[1], explanandum_size=3, add_random=True): self.folder_path = "data" self.file_path = "../....
# 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 ...
""" @package mi.instrument.seabird.sbe54tps.ooicore.driver @file /Users/unwin/OOI/Workspace/code/marine-integrations/mi/instrument/seabird/sbe54tps/ooicore/driver.py @author Roger Unwin @brief Driver for the ooicore Release notes: """ import re import time from mi.core.log import get_logger from mi.core.util import ...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import from scipy import special from scipy.special import entr, gammaln as gamln from scipy.misc import logsumexp from scipy._lib._numpy_compat import broad...
from __future__ import division from future.utils import raise_from import math import time from datetime import datetime from operator import itemgetter from pocket import ( Pocket, PocketException, PocketAutException ) from progress.spinner import Spinner from .config import Configs from .exceptions i...
"""Target model.""" import enum from gps_position import GpsPosition from django.conf import settings from django.db import models class Choices(enum.IntEnum): """Base class for enums used to limit Django field choices, plus other helper methods. Item names should be lowercase to work properly with look...
import copy from crispy_forms.utils import TEMPLATE_PACK from django import forms from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied, FieldError from django.db import models, transaction from django.forms.models import modelform_factory, modelform_defines_fie...
import cgi import urllib import time import random import urlparse import hmac import base64 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 = message ...
import unittest import saspy from saspy.tests.util import Utilities class TestSASstat(unittest.TestCase): @classmethod def setUpClass(cls): cls.sas = saspy.SASsession() util = Utilities(cls.sas) procNeeded=['reg', 'mixed', 'hpsplit', 'hplogistic', 'hpreg', 'glm', 'logistic', 'tpspl...
# GENERATED FILE - DO NOT EDIT THIS FILE UNLESS YOU ARE A WIZZARD #pylint: skip-file from heat.engine import properties from heat.engine import constraints from heat.engine import attributes from heat.common.i18n import _ from avi.heat.avi_resource import AviResource from avi.heat.avi_resource import AviNestedResource...
# 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...
from sympy import Matrix from sympy.tensor.tensor import tensor_indices, TensorHead, tensor_heads, \ TensExpr, canon_bp from sympy import eye from sympy.physics.hep.gamma_matrices import GammaMatrix as G, LorentzIndex, \ kahane_simplify, gamma_trace, _simplify_single_line, simplify_gamma_expression def _is_t...
import os from pymacaron.log import pymlogger import json import imp utils = imp.load_source('utils', os.path.join(os.path.dirname(__file__), 'utils.py')) log = pymlogger(__name__) tmpdir = '/tmp/test-pym-microservice' reportpath = os.path.join(tmpdir, "error_report.json") try: os.stat(tmpdir) except Exceptio...
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
'''tzinfo timezone information for America/Godthab.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Godthab(DstTzInfo): '''America/Godthab timezone definition. See datetime.tzinfo for details''' zone = 'America/Godthab' ...
""" Construct dicts containing identifying information and DataFrames for train, val, test splits of data, for use with classifiers. See docs/datasets.md for more information on Vislab datasets. """ import numpy as np import pandas as pd import requests import os import subprocess import csv import vislab import visla...
""" Record Arrays ============= Record arrays expose the fields of structured arrays as properties. Most commonly, ndarrays contain elements of a single type, e.g. floats, integers, bools etc. However, it is possible for elements to be combinations of these, such as:: >>> a = np.array([(1, 2.0), (1, 2.0)], dtype=[...
# Copyright 1999 by Jeffrey Chang. All rights reserved. # Copyright 2009-2015 by Peter Cock. All rights reserved. # # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Code for more fancy file handle...
#!/usr/bin/env python3 import datetime import logging import math import os import random import re import signal import subprocess import sys import telnetlib import time import IPy import vrnetlab def handle_SIGCHLD(signal, frame): os.waitpid(-1, os.WNOHANG) def handle_SIGTERM(signal, frame): sys.exit(0)...
import pytest import numpy as np from datetime import timedelta from distutils.version import LooseVersion import pandas as pd import pandas.util.testing as tm from pandas import to_timedelta from pandas.util.testing import assert_series_equal, assert_frame_equal from pandas import (Series, Timedelta, DataFrame, Time...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 2014 The Oppia 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 ...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
# -*- coding: utf-8 -*- # Copyright 2017, 2021 ProjectQ-Framework (www.projectq.ch) # # 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....
# # Module providing the `SyncManager` class for dealing # with shared objects # # multiprocessing/managers.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright (c) 2014 Hitachi Data Systems, 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 # # U...
"""This demo program solves the incompressible Navier-Stokes equations on an L-shaped domain using Chorin's splitting method.""" # Copyright (C) 2010-2011 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Publi...
import cPickle as pickle import copy import os import menpo.io as mio import numpy as np from menpo.feature import no_op from menpo.landmark import labeller, face_ibug_68_to_face_ibug_66_trimesh from menpo.math import as_matrix from menpo.model import PCAModel from menpo.transform import PiecewiseAffine from menpofit....
# 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...
#!/usr/bin/env python """This file contains utility classes related to maintenance used by GRR.""" import hashlib import os import logging from grr.lib import access_control from grr.lib import aff4 from grr.lib import build from grr.lib import config_lib from grr.lib import rdfvalue from grr.lib.rdfvalues import...
# 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...
from django.conf import settings from django.contrib import messages from django.core.signing import BadSignature, Signer from django.utils.functional import SimpleLazyObject, empty from django.utils.translation import ugettext_lazy as _ from oscar.core.compat import MiddlewareMixin, user_is_authenticated from oscar.c...
#!/usr/bin/env python import sys from os import path, mkdir import shutil from glob import glob import subprocess import random def write_script_header(cluster, script, event_id, walltime, working_folder): if cluster == "nersc": script.write( """#!/bin/bash -l #SBATCH -p shared #SBATCH -n 1 #SBATCH -J UrQ...
# Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from captcha.fields import ReCaptchaField from django import forms from django.conf import settings from django.contrib.auth import get_user_model from django.core.mail import send_mail from django.template.loader import render_to_string from django.urls import reverse from allauth.account import app_settings as acco...
# # Copyright 2005 OpenHosting, 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 w...
# 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 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
#!/usr/local/bin/python3 """ containers Python 3 version This is a simple implementation of Stack, Queue, and Deque Under the covers these are all derived from a doubley linked list class Clive Darke QA """ class _Node: def __init__(self, Data): self.NextNode = None self.PrevNode = None s...
import re from collections import namedtuple from contextlib import contextmanager import warnings DeprecatedOption = namedtuple('DeprecatedOption', 'key msg rkey removal_ver') RegisteredOption = namedtuple( 'RegisteredOption', 'key msg rkey removal_ver' ) _deprecated_options = {} # holds deprecated option m...
from __future__ import unicode_literals, division, absolute_import from datetime import datetime from functools import partial import json import logging from flexget.entry import Entry from flexget.event import event from flexget.plugin import PluginError from flexget.utils import qualities from flexget.utils.database...
# Copyright 2016 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. """Module to get random numbers, strings, etc. The values returned by the various functions can be replaced in templates to generate test cases. """ ...
from time import time, sleep import sys import os import marshal from multiprocessing import Process, JoinableQueue, cpu_count, current_process def tanimoto_similarity(set1, set2): """ Function calculates Tanimoto similarity between set1 and set2 :param set1: set #1 to compare :param set2: set #2 to c...
# Copyright (c) 2022, Manfred Moitzi # License: MIT License # Immutable spatial search tree based on the SsTree implementation of the book # "Advanced Algorithms and Data Structures" # - SsTree JavaScript source code: # (c) 2019, Marcello La Rocca, released under the GNU Affero General Public License v3.0 # https...
__author__ = 'stonerri' ''' This code acts as the application's primary controller, and provides links to the following: ''' import tornado.escape import tornado.ioloop import tornado.options import tornado.web import tornado.websocket import tornado.gen import tornado.auth import tornado.autoreload from tornad...
#!/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...
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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...
import sys from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import FieldError from django.core.exceptions import PermissionDenied from django.template import TemplateDoesNotExist, Temp...
# coding=utf-8 # Copyright 2014 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 itertools imp...
# 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 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 logging logger = logging.getLogger(__name__) _LOCK_SCREEN_SETTINGS_PATH = '/data/system/locksettings.db' _ALTERNATE_LOCK_SCREEN_SETTINGS_PATH = ( ...
""" The MIT License Copyright (c) 2009 Vic Fryzel 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, merge, publish...
import os import pytest from astropy import units as u from astropy.time import Time from pocs.observatory import Observatory from pocs.scheduler.dispatch import Scheduler from pocs.scheduler.observation import Observation from pocs.utils import error has_camera = pytest.mark.skipif( not pytest.config.getoption(...
# 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 agre...
# -*- 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...
# Copyright 2019 D-Wave 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 law or...
# Copyright (c) 2014 OpenStack Foundation, all rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# =============================================================================== # Copyright 2013 Jake Ross # # 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/licens...
#!/usr/bin/env python """ Sentry ====== Sentry is a realtime event logging and aggregation platform. It specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop. Sentry is a Server ------------------ The Sentry ...
"""Utility functions for environment.py""" import os import cv2 import math import random import numpy as np import carla import pygame import threading import datetime from typing import Union from tensorforce.agents import Agent # constants: epsilon = np.finfo(np.float32).eps # Use this dict to convert lanes obj...
# -*- coding: utf-8 -*- """ tests.views ~~~~~~~~~~~ Pluggable views. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask import flask.views from werkzeug.http import parse_set_header def common_test(app): c = app.test_client(...
import morepath from morepath.traject import ( TrajectRegistry, Node, Step, TrajectError, is_identifier, parse_variables, Path, create_path, parse_path, normalize_path, ParameterFactory, ) from morepath.converter import Converter, IDENTITY_CONVERTER import pytest from webob.e...
import os import json import random import time import logging from boto.s3.connection import S3Connection from boto.exception import S3ResponseError from boto.s3.key import Key from .constants import * from .docManager import DocManager from .cluster import Cluster from .clusterTableManager import ClusterTableManage...
""" Module where admin tools dashboard modules classes are defined. """ from django.apps import apps as django_apps from django.core.urlresolvers import reverse from django.forms.utils import flatatt from django.utils.itercompat import is_iterable from django.utils.text import capfirst from django.utils.translation i...
from __future__ import absolute_import, division, print_function, unicode_literals import copy import datetime from dateutil.parser import parse from decimal import Decimal import sys import uuid from amaascore.error_messages import ERROR_LOOKUP from amaascore.exceptions import TransactionNeedsSaving from amaascore.c...
import contextlib import json import os import re import shutil import tempfile import time import dcoscli from dcos import util from .helpers.common import (assert_command, exec_command, file_json_ast, zip_contents_as_json) from .helpers.marathon import watch_all_deployments command_base...
#!/usr/bin/env python from __future__ import print_function import argparse import errno import itertools import json import multiprocessing import os import shutil import subprocess import sys import traceback BARE_INTERFACE_SEARCH_PATHS = [ "usr/lib/swift", "System/iOSSupport/usr/lib/swift" ] DEFAULT_FRAME...
#coding=utf-8 import os import uuid from django.http import Http404 from django.shortcuts import render, redirect from django.utils import six from django.utils.translation import ugettext as _ from django.contrib import messages from django.contrib.auth.decorators import login_required from avatar.conf import sett...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
"""Plugs are ins and outs for Nodes through which they exchange data.""" from __future__ import print_function import sys import warnings from abc import abstractmethod from .utilities import get_hash try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict if sys.ver...
import pytest import numpy as np import scipy.sparse as sp from scipy import linalg from numpy.testing import assert_array_almost_equal, assert_array_equal from numpy.random import RandomState from sklearn.datasets import make_classification from sklearn.utils.sparsefuncs import (mean_variance_axis, ...
# -*- coding: utf-8 -*- """ DNS server framework - intended to simplify creation of custom resolvers. Comprises the following components: DNSServer - socketserver wrapper (in most cases you should just need to pass this an appropriate resolver instance an...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Yahoo! 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...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import requests import json import re import fileinput from optparse import OptionParser import subprocess import os import sys import time from datetime import datetime import pprint from perf_data_management import manage_test_result from couchbase.bucket import Bucket from couchbase.exceptions import * import c...
import storytext.guishared, util, types, logging, sys, os from storytext.definitions import UseCaseScriptError from storytext.gridformatter import GridFormatter # Some unused imports to make sure classloader loads necessary classes from org.eclipse.swt.layout import GridLayout, FillLayout, FormLayout, RowLayout #@Unu...
import collections import math import numpy as np from rig.place_and_route import Cores, SDRAM import struct from nengo.processes import Process from nengo.utils import numpy as npext from nengo_spinnaker.builder.ports import OutputPort from nengo_spinnaker.builder.netlist import netlistspec from nengo_spinnaker.netl...
"""Daemon startup and shutdown helpers.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # abdi_startstop # # Public Functions: # start_arcyd # stop_arcyd # stop_arcyd_pid # reload_arcyd ...
from datetime import timedelta import pytest import voluptuous as vol import homeassistant.helpers.config_validation as cv from tests.common import get_test_home_assistant def test_boolean(): """Test boolean validation.""" schema = vol.Schema(cv.boolean) for value in ('T', 'negative', 'lock'): ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Database Module # -------------------- import re import time import frappe import datetime import frappe.defaults import frappe.model.meta from frappe import _ from time import time from frappe.utils import now, get...