gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding=utf-8 """ Concurrency support for pyRobot. This module provides: - an implementation of :class:`SignalingThread` (threads that explicitely handle signals like cancelation) - heavily modified Python futures to support robot action management. - A future executor that simply spawn one thread per future (acti...
#!/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 from django.utils import six class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than one of the given dictionaries, only the first occurrence ...
# -*- coding: utf-8 -*- import furl import httplib as http import urllib import markupsafe from django.utils import timezone from flask import request from modularodm import Q from modularodm.exceptions import NoResultsFound from modularodm.exceptions import ValidationError from modularodm.exceptions import Validatio...
# -*- coding: utf-8 -*- """ migrate ~~~~~~~ A simple generic database migration tool :copyright: (c) 2014 Francis Asante <kofrasa@gmail.com> :license: MIT """ from __future__ import print_function import os import sys import argparse import glob import string import subprocess import tempfile from ...
from copy import copy from cStringIO import StringIO import datetime import inspect import sys import traceback from django.core.management import call_command from django.core.management.commands import loaddata from django.db import models import south.db from south import exceptions from south.db import DEFAULT_DB...
# 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. """This module implements a simple WSGI server for the memory_inspector Web UI. The WSGI server essentially handles two kinds of requests: - /ajax/foo/bar:...
# Copyright 2012-2013 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 la...
# import the modules import numpy as np import os import sys import tarfile from scipy import ndimage from sklearn.linear_model import LogisticRegression from six.moves.urllib.request import urlretrieve from six.moves import cPickle as pickle url = "http://commondatastorage.googleapis.com/books1000/" last_percen...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class TaskTestCase(IntegrationT...
# Copyright (C) 2003 Python Software Foundation import unittest import shutil import tempfile import sys import stat import os import os.path from test import support from test.support import TESTFN from os.path import splitdrive from distutils.spawn import find_executable, spawn from shutil import (_make_tarball, _ma...
# Copyright (c) 2010-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 agree...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 - 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
import datetime as dt import logging import queue from abc import ABCMeta, abstractmethod from typing import Dict, Iterable, Union import numpy as np import pandas as pd import pytech.utils as utils from pytech.decorators.decorators import memoize, lazy_property from pytech.backtest.event import MarketEvent from pyte...
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a bitcoind node can load multiple wallet files """ import os import shut...
from __future__ import unicode_literals from django.template import Template from django.template.loader import render_to_string from django.utils.html import conditional_escape from crispy_forms.compatibility import text_type from crispy_forms.utils import flatatt from crispy_forms.helper import FormHelper from cri...
from flask import render_template, flash, redirect, session, url_for, request, g from flask import jsonify from flask.ext.login import login_user, logout_user, current_user, login_required from flask.ext.babel import lazy_gettext from flask.ext.sqlalchemy import get_debug_queries from app import app, db, lm, babel from...
## ## MCMC sampler for Mixture-of-Isoforms (MISO) model ## ## Yarden Katz <yarden@mit.edu> ## ## The sampler uses a Metropolis-Hastings sampling scheme, combined with ## a Gibbs sampling step. ## import scipy import misopy from misopy.reads_utils import count_aligned_reads, \ count_isofor...
from inspect import getmembers, isroutine, stack from re import search, sub import six from selenium.common.exceptions import ElementNotInteractableException, \ NoSuchWindowException, StaleElementReferenceException from selenium.webdriver.common.action_chains import ActionChains import nerodia from nerodia.adjace...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2017 Alex Forencich 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...
#!/usr/bin/env python # # Copyright (c) 2016-2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# 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 ...
import sys from ..format import Layout from .core import HTMLRuleBuilder, HTMLNode, make_joiner from ..rulesets import basic html_boxy = Layout() html_boxy.layout = dict( # Note: the classes "scalar", "sequence" and "empty" are added by # rules in descr.ruleset.basic, so make sure to include that # rul...
''' synbiochem (c) University of Manchester 2015 synbiochem is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' # pylint: disable=no-member # pylint: disable=redundant-unittest-assert # pylint: disable=too-many-public-methods imp...
# Copyright (c) 2012, Daniel Zerbino # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistributions of source code must retain the above copyright # notice, this list of conditions an...
# Copyright 2013 Google, Inc. All Rights Reserved. # # Google Author(s): Behdad Esfahbod """GUI font inspector. """ from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from fontTools import misc, ttLib, cffLib import pygtk pygtk.require('2.0') import gtk import sys cl...
import os from arcproject.waterquality import classes from arcproject.scripts.load_data_bulk import slurp # path to location with data data = r"C:\Users\Andy\Desktop\ArcData" # or location on x drive def jan(): print("January 2014") path = os.path.join(data, "Jan_2014", "Arc_011314") s = slurp.Slurper() s.add_n...
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # # 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 # # U...
# Copyright 2021, 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...
#!/usr/bin/env python3 from netcdfTools import * import sys import argparse import numpy as np from utilities import filesFromList, writeLog ''' Description: Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteorological Institute ''' #======================...
import xmlrpc.client import ssl import socket # Required for network/socket connections import os # Required for Forking/child processes import time # Required for sleep call import threading # Required for communication sub-threads import pymysql import server_monitor as myServer import certs.gencer...
"""Functions defined in TVM.""" # pylint: disable=invalid-name,unused-import,redefined-builtin from __future__ import absolute_import as _abs from numbers import Integral as _Integral from ._ffi.base import string_types from ._ffi.node import register_node, NodeBase from ._ffi.node import convert_to_node as _convert_...
"""Disassembler of Python byte code into mnemonics.""" import sys import types import collections import io from opcode import * from opcode import __all__ as _opcodes_all __all__ = ["code_info", "dis", "disassemble", "distb", "disco", "findlinestarts", "findlabels", "show_code", "get_instructi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
""" Axislines includes modified implementation of the Axes class. The biggest difference is that the artists responsible to draw axis line, ticks, ticklabel and axis labels are separated out from the mpl's Axis class, which are much more than artists in the original mpl. Originally, this change was motivated to support...
# -*- 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 ...
from __future__ import absolute_import import logging from django.contrib import messages from django.core.context_processors import csrf from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.decorators import method_decorator from django.utils.translation import ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from collections import namedtuple from os import getcwd, fdopen, fstat as stat from time import ctime, time from ..fdbus_h import * from ..exceptions.exceptions import * # a client name/id field (i.e. a process name or identifier/pid) fdobj = namedtuple('File_Descriptor...
#!/usr/bin/env python # load libraries from __future__ import print_function import argparse from openpyxl import load_workbook import coloredlogs import logging import re import couchdb import numbers import yaml # global variables WARNINGS = 0 NONNUMERIC = [] EMPTY = [] BADRIN = [] OUTCONC = [] OUTVOL = [] # Set u...
"""Tests for the Hyperion config flow.""" from __future__ import annotations import asyncio from typing import Any, Awaitable from unittest.mock import AsyncMock, Mock, patch from hyperion import const from homeassistant import data_entry_flow from homeassistant.components.hyperion.const import ( CONF_AUTH_ID, ...
''' YARN Cluster Metrics -------------------- yarn.metrics.appsSubmitted The number of submitted apps yarn.metrics.appsCompleted The number of completed apps yarn.metrics.appsPending The number of pending apps yarn.metrics.appsRunning The number of running apps yarn.metrics.apps...
r"""An implementation of the Web Site Process Bus. This module is completely standalone, depending only on the stdlib. Web Site Process Bus -------------------- A Bus object is used to contain and manage site-wide behavior: daemonization, HTTP server start/stop, process reload, signal handling, drop privileges, PID ...
""" These MathApp-based digital logic classes are experimental. """ from abc import ABCMeta, abstractmethod from ggame.mathapp import _MathDynamic # decorator for _getvalue or any value handler that may experience recursion def _recursiontrap(handler): def trapmagic(self): """ An attempt to catch...
# -*- coding: utf-8 -*- # # This file is part of GetTor, a Tor Browser distribution system. # # :authors: Israel Leiva <ilv@riseup.net> # see also AUTHORS file # # :copyright: (c) 2008-2015, The Tor Project, Inc. # (c) 2015, Israel Leiva # # :license: This is Free Software. See LICENSE for lic...
"""Tests for the Formatters.""" import warnings from math import pi try: import numpy except: numpy = None import nose.tools as nt from IPython import get_ipython from traitlets.config import Config from IPython.core.formatters import ( PlainTextFormatter, HTMLFormatter, PDFFormatter, _mod_name_key, ...
import socket import json from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from rest_framework.test import APIClient from rest_framework import status from rest_framework.test import APITestCase from hs_core.hydroshare import users from hs_core.hydroshare import resource cl...
# 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 # notice, this list of conditi...
from sympy import Abs, S, Symbol, symbols, I, Rational, PurePoly, Float from sympy.matrices import \ Matrix, MutableSparseMatrix, ImmutableSparseMatrix, SparseMatrix, eye, \ ones, zeros, ShapeError from sympy.utilities.pytest import raises def test_sparse_matrix(): def sparse_eye(n): return SparseM...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ''' Miscellaneous algorithms Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname(os.path.realpath(__file__)) >>> datadir = os.path.realpath(...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 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, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from distutils.version import LooseVersion from functools import reduce import operator from cms import __version__ as CMS_VERSION from django.core import checks from django.db import models from django.db.models.aggregates import Sum from django.db.model...
############################################################################### ## fs.py ## 9te [angband.ornl.gov] ## Wed Jan 12 10:37:50 2011 ############################################################################### ## Copyright (C) 2008 Oak Ridge National Laboratory, UT-Battelle, LLC. ##------------------------...
# -*- coding: utf-8 -*- from flask import Blueprint, jsonify, request from pns.app import app from pns.forms import CreateChannelForm from pns.models import db, Channel, User, Alert from pns.json_schemas import registration_schema channel = Blueprint('channel', __name__) @channel.route('/channels', methods=['POST'...
import Queue import threading import time import struct import serial import colorsys import paho.mqtt.client as mqtt DEVICES = { "OVERHEAD": 0, "SLEEP": 1, "BED_LEFT": 2, "BED_CENTER": 3, "BED_RIGHT": 4 } NUM_LEDS = { "OVERHEAD": 20, "SLEEP": ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may ...
# 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 agreed to in...
from decimal import Decimal from django import forms from django.template import loader from django.template import RequestContext from django.utils.translation import ugettext_lazy as _ from l10n.utils import moneyfmt from livesettings import config_value, config_value_safe from payment import signals from payment.con...
""" Algorithms for computing the skeleton of a binary image """ import numpy as np from scipy import ndimage as ndi from ._skeletonize_cy import _skeletonize_loop, _table_lookup_index # --------- Skeletonization by morphological thinning --------- def skeletonize(image): """Return the skeleton of a binary imag...
import ctypes as ct import freetype.raw as ft from ed2d import texture from ed2d import mesh from ed2d import typeutils from ed2d.opengl import gl, pgl # from ed2d import glmath as cyglmath # from ed2d.glmath import cython as cyglmath from gem import matrix, vector # Hack to verify that freetype is properly destruc...
#!/usr/local/bin/python3 # mapsParser5.py # Parsing script for multi-plate spectrophotometer in PLATE format # # Author: Daniel A Cuevas # Created on 11 Nov 2017 # Updated on 11 Nov 2017 # # ############################################################### # ASSUMPTIONS #############################...
from __future__ import unicode_literals from datetime import timedelta from .base import (OccurrenceDataTestCase, Notification, Occurrence, TimelineSubscription, now) from ..handlers.base import AppointmentHandler from ..handlers.confirm import ConfirmHandler from ..handlers.move import MoveHandler from ..handler...
# 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 a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Author: Bertrand256 # Created on: 2017-04 import base64 import os from typing import ByteString, List, Tuple, Generator from PyQt5.QtWidgets import QMessageBox from cryptography.fernet import Fernet, InvalidToken from app_defs import get_note_url from app_utils import S...
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
# Copyright 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 requ...
""" Models the HostWgsRawSeqSet object. """ import json import logging import os import string from cutlass.iHMPSession import iHMPSession from cutlass.Base import Base from cutlass.aspera import aspera from cutlass.Util import * # pylint: disable=W0703, C1801 # Create a module logger named after the module module_l...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for parts of our release automation system. """ import os import sys from setuptools.dist import Distribution from twisted.trial.unittest import TestCase from twisted.python import dist from twisted.python.dist import (get_setup_ar...
# coding: utf-8 from sqlalchemy import and_ from sqlalchemy import bindparam from sqlalchemy import Computed from sqlalchemy import exc from sqlalchemy import except_ from sqlalchemy import ForeignKey from sqlalchemy import func from sqlalchemy import Index from sqlalchemy import Integer from sqlalchemy import litera...
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
"""Builds the eye network. Summary of available functions: # Compute input images and labels for training. If you would like to run # evaluations, use inputs() instead. inputs, labels = distorted_inputs() # Compute inference on the model inputs to make a prediction. predictions = inference(inputs) # Compute t...
#---------------------------------------------------------------------- # Copyright (c) 2013-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
#! /usr/bin/env python # File Docstring """Chapter: Game This is where the actual meat of the game takes place.""" # Import Modules import __init__ import sys import random import pygame from pygame.locals import * # Import Game Data from DIR_sprite.DAT_token import SPT_token from DIR_sprite.DAT_spotselector impo...
# 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 ...
import logging import warnings from typing import Optional, Union from uuid import UUID from dateutil.parser import parse from great_expectations.core.data_context_key import DataContextKey from great_expectations.core.id_dict import BatchKwargs, IDDict from great_expectations.core.run_identifier import RunIdentifier...
# Copyright 2014 - Mirantis, Inc. # Copyright 2015 - StackStorm, 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 # # Unl...
""" Classes and functions for templates. """ from __future__ import absolute_import, division, print_function import sys from glob import glob import os import traceback import numpy as np from astropy.io import fits from .utils import native_endian, elapsed, transmission_Lyman from .rebin import rebin_template, t...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BookBorrowRequest.status' db.add_column('cabinet_bookborrowrequest', 'status', ...
#!/usr/bin/env python import json import math import re class PManager(object): def __init__(self, pm_data): if isinstance(pm_data, (str, unicode)): self.pm_data = json.loads(pm_data) else: self.pm_data = pm_data self.data = self.pm_data['ks_spaces'] self....
# Copyright 2011-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...
# -*- coding: utf-8 -*- import json import yaml import pytest from unittest import TestCase from lain_sdk.yaml.parser import ( LainConf, ProcType, Proc, just_simple_scale, render_resource_instance_meta, DEFAULT_SYSTEM_VOLUMES, DOMAIN, MIN_SETUP_TIME, MAX_SETUP_TIME, MIN_KILL_TIMEOUT, MAX_KILL_TIMEO...
from unittest import TestCase, main import datetime from random import choice, randint from string import ascii_letters from uuid import UUID from amgut.lib.data_access.ag_data_access import AGDataAccess from amgut.lib.util import rollback class TestAGDataAccess(TestCase): def setUp(self): self.ag_data =...
# -*- coding: utf-8 -*- # Copyright 2014 Metaswitch Networks # # 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...
# -*- coding: utf-8 -*- """ NEEDS CLEANUP SO IT EITHER DOES THE IMPORTS OR GENERATES THE FILE python -c "import utool" """ from __future__ import absolute_import, division, print_function, unicode_literals import sys import multiprocessing import textwrap #import types #DEBUG_IMPORTS = '--debug-imports' in sys.argv ...
# Copyright (c) 2013 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 ...
from __future__ import absolute_import, division, print_function import pytest import os import numpy as np import sqlalchemy as sa from datashape import discover, dshape import datashape from into.backends.sql import (dshape_to_table, create_from_datashape, dshape_to_alchemy) from into....
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'JobServer' db.create_table(u'porkweb_jobserver', ( (u'id', self.gf('django.db.mo...
#!/usr/bin/python import cgi import os import sys import json import urllib import requests import networkx as nx from networkx.readwrite import json_graph from flask import Flask, render_template, url_for, request, redirect import settings app = Flask(__name__) enable_ganglia=settings.enable_ganglia ganglia_url=sett...
import asyncio import base64 import binascii import io import json import mimetypes import os import re import uuid import warnings import zlib from collections import Mapping, Sequence, deque from pathlib import Path from urllib.parse import parse_qsl, quote, unquote, urlencode from multidict import CIMultiDict from...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/python # -*- coding: utf-8 -*- # Author: Matt Flood """ MediumBot's configuration GUI to make it easier for non-technical users to use the bot. Note: this is a starting point for the GUI and is not finished. """ from Tkinter import * from ttk import * from tempfile import mkstemp from shutil import move fr...
from __future__ import print_function from six import string_types as _string_types import numpy as np import tensorflow as tf import coremltools from tensorflow.python.util import compat from coremltools.models.neural_network import NeuralNetworkBuilder from coremltools.models import datatypes, utils, MLModel from wa...
"""Generated message classes for testing version v1. Allows developers to run automated tests for their mobile applications on Google infrastructure. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apitools.base.py import encod...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 Violin Memory, 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...
from typing import Any, Dict, List, Mapping, Set import orjson from zerver.lib.test_classes import ZulipTestCase from zerver.lib.user_status import get_user_info_dict, update_user_status from zerver.models import UserProfile, UserStatus, get_client def get_away_user_ids(realm_id: int) -> Set[int]: user_dict = g...
import os import re from peewee import * from peewee import create_model_tables from peewee import drop_model_tables from peewee import mysql from peewee import print_ from playhouse.reflection import * from playhouse.tests.base import database_initializer from playhouse.tests.base import PeeweeTestCase sqlite_db = ...
import logging from screen_objects import ScreenObjectsManager, ScrollBar, \ TouchAndTextItem from ..input import InputManager logger = logging.getLogger(__name__) class ListView(): def __init__(self, pos, size, base_size, font): self.size = size self.pos = pos self.base_size = base...
# 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 ...
# Generated from Lustre.g4 by ANTLR 4.7.2 # encoding: utf-8 from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2") buf.write(u"A\u01be\b\1\4\2\t\2\...