text
stringlengths
12
6.59M
from django.conf import settings from django.conf.urls import patterns, include, url from ratelimitbackend import admin from django.conf.urls.static import static import django.contrib.auth.views from microsite_configuration import microsite # Uncomment the next two lines to enable the admin: if settings.DEBUG or set...
from django.conf import settings from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf.urls.static import static import django.contrib.auth.views # Uncomment the next two lines to enable the admin: if settings.DEBUG: from django.contrib import admin admin.autodis...
from django.test import TestCase from nodeconductor.iaas.tests import factories from nodeconductor.structure.tests import factories as structure_factories class LicenseTest(TestCase): def setUp(self): """ In setup we will create: license, template, instance, project and project role. ...
import collections import pathlib import unittest import rsrcfork DATA_DIR = pathlib.Path(__file__).parent / "data" EMPTY_RSRC_FILE = DATA_DIR / "empty.rsrc" TEXTCLIPPING_RSRC_FILE = DATA_DIR / "unicode.textClipping.rsrc" UNICODE_TEXT = "Here is some text, including Üñïçø∂é!" DRAG_DATA = ( b"\x00\x00\x00\x01\x00\x...
# -*- coding: utf-8 -*- import re import weakref import six import unittest from parsel import Selector class SelectorTestCase(unittest.TestCase): sscls = Selector def test_simple_selection(self): """Simple selector tests""" body = u"<p><input name='a'value='1'/><input name='b'value='2'/></p...
import pykazoo.client import kazoocommission.services from unittest import TestCase from unittest.mock import create_autospec def create_pykazoo_mock(): client = pykazoo.client.PyKazooClient('') client.authentication = create_autospec(client.authentication) client.devices = create_autospec(client.devices)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 Foundatio...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal 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 Foundatio...
import os import uuid from pathlib import Path from typing import Dict, List, Optional, Set import pytest from pydantic import BaseModel, BaseSettings, Field, NoneStr, ValidationError, dataclasses from pydantic.env_settings import SettingsError, read_env_file try: import dotenv except ImportError: dotenv = N...
""" dj-stripe Settings Tests. """ from unittest.mock import patch import stripe from django.core.exceptions import ImproperlyConfigured from django.db.models.base import ModelBase from django.test import TestCase from django.test.utils import override_settings from djstripe import settings class TestSubscriberModel...
import unittest from models.shopcart import Shopcart class TestShopcart(unittest.TestCase): """ Shopcart Model Tests """ def setUp(self): Shopcart.remove_all() def test_it_can_be_instantiated(self): """ Test Instantiation """ cart = Shopcart(1,[]) self.assertEqual(cart.uid,...
from bs4 import BeautifulSoup from tsstats import parse_logs, render_template, _format_seconds from os import remove output_path = 'tests/res/output.html' clients = parse_logs('tests/res/test.log') class TestTemplate: def teardown_class(): remove(output_path) def test_debug(self): render_tem...
#!/usr/bin/python # :Author: a Pygments author|contributor; Felix Wiemann; Guenter Milde # :Date: $Date: 2007-06-13 12:20:42 +0200 (Wed, 13 Jun 2007) $ # :Copyright: This module has been placed in the public domain. # # This is a merge of `Using Pygments in ReST documents`_ from the pygments_ # documentation, and a `...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
import socket import logging import subprocess def cmd(cmd): """ Execute a command, return stdout and stderr in tuple """ logging.debug("Execute Command: %s" % cmd) process = None try: process = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds...
#!/usr/bin/env python __author__ = 'Thomas R. Lennan, Michael Meisinger' __license__ = 'Apache 2.0' from uuid import uuid4 import couchdb from couchdb.http import ResourceConflict, ResourceNotFound from pyon.core.bootstrap import IonObject from pyon.core.exception import BadRequest, Conflict, NotFound from pyon.dat...
import cv2 import numpy as np from read_config import read_config from tqdm import tqdm import accv_utils import os ''' Function to load avi file from disc in required frame resolution ''' def load_avi_into_nparray(fileName, frameHeight, frameWidth, startFrame, endFrame): video = cv2.VideoCapture(fileName) ...
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
# Package: events # Date: 11th April 2010 # Author: James Mills, prologic at shortcircuit dot net dot au """Events This module define the basic Event object and common events. """ class Event(object): """Create a new Event Object Create a new Event Object populating it with the given list of argument...
# # Copyright 2016 The BigDL Authors. # # 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 ...
# Module: pollers # Date: 15th September 2008 # Author: James Mills <prologic@shortcircuit.net.au> """Poller Components for asynchronous file and socket I/O. This module contains Poller components that enable polling of file or socket descriptors for read/write events. Pollers: - Select - Poll - EPol...
# Module: pollers # Date: 15th September 2008 # Author: James Mills <prologic@shortcircuit.net.au> """Poller Components for asynchronous file and socket I/O. This module contains Poller components that enable polling of file or socket descriptors for read/write events. Pollers: - Select - Poll - EPol...
import platform import shutil from subprocess import Popen, PIPE import sys import os sys.path.append('/usr/lib/airtime/') from api_clients import api_client from configobj import ConfigObj if os.geteuid() != 0: print "Please run this as root." sys.exit(1) """ This function returns the codename of the hos...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set sw=3 sts=3 ts=3 """(Tool) Bench Marking Tool THis tool does some simple benchmaking of the circuits library. """ import sys import math import time import hotshot import optparse import hotshot.stats try: import psyco except ImportError: psyco = None from ...
# -*- coding: utf-8 -*- """ base ~~~~ """ from __future__ import division, print_function, unicode_literals import abc from decimal import Decimal from fractions import Fraction import uuid try: import cPickle as pickle except ImportError: import pickle as pickle # NOQA import redis import six NUMERIC_TYPE...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from datetime import datetime from django.db import models from .utils.modules import try_import, get_classes from .errors import NoConnectionError, MessageSendingError from .conf import settings class ExtensibleModelBase(models.base.ModelBase): def __new__(cls...
# -*- coding: utf-8 -*- import os import numpy as np import pandas as pd from statsmodels.multivariate.factor import Factor from numpy.testing import (assert_equal, assert_array_almost_equal, assert_raises, assert_array_equal, assert_, assert_array_less) from numpy.testing.decorators import skipif from numpy....
# coding: utf-8 ''' App: Webhook description: permitir hook de conversão pandoc em "documentos/artigos" author: Adriano dos Santos Vieira character encoding: UTF-8 ''' from flask import Flask, request, json import requests import ConfigParser app = Flask(__name__) ''' commentMR: post comment to Merge Request ''' def ...
#!/usr/bin/env pypy # -*- coding: utf-8 -*- # pylint: disable=C0103 # pylint: disable=W0702 # pylint: disable=R0912 # pylint: disable=R0915 # pylint: disable=R0914 """Arsenic development This is WIP code under active development. """ import ConfigParser import StringIO import anydbm import cProfile import imp import...
from __future__ import absolute_import from __future__ import print_function import sys, os, yaml, glob from yaml import YAMLError import subprocess import argparse import itertools import re import shutil from nougat import common, align, pdf from nougat.pdf.theme import colors, DefaultTheme from nougat.pdf.peakdetect...
""" Director specific funcationality """ from genericdirector import GenericDirector from modules.ldirectord import Ldirectord from modules.keepalived import Keepalived class Director(object): """ Factory class that returns a director object based on the name provided """ directors = {'generic': Generi...
import os from concurrent.futures import ThreadPoolExecutor from pandaharvester.harvesterconfig import harvester_config from pandaharvester.harvestercore import core_utils from pandaharvester.harvestercore.plugin_base import PluginBase from pandaharvester.harvestermisc.k8s_utils import k8s_Client # logger baseLogge...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * import numpy as np # import internal module to test helping functions from . import measures as nolds from . import datasets import unittest class TestNoldsHelper...
from __future__ import print_function import argparse import glob import json import os import platform import re import shutil import string import sys import time from joblib import delayed, Parallel from pprint import pprint from run_cmd import run_cmd from utils import * def compileAModule(builder,ace,filename)...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2019, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
""" Col -- SQLObject columns Note that each column object is named BlahBlahCol, and these are used in class definitions. But there's also a corresponding SOBlahBlahCol object, which is used in SQLObject *classes*. An explanation: when a SQLObject subclass is created, the metaclass looks through your class definition...
# -*- coding: utf-8 -*- """ Created on Fri Oct 19 21:14:59 2012 @author: Morten """ from __future__ import division, absolute_import, print_function, unicode_literals try: from .utils.py3k import * # @UnusedWildImport except (ValueError, SystemError): from utils.py3k import * # @UnusedWildImport pprint = py3k...
import simplejson, hashlib from django.http import HttpResponse from mobile_portal.core.renderers import mobile_render from mobile_portal.core.ldap_queries import get_person_units from search import contact_search def index(request): if request.GET: method = request.GET.get('method') method = 'pho...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2014 clowwindy # # 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 u...
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # 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 applic...
import pytest from numpy.testing import assert_allclose import numpy as np import scipy.signal as signal import scipy.sparse as sparse import warnings from keras.utils.test_utils import keras_test from keras import backend as K from keras.backend import floatx, set_floatx, variable from keras.utils.conv_utils import c...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) """Unittests for tvdb_api """ import sys import unittest sys.path.append("..") import tvdb_api from tvdb_exceptions...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django import forms from .constants import * from .models import ExtraInfo from .models import SUB_SPECIALTY_CHOICES ALL_SUB_SPECIALTY_CHOICES = [ ('', '---------'), ] ALL_SUB_SPECIALTY_CHOICES.extend( sub_specialty fo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.db import models from django.shortcuts import get_object_or_404 from django.utils.cache import add_never_cache_headers from django.utils.translation import get_language_from_request from rest_framework import generics from rest_fra...
#!/usr/bin/python3 import os import time import gi import logging import re import subprocess from keyman_config.gnome_keyboards_util import is_gnome_shell from keyman_config.gsettings import GSettings gi.require_version('IBus', '1.0') from gi.repository import IBus class IbusUtil(): def __init__(self) -> None...
""" Upgrade of the python client for freesound Find the API documentation at http://www.freesound.org/docs/api/. This lib provides method for managing files and data with a local data storage """ import copy import freesound import os import json import ijson from numpy import array from functools import reduce impo...
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, m...
from discord.ext import commands import hashlib import zlib from cryptography.hazmat.backends.openssl import backend as openssl_backend from cryptography.hazmat.primitives import hashes as crypto_hashes import pygost.gost28147 import pygost.gost28147_mac import pygost.gost34112012 import pygost.gost341194 import pyg...
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # x11.py - X11 Display classes # ----------------------------------------------------------------------------- # $Id$ # # ----------------------------------------------------------------------------- # kaa.displ...
import json import os current_dir = os.path.dirname(os.path.realpath(__file__)) + "/" with open(current_dir + "../package.json") as json_file: project_package = json.load(json_file) package = {} try: with open(current_dir + "package.json") as json_file: package = json.load(json_file) except: packa...
from collections import OrderedDict from itertools import count, groupby from django.conf import settings from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from django.contrib.postgres...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
import textwrap from pprint import pprint def all_str(something): """ Convert to string all values from a list or tuple; or Convert to string a value (not list or tuple) """ if isinstance(something, (list, tuple)): return type(something)(map(str, something)) else: return str(so...
import socket from threading import RLock, BoundedSemaphore import threading import socket import time import json import sys, traceback STREST_VERSION = 2.0 USER_AGENT = "PyStrest/0.2" class STRESTMessage(dict): def __init__(self, mapping={}): self.update(mapping) return def get_txn_i...
# Copyright (c) 2007, Intel Corporation # All rights reserved. This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-l...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # 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 applic...
# # Copyright (c) 2013- Facebook. All rights reserved. # from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import csv import glob import json import logging import multiprocessing import os import re im...
import os MONGO_HOST = os.environ.get('MONGO_HOST', 'localhost') MONGO_PORT = os.environ.get('MONGO_PORT', 27017) MONGO_DBNAME = os.environ.get('MONGO_DBNAME', 'atlas') # Enable reads (GET), inserts (POST), and DELETE for resources/collections. RESOURCE_METHODS = ['GET', 'POST'] # Enable reads (GET), edits (PATCH), ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright 2012-2013 Camptocamp SA (Guewen Baconnier) # Copyright (C) 2010 Sébastien Beau # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affer...
# Copyright (c) 2016 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.PluginRegistry import PluginRegistry from UM.Logger import Logger from .FileWriter import FileWriter from PyQt5.QtCore import QObject, pyqtProperty, pyqtSlot, QUrl import platform from UM.i18n import i18nCatalo...
import db import json import ckan.model.package as package import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit import ckanext.slack.model.slack_user as slack_user import ckan.lib.helpers as h from slackclient import SlackClient from routes.mapper import SubMapper from ckan.common import c from pylons...
from . import Plugin class CatchallStatsdPlugin(Plugin): priority = -4 """ Like catchall, but for targets from statsd (presumably) """ targets = [ { 'match': '^stats\.gauges\.?(?P<n1>[^\.]*)\.?(?P<n2>[^\.]*)\.?(?P<n3>[^\.]*)\.?(?P<n4>[^\.]*)\.?(?P<n5>[^\.]*)\.?(?P<n6>[^\.]*)\....
from jinja2 import Template import webkit import re import gtk class WebkitPony(gtk.Window): '''Main Gui component. Creates the GTK window and loads the webgui. This is the main entrypoint of the gui client. Actually the real gui, where events and actions take place, lives in lib.view.webgui. ''' ...
from __future__ import unicode_literals import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'fake-key' INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'regwall', 'regwall.tests.articles', 'regwall....
#! /usr/bin/env python #****************************** # artview.py - PyArt Radar Viewer using Qt Gui interface #****************************** ''' ARTview - The ARM Radar Toolkit Viewer Allow a graphical interface to be employed as a quick browse through a radar data file opened using the PyArt software package Au...
import ipaddress from BaseHTTPServer import BaseHTTPRequestHandler from StringIO import StringIO from twisted.internet.protocol import DatagramProtocol from paradrop.base import settings from paradrop.core.system import system_info SSDP_ADDR = "239.255.255.250" PARADROP_URN = "urn:schemas-upnp-org:service:Paradro...
import commons, sys, os import logging as log import pandas as pd import xgboost as xgb import numpy as np from sklearn.externals import joblib from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, f1_score, precision_score, recall_score, classification_report, confusion_matr...
__version__ = '4.0.0'
import git, os, shutil, sys import requests from flask import Flask app = Flask(__name__) GIT_DIR = os.getenv('GIT_DIR') if not GIT_DIR: GIT_DIR = '/tmp/gitdir' BUILDKITE_URL = os.getenv('BUILDKITE_URL') if not BUILDKITE_URL: print('export BUILDKITE_URL env-var') exit(1) GIT_URL = os.getenv('GIT_URL') ...
#!/usr/bin/python """ Memset API interactive shell Copyright (C) 2012 Memset Ltd; http://www.memset.com/ 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 lim...
#!/usr/bin/env python import sys, operator, string def characters(filename): for line in open(filename): for c in line: yield c def all_words(filename): start_char = True for c in characters(filename): if start_char == True: word = "" if c.isalnum(): ...
import numpy import numpy.lib.stride_tricks try: import cupy.lib.stride_tricks except ImportError: pass from chainer import backend from chainer.backends import cuda from chainer import function_node from chainer.functions.pooling import pooling_2d from chainer.utils import conv from chainer.utils import type_...
import os import commit import service import runinfo from fileio.walkhash import walk_hash, hash_diff from fileio.config import parse_config, config_defaults import shutil import status def strip_prefix(paths, prefix): return [x[len(prefix)+1:] for x in paths] def get_last_run_info(squadron_state_dir): """ ...
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@fr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from nose.tools import eq_ import bot_mock from pyfibot.modules import module_urltitle from utils import check_re bot = bot_mock.BotMock() lengh_str_regex = '\d+(h|m|s)(\d+(m))?(\d+s)?' views_str_regex = '\d+(\.\d+)?(k|M|Billion|Trillion)?' age_str_rege...
import os import tkinter as tk import tkinter.filedialog from tkinter import ttk STANDARD_MARGIN = (3, 3, 12, 12) class Launch(tk.Tk): def __init__(self): super().__init__() self.title('Skeleton analysis tool') self.smooth_radius = tk.DoubleVar(value=0.1, name='Smoothing radius') ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django import forms from .constants import * from .models import ExtraInfo class ExtraInfoForm(forms.ModelForm): """ The fields on this form are derived from the ExtraInfo model """ def __init__(self, *args, **kwar...
import datetime import main from flask import flash, redirect, render_template, request, session, url_for from flask.views import View from .db.models import ShoppingList, ShoppingItem, ShoppingListManager, User from .forms import LoginForm, CreateShoppingItemForm from .utils.helpers import json_serial, check_name, ge...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2016 Haggi Krey, The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # of...
from livevalidation.validator import * from livevalidation.settings import * from django import template from django.forms import fields register = template.Library() class ValidationNode(template.Node): def __init__(self, form, *opts): self.form = form self.opts = {'validMessage':' '} for...
# This program 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 # Foundation; either version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be usefu...
import random import fireplace.cards from ..actions import * from ..enums import CardType, Race, Zone from ..targeting import * def hand(func): """ @hand helper decorator The decorated event listener will only listen while in the HAND Zone """ func.zone = Zone.HAND return func drawCard = lambda self, *args: se...
#!/usr/bin/env python import sys from os import system class NginxCtl(object): """ Nginx control operations abstraction """ def __init__(self, pid_file_path = "logs/nginx.pid", bin_file_path = "sbin/nginx"): """ Arguments: pid_file_path: Nginx pid file path ...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import import logging import os import typing from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Text from ty...
#!/usr/bin/python2.5 # # Copyright 2009 the Melange authors. # # 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...
# # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
# ============================== # Copyright 2011 Whamcloud, Inc. # ============================== from django.db import models from django.db import transaction from configure.models.jobs import StatefulObject, Job from configure.lib.job import StateChangeJob, DependOn, DependAll, Step from monitor.models import Me...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Domsense s.r.l. (<http://www.domsense.com>). # Copyright (C) 2012-2013 Agile Business Group sagl # (<http://www.agilebg.com>) # # This p...
''' Created on 7 mai 2013 @author: nulysse ''' import unittest import A429MsgField import A429Exception class PackingBaseFieldNormal(unittest.TestCase): def testMax(self): """ A429MsgField shall be capable of holding all bits set to 1 """ field = A429MsgField.A429MsgField(1,32,"Test Field") ...
#!/usr/bin/env python # Created by Pearu Peterson, September 2002 """ Test functions for fftpack.basic module """ from __future__ import division, print_function, absolute_import __usage__ = """ Build fftpack: python setup_fftpack.py build Run tests if scipy is installed: python -c 'import scipy;scipy.fftpack.test...
# Copyright (c) 2016, Nordic Semiconductor # 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 conditions ...
#!/usr/bin/env python2.3 """ NOT YET CORRECT!!! usage: %prog start end maf_files... -m, --missingData: Inserts wildcards for missing block rows instead of '-' """ import psyco_full import cookbook.doc_optparse import bx.align.maf import bx.align as align from bx import misc import bx.seq.nib import os import s...
import db_access import logging from logging.handlers import RotatingFileHandler from flask import Flask, render_template, request from minify import minify as minify_css app = Flask(__name__) app_info = { 'debug': True, 'version': 'Alpha 0.1' } game_names = [ { 'short': 'ED', 'url': 'eli...
#file : InMoov3.hand+arm+rockpaperscissors.py from java.lang import String import threading import time import random # this will run with versions of MRL above 1695 # a very minimal script for InMoov # although this script is very short you can still # do voice control of a right hand or finger box # It uses WebkitS...
import difflib import logging from pprint import pformat import pkg_resources from pylons import c, request from tg import expose, redirect, flash from tg.decorators import with_trailing_slash from webob import exc from allura import version from allura.app import Application, WidgetController, ConfigOption, Sitemap...
# Sketcher gui init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up #*************************************************************************** #* (c) Juergen Riegel (juergen.riegel@...
# -*- coding: utf-8 -*- import pytest from boltons.urlutils import URL, _URL_RE # fully quoted urls that should round trip TEST_URLS = [ 'http://googlewebsite.com/e-shops.aspx', 'http://example.com:8080/search?q=123&business=Nothing%20Special', 'http://hatnote.com:9000?arg=1&arg=2&arg=3', 'https://x...
import unittest from django.core.exceptions import FieldDoesNotExist from django.db import connection, migrations, models, transaction from django.db.migrations.migration import Migration from django.db.migrations.operations import CreateModel from django.db.migrations.operations.fields import FieldOperation from djan...
from __future__ import (absolute_import, unicode_literals) __all__ = ['MultiLayerPerceptronRegressor', 'MultiLayerPerceptronClassifier'] import os import time import logging import itertools log = logging.getLogger('sknn') # By default, we force Theano to use a GPU and fallback to CPU, using 32-bits. # This must b...