gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding: utf-8 # # Copyright 2021 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 requi...
import itertools import json import re import subprocess import time from datetime import timedelta import requests from celery.exceptions import SoftTimeLimitExceeded from celery.utils.log import get_task_logger from django.conf import settings from django.contrib.auth.models import User from django.db import models...
#!/usr/bin/env python import os import sys import gzip import json import hashlib import resource import datetime from CacheBuckets import CacheBuckets from StorageSystem import StorageSystem # add ecmwf_utils to python path util_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(_...
from six.moves import xrange from six import StringIO import csv import six import sys import time import select import struct import tinylink import argparse try: import serial except ImportError: serial = None def run(): """ Entry point for console script. """ sys.exit(main()) def parse...
"""Color util methods.""" import math import colorsys from typing import Tuple, List, Optional import attr # Official CSS3 colors from w3.org: # https://www.w3.org/TR/2010/PR-css3-color-20101028/#html4 # names do not have spaces in them so that we can compare against # requests more easily (by removing spaces from th...
import pytest import json import numpy as np from keras.layers import Dense, Dropout, InputLayer from keras import layers from keras.engine import Input, get_source_inputs from keras.models import Model, Sequential from keras import backend as K from keras.models import model_from_json, model_from_yaml from keras.util...
from sklearn.base import is_classifier from .base import _get_response from .. import average_precision_score from .. import precision_recall_curve from .._base import _check_pos_label_consistency from .._classification import check_consistent_length from ...utils import check_matplotlib_support, deprecated class P...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list ...
# VMware vCloud Python SDK # Copyright (c) 2014 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
import os import sys from importlib import import_module, reload from django.apps import apps from django.conf import settings from django.db.migrations.graph import MigrationGraph from django.db.migrations.recorder import MigrationRecorder from .exceptions import ( AmbiguityError, BadMigrationError, Inconsistent...
import typing import pyecore.ecore as Ecore from pyecore.resources import ResourceSet, URI, Resource import functools from pyecore.notification import EObserver import inspect from . import TransformationTrace as trace class ResultObserver(EObserver): def notifyChanged(self, notif): print(notif) class E...
# 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 2020-2021 The Kubeflow 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 applicable law or agreed ...
"""TestCase and TestSuite artifacts and testing decorators.""" import itertools import re import sys import types import warnings from cStringIO import StringIO from test.bootstrap import config from test.lib import assertsql, util as testutil from sqlalchemy.util import decorator from engines import drop_all_tables ...
__author__="UShareSoft" from texttable import Texttable from ussclicore.argumentParser import ArgumentParser, ArgumentParserError from uforgecli.utils.uforgecli_utils import * from ussclicore.cmd import Cmd, CoreGlobal from uforgecli.utils import org_utils from ussclicore.utils.generics_utils import order_list_object...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from past.utils import old_div from math import * import proteus.MeshTools from proteus import Domain from proteus.default_n import * from proteus.Profiling import logEvent import os try: from .parameters im...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Scripts for the Brapa bites paper Tang et al. (2012) Altered Patterns of Fractionation and Exon Deletions in Brassica rapa Support a Two-Step Model of Paleohexaploidy. Genetics. <http://www.genetics.org/content/190/4/1563.short> """ from jcvi.graphics.base import plt...
import json from django.core.urlresolvers import reverse from django.test import TestCase from survey.models import Survey, Questionnaire from . import create_surveys, create_questionnaires, login class QuestionnaireTestCase(TestCase): @classmethod def setUpTestData(cls): cls.client = login(user="que...
"""The tests for mqtt camera component.""" import json from unittest.mock import patch import pytest from homeassistant.components import camera from homeassistant.components.mqtt.camera import MQTT_CAMERA_ATTRIBUTES_BLOCKED from homeassistant.setup import async_setup_component from .test_common import ( help_te...
""" #;+ #; NAME: #; absline #; Version 1.0 #; #; PURPOSE: #; Module for absorption line kinematics #; 29-Nov-2014 by JXP #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as n...
import numpy from magma import pars import os from rdkit import Chem class FragmentEngine(object): def __init__(self, mol, max_broken_bonds, max_water_losses, ionisation_mode, skip_fragmentation, molcharge): try: self.mol = Chem.MolFromMolBlock(str(mol)) self.accept = True ...
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER COMMITTEE ID NUMBER', 'number': '2'}, {'name': 'COMMITTEE NAME', 'number': '3'}, ...
# Authors: Manoj Kumar <manojkumarsivaraj334@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Joel Nothman <joel.nothman@gmail.com> # License: BSD 3 clause from __future__ import division import warnings import numpy as np from scipy import sparse from math import sqrt fro...
# -*- coding: utf-8 -*- """ Httplib2 threaded cookie layer This class extends httplib2, adding support for: - Cookies, guarded for cross-site redirects - Thread safe ConnectionPool and LockableCookieJar classes - HttpProcessor thread class - HttpRequest object """ # (C) 2007 Pywikipedia bot team, 20...
########################################################################## # # Copyright (c) 2016, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
from __future__ import unicode_literals import time import random import statistics from autobahn.twisted.websocket import WebSocketClientProtocol, \ WebSocketClientFactory stats = {} class MyClientProtocol(WebSocketClientProtocol): def __init__(self, *args, **kwargs): WebSocketClientProtocol.__in...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import re import random import logging import threading import datetime import time import six import requests from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.utils import timezone from...
# -*- coding: utf-8 -*- from __future__ import division, print_function __all__ = [ "setup_plotting", "test_emcee_functions", "test_dynesty_functions", "test_pymc3_model", "Angle", ] import sys import traceback from itertools import product import numpy as np import matplotlib.pyplot as plt imp...
# 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 XML reports from coverage.py.""" import os import re import coverage from tests.coveragetest import CoverageTest class XmlTestHelpers(CoverageTest...
# -*- coding: utf-8 -*- """ Tests for the function sta.spike_triggered_average :copyright: Copyright 2015 by the Elephant team, see AUTHORS.txt. :license: Modified BSD, see LICENSE.txt for details. """ import unittest import math import numpy as np import scipy from numpy.testing import assert_array_equal from numpy....
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides tools for deblending overlapping sources labeled in a segmentation image. """ import warnings from astropy.utils.exceptions import AstropyUserWarning import numpy as np from .core import SegmentationImage from .detect import _ma...
from __future__ import unicode_literals import json import csv from modularodm import Q from django.views.generic import ListView, DetailView, FormView, UpdateView from django.views.defaults import permission_denied, bad_request from django.core.urlresolvers import reverse from django.http import JsonResponse, Http40...
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD Style. import warnings from sys import version_info import numpy as np from scipy import interpolate from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing i...
from __future__ import division, print_function, unicode_literals # collision_model tests # circles1 test import cocos.collision_model as cm import cocos.euclid as eu from math import sin, cos, radians class Obj_with_shape(object): def __init__(self, name, cshape): self.name = name self.cshape = ...
import unittest from aiohttp import web from aiohttp.test_utils import TestClient, TestServer, loop_context from mocker.http_handlers import handle_factory class TestHttpHandlers(unittest.TestCase): def setUp(self): self.DATA_PATH = './tests/data' self.HOST = '127.0.0.1' self.PORT = 800...
# # 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...
from typing import List, Any import urllib3 from CommonServerPython import * from math import ceil # Disable insecure warnings urllib3.disable_warnings() ''' CONSTANTS ''' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' ''' CLIENT CLASS ''' class Client(BaseClient): def get_domain_data(self, domain: str) -> Dict[str, ...
# Copyright (c) 2011 Adi Roiban. # See LICENSE for details. """Tests for event related actions.""" from __future__ import with_statement from StringIO import StringIO import os from jinja2 import DictLoader, Environment from mock import patch from chevah.utils import MODULE_PATH from chevah.utils.testing import ( ...
from __future__ import print_function, division, absolute_import from ufo2ft.filters import ( getFilterClass, BaseFilter, loadFilters, UFO2FT_FILTERS_KEY, logger, ) from fontTools.misc.py23 import SimpleNamespace from fontTools.misc.loggingTools import CapturingLogHandler import pytest from ..tes...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
import sys import os.path from pypdevs.infinity import * from pypdevs.DEVS import AtomicDEVS, CoupledDEVS class Event(object): def __init__(self, eventSize): self.eventSize = eventSize def __str__(self): return "Eventsize = " + str(self.eventSize) class ModelState(object): def __init__(s...
import turtle import random turtle.reset() # Set up the window turtle.setup(600, 460) turtle.bgpic("candy_crush_bg.gif") # Turn off the turtle animations turtle.tracer(False) # Variables storing the total numbers of candies in a row/column # Candies are at coordinate (X, Y) where X is an integer in the range 0...6 ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from utils import (mkdir_p, print_fancy, Logger, strip_separators_in_the_end) from utils.pipeline_aux import (read_public_images, check_img_type, check_path_and_landmarks, load_images, check_initial_path, im_read_greyscale) from utils.path_and_folder_definition import * # import paths f...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-08-25 17:38 from __future__ import unicode_literals import django.db.models.deletion import django.db.models.manager import jsonfield.fields import mptt.fields from django.db import migrations from django.db import models import kolibri.core.content.models i...
# # 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...
# # Copyright 2013 Quantopian, 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 wr...
# 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/env python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 r...
# type: ignore[attr-defined] # pylint: disable=no-member import pytest from Tests.Marketplace.zip_packs import get_latest_pack_zip_from_pack_files, zip_packs,\ remove_test_playbooks_if_exist, remove_test_playbooks_from_signatures, get_zipped_packs_names,\ copy_zipped_packs_to_artifacts class TestZipPacks: ...
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
r""" =============== Decoding (MVPA) =============== .. include:: ../../links.inc Design philosophy ================= Decoding (a.k.a. MVPA) in MNE largely follows the machine learning API of the scikit-learn package. Each estimator implements ``fit``, ``transform``, ``fit_transform``, and (optionally) ``inverse_tran...
#!/usr/bin/env python2 # -*- coding: utf8 -*- """ SAMI XJoin This script simply joins the four existing extensions inside a FITS file created during observations with SAMI (SAM Imager). During the process, it also fits a 2nd degree polynomium to the OVERSCAN region that is subtracted from the corre...
# 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. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
from sqlalchemy import Column from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import Unicode from sqlalchemy.orm import backref from sqlalchemy.orm import clea...
""" Tools to generate synthetic spectra given a table of line strengths """ import numpy as np from astropy.modeling import models from astropy import units as u from astropy import constants as c class SyntheticSpectrum(object): """ Synthetic Spectrum class - neato! """ def __init__(self, wcs, spec...
""" Basic functions for manipulating 2d arrays """ __all__ = ['diag','diagflat','eye','fliplr','flipud','rot90','tri','triu', 'tril','vander','histogram2d','mask_indices', 'tril_indices','tril_indices_from','triu_indices','triu_indices_from', ] from numpy.core.numeric import asanyarr...
# -*- coding: utf-8 -*- #/usr/bin/python2 import tensorflow as tf import numpy as np from tensorflow.contrib.rnn import MultiRNNCell from tensorflow.contrib.rnn import RNNCell from params import Params from zoneout import ZoneoutWrapper ''' attention weights from https://www.microsoft.com/en-us/research/wp-content/up...
# model.py BY Ben Burton for ParkMT at MTHacks # This program will determine the attraction value for a parking lot on # MTSU campus based on its location, the population of nearby buildings, # and the amount of spots in the parking spot. from math import exp #the no no variables parking_lots = [] buildings = [] popu...
from wallaby import * import utils as u import motorsPlusPlus as x import constants as c from logger import log as display def test_ramp(): x.drive_speed(100, 100) u.DEBUG() enable_servos() u.move_servo(c.DEPLOYABLE_WHEELS, c.WHEELS_DEPLOYED) u.move_bin(c.ARM_SWING) x.drive_speed(12, 100) ...
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- # """This is the interface for managing hunts.""" import collections as py_collections import operator import StringIO import urllib import logging from grr.gui import plot_lib from grr.gui import renderers from grr.gui.plugins import crash_view from gr...
# Hub's borrow heavily from django-organization from django.conf import settings from django.db import models from django.db.models import permalink from django.utils.translation import ugettext_lazy as _ from django_extensions.db.fields import AutoSlugField from django_extensions.db.models import TimeStampedModel US...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hpe.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/lic...
# 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...
# # 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...
""" QuestHandler handles a character's quests. """ from django.conf import settings from django.apps import apps from django.core.exceptions import ObjectDoesNotExist from evennia.utils import logger from muddery.utils.builder import build_object from muddery.utils.quest_dependency_handler import QUEST_DEP_HANDLER fro...
# Copyright (C) 2013 Deutsche Telekom AG # 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 r...
# -*- coding: utf-8 -*- # MIT License (see LICENSE.txt or https://opensource.org/licenses/MIT) """Implements generic widevine functions used across architectures""" from __future__ import absolute_import, division, unicode_literals import os from time import time from .. import config from ..kodiutils import addon_pr...
# 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 datetime import datetime from hashlib import md5 from itertools import izip_longest import json import os from urllib import urlencode from StringIO import StringIO from aludel.database import MetaData from twisted.internet import reactor from twisted.internet.defer import inlineCallbacks from twisted.trial.unitt...
# 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...
# 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...
# -*- coding: utf-8 -*- """ Sahana Eden Scenario Model @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software with...
import csv from IPython.display import Image import pandas as pd import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn import cross_validation from sklearn import ensemble from sklearn import metrics import seaborn as sns import re import numpy as np from sklearn.ensemble import RandomForestCl...
import os import sys import urllib.request, urllib.error, urllib.parse import time import subprocess import threading import re import zipfile import shutil import ssl import codecs current_path = os.path.dirname(os.path.abspath(__file__)) root_path = os.path.abspath( os.path.join(current_path, os.pardir)) python_pat...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 NTT # 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 # ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Deals with K-mers and K-mer distribution from reads or genome """ import os.path as op import sys import logging import numpy as np from jcvi.graphics.base import plt, asciiplot, set_human_axis, savefig, \ markup, panel_labels, normalize_axes, set_ticklab...
# 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...
from serial import SerialException from multiprocessing import Process, Pipe, Event from collections import namedtuple from time import sleep, time from struct import pack, unpack import numpy as np import logging import signal from .. import config as c from .tamp_serial import * logger = logging.getLogger('tamproxy...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# tests.test_classifier.test_confusion_matrix # Tests for the confusion matrix visualizer # # Aithor: Neal Humphrey # Author: Benjamin Bengfort # Created: Tue May 03 11:05:11 2017 -0700 # # Copyright (C) 2017 The scikit-yb developers # For license information, see LICENSE.txt # # ID: test_confusion_matrix.py [] benja...
# 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...
#!/usr/bin/env python """Test of "New Hunt" wizard.""" from grr.gui import runtests_test from grr.lib import access_control from grr.lib import aff4 from grr.lib import config_lib from grr.lib import data_store from grr.lib import flags from grr.lib import output_plugin from grr.lib import test_lib from grr.lib.flo...
# -*- coding: utf-8 -*- """ docker_registry.drivers.speedy ~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a speedy based driver. """ import gevent import threading import os import random import string import logging import time from . import speedy_pyclient from docker_registry.core import driver from docker_registry.core imp...
from __future__ import absolute_import, unicode_literals import os from django.utils.translation import ugettext_lazy as _ ###################### # MEZZANINE SETTINGS # ###################### # The following settings are already defined with default values in # the ``defaults.py`` module within each of Mezzanine's ...
# 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 ...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
#!/usr/bin/env python # Copyright (c) 2011 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/LICE...
# # # All Rights Reserved. # Copyright 2011 OpenStack LLC. # Copyright 2010 Jacob Kaplan-Moss # 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.a...
import signal, time, sys, glob, os, codecs, pybonjour, atexit, tornado import inflection, copy, types # Infastructure from event_emitter import EventEmitter from print_job_queue import PrintJobQueue # Routes from construct_socket_handler import ConstructSocketHandler from construct_job_upload_handler import ConstructJ...
#! /usr/bin/env python """Bulkloader for slow databases (Bizgres). Idea is following: - Script reads from queue a batch of urlencoded row changes. Inserts/updates/deletes, maybe many per one row. - It creates 3 lists: ins_list, upd_list, del_list. If one row is changed several times, it keeps the ...
#!/usr/bin/python # 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 # dist...
# -*- coding: utf-8 -*- from schematics.exceptions import ValidationError from schematics.transforms import whitelist, blacklist from schematics.types import StringType, IntType, URLType, BooleanType from schematics.types.compound import ModelType from schematics.types.serializable import serializable from barbecue imp...
import base64 import pickle from datetime import datetime, date from decimal import Decimal, getcontext from django.test import TestCase from unittest import mock from django import forms from django.contrib.auth.models import User from onmydesk.models import (Report, Scheduler, ReportNotSavedException, ...
from __future__ import absolute_import import sys from django import forms from django.core.exceptions import PermissionDenied from django.core.urlresolvers import get_resolver from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, render from django.template impor...
""" Chromatic Adaptation Transforms =============================== Defines various chromatic adaptation transforms (CAT): - :attr:`colour.adaptation.CAT_XYZ_SCALING`: *XYZ Scaling* chromatic adaptation transform. - :attr:`colour.adaptation.CAT_VON_KRIES`: *Von Kries* chromatic adaptation transform. - :...
from datetime import datetime import jsonschema from slamon_afm.models import db, Agent, AgentCapability, Task from slamon_afm.tests.afm_test import AFMTest class TestPolling(AFMTest): task_request_response_schema = { 'type': 'object', 'properties': { 'tasks': { 'type...
# # 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 # ...
from random import choice import mimetypes import pyrax import re import swiftclient from gzip import GzipFile from StringIO import StringIO from django.core.files.base import File, ContentFile from django.core.files.storage import Storage from .cumulus_settings import CUMULUS ######### FROM DJANGO-CUMULUS UNRELEAS...