gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding: utf-8 """ MINDBODY Public API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 impor...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# -*- coding: iso-8859-15 -*- # # Copyright 2017 Mycroft AI 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 appli...
from coapthon import defines from coapthon.messages.message import Message from coapthon.messages.option import Option __author__ = 'Giacomo Tanganelli' class Request(Message): """ Class to handle the Requests. """ def __init__(self): """ Initialize a Request message. """ ...
# 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 a...
''' Copyright (c) 2011-2015, Agora Games, LLC All rights reserved. https://github.com/agoragames/haigha/blob/master/LICENSE.txt ''' from struct import Struct from datetime import datetime from decimal import Decimal class Reader(object): """ A stream-like reader object that supports all the basic data type...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import datetime import os import urlparse # Django from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, smart_text from django.utils.text imp...
__author__ = 'x1ang.li' import pickle, re from os import path, makedirs from urllib.parse import urljoin from shutil import rmtree from zipfile import ZipFile import requests from bs4 import BeautifulSoup from .bookbase import BookBase cachefolder = path.expanduser(path.join('~', 'snapbook', 'cache')) outfolder = p...
__author__ = 'Mohammad' import os import numpy as np import tensorflow as tf from tensorflow.contrib import learn, rnn from data_loader import get_related_answers, get_vqa_data, load_image # Parameters embedding_dim = 300 word2vec_file = 'data/GoogleNews-vectors-negative300.bin' learning_rate = 0.001 batch_size = 8 d...
# Copyright (c) 2012 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 ...
#!/usr/bin/env python # # Copyright 2012 the V8 project authors. 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 # noti...
from direct.directtools.DirectSelection import * from direct.directtools.DirectUtil import ROUND_TO from direct.directtools.DirectGeometry import LineNodePath from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.showbase.DirectObject import DirectObject from toontown.toonbase import Toontown...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- import HTMLParser import json import math import re import time from IRCMessage import IRCMessage from IRCResponse import IRCResponse, ResponseType from CommandInterface import CommandInterface from Data.api_keys import load_key from Data import ignores from Utils import WebUtils, StringUtils...
# coding=utf-8 from collections import defaultdict import datetime import decimal import logging from json import dumps, loads, JSONEncoder from django.conf import settings from django.core import serializers from django.http import HttpResponse, Http404 from django.utils.crypto import constant_time_compare from djang...
# Copyright 2017 The Bazel 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 la...
# 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...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import operator __all__ = ['BST'] class MaxValue: ''' Represents an infinite value for purposes of tuple comparison. ''' def __gt__(self, other): return True def __ge__(self, other): return True def __lt__(...
# Copyright 2007 Divmod, Inc. # See LICENSE file for details """ Tests for L{xmantissa.webnav}. """ from twisted.trial import unittest from epsilon.structlike import record from axiom.store import Store from axiom.dependency import installOn from nevow.url import URL from nevow import tags, context from nevow.test...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( fix_xml_ampersands, orderedSet, parse_duration, qualities, strip_jsonp, unified_strdate, ExtractorError, ) class NPOBaseIE(InfoExtractor): d...
# # 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...
# -*- coding: utf-8 -*- """Parser for Linux utmp files.""" from __future__ import unicode_literals from dfdatetime import posix_time as dfdatetime_posix_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import errors from plaso.lib import definitions from plaso.parsers ...
""" Support for Blink4home cameras. For more details about this component, please refer to the documentation at https://home-assistant.io/components/blink4home/ """ import asyncio import logging from datetime import timedelta import json import requests import voluptuous as vol import homeassistant.helpers.config_va...
#!/usr/bin/env python2 # This file is part of the OpenMV project. # # Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io> # Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io> # # This work is licensed under the MIT license, see the file LICENSE for details. # # Openmv module with support fo...
# 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 # Copyright 2020 The Google Research 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 applicab...
import copy import unicodedata from JumpScale import j import traceback try: import ujson as json except ImportError: import json import JumpScale.baselib.hash LEVELMAP = {1: 'CRITICAL', 2: 'WARNING', 3: 'INFO', 4: 'DEBUG'} class ErrorConditionObject(): """ @param type #BUG,INPUT,MONITORING,OPERAT...
# 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 # distributed under t...
""" .. module:: report.views. :synopsis: Handles the report URL endpoints for the OpenRecords application """ from datetime import datetime, timedelta from calendar import monthrange from io import BytesIO from flask import ( current_app, flash, render_template, jsonify, redirect, request, ...
# 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 # distributed under t...
#!/usr/bin/env python import pexpect import getopt import sys # Global Variables _user ="" _password = "" _client = "" _environment = "" _action = "" _patch = "" _actions = ['restart, shutdown, start, status, getListOfPatches, patchInstall, patchRollback, qaCheck, tuneConfig, audit'] #list of defined actions at this...
from functools import partial from os.path import join, expanduser from unittest.mock import MagicMock import uuid from genty import genty, genty_dataset, genty_args from app.subcommands.deploy_subcommand import DeploySubcommand from app.util.network import Network from test.framework.base_unit_test_case import BaseU...
# 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. """Generates a syntax tree from a Mojo IDL file.""" import imp import os.path import sys def _GetDirAbove(dirname): """Returns the directory "above" this...
# Copyright (C) 2011, 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 of conditions and the...
""" Forward Simulation of Gravity Anomaly Data on a Tensor Mesh =========================================================== Here we use the module *SimPEG.potential_fields.gravity* to predict gravity anomaly data for a synthetic density contrast model. The simulation is carried out on a tensor mesh. For this tutorial,...
# $Id: ip.py 87 2013-03-05 19:41:04Z andrewflnr@gmail.com $ # -*- coding: utf-8 -*- """Internet Protocol.""" import dpkt from decorators import deprecated class IP(dpkt.Packet): __hdr__ = ( ('_v_hl', 'B', (4 << 4) | (20 >> 2)), ('tos', 'B', 0), ('len', 'H', 20), ('id', 'H', 0), ...
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # Copyright 2014-2015 Red Hat, 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 # # htt...
from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.http import JsonResponse from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponseForbidden from django.conf import settings import django.contrib.auth ...
import logging import json from concurrent import futures from contextlib import ExitStack import requests from .utils import timed logger = logging.getLogger(__name__) BASE_URL = 'https://hacker-news.firebaseio.com/v0/' # exceptions class HNException(Exception): """Base HN Exception. """ class HNNotFound...
# Copyright 2013 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 applicable law or agreed to in wr...
# -*- coding: utf-8 -*- """ Test command line parsing and actions """ import mock from orcoursetrion.cmd import execute from orcoursetrion.tests.base import TestGithubBase class TestGithubCommand(TestGithubBase): """Verify github commands via command line""" def test_cmd_create_export_repo(self): ""...
# Copyright (c) 2011-2013 Turbulenz Limited """Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. .. warning:: The WebSocket protocol was recently finalized as `RFC 6455 <http://tools.ietf.org/html/...
#!/usr/bin/env python # Copyright 2020 Arm Limited. # SPDX-License-Identifier: Apache-2.0 # # 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 #...
# 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...
# -*- coding: utf-8 -*- """This file contains a MRUList Registry plugin.""" import abc import logging import construct from plaso.events import windows_events from plaso.lib import binary from plaso.parsers import winreg from plaso.parsers.shared import shell_items from plaso.parsers.winreg_plugins import interface ...
# Copyright 2011-2012 10gen, 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...
# -*- coding: utf-8 -*- # Notes: # # - this plug-in uses LRCache.jar from export_flow_datasets/lib. # - this plug-in requires Jython version 2.7 (for json module) ''' Aggregation plug-in to generate FCS plots. The first time a scatterplot is generated for an FCS file, the data is read and stored in a CSV file that...
# orm/persistence.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """private module containing functions used to emit INSERT, UPDATE and DELETE state...
# 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...
# -*- coding: utf-8 -*- """ tipfyext.jinja2 ~~~~~~~~~~~~~~~ Jinja2 template support for Tipfy. Learn more about Jinja2 at http://jinja.pocoo.org/2/ :copyright: 2011 by tipfy.org. :license: BSD, see LICENSE.txt for more details. """ import blinker from jinja2 import Environment, FileSystemLoa...
# Restore the gird items and files back into a gorder server. import sys import os import pdb import girder_client import json import cPickle as pickle def copy_girder_annotation(annotation): # make a copy of the annotation because josn has trouble with # u"strings" annot_copy = {"elements":[],"name":s...
from proto_rogue_base import * class Wall(Tile): def __init__(self): Tile.__init__(self, '#', libtcod.light_gray, True) class Floor(Tile): def __init__(self): Tile.__init__(self, ' ', libtcod.yellow, False) class Water(Tile): def __init__(self): Tile.__init__(self, '~', libtcod.light_blue, True, bl...
# 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 # # Read Garmin GPX with heartrate # # In[1]: import numpy as np import matplotlib.pyplot as plt from datetime import datetime import pandas as pd from lxml import etree get_ipython().magic(u'matplotlib inline') # In[2]: fn = "activity_721671330.gpx" tree = etree.parse(fn) # In[3]: namespace...
#!/usr/bin/env python # -*- coding: utf-8 -*- import fnmatch import re from unittest import TestCase import mock from specchio.handlers import SpecchioEventHandler from watchdog.events import (DirCreatedEvent, FileCreatedEvent, FileDeletedEvent, FileModifiedEvent, ...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:18410") else: access = Se...
# -*- coding: utf-8 -*- """Testing module provides unittest by pre-defined testing syntax. You can define testing syntax as method `docstring`, **`.. test::` indicates the beginning of testing syntaxes.** Run Test: .. testcode:: $ dp4p test --path=./example Available syntax: * **expect(criteria)** * **expect(p...
from error import * from tokens import * from events import * from nodes import * from loader import * from dumper import * __version__ = '3.12' try: from cyaml import * __with_libyaml__ = True except ImportError: __with_libyaml__ = False def scan(stream, Loader=Loader): """ Scan a YAML stream...
"""Trace treadmill application events. """ import functools import logging import urllib.request import urllib.parse import urllib.error import click from treadmill import context from treadmill import cli from treadmill import restclient from treadmill.websocket import client as wsc from treadmill.apptrace import e...
# -*- coding: utf-8 -*- # # Glue documentation build configuration file, created by # sphinx-quickstart on Mon Jun 25 12:05:47 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
import re import sys import time import typing from mitmproxy import exceptions from mitmproxy.net.http import headers from mitmproxy.net.http import request from mitmproxy.net.http import response from mitmproxy.net.http import url def get_header_tokens(headers, key): """ Retrieve all tokens for a heade...
#------------------------------------------------------------------------------ # Copyright 2014 Esri # 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/LICENS...
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
#!/usr/bin/env python ''' Ansible module for zabbix items ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix item ansible module # # # Copyright 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
#!/usr/bin/env python2 # Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. import argparse from collections import Counter import logging import math import os import Queue import random import re import shutil import sys import threading import time # Find the best implementation available try: ...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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...
# -*- coding: utf-8 -*- # # 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 ...
# Copyright 2016 Cloudbase Solutions Srl # 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...
def selfkeymaker(key): return key def gen_keymaker(prefix, suffix, keymaker): """ :param prefix: :type prefix: :class:`str` :param suffix: :type suffix: :class:`str` :param keymaker: :type keymaker: :func: :return: :rtype: :func: """ if keymaker: return keymak...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
import math import numpy # - * - coding: utf - 8 - * - """ Created on Wed May 31 15:27:40 2017 @author: Kristen """ # - * - coding: utf - 8 - * - """ Created on Tue May 30 09:40:34 2017 @author: Kristen """ # finds the distance between two atoms def distance(position1, position2): return ma...
import logging import re try: import dnf except ImportError: dnf = None from pyp2rpm import settings from pyp2rpm import utils from pyp2rpm.logger import LoggerWriter logger = logging.getLogger(__name__) class NameConvertor(object): def __init__(self, distro): self.distro = distro self...
from datetime import datetime import logging import decimal import base64 import json import time from lib import config, util decimal.setcontext(decimal.Context(prec=8, rounding=decimal.ROUND_HALF_EVEN)) D = decimal.Decimal def calculate_price(base_quantity, quote_quantity, base_divisibility, quote_divisibility, o...
""" Abstraction for optimizers. It is sufficient that one re-implements the base estimator. """ import copy import inspect import numbers from collections import Iterable import numpy as np from ..callbacks import check_callback from ..callbacks import VerboseCallback from .optimizer import Optimizer from ..utils i...
import cmd import locale import os import pprint import shlex from dropbox import client, rest, session # XXX Fill in your consumer key and secret below # You can find these at http://www.dropbox.com/developers/apps APP_KEY = '' APP_SECRET = '' ACCESS_TYPE = 'app_folder' # should be 'dropbox' or 'app_folder' as conf...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
import six from sqlalchemy import types from ..exceptions import ImproperlyConfigured from .scalar_coercible import ScalarCoercible try: from enum import Enum except ImportError: Enum = None class Choice(object): def __init__(self, code, value): self.code = code self.value = value d...
import Tkinter as tk import numpy as np import sys import os.path import xml.etree.ElementTree as ET import fnmatch import cv2 import numpy as np import face import shutil import time from picamera import PiCamera from picamera.array import PiRGBArray import speaker #import FinalFaceRecog as fr TRAINING_FILE='tra...
import ast def translate_call(env, func, argv): stmts = list(func.stmts) args = [] for arg in argv: stmts.extend(arg.stmts) args.append(arg.expr) return Box(env.new_node(ast.Call, func.expr, args, [], None, None), stmts) # Could use for vargs later.. def translate_argument_expr(env, ex...
# Copyright 2012 Viewfinder Inc. All Rights Reserved. """Secrets test. Test secrets module. user vs shared, encrypted vs plain. """ __author__ = 'marc@emailscrubbed.com (Marc Berhault)' import getpass import json import logging import mock import os import shutil import tempfile import unittest from tornado impo...
#!/usr/bin/env python import luigi import os from os.path import join as pjoin, exists, dirname import cPickle as pickle import glob import argparse import logging import pandas import rasterio from datacube.api.model import DatasetType from classifier import classifier from zonal_stats import zonal_stats from zona...
# -*- coding: utf-8 -*- from __future__ import with_statement import warnings from almost import Approximate from pytest import deprecated_call, raises from conftest import various_backends from trueskill import * inf = float('inf') nan = float('nan') class almost(Approximate): def normalize(self, value): ...
# -------------------------------------------------------- # Fully Convolutional Instance-aware Semantic Segmentation # Copyright (c) 2016 by Contributors # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Modified by Haozhi Qi, Guodong Zhang # ---------------------------...
# -*- coding: utf-8 -*- from ccxt.async.base.exchange import Exchange import hashlib from ccxt.base.errors import ExchangeError class nova (Exchange): def describe(self): return self.deep_extend(super(nova, self).describe(), { 'id': 'nova', 'name': 'Novaexchange', 'co...
__author__ = 'nick' import os.path import textract import urllib2 import cookielib import time from bs4 import BeautifulSoup from pymongo import MongoClient """ Class to gather documents for the corpus Libraries: - Textract http://textract.readthedocs.org/en/latest/index.html - BeautifulSoup4 http:/...
# -------------------------------------------------------------------------- # 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 cause incor...
from __future__ import print_function from pylab import * import functools from matplotlib.pyplot import * import _dict_it import _dict_find import _dict_update_slice import _set_it import _set_insert import _set_find import _set_find_local import _set_create import _set_insert_sort import _dict_insert_sort import _se...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for Perspective Broker module. TODO: update protocol level tests to use new connection API, leaving only specific tests for old API. """ # issue1195 TODOs: replace pump.pump() with something involving Deferreds. # Clean up warning supp...
import sys, logging.config, os, time, socket, yaml, ssl from flask import ( Flask, request, jsonify, app, make_response, Response, json, Blueprint ) from werkzeug.exceptions import default_exceptions from werkzeug.exceptions import HTTPException from werkzeug.contrib.fixers import ProxyFix from flask_cors import CO...
from numpy import asarray, mean, sqrt, ndarray, amin, amax, concatenate, sum, zeros, maximum, \ argmin, newaxis, ones, delete, NaN, inf, isnan, clip, logical_or, unique, where, all from thunder.utils.serializable import Serializable from thunder.utils.common import checkParams, aslist from thunder.rdds.images impo...
# -*- coding: utf-8 -*- """ werkzeug.serving ~~~~~~~~~~~~~~~~ There are many ways to serve a WSGI application. While you're developing it you usually don't want a full blown webserver like Apache but a simple standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in the standa...
"""Train the models """ from __future__ import absolute_import from __future__ import print_function from keras.callbacks import EarlyStopping, History, TensorBoard, ModelCheckpoint from keras.models import load_model import hyperopt from hyperopt.utils import coarse_utcnow from hyperopt.mongoexp import MongoTrials imp...
# Copyright 2012 NetApp # 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...
# -*- 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...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) import inspect from copy import deepcopy import pytest import numpy as np from numpy.testing.utils import assert_allclose, assert_array_equal ...
""" Functions to help configure LAtools. (c) Oscar Branson : https://github.com/oscarbranson """ import configparser import json import os import re import numpy as np import textwrap as tw import pkg_resources as pkgrs from .utils import Bunch from .metadata_parsers import meta_parsers from io import BytesIO from s...
import math import os import shutil import subprocess import shlex import pandas as pd from cea import suppress_3rd_party_debug_loggers from cea.resources.radiation_daysim.geometry_generator import BuildingGeometry suppress_3rd_party_debug_loggers() import py4design.py2radiance as py2radiance from py4design.py3dmod...
# firebird.py # Copyright (C) 2005, 2006, 2007 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import datetime import warnings from sqlalchemy import util, schema, exceptions, pool from sqlalchemy...