gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import pickle import time import datetime import unittest import locale from nose.plugins import skip from tests import utils from freezegun import freeze_time from freezegun.api import FakeDatetime, FakeDate, real_date class temp_locale(object): """Temporarily change the locale.""" def __init__(self, *tar...
#! /usr/bin/env python #Note this file (model.py) is the same as that in Benchmarks/Pilot1/Uno/uno_baseline_keras2.py except with the following change:: # #- unoBmk = benchmark.BenchmarkUno(benchmark.file_path, 'uno_default_model.txt', 'keras', #+ #mymodel_common = candle.Benchmark(file_path,os.getenv("DEFAULT_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 applicable law or agreed to in writing, software # distributed under ...
# 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...
import collections import math import cairocffi import xcffib.xproto from . import pangocffi from . import utils class TextLayout(object): def __init__(self, drawer, text, colour, font_family, font_size, font_shadow, wrap=True, markup=False): self.drawer, self.colour = drawer, colour ...
from cloudify import ctx from cloudify.exceptions import NonRecoverableError from cloudify.state import ctx_parameters as inputs import subprocess import os import re import sys import time import threading import platform from StringIO import StringIO from cloudify_rest_client import CloudifyClient from cloudify impo...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\Viele\personalWork\2019\onionSkinRenderer\ui_window.ui' # # Created: Sun Sep 6 19:00:41 2020 # by: pyside2-uic running on PySide2 2.0.0~alpha0 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, Qt...
# -*- coding: utf-8 -*- import functools import sys from argparse import ArgumentParser import tensorflow as tf from pprint import pformat from tensorflow.contrib.framework import arg_scope, add_arg_scope import tfsnippet as spt from tfsnippet.examples.utils import (MLResults, sa...
# -*- coding: utf-8 -*- """POSIX timestamp implementation.""" import decimal from dfdatetime import definitions from dfdatetime import factory from dfdatetime import interface class PosixTimeEpoch(interface.DateTimeEpoch): """POSIX time epoch.""" def __init__(self): """Initializes a POSIX time epoch.""" ...
#!/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 descriptor wallet function.""" from test_framework.test_framework import BitcoinTestFramework fro...
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms.""" from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestCStepping(TestBase): mydir = TestBase.compute_...
import os import sys import time import math import numpy as np import theano import theano.tensor as T import theano.tensor.shared_randomstreams from theano.tensor.signal import downsample from util import datapy, color, paramgraphics #from optimization import optimizer from optimization import optimizer_separated ...
# 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 the Li...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
from filebeat import BaseTest import os import time import unittest """ Tests for the prospector functionality. """ class Test(BaseTest): def test_ignore_older_files(self): """ Should ignore files there were not modified for longer then the `ignore_older` setting. """ sel...
import json import datetime from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse from django.shortcuts import render, get_object_or_404, redirect from django.template import loader, Context from django.contrib.sites.models import Site from django.contrib.auth.decorators import lo...
# -*- test-case-name: examplegame.test.test_mice,examplegame.test.test_japanese -*- import random from zope.interface import implements from axiom import item, attributes from imaginary import iimaginary, events, objects, action, language from examplegame import japanese class Mouse(item.Item): """ A sill...
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, with_statement from tornado import gen from tornado.log import app_log from tornado.stack_context import (StackContext, wrap, NullContext, StackContextInconsistentError, ExceptionStackContext, run...
import os import pytest import responses import shutil from django.conf import settings from django.contrib.auth.models import User from django.db.models.signals import post_save from mock import patch from unicoremc.models import Project, publish_to_websocket from unicoremc.tests.base import UnicoremcTestCase @py...
import numpy as np import scipy.sparse as sp from sklearn.datasets import make_circles from sklearn.decomposition import PCA, KernelPCA from sklearn.linear_model import Perceptron from sklearn.metrics.pairwise import rbf_kernel from sklearn.model_selection import GridSearchCV from sklearn.pipeline import Pipeline from ...
# Copyright 2020 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. """Functions that modify resources in protobuf format. Format reference: https://cs.android.com/android/platform/superproject/+/master:frameworks/base/tools/...
from django.db import models from django.conf import settings from django.core.exceptions import ValidationError from polymorphic import PolymorphicModel from django.db.models import F from django.core.urlresolvers import reverse from django.contrib.auth.models import User from celery.exceptions import SoftTimeLimitExc...
from __future__ import print_function import mxnet as mx import mxnet.ndarray as nd import time import logging from utils import * def calc_potential(exe, params, label_name, noise_precision, prior_precision): exe.copy_params_from(params) exe.forward(is_train=False) ret = 0.0 ret += (nd.norm( ...
from main import test from random import choice from collections import deque class BefungeInterpreter(object): def __init__(self, code, start_compiler=True): self._queue = deque() self._code = code self._direction = ">" self._pointer = (0, 0) self._code_map = self._generat...
""" Module for application's configuration management. The class is usually a base class for particular command line interface. The Config class handles configuration based on a configuration file while defined command line options override values from the config file. Instance of Config is a store of application's ...
import re import pytest # For 'testdir' fixture, mostly pytest_plugins = "pytester" class Test_pytest_collect_file(object): def test_only_loads_dot_py_files(self, testdir): testdir.makepyfile( somefile=""" def hello_how_are_you(): pass """ ) ...
# Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # 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 ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack Foundation # 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 m...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
from __future__ import absolute_import import os os.environ['PYTHONINSPECT'] = '1' from pdb import pm import ctypes import socket import struct import subprocess import random from pprint import pprint SO_ATTACH_FILTER = 26 class BpfProgram(ctypes.Structure): _fields_ = [ ('bf_len', ctypes.c_int), ...
# Copyright 2016 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 a...
"""Test Konnected setup process.""" from unittest.mock import patch import pytest from homeassistant.components import konnected from homeassistant.components.konnected import config_flow from homeassistant.config import async_process_ha_core_config from homeassistant.const import HTTP_NOT_FOUND from homeassistant.se...
# -*- coding: utf-8 -*- """ CuttlePool. :license: BSD 3-clause, see LICENSE for details. """ __version__ = '0.10.0-dev' try: import threading except ImportError: import dummy_threading as threading import time import warnings import weakref _OVERFLOW = 0 _TIMEOUT = None class CuttlePool(object): """ ...
# 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...
""" The :mod:`surprise.prediction_algorithms.algo_base` module defines the base class :class:`AlgoBase` from which every single prediction algorithm has to inherit. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from .. import similarities as sims from...
#!/usr/bin/env python from __future__ import print_function import sys import os import pmagpy.pmag as pmag def main(): """ NAME make_magic_plots.py DESCRIPTION inspects magic directory for available plots. SYNTAX make_magic_plots.py [command line options] INPUT mag...
from __future__ import division import datetime from django.conf import settings from django.db import models from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ # from django.contrib.contenttypes import generic from django.db.models.signals import m2m_changed from...
from __future__ import print_function from __future__ import absolute_import import unittest import responses import requests from .requests_patch import patched_extract_cookies_to_jar from terminalone import T1, filters mock_credentials = { 'username': 'user;', 'password': 'password', 'api_key': 'api_ke...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os import itertools import numpy as np from astropy.io import fits from astropy.wcs import WCS from astropy.utils.data import get_pkg_dat...
# -*- coding: utf-8 -*- import httplib as http from flask import request from django.core.exceptions import ValidationError from framework import forms, status from framework.auth import cas from framework.auth.core import get_user, generate_verification_key from framework.auth.decorators import block_bing_preview, ...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from compas.geometry import scale_vector from compas.geometry import normalize_vector from compas.geometry import add_vectors from compas.geometry import subtract_vectors from compas.geometry import cross_vecto...
# vim: set et sw=4 sts=4 fileencoding=utf-8: # # Python camera library for the Rasperry-Pi camera module # Copyright (c) 2013-2017 Dave Jones <dave@waveform.org.uk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # ...
''' Significant lifting from https://jmetzen.github.io/2015-11-27/vae.html ''' import time import numpy as np import tensorflow as tf from tensorflow.python.ops import rnn import random import matplotlib.pyplot as plt import re, string from sklearn.feature_extraction.text import CountVectorizer from collections impo...
#!/usr/bin/env python # # 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 "Li...
# 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...
# # 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 # ...
""" Methods related to fussing with a catalog""" import numpy as np from astropy.coordinates import SkyCoord from astropy.cosmology import Planck15 as cosmo from astropy.table import Table from astropy import units from frb.galaxies.defs import valid_filters import warnings from IPython import embed def clean_heasa...
from decimal import Decimal as D import hmac from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db import transaction from django.db.models import Sum from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from treeb...
# Copyright 2018 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...
import pickle from copy import deepcopy from indra.statements import * from indra.tools import assemble_corpus as ac a = Agent('a', db_refs={'HGNC': '1234', 'TEXT': 'a'}) b = Agent('b', db_refs={'UP': 'P15056', 'TEXT': 'b'}) c = Agent('c', db_refs={'FPLX': 'XXX', 'TEXT': 'c'}) d = Agent('d', db_refs={'TEXT': 'd'}) e ...
# Copyright 2013 Lars Butler & individual contributors # # 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...
from __future__ import absolute_import, print_function, division import copy import traceback as tb import warnings import numpy from six import integer_types from six.moves import xrange import theano from theano.compat import PY3 from theano.scalar import ComplexError, IntegerDivisionError from theano.gof import Co...
''' MAP Client Plugin Step ''' import os from PySide import QtGui from PySide import QtCore from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint from mapclientplugins.pelvislandmarkshjcpredictionstep.configuredialog import ConfigureDialog from mapclientplugins.pelvislandmarkshjcpredictionstep.hjcpre...
""" Interactive phase plane plot for Euler equations with ideal gas, Euler equations with Tammann equations of state and acoustic equations. """ import sys, os import numpy as np from scipy.optimize import fsolve import matplotlib.pyplot as plt from ipywidgets import widgets from ipywidgets import interact from IPython...
# Copyright (c) 2017, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Peer management.''' import asyncio import logging import random import socket import ssl import time from collections import defaultdict, Counter from fun...
from unicodedata import category from django.core.management.base import BaseCommand, CommandError from workflows.models import Category, AbstractWidget, AbstractInput, AbstractOutput, AbstractOption from django.core import serializers from optparse import make_option import uuid import os import sys from django.conf i...
# Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # 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....
"""Unit test for monitor. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import io import json import os import shutil import tempfile import unittest import mock import treadmill from treadm...
import json from base64 import b64encode from datetime import date, time, datetime from .._compat import PY2, integer_types, to_unicode, to_bytes, basestring from ..adapters.base import SQLAdapter, NoSQLAdapter from ..helpers.classes import Reference, SQLCustomType from ..helpers.methods import bar_encode from ..helper...
#!/usr/bin/env python # # Generated Tue Feb 1 14:34:02 2011 by generateDS.py version 2.5a. # import sys import peoplesup as supermod etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # l...
"""Working day tools """ import warnings import ephem import pytz from calendar import monthrange from datetime import date, timedelta, datetime from math import pi from dateutil import easter from lunardate import LunarDate from calverter import Calverter MON, TUE, WED, THU, FRI, SAT, SUN = range(7) class Calenda...
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
# Copyright 2013-2014 The Meson development team # 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 agree...
""" Hubs and authorities analysis of graph structure. """ #!/usr/bin/env python # Copyright (C) 2008-2010 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. # NetworkX:http://networkx.lanl.gov/ __author__ =...
# 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...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals import numpy as np import collections UNKNOWN = np.nan R = 1 FR = 2 F = 3 FL = 4 L = 5 BL = 6 B = 7 BR = 8 U = 9 UF = 10 UB = 11 UL = 12 UR = 13 UFL = 14 UFR = 15 UBL = 16 UBR = 17 D = 18 DF = 19 D...
"""Functions to simulate scans and maps.""" import numpy as np import numpy.random as ra import os from astropy.io import fits from astropy.table import Table, vstack import astropy.units as u from collections.abc import Iterable from .io import mkdir_p, locations from .utils import tqdm, jit from astropy.coordinate...
# 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...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2017 Battelle Energy Alliance, 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 t...
#!/usr/bin/env python3 # Author: Robert Collazo <rob@helpsocial.com> # Author: Jacob Schofield <jacob@helpsocial.com> # Copyright (c) 2017 HelpSocial, Inc. # See LICENSE for details import getpass import os import sys try: import ujson as json except ImportError: import json from argparse import ArgumentPar...
import numpy as np import os class ARLagResults(object): """ Results are from R vars::VARselect for sunspot data. Comands run were var_select <- VARselect(SUNACTIVITY, lag.max=16, type=c("const")) """ def __init__(self, type="const"): # order of results is AIC, HQ, SC, FPE if ...
import ipaddress import os import threading from enum import Enum from functools import lru_cache from pathlib import Path from typing import Iterable, Callable, Optional, Tuple, List, Any, BinaryIO import certifi from OpenSSL.crypto import X509 from cryptography.hazmat.primitives.asymmetric import rsa from OpenSSL ...
# Copyright 2015 IBM Corp. # 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...
from __future__ import print_function import unittest import warnings warnings.resetwarnings() warnings.simplefilter("ignore") class TestBasic(unittest.TestCase): def setUp(self): import warnings super().setUp() warnings.simplefilter('ignore') def test_table(self): from r...
""" Various distributions from the database. """ import logging from collections import Counter, defaultdict from . import db from .api import get_documents, get_submissions, get_submission from .counter_utils import normalize logger = logging.getLogger(__name__) ## Document distributions def document_uniform(corpus...
"""Config flow for HomeKit integration.""" import random import string import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import SOURCE_IMPORT from homeassistant.const import ( ATTR_FRIENDLY_NAME, CONF_DOMAINS, CONF_ENTITIES, CONF_ENTITY_ID, CONF_NA...
# Copyright 2013 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 # # Unless required by applicable law or agr...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Modules for RAG. """ import torch import torch.cuda import torch.nn import torch.nn.functional as F from typing import...
# Copyright 2012, Nachi Ueno, NTT MCL, 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 # # Unles...
# 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 ...
# -*- coding: utf-8 -*- """Module to provide the backend for the aws federation proxy service""" from __future__ import print_function, absolute_import, unicode_literals, division import json import time import logging import requests from six.moves.urllib.parse import quote_plus from yamlreader import data_merge f...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import unittest from caffe2.proto import caffe2_pb2 from caffe2.python import core, workspace, test_util, model_helper, brew, build @unittest.skipIf...
""" Exmples of usage with tests. Tests in this file represent examples taken from JSON-RPC specification. http://www.jsonrpc.org/specification#examples """ import sys import json from ..manager import JSONRPCResponseManager from ..jsonrpc2 import JSONRPC20Request, JSONRPC20BatchRequest if sys.version_info < (2, 7):...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # 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 # # Unle...
import json import logging import os.path import tornado.ioloop import tornado.web import tornado.websocket from smokematic.baster import Baster from smokematic.blower import Blower from smokematic.probe import Probe from smokematic.controller import Controller class StatusWebSocket(tornado.websocket.WebSocketHandle...
# Copyright 2013 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 logging from telemetry.core import exceptions from telemetry.timeline import trace_data from telemetry.timeline import model class InspectorNetworkE...
# Copyright (c) 2015 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 or agreed to in writ...
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
#!/usr/bin/python # ex:set fileencoding=utf-8: from __future__ import unicode_literals from django.contrib.admin.utils import NestedObjects from django.contrib.auth import get_permission_codename # from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from dj...
import os from datetime import datetime # Django settings for tapiriik project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS ALLOWED_HOSTS = ["tapiriik.com", ".tapiriik.com", "localhost"] USE_X_FORWARDED_HOST = True # Local time zone for this in...
""" This software is an implementation of Deep MRI brain extraction: A 3D convolutional neural network for skull stripping You can download the paper at http://dx.doi.org/10.1016/j.neuroimage.2016.01.024 If you use this software for your projects please cite: Kleesiek and Urban et al, Deep MRI brain extraction: A 3...
from weblib.error import ResponseNotValid from tests.util import BaseGrabTestCase, build_grab, build_spider from grab import Grab from grab.spider import base from grab.spider import Spider, Task, SpiderMisuseError, NoTaskHandler from grab.spider.error import SpiderError class SimpleSpider(Spider): def task_baz(...
"""Interface specification for publishing and receiving data in MCL. This module defines an interface for publishing and receiving data in MCL. This is done by providing abstract objects for broadcasting and listening for data. The interface defined by these objects helps insure new interface implementations will inte...
""" This module contains data types used by Scrapy which are not included in the Python Standard Library. This module must not depend on any module outside the Standard Library. """ import copy import six import warnings from collections import OrderedDict from scrapy.exceptions import ScrapyDeprecationWarning cla...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
# coding: utf-8 import json import os import re from datetime import datetime, date, time, timedelta from bson import json_util from django.conf import settings from django.core.files.base import File, ContentFile from django.core.files.temp import NamedTemporaryFile from django.core.files.storage import get_storage_c...
from serializer import Serializer from collections import deque serializer = Serializer() # general errors -ERR wrong_arguements = 'wrong number of arguments for \'%s\' command' not_integer_or_out_range = 'value is not an integer or out of range' not_float_or_out_range = 'value is not a float or out of range' # spec...
RESPONSE_PEER_GROUPS = [ "Marketing", "usa", "101", "Program Manager", "Channel Administrator", "Chief Marketing Officer", "", "Chief Strategy Officer", "CN=Andrew", "BitLockerUsersComputers" ] RESPONSE_USER_LABELS = [ "privileged_user", "service_account" ] RESPONSE_WATCH...