src
stringlengths
721
1.04M
"""Undocumented Module""" __all__ = ['DirectWaitBar'] from panda3d.core import * import DirectGuiGlobals as DGG from DirectFrame import * import types """ import DirectWaitBar d = DirectWaitBar(borderWidth=(0, 0)) """ class DirectWaitBar(DirectFrame): """ DirectWaitBar - A DirectWidget that shows progress compl...
#!/usr/bin/env python """ Select only the longest transcript for each gene in a GFF file. Usage: select_longest_mrna.py -i <input_GFF_file> -o <output_GFF_file> Options: -h --help Show this screen. --version Show version. -i <input_GFF_file> Input GFF file. -o <output_GFF_file> O...
''' Document.py Provides elements that define the html document being served to the client-side Copyright (C) 2015 Timothy Edmund Crosley 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 Softwar...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'npc/gui/uis/main_window.ui' # # Created by: PyQt5 UI code generator 5.7.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): ...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
# -*- coding: utf-8 -*- from contextlib import closing from functools import wraps import logging import os import shutil import threading import traceback import tempfile import zipfile import psycopg2 import openerp from openerp import SUPERUSER_ID import openerp.release import openerp.sql_db import openerp.tools ...
""" This module contains data-types and helpers which are proper to the SNMP protocol and independent of X.690 """ from typing import Any, Iterator, Union from x690.types import ObjectIdentifier, Type # type: ignore from puresnmp.typevars import PyType # Error messages as defined in https://tools.ietf.org/html/rfc3...
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
from flask import g, has_request_context, request, current_app from frasco.ext import * from frasco.users import is_user_logged_in, current_user from frasco.models import delayed_tx_calls from frasco.ctx import ContextStack from frasco.assets import expose_package from itsdangerous import URLSafeTimedSerializer from re...
""" Copyright (c) 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals, absolute_import import os import subprocess import tempfile from atomic_reactor.bui...
from nose.tools import set_trace from mastodon import Mastodon from botfriend.bot import Publisher class MastodonPublisher(Publisher): def __init__(self, bot, full_config, instance): for i in 'client_id', 'access_token': if not i in instance: raise ValueError( ...
""" ``fitscheck`` is a command line script based on pyfits for verifying and updating the CHECKSUM and DATASUM keywords of .fits files. ``fitscheck`` can also detect and often fix other FITS standards violations. ``fitscheck`` facilitates re-writing the non-standard checksums originally generated by pyfits with stand...
__author__ = "Martin Blais <blais@furius.ca>" import re from os import path from beancount.utils import test_utils from beancount.scripts import report class TestHelpReports(test_utils.TestCase): def test_get_list_report_string(self): help_string = report.get_list_report_string() self.assertTru...
import traceback from ast import literal_eval from collections import defaultdict import ckanapi import exceptions import requests import urlnorm import structlog log =structlog.get_logger() class TimeoutError(Exception): def __init__(self, message, timeout): # Call the base class constructor with the...
# -*- coding: utf-8 -*- """ A collection of constants from the midi spec. """ ################################################### ## Midi channel events (The most usual events) ## also called "Channel Voice Messages" NOTE_OFF = 0x80 # 1000cccc 0nnnnnnn 0vvvvvvv (channel, note, velocity) NOTE_ON = 0x90 # 1001cccc 0...
#!/usr/bin/env python # -*- coding: utf-8 -*- import hashlib import book.database as db from scrapy import Request from scrapy.utils.misc import arg_to_iter from twisted.internet.defer import DeferredList from scrapy.pipelines.images import ImagesPipeline from book.items import Subject, Meta, Comment class BookPipe...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# -*- coding: utf-8 -*- ''' Copyright (C) 2013 onwards University of Deusto All rights reserved. This software is licensed as described in the file COPYING, which you should have received as part of this distribution. This software consists of contributions made by many individuals, listed below: @auth...
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = 'davinellulinvega' from sphero_driver import sphero_driver import pyautogui from time import sleep # Define the size of the screen width, height = pyautogui.size() half_width = width / 2 half_height = height / 2 pyautogui.FAILSAFE = False # Define a function f...
""" NormalMD5 Combiner for the NormalMD5 Parser =========================================== Combiner for the :class:`insights.parsers.md5check.NormalMD5` parser. This parser is multioutput, one parser instance for each file md5sum. Ths combiner puts all of them back together and presents them as a dict where the keys...
# 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 + from __future__ import (absolute_import, divi...
#Mohammad Afshar, @mafshar, ma2510@nyu.edu """ Django settings for app project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject....
# coding: utf-8 # Deep Learning # ============= # # Assignment 2 # ------------ # # Previously in `1_notmnist.ipynb`, we created a pickle with formatted datasets for training, development and testing on the [notMNIST dataset](http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html). # # The goal of this assignm...
# -*- coding: utf-8 -*- import unittest from multirange import * class MyRange(object): def __init__(self, start, stop): self.start = start self.stop = stop class TestMultirange(unittest.TestCase): def test_normalize(self): self.assertEqual(normalize(range(-1, 1)), range(-1, 1)) ...
# Copyright (C) 1998-2007 by the Free Software Foundation, Inc. # Much of this is based on /usr/lib/mailman/bin/paths.py and Fixes the path of the project in order to use mailman # BEGIN MAILMAN PATH INCLUSION --------------------------- import os import sys from warnings import filterwarnings # some scripts expect...
# --------------------------------------------------------------------------------- # # ULTIMATELISTCTRL wxPython IMPLEMENTATION # Inspired by and heavily based on the wxWidgets C++ generic version of wxListCtrl. # # Andrea Gavana, @ 08 May 2009 # Latest Revision: 27 Dec 2012, 21.00 GMT # # # TODO List # # 1) Subitem ...
# -*- encoding: utf-8 -*- #!/usr/bin/python """Este modulo lanza todos los procesos del programa, maneja todas las funciones y administra todos los recursos.' El programa se encarga de levantar datos del puerto serie de forma constante. Esos datos los sube a internet, los guarda en la base de datos, hace graficos de l...
# # intersect.py # PolyBoRi # # Created by Michael Brickenstein on 2008-09-24. # Copyright 2008 The PolyBoRi Team # from polybori.gbcore import groebner_basis from polybori.statistics import used_vars_set from itertools import chain def intersect(i, j, **gb_opts): """ This functions intersects two ideals...
""" Static web assembly compiler. This command line tool takes web assembly to native code. """ import argparse from .base import base_parser, march_parser from .base import LogSetup, get_arch_from_args from .compile_base import compile_parser, do_compile from ..wasm import read_wasm, wasm_to_ir parser = argparse....
# dataframe: a data-frame implementation using method piping # # Copyright (C) 2016 Simon Dirmeier # # This file is part of dataframe. # # dataframe 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 versi...
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
from django.forms import ModelForm from models import Vote, Candidate, Election from django.shortcuts import render_to_response,get_object_or_404 from django.forms.formsets import formset_factory from django.forms.widgets import HiddenInput, Widget, TextInput from django import forms from django.utils.encoding import S...
# # (c) 2016 Red Hat Inc. # # 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 later version. # # Ansible is d...
import datetime import decimal from django.test import TestCase from django.core.cache import cache from httmock import HTTMock from django_dynamic_fixture import G, N from postnl_checkout.contrib.django_postnl_checkout.models import Order from .base import PostNLTestMixin class OrderTests(PostNLTestMixin, TestC...
######################################################################## # # GA for optimal dynamic discrimination experiment # ######################################################################## import wx from wx.lib.agw.floatspin import FloatSpin as wxFloatSpin import h5py from h5py._hl.group import Group as H...
# # Copyright (c) 2017 SUSE Linux GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRAN...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
# -*- coding: utf-8 -*- # Collections provide file-like access to feature data import os import sys from fiona.ogrext import Iterator, ItemsIterator, KeysIterator from fiona.ogrext import Session, WritingSession from fiona.ogrext import ( calc_gdal_version_num, get_gdal_version_num, get_gdal_release_name) from fi...
import sys import time from twisted.internet import defer import p2pool from p2pool.bitcoin import data as bitcoin_data from p2pool.util import deferral, jsonrpc @deferral.retry('Error while checking Bitcoin connection:', 1) @defer.inlineCallbacks def check(bitcoind, net): if not (yield net.PARENT.RPC_CHECK(bitc...
import os from setuptools import setup, find_packages version = '0.6.1.dev0' here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() except IOError: README = CHANGES = '' install_requires = [ ...
# -*- coding: utf-8 -*- import sqlalchemy as sa from sqlalchemy.orm import mapper, sessionmaker from PyQt4.QtCore import * import logging from classes.mainclass import MainClass from classes.emitclass import EmitClass engine = sa.create_engine("sqlite:///database.db", echo=True) metadata = sa.MetaData() contacts_tabl...
import unittest from propublica import ProPublica class TestPropublica(unittest.TestCase): def setUp(self): self.pp = ProPublica() def test_get_member_by_id(self): member = self.pp.get_member_by_id("A000360") self.assertEqual(member['first_name'], "Lamar") member = self.pp.ge...
from typing import Dict, Set from SNOMEDCTToOWL.SNOMEDToOWLConstants import RelationshipFilePrefix class Transitive: relationship_prefix = RelationshipFilePrefix def __init__(self): self._children = {} # parent -> set(children) Dict[int, Set[int]] self._parents = {} # child -...
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function, unicode_literals from collections import OrderedDict from passlib.hash import sha256_crypt import sqlalchemy as sa import sqlalchemy.orm as orm from ..env import env from ..models import declarative_base from ..compat import lru...
import io import os import struct import urllib.request import zipfile from xmlrpc.client import ServerProxy from mediadownloader.subtitles.base_subtitles import BaseSubtitles class OpenSubtitles(BaseSubtitles): OPENSUBTITLES_SERVER = 'http://api.opensubtitles.org/xml-rpc' USER_AGENT = 'OSTestUserAgentTemp'...
import math import random import sys import os ### CONFIG ### ### EDIT THIS PART BELOW ### ### GUI UPDATE: Encapsulated Main Script to function, to be called from GUI interface. """ For lack of UI, just set your desired parameters here. This obviously needs to be improved for the sake of a better workflow. Edit: UI Ad...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'EmailMeldModel' db.create_table('emailmeld_emailmeldmodel', ( ('id', self.gf('dj...
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lic...
# © 2015 Omar Castiñeira (Comunitea) # © 2017 Creu Blanca # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import models, fields, api, exceptions, _ class ResPartner(models.Model): _inherit = "res.partner" facturae = fields.Boolean('Factura electrónica') facturae_version =...
#!/usr/bin/python # -*- coding: utf-8 -*- # # edpickle - a simple pickled object editor. # Copyright (C) 2009 Jonas Bardino # # This file is part of MiG. # # MiG 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...
# borrowed heavily from http://bitbucket.org/bbangert/kai/src/ from datetime import datetime from jsmin import jsmin import os import sys if len(sys.argv) < 2: print "Must have at least 1 argument:" print "\tpython update_js.py CONFIG.INI" sys.exit(0) here_dir = os.path.dirname(os.path.abspath(__file__))...
import datetime from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.dialects.postgresql import ARRAY from app import app db = SQLAlchemy(app) class Key(db.Model): """ The model for a PGP key. """ id = db.Column(db.Integer, primary_key=True) uid = db.relationship("UID", backref="key") ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Hilfe' db.create_table(u'fraktionstool_hilfe', ( (u'id', self.gf('django.db.mode...
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar...
from changes.config import db from changes.models import SystemOption from changes.testutils import APITestCase class SystemOptionsListTest(APITestCase): def test_simple(self): path = '/api/0/systemoptions/' resp = self.client.get(path) assert resp.status_code == 200 data = self.u...
# -*- coding: latin-1 -*- from ftplib import FTP from getpass import getpass from VersionInfo import CalcVersionInfo import os import sys import traceback import datetime import subprocess try: # Test that Graph can be started without some obscure dll files os.system("Graph.exe /regserver") # Sign Graph.exe ...
""" Copyright 2017-present Airbnb, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
#!~/python import fluidity_tools import matplotlib as mpl mpl.use('ps') import matplotlib.pyplot as plt import myfun import numpy as np import os import lagrangian_stats import advect_functions from scipy import interpolate import csv import advect_functions def RD_t(par2Dzr,tt,px,py): RD_2Dm = [] #np.zeros((px+py,t...
from flask import request from dataactbroker.handlers.accountHandler import AccountHandler from dataactbroker.permissions import permissions_check from dataactbroker.routeUtils import RouteUtils def add_user_routes(app,system_email,bcrypt): """ Create routes related to file submission for flask app """ ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import copy import gyn.input import optparse import os.path import shlex import sys import traceback ...
# Author: Simone Orsi # Copyright 2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import json EXAMPLEDATA = { "last_summary": { "updated": 0, "skipped": 584, "errors": 0, "created": 414 }, "errors": [], "last_start": "08/03/2018 13:46", "skipped": [ ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, os, pclases, mx sys.path.append(os.path.join("..", "formularios")) import utils def buscar_rollos_existencias(fecha): """ Devuelve una lista de rollos en almacén hasta (incluida) la fecha dada. """ sqlfecha = fecha.strftime('%Y-%m-%d') ...
# -*- coding: utf-8 -*- import time from beaker.crypto.pbkdf2 import PBKDF2 from module.common.json_layer import json_loads from module.plugins.Account import Account class OboomCom(Account): __name__ = "OboomCom" __type__ = "account" __version__ = "0.21" __description__ = """Oboom.com accou...
import pytest import threading from datetime import timedelta from time import sleep QtCore = pytest.importorskip('PyQt5.QtCore') from rx.scheduler.mainloop import QtScheduler from rx.internal.basic import default_now @pytest.fixture(scope="module") def app(): # share qt application among all tests app = Q...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
#!/usr/bin/python # Copyright (c) 2006-2013 Regents of the University of Minnesota. # For licensing terms, see the file LICENSE. # Send an e-mail message to all the e-mail addresses in a file, waiting a # specified number of seconds between each message. # Usage: # # $ ./spam.py --help # # Also: # # $ ./spam.py |&...
from CommonServerPython import * import os URL = demisto.getParam('server') if URL[-1] != '/': URL += '/' if not demisto.getParam('proxy'): del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY'] del os.environ['http_proxy'] del os.environ['https_proxy'] VALIDATE_CERT = not demisto.params().g...
#-*- coding: utf-8 -*- import os import sys import matplotlib.pyplot as plt import matplotlib.colors as colors import pylab as P import pandas as pd from .chart import Chart from .entry.alloc import AllocEntry class AllocChart(Chart): def __init__(self, oracle, *args, **kwargs): super(AllocChart, se...
import bson.json_util import tornado.ioloop import tornado.web from pymongo.errors import OperationFailure from tornado import gen from tornado.web import HTTPError from tornado.web import MissingArgumentError import drenaj_api.utils.drenajneo4jmanager as drenajneo4jmanager class CampaignsHandler(tornado.web.Request...
#!/usr/bin/env python2 #weather.py #Original author: Josh McSavaney (mcsaucy@csh.rit.edu) #Current maintainer: Jeff Haak (zemon1@csh.rit.edu) #A script used to scrape and parse weather information import urllib, re, argparse if __name__ == "__main__": parser = argparse.ArgumentParser(description='Gets weather inf...
import time import staccato.openstack.common.service as os_service import staccato.xfer.events as s_events import staccato.xfer.executor as s_executor import staccato.xfer.constants as s_constants from staccato.xfer.constants import Events import staccato.db as s_db class SimpleCountSchedler(os_service.Service): ...
# Copyright 2016 James Hensman # # 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, so...
from flask import Blueprint, abort, jsonify, request, current_app, Response import datetime from sqlalchemy import desc from .provider import providers from .socketio import socketio from . import models, exceptions app = Blueprint('api', __name__) @app.route('/inbound/<provider>', methods=["POST"]) def inbound(pro...
import mechanicalsoup import requests_mock from distutils.version import StrictVersion import bs4 try: from urllib.parse import parse_qsl except ImportError: from urlparse import parse_qsl """ Utilities for testing MechanicalSoup. """ choose_submit_form = ''' <html> <body> <!-- vaguely based on Trac edi...
""" byceps.services.shop.shop.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional, Set from ....database import db from .models import Shop as DbShop from .transfer.models import Shop, ShopID cl...
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
import logging import math from collections import Counter, namedtuple from io import BytesIO from types import SimpleNamespace from fontTools.cffLib import ( CharStrings, GlobalSubrsIndex, IndexedStrings, PrivateDict, SubrsIndex, TopDict, TopDictIndex, ) from fontTools.misc.arrayTools impo...
from __future__ import unicode_literals import iptools import os import sys from celery.schedules import crontab from datetime import timedelta from django.utils.translation import ugettext_lazy as _ # ----------------------------------------------------------------------------------- # Default to debugging # ------...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest import mock from infra_libs.ts_mon.common import http_metrics from infra_libs.ts_mon.common import interface from infra_libs.ts_mon.common ...
from model import init_value import random import copy from pprint import pprint import fitness def list_filter(primary, filter): both = [team for team in primary if team in filter] if (len(both) > 0): return list(both) else: return primary class Schedule(object): time_string = ['6pm'...
# 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 ...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import csv import StringIO import unittest imp...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from s...
from filter01 import read_line from sets import Set import pickle def merage_process_measure(): data_new = Set([int(x) for x in read_line('data/new/new_measurement.txt')]) data_old = Set([int(x) for x in read_line('data/measurement.txt')]) data_new.update(data_old) lst = sorted(list(data_new)) pick...
""" USA-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select, CharField from django.utils.encoding import smart_text from django.u...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015-2018: # Frederic Mohier, frederic.mohier@alignak.net # # This file is part of (WebUI). # # (WebUI) 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 F...
""" @author: Bryan Silverthorn <bcs@cargo-cult.org> """ import math import numpy import qy from nose.tools import ( assert_true, assert_false, assert_equal, assert_raises, assert_almost_equal, ) from qy import ( emit_and_execute, Object, ) def test_qy_python_no_arguments(): ""...
# This is a script to create a mission from a start # location to an end location and upload the mission # to the vehicle. The script uses the Google Maps # Directions API to obtain directions from the start # location to the end location, and uses the points # received as waypoints in the mission. import googlemaps fr...
""" Ideas about fractional calculus defined on C^2 J^b f(x, a) = f(x, a + b) """ import numpy from matplotlib import pyplot from scipy import special def monomial(x, a, x_0, a_0): return (x - x_0)**(a - a_0)/special.gamma(a - a_0 + 1) def exp(x, a, b): return b**(-a)*numpy.exp(b*x) def projx(f, x, a): n...
############################################################ # For GRAMPA site, 12.19 # This generates the file "about.html" ############################################################ import sys, os sys.path.append('..') import lib.read_chunks as RC ###################### # HTML template ###################### htm...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import itertools import ggrc import ggrc.models as models import integration.ggrc import integration.ggrc.generator counter = 0 def make_name(msg): global counter counter += 1 return msg + str(cou...
"""Parse and extract base pair sequences from an Ensembl reference genome. """ from probe_generator import sequence from probe_generator.exceptions import NonFatalError def bases(sequence_range, genome): """Return the bases from a SequenceRange object. """ raw_bases = _raw_bases( sequence_range.c...
# -*- coding: utf-8 -*- """ @author: Emilio Moretti Copyright 2013 Emilio Moretti <emilio.morettiATgmailDOTcom> This program is distributed under the terms of the GNU Lesser General Public License. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public ...
from hashlib import md5 from cms.models.pluginmodel import CMSPlugin from cms.extensions import PageExtension from django.core.urlresolvers import reverse from django.db import models from django.utils.text import slugify from django_countries.fields import CountryField from geoposition.fields import GeopositionField ...
''' dbrev.unique_keys_table.UniqueKeysTable implements the Flyweight pattern which handles caching. ''' import logging LOG = logging.getLogger(__name__) # LOG.setLevel(logging.INFO) # Long lines expected. # pylint: disable=C0301 # Cyclic imports protected by functions # pylint: disable=R0401 from freevolv.models...
#!/usr/bin/env python # # Copyright 2014 Google Inc. All rights reserved. # # Use of this source code is governed by The MIT License. # See the LICENSE file for details. """Script that generates the build.ninja file for SPF.""" __author__ = 'nicksay@google.com (Alex Nicksay)' import errno import distutils.version im...
""" Copyright(C) 2016, Stamus Networks Written by Eric Leblond <eleblond@stamus-networks.com> This file is part of Scirius. Scirius 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...
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class stock_print_remit(osv.osv_memory): _name = 'stock.print_remit' _description = "Print Remit" _columns = { 'remit_number': fields.char('Remit Number'), } def default_get(self, cr, uid, fields, context=None): res = su...
# pytest -vs . import os import sys from mock import patch import shutil sys.path.insert(0, '..') from fix_conda_gfortran_linking_osx import repack_conda_package, main this_dir = os.path.dirname(__file__) PACK_SCRIPT = os.path.join(this_dir, '..', 'pack_binary_without_conda_install.py') FA...