gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python import datetime import logging import os import re from urllib.parse import urljoin from utils import utils, inspector # http://oig.pbgc.gov/ archive = 1998 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web team: # AUDIT_REPORTS_URL = "http://oi...
from contextlib import contextmanager import tempfile import tarfile import zipfile import shutil import uuid import six import os class FilesAssertionsMixin: def unique_val(self): """Return a uuid1 value""" return str(uuid.uuid1()) def make_temp_file(self): """ Make a temp fi...
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # 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 ...
from collections import defaultdict from src.primitive import add from src.primitive import check_rectangle_intersection from src.primitive import closest_int_same_bit_count from src.primitive import divide from src.primitive import find_parity from src.primitive import get_intersection from src.primitive import multi...
import datetime import os from django.db import models from django.utils.itercompat import is_iterable from djapian.signals import post_save, pre_delete from django.conf import settings from django.utils.encoding import smart_str from djapian import decider from djapian.database import CompositeDatabase from djapian....
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import uuid from c7n_azure.provider import resources from c7n_azure.resources.arm import ArmResourceManager from c7n_azure.utils import StringUtils, PortsRangeHelper from azure.core.exceptions import AzureError from c7n.actions import Bas...
from flask import redirect, render_template, request, url_for, flash, session from sqlalchemy import func from time import time from pyfsw import app, db from pyfsw import admin_required, current_user from pyfsw import Account, LoginHistory, PayPalHistory, ZayPayHistory # Handle Login Logs @app.route('/admin/logs/lo...
# Copyright 2014 OpenStack Foundation # Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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...
# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it w...
#from .ansi import Terminal import curses #from curses import wrapper from .message import * from .collection import * import datetime """ date |time |msgcount|num flights| ------------------------------------------------------------------------------ ICOA |call sign |lat |lon |dist |view |last seen |...
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # ...
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
""" Copyright 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 https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
"""JSON implementations of type objects.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowed in pack...
import re from unittest import TestCase from asserts import ( assert_false, assert_true, assert_equal, assert_is_none, assert_raises, ) from htmlgen.element import Element, VoidElement, NonVoidElement class NonVoidElementTest(TestCase): def test_generate_children(self): class Testing...
#!/usr/bin/python """nrvr.process.commandcapture - Subprocesses wrapped for automation The main class provided by this module is CommandCapture. It should work in Linux and Windows. On the downside, nothing has been coded yet in this module to allow input into a running subprocess. Idea and first implementation - ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to u...
# =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import locale import os import re from socket import timeout as SocketTimeout # this is quote from the shlex module, added in py3.3 _find_unsafe = re.compile(br'[^\w@%+=:,./~-]').search def _sh_quote(s): """Return a shell-escaped version of the string `s`.""" if not s: return b"" if _find_unsafe...
# Copyright 2012 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
from _ctypes.basics import _CData, _CDataMeta, cdata_from_address from _ctypes.primitive import SimpleType, _SimpleCData from _ctypes.basics import ArgumentError, keepalive_key from _ctypes.basics import is_struct_shape from _ctypes.builtin import get_errno, set_errno, get_last_error, set_last_error import _rawffi imp...
# 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...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
import __main__ import numpy import pylab import os.path import scipy.stats from math import pi, sqrt, exp, pow from topo.plotting.plotfilesaver import * from topo.command.pylabplot import cyclic_tuning_curve, matrixplot from topo.command.analysis import save_plotgroup from matplotlib.ticker import MaxNLocator from pa...
import contextlib import datetime import gzip import io import logging import re import sys import time import uuid import warnings import zlib import msgpack import pandas as pd import requests import tdclient import tdclient.version from pandas_td.version import __version__ try: # Python 3.x from urllib.pa...
#!/usr/bin/python # -*- coding: utf-8 -*- # # FILE: TwitterBase.py # # A simple example of making a web service call using Twitter API # # Copyright by Author. All rights reserved. Not for reuse without # express permissions. # import sys, time, json, random, logging import requests from requests.exceptions im...
# coding=utf-8 # Copyright 2022 The Tensor2Tensor 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...
# %% """ Example implementations of HARK.ConsumptionSaving.ConsPortfolioModel """ from copy import copy from time import time import matplotlib.pyplot as plt import numpy as np from HARK.ConsumptionSaving.ConsIndShockModel import init_lifecycle from HARK.ConsumptionSaving.ConsPortfolioModel import ( PortfolioCons...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from collections import namedtuple from cryptography import utils from c...
import datetime from django.conf import settings try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() from django.core import mail from django.core.urlresolvers import reverse from django.test impor...
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
# minroom.py 21/03/2015 D.J.Whale # # Model of a minimum room and it's surroundings. # The minimum room is a 9x9x9 model as follows: # 0 = outside, 1=outside_touching, 2=on, 3=inside_touching # 4 = inside # 5 = inside_touching, 6=on, 7=outside_touching, 8=outside # # Any 3D rectangular room can be scaled down to this...
""" Model the name distribution as a function of state and year using a spatiotemporal Gaussian Process model with multinomial observations. We use the Polya-gamma augmentation trick to perform fully-Bayesian inference. """ import os import time import gzip from zipfile import ZipFile from urllib.request import urlret...
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
from sqlparse import tokens KEYWORDS = { 'ABORT': tokens.Keyword, 'ABS': tokens.Keyword, 'ABSOLUTE': tokens.Keyword, 'ACCESS': tokens.Keyword, 'ADA': tokens.Keyword, 'ADD': tokens.Keyword, 'ADMIN': tokens.Keyword, 'AFTER': tokens.Keyword, 'AGGREGATE': tokens.Keyword, 'ALIAS': to...
# -*- coding: utf-8 -*- from django.test import TestCase from django.core import exceptions from nose.tools import raises from oscar.apps.order.models import ShippingAddress from oscar.core.compat import get_user_model from oscar.apps.address import models User = get_user_model() class TestUserAddress(TestCase): ...
#!/usr/bin/env python3 # This file is part of the MicroPython project, http://micropython.org/ # The MIT License (MIT) # Copyright (c) 2020 Damien P. George import sys, os, time, re, select import argparse import itertools import subprocess import tempfile sys.path.append("../tools") import pyboard if os.name == "n...
# Copyright (C) 2013-2015 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
"""Manage Treadmill allocations. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import logging import click import six from treadmill import cli from treadmill import context from treadmill import restclient ...
"""Test Times of the Day Binary Sensor.""" from datetime import datetime, timedelta from unittest.mock import patch import pytest from homeassistant.const import STATE_OFF, STATE_ON import homeassistant.core as ha from homeassistant.helpers.sun import get_astral_event_date, get_astral_event_next from homeassistant.se...
# 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 __future__ import unicode_literals, division, absolute_import import logging import re from datetime import datetime, timedelta from dateutil.parser import parse as dateutil_parse from sqlalchemy import Table, Column, Integer, String, Unicode, Boolean, Date, DateTime, Time, or_, func from sqlalchemy.orm import re...
import copy import random from datetime import datetime from .._compat import integer_types, basestring from ..exceptions import NotOnNOSQLError from ..helpers.classes import FakeCursor, Reference, SQLALL from ..helpers.methods import use_common_filters, xorify from ..objects import Field, Row, Query, Expression from ....
#!/usr/bin/python import os import re import pandas as pd import numpy as np #GENE FORMAT #PIK3CA 3 178866311 178952497 #BIO-VCF # biovcf = "bio-vcf -i --num-threads=2" vocabulary = {"None":-1, "clean":0, "sequence_feature":0, "synonymous_variant":0, "intron_variant":0, "5_prime_UTR_variant":0.5, "non_coding_exon_...
# Copyright 2013 Donald Stufft and individual contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
from operator import mul, div, sub from corehq.apps.locations.models import SQLLocation from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, DataTablesColumnGroup from django.utils.translation import ugettext as _ from custom.icds_reports.sqldata import BaseIdentification, BaseOperationaliz...
# Copyright 2015 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 base64 import json import unittest import mock from google.appengine.ext import ndb from dashboard.common import testing_common from dashboard.comm...
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import json import logging import re from collections import defaultdict from dataclasses import dataclass from typing import DefaultDict from pants.ba...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # # Copyright 2021 The NiPreps Developers <nipreps@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
# Copyright 2013 Pedro Navarro Perez # 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...
""" tebdIsing4.py Use TEBD to compute ground state of transverse field Ising model. 2014-09-17 """ import numpy as np from cmath import * from mpstest17 import * import matplotlib.pyplot as plt import time def main(): test0() def test0(): (J,hx) = (0,1) (nsteps,chi) = (100,5) for N in [3]: te...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import copy, StringIO, re try: import logging except: import InfoLogging as logging import dtdcode # HTML Class uses this to suppress end-tag output, XHTML class uses these to write singletons. TAG_OPTIONAL=1 TAG_REQUIRED=0 TAG_FORBIDDEN=2 MLT_SPACE = re.compile (' +') NBSP_REF = "&nbsp;" class TagNotAllowedExc...
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from .kern import Kern from ...core.parameterization import Param from paramz.transformations import Logexp from paramz.caching import Cache_this class TruncLinear(Kern): """ Tr...
""" Known email providers and their MX domains. """ __all__ = ['providers', 'public_domains'] # NOTE: Please add new providers and MX servers in alphabetic order. # The labels `self`, `unknown`, `nomx` and `nullmx` are reserved. Don't add them here. # Provider names are identifiers and should never change, even if t...
import datetime from unittest import mock import pytest from aiohttp import helpers def test_parse_mimetype_1(): assert helpers.parse_mimetype('') == ('', '', '', {}) def test_parse_mimetype_2(): assert helpers.parse_mimetype('*') == ('*', '*', '', {}) def test_parse_mimetype_3(): assert (helpers.pa...
# Copyright 2015 - Mirantis, 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 t...
# Copyright 2012 Pedro Navarro Perez # 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...
# Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, ...
# coding: utf-8 """ Copyright 2015 SmartBear Software 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 sys import math import argparse from collections import namedtuple import referenceddr NS = namedtuple('NS', ['val']) TCK = namedtuple('TCK', ['val']) class Span: def __init__(self, expr, ram, is_ticks=False): self.expr = expr # The span in NS, as a string requiring eval() or as a float or int. self.ram ...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
''' Created on 2009-09-14 @author: beaudoin ''' import wx import Utils from MemberDisplay import MemberDisplay # Unique list for all the images _iconList = None _iconDict = {} _unknownIcon = '../data/ui/unknownIcon.png' def _getIconList(): global _iconList if _iconList is None : _iconList = wx.Imag...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging from parameterized import parameterized import unittest import xml.dom.minidom import extract_histograms TEST_SUFFIX_OBSOLETION_XML_CONTENT ...
""" 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 this ...
# Copyright (C) 2020 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# # DenonTelnet V0.0 # ================ # Written by Nick Card, <nick@nicholascard.com> # # Modified from DenonSerial V0.6, written by Oliver Wagner, <owagner@hometheatersoftware.com> # # Revision history: # ----------------- # 0.1 - initial # help = """\ Small trivial plugin to control Denon AVRs and AMPs via Telne...
import sys from decimal import Decimal import numpy as np from numpy.testing import * from numpy.testing.utils import WarningManager import warnings class TestEinSum(TestCase): def test_einsum_errors(self): # Need enough arguments assert_raises(ValueError, np.einsum) assert_raises(ValueErr...
"""The tests for the notify demo platform.""" import unittest from unittest.mock import patch import pytest import voluptuous as vol import homeassistant.components.notify as notify from homeassistant.setup import setup_component import homeassistant.components.demo.notify as demo from homeassistant.core import callb...
''' This module should be organized as follows: Main function: chi_estimate() = returns chi_n, chi_b - calls: wealth.get_wealth_data() - returns data moments on wealth distribution labor.labor_data_moments() - returns data moments on labor supply minstat() - returns min of statistical objec...
# 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...
<<<<<<< HEAD <<<<<<< HEAD """ Test suite for socketserver. """ import contextlib import os import select import signal import socket import select import errno import tempfile import unittest import socketserver import test.support from test.support import reap_children, reap_threads, verbose try: import threadin...
# -*- coding: utf-8 -*- import datetime import constants # Choose and configure the browser of your choice def get_browser(): return webdriver.Chrome() # The host and port where the tested ap shoud listen. HOST = '127.0.0.1' PORT = 8080 # The host alias set in the /etc/hosts file. # The actual tests will navi...
from django.template import TemplateSyntaxError from django.test import SimpleTestCase from ..utils import TestObj, setup class IfTagTests(SimpleTestCase): @setup({'if-tag01': '{% if foo %}yes{% else %}no{% endif %}'}) def test_if_tag01(self): output = self.engine.render_to_string('if-tag01', {'foo'...
__author__ = 'JohnHiness' import sys import os import random import time import string import connection from time import strftime import ceq import json, urllib2 import thread args = sys.argv req_files = ['filegen.py', 'connection.py', 'commands.py', 'general.py', 'automatics.py'] for filename in req_files: if os....
from __future__ import absolute_import, print_function, division import sys import numpy import convolutional_mlp import dA import DBN import logistic_cg import logistic_sgd import mlp import rbm import rnnrbm import SdA import rnnslu import lstm def test_logistic_sgd(): logistic_sgd.sgd_optimization_mnist(n_ep...
import os import time import click from random import randint from rooms.room import LivingSpace, Office from people.person import Fellow, Staff from db.models import People, Rooms, DatabaseManager, Base from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker class Amity(object): ''' Amit...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
#### PATTERN | EN | PATTERN MATCHING ############################################################### # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ####################################...
########################################################################## # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by ...
from compiler import ast from functools import update_wrapper from pony.utils import throw class TranslationError(Exception): pass class ASTTranslator(object): def __init__(translator, tree): translator.tree = tree translator.pre_methods = {} translator.post_methods = {} def dispatch(...
""" Utilities to generate the MRI data acquisition portion of a methods section from a BIDS dataset. """ import re from collections import Counter import numpy as np from num2words import num2words from os.path import join, basename __version__ = '0.1' # TODO: Determine if directions are correct dir_converter = {'i':...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
from __future__ import print_function import time, weakref, collections import numpy as np from acq4.util import Qt from acq4.modules.Module import Module import acq4.util.InterfaceCombo # just to register 'interface' parameter type from acq4.util.DataManager import getDirHandle import acq4.pyqtgraph as pg class No...
from __future__ import unicode_literals from decimal import Decimal as D import logging from django.views.generic import RedirectView, View from django.conf import settings from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.contrib import messages from django.contrib.auth.m...
# 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...
"""Maintain moving averages of parameters.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.framework import ops from tensorflow.python.framework import types from tensorflow.python.ops import array_ops from tensorflow.python.ops imp...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
from test import support import time import unittest import locale import sysconfig import sys import platform try: import threading except ImportError: threading = None # Max year is only limited by the size of C int. SIZEOF_INT = sysconfig.get_config_var('SIZEOF_INT') or 4 TIME_MAXYEAR = (1 << 8 * SIZEOF_INT...
from PIL import Image import Logger import models import os import random import subprocess import time class ReferenceMachine: def __init__(self, image_name, system_name): # type: (str, str) self._image_name = image_name self._system_name = system_name def _get_image_name(self): ...
# 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...
# 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...
#GOMTVNET - by Futurefive 2011 #Content scraped from m.gomtv.net #Thanks to Voinage for his XBMC plugin tutorial and boilerplate code http://wiki.xbmc.org/index.php?title=HOW-TO_write_plugins_for_XBMC #Thanks to Temhil for his XBMC Eclipse debugging tutorial http://wiki.xbmc.org/index.php?title=HOW-TO_debug_Python_Scri...
__doc__ = """ Neural turing machine. Names of arrays --------------- Along with range of elements [low, high] Mprev_bnm: previous memory state. [-inf, inf] X_bk: external inputs. [0,1] wprev_bHn: previous weights (read & write). [0, 1]. Normalized along axis 2. rprev_bhm: pr...
import unittest2 import webtest import json import webapp2 from datetime import datetime from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.event_type import EventType from controllers.api.api_district_controller import ApiDistrictTeamsController from controllers.api.api_team_c...