gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import os import sys import stat import abc from pathlib import Path import shlex import collections import subprocess from typing import List from threading import Thread import utils import psutil import time from .baseClasses import PythonBatchCommandBase import logging log = logging.getLogger(__name__) class Run...
# # Bare-bones re-implementation of CMA-ES. # # This file is part of PINTS (https://github.com/pints-team/pints/) which is # released under the BSD 3-clause license. See accompanying LICENSE.md for # copyright notice and full license details. # import numpy as np import pints import warnings from numpy.linalg import n...
# Copyright (c) 2015 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.0 # # Unless required by applica...
from pandac.PandaModules import * from toontown.toonbase.ToonBaseGlobal import * from direct.interval.IntervalGlobal import * from DistributedMinigame import * from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.task import Task import ArrowKeys ...
# # Module which supports allocation of ctypes objects from shared memory # # multiprocessing/sharedctypes.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are me...
import requests import json class Navigator(object): """ This is just a generic class that provides some functions to help you get authenticated, and work with the rackspace cloud. """ def __init__(self, **kwargs): self.region = kwargs.get('region') self.token = None self....
import re import numpy as np import xarray as xr from scipy.spatial import Delaunay, Voronoi from ...core.utils import as_id_array from ...utils import jaggedarray from ..sort.intpair import pair_isin from ..sort.sort import reverse_one_to_one class VoronoiDelaunay(object): def __init__(self, xy_of_node): ...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
############################################################################### # Imports ############################################################################### # Python from collections import Iterable from importlib import import_module # Django from django.conf import settings from django.contrib.auth impo...
# -*- coding: utf-8 -*- from abc import abstractmethod import numpy as np import tensorflow as tf import inferbeddings.activations as activations from inferbeddings.nli import tfutil from inferbeddings.nli import BaseRTEModel import logging logger = logging.getLogger(__name__) class BaseDecomposableAttentionMod...
from __future__ import division import collections import datetime import logging import time import zlib import numpy as np from lazy import lazy logger = logging.getLogger(__name__) # After 10 s, messages are no longer fresh FRESHNESS_TIME = 10 # Number of seconds over which to average event rate EVENTRATE_TIME...
import scipy.cluster.hierarchy as sch from scipy.spatial import distance from bootstrap_cluster import bootstrapFeatures, bootstrapObservations import numpy as np import pandas as pd from functools import partial from .comparison import _alignClusterMats, alignClusters from .preprocessing import partialCorrNormalize f...
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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. # # Ansible is distribut...
# Copyright 2015 The TensorFlow 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 applica...
# Copyright (C) 2014 Stefan C. Mueller import unittest import pickle import cPickle import StringIO as stringio import utwist from twisted.internet import defer, reactor from anycall import rpc from anycall.rpc import RPCSystem class TestRPC(unittest.TestCase): @defer.inlineCallbacks def twisted_setup...
# Copyright 2015-2018 Capital One Services, LLC # # 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 ...
# Copyright 2017 The TensorFlow 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 applica...
from __future__ import absolute_import import collections import contextlib import copy import json import threading import typing as tp # NOQA import warnings import numpy import six import chainer from chainer import backend from chainer import configuration from chainer import serializer as serializer_module from...
# -*- coding: utf-8 -*- ############################################################################### # Description: # This is a collection of utility / helper functions for computer vision tasks. # Note that most of these functions are not well tested, but are # prototyping implementations. # # Typical mea...
import random from enum import Enum class LabelEvent(Enum): APPROVED = 'approved' REJECTED = 'rejected' CONFLICT = 'conflict' SUCCEED = 'succeed' FAILED = 'failed' TRY = 'try' TRY_SUCCEED = 'try_succeed' TRY_FAILED = 'try_failed' EXEMPTED = 'exempted' TIMED_OUT = 'timed_out' ...
import datetime from collections import OrderedDict from django.contrib.auth.models import User from django.test import TestCase from .models import Order, RevisionableModel, TestObject class ExtraRegressTests(TestCase): def setUp(self): self.u = User.objects.create_user( username="fred", ...
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Andrew Bettison <andrewb@zip.com.au> # # Copyright 2012 Philip Kimmey <philip@rover.com> ...
# Copyright (c) 2013 OpenStack Foundation # 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 ...
import io import os from django.conf import settings from django.db import models from PIL import Image from tower import ugettext_lazy as _lazy from uuid import uuid4 from kitsune.sumo.models import ModelBase from kitsune.sumo.urlresolvers import reverse HOT_TOPIC_SLUG = 'hot' class Product(ModelBase): title...
# coding: utf-8 """ Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification # noqa: E501 The version of the OpenAPI document: 1.1.2-pre.0 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech """ try: from inspect import getfullargspec except Im...
#!/usr/bin/env python # William Holloway william.holloway@nyumc.org # # Copyright (C) 2008-2009 NYU Langone Medical Center # # 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 restricti...
""" Timezone-related classes and functions. This module uses pytz when it's available and fallbacks when it isn't. """ from datetime import datetime, timedelta, tzinfo from threading import local import sys import time as _time try: import pytz except ImportError: pytz = None from django.conf import setting...
""" SI unit system. Based on MKSA, which stands for "meter, kilogram, second, ampere". Added kelvin, candela and mole. """ from __future__ import division from sympy.physics.units import DimensionSystem, Dimension, dHg0 from sympy import Rational, pi, sqrt, S from sympy.physics.units.definitions.dimension_definitio...
#------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under...
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectio...
######################################################################### # # # # # copyright 2002 Paul Henry Tremblay # # ...
# # Timer.py -- GUI independent timers. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function import time import threading from ginga.m...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: dbtables.py _cvsid = '$Id$' import re import sys import copy import random import struct if sys.version_info[0] >= 3: import pickle elif sys.vers...
""" Common verification code. """ from __future__ import absolute_import, division, print_function import re import attr from ._compat import maketrans, text_type from .exceptions import ( CertificateError, DNSMismatch, SRVMismatch, URIMismatch, VerificationError, ) try: import idna except ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- """" author: 'Omid Sadjadi, Timothee Kheyrkhah' email: 'omid.sadjadi@nist.gov' """ import time import warnings from numbers import Number import numpy as np from scipy.linalg import cholesky, eigh, inv, solve, svd from six import string_types from odin.backend import calc_white_mat, length_nor...
#!/usr/bin/python """The MIT License (MIT) Copyright (c) 2016 shaldev Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
# 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 # distributed under th...
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import inspect import copy import threading import logging import datetime from . import events __author__ = "Piotr Gawlowicz, Anatolij Zubow" __copyright__ = "Copyright (c) 2015, Technische Universitat Berlin" __version__ = "0.1.0" __email__ = "{gawlowicz|zubow}@tkn.tu-berlin.de" class CallingContext(object): d...
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the importdescriptors RPC. Test importdescriptors by generating keys on node0, importing the corr...
names = {0: 'object', 1: 'type', 2: 'unicode', 3: 'dict', 4: 'list', 5: 'slice', 6: 'super', 7: 'staticmethod', 8: 'float', 9: 'enumerate', 10: 'file', 11: 'basestring', 12: 'long', 13: 'tuple', 14: 'str', 15: 'property', 16: 'int', 17: 'xrange', 18: 'file', 19: 'complex', 20: 'bool', 21: 'classmet...
# -*- coding: utf-8 -*- """ markupsafe._constants ~~~~~~~~~~~~~~~~~~~~~ :copyright: 2010 Pallets :license: BSD-3-Clause """ HTML_ENTITIES = { "AElig": 198, "Aacute": 193, "Acirc": 194, "Agrave": 192, "Alpha": 913, "Aring": 197, "Atilde": 195, "Auml": 196, "Beta": 914, "Ccedil":...
#!/usr/bin/env python # pylint: disable=missing-docstring # # Copyright 2017 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
from __future__ import division from sympy import I, Rational, Symbol, pi, sqrt from sympy.geometry import Line, Point, Point2D, Point3D, Line3D, Plane from sympy.geometry.entity import rotate, scale, translate from sympy.matrices import Matrix from sympy.utilities.iterables import subsets, permutations, cartes from s...
from __future__ import unicode_literals import datetime import os import re import sys import types from django.conf import settings from django.core.urlresolvers import resolve, Resolver404 from django.http import (HttpResponse, HttpResponseNotFound, HttpRequest, build_request_repr) from django.template import T...
"""autograder.py: An interface to the autograder infrastructure (named autopy) This module interfaces the OK Server with Autopy. The actual autograding happens in a sandboxed environment. """ import collections import datetime import enum import json import logging import time import oauthlib.common import requests ...
#!/usr/bin/env python from tornado.escape import utf8, _unicode, native_str from tornado.httpclient import HTTPRequest, HTTPResponse, HTTPError, AsyncHTTPClient, main from tornado.httputil import HTTPHeaders from tornado.iostream import IOStream, SSLIOStream from tornado import stack_context from tornado.util import ...
import requests import json import UnityClasses from .UnityClasses import * requests.packages.urllib3.disable_warnings() class Unity: """ Class representing an EMC Unity Array """ def __init__(self, ip_addr, username, password): self.ip_addr = ip_addr self.username = username self.pas...
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
""" Provide functionality to interact with Cast devices on the network. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cast/ """ # pylint: disable=import-error import logging import voluptuous as vol from homeassistant.components.media_pla...
import shutil import os import os.path as osp import glob as gb import json import numpy as np #from six import string_types # from nilearn import masking as msk from nilearn._utils import concat_niimgs # from nilearn.image.image import _compute_mean # import utils._utils as ucr import utils.setup_filenames as suf im...
import pytest import numpy as np from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from scipy import sparse from sklearn import datasets, svm, linear_model, base from sklearn.datasets import make_classification, load_digits, make_blobs from sklearn.svm....
from __future__ import absolute_import from typing import Any, Optional, Tuple, List, Set from django.utils.translation import ugettext as _ from django.conf import settings from django.db import transaction from django.http import HttpRequest, HttpResponse from django.views.decorators.csrf import csrf_exempt from ze...
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 co...
import sys import os import sys import httplib import urllib2 import simplejson from time import strftime, localtime from cps.base import BaseClient from conpaas.core import https from cps import taskfarm # TODO: as this file was created from a BLUEPRINT file, # you may want to change ports, paths and/or methods...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ COHORTE Java isolate loader, based on jPype **TODO:** * Review constants names & values :author: Thomas Calmant :license: Apache Software License 2.0 .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); y...
########################################################################## # # Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
"""Core module for HCI operations. """ import logging import multiprocessing as mp import os import select import signal from . import bluez from . import command as btcmd from .command import HCICommand, HCIReadBDAddr from .data import HCIACLData, HCISCOData from .error import HCICommandError, HCIParseError, HCITimeo...
from abc import ABCMeta, abstractmethod import os import re import bb class Manifest(object): """ This is an abstract class. Do not instantiate this directly. """ __metaclass__ = ABCMeta PKG_TYPE_MUST_INSTALL = "mip" PKG_TYPE_MULTILIB = "mlp" PKG_TYPE_LANGUAGE = "lgp" PKG_TYPE_ATTEMPT...
# # 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 # ...
#!/usr/bin/env python ''' Copyright 2015 Ivan Sadikov 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...
"""Support for Ubiquiti's UVC cameras.""" from datetime import datetime import logging import re from typing import Optional import requests from uvcclient import camera as uvc_camera, nvr import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, SUPPORT_STREAM, Camera from homeassistant.c...
# Copyright 2016 The TensorFlow 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 applica...
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
# # Copyright 2013 NEC Corporation. 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...
from __future__ import absolute_import, division, print_function import inspect import os import shutil from collections import OrderedDict, defaultdict from functools import lru_cache, wraps import numpy as np from decorator import FunctionMaker from six import string_types from six.moves import builtins __all__ = ...
"""Support for Rflink lights.""" from __future__ import annotations import logging import re import voluptuous as vol from homeassistant.components.light import ( ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, LightEntity, ) from homeassistant.const import CONF_DEVICES, CONF_NAME, CONF_TYPE fr...
# -*- coding: utf-8 -*- """ ========================== Bipartite Graph Algorithms ========================== """ # Copyright (C) 2013-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx...
#!/usr/bin/env python from sys import stdout, stderr, argv, exit, maxint, setrecursionlimit from multiprocessing import Pool, Queue, JoinableQueue, cpu_count from itertools import izip, combinations, product, chain from os.path import basename, abspath, relpath, dirname, join, isfile from bisect import bisect, insort ...
""" sphinx.ext.viewcode ~~~~~~~~~~~~~~~~~~~ Add links to module code in Python object descriptions. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import traceback import warnings from docutils import nodes import sphinx from sphinx ...
""" Convenient shortcuts to manage or check object permissions. """ from django.contrib.auth.models import Permission, User, Group from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Q from django.shortcuts import _get_queryset from guardian.core import O...
"""Module for ticket-related utilities.""" from vodreassembler import util from vodreassembler import protocol import zlib class Ticket: def __init__(self, ticket_data): self._ticket_data = ticket_data self._request = None self._response = None @property def ticket_id(self): return self._ticke...
# Copyright 2016 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. import contextlib import logging import os import shutil import subprocess import sys import tempfile import time _SRC_DIR = os.path.abspath(os.path.join( ...
from generator.actions import Actions import string import random import copy import struct def rs( length ): return ''.join( random.choice( string.lowercase + string.uppercase + string.digits) for _ in range(length) ) monster_names = [ "Lost Needless Duck", "The Commander", "Toxic Major", "El Spider", "The Heroic E...
# Copyright 2009 Google Inc. 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 law or ...
''' Copyright (c) OS-Networks, http://os-networks.net Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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...
import copy import logging from random import shuffle import socket import struct from threading import local import six from kafka.common import ConnectionError log = logging.getLogger("kafka") DEFAULT_SOCKET_TIMEOUT_SECONDS = 120 DEFAULT_KAFKA_PORT = 9092 def collect_hosts(hosts, randomize=True): """ Co...
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
# -*- coding: utf-8 -*- """Export processing results to Timesketch. Threaded version of existing Timesketch module.""" import re import time from typing import Optional, List, Type from timesketch_import_client import importer from timesketch_api_client import sketch as ts_sketch from timesketch_api_client import cli...
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2008 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@gmail.com> # # Contact email: tomkralidis@gmail.com # ============================================================================= imp...
import pickle import logging from indra.statements import Agent import indra.tools.assemble_corpus as ac from indra.databases import hgnc_client from indra.ontology.bio import bio_ontology logger = logging.getLogger(__name__) class IncrementalModel(object): """Assemble a model incrementally by iteratively adding...
''' Notes. From the AST documentation: "The Box class does not define any new attributes beyond those which are applicable to all Regions.", i.e. for AST, there is nothing special about a box beyond a specific means to define it, i.e. a corner and center or two corner points. ''' from __future__ import annotations #...
import numpy import six from chainer import cuda from chainer import function from chainer.utils import array from chainer.utils import type_check def _mat_ptrs(a): """Creates an array of pointers to matrices Args: a: A batch of matrices on GPU. Returns: GPU array of pointers to matrices...
import csv import sys import itertools from bs4 import BeautifulSoup import nltk from nltk.corpus import stopwords from sklearn.feature_extraction.text import CountVectorizer from sklearn.ensemble import RandomForestClassifier import numpy as np import random from sklearn.metrics import confusion_matrix from keras.pr...
# Copyright 2016 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. import json import logging import os import sys from telemetry.testing import fakes from telemetry.testing import browser_test_context from gpu_tests impor...
import numpy import math import sys import re from scipy import stats #################################################################### def file_len(fname): with open(fname) as f: for i, l in enumerate(f): pass return i + 1 #################################################################### f...
#import a bunch of stuff from common import sampler, weighted_sampler, get_file, defaultdict import os, sha, sys, re, random, copy, time, multiprocessing from optparse import OptionParser #input options. as ever, to see usage run: "python parallel.genet.alg.final.py -h" #NOTE: all options beside the marker chromosome...
""" Usage: fit_hlmm_model.py This script fits a heteroskedastic linear model or a heteroskedastic linear mixed model to a given response (phenotype), mean covariates, variance covariates, and variables to model random effects for. The phenotype (response) file and covariate file formats are the same: FID, IID, Trait1...
# coding: utf-8 import re _inline_tags = [ 'a', 'em', 'strong', 'small', 's', 'cite', 'q', 'dfn', 'abbr', 'data', 'time', 'code', 'var', 'samp', 'kbd', 'sub', 'sup', 'i', 'b', 'u', 'mark', 'ruby', 'rt', 'rp', 'bdi', 'bdo', 'span', 'br', 'wbr', 'ins', 'del', 'img', 'font', ] _valid_end = r'(?!:/|[^\w\...
"""analysis module.""" import datetime from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.db.models import Sum, Q from apps.managers.log_mgr.models import MakahikiLog from apps.managers.player_mgr import player_mgr from apps.managers.player_mgr.models import P...
# flake8: noqa # __reproducible_start__ import numpy as np from ray import tune def train(config): # Set seed for trainable random result. # If you remove this line, you will get different results # each time you run the trial, even if the configuration # is the same. np.random.seed(config["seed"...
# Copyright 2017 The TensorFlow 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 applicab...
##TODO mock a gemini db import pytest from puzzle.plugins import GeminiPlugin from puzzle.models import Individual, Variant, DotDict def test_get_all_variants(gemini_case_obj): """Test to get some variants from the gemini adapter""" plugin = GeminiPlugin() plugin.add_case(gemini_case_obj) filters = {}...
"""Test all ConfigStore implementations """ import getpass import os from copy import copy import smif.data_layer.database.setup_database from pytest import fixture, mark, param, raises from smif.data_layer.database_interface import DbConfigStore from smif.data_layer.file.file_config_store import YamlConfigStore from ...
# -*- coding: UTF-8 -*- import json import logging from uuid import UUID from urllib.parse import quote import pytz from github import Github, GithubException from django.conf import settings from github.GithubException import UnknownObjectException from symcon import models, tasks logger = logging.getLogger(__name...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import asyncio import json from uuid import UUID from aiohttp import web import pytest from unittest.mock import MagicMock, patch, call from foglamp.services.core import routes from foglamp.services.core import connect from f...
#################################### # Driftwood 2D Game Dev. Suite # # framemanager.py # # Copyright 2014-2017 # # Michael D. Reiley & Paul Merrill # #################################### # ********** # Permission is hereby granted, free of charge, to any person obtaining a copy # of ...