src
stringlengths
721
1.04M
# USAGE # python motion_detector.py # python motion_detector.py --video videos/example_01.mp4 # import the necessary packages import argparse import datetime import imutils import time import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-v", "--video", he...
# Copyright 2014 eBay Software 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 -*- """Family module for Wikisource.""" # # (C) Pywikibot team, 2004-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals from pywikibot import family __version__ = '$Id$' # The Wikimedia family that is known as Wikisource class Fami...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import os from figure3 import select, ket, exp from matrix import ops from measures import local_entropies_from_rhos, local_exp_vals_from_rhos from mpl_toolkits.axes_grid1 import ImageGrid from matplotlib import rc rc("text", usetex=True) fon...
# 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: pycodegen.py import imp import os import marshal import struct import sys from cStringIO import StringIO from compiler import ast, parse, walk, synta...
from urllib import urlencode from django.contrib.auth.models import Group from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.translation import ugettext as _ from django.views.generic import ListView, FormView from django import forms from .. import models from...
# -*- coding: utf-8 -*- # Copyright 2006 Joe Wreschnig # # 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 2 of the License, or # (at your option) any later version. from quodlibet...
# -*- coding: utf-8 -*- ############################################################################################## # This file is deprecated because Python 2.x is deprecated # # A Python 3.x version of this file can be found at: # # ...
from .base import ApiBase import requests class Labels(ApiBase): __module__ = 'trello' def __init__(self, apikey, token=None): self._apikey = apikey self._token = token def get(self, idLabel, fields=None): resp = requests.get(f"https://trello.com/1/labels/{idLabel}", pa...
# Copyright 2011 OpenStack LLC. # Copyright 2012 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/license...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# Copyright 2012 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia # This file is part of ngs_crumbs. # ngs_crumbs 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, ...
from argparse import ArgumentParser from tracksim import system from tracksim import reader from tracksim import paths from tracksim import cli DESCRIPTION = """ Removes all existing group and trial results from cached results folders """ def list_groups(): system.log('===== GROUPS =====', whitespace_bo...
import os, sys import numpy as np from data.util import * import tensorflow as tf import tensorflow_probability as tfp class TwoGaussians(DataLoader): def __init__(self, batch_size, n_pos, n_neg, mu_pos, cov_pos, mu_neg, cov_neg, rot=0.0, train_ratio=0.8, val_ratio=0.1, ...
"""`main` is the top level module for your Flask application.""" __author__ = 'rohitsm' __page__ = 'https://github.com/rohitsm/spsoldboys' # Python import urllib2 import json import sys import cgi # Flask from flask import Flask from flask import request, redirect, url_for from flask import render_template # App En...
import hashlib import random from django.core.mail import send_mail from django.template.loader import render_to_string from account.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist class AccountDefaultHookSet(object): def send_invitation_em...
""" OTWindow allows running wxPython widgets Widgets using wxPython must all be created and run in the same thread. This class creates a wxPython App in a separate thread and allows starting new widgets in this same thread. New widgets can be created using the functions newMsgWin(tw) create message windiow and e...
import socket import time import datetime #sock = socket.create_connection(("10.0.19.4", 30001)) sock = socket.create_connection(("10.0.19.4", 30002)) data = 13000* "0" def benchmark_send(conn, sleep_time = 0.001,duration_in_sec=15): start = datetime.datetime.now() while (datetime.datetime.now()-start).t...
# -*- coding: utf-8 -*- ############################################################################## # # Project Reports # Copyright (C) 2016 January # 1200 Web Development # http://1200wd.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU A...
""" Copyright (c) 2014 Walker Crouse 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, modify, merge, publish, distribute, ...
# wildcard.py --- # # Filename: wildcard.py # Description: # Author: Subhasis Ray # Maintainer: # Created: Tue Jun 4 11:20:57 2013 (+0530) # Version: # Last-Updated: Tue Jun 4 12:27:42 2013 (+0530) # By: subha # Update #: 143 # URL: # Keywords: # Compatibility: # # # Commentary: # # # # # Change log: ...
# # Copyright 2015 by Justin MacCallum, Alberto Perez, Ken Dill # All rights reserved # from simtk.openmm.app import AmberPrmtopFile, OBC2, GBn, GBn2, Simulation from simtk.openmm.app import forcefield as ff from simtk.openmm import LangevinIntegrator, Platform, CustomExternalForce from simtk.unit import kelvin, picos...
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
# 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 2012-2015 The Meson development team # 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...
# # Copyright 2011-2016 Ghent University # # This file is part of vsc-mympirun, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Flemish Research Foundat...
# -*- 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 'Collection.notes' db.add_column('portal_collection', 'notes', self.gf(...
class Directory(object): def __init__(self, router): self.router = router def start(self): db = self.router.database db.execute( 'CREATE TABLE IF NOT EXISTS users (' + 'id INTEGER PRIMARY KEY, name TEXT, password TEXT)') db.execute( 'INSE...
############################################################################## # # Copyright (c) 2001, 2002 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. # T...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: zengchunyun """ from twisted.internet import reactor, protocol # a client protocol class EchoClient(protocol.Protocol): """Once connected, send a message, then print the result.""" def connectionMade(self): self.transport.write(bytes("hello...
# -*- coding: utf-8 -*- # Copyright (C) 2012 Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import models, api class WizardAccountProductFiscalClassification(models.TransientModel): _inherit = 'wizard.account.product.fiscal.classification' @api.multi d...
# Copyright 2019 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 agreed to in writing,...
import collections import datetime import io import re import sys from git import Repo class MDChangeSet: """Represents a markdown change-set for a single version.""" CATEGORIES = [ ('### Added\n', ['add', 'added', 'feature']), ('### Changed\n', ['change', 'changed', 'update']), ('##...
# Copyright (C) 2015 KillerInstinct # # 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 i...
#!/usr/bin/env python import sys import os import subprocess class Converter: base_ui_path = os.path.relpath('Resources/ui_files') base_out_path = os.path.relpath('DownloaderForReddit/guiresources') def __init__(self, ui_file): self.ui_file = ui_file self.callable_methods = [ ...
''' Reproject onto the ACA CO(2-1) mosaic. Since we have different versions of the full mosaic, we're only going to make two version of the reprojected HI maps: 1) One to the ACA map without the highly asymmetric beam mosaics. The HI map will not be convolved to a matching beam since they are already quite similar. ...
# -*- 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...
# Copyright 2020 Tensorforce Team. 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 la...
# -*- 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...
from context import TESTS_DATA_DIR, get_testdata, woogenerator import unittest # import argparse import pytest import logging from woogenerator.namespace.core import ( MatchNamespace, ParserNamespace, SettingsNamespaceProto, UpdateNamespace ) from woogenerator.conf.parser import ArgumentParserCommon, ArgumentParse...
""" javaobj module exposes an API familiar to users of the standard library marshal, pickle and json modules. See: http://download.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html :authors: Volodymyr Buell, Thomas Calmant :license: Apache License 2.0 :version: 0.4.3 :status: Alpha .. Copyright...
#!/usr/bin/env python # compare_image_dirs.py # Copyright (c) 2013-2016 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111 # Standard library imports from __future__ import print_function import argparse import glob import os import sys # PyPI imports import numpy import scipy import scipy.misc # ...
""" Django settings for event_recorder project. Generated by 'django-admin startproject' using Django 1.9.4. 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/ """ impor...
# # Copyright Michael Groys, 2014 # from ncsa_log import NCSALogFormat, NCSALogRecord, FieldNotDefinedException from m.utilities import mergeDictionaries import re class ApacheLogFormat(NCSALogFormat): idpattern = r"\>?[a-zA-Z]|\{[-\w]+\}[ieoC]" # continue field numbering after NCSA basic fields START_...
"""The tests for the Mqtt vacuum platform.""" import copy import json import pytest from homeassistant.components import mqtt, vacuum from homeassistant.components.mqtt import ( CONF_COMMAND_TOPIC, vacuum as mqttvacuum) from homeassistant.components.mqtt.discovery import async_start from homeassistant.components.v...
from django.core.urlresolvers import reverse from django.test import TestCase from json import loads from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from threadedcomments.models import FreeThreadedComment, ThreadedComment from threadedcomments.models import TestM...
import simtk.unit as units from intermol.decorators import accepts_compatible_units from intermol.forces.abstract_bond_type import AbstractBondType class NonlinearBondType(AbstractBondType): __slots__ = ['epsilon', 'r0', 'lamda', 'order', 'c'] @accepts_compatible_units(None, None, ...
from pandac.PandaModules import * from direct.distributed.ClockDelta import * from direct.task.Task import Task from direct.interval.IntervalGlobal import * from TrolleyConstants import * from direct.gui.DirectGui import * from toontown.toonbase import TTLocalizer from direct.distributed import DistributedNode from dir...
# Copyright 2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Integration-test POFile statistics verification script.""" __metaclass__ = type from lp.testing import TestCaseWithFactory from lp.testing.dbuser import dbuser from lp.testing...
import discord from discord.ext import commands import secrets class Stockstream: def __init__(self, bot): self.bot = bot @commands.command() async def copypasta(self, ctx, ticker: str): """Generates a copypasta for StockStream using the given ticker.""" copypasta_list = ["Kreygas...
# https://docs.python.org/2.7/ import os import sys import urllib import urlparse # http://mirrors.kodi.tv/docs/python-docs/ import xbmcaddon import xbmcgui import xbmcplugin # http://docs.python-requests.org/en/latest/ import requests from threading import Thread import time class PlayerWindow(xbmcgui.WindowXML): ...
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Linux platform implementation.""" from __future__ import division import base64 import errno import functools import os import re import socket import...
from kpm.console import KubernetesExec from kpm.commands.command_base import CommandBase class ExecCmd(CommandBase): name = 'exec' help_message = "exec a command in pod from the RC or RS name.\ It executes the command on the first matching pod'" def __init__(self, options): self.output = opti...
#!/usr/bin/python # -*- coding: utf-8 -*- '''Ripyl protocol decode library Statistical operations test suite ''' # Copyright © 2013 Kevin Thibedeau # This file is part of Ripyl. # Ripyl is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Licen...
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import webapp2 from google.appengine.api import app_identity from google.appe...
from operator import itemgetter import binascii import heapq class DHTNode: def __init__(self, node_id, host=None, port=None, ext_host=None, ext_port=None): self.node_id = node_id self.host = host self.port = port self.ext_host = ext_host self.ext_port = ex...
# -*- coding: utf8 -*- """ Класс окна интерфейса дискового кластера. """ from Tkinter import Frame, Button from pak_pc.pak_gui.pak_widgets.mod_frm_disk_select import ClsFrmDiskSelect from pak_pc.pak_gui.pak_widgets.mod_top_win import ClsTopWin class ClsWinIDC(ClsTopWin): """ Окно интерфейса дискового класте...
#!/usr/bin/env python """ MultiQC submodule to parse output from deepTools plotPCA """ import logging from multiqc.plots import scatter # Initialise the logger log = logging.getLogger(__name__) class plotPCAMixin: def parse_plotPCA(self): """Find plotPCA output""" self.deeptools_plotPCAData = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Jonathan Schultz # # 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 lat...
import logging import re import time from deltas import segment_matcher from ....datasources import Datasource from ....datasources.meta import filters from .tokenized import TokenIsInTypes, is_uppercase_word logger = logging.getLogger(__name__) class Diff: def __init__(self, *args, **kwargs): super()...
# Roundware Server is released under the GNU Affero General Public License v3. # See COPYRIGHT.txt, AUTHORS.txt, and LICENSE.txt in the project root directory. # TODO: Figure out how to get the main pipeline to send EOS # when all audiotracks are finished (only happens # when repeat is off) # TODO: Reimplement pan...
#!/usr/bin/env python3 import sys import os from sigil_bs4 import BeautifulSoup from sigil_bs4.builder._lxml import LXMLTreeBuilderForXML import re from urllib.parse import unquote from urllib.parse import urlsplit from lxml import etree from io import BytesIO from opf_newparser import Opf_Parser ASCII_CHARS = set...
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from flask import send_file, g, Blueprint from zhihudaily.configs import Config from zhihudaily.crawler import Crawler from zhihudaily._compat import StringIO utils = Blueprint('utils', __name__) @utils.before_app_request def be...
import hashlib from .subpaths import subpaths_for_path_range from pycoin.encoding.bytes32 import from_bytes_32, to_bytes_32 from pycoin.encoding.hash import double_sha256 from pycoin.encoding.hexbytes import b2h from pycoin.key.Key import Key def initial_key_to_master_key(initial_key): """ initial_key: ...
# file eulxml/xpath/parserules.py # # Copyright 2010,2011 Emory University Libraries # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
import os import pytest import typesystem from decide import input_folder from typesystem import ValidationError from .. import reader, types def test_cop2(): data_file = reader.InputDataFile.open(os.path.join(input_folder, "cop21.csv")) assert len(data_file.errors) == 0 assert len(data_file.rows) == 2...
#!/usr/bin/env python from ciscoconfparse import CiscoConfParse import re def read_in_file(filename): return CiscoConfParse(filename) def find_acls(parsed_config): acl_names = [] # Get standard ACL numbers/names standard_acls = parsed_config.find_objects('^access-list') for acl in standard_ac...
#!/usr/bin/env python2 import hashlib import json import subprocess # for subprocess import os # for path import sys # for reading args import zipfile # for zippin' def checksum(input_path): """Generates a sha256 checksum of a local file and returns its path. Args: input_path: (str) The local path to the fi...
# # Attempting to replicate lane detection results described in this tutorial by Naoki Shibuya: # https://medium.com/towards-data-science/finding-lane-lines-on-the-road-30cf016a1165 # For more see: https://github.com/naokishibuya/car-finding-lane-lines # # This 2nd version does a much better job of processing images. ...
"""This module contains a class which is used to represent the participating players in a game.""" class Player: """Every instance of the class Player represents one player in the game. The instance is initialized with information about the user itself; game related information is added later. Args:...
# -*- coding: utf-8 -*- """ Created on Mon Apr 10 10:14:31 2017 @author: Pablo Objetivos: -Representar de forma dinámica los resultados del archivo profiles.out para cualquier tiempo Guía: -Este script debe encontrarse en la misma carpeta que los archivos profiles.out y halfcells.out """ import numpy as ...
''' Created on 2013-8-12 @author: E525649 ''' from BaseCommand import CBaseCommand from twisted.internet import threads import BaseCommand from DB import SBDB class CHeartBeat(CBaseCommand): ''' classdocs ''' command_id=0x00000002 def __init__(self,data=None,protocol=None): ...
import sys, re from SequenceBasics import rc class PairwiseAlignment: def __init__(self): self.s1 = None self.s2 = None self.a1 = None self.a2 = None self.score = None def load_sequences(self,s1,s2): self.s1 = s1 self.s2 = s2 def do_needleman_wunsch(self): [a1,a2,score] = needlema...
"""tumuli URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
# -*- encoding: utf-8 -*- import abc AbstractBase = abc.ABCMeta( 'AbstractBase', (), { '__metaclass__': abc.ABCMeta, '__module__': __name__, '__slots__': (), }, ) class AbjadObject(AbstractBase): '''Abstract base class from which many custom classes inherit. '...
from __future__ import unicode_literals import os import base64 from datetime import timedelta from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.timezone import now from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields i...
# -*- coding: utf-8 -*- '''Unit tests for ckan/lib/navl/validators.py. ''' import copy import nose.tools import ckan.new_tests.factories as factories def returns_None(function): '''A decorator that asserts that the decorated function returns None. :param function: the function to decorate :type functi...
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net> # # 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 S...
''' ColourImager - Python pipeline to combine 3 FITS files into a single colour JPEG/PNG Copyright (C) 2017 Edward Gomez, Las Cumbres Observatory 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; eithe...
from __future__ import absolute_import, division, print_function, unicode_literals import datetime as dt import numpy as np import logging log = logging.getLogger(__name__) from .base_format import BaseFormat, FormatError from .. import __version__ from ..ssp_dicts import Dicts class Saiv(BaseFormat): def __i...
#! /usr/bin/env python from threading import Thread from sys import exit from time import sleep from psutil import cpu_percent, virtual_memory, swap_memory, \ net_io_counters, disk_io_counters """ Framework di monitoraggio della rete Modulo per le risorse hardware Questo modulo si occupa di otten...
#!python3 def max_beauty_of_string(in_str): '''(string) -> int Calculates maximum beauty of the in_str string. The beauty of the string is the sum of the beauty of the letters in it. The beauty of each letter is an integer between 1 and 26, inclusive, and no two letters have the same be...
from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^stats/$', views.stats, name='stats'), url(r'^profile/$', views.profile, name='profile'), url(r'^sharing/$', views.sharing, name='sharing'), url(r'^bookmarklet/$', views.bookmarklet, name='boo...
#!/usr/bin/env python # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 200000 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = set([ "127.0.0.1" ]) import re import sys import dns....
from chroma_core.models.host import Volume, VolumeNode from tests.unit.chroma_core.lib.storage_plugin.resource_manager.test_resource_manager import ResourceManagerTestCase class TestVolumeBalancing(ResourceManagerTestCase): def test_volume_balance(self): hosts = [] for i in range(0, 3): ...
"""Tests for letsencrypt.plugins.webroot.""" from __future__ import print_function import errno import os import shutil import stat import tempfile import unittest import mock from acme import challenges from acme import jose from letsencrypt import achallenges from letsencrypt import errors from letsencrypt.test...
# -*- coding: utf-8 -*- msg = { # Author: DrTrigon 'en': { 'thirdparty-drtrigonbot-subster-summary-mod': u'substituting %(tags)s tag(s)', 'thirdparty-drtrigonbot-sum_disc-notify-changed': u'Discussion changed', 'thirdparty-drtrigonbot-sum_disc-notify-closed': u'Discussion closed', 'thirdparty-drtrigonbot-sum_...
import attr import six from navmazing import NavigateToSibling, NavigateToAttribute from widgetastic.widget import Checkbox, View, Text, ConditionalSwitchableView from widgetastic_patternfly import ( BootstrapSelect, Button, Input, Tab, CheckableBootstrapTreeview as CbTree, BootstrapSwitch, CandidateNotFound, ...
from antlr4 import * from ChatLexer import ChatLexer from ChatParser import ChatParser from HtmlChatListener import HtmlChatListener from ChatErrorListener import ChatErrorListener import sys import unittest import io class TestChatParser(unittest.TestCase): def setup(self, text): lexer = ChatLexe...
# -*- 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): # Deleting field 'WorkFlowStep.depth' db.delete_column(u'calc_workflowste...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import itertools import json import os import shutil import time import traceback import ...
# Copyright 2020 Makani Technologies 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 agreed to...
"""""" from typing import Any, Callable, Collection, Union, cast from flask import Blueprint as BaseBlueprint from abilian.core.models.subjects import User from abilian.services.security import Anonymous, Role from abilian.services.security.service import SecurityService def allow_anonymous(user: User, roles: Colle...
from flask import Flask, render_template, jsonify, request from flask.ext.uploads import UploadSet, configure_uploads from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, \ UserMixin, RoleMixin, login_required, current_user from werkzeug import secure_filena...
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
import factory from factory import fuzzy from navras.base.models import Source, Area, Product, Point class SourceFactory(factory.django.DjangoModelFactory): title = fuzzy.FuzzyText() url = fuzzy.FuzzyText() class Meta: model = Source class AreaFactory(factory.django.DjangoModelFactory): t...
''' Created on 26.09.2014 @author: markusfasel ''' from base.DataCollection import DataCollection, Datapoint class PtHatBin: """ Data entry of the pt-hat bin """ def __init__(self, binId, weighthist, trialsHist): """ Construct pt-hat bin. Automatically calculates the weight ...
""" Unit test for param.depends. """ import param from . import API1TestCase class TestParamDepends(API1TestCase): def setUp(self): class P(param.Parameterized): a = param.Parameter() b = param.Parameter() @param.depends('a') def single_parameter(self): ...
from __future__ import division from __future__ import print_function import numpy as np import cv2 from imgProcessor.imgIO import imread from imgProcessor.measure.FitHistogramPeaks import FitHistogramPeaks from fancytools.math.findXAt import findXAt # from scipy.optimize.minpack import curve_fit MAX_SIZE =...