gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import logging import logging.config LOG = logging.getLogger(__name__) simple_ascii = "/-v\\+^|><`*:" fancy_unicode = "\u250C\u2500\u252C\u2510\u253C\u2534\u2502\u251C\u2524\u2514\u2518\u250A" try: trans = "".maketrans(simple_ascii, fancy_unicode) except AttributeError: import string # apparantly python2 ...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.pets.PetGoal from direct.task import Task from direct.fsm import FSM, ClassicFSM, State from direct.showbase.PythonUtil import randFloat, Functor from direct.directnotify import DirectNotifyGlobal from toontown.pets import PetConstants from toontown.to...
""" Support for MQTT message handling. For more details about this component, please refer to the documentation at https://home-assistant.io/components/mqtt/ """ import asyncio import logging import os import socket import time import ssl import re import requests.certs import voluptuous as vol from homeassistant.co...
import numpy as np import pdb,os from scipy.optimize import fmin_slsqp,least_squares import astropy.io.fits as pyfits import scipy.interpolate as interp import utilities.transformations as tr def ampMeritFunction(voltages,distortion,ifuncs): """Simple merit function calculator. voltages is 1D array of weights ...
""" This contains various helper functions for the Digital Slide Archive""" import re, csv, os, sys, optparse import collections from PIL import Image import openslide from openslide.lowlevel import OpenSlideError import hashlib import subprocess import shutil,glob import random from functools import partial def md5su...
# 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 ...
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, subprocess, sys, glob, string import zipfile from datetime import date cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['architectures', 'name','version','moduleid','descripti...
"""Tools and arithmetics for monomials of distributed polynomials. """ from sympy.core.mul import Mul from sympy.core.singleton import S from sympy.core.basic import C from sympy.polys.polyerrors import ExactQuotientFailed from sympy.utilities import all, any, cythonized from sympy.core.compatibility import cmp de...
from tests.markup._util import desired_output import pytest def simple_schema(): from flatland import Form, String class SmallForm(Form): name = "test" valued = String empty = String return SmallForm({u'valued': u'val'}) ### value @pytest.fixture def gen(): pytest.skip('FI...
# tempfile.py unit tests. import tempfile import errno import io import os import signal import shutil import sys import re import warnings import contextlib import unittest from test import test_support as support warnings.filterwarnings("ignore", category=RuntimeWarning, ...
import logging import os import yaml from code_intelligence import github_app from code_intelligence import graphql from code_intelligence import github_util from code_intelligence import util from label_microservice import automl_model from label_microservice import combined_model from label_microservice import unive...
# $Id$ # # Copyright (C) 2004-2008 Greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from __future__ import ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import codecs import copy import logging import os import sys import uuid from datetime import datetime from enum import Enum import googleapiclient.discovery from future.utils import iteritems from google.cloud import bigquery from google.cloud.bigquery....
"""This is the Bokeh charts interface. It gives you a high level API to build complex plot is a simple way. This is the BoxPlot class which lets you build your BoxPlot plots just passing the arguments to the Chart class and calling the proper functions. It also add a new chained stacked method. """ #------------------...
from __future__ import print_function import os #import StringIO import scipy.misc import numpy as np from glob import glob from tqdm import trange from itertools import chain from collections import deque from scipy.linalg import sqrtm from numpy.linalg import norm from models import * from utils import save_image ...
#reading different model files import numpy as np from numpy import recfromtxt, genfromtxt import pandas as pd from astropy import units as u import logging # Adding logging support logger = logging.getLogger(__name__) from tardis.util import parse_quantity class ConfigurationError(Exception): pass def read_d...
import logging from django.conf import settings from django.core.urlresolvers import reverse from django.db import transaction from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden, JsonResponse from django.utils.decorators import decorator_from_middleware from django.views.decorators.htt...
import string import re import os from writer import * from tmsim import * # Interprets a TMD program on the fly. Prints out the behaviors of the # different tapes as it goes. # Use this to debug your handwritten TMD program before compiling it # to a Turing machine! def pront(x): print x class TuringMachineWit...
# -*- coding: utf-8 -*- import re import numpy as np import pytest from pandas.compat import lrange, range from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike import pandas as pd from pandas import IntervalIndex, MultiIndex, RangeIndex import pandas.util.testing as tm def test_labels_dtyp...
""" Javascript code printer The JavascriptCodePrinter converts single sympy expressions into single Javascript expressions, using the functions defined in the Javascript Math object where possible. """ from __future__ import print_function, division from sympy.core import S, C from sympy.printing.codeprinter import...
import pytest from ate.ate import Template, ParseContext from ate.tags import CompileStatement from ate.tags import TextNode from ate.tags import ExpressionNode from ate.tags import BlockStatementNode from ate.tags import MainNode from ate.tags import ForBlockStatementNode from ate.tags import CommentNode from ate.ta...
# Filename: hdf5.py # pylint: disable=C0103,R0903,C901 # vim:set ts=4 sts=4 sw=4 et: """ Read and write KM3NeT-formatted HDF5 files. """ from collections import OrderedDict, defaultdict, namedtuple from functools import singledispatch import os.path import warnings from uuid import uuid4 import numpy as np import ta...
# # 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...
"""CoolMasterNet platform to control of CoolMasteNet Climate Devices.""" import logging import voluptuous as vol from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( HVAC_MODE_OFF, HVAC_MODE_HEAT_COOL, HVAC_MODE_COOL, HVAC_MO...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import weakref from collections.abc import Mapping from flask import flash, g, has_request_context, reque...
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:8638") else: access = Ser...
# -*- coding: utf-8 -*- import copy MONGO_HOST = 'localhost' MONGO_PORT = 27017 MONGO_USERNAME = MONGO1_USERNAME = 'test_user' MONGO_PASSWORD = MONGO1_PASSWORD = 'test_pw' MONGO_DBNAME, MONGO1_DBNAME = 'eve_test', 'eve_test1' ID_FIELD = '_id' RESOURCE_METHODS = ['GET', 'POST', 'DELETE'] ITEM_METHODS = ['GET', 'PATCH...
#!/usr/bin/env 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 # # Authors: # - Paul Nilsson, paul.nilsson@cern.ch, 2018-2019 # This module ...
"""Unit tests for storm_tracking_utils.py.""" import unittest import numpy import pandas from gewittergefahr.gg_utils import storm_tracking_utils as tracking_utils TOLERANCE = 1e-6 MIN_BUFFER_DISTANCE_METRES = 0. MAX_BUFFER_DISTANCE_METRES = 5000. BUFFER_COLUMN_NAME_INCLUSIVE = 'polygon_object_latlng_deg_buffer_5000...
# Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
"""Plot a GODagSmall.""" __copyright__ = "Copyright (C) 2016-2018, DV Klopfenstein, H Tang, All rights reserved." __author__ = "DV Klopfenstein" import sys import os import collections as cx from collections import OrderedDict from goatools.godag_obosm import OboToGoDagSmall def plot_gos(fout_png, goids, obo_dag, *a...
# 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...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import io import json import os import sys import re import time import tempfile import itertools import datetime import ...
from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.shortcuts import render from django.urls import reverse from django.http import HttpResponseRedirect, HttpResponse from django.utils import timezone from olaf.models import * from olaf.forms import * from...
# Copyright 2013 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 require...
"""n-body simulator to derive TDV+TTV diagrams of planet-moon configurations. Credit for part of the source is given to https://github.com/akuchling/50-examples/blob/master/gravity.rst Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License """ import numpy import math import matplotlib.pylab as plt...
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2019 - Frank Scholz <coherence@beebits.net> import os import pygtk pygtk.require("2.0") import gtk if __name__ == '__main__': from twisted.internet import gtk2reactor gtk2reactor.install() ...
#!/usr/bin/env python # encoding: utf-8 # Default parameters work for formation_of_diffractons/ import numpy as np import clawpack.petclaw as pyclaw # Medium structure medium_type='piecewise-constant' def qinit(state,A,x0,y0,varx,vary): r""" Set initial conditions: Gaussian stress, zero velocities.""" ...
"""EasyClangComplete plugin for Sublime Text 3. Provides completion suggestions for C/C++ languages based on clang Attributes: log (logging.Logger): logger for this module """ import sublime import sublime_plugin import logging import shutil from os import path from .plugin import tools from .plugin import vie...
# -*- coding: utf-8 -*- import mock import unittest from nose.tools import * # noqa from github3 import GitHubError from github3.repos import Repository from tests.base import OsfTestCase from tests.factories import UserFactory, ProjectFactory from framework.auth import Auth from website.addons.github.exceptions ...
<<<<<<< HEAD <<<<<<< HEAD """Make the custom certificate and private key files used by test_ssl and friends.""" import os import shutil import sys import tempfile from subprocess import * req_template = """ [req] distinguished_name = req_distinguished_name x509_extensions = req_x509_extensions ...
# 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...
"""Platform for retrieving meteorological data from Environment Canada.""" import datetime import re from env_canada import ECData # pylint: disable=import-error import voluptuous as vol from homeassistant.components.weather import ( ATTR_CONDITION_CLEAR_NIGHT, ATTR_CONDITION_CLOUDY, ATTR_CONDITION_FOG, ...
# -*- coding: utf-8 -*- """ celery.app.utils ~~~~~~~~~~~~~~~~ App utilities: Compat settings, bugreport tool, pickling apps. """ from __future__ import absolute_import import os import platform as _platform import re from collections import Mapping from types import ModuleType from celery.datastructure...
import urlparse from contextlib import closing import requests from pyquery import PyQuery as pq class WebsiteMetadata(dict): """ A subclass of dict representing inferred metadata of a URL passed in construction. Currently includes: - Canonical URL - Description - Icon - Keywords - N...
""" Test some fundamental results from wmean_2D_latlon """ import numpy as np from numpy import ma from numpy.random import random from maud import tests_support from maud import wmean_2D_latlon_serial, wmean_2D_latlon try: import cython with_cython = True except: with_cython = False if with_cython: ...
# 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 ...
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- from __future__ import division import yaml import numpy...
""" Reads in current year's Arctic sea ice extent from Sea Ice Index 3 (NSIDC) and calculates the anomaly from the 1981-2010 median Website : ftp://sidads.colorado.edu/DATASETS/NOAA/G02135/north/daily/data/ Author : Zachary M. Labe Date : 5 September 2016 """ ### Import modules import numpy as np import ur...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import time # This little construct ensures we can run even if we have a bad version of # psutil installed. If so, we'll just skip...
import time import os import numpy import sys # OrderedDict is a feature of 2.7 and beyond only from collections import OrderedDict from astropy.io import fits as pyfits from array import array import pdb import ctypes import ROOT ROOT.PyConfig.IgnoreCommandLineOptions = True from donutlib.donutengine import donutengi...
''' Given a list of candidate public domain book titles and authors attempt to find the best matching OpenLibrary records with full text available on Internet Archive. ''' import codecs import xml.etree.ElementTree as ET import pymarc from requests import ConnectionError import requests_cache import time CACHE_DIR =...
from data import * from utils.augmentations import SSDAugmentation from layers.modules import MultiBoxLoss from ssd import build_ssd import os import sys import time import torch from torch.autograd import Variable import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torch.nn.in...
# -*- coding: utf-8 -*- ''' Corpus DAO - ISF Corpus management functions ''' # This code is a part of coolisf library: https://github.com/letuananh/intsem.fx # :copyright: (c) 2014 Le Tuan Anh <tuananh.ke@gmail.com> # :license: MIT, see LICENSE for more details. # NOTE: This is used to be a parted of VisualKopasu, b...
#!/usr/bin/python """Make a set of virtual machines and use them to run tests; specifically this script runs Selenium automated tests of a website; specifically this script should allow load testing, which so far hasn't been something Selenium has beeen used for. As implemented uses virtual machine snapshots. Exampl...
#coding: utf-8 from lxml import etree as ET import re import plumber SUPPLBEG_REGEX = re.compile(r'^0 ') SUPPLEND_REGEX = re.compile(r' 0$') ISO6392T_TO_ISO6392B = { u'sqi': u'alb', u'hye': u'arm', u'eus': u'baq', u'mya': u'bur', u'zho': u'chi', u'ces': u'cze', u'nld': u'dut', u'fra':...
""" Conformance tests which do not require an internet connection or HTML parsing libraries, and so can be run as part of the normal test suite of webcolors. For tests which extract the relevant values, during the test run, from the online standards documents (and so require both an internet connection and an HTML par...
#!/usr/bin/env python # # This client connects to the centralized game server # via http. After creating a new game on the game # server, it spaws an AI subprocess called "dropblox_ai." # For each turn, this client passes in the current game # state to a new instance of dropblox_ai, waits ten seconds # for a response, ...
import ast, sys, json """ Jsvee Python transpiler (C) Teemu Sirkia, 2016 Licensed under MIT License. """ class ParseResult: def __init__(self): self.steps = [] self.initSteps = [] self.positionStack = ['0'] self.line = 0 self.labelCounter = 0 self.iteratorCounter = ...
from django import forms from django.apps import apps from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse, NoReverseMatch from django.template.context_processors import csrf from django.db.models.base import ModelBase from django.forms.forms import DeclarativeFieldsMetaclass...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import multiprocessing as mp import platform import sys import textwrap from . import console, util from .console import log, color_print def iter_machine_files(results_dir): """ Iterate over all of the machine.json files in the resul...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes used to enumerate surface sites and to find adsorption sites on slabs """ import itertools import os import numpy as np from matplotlib import patches from matplotlib.path import Path from mo...
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details # $URI:$ __version__=''' $Id$ ''' __doc__='''Gazillions of miscellaneous internal utility functions''' import os, sys, imp, time, types from base64 import decodestring as base64_decodestring, encodestring as base64_encodestring try: fr...
# standard libraries import logging import os import random import re import string import subprocess from typing import List # rubiks cube libraries from rubikscubennnsolver import reverse_steps from rubikscubennnsolver.LookupTable import LookupTable, NoIDASolution, download_file_if_needed logger = logging.getLogger...
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# # The Python Imaging Library # $Id$ # # Adobe PSD 2.5/3.0 file handling # # History: # 1995-09-01 fl Created # 1997-01-03 fl Read most PSD images # 1997-01-18 fl Fixed P and CMYK support # 2001-10-21 fl Added seek/tell support (for layers) # # Copyright (c) 1997-2001 by Secret Labs AB. # Copyright (c) 1995-20...
"""Exercises for eager loading. Derived from mailing list-reported problems and trac tickets. These are generally very old 0.1-era tests and at some point should be cleaned up and modernized. """ import datetime import sqlalchemy as sa from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy...
import urllib import urllib2 import datetime from collections import namedtuple from django.conf import settings from django.template.loader import render_to_string from billing.models import AuthorizeAIMResponse from billing import Gateway, GatewayNotConfigured from billing.signals import * from billing.utils.credi...
#!/usr/bin/env python import os import sys import argparse from collections import OrderedDict, defaultdict def sanitize(n): return n.lower().replace(" ", "_").replace(".", "_") class table(object): def __init__(self, lines, has_header=True, has_row_name=True): self.lines = lines self....
# # (c) PySimiam Team 2014 # # Contact person: Tim Fuchs <typograph@elec.ru> # # This class was implemented as a weekly programming excercise # of the 'Control of Mobile Robots' course by Magnus Egerstedt. # import numpy as np from pose import Pose from sensor import ProximitySensor from robot import Robot from math im...
#!/usr/local/bin/python from util import getRandomDist import numpy as np import logging from math import floor, ceil class TokenBucket(object): def __init__ (self, id = 0) : self.id = id self.input = [] self.output = None self.rate = 1 self.nextTime = float('inf') ...
#!/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");...
# Copyright 2011 Omniscale (http://omniscale.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 or a...
#!/usr/bin/python import problems import solver import observer print 'Hello, OptSkills!' NUM_TESTS = 11 NUM_TASKS = 6 MEAN_TYPE = 'linear' PROBLEM_CODE = None def save(prob, model, filename): import json with open(filename, 'w+') as fp: data = {} data['prob'] = repr(prob) data['mea...
''' Convenience forms for adding and updating ``Event`` and ``Occurrence``s. ''' import logging from datetime import datetime, date, time, timedelta from dateutil import rrule from pprint import pformat from django import forms from django.core.validators import MinValueValidator, MaxValueValidator from django.utils....
# -*- coding: utf-8 -*- from .Qt import QtCore, QtGui from .Vector import Vector from .SRTTransform import SRTTransform import pyqtgraph as pg import numpy as np import scipy.linalg class SRTTransform3D(pg.Transform3D): """4x4 Transform matrix that can always be represented as a combination of 3 matrices: scale * ...
# -*- coding: utf-8 -*- # vim: set ts=4 et import os import re import sqlite3 from plugin import * from . import expression VAR_TYPE_INT = 0 VAR_TYPE_FLOAT = 1 VAR_TYPE_COMPLEX = 2 VAR_TYPE_STR = 3 class Plugin(BasePlugin): def on_load(self, reload): self.db = sqlite3.connect(os.path.join(sel...
# -*- coding: utf-8 -*- import pytest from ethereum import tester from ethereum.utils import encode_hex, sha3 from raiden.utils import get_contract_path, privatekey_to_address from raiden.encoding.signing import GLOBAL_CTX from ethereum.tester import ABIContract, ContractTranslator, TransactionFailed from secp256k1 im...
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The VCoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listtransactions API from test_framework.test_framework import VCoinTestFramework from test...
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
#!/usr/bin/env python # # Copyright 2011-2015 Splunk, 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...
# ######################### LICENSE ############################ # # Copyright (c) 2005-2021, Michele Simionato # 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 so...
# Copyright (c) 2010, Ryan Bourgeois <bluedragonx@gmail.com> # All rights reserved. # # This software is licensed under a modified BSD license as defined in the # provided license file at the root of this project. You may modify and/or # distribute in accordance with those terms. # # This software is provided "as is" ...
# -*- coding: utf-8 -*- """ werkzeug.contrib.cache ~~~~~~~~~~~~~~~~~~~~~~ The main problem with dynamic Web sites is, well, they're dynamic. Each time a user requests a page, the webserver executes a lot of code, queries the database, renders templates until the visitor gets the page he sees. ...
"""Test kytos.core.switch module.""" import asyncio import json from datetime import datetime from unittest import TestCase from unittest.mock import MagicMock, Mock, patch from kytos.core import Controller from kytos.core.config import KytosConfig from kytos.core.constants import FLOOD_TIMEOUT from kytos.core.interfa...
# Copyright 2015, Cisco Systems. # 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 agr...
# -*- coding: utf-8 -*- """ Created on Mon Mar 9 14:58:39 2015 @author: jpk This script produces a report of observations taken the last 7 days at SALT and print it out on the terminal and writes it to a file. The script runs from today and queries the sdb for data going back 7 days. """ import os import sys impo...
"""Support for interface with an LG webOS Smart TV.""" import asyncio from datetime import timedelta from functools import wraps import logging from aiopylgtv import PyLGTVCmdException, PyLGTVPairException, WebOsClient from websockets.exceptions import ConnectionClosed from homeassistant import util from homeassistan...
## Automatically adapted for numpy.oldnumeric May 17, 2011 by -c import re,string,os,sys debug = False class Topology(dict): '''Database modeling a topological map.''' Line = {} Content = {} RouteInstructions = [] TopoAttrib = [] def __init__(self, **kwargs): dict.__init__(self, ...
# 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...
import json import urllib from hashlib import md5 from django.contrib import messages from django.conf import settings from django.core.urlresolvers import reverse, NoReverseMatch from django.shortcuts import render from django.http import ( HttpResponse, HttpResponseRedirect, HttpResponseNotFound, Ht...
"""Abstract tensor product.""" from sympy import Expr, Add, Mul, Matrix, Pow, sympify from sympy.printing.pretty.stringpict import prettyForm from sympy.physics.quantum.qexpr import QuantumError from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.commutator import Commutator from sympy.physics....
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
""" Copyright 2016 Deepgram 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 distri...
import linear_env_small as linear_env import sim_env from actor import Actor from critic import Critic from replay_buffer import ReplayBuffer import numpy as np import tensorflow as tf import keras.backend as kbck import json import time import argparse import matplotlib.pylab as plt import os.path def ou(x, mu, theta,...
# -*- coding: utf-8 -*- ''' Aggregation plug-in to copy all FCS files under a specified FLOW element to the user folder.or to the session workspace for download. @author: Aaron Ponti ''' from ch.systemsx.cisd.openbis.generic.shared.api.v1.dto import SearchCriteria from ch.systemsx.cisd.openbis.generic.shared.api.v1.d...
# Copyright 2018 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...
""" oauthlib.oauth2.rfc6749.tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains methods for adding two types of access tokens to requests. - Bearer http://tools.ietf.org/html/rfc6750 - MAC http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-01 """ from __future__ import absolute_import, unicode_literals fr...
# -*- coding: utf-8 -*- """ Sahana Eden Menu Structure and Layout @copyright: 2011-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 So...