gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Doriancoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import datetime import os #####################...
# -*- coding: utf-8 -*- from collections import namedtuple from django.contrib import admin from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse from django.http import Http404, QueryDict from django.shortcuts import redirect, render_to_response from django.template import R...
"""An implementation of the Context Tree Switching model. The Context Tree Switching algorithm (Veness et al., 2012) is a variable order Markov model with pleasant regret guarantees. It achieves excellent performance over binary, and more generally small alphabet data. This is a fairly vanilla implementation with rea...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Folder', fields ['path'] db.create_unique(u'ddsc_core_folder', ['path']) ...
# 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 t...
from __future__ import print_function, division __all__ = ['LagrangesMethod'] from sympy import diff, zeros, Matrix, eye, sympify from sympy.physics.vector import dynamicsymbols, ReferenceFrame from sympy.physics.mechanics.functions import (find_dynamicsymbols, msubs, _f_list_parser) from sympy.physics.mechan...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
########################################################################## # # Copyright (c) 2011, 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: # # * Redistribu...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ synapse - storage.py Created on 7/19/17. Base storage layer implementation for Synapse Cortex class. See Storage class for more information. """ # Stdlib import logging import threading # Custom Code import synapse.common as s_common import synapse.eventbus as s_eventb...
"""This modules contains utility functions and classes for the access of the file system.""" import abc import enum import os import typing as t import mialab.data.structure as structure class FilePathGenerator(metaclass=abc.ABCMeta): """Represents an abstract file path generator. This class is used in :py:...
# -*- coding: utf-8 -*- # Copyright (c) 2017 Ericsson AB # # 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 ...
#!/usr/bin/python import os import sys import urllib2 import tempfile import atexit import shutil import re def download_file(url, download_path): print "URL: " + url u = urllib2.urlopen(url) f = open(download_path, 'wb') meta = u.info() file_size = int(meta.getheaders("Content-Length")[0]) ...
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
"""A base class for contents managers.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from fnmatch import fnmatch import itertools import json import os import re from tornado.web import HTTPError from IPython.config.configurable import LoggingConfigurable fr...
import configparser import itertools import math import numpy as np import pandas from common import Phase # noqa _entry_wait = 2 # min seconds between counted entries to top _freeze_min_time = 2 # min seconds to count lack of motion as a "freeze" _freeze_max_speed = 0.05 # maximum speed to still consider a "free...
# =============================================================================== # Copyright 2013 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/licenses...
# # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # # 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 a...
import pickle from django.db import models from django.template import Context, loader from base64 import b64encode, b64decode from datetime import datetime from restclients.exceptions import InvalidCanvasIndependentStudyCourse from restclients.exceptions import InvalidCanvasSection from restclients.util.date_formator ...
## @file # This file is for installed package information database operations # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distributi...
""" The ``zen.drawing.ubigraph`` module provides support for rendering Zen graphs in the `Ubigraph visualization environment <http://ubietylab.net/ubigraph/>`_. The renderer will update the visualization in real time as changes are made to the underlying graph. Furthermore, edges and nodes can be visually highlighted...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
__author__ = 'Godfrey Takavarasha' import os import time import json import datecalc from httplib2 import Http from datetime import date from datetime import timedelta from apiclient.discovery import build from apiclient.errors import HttpError from oauth2client.client import SignedJwtAssertionCredentials dir = os....
"""This module provides the Bus class which knows how to talk to Bioloid devices, and the BusError exception which is raised when an error is enountered. """ import pyb from bioloid import packet from bioloid.dump_mem import dump_mem from bioloid.log import log class BusError(Exception): """Exception whic...
# Copyright 2018 The Kubeflow 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 law or agreed to in...
"""Restricted Boltzmann Machine """ # Main author: Yann N. Dauphin <dauphiya@iro.umontreal.ca> # Author: Vlad Niculae # Author: Gabriel Synnaeve # License: BSD Style. import time import numpy as np import scipy.sparse as sp from ..base import BaseEstimator from ..base import TransformerMixin from ..externals.six.mo...
#!/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. """Unit tests for gcl.py.""" # pylint: disable=E1103,E1101,E1120 import os import sys sys.path.insert(0, os.path.dirname(os.path...
import datetime import errno import gettext import itertools import json import locale import os import queue import signal import subprocess import sys import threading import wx import wx.adv import openslides from openslides.utils.main import ( detect_openslides_type, get_default_user_data_dir, Portab...
#!/usr/bin/env python import argparse import json import os import sys import signal import etl.extract.brapi import etl.load.elasticsearch import etl.load.virtuoso import etl.transform.elasticsearch import etl.transform.jsonld import etl.transform.rdf from etl.common.store import list_entity_files from etl.common.ut...
import pytest from flask import json from willstores.util.response_schema import SessionResultsSchema, SearchResultsSchema @pytest.mark.parametrize( "test_url,ExpectedSchema", [ ("/session/AVzyfQxA_QGzslKAFzNB", SessionResultsSchema), ("/search/query/t-shirt", SearchResultsSchema), ("...
""" author: Joel McCune (joel.mccune+gis@gmail.com) dob: 03 Dec 2014 purpose: Provide the utilities to process and work with whitewater reach data. Copyright 2014 Joel McCune Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with t...
from __future__ import division, print_function, absolute_import import functools import operator import sys import warnings import numbers from collections import namedtuple import inspect import numpy as np def _valarray(shape, value=np.nan, typecode=None): """Return an array of all value. """ out = ...
# S.D. Peckham # Sept 2014 (new version to use netCDF4) # June 2010 (streamlined a bit more) # December 2, 2009 (updated open_new_file to use "info") # October 13, 2009 import os import sys import time import numpy as np import bov_files import file_utils import rti_files import netCDF4 as nc #--------------------...
import collections import copy import warnings import numpy import six from chainer import cuda from chainer import link as link_module from chainer import serializer as serializer_module from chainer import variable def _sum_sqnorm(arr): sq_sum = collections.defaultdict(float) for x in arr: with cu...
from difflib import unified_diff import filecmp import glob import hashlib from optparse import OptionParser import os import shutil import sys import numpy as np import openmc from openmc.examples import pwr_core from colorama import Fore, init from tests.regression_tests import config init() def colorize(diff): ...
"""Single slice vgg with normalised scale. """ import functools import lasagne as nn import numpy as np import theano import theano.tensor as T import data_loader import deep_learning_layers import image_transform import layers import preprocess import postprocess import objectives import theano_printer import update...
"""Test different accessory types: Switches.""" from datetime import timedelta import pytest from homeassistant.components.homekit.const import ( ATTR_VALUE, TYPE_FAUCET, TYPE_SHOWER, TYPE_SPRINKLER, TYPE_VALVE, ) from homeassistant.components.homekit.type_switches import ( Outlet, SelectS...
# -*- coding: utf-8 -*- """ @author: Chenglong Chen <c.chenglong@gmail.com> @brief: model parameter space """ import numpy as np from hyperopt import hp import config ## xgboost xgb_random_seed = config.RANDOM_SEED xgb_nthread = config.NUM_CORES xgb_n_estimators_min = 100 xgb_n_estimators_max = 1000 xgb_n_estimato...
"""Support for the Netatmo cameras.""" import logging import pyatmo import requests import voluptuous as vol from homeassistant.components.camera import SUPPORT_STREAM, Camera from homeassistant.core import callback from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.helpers....
#!/usr/bin/python2.7 import re import os.path import fnmatch is_for_tex = False is_for_md = False class mm_file_t(): def __init__(self, mm_fpath): '>> self.root = mm_node_t()'# {{{ assert os.path.isfile(mm_fpath), 'Freemind file (%s) is not found' % mm_fpath self.fpath = mm_fpath ...
#------------------------------------------------------------------------------- # Name: impl.srbm # Purpose: A Theano implementation of stacked restricted Boltzmann machines (RBMs) that are a part of a DBN (deep belief net). Implemented after # the materials found on Deep Learning Tutorials (ht...
#! /usr/bin/env python3 from tqdm import tqdm import json import numpy as np import pandas as pd import scipy.sparse.linalg from scipy import sparse, stats, spatial import networkx as nx from networkx.algorithms import community import matplotlib.pyplot as plt import seaborn as sns import random from helpers_sa...
#!/usr/bin/env python3 import base64 import copy import datetime import json import math import re import socket import shlex import threading from collections import namedtuple from urllib.parse import urlparse, ParseResult, parse_qs, urlencode from subprocess import Popen, PIPE, TimeoutExpired from http import cook...
""" Long winded constants and such live here. Most notably the LANGS tuple. Unlike in the php version no sql is necessary to add a new language. You only need to append a new tuple and restart the server. This is equally true for other constants that appear here. """ from markdown import markdown from .utils import re...
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
# 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 ...
# pep8: disable=E501 import os import pytest import yaml import pandas as pd from collections import namedtuple from unittest import mock import numpy as np import sklearn.datasets as datasets import h2o from h2o.estimators.gbm import H2OGradientBoostingEstimator import mlflow.h2o import mlflow import mlflow.pyfunc....
# -*- coding: utf-8 -*- # # Connectors documentation build configuration file, created by # sphinx-quickstart on Mon Feb 4 11:35:44 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
# Copyright (c) 2014 Mirantis, 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...
import cPickle as pickle import argparse import codecs import glob import sys import os.path import xml.etree.cElementTree as ET import time import traceback import gzip __author__ = 'Filip Ginter' class Section: def __init__(self,title,charBeg,charEnd,titleCharBeg,titleCharEnd): self.title=title ...
#!/usr/bin/env python """ Tests for saving a UGrid in netcdf format. Designed to be run with pytest. """ from __future__ import (absolute_import, division, print_function) import os import netCDF4 import numpy as np import pytest from gridded.grids import Grid_U from gridded.variable import Variable from gridded...
################################# LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # # # ############...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import re import numpy as np import pytest from pandas.core.dtypes.dtypes import ( CategoricalDtype, IntervalDtype, ) from pandas import ( CategoricalIndex, Index, IntervalIndex, NaT, Timedelta, Timestamp, interval_range, ) import pandas._testing as tm class AstypeTests: """...
# -*- coding: utf-8 -*- """ Imports and extensions of the C++ bindings. """ import os import sys import traceback import numpy as np from .core import pgcore from .core import * # ####################################### # ### Global convenience functions ##### # ####################################### pgcore.load...
from sleekxmpp.test import * from sleekxmpp.xmlstream.stanzabase import ElementBase class TestElementBase(SleekTest): def testFixNs(self): """Test fixing namespaces in an XPath expression.""" e = ElementBase() ns = "http://jabber.org/protocol/disco#items" result = e._fix_ns("{%s}...
import bpy import bmesh import numpy as np from math import sin, cos, pi import itertools from typing import List is_blender_28 = bpy.app.version[1] >= 80 assert is_blender_28 """ # Blender import-system clutter import bpy import bmesh from mathutils import Vector import numpy as np import sys from pathlib import Pa...
# 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...
""" Filter all snps in a bed or vcf file, return those in region of another bed. ============================================================================ AUTHOR: Michael D Dacre, mike.dacre@gmail.com ORGANIZATION: Stanford University LICENSE: MIT License, property of Stanford, use as you wish ...
# Copyright 2014 IBM Corp. # # 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 t...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the tag_linux.txt tagging file.""" import unittest from plaso.containers import events from plaso.lib import definitions from plaso.parsers import bash_history from plaso.parsers import docker from plaso.parsers import dpkg from plaso.parsers import selinux ...
#!/usr/bin/env python3 ''' Created on Mar 15, 2013 @author: kabanus ''' if True or __name__ == "__main__": from argparse import ArgumentParser import os import re from sys import argv bellfile = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'bell.wav') if os.name == 'nt': # ...
''' Created on 2/03/2013 @author: Adam Speakman @contact: http://github.com/adamsp @contact: http://speakman.net.nz @license: http://www.apache.org/licenses/LICENSE-2.0.html ''' import operator import json import codecs import unicodedata from datetime import datetime class TopItems: def __init__(self, max_words)...
import itertools import random from ..core import Basic, Expr, Integer, Symbol, count_ops from ..core.compatibility import as_int, is_sequence from ..core.decorators import call_highest_priority from ..core.sympify import sympify from ..functions import cos, sin, sqrt from ..logic import true from ..simplify import si...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # mk-graphs1.py # tests with graphs: create a sample graph and parse it in different ways # (C) Mikhail Kolodin, 2018 # ver. 2018-06-01 1.7 # graph representation: # set of tuple-pairs, { (from, to), ...} -- not directed, not weighted import string import random #...
from __future__ import absolute_import from __future__ import unicode_literals import time import socket import logging from ._compat import string_types from ._compat import struct_unpack from .version import __version__ try: import ssl except ImportError: ssl = None # pyflakes.ignore try: from .snapp...
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
# Copyright 2014 The Oppia 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 ...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# # Copyright (c) 2001 - 2016 The SCons Foundation # # 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...
from __future__ import absolute_import, division, print_function # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed ...
# -*- coding: UTF-8 -*- #! /usr/bin/python # To change this template, choose Tools | Templates # and open the template in the editor. __author__="ARA" __all__ = ['fast_iga'] __date__ ="$Feb 11, 2012 11:51:45 PM$" from scipy.sparse.linalg import splu import numpy as np from .pigasusObject import * class fast_iga(pig...
######### # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
################################################################################ # Copyright 2015 Samuel Gongora Garcia (s.gongoragarcia@gmail.com) # # This program 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 Founda...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * from enum import Enum from typing import Dict, List, Callable, Tuple import traceback import requests import json # Disable insecure warnings requests.packages.urllib3.disable_warnings() MAX_API_COUNT: int = 100000 B...
#!/usr/bin/python # todo -- simplify the total energy read in, the kinetic energy read-in, temperature read-in #========================================================= #IMPORTS #========================================================= from __future__ import print_function import sys import numpy import pymbar # fo...
''' MergeMove.py Merge components of a bnpy model. Usage -------- Inside a LearnAlg, to try a merge move on a particular model and dataset. >>> hmodel, SS, curEv, MoveInfo = run_merge_move(hmodel, Data, SS) To force a merge of components "2" and "4" >>> hmodel, SS, curEv, MoveInfo = run_merge_move(hmodel, Data, SS, ...
"""This file implements the chaffing algorithm. Winnowing and chaffing is a technique for enhancing privacy without requiring strong encryption. In short, the technique takes a set of authenticated message blocks (the wheat) and adds a number of chaff blocks which have randomly chosen data and MAC fields. This means...
import sys import os libPath = os.path.abspath('pyutils') sys.path.append(libPath) import objdb def printViews(h): header = h class ViewCreator: def __init__(self,t,ev=None,m=None): self.header = header self.t = t self.ev = ev self.m = m def print1(self,f): if self.header: print "extern",...
# 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...
""" Tests for content parsing, and form-overloaded content parsing. """ from __future__ import unicode_literals import os.path import tempfile import pytest from django.conf.urls import url from django.contrib.auth import authenticate, login, logout from django.contrib.auth.middleware import AuthenticationMiddleware ...
#! /usr/bin/env python from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from threading import Thread import os import json import subprocess import sys import signal import argparse from time import sleep from format import store from pick_safedispatch ...
from __future__ import unicode_literals import boto3 import sure # noqa from botocore.exceptions import ClientError import pytest from moto import mock_s3 @mock_s3 def test_s3_storage_class_standard(): s3 = boto3.client("s3", region_name="us-east-1") s3.create_bucket(Bucket="Bucket") # add an object ...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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...
from __future__ import division, print_function, absolute_import import numpy as np from ._constraints import (NonlinearConstraint, LinearConstraint, BoxConstraint) from ._canonical_constraint import (lagrangian_hessian, to_canoni...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import os, json from frappe import _ from frappe.modules import scrub, get_module_path from frappe.utils import flt, cint, get_html_format, cstr from frappe.model....
"""File manager operations (delete, rename etc) when right-clicking directory tree.""" from __future__ import annotations import dataclasses import enum import logging import shutil import subprocess import sys import tkinter from functools import partial from pathlib import Path from tkinter import messagebox, ttk fr...
# Copyright 2013 VMware, 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 ...
#!/usr/bin/env python import sqlite3 import sys from collections import defaultdict from compiler import compile from gemini_constants import * import GeminiQuery from functools import wraps def compile_decorator(f): """decorator to automatically compile the eval strings returned from the filter methods""" ...
r""" Display WWANs, IP addresses, signals, properties and sms. Configuration parameters: cache_timeout: refresh interval for this module (default 5) format: display format for this module *(default '\?color=state WW: [\?if=state_name=connected ' '({signal_quality_0}% at {m3gpp_operator_name}) '...
""" Template tags for working with lists of model instances which represent trees. """ from django import template from django.db.models import get_model from django.db.models.fields import FieldDoesNotExist from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django.utils....
# copyright (c) 2018 paddlepaddle 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 app...
# -*- coding: utf-8 -*- """Unit testing for django-generic-confirmation.""" import datetime from django import forms from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User, Group from django.db import models from django.core import mail from django.core.urlre...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function try: import numpy as np HAVE_NUMPY = True except ImportError: HAVE_NUMPY = False # TODO remove numpy pass import operator from six.moves import zip from utool import util_iter from utool import util_alg from uto...
# Copyright 2013: Mirantis 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 b...
from datetime import datetime, timedelta from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.db import models from django.http import Http404 from django.shortcuts import redirect, render from django.template.defaultfilters import slugify from django.template.respons...
from collections import namedtuple # Module with all the conversion functions used for registers # # All conversion functions follow an upper case convention to differentiate them # from other regular functions. class Result(namedtuple("Result", ["register", "unit", "value"])): """ @type register: integer ...
# ----------------------------------------------------------------------------------------------------- # CONDOR # Simulator for diffractive single-particle imaging experiments with X-ray lasers # http://xfel.icm.uu.se/condor/ # -------------------------------------------------------------------------------------------...
# Copyright 2020 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...
# coding: utf-8 """ Disease Ontology Interface ~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import os import re import pickle import requests import numpy as np import pandas as pd from warnings import warn from itertools import chain from datetime import datetime # Biovida support tools from biovida.support_tools.suppor...