gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from asyncio import Future, get_event_loop import logging from again.utils import unique_hex from aiohttp.web import Response from .packet import MessagePacket from .exceptions import RequestException from .utils.ordered_class_member import OrderedClassMembers _logger = logging.getLogger(__name__) class _Service:...
#!/usr/bin/env python3 import argparse import os import sys import logging from vapi_json_parser import Field, Struct, Enum, Union, Message, JsonParser,\ SimpleType, StructType, Alias class CField(Field): def get_c_name(self): return "vapi_type_%s" % self.name def get_c_def(self): if sel...
# Copyright 2010 Hakan Kjellerstrand hakank@gmail.com # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # """Implements file-like objects for reading and writing to/from GCS.""" import io import logging import sys import google.cloud.exceptions impo...
# 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...
# -*- test-case-name: twisted.test.test_internet,twisted.internet.test.test_core -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Very basic functionality for a Reactor implementation. """ from __future__ import division, absolute_import import socket # needed only for sync-dns from zo...
from sqlalchemy.orm import Session, subqueryload, \ mapper, relationship, lazyload, clear_mappers from sqlalchemy.testing import eq_, is_, is_not_ from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy import testing from test.orm import _fixtures from sqlalchemy.ext.baked import BakedQ...
# python binding for wildlfy management http/json api import logging import json import requests from . import util from . import api logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # Define some KEY_OUTCOME = "outcome" KEY_RESULT = "result" class Client(requests.Session, api.Ho...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# Copyright 2013 vArmour Networks 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 req...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # # Scope: Programma per ........... # by Loreto Notarantonio 2013, February # ###################################################################################### import os, sys import ast ############################...
from datetime import datetime from .model import Node, Namespace, Type, Instance, etree, BareInstance, ElementInstance, TypeInstance from ..utils import cached_property namespace = Namespace('http://www.w3.org/2001/XMLSchema', 'xs') unbounded = 'unbounded' _any = any _int = int _float = float def extract_type(valu...
""" mpstest15.py A test of manipulating matrix product states with numpy. There is an upper bound chi for bond dimensions in getMPSOBC() Variable bond dimension. 2014-08-29 """ import numpy as np import matplotlib.pyplot as plt from cmath import * from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm def ...
"""Tests for Table Schema integration.""" from collections import OrderedDict import json import numpy as np import pytest from pandas.core.dtypes.dtypes import ( CategoricalDtype, DatetimeTZDtype, PeriodDtype) import pandas as pd from pandas import DataFrame import pandas.util.testing as tm from pandas.io.json...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of inetconf interface for physical router configuration manager """ from lxml import etree from ncclient import manager import copy import time import datetime class PhysicalRouterConfig(object): # mapping ...
# Natural Language Toolkit: IPI PAN Corpus Reader # # Copyright (C) 2001-2013 NLTK Project # Author: Konrad Goluchowski <kodie@mimuw.edu.pl> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import functools from nltk import compat from .util import StreamBackedCorpusView, concat from .api impo...
import unittest from webtest import TestApp from pyramid.config import Configurator from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.session import UnencryptedCookieSessionFactoryConfig from pyramid import testing from pyramid.security ...
import numpy as np from numpy.random import randn import pytest from pandas import DataFrame, Series, concat from pandas.tests.window.common import ( check_binary_ew, check_binary_ew_min_periods, check_pairwise_moment, ew_func, moments_consistency_cov_data, moments_consistency_is_constant, ...
from .errors import ParserGeneratorError def rightmost_terminal(symbols, terminals): for sym in reversed(symbols): if sym in terminals: return sym return None class Grammar(object): def __init__(self, terminals): # A list of all the productions. self.productions = [No...
# 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 applicable ...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# 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 use ...
# swift_build_support/arguments.py ------------------------------*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt...
""" Object Dictionary module """ import struct from typing import Dict, Iterable, List, Optional, TextIO, Union try: from collections.abc import MutableMapping, Mapping except ImportError: from collections import MutableMapping, Mapping import logging from .datatypes import * logger = logging.getLogger(__name...
from __future__ import print_function import webbrowser import os, os.path import subprocess import json import re from difflib import SequenceMatcher import sublime, sublime_plugin try: # ST3 from .elm_project import ElmProject except: # ST2 from elm_project import ElmProject LOOKUPS = {} def join_qu...
from sfepy.base.base import * from sfepy.solvers.solvers import NonlinearSolver from nls import conv_test import sfepy.base.plotutils as plu ## # 26.07.2007, c def are_close( a, b, rtol = 0.2, atol = 1e-8 ): return False # return abs( a - b ) <= max( atol, rtol * abs( b ) ) ## # 26.07.2007, c def scale_matrix(...
#!/usr/bin/env python # OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc. ############################################################################## # # OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
""" Utilities functions to make SKLL testing simpler """ from __future__ import (absolute_import, division, print_function, unicode_literals) import re from os.path import abspath, dirname, join import numpy as np from numpy.random import RandomState from sklearn.datasets.samples_generator i...
from itertools import product import operator import numpy as np from numpy import nan import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import ( Categorical, CategoricalIndex, DataFrame, Series, date_range, isna, notna, ) from pandas.api.types import...
""" This module contain class which could create SSL keys, certificate requests based on those keys and self-sign those requests """ from OpenSSL import crypto class SSL(object): """ This class implements logic related to certificates """ def __init__(self, privateKey=None, publicKey=None, certReq=None, ...
# A general purpose MFC CCtrlView view that uses Scintilla. import control import IDLEenvironment # IDLE emulation. from pywin.mfc import docview from pywin.mfc import dialog import scintillacon import win32con import win32ui import afxres import string import array import sys import types import __main__ # for attrib...
# 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...
""" Support for Modbus. For more details about this component, please refer to the documentation at https://home-assistant.io/components/modbus/ """ import logging import threading import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import ( EVENT_HOMEASSISTANT_...
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import nose.tools as nt import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn fX = theano.config.floatX def test_pool_output_shape_2d(): def test_same(input_sh...
# -*- coding: utf-8 -*- from ..Qt import QtCore, QtGui, QtWidgets from .Container import * from .DockDrop import * from .Dock import Dock from .. import debug as debug import weakref ## TODO: # - containers should be drop areas, not docks. (but every slot within a container must have its own drop areas?) # - drop betw...
from __future__ import division, print_function import numpy as np from functools import partial from itertools import product from sklearn.datasets import make_multilabel_classification from sklearn.preprocessing import LabelBinarizer, MultiLabelBinarizer from sklearn.utils.multiclass import type_of_target from skle...
# 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 -*- from __future__ import unicode_literals __author__ = 'banxi' ui_field_type_map = { 'l': 'UILabel', 'b': 'UIButton', 'v': 'UIView', 'i': 'UIImageView', 'f': 'UITextField', 'ct': 'UIControl', 't': 'UITableView', 's': 'UIScrollView', 'c': 'UICollectionView', ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import io from chainer.serializers import load_npz from chainer.serializers import save_npz from chainer.training.extension import Extension from chainer.training.extensions._snapshot import _find_latest_snapshot def multi_node_snapshot(comm, snapshot, replica_sets): '''Create trainer extension for multi-node sn...
# Copyright 2014 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 # # http://www.apache.org/licenses/LICENSE-2...
import _ExocortexAlembicPython as alembic import sys import argparse # ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- # create a new identifier name unique also for the file ID! def merge_identifier_name(file_id, identifier): nb_slash = 0 ...
#!/usr/bin/env python # # VMEncryption extension # # Copyright 2015 Microsoft 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 # ...
""" Functions which are common and require SciPy Base and Level 1 SciPy (special, linalg) """ from __future__ import division, print_function, absolute_import import numpy import numpy as np from numpy import (exp, log, asarray, arange, newaxis, hstack, product, array, zeros, eye, poly1d, r_, sum, ...
""" Created on Tue Aug 2 09:55:43 2016 @author: Miles """ import numpy as np import matplotlib.pyplot as plt import dave.fileio.mastio as mastio import dave.fileio.tpf as tpf import dave.fileio.kplrfits as kplrfits import dave.misc.noise as noise import gapfill import pdb def getData(epic, campaign): """Obtain...
""" ******************************************************************************** * Name: SnowSimulationModel * Author: Nathan Swain * Created On: May 16, 2013 * Copyright: (c) Brigham Young University 2013 * License: BSD 2-Clause ******************************************************************************** """ f...
# Mini-project #6 - Blackjack import simplegui import random # load card sprite - 949x392 - source: jfitz.com CARD_SIZE = (73, 98) CARD_CENTER = (36.5, 49) card_images = simplegui.load_image("http://commondatastorage.googleapis.com/codeskulptor-assets/cards.jfitz.png") CARD_BACK_SIZE = (71, 96) CARD_BACK_CENTER = (3...
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
# Copyright 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. from __future__ import absolute_import import glob import imp import logging import os import socket import sys import py_utils as catapult_util # pylint: ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
import copy import json def create_function_spy(return_values=[], reverse=True): """Creates a function that is capable of tracking how it is used""" class MethodRecorder(object): def __init__(self, output): self.__output = output self.__args = [] self.__kwargs =...
import faberscriptorum import os import gobjcreator3.model.type as type_def from gobjcreator3.codegen.name_creator import NameCreator class CMarshallerNameCreator(object): def __init__(self, func_prefix): self._name_creator = NameCreator() self._func_prefix = func_prefix ...
import mysql.connector import sys from mysql.connector import errorcode from PyQt5.QtWidgets import QMessageBox,QApplication,QInputDialog,QProgressDialog from collections import OrderedDict from dataParser import csvParser import os,csv DB_NAME = 'Library' def start(fileList,username,passwd,host): try: cnx...
#!/usr/bin/env python #-------------------------------------------------------- # This is a collection of classes for describing quad # overlapping fields. #-------------------------------------------------------- # The classes for the quads with the overlapping fields uses # the field distribution from the following...
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest from test import support import abc from inspect import isabstract class TestABC(unittest.TestCase): def test_abstractmethod_basics(self): @abc.abstractmetho...
from django.db import models from django import forms from django.contrib.auth.models import User, Group from multiselectfield import MultiSelectField # Create your models here. class Vliegveld(models.Model): naam = models.CharField(max_length=30) afkorting_icao = models.CharField(max_length=4) def __str...
import baas32 import baas32 as b32 import datetime import logging import re from fuzzywuzzy import fuzz from typing import List, Optional from app.enums import PimpyTaskStatus from app.exceptions.base import ValidationException, \ ResourceNotFoundException, AuthorizationException from app.exceptions.pimpy import I...
"""Unit tests for collections.py.""" import unittest, doctest, operator from test.support import TESTFN, forget, unlink import inspect from test import support from collections import namedtuple, Counter, OrderedDict, _count_elements from test import mapping_tests import pickle, copy from random import randrange, shuf...
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # # * Redistr...
from django import http from django.contrib.messages import constants, get_level, set_level, utils from django.contrib.messages.api import MessageFailure from django.contrib.messages.constants import DEFAULT_LEVELS from django.contrib.messages.storage import base, default_storage from django.contrib.messages.storage.ba...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
import os import shutil import stat import time import shlex from subprocess import Popen, check_output, PIPE, CalledProcessError from threading import Timer from ...utils.security import switch_to_site_user from .models import Site from ..users.models import User, Group from django.conf import settings from django....
import os import sys import cmd import glob import re from sqlalchemy import func from sqlalchemy.orm import sessionmaker from config import complete_config_key, set_config_key, initialize_config, save_config, get_default_config from kuj_orm import Base, Exp, Mtab, DomDb, etl, initialize_schema, SampleAttr from compl...
import datetime import os from glob import glob import mock import pytest from sacred.metrics_logger import ScalarMetricLogEntry, linearize_metrics pymongo = pytest.importorskip("pymongo") mongomock = pytest.importorskip("mongomock") import gridfs from mongomock.gridfs import enable_gridfs_integration enable_gridf...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/python import argparse import json import config import requests import datetime import csv import sys import re import time from datetime import timedelta import dateutil.parser import pytz from slacker import Slacker slack = Slacker(config.token) OPENBMC_REPO_ID = '42542702' ZENHUB_API = 'https://api....
from flask import Flask, jsonify, send_file, make_response, request, abort import pymongo from bson import json_util, ObjectId import json import gridfs import requests from itertools import takewhile from flask.ext.cors import CORS import os app = Flask(__name__) CORS(app) # mongo db connection connection = pymong...
# Copyright 2010 OpenStack LLC. # Copyright 2011 Piston Cloud Computing, 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/...
#! /usr/bin/python import os SCRIPT_PATH = os.path.dirname(os.path.realpath(__file__)); import sys; sys.path.append(SCRIPT_PATH + '/../src'); import subprocess; import multiprocessing; import basicdefines; import fastqparser; # For adding quality values to LAST SAM file from samfilter import add_quality_values AL...
__author__ = 'christopher' from Tkinter import * from ttk import * import memorydb import telconn import threading import logger import event import runtime import time import config selected_player = "" def toggle_verbose(): if verbose_chk.get() == 1: runtime.verbose = True else: runtime...
import re # # CLASSIFICATION ALGORITHMS # def scikit_naiveBayes(input_dict): from sklearn.naive_bayes import GaussianNB y_pred = GaussianNB() output_dict={} output_dict['bayesout'] = y_pred return output_dict def scikit_J48(input_dict): from sklearn import tree #parse input and determin...
import numpy as np import scipy.sparse as sps from ._numdiff import approx_derivative, group_columns from ._hessian_update_strategy import HessianUpdateStrategy from scipy.sparse.linalg import LinearOperator FD_METHODS = ('2-point', '3-point', 'cs') class ScalarFunction(object): """Scalar function and its deriv...
# ====================================================================== import sys,os,subprocess,math import numpy as np import astropy.io.fits as pyfits import om10 vb = True # ====================================================================== # define useful functions for photometry conv = 1./(np.log(2.)*(2...
# Copyright 2014 ETH Zurich # # 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, sof...
""" Support for Homematic devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homematic/ """ import os import time import logging from datetime import timedelta from functools import partial import voluptuous as vol import homeassistant.helpers.co...
import os from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.test import TestCase from mock import patch, Mock import re import rdflib from rdflib import RDF from urllib import urlencode, u...
# 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 from itertools import chain, combinations import numbers import numpy as np f...
#!/usr/bin/env python """The GRR frontend server.""" import logging import time from typing import Iterable from grr_response_core.lib import queues from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import client as rdf_client from grr_response_core.lib.rdfvalues import client_network as...
import logging from Crypto.PublicKey import RSA from django.contrib.auth.views import redirect_to_login, logout from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.shortcuts import render from django.template.loader import render_to_string f...
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
# Each PS room joined creates an object here. # Objects control settings on a room-per-room basis, meaning every room can # be treated differently. import json import time import sys import requests from datetime import timedelta, datetime from collections import deque from invoker import ReplyObject, Command from use...
# # 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 # ...
# -*- coding: utf-8 -*- from io import open from io import BytesIO import os import shutil import tempfile import zipfile from freeze import settings def write(data, include_media = settings.FREEZE_INCLUDE_MEDIA, include_static = settings.FREEZE_INCLUDE_STATIC, html_in_memory = False, zip_all = settings.FREEZE_ZIP...
"""Kea config backend testing timers in global params, subnets and shared networks.""" import time import logging import pytest import srv_msg from cb_model import setup_server_for_config_backend_cmds, get_cfg_default from dhcp4_scen import get_address, get_rejected log = logging.getLogger('forge') pytestmark = ...
# 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 # -*- coding: utf-8 -*- import re import subprocess import os #import traceback import sys import simplejson as json from ga_parser_class import * def ConstructMyGaParser(jsondata): """ JsonData class called to construct my object < Take jsondata > Return a List of object JsonD...
# Copyright 2014 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 agre...
from ..osid import search_orders as osid_search_orders class QuestionSearchOrder(osid_search_orders.OsidObjectSearchOrder): """An interface for specifying the ordering of search results.""" def get_question_search_order_record(self, question_record_type): """Gets the question search order record cor...
## @file # This file include GenVpd class for fix the Vpd type PCD offset, and PcdEntry for describe # and process each entry of vpd type PCD. # # Copyright (c) 2010, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and co...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import time import wiki2_config import os import sys import argparse import logging from model import PTBModel import ptb_reader import ptb_config import utils def b...
# -*- coding: utf-8 -*- """ Created on Sat Mar 30 20:36:09 2013 @author: clisle This API manages the creation, naming, and upload of datasets into the Arbor database system. This is built as a client application to Kitware's Tangelo web framework. This API allows the user to create new projects, create datatypes fo...
import sys from app import db, tmdb, app from datetime import datetime, timedelta import sqlalchemy.types as types import errno import json import os import multiprocessing import signal class JsonType(types.TypeDecorator): impl = types.String def process_literal_param(self, value, dialect): return ...
import json from urlparse import urlparse from django.core.urlresolvers import reverse from django.db.models.query import QuerySet from elasticsearch_dsl.search import Search from mock import patch from nose.tools import eq_, ok_ from test_utils import RequestFactory import mkt from amo.tests import app_factory, EST...
from itertools import compress from activatable_model.models import BaseActivatableModel, ActivatableManager, ActivatableQuerySet from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Count from django.utils....
__authors__ = ['Andrew Taylor'] import random import time import pygame import math from VisualisationPlugin import VisualisationPlugin from lib.controllers import ControllerInput import logging class DiscoFloorVisualisationPlugin(VisualisationPlugin): logger = logging.getLogger(__name__) # Colours __...
"""The tests for the device tracker component.""" # pylint: disable=protected-access import asyncio import json import logging from unittest.mock import call from datetime import datetime, timedelta import os from asynctest import patch import pytest from homeassistant.components import zone from homeassistant.core im...
import os import re import struct import sys import textwrap sys.path.insert(0, os.path.dirname(__file__)) import ufunc_docstrings as docstrings sys.path.pop(0) Zero = "PyUFunc_Zero" One = "PyUFunc_One" None_ = "PyUFunc_None" # Sentinel value to specify that the loop for the given TypeDescription uses the # pointer ...
from ..cli import * import click import sys import logging import json from tqdm import tqdm from functools import partial from multiprocessing import Pool from requests.exceptions import ConnectionError from ..api import accounts as accounts_api from ..api import annotations as annotations_api from ..api import agen...
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
""" @brief Base robot class @author Josip Delic (delijati.net) @author Rowland O'Flaherty (rowlandoflaherty.com) @date 04/23/2014 @version: 1.0 @copyright: Copyright (C) 2014, see the LICENSE file """ import sys import time import re import socket import threading import Adafruit_BBIO.GPIO as GPIO import Adafruit_BB...