text
stringlengths
12
6.59M
import os import datetime import operator import pytest from doit import tools from doit import task def test_create_folder(): def rm_dir(): if os.path.exists(DIR_DEP): os.removedirs(DIR_DEP) DIR_DEP = os.path.join(os.path.dirname(__file__),"parent/child/") rm_dir() assert True ...
# Copyright (c) 2015-2016 Vector 35 LLC # # 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, publish, ...
from AG_fft_tools import correlate2d from agpy import gaussfitter import warnings import numpy as np def cross_correlation_shifts_FITS(fitsfile1, fitsfile2, return_cropped_images=False, quiet=True, sigma_cut=False, **kwargs): """ Determine the shift between two FITS images using the cross-correlation techn...
import os import csv import sys from optparse import make_option from collections import Callable from django.db.models import Q from django.contrib.sites.models import Site from django.db.models.loading import get_model from django.core.management.base import LabelCommand, CommandError DOMAIN = Site.objects.get_cur...
import logging import json import requests import datetime import math import time # django modules from django.views.decorators.csrf import csrf_exempt from django.shortcuts import render, get_object_or_404 from django.views.generic import View, TemplateView, ListView, DetailView from django.db.models import Q,Count ...
""" Internal tasks are tasks that are started from the teuthology infrastructure. Note that there is no corresponding task defined for this module. All of the calls are made from other modules, most notably teuthology/run.py """ from cStringIO import StringIO import contextlib import logging import os import time impo...
# -*- coding: utf-8 -*- # # pylast - # A Python interface to Last.fm and Libre.fm # # Copyright 2008-2010 Amr Hassan # Copyright 2013-2018 hugovk # # 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...
{ 'targets': [ { 'target_name': 'compiler', 'type': 'static_library', 'include_dirs': [ 'include', 'src', 'externals/utf8proc', 'externals/json-parser', ], 'sources': [ 'src/compiler/build_tables/build_parse_table.cc', 'src/compiler/bu...
""" Sphinx Documentation Automatic Builder MIT License. See LICENSE for more details. Copyright (c) 2013, Jonathan Stoppani """ import argparse import os import subprocess import sys import pty import multiprocessing from livereload import Server from watchdog.observers import Observer from watchdog.events import ...
#!/usr/bin/env python """Run some linters on files of various types.""" USAGE = """%prog [options] [files] ... Run linters over the given files, or the current directory tree. By default -- if no commandline arguments are given -- this runs the linters on all non-blacklisted python file under the current directory...
__version__ = "0.94" import helpers import os, shutil module_dir = os.path.abspath(os.path.dirname(__file__)) default_params_str = """{ 'fasta': '', 'csv': '', 'out_dir': '', 'protocol': 'gram_pos', # 'gram_neg' #### Signal peptide and transmembrane helix prediction 'signalp4_bin': 'signalp_web', # 'si...
version = "1.2.2"
__version__ = '0.8' __author__ = 'ArmedGuy' import b3, time, threading, re, socket, thread, sys, pyircbot from pyircbot import IrcEvent, IrcUser from b3 import clients import b3.events import b3.plugin import datetime, string from b3 import functions #------------------------------------------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Benoit Chesneau <benoitc@e-engura.org> # # This software is licensed as described in the file LICENSE, which # you should have received as part of this distribution. # import copy from hashlib import md5 import os import re import shutil import sys from...
import os from ehive.runnable.IGFBaseProcess import IGFBaseProcess from igf_data.utils.fileutils import get_temp_dir,remove_dir,check_file_path from igf_data.utils.jupyter_nbconvert_wrapper import generate_ipynb_from_template,nbconvert_execute_in_singularity class NotebookRunner(IGFBaseProcess): ''' A runnable cla...
import cv2 import matplotlib.pyplot as plt import numpy as np import os import _init_paths import caffe caffe_root = os.path.join(os.path.dirname(__file__), '..', '..', 'caffe') def get_map(image, verbose=False): # caffe.set_device(0) # caffe.set_mode_gpu() caffe.set_mode_cpu() model_def = os.path...
from __future__ import print_function, unicode_literals import re, time, json from collections import defaultdict from twisted.python import log from twisted.internet import protocol from twisted.protocols.basic import LineReceiver from .database import get_db SECONDS = 1.0 MINUTE = 60*SECONDS HOUR = 60*MINUTE DAY = 2...
# Tai Sakuma <sakuma@fnal.gov> import multiprocessing import time from ProgressReport import ProgressReport ##____________________________________________________________________________|| class ProgressReporter(object): def __init__(self, queue, pernevents = 1000): self.queue = queue self.perneve...
""" This file is part of Arakoon, a distributed key-value store. Copyright (C) 2010 Incubaid BVBA Licensees holding a valid Incubaid license may use this file in accordance with Incubaid's Arakoon commercial license agreement. For more information on how to enter into this agreement, please contact Incubaid (contact d...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Swarming bot main process. This is the program that communicates with the Swarming server, ensures the code is always up to date and executes ...
"""Any shareable docstring components for rolling/expanding/ewm""" from textwrap import dedent from pandas.core.shared_docs import _shared_docs _shared_docs = dict(**_shared_docs) def create_section_header(header: str) -> str: """Create numpydoc section header""" return "\n".join((header, "-" * len(header))...
import logging import requests import urlparse from selenium import common from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait ...
# Amara, universalsubtitles.org # # Copyright (C) 2012 Participatory Culture Foundation # # This program 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 version 3 of the # License, or (at your op...
#!/usr/bin/python from lxml import etree from StringIO import StringIO from sfa.rspecs.rspec import RSpec from sfa.util.xrn import * from sfa.util.plxrn import hostname_to_urn from sfa.util.config import Config from sfa.rspecs.rspec_version import RSpecVersion _version = {'type': 'ProtoGENI', 'version...
#!/usr/bin/python import copy import gyp.common import optparse import os.path import re import shlex import subprocess import sys # A list of types that are treated as linkable. linkable_types = ['executable', 'shared_library', 'loadable_module'] # A list of sections that contain links to other targets. dependency...
from bda.plone.shop.interfaces import IShopExtensionLayer from plone.app.users.browser.register import RegistrationForm, AddUserForm from plone.app.users.browser.userdatapanel import UserDataPanel from plone.supermodel import model from plone.z3cform.fieldsets import extensible from z3c.form import field from zope impo...
# -*- encoding: utf-8 -*- from abjad.tools import systemtools from abjad.tools import timespantools import consort import collections def _make_timespan_inventory(): timespan_inventory = timespantools.TimespanInventory([ consort.PerformedTimespan( start_offset=0, stop_offset=20, ...
#!/bin/env python # Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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...
print "Hello World!" print "Goodby World..."
""" Supplies Pane, Layout, NdLayout and AdjointLayout. Pane extends View to allow multiple Views to be presented side-by-side in a NdLayout. An AdjointLayout allows one or two Views to be ajoined to a primary View to act as supplementary elements. """ from functools import reduce from itertools import chain import nu...
# -*- coding: utf-8 -*- # Copyright (C) 2014 Johannes Baiter <johannes.baiter@gmail.com> # # This program 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 version 3 of the # License, or (at your ...
# -*- coding: utf-8 -*- from datetime import datetime import decimal from decimal import Decimal as D from hashlib import md5 import pickle import sys def get_bytes_buffer(): try: # Python 2 from StringIO import StringIO return StringIO() except ImportError: # Python 3 f...
# # spyne - Copyright (C) Spyne contributors. # # 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 # version 2.1 of the License, or (at your option) any later version. # # This libra...
# vim: ts=4 sw=4 expandtab import os import tempfile import time from collections import deque from devops import xml from xmlbuilder import XMLBuilder def find(p, seq): for item in seq: if p(item): return item class DeploymentSpec: def __repr__(self): return "<DeploymentSpec arch=\"%s\" os_t...
"""Formatter producing CSV data.""" import sys import csv from collections import OrderedDict import formatter import executor # TO BE DEFINED # - wrong lines # - return_code/code/section status # - difference/similarity class CSVFormatter(formatter.Formatter): _RESULT_TABLE = { executor.ER_OK: "ok", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import inspect # list of methods that check everything other than attributes ALL_BUT_ATTRIBUTES = [ inspect.ismodule, inspect.isclass, inspect.ismethod, inspect.isfunction, inspect.isgeneratorfunction, inspect.isgenerator, inspect.istraceback,...
import unittest import saspy import os import pandas as pd from IPython.utils.tempdir import TemporaryDirectory from pandas.util.testing import assert_frame_equal class TestSASdataObject(unittest.TestCase): @classmethod def setUpClass(cls): cls.sas = saspy.SASsession(results='HTML') #cfgname='defa...
import logging import Hand, Utilities # There's a few things to do about dragons. # 1. When a card is played that has a triggered effect, >= 1 card in hand must be a dragon. # 1a. If (at some later date) a card is played from that set which is a dragon, no information is known about the remaining cards. # 1b. If (at s...
#!/usr/bin/python3 from pkg_resources import parse_version import json import sys import importlib from importlib.machinery import SourceFileLoader import traceback import configparser import datetime from time import mktime import argparse import time import logging import os import os.path import glob from websocket ...
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import emcee import fitsio import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from plot_setup import setup, SQUARE_FIGSIZE, COLORS import genrp from genrp import terms np.random.seed(42...
# coding: utf-8 import unittest import zeit.brightcove.connection class ConnectionTest(unittest.TestCase): # mix in some non-ASCII chars everywhere to guard against #10600 def test_strings_should_be_read_from_json_as_unicode(self): conn = zeit.brightcove.connection.APIConnection( None, No...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Descripti...
# 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. { 'variables': { 'conditions': [ [ 'toolkit_uses_gtk==1', { # Link to system .so since we already use it due to GTK. 'use_sys...
from restclients.wheniwork import WhenIWork from restclients.models.wheniwork import WhenIWorkRequest, WhenIWorkUser from restclients.wheniwork.users import Users import dateutil.parser from urllib import urlencode class Requests(WhenIWork): def get_request(self, request_id): """ Get Existing Requ...
from nose.tools import * import mock from tests.factories import AuthUserFactory from tests.factories import UserFactory, ProjectFactory from framework.auth.decorators import Auth from website.addons.dataverse.model import AddonDataverseUserSettings, \ AddonDataverseNodeSettings, DataverseFile from website.addons....
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): managers = orm['fixmystreet.FMSUser'].objects.filter(manager=True) #~ table_line_format = u"{0:5} {1:30.30} {2:15.15} {3:4} {4:4}" #~ table_line_separator = ''.join(['-...
from __future__ import annotations import os import shutil import subprocess from pathlib import Path version = subprocess.run( ["poetry", "version", "-s"], capture_output=True, text=True ).stdout.rstrip() dir: Path = Path(__file__).resolve().parents[1] dist: Path = dir / "dist" Path(dist / "gaphor").mkdir(paren...
#!/usr/bin/python from lxml import etree from StringIO import StringIO from sfa.rspecs.rspec import RSpec from sfa.util.xrn import * from sfa.util.plxrn import hostname_to_urn, xrn_to_hostname from sfa.util.config import Config from sfa.rspecs.rspec_version import RSpecVersion _ad_version = {'type': 'ProtoGENI', ...
#!/usr/bin/python import copy import gyp.common import optparse import os.path import re import shlex import subprocess import sys # A list of types that are treated as linkable. linkable_types = ['executable', 'shared_library', 'loadable_module'] # A list of sections that contain links to other targets. dependency...
#!/usr/bin/env python from operator import itemgetter import datetime import sys import usb.core MAX_BYTES = 10 * 1000 STARTING_MESSAGE_SIZE = 48 ENDING_MESSAGE_SIZE = 64 MESSAGE_SIZE_STEP = 12 DATA_ENDPOINT = 0x81 class MessageDeviceBenchmarker(object): def read(self): data = self._read() sel...
#!/usr/bin/env python # # runtest.py - wrapper script for running SCons tests # # This script mainly exists to set PYTHONPATH to the right list of # directories to test the SCons modules. # # By default, it directly uses the modules in the local tree: # ./src/ (source files we ship) and ./etc/ (other modules we don't)....
import mido from Queue import Queue from threading import Thread import logging from datetime import datetime import os import music path = os.path.realpath(__file__) dir_path = os.path.dirname(os.path.realpath(__file__)) # noinspection PyUnresolvedReferences input_names = mido.get_output_names() REFACE = 'reface DX...
# DESCRIPTION: A script that contains the small, miscellaneous functions and # classes that are used everywhere. Also contains the vector class. # 50726f6772616d6d696e6720697320627265616b696e67206f66206f6e652062696720696d706f # 737369626c65207461736b20696e746f207365766572616c207665727920736d616c6c20706f73 # 73696...
from flask.ext.testing import TestCase import unittest import angular_flask from flask import Flask, json, jsonify from angular_flask import app, db, session from angular_flask.models import User class UserTestCase(TestCase): STATUS_OK = "200 OK" def create_app(self): app = Flask(__name__) app...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, cint from frappe import _ from frappe.model.document import Document class PackingSlip(Document): def...
# # spyne - Copyright (C) Spyne contributors. # # 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 # version 2.1 of the License, or (at your option) any later version. # # This libra...
""" map nifti image images to surface and extract parcels """ import os,sys,glob,shutil from run_shell_cmd import run_shell_cmd import tempfile import nibabel.gifti.giftiio import numpy basedir=os.environ['MYCONNECTOME_DIR'] def get_data_from_parcels(volfile,outfile,save_gii=True): surfaces={} surfaces['mid...
"""Formatter producing CSV data.""" import sys import csv from collections import OrderedDict import formatter import executor # TO BE DEFINED # - wrong lines # - return_code/code/section status # - difference/similarity class CSVFormatter(formatter.Formatter): _RESULT_TABLE = { executor.ER_OK: "0", ...
#!/usr/bin/env python import datetime import logging import os import re from urllib.parse import urljoin from bs4 import BeautifulSoup from utils import utils, inspector # http://www.archives.gov/oig/ archive = 2005 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web t...
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
#!/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. """Front end tool to manage .isolate files and corresponding tests. Run ./isolate.py --help for more detailed information. See mo...
""" Flow class """ import pdb from blackwidow.network.packet import AckPacket, DataPacket from event import Event class Flow(object): """Simple class for flows. Flows will trigger host behavior. """ def __init__(self, flow_id, source, destination, amount, env, time): """ Constructor for Flow c...
from typing import Union, Optional import numpy as np from anndata import AnnData from scipy.sparse import spmatrix from .. import _utils from .. import logging as logg from ._utils import get_init_pos_from_paga from .._compat import Literal from .._utils import AnyRandom, _choose_graph _LAYOUTS = ('fr', 'drl', 'kk...
""" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Real time animation of Wythoff construction with pyglet and glsl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Code adapted from Matt Zucker's excellent shadertoy program at "https://www.shadertoy.com/view/Md3yRB" Matt's prog...
import json import logging from collections import namedtuple from distutils.version import LooseVersion from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import PermissionDenied from django.core.exceptions import SuspiciousOperation from django.core.files.storage import default_storage...
import traceback import datetime from datetime import timedelta import pytz import astral import random import uuid import re import asyncio import logging from collections import OrderedDict from copy import deepcopy import appdaemon.utils as utils from appdaemon.appdaemon import AppDaemon class Scheduler: def...
import collections import copy import matplotlib.pyplot as plt import numpy as np from astromodels.parameter import Parameter from astromodels.functions.functions import Uniform_prior from astromodels.utils.valid_variable import is_valid_variable_name from matplotlib.ticker import MaxNLocator from mpl_toolkits.axes_gr...
#!/usr/bin/env python import base64 import logging import os import httplib2 import configparser import time import urllib from datetime import date, timedelta from functools import wraps from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials ...
import time import numpy as nm import scipy.linalg as sla from sfepy.base.base import output, get_default, Struct from sfepy.solvers.solvers import make_get_conf, Solver, EigenvalueSolver def eig(mtx_a, mtx_b=None, num=None, eigenvectors=True, return_time=None, method='eig.scipy', **ckwargs): """ Uti...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config from pylons.legacy import h, jsonify, Controller, Response __all__ = ['c', 'g', 'cache', 'request', 'response', 'session', 'jsonify', 'Controller', 'Response'] def __figu...
import sys import copy from bento.parser.nodes \ import \ Node # XXX: fix the str vs bool issue with flag variables _LIT_BOOL = {"true": True, "false": False, True: True, False: False} class Dispatcher(object): def __init__(self, user_values=None): self._d = { "path_options": ...
import re import json import subprocess from bs4 import BeautifulSoup from lib.utils.utils import appendQueries,iterate,connect,package def absolute(myrange,domain,url,append): if not append: return None if re.search("^//",append) != None: return None # If don't have http or https prefix...
# Copyright 2015-2016 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
#!/usr/bin/env python # Copyright 2017 The Kubernetes 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 appli...
from decimal import Decimal import numpy as np from BaseModel import BaseModel class Statistic(BaseModel): def __init__(self, param = {}): BaseModel.__init__(self, "statistic", param) def calc_variance(self, dataset): '''Calculate E(x) and Var(x). If dataset has no data, then return ...
import threading import datetime from queue import Queue from random import randint import re import sys import traceback import inspect from datetime import timedelta import logging from appdaemon import utils as utils from appdaemon.appdaemon import AppDaemon class Threading: def __init__(self, ad: AppDaemon, ...
import datetime import zmq import json from . import monitor from panoptes.utils import logger, config, messaging, threads, serial @logger.has_logger @config.has_config class CameraEnclosure(monitor.EnvironmentalMonitor): """ Listens to the sensors inside the camera enclosure Args: messaging (p...
# Copyright (c) 2012 Jiri "NoxArt" Petruzelka # # 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, p...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # protocol.py - Bitcoin protocol access for Bitnodes. # # Copyright (c) Addy Yeow Chin Heng <ayeowch@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to de...
from bountyfunding_api import app from flask import Flask, url_for, render_template, make_response, redirect, abort, jsonify, request, g from models import db, Issue, User, Sponsorship, Email, Payment, Change from const import IssueStatus, SponsorshipStatus, PaymentStatus, PaymentGateway from pprint import pprint impor...
import collections import copy from contextlib import contextmanager import matplotlib.pyplot as plt import numpy as np from astromodels.parameter import Parameter from astromodels.functions.functions import Uniform_prior from astromodels.utils.valid_variable import is_valid_variable_name from threeML.io.file_utils im...
import click @click.group() @click.version_option() def zephyr(): '''A command-line interface for Zephyr''' @click.command() @click.argument('projnm') @click.confirmation_option(prompt='Are you sure you want to clean project outputs?') def clean(projnm): '''Clean up project results / outputs''' ...
#!/usr/bin/env python def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import os.path as op auto_name = op.split(op.dirname(__file__))[-1] config = Configuration(auto_name, parent_package, top_path) config.add_data_files('matlab_eig.m') ...
import logging import os from dart.client.python.dart_client import Dart from dart.config.config import configuration from dart.engine.redshift.metadata import RedshiftActionTypes from dart.model.engine import Engine, EngineData _logger = logging.getLogger(__name__) def add_redshift_engine(config): engine_config...
import json import re from collections import Iterable from copy import deepcopy from datetime import datetime as dt from datetime import timedelta as td from functools import lru_cache from http.client import HTTPResponse from urllib import error, parse, request from ruz.utils import (EMAIL_DOMAINS, EMAIL_PATTERN, RE...
# importing modules import csv import pytest import player # tests def test_given_player_apps_matches_total_returns_true(): with open('player_history.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: po = player.player( row['Player Name'], ...
#!/usr/bin/env python # Copyright (c) 2011 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. """ lastchange.py -- Chromium revision fetching utility. """ import re import optparse import os import subprocess import sys cla...
class Event(object): """ Base event for all SQLObject events. In general the sender for these methods is the class, not the instance. """ class ClassCreateEvent(Event): """ Event raised before class creation. The sender is the superclass (in case of multiple superclasses, the first su...
""" Linear mixed effects models. The MixedLM class fits linear mixed effects models to data. This is a group-based implementation that does not efficiently handle crossed random effects. The data are partitioned into disjoint groups. The probability model for group i is: Y = X*beta + Z*gamma + epsilon where * n_...
from xml.etree import ElementTree from wheelcms_axle.impexp import Importer from wheelcms_axle.content import TypeRegistry, type_registry from wheelcms_axle.tests.models import Type1, Type1Type from wheelcms_categories.models import Category, CategoryType import pytest @pytest.fixture() def cat1(): return Categ...
"""Paster Commands, for use with paster in your project The command(s) listed here are for use with Paste to enable easy creation of various core Pylons templates. Currently available commands are:: controller, restcontroller, shell """ import os import sys import paste.fixture import paste.registry import past...
import requests from django import forms try: # Django < 1.5 doesn't have checks, so we'll just ignore that. from django.core import checks except ImportError: pass from django.core.cache import cache from django.db.models.fields import Field from django.core.files.base import File from django.db.models.fie...
#!/usr/bin/python """ Copyright (c) 2014 tilt (https://github.com/AeonDave/tilt) See the file 'LICENSE' for copying permission """ import socket, re, source, util from lib.logger import logger def is_valid_ip(ip): is_valid = re.match("^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-...
from hoomd.update.box_resize import BoxResize # TODO remove when no longer necessary class _updater: pass __all__ = ['BoxResize']
import unittest import io import VAPr.annovar_output_parsing as ns_test # Most test info taken from test_files/test_out_csv_path/real_files/X7/X7.raw.11_annotated.hg19_multianno.txt' class TestAnnovarTxtParser(unittest.TestCase): ANNOVAR_ANNOTATION_CONTENT = """Chr Start End Ref Alt Func.knownGene Gene.knownGene...
import re import sys import codecs expressionData = sys.argv[1] clinicalAnnotations = sys.argv[2] dataOutFile = sys.argv[3] metedataOutFile = sys.argv[4] drugData = sys.argv[5] profilingData = sys.argv[6] #write outFile, clinical on left expression on Right DrugDataDict = {} with open(drugData, 'r') as f : firs...
print("Hello, welcome to the personalized passwordlist creator : ") print("please enter the necessary information:") print("!!! leave unknown information fields empty") print(" ") print("""1- info about subject 2- common number passwords 3- general password list """) wordlist = [] def shuffle(): lst =...
# -*- coding: utf-8 -*- """Tests for core functions.""" import datetime import json import logging import os import re import sys import time from io import BytesIO from itertools import product from unittest.mock import MagicMock, Mock, patch from urllib.parse import parse_qs, quote, urlparse import pytest import ya...
""" An extension of scipy.stats.stats to support masked arrays :author: Pierre GF Gerard-Marchant :contact: pierregm_at_uga_edu """ # TODO : f_value_wilks_lambda looks botched... what are dfnum & dfden for ? # TODO : ttest_reel looks botched: what are x1,x2,v1,v2 for ? # TODO : reimplement ksonesamp from __future__ ...