src
stringlengths
721
1.04M
#/###################/# # Import modules # #ImportModules import ShareYourSystem as SYS #/###################/# # Build the model # #Define MyBrianer=SYS.BrianerClass( ).mapSet( { '-Neurongroups':{ '|Input':{ }, '|Population':SYS.BrianerClass( ).mapSet( { 'RatingUnitsInt':3 } ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-22 20:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
# software-properties backend # # Copyright (c) 2004-2007 Canonical Ltd. # 2004-2005 Michiel Sikkes # # Author: Michiel Sikkes <michiel@eyesopened.nl> # Michael Vogt <mvo@debian.org> # Sebastian Heinlein <glatzor@ubuntu.com> # # This program is free software; you can redistribute it...
# # ast_return_stmt.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, either version 2 of the License, or # (at your option) ...
import sys import pygame from pygame.locals import * def main(): pygame.init() gameWidth = 460 gameHeight = 230 miniMapFactor = 8 mainSurface = pygame.display.set_mode((gameWidth, gameHeight)) mainClock = pygame.time.Clock() FPS = 30 pygame.display.set_caption('Screen Scroll Test') ...
# Copyright (c) 2015 Scality # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
"""Training script for the DeepLab-LargeFOV network on the PASCAL VOC dataset for semantic image segmentation. This script trains the model using augmented PASCAL VOC dataset, which contains approximately 10000 images for training and 1500 images for validation. """ from __future__ import print_function import ar...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # 绘制三维图需要这个工具包 # 加载数据集 def loadData(file): with open(file) as f : lines = f.readlines() size = len(lines) # 获得文件的行数 data = np.zeros((size,3)) # 保存数据 labels = [] # 保存分类 # 解析行 index = 0 for line in lines:...
#!/usr/bin/python """Update the lxc 'download' template cache for hosts on closed networks.""" from __future__ import print_function from argparse import ArgumentParser from collections import namedtuple import errno import os import sys import traceback import shutil import subprocess import urllib2 SITE = 'https:...
from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Base, User, Item engine = create_engine('postgresql://postgres:postgresql@localhost:5432/user_item_catalog') Base.metadata.bind = engine DBSession = sessionmaker(bind=engine) session = DBSession() te...
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
import pandas as pd import numpy as np from .loader import load_return_data class Analysis: def __init__(self, price_df, income_df=None): self.price_df = price_df if income_df is not None: self.income_df = income_df self.start_date = price_df.index[0] self.end_date = p...
import argparse import logging import sys import gc import cv2 import matplotlib.pyplot as plt import gym import universe # register the universe environments from universe import wrappers from collections import deque from skimage.color import rgb2gray from skimage.transform import resize import numpy as np import t...
import numpy as np import cPickle as pickle from ase.structure import molecule from gpaw.lcao.tools import makeU, makeV from gpaw import GPAW, FermiDirac, restart from gpaw.lcao.pwf2 import LCAOwrap from gpaw.lcao.tools import remove_pbc, get_bfi2, get_bf_centers from gpaw.mpi import world, rank, MASTER, serial_comm fr...
# -*- coding: utf-8 -*- """Tests for SQL Model. Currently these tests are coupled tighly with MySQL """ from datetime import datetime from django.db import connection, models from django.db.models import Q import pytest from olympia.amo.tests import BaseTestCase from olympia.editors.sql_model import RawSQLModel d...
from collections import namedtuple from typing import List from django.views.generic import TemplateView, View from django.http import HttpResponse from braces.views import LoginRequiredMixin, GroupRequiredMixin from poetry.apps.corpus.models import Poem, MarkupVersion from rupo.main.markup import Markup def get_ac...
"""Defines a scanner that scans an S3 bucket backed workspace for files""" from __future__ import unicode_literals import logging from ingest.scan.scanners.scanner import Scanner logger = logging.getLogger(__name__) class S3Scanner(Scanner): """A scanner for an S3 bucket backed workspace """ def __ini...
""" author Talha Oz this is the main code implemented for cs780 class project """ # -*- coding: utf-8 -*- import pandas as p import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer import re from sklearn import cross_validation import preprocessing as pre from sklearn.naive_bayes import Multinom...
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib,urllib2,re,xbmcaddon,xbmcplugin,xbmcgui,xbmc,HTMLParser from stream import * htmlparser = HTMLParser.HTMLParser() pluginhandle = int(sys.argv[1]) itemcnt = 0 baseurl = 'http://www.szene-streams.com' settings = xbmcaddon.Addon(id='plugin.video.szene-streams') maxi...
#! /usr/bin/env python3 import http.server import os import shutil import socket import subprocess import tempfile import threading import unittest class WrapperScriptTests(unittest.TestCase): http_port = 8080 default_download_url = "http://localhost:" + str(http_port) + "/test/testapp.jar" def setUp(se...
# -*- coding: utf-8 -*- import string import unittest import morph from six.moves.urllib import parse import sqlalchemy as sa from .runner import settings, test_dbs #------------------------------------------------------------------------------ class DbTestCase(unittest.TestCase): ''' Creates database using alem...
#coding=utf-8 import logging import string import threading from GUI import Task from GUI import application from GUI.Colors import rgb from functools32 import lru_cache import cap.cap_manager from session import create_session from term import TextAttribute, TextMode, reserve import term.term_keyboard from term.term...
import configparser import os import sys import json import time import hashlib import subprocess import urllib.request from datetime import datetime from shutil import copyfile def convert_size(number): """ Convert and integer to a human-readable B/KB/MB/GB/TB string. :param number: integer to b...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # 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...
from PointOfInterest import * from path import * from xbee import ZigBee from WirelessFunctions import * import time import serial import Queue import termios, fcntl, sys, os fd = sys.stdin.fileno() oldterm = termios.tcgetattr(fd) newattr = termios.tcgetattr(fd) newattr[3] = newattr[3] & ~termios.ICANON & ~termios.E...
import sys #from graph_def_builder import GraphDefBuilder from core.framework.attr_value_pb2 import AttrValue from core.framework.graph_pb2 import NodeDef from attr_value_builder import AttrValueBuilder class NodeDefBuilder(object): def __init__(self, node=None): self.node_def_ = node if node else NodeDef(...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Tue Aug 6 14:52:51 2013 by generateDS.py version 2.10a. # # Copyright (C) 2011,2012,2013 American Registry for Internet Numbers # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provi...
# vim: set et sw=4 sts=4: # Copyright 2012 Dave Hughes. # # This file is part of dbsuite. # # dbsuite 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, either version 3 of the License, or (at your option) any l...
from . import _batoid from .coordSys import CoordSys import numpy as np class CoordTransform: """Transformation between two coordinate systems. Parameters ---------- fromSys : CoordSys Origin coordinate systems. toSys : CoordSys Destination coordinate systems. """ def __in...
import codecs import os import re import sys from setuptools import setup with open(os.path.join(os.path.dirname(__file__), "README.rst")) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) def read(filepath):...
#regrid.py # to redraw the grids, to interpolate, etc """ USE: from armor import pattern from armor.geometry import regrid reload(pattern); reload(regrid) a = pattern.a ; c = pattern.c ; a.load(); c.load(); e = regrid.regrid(a,c) e.show() """ """ input: DBZ object, new_horizontal_dimension, new_vert...
''' Created on May 30, 2017 @author: Sam Holden <sholden@holden.id.au> ''' class World(object): ''' classdocs ''' def __init__(self, port, size, atmo, hydro, pop, govt, law, tech, bases=None, extra=None): ''' Constructor ''' self._port = port ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.apps import apps from .util import form_with_captcha __all__ = ["DatafileForm"] __author__ = "pmeier82" Asset = apps.get_registered_model("base", "asset") Datafile = apps.get_registered_model("djspikeval", "datafile"...
#!/usr/bin/env python # $Id: Filters.py,v 1.1 2006-09-06 09:50:08 skyostil Exp $ """Filters for the #filter directive; output filters Cheetah's $placeholders . Filters may now be used standalone, for debugging or for use outside Cheetah. Class DummyTemplate, instance _dummyTemplateObj and class NoDefault exist on...
import json import re from django import http from django.db.models import Count from django.shortcuts import redirect, render from django.views.decorators.csrf import csrf_exempt from tower import ugettext as _ import amo import amo.utils from addons.decorators import owner_or_unlisted_reviewer from amo.decorators ...
# from trex import redis # # from .mixins import REDIS_HOST, REDIS_PORT # # # class TestRedisConnections(unittest.TestCase): # _KEYS = ['trex:testwatch1', 'trex:testwatch2'] # # @defer.inlineCallbacks # def setUp(self): # self.connections = [] # self.db = yield self._getRedisConnection() # ...
import os import re from typing import Any from OpenSSL import SSL, crypto from mitmproxy import exceptions from mitmproxy import options as moptions from mitmproxy import certs from mitmproxy.net import tcp from mitmproxy.net import server_spec CONF_BASENAME = "mitmproxy" class HostMatcher: def __init__(self...
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + """ Script to generate the installer for cxxt...
""" WSGI config for kolibri project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os import time from django.core.wsgi import get_wsgi_application from django.db.utils impo...
from __future__ import absolute_import, unicode_literals import bleach from django.conf import settings as django_settings from django.core.files.storage import default_storage from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ #: Should urls be case sensitive? ...
import sys import string import types import cStringIO import math import copy import os import func import time import glob from var import var from p4exceptions import P4Error from node import Node, NodeBranch, NodePart, NodeBranchPart import nexustoken from distancematrix import DistanceMatrix import numpy import p...
#!/usr/bin/env python3.5 """Test init methods of encoders.""" import unittest import copy from typing import Dict, List, Any, Iterable from neuralmonkey.encoders.recurrent import SentenceEncoder from neuralmonkey.encoders.sentence_cnn_encoder import SentenceCNNEncoder from neuralmonkey.model.sequence import Embedded...
from PyQt5.uic import loadUiType ui, base = loadUiType('ui/CreateGroupWidget.ui') from PyQt5.QtCore import pyqtSignal, Qt from PyQt5.QtGui import QStandardItemModel from PyQt5.QtWidgets import QDialog from jgrpg.model import Groups, Characters from jgrpg.GetItemDialog import GetItemDialog from jgrpg.CreateCharacterWi...
''' Created on Jan 27, 2017 @author: montes ''' import bpy from inspect import * import mv import os import math from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import legal,inch,cm from reportlab.platypus import Image from reportlab.platypus import Paragraph,Table,TableStyle from reportlab.platypus ...
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/renderPDF.py # renderPDF - draws Drawings onto a canvas __version__=''' $Id$ ''' __doc__="""Render Drawing objects within others PDFs o...
# Note: explicit zeroes are blanks. All other values should be specified symbolically. # Currently these contain only the subset of cards that I needed class Range(object): def __init__(self, start, stop, count=None, delta=None): self.start = start self.stop = stop if count is not None: ...
import json import logging import os from google.appengine.ext.webapp import template from controllers.base_controller import LoggedInHandler from helpers.media_helper import MediaParser from helpers.media_manipulator import MediaManipulator from models.media import Media class AdminMediaDashboard(LoggedInHandler):...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'UllerRM / Namamai (ullerrm@users.noreply.github.com)' __copyright__ = "Copyright (C) 2014 UllerRM" from collections import defaultdict import io import json import numpy import os import pprint import statistics from evesde import EveSDE # Script settings ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Entry' db.create_table('moneyleft_entry', ( (...
from datetime import date from cornflake.exceptions import ValidationError import pytest from radar.api.serializers.salt_wasting import SaltWastingClinicalFeaturesSerializer from radar.models.patient_demographics import PatientDemographics from radar.models.patients import Patient from radar.models.users import User ...
from twisted.trial import unittest from diamondash import utils from diamondash.config import ConfigError from diamondash.widgets.histogram import HistogramWidgetConfig def mk_config_data(**overrides): return utils.add_dicts({ 'name': 'test-histogram', 'target': 'some.target', 'time_range...
""" Module to add streamparse-specific extensions to pystorm Bolt classes """ import pystorm from ..dsl.bolt import JavaBoltSpec, ShellBoltSpec from .component import Component class JavaBolt(Component): @classmethod def spec(cls, name=None, serialized_java=None, full_class_name=None, args_list...
""" Python model "SIR.py" Translated using PySD version 0.9.0 """ from __future__ import division import numpy as np from pysd import utils import xarray as xr from pysd.py_backend.functions import cache from pysd.py_backend import functions _subscript_dict = {} _namespace = { 'TIME': 'time', 'Time': 'time',...
import os import pandas import numpy as np from bokeh.palettes import Viridis4 as palette from bokeh.layouts import layout, column, row from bokeh.plotting import figure, output_file, show, ColumnDataSource from bokeh.models import HoverTool, Div, DataTable, TableColumn, NumberFormatter, LinearAxis, Select, CustomJS, ...
from __future__ import absolute_import, division, print_function import sys import os import time import requests import json import logging import numpy as np if sys.version_info < (3, 0): import subprocess32 as subprocess else: import subprocess cur_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.i...
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
# 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...
# The MIT License (MIT) # # Copyright © 2015 Glenn Fitzpatrick # # 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,...
from werkzeug.wrappers import Request, Response from werkzeug.serving import run_simple # this use package json-rpc (not jsonrpc!) from jsonrpc import JSONRPCResponseManager, dispatcher from drivers.boost_driver import FCCBoostDriver from drivers.buck_driver import FCCBuckDriver, FCCMPPTDriver from drivers.mi...
#! /usr/bin/env python ''' scatterplot.py Specialization of XYPlot for showing sets of discrete datapoints Copyright (c) 2012 Bill Gribble <grib@billgribble.com> ''' import math from .mark_style import MarkStyle from .xyplot import XYPlot from mfp import log class ScatterPlot (XYPlot): def __init__(self, eleme...
import logging import time import copy from nordicnode import Nordicnode from SECRET import SECRET_KEY from SERVCONFIG import SERVER_HOST,SERVER_PORT from flask_socketio import * app = flask.Flask(__name__,static_folder="../static",static_url_path="/static",template_folder="../templates") app.config['SECRET_KEY'] = ...
#!/usr/bin/python """ Tool to setup AWS CLI. """ import os import sys from subprocess import check_output def setup_s3(s3_access_key, s3_secret_key): """Create S3 configuration file.""" home = os.path.expanduser("~") aws_dir = os.path.join(home, '.aws') if not os.path.exists(aws_dir): os.makedi...
"""Conan recipe package for libsolace """ from conans import CMake, ConanFile from conans.errors import ConanInvalidConfiguration from conans.model.version import Version class LibsolaceConan(ConanFile): name = "libsolace" description = "High performance components for mission critical applications" licen...
import webob from wormhole import exception from wormhole import wsgi from wormhole.volumes import controller as volume from wormhole.common import log from wormhole.common import importutils from wormhole.common import utils from wormhole.i18n import _ from wormhole.docker_client import DockerHTTPClient from wormhol...
# -*- coding: utf-8 -*- # Copyright 2007-2020 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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, either version 3 of the License, or # (at...
from flask_login.mixins import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from sqlalchemy import Column, Integer, VARCHAR from antminermonitor.database import Base class User(UserMixin, Base): __tablename__ = 'user' id = Column(Integer, primary_key=True) username ...
import scoring import pygame import gui import Game import selectBar from selectBar import * import Level from Level import * import Tile import EntityTreasure import Keyboard from pygame.locals import * from Image import * class GuiHUD(object): def __init__(self,screen): self.ebg = image(screen,(5,5),...
""" Copyright (c) 2014 High-Performance Computing and GIS (HPCGIS) Laboratory. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Authors and contributors: Eric Shook (eshook@kent.edu); Zhengliang Feng (odayfans@gmail.com, zfeng2@kent.edu) """ from .La...
#!/usr/bin/env python """Create a "virtual" Python installation""" import base64 import sys import os import codecs import optparse import re import shutil import logging import zlib import errno import glob import distutils.sysconfig import struct import subprocess from distutils.util import strtobool __version__ = ...
# Generated by Django 3.0.2 on 2020-01-23 13:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import sys import socket try: from urllib.parse import quote, urlparse from socketserver import ThreadingMixIn from http.server import HTTPServer except ImportError: from urllib import quote from urlparse import urlparse from...
# # Copyright (c) 2013,2014, Oracle and/or its affiliates. All rights reserved. # # 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 # the Free Software Foundation; version 2 of the License. # # This program is distributed in the...
############################################################################# ## ## Copyright (C) 2011 Riverbank Computing Limited. ## Copyright (C) 2006 Thorsten Marek. ## All right reserved. ## ## This file is part of PyQt. ## ## You may use this file under the terms of the GPL v2 or the revised BSD ## license as fol...
# Copyright (C) IBM Corporation 2008 from gi.repository import Gtk from gi.repository import Gdk from gi.repository import GObject from gi.repository import GdkPixbuf import os import cPickle import logging from Editable_Textbox import Editable_Textbox from infoslicer.processing.Article_Data import * from ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2017 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
'''Module to provide a nice camera for 3d applications''' from .transformations import rotation_matrix, translation_matrix from .transformations import simple_clip_matrix, clip_matrix from .transformations import vector_product, angle_between_vectors, normalized from ..utils import fequal import numpy as np import nu...
#!/usr/bin/env python3 import unittest import requests import json API_URL = 'http://127.0.0.1:8080/api/v1' def print_json(data): print(json.dumps(data, sort_keys=True, indent=4)) class TestAccount(unittest.TestCase): def test_accounts_get(self): print("\nGET /accounts/") res = requests.ge...
import socket from threading import Lock from __about__ import __version__, __title__, __description__ __all__ = ['__version__', '__title__', '__description__', 'SubdomainDispatcher'] class SubdomainDispatcher(object): """ A WSGI application that gets or creates other WSGI applications based on t...
import unittest import deco class _TestException(Exception): pass @deco.persistent_locals def _globalfunc(x): z = 2*x return z _a = 2 @deco.persistent_locals def _globaldependent(x): z = x + _a return z @deco.persistent_locals def _toberemoved(x): z = 2*x return z class TestPersistLocal...
#!/usr/bin/python # # Copyright 2012 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...
# Django imports from django.test import TestCase from django.test.client import RequestFactory from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied # Local Django imports from exam.views import ListExams from user.models import User, Patient, HealthProfessional cl...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-07 08:16 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
# general plot / graphics utility using matplotlib from genaf.views.tools import * from matplotlib import pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import pandas import io, base64 @roles( PUBLIC ) def index(request): # check...
import time import random from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from clickList import csslist,clicks,csslist2,clicks2 #倒入模块结束 #建立类 class Npels(): def __init__(self,username,pwd,timecut = 60,TIME = 10): npelsurl = 'http://192.168.100.117/NP...
# 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 ...
# LICENSE # 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 # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be us...
# -*- coding: utf-8 -*- """ Created on Sun Feb 21 23:43:37 2016 @author: kiko """ from __future__ import division, absolute_import from .settings import RICH_DISPLAY import numpy as np if RICH_DISPLAY: from IPython.display import display def axes_set_better_defaults(ax, axes_color ...
# -*- 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 ...
""" homeassistant.components.wink ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Connects to a Wink hub and loads relevant components to control its devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/wink/ """ import logging from homeassistant import bootstrap fro...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
#!/usr/bin/env python2.7 """ histogram: plot a histogram of a file of numbers. Numbers can be floats, one per line. Lines with two numbers are interpreted as pre-counted, with the number of repeats of the first being given by the second. Multiple instances of the same value in a category will be merged by adding weigh...
# TagMusicOrganizer.py # # Parse id3 tags for mp3 # Put into target directory with the format # # Artist/ # Album/ # NN. Artist - Title import sys import os import eyed3 import glob import argparse import re import configparser config = configparser.ConfigParser() config.readfp(open(os.path.dirname(os.path.real...
# -*- coding: utf-8 -*- """ Python library for Paessler's PRTG (http://www.paessler.com/) """ import atexit import logging import os import shelve import tempfile from prtg.exceptions import UnknownObjectType from prtg.models import CONTENT_TYPE_ALL, PrtgObject class Cache(object): """ Cache of prtg.models....
#!/usr/bin/python3 # -*- coding: utf-8 -*- import sys import argparse from Qt import QtGui, QtCore, loadUi from QtCore import Slot from HWWizard import HWWizard class Host: def __init__(self, name, autodetect): self.name = name self.autodetect = autodetect class Name: def __init__(self, nam...
# Module for XMPP JID processing as defined in on RFC 3920 # (http://www.ietf.org/rfc/rfc3920.txt) And RFC 3454 # (http://www.ietf.org/rfc/rfc3454.txt). # # This module was originally written using both the above RFCs and the # xmppstringprep module of the pyxmpp package # (http://pyxmpp.jajcus.net/) as well as the # t...
""" CBMPy: Constraint Based Modelling in Python (http://pysces.sourceforge.net/cbm) ============ Copyright (C) 2010-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
# Copyright 2016 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 applica...
from __future__ import absolute_import import six import logging import enum from django.http import Http404 from sentry.models import ( Integration, Organization, IdentityProvider, ) from sentry.shared_integrations.exceptions import ApiError from sentry.utils.compat import filter from .client import Ms...
def TotalTranslation(input_seq): Total_Seq=0; input_seq_len=len(input_seq); Seq_Itr=0; Seq_Stack_Init=[]; Seq_Stack_Len=[]; for itr in range(0,input_seq_len): Seq_Stack_Init.append(0); Seq_Stack_Len.append(1); input_seq_len-=1; Seq_Itr+=1; while(1): while(Seq_Itr>0): Next_Start_Pos=Seq_Stack_Init[Seq...