code
stringlengths
1
199k
from gpu import * LAMP_TYPES = [ GPU_DYNAMIC_LAMP_DYNVEC, GPU_DYNAMIC_LAMP_DYNCO, GPU_DYNAMIC_LAMP_DYNIMAT, GPU_DYNAMIC_LAMP_DYNPERSMAT, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNCOL, GPU_DYNAMIC_LAMP_DISTANCE, GPU_DYNAMIC_LAMP_ATT1, GPU_DYNAMIC_...
from django.http import HttpResponse REDIRECT_HEADER_KEY = 'Redirect-Location' class HttpResponseJavascriptRedirect(HttpResponse): ''' Sends a regular HTTP 200 OK response that contains Javascript to redirect the browser: <script>window.location.assign("...");</script>. If redirect_to is empty, ...
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.ya...
import gsxws from django.db.models import Q from django.contrib import messages from django.core.cache import cache from django.shortcuts import render, redirect, get_object_or_404 from django.utils.translation import ugettext as _ from django.template.defaultfilters import slugify from django.views.decorators.cache im...
""" Compute the force of gravity between the Earth and Sun. Copyright 2012, Casey W. Stark. See LICENSE.txt for more information. """ from dimensionful import G, Quantity mass_earth = Quantity(5.9742e27, "g") mass_sun = Quantity(1.0, "Msun") distance = Quantity(1.0, "AU") force_gravity = G * mass_earth * mass_sun / dis...
from __future__ import unicode_literals, print_function from django.db import migrations idDistributionMap = { 80: {'normalMean': 3450, 'normalStDev': 125}, 133: {'normalMean': 3350, 'normalStDev': 75}, 134: {'normalMean': 2350, 'normalStDev': 50}, 135: {'normalMean': 3500, 'normalStDev': 100}, 81: ...
r""" This module contains linear algebra solvers for SparseMatrices, TPMatrices and BlockMatrices. """ import numpy as np from numbers import Number, Integral from scipy.sparse import spmatrix, kron from scipy.sparse.linalg import spsolve, splu from scipy.linalg import solve_banded from shenfun.config import config fro...
from __future__ import absolute_import import math import numpy as np from matplotlib import pylab as plt from matplotlib import rcParams from six.moves import range __author__ = 'noe, marscher' def _fruchterman_reingold(A, dim=2, k=None, pos=None, fixed=None, iterations=50, hold_dim=None): ...
from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ Test file created by XlsxWriter against a file created by Excel. """ def setUp(self): self.maxDiff = None filename = 'chart_chartarea01.xlsx' ...
""" ***************************** NOTE that this is a modified version from web2py 2.8.2. For full details on what has changed, see https://github.com/OpenTreeOfLife/opentree/commits/master/custom_import.py This file was patched (by jimallman, on 10/10/2017) to restore working python imports. See the problems and solu...
"""income_tract.py Extract the household income per tract for each cbsa, using the crosswalk between CBSA and Tracts. """ import csv import os income_rows = [5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35] tr_to_cbsa = {} with open('data/crosswalks/cbsa_tract.txt', 'r') as source: reader = csv.reader(source, delimite...
class TschunkMap1(): #(TschunkMap): def __init__(self): self.img = 'img/map1.png' self.figure = 'todo' self.rows = 15 self.cols = 7 self.origin_x = 1 self.origin_y = 13 self.initial_direction = (0, -1)
from collections import OrderedDict import os.path import shutil import pytest from edalize import get_edatool tests_dir = os.path.dirname(__file__) class TestFixture: """A fixture that makes an edalize backend with work_root directory Create this object using the make_edalize_test factory fixture. This passes ...
import inviwo import math import time start = time.clock() scale = 1; d = 15 steps = 120 for i in range(0, steps): r = (2 * 3.14 * i) / steps x = d*math.sin(r) z = -d*math.cos(r) inviwo.setPropertyValue("EntryExitPoints.camera",((x*scale,3*scale,z*scale),(0,0,0),(0,1,0))) for i in range(0, steps): r = (2...
from twython import Twython from django.conf import settings from .base import BaseSource class TwitterSource(BaseSource): def __init__(self, uid=None, screen_name=None): if uid is None and screen_name is None: raise ValueError self.uid = uid self.screen_name = screen_name de...
import logging from ..calling_conventions import SYSCALL_CC from ..errors import AngrUnsupportedSyscallError from ..procedures import SIM_PROCEDURES as P from .simos import SimOS _l = logging.getLogger('angr.simos.userland') class SimUserland(SimOS): """ This is a base class for any SimOS that wants to support ...
from setuptools import setup, Extension setup(name="andrnx", version="0.1", description="Package to convert from GNSS logger to Rinex files", author='Miquel Garcia', author_email='info@rokubun.cat', url='https://www.rokubun.cat', packages=['andrnx'], test_suite="andrnx.test", ...
from user import * from event import *
import sys sys.path.append(".") from linear.common.coordinator import Coordinator import linear.twopc.config as config if len(sys.argv) != 3: raise RuntimeError("Invalid arguments. Call like this <name> <num_partitions>") coordinator = Coordinator(sys.argv[1], int(sys.argv[2]), config.COORDINATOR_PORT, config.COORDI...
import messagebird import argparse parser = argparse.ArgumentParser() parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True) parser.add_argument('--webhookId', help='webhook that you want to read', type=str, required=True) args = vars(parser.parse_args()) try: client = me...
import psidialogs s = psidialogs.choice(["1", "2", "3"], "Choose a number!") if s is not None: print(s)
__all__ = [ 'ClusterMembersResponse', 'ContextsResponse', 'StatusResponse' ] from .ClusterMembersResponse import ClusterMembersResponse from .ContextsResponse import ContextsResponse from .StatusResponse import StatusResponse
from __future__ import absolute_import, print_function import numpy as np import warnings def _bit_length_26(x): if x == 0: return 0 elif x == 1: return 1 else: return len(bin(x)) - 2 try: from scipy.lib._version import NumpyVersion except ImportError: import re string_ty...
from .decorators import render_to_json from .helper import HeadFileUploader, ImageFactory, BaseModelManager, get_first_letter, convertjson
import logging from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext as _ from vkontakte_api.models import VkontakteManager, VkontaktePKModel from ....
from __future__ import division, print_function, absolute_import __all__ = ['fmin', 'fmin_powell', 'fmin_bfgs', 'fmin_ncg', 'fmin_cg', 'fminbound', 'brent', 'golden', 'bracket', 'rosen', 'rosen_der', 'rosen_hess', 'rosen_hess_prod', 'brute', 'approx_fprime', 'line_search', 'check_grad',...
""" Custom Authenticator to use generic OAuth2 with JupyterHub """ import base64 import os from urllib.parse import urlencode from jupyterhub.auth import LocalAuthenticator from tornado.httpclient import AsyncHTTPClient from tornado.httpclient import HTTPRequest from tornado.httputil import url_concat from traitlets im...
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from django.contrib import messages from .models import Profile from .forms import ProfileForm @login_required def profile_edit(request): next = request.GET.get("next") profile, created = Profile.objects.get_...
from setuptools import setup, find_packages from codecs import open from os import path import re import ast here = path.abspath(path.dirname(__file__)) _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('radmyarchive/__init__.py', 'rb') as vf: version = str(ast.literal_eval(_version_re.search( v...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sms', '0003_add_backend_models'), ] operations = [ migrations.CreateModel( name='SQLIVRBackend', fields=[ ], options={ 'proxy': True, ...
from h5py import tests from h5py import * class TestCreate(tests.HTest): def setUp(self): self.fid, self.name = tests.gettemp() def tearDown(self): import os self.fid.close() os.unlink(self.name) @tests.require(api=18) def test_create_anon(self): """ (H5D) Anonymo...
''' Script to convert the raw data and to plot all histograms''' from __future__ import division import logging import warnings import os import multiprocessing as mp from functools import partial from matplotlib.backends.backend_pdf import PdfPages import tables as tb from tables import dtype_from_descr, Col import nu...
__revision__ = "$Id$" __all__ = ['metadata', 'setup'] from distutils.core import setup from distutils import version from warnings import warn import re import os import sys import glob if __name__ == '__main__': StrictVersion = version.StrictVersion class NotSoStrictVersion (StrictVersion): def parse (...
from __future__ import absolute_import class Newsletter(object): __all__ = ('is_enabled', 'get_subscriptions', 'update_subscription', 'create_or_update_subscription') DEFAULT_LIST_ID = 1 enabled = False def is_enabled(self): return self.enabled def get_subscriptions(self, user...
from django.contrib.auth.backends import ModelBackend class Sha256Backend(ModelBackend): """Overriding the Django model backend without changes.""" pass
from PyQt4 import QtCore, QtGui class Ui_highlowDialog(object): def setupUi(self, highlowDialog): highlowDialog.setObjectName("highlowDialog") highlowDialog.resize(352, 128) self.buttonBox = QtGui.QDialogButtonBox(highlowDialog) self.buttonBox.setGeometry(QtCore.QRect(0, 70, 341, 32)...
import logging import pymongo import emission.net.usercache.abstract_usercache as enua import emission.core.get_database as edb import emission.core.wrapper.trip as ecwt import emission.core.wrapper.section as ecws import emission.core.wrapper.stop as ecwst import emission.storage.decorations.timeline as esdt def creat...
import sys import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.coverage', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'DyNe' copyright = u'2016, Ankit Khambhati' author = u'Ankit Khambhati' version = u'0.5' rele...
""" Simple script to help create files needed to make a sphinx documentation website of the flopy project. The script will read through all of the flopy modules and create the sphinx autodoc rst (restructured text) files. """ import os print(os.getcwd()) flopypth = os.path.join('..', '..', '..', 'flopy3fork.git', 'flo...
from django.db import migrations from corehq.apps.smsbillables.management.commands.bootstrap_gateway_fees import ( bootstrap_pinpoint_gateway, ) def add_pinpoint_gateway_fee_for_migration(apps, schema_editor): bootstrap_pinpoint_gateway(apps) class Migration(migrations.Migration): dependencies = [ (...
import os import sys import imp import logging from collections import namedtuple """ Objects used to configure Glue at runtime. """ __all__ = ['Registry', 'SettingRegistry', 'ExporterRegistry', 'ColormapRegistry', 'DataFactoryRegistry', 'QtClientRegistry', 'LinkFunctionRegistry', 'LinkHelperRegis...
import itertools import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mypage.pages.models import Page, Widget from mypage.rsswidgets.models import RSSWidget from mypage.rsswidgets.forms import RSSCreationConfigForm log = logging.getLogger(...
from typing import ( IO, Any, BinaryIO, Iterable, Optional, TextIO, Union, Type, cast, overload, Generator, Tuple, ) import logging from warnings import warn import random from rdflib.namespace import Namespace, RDF from rdflib import plugin, exceptions, query, namespace ...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url from django.views.i18n import javascript_catalog from wagtail.wagtailadmin import urls as wagtailadmin_urls from wagtail.wagtailcore import urls as wagtail_urls from privagal.core import urls as privagalco...
import re import random import hashlib from django.db import models SHA1_RE = re.compile('^[a-f0-9]{40}$') class RegistrationManager(models.Manager): """Custom manager for the ``RegistrationProfile`` model. The methods defined here provide shortcuts for account creation and activation (including generation ...
from django.conf import settings from csp.utils import build_policy class CSPMiddleware(object): """ Implements the X-Content-Security-Policy response header, which conforming user-agents can use to restrict the permitted sources of various content. See https://wiki.mozilla.org/Security/CSP/Specific...
import math import m5 from m5.objects import * from m5.defines import buildEnv from Ruby import create_topology from Ruby import send_evicts class L1Cache(RubyCache): pass def define_options(parser): return def create_system(options, full_system, system, dma_ports, ruby_system): if buildEnv['PROTOCOL'] != 'MI_e...
from traitsui.qt4.ui_live import *
from __future__ import annotations # isort:skip import pytest ; pytest from bokeh.core.properties import Int, List, String from bokeh.models import * # NOQA from bokeh.models import CustomJS from bokeh.plotting import * # NOQA from bokeh.document import document # isort:skip from bokeh.model import Model # isort:skip...
"""Drivers for Anritsu instrument using VISA library. """ import re from textwrap import fill from inspect import cleandoc from visa import VisaTypeError from ..driver_tools import (InstrIOError, secure_communication, instrument_property) from ..visa_tools import VisaInstrument class Anritsu...
from __future__ import unicode_literals import json import mimetypes import os import re import sys from copy import copy from importlib import import_module from io import BytesIO from django.conf import settings from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import ISO_8859_1, UTF_8,...
from __future__ import division """ Centralized database access for the American Gut web portal """ import logging from uuid import UUID import psycopg2 import bcrypt import numpy as np import pandas as pd import random import string from amgut.lib.data_access.sql_connection import TRN KIT_ALPHA = "abcdefghjkmnpqrstuvw...
from django.db import models from django.utils.translation import ugettext_lazy as _, pgettext_lazy class ContentBase(models.Model): """ Base class for models that share content attributes The attributes added by this mixin are ``title``, ``description``, ``content`` and ``is_visible``. Attributes: ...
from sklearn2sql_heroku.tests.classification import generic as class_gen class_gen.test_model("RidgeClassifier" , "FourClass_100" , "oracle")
"""Dump instances for bunny, in Promela and SlugsIn.""" import argparse import itertools import pprint import logging import re from tugs import utils log = logging.getLogger(__name__) INPUT_FILE = 'bunny.pml' PROMELA_PATH = 'pml/bunny_many_goals_{i}.txt' SLUGSIN_PATH = 'slugsin/bunny_many_goals_{i}.txt' def dump_prome...
""" Business logic - gets request in from Slack, does stuff, sends requests back to Slack. Notes for developers who want to add or change functionality: You're in the right module. * If you were to run this behind a server (Flask would work well) instead of behind AWS Lambda, it would be quite easy. Make your s...
import sys, Tkinter, tkFont, ttk sys.path.insert(0, "./src/") import button, database from config import * def AuxscrollFunction(event): bg_canvas.configure(scrollregion=bg_canvas.bbox("all"), height=THUMB_HEIGHT) root = Tkinter.Tk() root.geometry(str(WINDOW_WIDTH)+"x"+str(WINDOW_HEIGHT)+"+100+100") root.minsize(wi...
import numpy as np import bs t = bs.common_types.table () n_rows = 10 n_cols = 5 t.init (n_rows, n_cols); for i in xrange (n_cols): t.set_col_name (i, "Col " + str (i)) a = np.linspace (float (i), float (i + 1), n_rows) t.set_col_values (i, a) print t
from microscopes.mixture.definition import model_definition from microscopes.models import bb, niw from nose.tools import ( assert_equals, assert_is_not, ) import pickle import copy def test_model_definition_pickle(): defn = model_definition(10, [bb, niw(3)]) bstr = pickle.dumps(defn) defn1 = pickle...
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' verbose_name = "Usuarios"
SECRET_KEY = 'not-anymore' LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = False DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', } } INSTALLED_APPS = [ 'reverse_unique', 'reverse_unique_tests', ]
""" Hiveary https://hiveary.com Licensed under Simplified BSD License (see LICENSE) (C) Hiveary, Inc. 2013-2014 all rights reserved """ import platform import sys from hiveary import __version__ as version current_platform = platform.system() FROZEN_NAME = 'hiveary-agent' AUTHOR = "Hiveary" AUTHOR_EMAIL = "info@hiveary...
def extractToomtummootstranslationsWordpressCom(item): ''' Parser for 'toomtummootstranslations.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', ...
"""Error Injection EINJ module.""" from __future__ import print_function import acpi import bits import contextlib from cpudetect import cpulib import ctypes import functools import ttypager globals().update(map(reversed, acpi._error_injection_action.iteritems())) globals().update(map(reversed, acpi._error_injection_in...
from __future__ import absolute_import import inspect import itertools import random import warnings import numpy as np from .gd import GradientDescent from .bfgs import Lbfgs from .cg import NonlinearConjugateGradient from .rprop import Rprop from .rmsprop import RmsProp from .adadelta import Adadelta from .adam impor...
"""A git-command for integrating reviews on Rietveld.""" from distutils.version import LooseVersion import base64 import glob import json import logging import optparse import os import Queue import re import stat import sys import textwrap import threading import urllib2 import urlparse import webbrowser import zlib t...
from os.path import join, isdir from shutil import rmtree from tarfile import open as taropen from tempfile import mkdtemp from os import environ from traceback import format_exc from moi.job import system_call from qiita_db.artifact import Artifact from qiita_db.logger import LogEntry from qiita_core.qiita_settings im...
import base64, re, traceback, os, string, subprocess from prompt_toolkit import PromptSession from prompt_toolkit.history import FileHistory from prompt_toolkit.auto_suggest import AutoSuggestFromHistory from prompt_toolkit.styles import Style from poshc2.client.Alias import cs_alias, cs_replace from poshc2.Colours imp...
"""Grabber for collecting data""" import urllib2 from random import sample from veliberator.settings import PROXY_SERVERS class Grabber(object): """Url encapsultation for making request throught HTTP""" page = None data = None def __init__(self, url, proxies=PROXY_SERVERS): """Init the grabber""...
import os import numpy as np import torch from ..core import FaceDetector class FolderDetector(FaceDetector): '''This is a simple helper module that assumes the faces were detected already (either previously or are provided as ground truth). The class expects to find the bounding boxes in the same f...
''' This mission is the part of the set. Another one - Caesar cipher decriptor. Your mission is to encrypt a secret message (text only, without special chars like "!", "&", "?" etc.) using Caesar cipher where each letter of input text is replaced by another that stands at a fixed distance. For example ("a b c", 3) == ...
from django.conf import settings from django.contrib.auth.models import AnonymousUser from threading import local USER_ATTR_NAME = getattr(settings, 'LOCAL_USER_ATTR_NAME', '_current_user') _thread_locals = local() def _do_set_current_user(user_fun): setattr(_thread_locals, USER_ATTR_NAME, user_fun.__get__(user_fun...
from __future__ import absolute_import import os import zmq import uuid as uuid_pkg import time import binascii import random import socket import struct import marshal import mmap from multiprocessing import Manager, Condition from mmap import ACCESS_WRITE, ACCESS_READ from dpark.utils.log import get_logger from dpark...
from traits.adaptation.api import reset_global_adaptation_manager from traits.api import HasTraits, Instance, List, register_factory, TraitError from traits.testing.unittest_tools import unittest class Foo(HasTraits): pass class Bar(HasTraits): pass def bar_to_foo_adapter(bar): return Foo() class FooContain...
""" Base class for ensemble-based estimators. """ import multiprocessing import numpy as np from ..base import clone from ..base import BaseEstimator from ..base import MetaEstimatorMixin class BaseEnsemble(BaseEstimator, MetaEstimatorMixin): """Base class for all ensemble classes. Warning: This class should no...
""" Batch processors These commands implements the 'batch-command' and 'batch-code' processors, using the functionality in src.utils.batchprocessors. They allow for offline world-building. Batch-command is the simpler system. This reads a file (*.ev) containing a list of in-game commands and executes them in sequence a...
from base64 import b64decode import json from lxml import etree from os.path import dirname, join, exists import unittest from xml.dom.minidom import parseString from onelogin.saml2 import compat from onelogin.saml2.constants import OneLogin_Saml2_Constants from onelogin.saml2.settings import OneLogin_Saml2_Settings fr...
""" analytics.models Models for Demand and Supply data :copyright: (c) 2013 by Openlabs Technologies & Consulting (P) Limited :license: see LICENSE for more details. """ import operator from django.db import models import django.contrib.admin from admin.models import Occupation, Institution, Company, Su...
"""Helpers for code generation based on genshi [0] There are good code generator tools out there like cog [1]. But if you already use genshi in your project this module might help you integrating code generation into your build and deploy process using familar templating syntax. If you're not using genshi you probably ...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import json import bson.json_util as bju import emission.core.get_database as...
def extractSpearpointtranslationsHomeBlog(item): ''' Parser for 'spearpointtranslations.home.blog' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('Record of the Missing Sect Master', 'Record...
""" Dynamic factor model Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function from warnings import warn from statsmodels.compat.collections import OrderedDict import numpy as np import pandas as pd from .kalman_filter import KalmanFilter, FilterResults from .m...
import os import sys thispath = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(thispath),"helper")) from MiscFxns import * from StandardModules import * import pulsar_psi4 def ApplyBasis(syst,bsname,bslabel="primary"): return psr.system.apply_single_basis(bslabel,bsname,...
import unittest from pecan_swagger import utils class TestUtils(unittest.TestCase): def test_swagger_build(self): from .resources import example_app expected = { "swagger": "2.0", "info": { "version": "1.0", "title": "example_app" ...
'''Morphometrics functions for neurons or neuron populations''' import math import numpy as np from neurom.geom import bounding_box from neurom.core.types import NeuriteType from neurom.core.types import tree_type_checker as is_type from neurom.core.dataformat import COLS from neurom.core._neuron import iter_neurites, ...
import collections import json as jsonlib import os import random import re from operator import attrgetter from urlparse import urljoin from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.forms import CheckboxInput from django.template import defaultfilters, loader from d...
from django.db import models from django.contrib.auth.models import User class OdooUser(models.Model): user = models.OneToOneField(User) odoo_id = models.BigIntegerField(primary_key=True) username = models.CharField(max_length=256)
import pytest from django.conf import settings from django.contrib.auth.models import AnonymousUser from mock import MagicMock, Mock from prices import Price from saleor.checkout import views from saleor.checkout.core import STORAGE_SESSION_KEY, Checkout from saleor.shipping.models import ShippingMethodCountry from sal...
from __future__ import absolute_import from django.core.files.base import ContentFile from sentry.models import File, FileBlob from sentry.testutils import TestCase class FileBlobTest(TestCase): def test_from_file(self): fileobj = ContentFile("foo bar") my_file1 = FileBlob.from_file(fileobj) ...
from django.test import TestCase from django.urls import reverse from .utils import add_default_data from petition.models import PytitionUser, Permission, Organization, Petition class DelSlugViewTest(TestCase): """Test del_slug view""" @classmethod def setUpTestData(cls): add_default_data() def ...
from django.views.generic import ListView, DetailView from django.core.exceptions import ObjectDoesNotExist from competition.models.competition_model import Competition class CompetitionListView(ListView): """Lists every single competition""" context_object_name = 'competitions' model = Competition temp...
RAWDATA_DIR = '/home/cmb-06/as/skchoudh/dna/Oct_10_2016_HuR_Human_Mouse_Liver/rna-seq/Penalva_L_08182016/human' OUT_DIR = '/staging/as/skchoudh/Oct_10_2016_HuR_Human_Mouse_Liver/RNA-Seq_human' SRC_DIR = '/home/cmb-panasas2/skchoudh/github_projects/re-ribo/scripts' GENOME_FASTA = '/home/cmb-panasas2/skchoudh/genomes/hg3...
""" Tests for django-registration's built-in views. """ from django.core.urlresolvers import reverse from django.test import override_settings, TestCase from ..models import RegistrationProfile @override_settings(ROOT_URLCONF='registration.tests.urls') class ActivationViewTests(TestCase): """ Tests for aspects ...
from __future__ import absolute_import import six import pytest import base64 from sentry.utils.compat import mock from exam import fixture from six.moves.urllib.parse import urlencode, urlparse, parse_qs from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from sen...
""" A script for testing / benchmarking HMM Implementations """ import argparse import collections import logging import time import hmmlearn.hmm import numpy as np import sklearn.base LOG = logging.getLogger(__file__) class Benchmark: def __init__(self, repeat, n_iter, verbose): self.repeat = repeat ...
import m5 from m5.objects import * m5.util.addToPath('../configs/common') import FSConfig class L1(BaseCache): hit_latency = '1ns' response_latency = '1ns' block_size = 64 mshrs = 4 tgts_per_mshr = 8 is_top_level = True class L2(BaseCache): block_size = 64 hit_latency = '10ns' respon...
import os import json class TermiteCore: def __init__( self, request, response ): self.request = request self.response = response def GetConfigs( self ): def GetServer(): return self.request.env['HTTP_HOST'] def GetDataset(): return self.request.application def GetModel(): return self.request.contr...
from .common import * # noqa LANGUAGE_CODE = 'nb'
import base64 import inspect import json import logging import requests import types from django.conf import settings from django.core.management import call_command from django_nose import FastFixtureTestCase from functools import wraps from mock import patch from tastypie.test import ResourceTestCase, TestApiClient f...
from hq.models import Domain from xformmanager.models import FormDataColumn, FormDataGroup, FormDataPointer from xformmanager.manager import * from xformmanager.storageutility import StorageUtility from receiver.models import Submission, Attachment from receiver.tests.util import * import logging def clear_data(): ...