text
stringlengths
17
737k
""" multiplication-table.py Author: Mary Feyrer Credit: Ethan Adner, Tess Snyder, http://stackoverflow.com/questions/493386/how-to-print-in-python-without-newline-or-space Assignment: Write and submit a Python program that prints a multiplication table. The user must be able to determine the width and height of the t...
# -*- coding: utf-8 -*- """ Parse user configuration file """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import textwrap from niftynet.engine.signal import TRAIN, INFER, EVAL from niftynet.utilities.util_common import look_up_...
"""Support for Eight Sleep sensors.""" from __future__ import annotations import logging from typing import Any from pyeight.eight import EightSleep import voluptuous as vol from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.config_entries import ConfigEntry from homeassis...
import pytest from django.contrib.auth.models import Group from django_performance_testing.queries import \ QueryCollector, QueryBatchLimit, QueryCountResult from django_performance_testing.core import BaseLimit, LimitViolationError from testapp.test_helpers import override_current_context def wrapped_between_irr...
""" desisim.templates ================= Functions to simulate spectral templates for DESI. """ from __future__ import division, print_function import os import sys import numpy as np import desisim.io from desispec.log import get_logger log = get_logger() LIGHT = 2.99792458E5 #- speed of light in km/s MAG2NANO = ...
""" consumers.py -- where all the moksha-hub madness lives. Diagram:: | narcissus/amqp-log-sender.py --------\ | | | V | <some qpid instance> | | | ...
"""Support for eQ-3 Bluetooth Smart thermostats.""" import logging import eq3bt as eq3 # pylint: disable=import-error import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( HVAC_MODE_AUTO, HVAC_MODE_HEAT, HVAC_MODE...
# Copyright (c) 2015-2016 Cisco Systems, Inc. # # 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...
#! /usr/bin/python3 # * GetQuote.py * # # * Nicholas DiBari * # # * --------------------------------------------- * # # * Provides user interface for Get Quote * # # * DataBase Management * # # * -------------------------...
class PlaysoundException(Exception): pass def _playsoundWin(sound, block = True): ''' Utilizes windll.winmm. Tested and known to work with MP3 and WAVE on Windows 7 with Python 2.7. Probably works with more file formats. Probably works on Windows XP thru Windows 10. Probably works with all vers...
""" Wrapper for launching an integration on images """ __license__ = """ This file is part of RAPD Copyright (C) 2016-2017 Cornell University All rights reserved. RAPD 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...
#!/usr/bin/python # -*- coding: utf-8 -*- from collections import defaultdict from itertools import product, chain, combinations from math import sqrt, log import core import tfidf from random import sample, random, choice, shuffle import types class Blocker: def __init__(self, predicates, df_index): self...
import warnings from collections import Iterable from numbers import Number import copy import numpy as np from scipy.optimize import fmin_l_bfgs_b from sklearn.base import clone from sklearn.base import is_regressor from sklearn.externals.joblib import Parallel, delayed from sklearn.utils import check_random_state ...
__version__ = '3.2.5.dev977'
from numpy import abs from skyfield.api import load from skyfield.toposlib import Topos def ts(): yield load.timescale() def test_beneath(ts): t = ts.utc(2018, 1, 19, 14, 37, 55) for deg in 15, 25, 35, 45: # An elevation of 0 is more difficult for the routine's accuracy # than a very larg...
#-*- coding:utf-8 -*- from urllib.parse import urljoin API_ROOT_URL = 'http://sublimesync.florianpaquet.com:8080/' API_UPLOAD_URL = urljoin(API_ROOT_URL, '/upload/') API_RETRIEVE_URL = urljoin(API_ROOT_URL, '/retrieve/')
# coding: utf-8 ''' datasets.py Represent each parsed dataset as an object. This is really just a wrapper to the underlying dictionaries, but it also provides some useful functions that assist in the namespacing and equivalencing process. ''' import os.path import time from common import get_citation_info from...
import re import sys import parser d={} # d is the dictionary of unittest changes, keyed to the old name # used by unittest. # d[old][0] is the new replacement function. # d[old][1] is the operator you will substitute, or '' if there is none. # d[old][2] is the possible number of arguments to the unittest # func...
import serial from flask import Flask from flask import jsonify app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" @app.route('/azimuth/<degrees>') def post_azimuth(degrees): # Create suitable string for GS232 az = "az" + str(degrees) + "\n" # Create suitable string for GS232 ...
from __future__ import with_statement from sfa.util.faults import * from sfa.util.namespace import * from sfa.util.rspec import RSpec from sfa.server.registry import Registries from sfa.plc.nodes import * import boto from boto.ec2.regioninfo import RegionInfo from boto.exception import EC2ResponseError from ConfigPar...
#!/usr/bin/env python import roslib roslib.load_manifest('omni_teleop') import rospy import tf import math import actionlib import tf.transformations as tr import numpy as np import hrl_lib.tf_utils as tfu #import threading from geometry_msgs.msg import PoseStamped from geometry_msgs.msg import Wrench from geometry...
#!/usr/bin/python # -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2010 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@hotmail.com> # # Contact email: tomkralidis@hotmail.com # ============================================================...
import argparse import requests from time import time from random import shuffle from sqlalchemy.dialects.postgresql import JSONB from app import db from app import ti_queues from util import elapsed from util import safe_commit # do this to get all env variables in console # source .env class DoiResult(db.Model)...
from django.conf.urls import url from secrets.views import secret_add from . import views urlpatterns = [ # Sites url(r'^sites/$', views.SiteListView.as_view(), name='site_list'), url(r'^sites/add/$', views.site_add, name='site_add'), url(r'^sites/import/$', views.SiteBulkImportView.as_view(), name=...
# from twilio.util import TwilioCapability import socket import copy import threading import urllib import urllib2 import os import tailer import sys import datetime from dateutil import tz import time import pip.utils.logging import pip import shutil import codecs import weakref import types import pkg_resources impor...
#! /usr/bin/python # -*- coding: utf-8 -*- """ Module for experiment support """ import argparse import logging import os logger = logging.getLogger(__name__) import matplotlib.pyplot as plt import subprocess import glob import numpy as np import copy # import six import pandas import traceback import shutil # ----...
#!/usr/bin/env python """ One of the most controversial issues in the US educational system is the efficacy of standardized tests, and whether they are unfair to certain groups. Given our prior knowledge about this topic, investigating the correlations between SAT scores and demographic factors might be an interesting ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import base64 import json import re import cgi ########################################### # Sistema de depuración from bs4 import BeautifulSoup from debug import dlprint from django.core.exceptions import ObjectDoesNotExist from django...
from django.shortcuts import render, HttpResponse from django.contrib.auth.decorators import login_required from .forms import ProfileForm, UserForm # Create your views here. def loginTest(request): if request.user.is_authenticated(): return HttpResponse(request.user.username) else: return Htt...
""" Webhook event handlers for the various models Stripe docs for Events: https://stripe.com/docs/api/events Stripe docs for Webhooks: https://stripe.com/docs/webhooks TODO: Implement webhook event handlers for all the models that need to respond to webhook events. NOTE: Event data is not guaranteed to be ...
import os from os import path import json def set_setting(key, val): _settings[key] = val _save_settings() def get_setting(key, default=""): return _settings.get(key, default) def set_value(key, val): _values[key] = val def get_value(key): return _values.get(key, "") def _save_settings(): if not path.e...
# ICRAR - International Centre for Radio Astronomy Research # (c) UWA - The University of Western Australia, 2015 # Copyright by UWA (in the framework of the ICRAR) # All rights reserved # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gen...
# -*- coding: utf-8 -*- import bleach import datetime import feedparser import json import logging import lxml.html import magic import oauth2 as oauth import urllib import urlparse import random import requests import socket from django.db import models from django.conf import settings from django.contrib.auth.models...
import logging import reprlib import struct from typing import Union, Set, List, Dict from twisted.internet import defer from twisted.internet.protocol import ClientFactory from twisted.internet import tcp from twisted.names.client import Resolver as OriginResolver from twisted.names.dns import DNSDatagramProtocol, DN...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
# -*- coding: utf-8 -*- """ femagtools.windings ~~~~~~~~~~~~~~~~~~~ Handling windings Conventions Number of slots: Q Numper of pole pairs: p Number of phases: m Number of layers: l Number of wires per slot side: n Number of slots per pole and phase: q = Q/p/2/m Number of coils per phase: c = Q * ...
# Django settings for kuma project. import logging import os import platform import json from django.utils.functional import lazy from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse_lazy from sumo_locales import LOCALES DEBUG = False TEMPLATE_DEBUG = DEBUG ROOT = os....
""" Copyright 2015, Institute for Systems Biology 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 w...
__version__ = "0.2.3"
import argparse import itertools import logging import os import signal import selectors import socket import sys import threading import time import dns.message import dns.rdatatype from pydnstest import scenario, mock_client class TestServer: """ This simulates UDP DNS server returning scripted or mirror DNS ...
""" LooLu is Copyright (c) 2009 Shannon Johnson, http://loo.lu/ 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, m...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 # -------------------------------------------------------------------- # # MAIN CONFIGURATION # # -------------------------------------------------------------------- # # you should configure your database here befo...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Adriano Monteiro Marques <adriano@umitproject.org> ## Author: Diogo Pinheiro <diogormpinheiro@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify...
#!/usr/bin/env python '''Load fonts and render text. This is a fairly-low level interface to text rendering. Obtain a font using `load`:: from pyglet import font arial = font.load('Arial', 14, bold=True, italic=False) pyglet will load any system-installed fonts. You can add additional fonts (for example, ...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Contributor: Julien Vehent jvehent@mozilla.com [:ulfr] from __future__ import print_function ...
# -*- coding: utf-8 -*- """ pygments.lexers.math ~~~~~~~~~~~~~~~~~~~~ Lexers for math languages. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, include, \ combine...
#!/usr/bin/env python2 """ Animate a given set of CSV data ontop of a GIS file, and display it in a semi-elegant form. Future improvements: - GUI tweaking (1) - Transformations - Intergrate with the scale - Code cleanups (2) - Removing all of the TODO's... (2) - Speed ups + profilin...
from common import * # NOQA from lib.aws import AmazonWebServices import pytest from threading import Thread DO_ACCESSKEY = os.environ.get('DO_ACCESSKEY', "None") AWS_ACCESS_KEY_ID = os.environ.get("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = os.environ.get("AWS_SECRET_ACCESS_KEY") AWS_REGION = os.environ.get("AWS_...
''' Created on Nov, 2016 @author: hugo ''' from __future__ import absolute_import import argparse from os import path import timeit import math import numpy as np from autoencoder.preprocessing.preprocessing import load_corpus from autoencoder.utils.io_utils import dump_json, write_file from autoencoder.baseline.lda...
from .command import Command from .context import Context import inspect # Command conversion decorator def command(**attrs): """Decorator which converts a function into a command.""" def decorator(func): if isinstance(func, Command): raise TypeError('Function is already a command.') ...
# -*- python -*- # stdlib imports --- import os import os.path as osp # waf imports --- import waflib.Utils import waflib.Logs as msg import waflib.Configure import waflib.Build import waflib.Task import waflib.Tools.ccroot from waflib.Configure import conf from waflib.TaskGen import feature, before_method, after_met...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2016 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
# coding: utf-8 ''' ------------------------------------------------------------------------------ Copyright 2016 Esri 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/li...
# encoding: utf-8 # Copyright 2013 Red Hat, 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 applica...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # 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 o...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from dateutil import parser as dateparser from mock import Mock from django.http import Http404 from django.test import Te...
from collections import OrderedDict import itertools from opentrons_sdk import containers from opentrons_sdk.labware import instruments from opentrons_sdk.robot import Robot from opentrons_sdk.util import vector def interpret_json_protocol(json_protocol: OrderedDict): robot_deck = interpret_deck(json_protocol[...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, division import time import string from functools import reduce class Five(object): # Basic five. def five(self, *args): return 5 def __call__(self): return self.five() # Start of...
"""Correspondence Analysis (CA)""" import matplotlib.pyplot as plt import numpy as np import pandas as pd from scipy import sparse from sklearn import base from sklearn import utils from . import plot from . import util from . import svd class CA(base.BaseEstimator, base.TransformerMixin): def __init__(self, n_...
"""Various ways of getting live departures from some web service""" import re import ciso8601 import datetime import requests import pytz import dateutil.parser import logging import xml.etree.cElementTree as ET from pytz.exceptions import AmbiguousTimeError from django.conf import settings from django.core.cache impor...
"""Reading and writing an evoked file """ print __doc__ import fiff fname = 'MNE-sample-data/MEG/sample/sample_audvis-ave.fif' # Reading data = fiff.read_evoked(fname) # Writing fiff.write_evoked('evoked.fif', data) ############################################################################### # Show result impo...
# Copyright 2010-2011 Josh Kearney # # 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 agre...
# Create your views here. from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.contrib import auth from django.core import serializers from django.core.files.uploadhandler import FileUploadHandler from django.co...
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
#!/usr/bin/python # Copyright (c) 2011 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions for finding prebuilt Chrome binaries. """ import os.path import re import urllib BASE_URL = 'http://commond...
# -~- flymirror.py -~- # Tiny fast multithreaded rule-based mirroring # By Luke Turner from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from functools import partial from os.path import exists as file_exists from queue import Queue, Empty from re import search, finditer from sys im...
#!/usr/bin/python2.4 # -*- coding: iso-8859-15 -*- import sys, os import MySQLdb import MySQLdb.cursors import traceback import re from time import sleep import getpass from datetime import datetime from string import join from tools.fs.io import read_file DictCursor = MySQLdb.cursors.DictCursor StdCursor = MySQLdb....
# -*- coding: utf-8 -*- import optparse from xml.etree.ElementTree import Element from nassl._nassl import OpenSSLError from nassl.ocsp_response import OcspResponse, OcspResponseNotTrustedError from nassl.ssl_client import ClientCertificateRequested from nassl.x509_certificate import X509Certificate, HostnameValida...
# -*- coding: utf-8 -*- from nose.tools import * # flake8: noqa from framework.auth import core from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from tests.factories import ( ProjectFactory, RegistrationFactory, AuthUserFactory, CommentFactory ) class TestNodeComme...
# Copyright (C) 2014-2017 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. from __future__ import division, print_function, unicode_literals import cgi import locale from PyQt4 import QtCore, QtGui import sys class Termi...
# -*- coding: utf-8 -*- ## ## $Id: materialFactories.py,v 1.16 2009/04/21 16:03:50 pferreir Exp $ ## ## This file is part of CDS Indico. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Indico is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public Lice...
#!/usr/bin/env python # Copyright (c) 2012 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. """Upload a single file to a Google Storage Bucket. To test: cd .../buildbot/slave/skia_slave_scripts CR_BUILDBOT_PATH=../../t...
from __future__ import print_function import argparse import base64 import binascii import datetime import io import itertools import json import operator import pprint import re import socket import struct import sys import unicodedata import antlr4 import antlr4.error.ErrorListener import antlr4.error.Errors import...
"""Configuration setup for templating systems and Paste error middleware This module supplies pylons_config which handles setting up defaults for templating systems, Paste errorware, and prefixing Routes if necessary. """ import copy import logging import os import warnings from paste.config import DispatchingConfig ...
#!/usr/bin/env python __description__ = 'Deobfuscator script for FOPO PHP obfuscated files' __author__ = 'Antelox' __version__ = '0.1' __date__ = '04/28/2016' """ FOPO PHP Deobfuscator script Coded by Antelox Twitter: @Antelox UIC R.E. Academy - quequero.org Copyright (C) 2016 - MIT License *Python script version...
#!/usr/bin/env python # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: t -*- # # NetProfile: Custom database fields # © Copyright 2013-2014 Alex 'Unik' Unigovsky # # This file is part of NetProfile. # NetProfile is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General P...
import os import re import locale import json import sys from pkg_resources import get_distribution import xml.etree.ElementTree as ET from ctypes import * try: import pathlib except ImportError: pathlib = None if sys.version_info < (3,): import urlparse else: import urllib.parse as urlparse __versio...
# -*- coding: utf-8 -*- ''' Connection module for Amazon Security Groups .. versionadded:: 2014.7.0 :configuration: This module accepts explicit ec2 credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API an...
from typing import Tuple, List, Union, Callable, cast, Set, NamedTuple import tensorflow as tf from typeguard import check_argument_types from neuralmonkey.model.stateful import ( TemporalStatefulWithOutput, TemporalStateful) from neuralmonkey.model.model_part import ModelPart, InitializerSpecs from neuralmonkey....
from django.db import models from django import forms class TimeFormWidget(forms.MultiWidget): def __init__(self, attrs=None): widgets = [ forms.NumberInput(), forms.NumberInput(), forms.NumberInput() ] super(TimeFormWidget, self).__init__(widgets, attrs) def decompress(self, value): # Con...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Classification and decoding related tools """ import numpy as np from functools import reduce from sklearn.feature_selection.univariate_selection import SelectKBest import re def feature_selection(feat_select, X, y): """" Implements various kinds of feature selectio...
import datetime import json import logging import os import re import shlex import sys import urllib2 from subprocess import Popen, PIPE from urllib2 import urlopen from trollvalidation.validations import configuration as cfg LOG = logging.getLogger('nic_downloader') def get(remote_file, local_path=cfg.INPUT_DIR, r...
#!/usr/bin/env python """Select and reverse-Markdown (html2text) web page fragments.""" __author__ = "@siznax" __date__ = "Jan 2015" __version__ = '0.0.1' import argparse import html2text import html5lib import lxml.cssselect import lxml.html import lxml.html.clean import os import requests import sys class Frag2Te...
from __future__ import print_function import sys import select import tty import termios import time import theano import pprint import theano.tensor as T #import cv2 import pickle import copy import numpy as np import scipy.io as sio import matplotlib.pyplot as plt from theano.tensor.shared_randomstreams import Random...
# -*- coding: utf-8 -*- ''' salt.utils.serializers.sls ~~~~~~~~~~~~~~~~~~~~~~~~~~ SLS is a format that allows to make things like sls file more intuitive. It's an extension of YAML that implements all the salt magic: - it implies omap for any dict like. - it implies that string like data are s...
import ddapp.applogic as app from ddapp import lcmUtils from ddapp import transformUtils from ddapp import visualization as vis from ddapp import filterUtils from ddapp import drcargs from ddapp.shallowCopy import shallowCopy from ddapp.timercallback import TimerCallback from ddapp import vtkNumpy from ddapp import obj...
# bridges #https://www.openstreetmap.org/way/28412298 assert_has_feature( 18, 41888, 101295, "roads", {"kind": "highway", "highway": "motorway", "id": 28412298, "name": "Presidio Pkwy.", "is_bridge": True, "sort_key": 443}) #https://www.openstreetmap.org/way/59801274 assert_has_feature( 18, 41885, 101...
#! /usr/bin/env python import math class Shooter: def __init__(self, offset, xpos, dpi, comms, n, field = [22.3125, 45], hit_default = True): self.offsetpx = offset self.xpospx = xpos self.leftdeg = 0 self.centerdeg = 45 self.rightdeg = 90 self.theta = 45 s...
import os import mimetypes import warnings try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.exceptions import ImproperlyConfigured try: ...
import serial import Queue import threading DEBUG = True # Frame markers #STX = 'x' #ETX = 'y' STX = '\x02' ETX = '\x03' # Delivery control #ACK = 'q' #NACK = 'r' ACK = '\x06' NACK = '\x15' # Keep-alive #ENQ = 'w' #DC4 = 'v' ENQ = '\x05' DC4 = '\x14' # Allowed command characters CHROK = ...
"""Armature and armature animation export classes. @author Michael Reimpell """ # Copyright (C) 2005 Michael Reimpell # # This library 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 # versi...
import time import urllib3 import threading import dropbox from dropbox.session import DropboxSession from dropbox.client import DropboxClient from onitu.plug import Plug from onitu.plug import DriverError, ServiceError from onitu.escalator.client import EscalatorClosed # Onitu has a unique set of App key and secret...
# -*- coding: utf-8 -*- u""" Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U. This file is part of Toolium. 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...
from .auth.models import UserPermissionList, GroupList, \ GroupPermissionList from .auth.utils import update_permissions_user, \ update_user_groups, update_permissions_group from django import forms from django.conf import settings from django.contrib import admin from django.contrib.auth.admin import UserAdm...
from sqlalchemy.test.testing import assert_raises, assert_raises_message from sqlalchemy import Integer, String, ForeignKey, Sequence, exc as sa_exc from sqlalchemy.test.schema import Table, Column from sqlalchemy.orm import mapper, relation, create_session, class_mapper, backref from sqlalchemy.orm import attributes,...
# -*- coding: utf-8 -*- import uuid from psycopg2.extensions import register_adapter from django.db.models import Field, SubfieldBase from django.utils import six try: from django.utils.encoding import force_bytes except ImportError: # django < 1.5 from django.utils.encoding import smart_str as force_by...
""" The ``numba.core.event`` module provides a simple event system for applications to register callbacks to listen to specific compiler events. The following events are built in: - ``"numba:compile"`` is broadcast when a dispatcher is compiling. Events of this kind have ``data`` defined to be a ``dict`` with the f...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """The fsl module provides classes for interfacing with the `FSL <http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This was written to work with FSL version 4.1.4. Change directory to p...
from struct import Struct from collections import namedtuple _display_text_format = Struct( '>H' # CMSG 'H' # DU.NO 'H' # TYPE 'H' # MODE ) _display_text_tuple = namedtuple( 'display_text', 'prompt_customer, expects_input, text' ) def pack_display_text(text, *, prompt_customer=False, expects...
""" CanICA """ # Author: ALexandre Abraham, Gael Varoquaux, # License: BSD 3 clause import copy import numpy as np from scipy import linalg, stats from sklearn.base import TransformerMixin from sklearn.decomposition import fastica from sklearn.externals.joblib import Memory from sklearn.utils import check_random_sta...