text
stringlengths
17
737k
import logging import sys from functools import partial from django.http import HttpResponse, Http404, HttpResponseBadRequest, HttpResponseForbidden from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from mitxmako.shortcuts import render_to_response from xmodule_mod...
import hashlib import os import random import shutil import errno import fcntl # import data_operations.data_generators import sys import mmap from utils import shell_utils sys.path.append('/qa/dynamo') from config import error_codes __author__ = "samuels" MAX_DIR_SIZE = 128 * 1024 INLINE = INLINE_MAX_SIZE = 3499...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from elasticsearch.client.utils import _make_path, _escape, query_params from elasticsearch.compat import PY2 from ..test_cases import TestCase, SkipTest class TestQueryParams(TestCase): def setUp(self): self.calls = [] @query_params("...
# -*- coding: utf-8 -*- # try something like @cache(request.env.path_info,time_expire=60,cache_model=cache.ram) #@auth.requires_membership(role="manager") def index(): query = (db.activity.status=='accepted') & \ (db.auth_user.id==db.activity.created_by) query &= db.activity.scheduled_datetime != N...
# # Created as part of the StratusLab project (http://stratuslab.eu), # co-funded by the European Commission under the Grant Agreement # INFSO-RI-261552." # # Copyright (c) 2011, SixSq Sarl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005-2009 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...
from sspam import simplifier xor5c = """ cse0Add0 = ((x * 229) + 247) cse3Add3 = (((cse0Add0 * 237) + 214) + (((cse0Add0 * 38) + 85) & 254)) cse0Add5 = (((cse3Add3 + (((-1 * (cse3Add3 * 2)) + 255) & 254)) * 3) + 77) cse0Add7 = ((((((cse0Add5 * 86) + 36) & 70) * 75) + (cse0Add5 * 231)) + 118) cse0Add9 = (((((cse0Add7 *...
"""Contains the code generation logic and helper functions.""" from __future__ import unicode_literals, division, print_function, absolute_import from collections import defaultdict from keyword import iskeyword import inspect import sys import re from sqlalchemy import (Enum, ForeignKeyConstraint, PrimaryKeyConstrain...
"""The tests for the WUnderground platform.""" import unittest from homeassistant.components.sensor import wunderground from homeassistant.const import TEMP_CELSIUS from homeassistant import core as ha VALID_CONFIG_PWS = { 'platform': 'wunderground', 'api_key': 'foo', 'pws_id': 'bar', 'monitored_condi...
#!/usr/env/python """ See LICENSE file for copyright and license details. """ """ Unit test for calculator_finance.py """ import calculator_finance import unittest from decimal import Decimal, getcontext from function import * from modules.constant import * import sys class TestValues(unittest.TestCase): """ ...
from django.core.urlresolvers import reverse from django.test import TestCase from users.models import OFMUser class AccountSettingsTestCase(TestCase): def setUp(self): self.user = OFMUser.objects.create_user( username='temporary', email='temporary@ofmhelper.com', pass...
from django.contrib import admin from django.contrib.auth.models import User from lostnfound.models import Item # Register your models here. admin.site.register(Item)
from subprocess import check_output import zipfile import os import os.path from os.path import join import sys import shutil import argparse parser = argparse.ArgumentParser(description="Release packaging script") parser.add_argument("--release", dest="release", action="store_const", const=True, default=Fals...
from copy import deepcopy from django import forms from django.utils.datastructures import SortedDict from django.utils.text import capfirst from filter.filters import Filter, CharFilter, BooleanFilter def get_declared_filters(bases, attrs, with_base_filters=True): filters = [] for filter_name, obj in attrs....
import os import sys import warnings import ConfigParser # ConfigParser is not a virtualenv module, so we can use it to find the stdlib dirname = os.path.dirname distutils_path = os.path.join(os.path.dirname(ConfigParser.__file__), 'distutils') if os.path.normpath(distutils_path) == os.path.dirname(os.path.normpath(...
import flask from flask.views import MethodView from sqlalchemy import and_ from sqlalchemy.exc import IntegrityError from sqlalchemy.orm.exc import NoResultFound from werkzeug.exceptions import NotFound from .authentication import NoOpAuthentication from .authorization import NoOpAuthorization from .exceptions import...
from py2neo import * gr=Graph(host="localhost",password="XXXyour passXXX",user="neo4j") """gr=Graph(password="XXXyour passXXXX")""" #will also do as only authentication is required gr.run("merge (someone:masterchef{name:'someone',city:'chandigarh',age:22})") #your...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
# -*- coding: utf-8 -*- from __future__ import division # this program detects word anomaly using z-test for proportion and kruskal wallis test # assume the possibility of a particular word appear in a text follows normal distribution from math import sqrt from operator import itemgetter import itertools import ope...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
import theano from theano import tensor as T from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from theano.tensor.signal import pool from theano.tensor.nnet import conv3d2d from theano.printing import Print try: import theano.sparse as th_sparse_module except ImportError: th_sparse_module = ...
import pytest from cumulusci.core.exceptions import TaskOptionsError from cumulusci.tasks.salesforce.tests.util import create_task from cumulusci.tasks.metadata_etl.help_text import SetFieldHelpText from cumulusci.utils.xml import metadata_tree # Custom Object with 2 custom fields with all elements present OBJECT_XML...
#!/usr/bin/python # -*- coding: utf-8 -*- import os import scraperwiki import scrape.patch as Patcher import scrape.scrape as Scraper from utilities.format import item from utilities.db import CleanTable, StoreRecords from scrape.export import ExportDatasets,ExportResources def Collect(): '''Scrapes and stores dat...
""" :codeauthor: Gareth J. Greenaway <ggreenaway@vmware.com> """ import os import pytest import salt.modules.pkg_resource as pkg_resource import salt.modules.zypperpkg as zypper from tests.support.mock import MagicMock, patch @pytest.fixture def configure_loader_modules(): return {zypper: {"rpm": None}, pk...
""" MongoEngine models for Social Auth Requires MongoEngine 0.6.10 """ try: from django.contrib.auth.hashers import UNUSABLE_PASSWORD _ = UNUSABLE_PASSWORD # to quiet flake except (ImportError, AttributeError): UNUSABLE_PASSWORD = '!' from django.db.models import get_model from django.utils.importlib imp...
#!/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. """Fetch the latest results for a pre-selected set of builders we care about. If we find a 'good' revision -- based on criteria exp...
#!/usr/bin/env python # -*- coding: utf-8 -*- """fMRI preprocessing workflow.""" import os import re from pathlib import Path import logging import sys import gc import uuid import warnings import json from argparse import ArgumentParser from argparse import ArgumentDefaultsHelpFormatter from multiprocessing import cp...
import abc from http import HTTPStatus from typing import Union, List import re from mediawords.db import DatabaseHandler from mediawords.key_value_store import KeyValueStore from mediawords.key_value_store.postgresql import PostgreSQLStore from mediawords.util.parse_json import decode_json, encode_json from mediawor...
# coding=utf-8 # Copyright 2020 The Meta-Dataset 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) Facebook, Inc. and its affiliates. All Rights Reserved # # This source code is licensed in accordance with the terms specified in # the LICENSE file found in the root directory of this source tree. load( "//tools/build_defs/oss/osquery:cxx.bzl", _osquery_cxx_library = "osquery_cxx_library", ...
import os import urllib from google.appengine.api import users from google.appengine.api import mail from google.appengine.ext import ndb from logging import info import jinja2 import webapp2 import datetime import re from ics import Calendar,Event # model layer DEFAULT_BUCKET_NAME = 'current_appointments' ARCHI...
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio 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 versio...
#!/usr/bin/env python '''Base module components.''' import numpy as np import copy from collections import OrderedDict import itertools import six import inspect __all__ = ['BaseTransformer', 'Pipeline', 'Union'] class BaseTransformer(object): '''The base class for all transformation objects. This class imp...
#!/usr/bin/env python2.7 # # ---------------------------------------------------------------------------------------------------- # # Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redis...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html { "name": "Brazilian Localization Account", "category": "Localisation", "license": "AGPL-3", "author": "Akretion, Odoo Community Association (OCA)", "website": "https://github.com/OC...
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # # THIS THREADING MODULE IS PERMEATED BY THE pl...
import logging log = logging.getLogger(__name__) from django.shortcuts import ( render, redirect, ) from fuzzywuzzy import process from django.db import IntegrityError from django.contrib import messages from django.db.models import Q from apps.api.models import ( Group, Song, Person, Duplica...
#Author :dennis <killme2008@gmail.com> #Description: a python client for metaq "A metamorphosis client for python" import socket import struct import sys import time import threading from zkclient import ZKClient, zookeeper, watchmethod from urlparse import urlparse from threading import Timer _DEAD_RETRY = 5 # numb...
# -*- coding: utf8 -*- # Copyright (c) 2017 Anischenko Konstantin Maximovich # 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 # t...
from lxml import etree import sys import pdb from glob import glob import csv import os from os import listdir from os.path import isfile, join import subprocess import base64 import time import re import smtplib import argparse import mimetypes from email.mime.multipart import MIMEMultipart from email import encoders ...
# -*- coding: utf-8 -*- from __future__ import print_function import os, json, sys import logging # logging.basicConfig(level=logging.INFO) import argparse import subprocess as sp import shutil import bisect import itertools import six import difflib import bibtexparser import myref from myref.tools import (bcolors, ...
from bs4 import BeautifulSoup EN = ( { 'variable': 'congressperson_name', 'name': 'Congressperson Name', 'desc': """Name used by the congressperson during his term in office. Usually it is composed by two elements: a given name and a family name; two given names; or...
import appdaemon.plugins.hass.hassapi as hass import datetime import re import random # # App to simulate occupancy in an empty house # __version__ = "1.1.5" class OccuSim(hass.Hass): def initialize(self): if "test" in self.args and self.args["test"] == "1": self.test = True else: ...
from __future__ import unicode_literals import json from gensim.models.phrases import Phrases from textblob import TextBlob # from gensim: threshold represents a threshold for forming the phrases (higher means fewer phrases). # A phrase of words a and b is accepted if (cnt(a, b) - min_count) * N / (cnt(a) * cnt(b)) >...
#!/usr/bin/python #FFXIV Macro Extractor #Copyright Arthur Moore 2015 #BSD 3 Clause License from __future__ import print_function from struct import * import os import sys in_file_name = "MACRO.DAT" #After a 0x11 byte header, the macro entries begin. All macro entries are XOR encoded with 0x73. #Exclusive or each b...
# coding=utf-8 # (The line above is necessary so that I can use 世界 in the # *comment* below without Python getting all bent out of shape.) # Copyright 2007-2009 Google 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 o...
""" This module contains everything related to network topology processing """ from collections import defaultdict import heapq from fabric.pqdict import PQDict class Network(object): """ Container for all network state """ def __init__(): self.topo = TopologyDB() self.ip_to_mac = de...
""" The MIT License (MIT) Copyright (c) 2014 Thomas Koch 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, ...
import logging from corehq.apps.app_manager.models import Application, RemoteApp from corehq.apps.data_analytics.models import MALTRow from corehq.apps.domain.models import Domain from corehq.apps.smsforms.app import COMMCONNECT_DEVICE_ID from corehq.apps.sofabed.models import FormData, MISSING_APP_ID from corehq.util...
# articles.py # Article pages for CedarRapidsOnline web service # Copyright (C) 2009 Clear Perception Solutions, LLC. # Written by Trevis J. Rothwell <tjr@gnu.org> # # This file is part of the CedarRapidsOnline web service. # # This program is free software: you can redistribute it and/or modify # it under the terms o...
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------------------------------------------------- # INFO: #----------------------------------------------------------------------------------------------------------------------- """ Author: Evan Hubin...
from __future__ import unicode_literals import logging, os, json import tornado.web import tornado.websocket import handlers from mopidy import config, ext from frontend import IrisFrontend from handlers import WebsocketHandler, HttpHandler from core import IrisCore logger = logging.getLogger(__name__)...
from __future__ import unicode_literals from __future__ import print_function import argparse import os import sys import io import glob import tempfile from moya.compat import text_type from moya.settings import SettingsContainer from moya.console import Console DEFAULT_HOME_DIR = '/etc/moya/' DEFAULT_CONF = """ ...
import logging import time from django.contrib.auth.models import User from django.conf import settings from django.utils import timezone from rest_framework.renderers import JSONRenderer import json from emstrack.tests.util import point2str from login.models import Client, ClientStatus, ClientLog, ClientActivity fr...
#!/usr/bin/env python import numpy as np class NeuralNet(): def __init__(self,hidden_size=4,max_iterations=100000,learning_rate=0.15): """The init method. Arguments: train_in -- Training set inputs (array) train_out -- Training set outputs (array) hidden_size -- How many ne...
def _createDefaultMantidUserConfig(facility='SNS'): # create default Mantid user configuration for DEMO purpose. import os mantid_config_path = os.path.expanduser('~/.mantid/Mantid.user.properties') mantid_user_dir = os.path.dirname(mantid_config_path) if not os.path.exists(mantid_config_path): ...
# -*- coding: utf8 -*- #*************************************************************************** #* * #* Copyright (c) 2009, 2010 * #* Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@fr...
from __future__ import division from cannonball.svg import * from Box2D import * from pyglet.gl import * import math import random class Actor(object): z = 0 def __init__(self, level): self.level = level self.id = None self.body = None self.display_list = glGenLists(1) ...
#!/usr/bin/env python import sys, os import argparse import re from PIL import Image from PIL import ImageFilter import numpy as np from skimage.filter.rank import entropy as _entropy from skimage.morphology import disk from skimage.util import img_as_ubyte HELP_MSG = "Invalid input '{}', see --help for usage error....
# -*- coding: utf-8 -*- """ Created on Wed Aug 06 13:43:55 2014 @author: Jens von der Linden """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from future.builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map,...
## The test runner in here is for running the Djangae test suite itself. Projects using Djangae ## should either use djangae.test.DjangaeDiscoverRunner or if using Nose, use the noseplugin ## both of which will setup and teardown the App Engine testbed for each test import unittest import os import logging from unitt...
import os import fudge import bottle from bottle import static_file from waitless import BottleStaticFileBucket class describe_creating_an_instance: @fudge.patch('os.path.exists') def it_blows_up_if_the_provided_root_dir_is_invalid(self, mock_path_exists): config = {'ROOT_DIR': '/non/existen...
# Copyright 2013 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. """Runs a Swarming task. Downloads all the necessary files to run the task, executes the command and streams results back to the Swarming server. The p...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
# Copyright (C) 2019-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be usefu...
#!/usr/bin/env python # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # Copyright (C) 2013-2016 Hideo Hattori, Steven Myint, Bill Wendling # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files...
# -*- coding: utf-8 -*- # # Copyright © 2007-2008 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it...
import StellarMass import XrayLuminosity import numpy as n from scipy.stats import norm from scipy.integrate import quad from scipy.interpolate import interp1d import glob import astropy.io.fits as fits import os import time import numpy as n import sys print " set up box, and redshift " aexp = 0.74230 z = 1./0.7423...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-18 03:55 from __future__ import unicode_literals from django.db import migrations, connection def load_data(apps, schema_editor): Account = apps.get_model("ledger", "Account") Account(name="Cash", type="asset").save() Account(name="Bank", t...
""" This is the core of FeinCMS All models defined here are abstract, which means no tables are created in the feincms_ namespace. """ from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ImproperlyConfigured from django.db import models from django.template.loader import rend...
# encoding: UTF-8 from django.utils import translation from .translator import Translator from django.conf import settings def tr(label, data = None, description = None, options = {}): return Translator.instance().context.tr(label, data, description, options) def activate(locale): Translator.instance().activa...
""" femagtools.tks ~~~~~~~~~~~~~~ Manage TKS magnetizing curve data files """ import sys import numpy as np import os import re import codecs import femagtools.losscoeffs as lc import femagtools.mcv import json import logging logger = logging.getLogger(__name__) MUE0 = 4e-7*np.pi # 1.2566371E-06 fo =...
import json from cms.utils.page_resolver import get_page_from_request from django.conf import settings from django.http import HttpResponse, JsonResponse from django.views.generic.detail import SingleObjectMixin from django.views.generic.list import MultipleObjectMixin from rest_framework.views import APIView from .c...
from .fields import ListField, SetField, DictField, EmbeddedModelField from django.db import models, connections from django.db.models import Q from django.db.models.signals import post_save from django.db.utils import DatabaseError from django.dispatch.dispatcher import receiver from django.test import TestCase from d...
import os import numpy as np import nengo import nengo.builder import nengo.decoders from nengo.utils import distributions as dists from nengo.utils.compat import is_integer from pacman103.lib import graph, data_spec_gen, lib_map, parameters from pacman103.front.common import enums from . import collections class E...
from __future__ import absolute_import from __future__ import print_function import os import sys import shutil import glob from ._all_keywords import r_keywords from ._py_components_generation import reorder_props # Declaring longer string templates as globals to improve # readability, make method logic clearer to...
from __future__ import print_function import subprocess as sp import sys import shlex import shutil import re import os import glob import time import threading class ModelTestHelper(object): def __init__(self): self.my_path = os.path.dirname(os.path.realpath(__file__)) self.lab_path = os.path....
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 import json import logging import hashlib from hashlib import sha1 from datetime import datetime, timedelta from dateutil.parser import parse from django.utils import timezone from django.db import models from django.db.models impor...
#!/usr/bin/python """Brown Dwarf Flux ratio calculator: Inputs : Star name: Mass of companion in Jupiter masses Age of star: """ from __future__ import division, print_function import argparse import numpy as np from astroquery.simbad import Simbad import pandas as pd from PyAstronomy import pyasl import matplotlib....
""" Compact ACME library. Based on the py3 branch of https://github.com/collinanderson/acme-tiny, which is based on https://github.com/diafygi/acme-tiny. This code is licensed under the MIT license; see LICENSE for details. The original acme-tiny code is Copyright (c) 2015 Daniel Roesler """ import base64 import bi...
#! python3 # Program that can sync all files and folders between two chosen folders. # Dedicated for Windows. # Purpose of that script is to make exact duplicates of two folders. # For example, you can back up and update your backups with this script. # During first sync script assumes all files that do not exist in o...
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
__all__ = ['MENU_TABS']
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. try: import demjson decode = demjson.JSON(strict=True).decode except ImportError: def decode(_string): pass from .utils import replace_ids, replace_ids_builder, to_...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import shutil import requests from splash.tests import ts from splash.tests.utils import TestServers, SplashServer from splash.tests.test_render import BaseRenderTest class BaseFiltersTest(BaseRenderTest): def assertFiltersWork(self, resp, n...
#coding: utf-8 import os import importlib import time import subprocess from glyphNameFormatter import GlyphName, __version__ from glyphNameFormatter.unicodeRangeNames import getAllRangeNames, getRangeByName, rangeNameToModuleName from glyphNameFormatter.data.scriptPrefixes import SCRIPTSEPARATOR, SCRIPTASPREFIX fro...
from django.test import TestCase from django.utils import timezone from model_mommy import mommy from devilry.devilry_group.views.feedbackfeed_admin import AdminFeedbackFeedView from devilry.devilry_group.views.feedbackfeed_examiner import ExaminerFeedbackFeedView from devilry.devilry_group.views.feedbackfeed_student ...
import os import sys import yaml import inspect import io from datetime import datetime from functools import wraps, partial import aniso8601 from werkzeug.contrib.cache import SimpleCache from werkzeug.local import LocalProxy, LocalStack from jinja2 import BaseLoader, ChoiceLoader, TemplateNotFound from flask import ...
# -*- coding: utf-8 -*- import numpy as np from scipy.ndimage.measurements import maximum_position, label, find_objects from scipy.ndimage.morphology import generate_binary_structure from skimage.measure import regionprops from skimage.morphology import opening from candidates import Candidate from utils import find_cl...
#http://pypi.python.org/pypi/cql/1.0.4 #http://code.google.com/a/apache-extras.org/p/cassandra-dbapi2 / #http://cassandra.apache.org/doc/cql/CQL.html from collections import namedtuple import Queue import random import cql import logging from copy import copy from cqlengine.exceptions import CQLEngineException from...
#!/usr/bin/env python def decode(string): print 'Decoding string {}'.format(string) # Strip the start and end quotes string = string[1:-1] print ' Strip quotes: {}'.format(string) # Replace char codes def replace_char_code(matchobject): try: return chr(int(matchobject.group(1), 16)) excep...
from boto.swf.exceptions import SWFResponseError from flowy.spec import RemoteTaskSpec class ActivitySpec(RemoteTaskSpec): def __init__(self, task_id, task_factory, client, task_list, heartbeat, schedule_to_close, schedule_to_start, start_to_close): self._name = task_id.name self...
import numpy as np import nibabel as nb import os import sys import nighresjava from ..io import load_volume, save_volume from ..utils import _output_dir_4saving, _fname_4saving, \ _check_topology_lut_dir, _check_atlas_file, \ _check_available_memory def _get_mgdm_orientation(a...
# -*- coding: utf-8 -*- import numpy as np from scipy.linalg import block_diag as blkdiag class Sample(): u'''Private class containing sample information. Parameters ---------- a : float Unit cell length in angstroms b : float Unit cell length in angstroms c : float ...
from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template from django.conf import settings from userprofile.views import get_profiles urlpatterns = patterns('', # Demo FrontPage$ (r'^$', direct_to_template, {'extra_context': { 'profiles': get_profiles }, 'template': 'f...