src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- ''' Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku ''' from __future__ import absolute_import, unicode_literals import os from boto.s3.connection import OrdinaryCallingFormat from ...
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
from distutils.version import StrictVersion from os import getenv import django DJANGO_VERSION = StrictVersion(django.get_version()) assert DJANGO_VERSION >= StrictVersion("2.2") DEBUG = True try: from django.db.models import JSONField # noqa: F401 DATABASES = { "default": {"ENGINE": "django.db.ba...
"""Main module of Machine Shift Application.""" import time as _time from datetime import datetime as _datetime from ..callbacks import Callback as _Callback from .csdev import Const as _Const, ETypes as _ETypes, \ get_machshift_propty_database as _get_database from .utils import MacScheduleData as _MacSched cl...
import os import database from gemini.config import read_gemini_config class gene_detailed: def __init__(self, field): field = [None if f == 'None' else f for f in field] self.fields = field[:] self.chrom = field[0] self.gene = field[1] self.is_hgnc = field[2] self....
from typing import Dict from Src.BioAnalyzer.DataAccess.Entities.GenePrioritization.DifferentialValueBase import DifferentialValueBase from Src.Core.Entity.EntityBase import EntityBase class DifferentialMicroRnaExpressionLevelValue(DifferentialValueBase, EntityBase): """description of class""" def __init__(s...
# -*- coding: utf-8 -*- """ /*************************************************************************** interactive_map_tracking A QGIS plugin A QGIS 2.6 plugin to track camera of user , AND/OR to autocommit/refresh edit on PostGIS vector layer ---------...
### # Copyright (c) 2011, Valentin Lorentz # 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...
# # $Id$ # # Description # Runs the same tests, but does it by using the Python language bindings. # The Python bindings need to be be built and installed to run this. # # Copyright 2010 Dan Rinehimer # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.safezone.GZPlayground from direct.fsm import State from toontown.safezone import GolfKart from toontown.toonbase import ToontownGlobals, TTLocalizer from toontown.toontowngui import TTDialog import Playground import sys class GZPlayground(Play...
import re from In.core.object_meta import ObjectMetaBase class ValuatorContainer(dict): def __missing__(self, key): vcls = IN.register.get_class(key, 'Valuator') obj = vcls() self[key] = obj return obj class ValuatorEngine: '''Valuator class that valuate values based on validation rules. ...
# -*- coding: utf-8 -*- import wx import wx.lib.newevent import wx.adv from outwiker.gui.controls.hyperlink import (HyperLinkCtrl, EVT_HYPERLINK_LEFT, EVT_HYPERLINK_RIGHT, EVT_HYPERLI...
#! /usr/bin/python ''' require install of ImcSdk (0.7.1)the script is to login CIMC server, and get the details of common & enabled hardware components, & health brief [ CIMC hostname, Firmware, CPU, MEM, Server Model, Serial number, NIC card, storage controller and physical disks or onbroad SATA disks] syntax: python ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for `django-data-approvals` urls. """ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.test import TestCase from approvals.models import Approval cl...
"""Lattice module. In this module the lattice of the corresponding accelerator is defined. """ import math as _math import numpy as _np from pyaccel import lattice as _pyacc_lat, elements as _pyacc_ele, \ accelerator as _pyacc_acc, optics as _pyacc_opt energy = 0.15e9 # [eV] default_optics_mode = 'M1' class ...
from vectordatasource.colour import parse_colour from vectordatasource.transform import Palette from optparse import OptionParser import sys import csv import yaml def to_hex(colour): return "#%02x%02x%02x" % tuple(colour) yaml_config_file = None output_file = sys.stdout output_colour_key = 'Colour name' input_...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import io from werkzeug.utils import redirect from odoo import http from odoo.http import request from odoo.addons.sale.controllers.portal import CustomerPortal from odoo.addons.website_sale.controllers.ma...
# Copyright (C) 2005 Christian Limpach <Christian.Limpach@cl.cam.ac.uk> # Copyright (C) 2005 XenSource Ltd # This file is subject to the terms and conditions of the GNU General # Public License. See the file "COPYING" in the main directory of # this archive for more details. import os import os.path import re import...
import os import json import errno from collections import defaultdict try: from . import shared as G from . import utils except (ImportError, ValueError): import shared as G import utils def rename_floobits_dir(): # TODO: one day this can be removed (once all our users have updated) old_cola...
from train import * from models.net_builder import * from basic_utils.env_wrapper import Vec_env_wrapper from models.agents import * from basic_utils.options import * from basic_utils.exploration_noise import * def train_CartPole_DQN(load_model=False, render=False, save_every=None, double=False, prioritized=False): ...
#!/usr/bin/python from abc import abstractmethod from random import randrange, sample from bisect import insort from math import ceil, floor import sys, os, argparse, traceback """ A synthesized event trace generator @author: Wei Dou @date created: 27 July 2014 @date modified: 20 April 2015 @version: 1.3 @input: an Te...
# -*- coding: utf-8 -*- """The status view.""" from __future__ import unicode_literals import ctypes import sys import time try: import win32api import win32console except ImportError: win32console = None from dfvfs.lib import definitions as dfvfs_definitions import plaso from plaso.cli import tools from pl...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import os from setuptools import setup, find_packages README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='onecloud', version=__import__('onecloud').__ve...
""" FieldList Sampling Example: c4d.FieldList c4d.modules.mograph.FieldLayer c4d.modules.mograph.FieldInput c4d.modules.mograph.FieldOutput Samples multiple fields with c4d.FieldList custom data and stores the result into a vertex color tag. """ import c4d from c4d.modules import mograph def main(): # Checks i...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
import time import bottle import bcrypt import sqlalchemy from sqlalchemy.sql import text as sql_statement import cipherwallet.api_router ROOT = '/path/to/pycipherwallet/example' @bottle.route('/<folder:re:css>/<filename:re:.*\.css>') @bottle.route('/<folder:re:js>/<filename:re:.*\.js>') @bottle.route('/<folder:re:i...
## Copyright 2009-2011 Luc Saffre ## This file is part of the Lino project. ## Lino 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....
# -*- coding: utf-8 -*- import sys import unittest from datetime import date from dateutil.relativedelta import relativedelta from decimal import Decimal import trytond.tests.test_tryton from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT from trytond.transaction import Transaction from trytond.pool imp...
import tkinter as tk import pytest from tk_tools import SmartOptionMenu from tests.test_basic import root @pytest.fixture def som(root): som_widget = SmartOptionMenu(root, ['1', '2', '3']) som_widget.grid() yield som_widget def test_creation(root): SmartOptionMenu(root, ['1', '2', '3']) def te...
from functions import search, logger DESC = "Delete x messages" USAGE="purge [*amount*] [*user* `optional`]" async def init(bot): chat=bot.message.channel try: if len(bot.args) == 0: await bot.sendMessage( "Didn't receive any arguments! Usage: {}".format(USAGE)) return False ...
#!/usr/bin/env python # Copyright 2015-2017 ARM Limited # # 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...
import lxml.etree as et import re import itertools import contextlib from lxmlx.event import ENTER, EXIT, TEXT, COMMENT, PI from lxmlx.validate import validate_xml_text, validate_xml_name, \ validate_pi_text, validate_comment_text, xml_escape_text, \ xml_escape_attr _QUAL_NAME = re.compile(r'{(.*?)}(.*)$') cl...
from __future__ import print_function import re # id low high # {botno : ((bot|output, id), (bot|output, id))} bots = {} # (value, botno) vals = [] # {output_id : [values]} outputs = {} # {botno : [values]} states = {} def parse(line): global bots, vals, outputs if line.startswith(...
# 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...
# Copyright (C) 2014 ABRT Team # Copyright (C) 2014 Red Hat, Inc. # # This file is part of faf. # # faf 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) ...
import unittest from avocado.core.restclient import response class ResultResponseTest(unittest.TestCase): GOOD_DATA = ('{"count": 1, "next": null, "previous": null, ' '"results": [ { "name": "unknown" } ] }') BAD_DATA_JSON = '{"count": 1' BAD_DATA_COUNT = ('{"counter": 1, "next": null...
ALGORITHMS: 1. Write code to sum 2 integer but u cant use a+b method, you have to use either ++ or --. How you will handle negative numbers [com.ctgi.google.problems.SumIntegersUsingSpecialOperator] 2. There are several words in a file. Get the occurrence of every word and sort it based on the occurrence, if more than...
############################################################################## # # Copyright (c) 2006 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
#!/usr/bin/env python """Simulation bootstrapper""" from formation_flight.formation import handlers as formation_handlers from formation_flight.aircraft import handlers as aircraft_handlers from formation_flight.aircraft import generators from formation_flight.hub import builders from formation_flight.hub import alloc...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundation ## and appearing in the file LICENSE included in the packaging of ## this file. ## ## This file is provided AS IS with NO WARRANTY OF ANY...
import argparse import os import sys from time import sleep import kijiji_api if sys.version_info < (3, 0): raise Exception("This program requires Python 3.0 or greater") def main(): ##Start here #Takes: config(user/pass) #One of: #post adPostingFile #show #delete adId #show #repost adPo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """汉语拼音转换工具.""" from __future__ import unicode_literals from copy import deepcopy from itertools import chain import os import re import sys from . import phonetic_symbol, pinyin_dict __title__ = 'pypinyin' __version__ = '0.9.0' __author__ = 'mozillazg, 闲耘' __license__...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cobra ~~~~~ Implements cobra main :author: BlBana <635373043@qq.com> :homepage: https://github.com/wufeifei/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import xml.et...
# # Copyright (c) ,2010 Matteo Boscolo # # This file is part of PythonCAD. # # PythonCAD 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) any later version...
import unittest import hail as hl from ..helpers import * setUpModule = startTestHailContext tearDownModule = stopTestHailContext class Tests(unittest.TestCase): @staticmethod def get_groupable_matrix(): rt = hl.utils.range_matrix_table(n_rows=100, n_cols=20) rt = rt.annotate_globals(foo="f...
import numpy as np import matplotlib.colors as mcolors from skimage.color import rgb2lab as rgb2lab_skimage from skimage.color import lab2rgb as lab2rgb_skimage class RGBRangeError(Exception): pass def rgb2lab(rgb): rgb = np.asarray(rgb).reshape(1, 1, 3) lab = rgb2lab_skimage(rgb).reshape(3) return ...
# This file is part of OtfBot. # # OtfBot 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) any later version. # # OtfBot is distributed in the hope that it...
#!/usr/bin/env python """ Converts a vector layer to a raster """ __version__ = '1.0.0' __date__ = '2011-03-24' __author__ = 'Christian Kaiser <chri.kais@gmail.com>' import commands import math import osgeo.ogr as ogr import osgeo.gdal as gdal import osgeo.osr as osr from optparse import OptionParser import sys USA...
#! /usr/bin/env python import os, sys from getopt import getopt,GetoptError from threading import Thread from commands import getstatusoutput from lfc import * def usage(): print 'Name:' print ' ganga-stagein.py' print print 'Arguments:' print ' logical names' print print 'Option...
from django.conf.urls import url from django.http import HttpResponse from . import views from .feeds import LatestEntriesFeed app_name = 'blog' urlpatterns = [ url(r'^$', views.post_list, name='post_list'), url(r'^post/(?P<pk>[0-9]+)/$', views.post_detail, name='post_detail'), url(r'^post/new/$', views.po...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.conf import settings from django.db.models import Q from django.test.signals import setting_changed from django.dispatch import receiver from treemap.lib import get_functio...
from .. import names, prims from ..ndtypes import ScalarT, Type, type_conv from .. syntax import FormalArgs, Var, UntypedFn, Return, PrimCall, Expr, Cast _untyped_fn_cache = {} def simple_untyped_fn(name, expr, n_inputs = 1, fixed_args =...
""" Django settings for imagersite project. Generated by 'django-admin startproject' using Django 1.9.2. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
# Queriet user interface file # Please see the license file in the main directory for licensing information import logging import os import wx import utils import info import defaultPanels from wx.adv import TaskBarIcon from options import Options class MainUI(wx.Frame): """Class that holds the mai...
#! /usr/bin/python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Name: Simulation.py # Purpose: # Author: Fabien Marteau <fabien.marteau@armadeus.com> # Created: 16/07/2008 #----------------------------------------------------------------------------- # ...
from src.videosource.VideoSource import VideoSource, SourceType import Playlist import service from Thumb import Thumb import settings as s from src.paths.root import CHANNEL_CACHE_DIR from src.file import File from datetime import datetime from Pages import Pages, ItemType, TimeUnit from src.tools import DataDictionar...
# Copyright 2021 The Cirq Developers # # 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 ...
# -*- coding: utf-8 -*- # scrapy_web # Copyright (C) 2016-2017 Matteo.Redaelli@gmail.com> # # 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 # ...
# Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os from ansible import constants as C from ansible.plugins.callback.default import CallbackModule as CM_default from ansible.release import __version__ as ansible_version from dciauth.version...
from south.db import db from django.db import models from kanboard.models import * class Migration: def forwards(self, orm): # Adding field 'Card.created_by' db.add_column('kanboard_card', 'created_by', orm['kanboard.card:created_by']) def backwards(self, orm):...
from p2ner.core.namespace import Namespace, initNS # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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/l...
# -*- coding: utf-8 -*- import requests as req import pandas as pd #import json import os import sys from . import sb_check_quality as cq from common import utils from common import globals as glob # dictionary to hold country to continent mapping, will be filled in # get_country_to_continent_mapping function invokve...
#!/usr/bin/env python # # Copyright 2007 Doug Hellmann. # # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software and # its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # copies and tha...
# !/usr/bin/env python # -*- coding: utf-8 -*- """ @author: mango @contact: w4n9@sina.com @create: 16/7/4 hail hydra! """ __author__ = "mango" __version__ = "0.1" import etcd # noinspection PyBroadException,PyPep8Naming,PyShadowingBuiltins class ETCDClient(object): def __init__(self, host, port, allow_reconne...
""" xModule implementation of a learning sequence """ # pylint: disable=abstract-method import collections import json import logging from datetime import datetime from lxml import etree from pkg_resources import resource_string from pytz import UTC from six import text_type from web_fragments.fragment import Fragmen...
from __future__ import absolute_import import copy import logging import socket import time from kafka.errors import KafkaConfigurationError, UnsupportedVersionError from kafka.vendor import six from kafka.client_async import KafkaClient, selectors from kafka.consumer.fetcher import Fetcher from kafka.consumer.subs...
import datetime import string import urllib2 import uuid import requests from lxml import etree class ADFSClient(object): HEADER_SOAP = {"Content-Type": "application/soap+xml; charset=utf-8"} HEADER_X_FORM = {"Content-Type": "application/x-www-form-urlencoded"} ASSERTION_NAMESPACES = { 's': 'http...
import abc import weakref import logging from cwbot.sys.eventSubsystem import EventSubsystem from cwbot.sys.heartbeatSubsystem import HeartbeatSubsystem from cwbot.util.tryRequest import tryRequest class ProcessorException(Exception): pass class ModuleMetaClass(abc.ABCMeta): def __init__(cls, n...
try: import __builtin__ as builtins except ImportError: import builtins import mock import librarian.routes.auth as mod # Test login route handler @mock.patch.object(mod.Login, 'perform_redirect') @mock.patch.object(mod.Login, 'request') def test_login_form_valid(request, perform_redirect): route = mo...
#!/usr/bin/env python # coding=utf-8 """Author: Tomasz Lichon Copyright (C) 2015 ACK CYFRONET AGH This software is released under the MIT license cited in 'LICENSE.txt' Build packages in dockerized environment, as user 'package' Run the script with -h flag to learn about script's running options. """ from os.path i...
#!/usr/bin/env python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme.common.provider import cleanup_vm from cfme.services.catalogs.catalog_item import CatalogItem from cfme.automate.service_dialogs import ServiceDialog from cfme.services.catalogs.catalog import Catalog from cfme.services.catalogs.service_catalogs import...
""" Tests for the upgrade of L{PrivateApplication} schema from 3 to 4. """ from axiom.userbase import LoginSystem from axiom.test.historic.stubloader import StubbedTest from xmantissa.ixmantissa import ITemplateNameResolver, IWebViewer from xmantissa.website import WebSite from xmantissa.webapp import PrivateApplica...
""" This is the main execution program for the reporting library. """ from __future__ import absolute_import import argparse import glob import logging import os import simplejson as json from gnucash_reports.wrapper import initialize from gnucash_reports.reports import run_report from gnucash_reports.configuration ...
# -*- coding: utf8 -*- # This file is part of PYBOSSA. # # Copyright (C) 2017 Scifabric LTD. # # PYBOSSA 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 License, or # (at your op...
#!/usr/bin/python # -*- coding: utf-8 -*- # DEV: Jordi Masip from utiles import * import tranf, imgio def mirror_effect(img): """ Retorna la imatge girada 180º sobre l'eix Y >>> mirror_effect([[255,255,255, 0],[0,255,255, 255]]) [[0, 255, 255, 255], [255, 255, 255, 0]] """ return [row[::-1] for row in img] de...
__author__ = 'danbordeanu' import unittest from config_parser import check_if_config_exists import config_parser as parser import random_generator as random_generator_function class Md5Test(unittest.TestCase): def test_is_there_config(self): """ Test if there is config file :return: ...
#!/usr/bin/env python # version: 0.1.2 import os # setuptools >= 0.7 supports 'python setup.py develop' from ez_setup import use_setuptools use_setuptools() from setuptools import setup, Extension def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() # The maxflow graphcut wrapper ...
# 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...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import csv from datetime import date import time from shutil import copyfile def encrypt(): global secretCode message = input("t/>> ") characters = "JKLZXC=VBNMabcUIOPASDFGH&*123WERT-Ytuvwxyz.!?()567890Qefghijklmnopqrsd4!£$%^ " encryption = "jihg12345=6789A$%SDFGHJKLPOI^&*()UYzyxwvut-srqp!...
#!/usr/bin/env python from sys import exit, stdin, stderr, argv, stdout from inspect import stack from config import * import os import csv CONT=0 FINAL=1 default_ttl=60 loglevel=3 class istr(str): def __eq__(self, text): return str.__eq__(self.lower(), text.lower()) class qname(istr): def __new__(c...
import logging import os import sys from woof.partitioned_producer import CyclicPartitionedProducer, PartitionedProducer, dumb_hash # import pdb; pdb.set_trace() import time if len(sys.argv) <= 3: topic = "test.3part" key = "JY" msg = "Hello cruel world" else: topic = sys.argv[1] key = sys.argv[2]...
# -*- coding: utf-8 -*- """ ******************************************************************************* WEOS - Wrapper for embedded operating systems Copyright (c) 2013, Manuel Freiberger All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted ...
# coding=utf-8 """Thin python wrapper over SmartsViewer.""" import os.path as op import subprocess from joblib import Parallel, delayed, cpu_count # for joblib pickling... def _depict(svr, smarts, dest_file): return svr.depict(smarts, dest_file) def as_pil(paths): from PIL import Image return map(Image....
# (c) 2014 James Cammarata, <jcammarata@ansible.com> # # This file is part of Ansible # # Ansible 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 late...
# Copyright 2015-2016 Open Source Robotics Foundation, 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 applicabl...
#!/usr/bin/env python # ! ## File: dynamics.py # ! ## See README.md for more information and use # !----------------------------------------------------------------------------- # ! SIS epidemic model algorithm based on the article # ! Computer Physics Communications 219C (2017) pp. 303-312 # ! "Opt...
from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ##from django.views.generic.simple import direct_to_template from django.shortcuts import render from django.db....
import pytest import numpy as np import pandas as pd import pypbo as pbo import pypbo.perf as perf # TODO test scripts # e.g.: pytest -s test_metrics.py # -s swtich to allow printing to stdio def test_log_returns(): ''' Test log return logic. Asserts that cumulative value is the same as generated data....
# Create a mask from annotation. Uses the same ROI as download region. import sys import os import pdb import girder_client import json import urllib2 import numpy as np import scipy import cv2 import math def ensure_path(dir_path): parent, name = os.path.split(dir_path) if name == '': return e...
import arrow from flask import current_app, jsonify, request, Response, g from itsdangerous import URLSafeSerializer from app.mod_api import mod_api, schemes from app.mod_api.decorators import valid_facility, valid_token from app.mod_api.errors import InvalidUsage from app.mod_api.ical import build_ical @mod_api.ro...
# # Copyright (c) 2006, 2007 Canonical # # Written by Gustavo Niemeyer <gustavo@niemeyer.net> # # This file is part of Storm Object Relational Mapper. # # Storm 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 Found...
import os import yaml import re import shlex from .constants import * from .utils import * class ConfigError(Exception): pass class ConfigNotFoundError(ConfigError): pass # http://stackoverflow.com/a/9577670 class Loader(yaml.SafeLoader): def __init__(self, stream): self._root = os.path.split(st...
# -*- coding: utf-8 -*- # Copyright (c) 2014, Mayo Clinic # 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 ...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: types.py from types import * KISU_MODULE_FLAG_BOOT_START = 1 KISU_MODULE_FLAG_SYSTEM_START = 2 KISU_MODULE_FLAG_AUTO_START = 4 KISU_MODULE_FLAG_KERNE...
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
""" Usage: calicoctl container <CONTAINER> ip (add|remove) <IP> [--interface=<INTERFACE>] calicoctl container <CONTAINER> endpoint-id show calicoctl container add <CONTAINER> <IP> [--interface=<INTERFACE>] calicoctl container remove <CONTAINER> Description: Add or remove containers to calico networking and m...