gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from markdown import markdown import bleach from flask import current_app, request from flask_login import UserMixin, AnonymousUse...
# import os import argparse import sqlite3 import re from datetime import datetime import time import os.path as op now = datetime.now() # dd/mm/YY H:M:S d2 = now.strftime("%B %d, %Y %H:%M:%S") def create_table(conn, sample_names): c = conn.cursor() data_columns = ['seqID text', 'source_file text', 'type tex...
# Copyright 2013 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...
# 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 th...
# # 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...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-16 23:12:48 import sys import inspect import functools import fractions import six from six import add_metaclass, iteritems from pyspider.libs.lo...
"""Bio-inspired optimisation algorithms.""" from concurrent import futures import datetime import operator import random import warnings import sys from deap import base, creator, tools import numpy import matplotlib.pylab as plt from external_programs.profit import run_profit warning_string = """ optimizers.py is ...
import json from django.contrib.admin.views.decorators import staff_member_required from django.db.models import Q from django.http import * from django.shortcuts import * from django.template import Context from django.template.loader import get_template from alphacabbage.django.helpers import get_pair_or_404 from alp...
# -*- coding: iso-8859-15 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2010 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of thi...
# 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...
# -*- coding: utf-8 -*- """ pygments.formatters.latex ~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for LaTeX fancyvrb output. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division from pygments.formatter import Forma...
# # 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...
# IM - Infrastructure Manager # Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia # # 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 Foundation, either version 3 of the License, or # (at you...
""" Module for jenkinsapi Node class """ import json import logging import xml.etree.ElementTree as ET import time from jenkinsapi.jenkinsbase import JenkinsBase from jenkinsapi.custom_exceptions import PostRequired, TimeOut from jenkinsapi.custom_exceptions import JenkinsAPIException from six.moves.urllib.parse impo...
#!/usr/bin/env python # -*- python -*- ################################################################################ #BEGIN_LEGAL # #Copyright (c) 2019 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may...
# Copyright 2011 Isaku Yamahata <yamahata@valinux co jp> # 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...
# Copyright 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 requ...
#!/usr/bin/env python import argparse import cPickle import gzip import bz2 import logging import os import numpy import tables from collections import Counter from operator import add from numpy.lib.stride_tricks import as_strided parser = argparse.ArgumentParser( description=""" This takes a list of .txt or ....
import sys import math import array from .utils import ( db_to_float, ratio_to_db, register_pydub_effect, make_chunks, audioop, get_array_type, get_min_max_value ) from .silence import split_on_silence from .exceptions import TooManyMissingFrames, InvalidDuration if sys.version_info >= (3, ...
# sql/coercions.py # Copyright (C) 2005-2022 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: https://www.opensource.org/licenses/mit-license.php from __future__ import annotations import collections.abc as collections_abc impo...
#!/usr/bin/env python # Copyright 2014 Stanford University and Los Alamos National Security, 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/LICENS...
from distutils.version import StrictVersion from rocker.restclient import Request, SocketError import getopt import json import os import pkg_resources import sys MIN_LABELS_VERSION = "1.17" # Source: https://svn.blender.org/svnroot/bf-blender/trunk/blender/build_files/scons/tools/bcolors.py # TODO Maybe use a libra...
import datetime from pymongo.errors import OperationFailure try: import unittest2 as unittest except ImportError: import unittest from nose.plugins.skip import SkipTest import pymongo from bson.tz_util import utc from mongoengine import ( connect, register_connection, Document, DateTimeField ) from m...
""" self-contained to write legacy storage pickle files To use this script. Create an environment where you want generate pickles, say its for 0.20.3, with your pandas clone in ~/pandas . activate pandas_0.20.3 cd ~/ $ python pandas/pandas/tests/io/generate_legacy_storage_files.py \ pandas/pandas/tests/io/data/l...
# Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of PyCha. # # PyCha is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License,...
#!/usr/bin/env python3 # Copyright (c) 2020-2021 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 addr relay """ import random import time from test_framework.messages import ( CAddress, ...
'''Views for pubman. These are: media_object_detail: view media objects article_list_view: called by other views that process article lists index: suitable frontpage of website view that lists latest published articles with frontpage set to True, ordered by publication date. ta...
from contextlib import contextmanager from functools import reduce import sys import threading import numpy as np from .cudadrv.devicearray import FakeCUDAArray, FakeWithinKernelCUDAArray from .kernelapi import Dim3, FakeCUDAModule, swapped_cuda_module from ..errors import normalize_kernel_dimensions from ..args impo...
"""Class to hold all camera accessories.""" import asyncio from datetime import timedelta import logging from haffmpeg.core import HAFFmpeg from pyhap.camera import ( STREAMING_STATUS, VIDEO_CODEC_PARAM_LEVEL_TYPES, VIDEO_CODEC_PARAM_PROFILE_ID_TYPES, Camera as PyhapCamera, ) from pyhap.const import CA...
import inspect import uuid from properties import Properties from weakref import WeakKeyDictionary class PostgreSQLTypes(object): char = 'CHAR' boolean = 'BOOLEAN' int = 'INT' bigint = 'BIGINT' real = 'real' def make_this_descriptor(desc_class): desc_class.__get__ = dunder_get desc_class...
"""Google config for Cloud.""" import asyncio import logging from hass_nabucasa import Cloud, cloud_api from hass_nabucasa.google_report_state import ErrorResponse from homeassistant.components.google_assistant.const import DOMAIN as GOOGLE_DOMAIN from homeassistant.components.google_assistant.helpers import Abstract...
#!/usr/bin/env python3 # Copyright (c) 2014-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 fundrawtransaction RPC.""" from decimal import Decimal from itertools import product from te...
from django.contrib.contenttypes.generic import GenericRelation from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.fields.related import ManyToManyRel, RelatedField from django.db.models.related import RelatedObject from django.db.models.fields.related import a...
# -*- coding: utf-8 -*- # Copyright 2016 Mirantis, Inc. # # 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 Foundation; either version 2 of the License, or # (at your option) any later version...
#!/usr/bin/env python # # Project: # glideinWMS # # File Version: # # Description: # This is the main of the glideinFrontend # # Arguments: # $1 = work_dir # # Author: # Igor Sfiligoi # import os import sys import fcntl import subprocess import traceback import signal import time import string import logging ...
# 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 ...
"""Pythonic command-line interface parser that will make you smile. * http://docopt.org * Repository and issue-tracker: https://github.com/docopt/docopt * Licensed under terms of MIT license (see LICENSE-MIT) * Copyright (c) 2013 Vladimir Keleshev, vladimir@keleshev.com """ import sys import re __all__ = ['doco...
# -*- coding: utf-8 -*- # example used: http://pika.readthedocs.io/en/0.10.0/examples/asynchronous_publisher_example.html import logging import pika import json LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' '-35s %(lineno) -5d: %(message)s') LOGGER = logging.getLogger(__name__)...
#!/usr/bin/python import sys, getopt, urllib, urllib2 #----------------FlagCreator---------------------- # FlagCreator by Matthew Grant # This program helps a develop in Python'with # setting up flags/switches for their program # Just answer a couple of questions and this # program will write the code for the flags/sw...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2006-2009 Frank Scholz <coherence@beebits.net> # Modified by Colin Laplace, added is_watched() function # Copyright 2008 Adroll.com and Valentino Volonghi <dialtone@adroll.com> # Modified by Valentino Volonghi. # * Increased...
# Copyright 2013 Red Hat, 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...
import inspect import json import logging from json import JSONDecodeError from pathlib import Path from typing import Optional, TextIO, Union, ChainMap, List, Tuple, Dict, TYPE_CHECKING import asyncio import itertools import sys import jsonschema from lightbus.exceptions import ( InvalidApiForSchemaCreation, ...
#!/usr/bin/env python """ dev.py [OPTIONS] [-- ARGS] Run tests, building the project first with Meson Examples:: $ python dev.py $ python dev.py -s {SAMPLE_SUBMODULE} $ python dev.py -t {SAMPLE_TEST} $ python dev.py --ipython $ python dev.py --python somescript.py $ python dev.py --bench ...
''' description: Create a db entry for a VOEvent license: APACHE 2.0 author: Ronald van Haren, NLeSC (r.vanharen@esciencecenter.nl) ''' import voeventparse as vp from pyfrbcatdb import dbase from pyfrbcatdb.FRBCat import FRBCat_add from pyfrbcatdb.FRBCat import parse_mapping from pyfrbcatdb.logger imp...
from __future__ import division import types import numpy as np import scipy.integrate as integrate from pgmpy.factors.base import BaseFactor from pgmpy.factors.distributions import GaussianDistribution, CustomDistribution class ContinuousFactor(BaseFactor): """ Base class for factors representing various ...
# Copyright 2013 OpenStack Foundation # Copyright 2013 Red Hat, 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...
import unittest import mock import numpy import six import chainer from chainer import _backprop_utils from chainer.backends import cuda from chainer import testing from chainer.testing import attr def make_array(start, shape, dtype): size = numpy.product(shape, dtype='i') a = numpy.arange(start, start + si...
#!/usr/bin/env python """Unit tests run as PYTHONPATH=../../.. python3 ./test_valve.py.""" # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
#! /usr/bin/env python2 # # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) Michigan State University, 2009-2015. It is licensed under # the three-clause BSD license; see LICENSE. Contact: ctb@msu.edu # # pylint: disable=invalid-name,missing-docstring,no-member from khmer import u...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2014 Measurement Lab # # 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 ...
from dataclasses import dataclass import itertools from os import PathLike from typing import Iterable, Iterator, Optional, Union, TypeVar, Dict, List import logging import warnings import torch.distributed as dist from allennlp.data.instance import Instance from allennlp.common import util from allennlp.common.regis...
# -*- coding: utf-8 -*- import httplib as http import logging from bs4 import BeautifulSoup from flask import request from framework.mongo.utils import to_mongo_key from framework.exceptions import HTTPError from framework.auth.utils import privacy_info_handle from framework.auth.decorators import must_be_logged_in ...
import atexit import logging import re import threading from typing import Set from uqbar.objects import new import supriya.exceptions from supriya.commands import ( FailResponse, GroupQueryTreeRequest, NotifyRequest, QueryTreeGroup, QueryTreeSynth, QuitRequest, SyncRequest, ) from supriya...
# -*- coding: utf-8 -*- import httplib as http import os from flask import send_from_directory from framework import status from framework import sentry from framework.routing import Rule from framework.flask import redirect from framework.routing import WebRenderer from framework.exceptions import HTTPError from fra...
''' An implementation for creating hierarchical word clusters based on syntactic context ("Brown clusters"). This is based on the following papers. * Peter F. Brown; Peter V. deSouza; Robert L. Mercer; T. J. Watson; Vincent J. Della Pietra; Jenifer C. Lai. 1992. Class-Based n-gram Models of Natural Language. Co...
""" @package mi.instrument.noaa.driver @file marine-integrations/mi/instrument/noaa/particles.py @author Pete Cable @brief Particles for BOTPT Release notes: """ import re import time from mi.core.common import BaseEnum from mi.core.instrument.data_particle import DataParticle, DataParticleKey, CommonDataParticleType...
"""Support for Sensibo wifi-enabled home thermostats.""" from __future__ import annotations import asyncio from aiohttp.client_exceptions import ClientConnectionError import async_timeout from pysensibo.exceptions import AuthenticationError, SensiboError import voluptuous as vol from homeassistant.components.climate...
## Python control script for 4x4x4 LED Cube ## John Caswell, 2014 import serial import time import struct import random import threading from bottle import route, get, post, request, run, redirect, static_file ## Configuration: set these to match your setup interface = "0.0.0.0" # Interface to listen on, 0.0....
# -*- coding: utf-8 -*- """ flaskext.mongoobject ~~~~~~~~~~~~~~~~~~~~ Add basic MongoDB support to your Flask application. Inspiration: https://github.com/slacy/minimongo/ https://github.com/mitsuhiko/flask-sqlalchemy :copyright: (c) 2011 by Daniel, Dao Quang Minh (dqminh). :license: MIT, see LICENSE for more detail...
# 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...
from datetime import date import dateutil import numpy as np import pytest from pandas.compat import lrange import pandas as pd from pandas import ( DataFrame, DatetimeIndex, Index, Timestamp, date_range, offsets) import pandas.util.testing as tm from pandas.util.testing import assert_almost_equal randn = np.ra...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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...
#!/usr/bin/env python import argparse import os import sys import json import logging import shutil import utils import re LOGGER = None def merge_results(outdir, varsim_tp, varsim_fn, vcfeval_tp, varsim_fp, vcfeval_tp_predict): ''' generate augmented TP, FN, FP :param varsim_tp: :pa...
# 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 -* # Copyright (c) 2011-2015, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
from __future__ import absolute_import import time from types import TracebackType from decimal import Decimal import pytest from tornado import gen, ioloop from concurrent.futures import Future, as_completed, TimeoutError from threadloop import ThreadLoop from threadloop.exceptions import ThreadNotStartedError @p...
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/paraparser.py __version__=''' $Id: paraparser.py 3774 2010-09-08 15:11:10Z rgbecker $ ''' __doc__='''The parser used to process markup within ...
#!/usr/env/python from collections import namedtuple import sequence # ================================================================ # Data Structures # ================================================================ _fields = [ 'fromSeq', 'startIdx', 'endIdx', 'label', 'data' ] PatternInstance = namedtupl...
# coding: utf-8 # Copyright (c) Henniggroup. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import """ Compute the reduced matching lattice vectors for heterostructure interfaces as described in the paper by Zur and McGill: Journal o...
#!/usr/bin/python # This module calculates ele and van der Waals interactions at points on a grid """ alchemicalGrids This module provides a class that calculates ele and Lennard-Jones interactions at points on a grid. """ import os, time, gzip import numpy as np class gridCalculation: def __init__(self, \ ...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010-2011 OpenStack Foundation. # Copyright 2012 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division import filecmp import os from PIL import Image import flask_fs as fs from flask_fs.mongo import FileField, ImageField from flask_mongoengine import MongoEngine import pytest db = MongoEngine() class MongoEngineTestCase(object): @pytes...
# Copyright 2020 Google 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 to in writing, ...
import datetime import json from datetime import date from django.contrib import messages from django.contrib.auth import views as authviews from django.contrib.auth.tokens import default_token_generator from django.contrib.auth import authenticate, get_user_model, login, update_session_auth_hash from django.contrib.a...
# Copyright 2014 Novo Nordisk Foundation Center for Biosustainability, DTU. # # 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 requi...
from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple from unittest import mock from django.conf import settings from django.utils.timezone import now as timezone_now from zerver.lib.actions import ( do_add_submessage, do_create_realm, do_delete_messages, do_set_...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Ground.cad_passport' db.alter_column(u'build_ground', ...
# ----------------------------------------------------------------------------- # ply: lex.py # # Author: David M. Beazley (dave@dabeaz.com) # Modification for pyglet by Alex Holkner (alex.holkner@gmail.com) # Modification for ctypesgen by Tim Maxwell (timmaxw@gmail.com) <tm> # # Copyright (C) 2001-2006, David M. Beazl...
import numpy as np from cs231n.layers import * from cs231n.rnn_layers import * class CaptioningRNN(object): """ A CaptioningRNN produces captions from image features using a recurrent neural network. The RNN receives input vectors of size D, has a vocab size of V, works on sequences of length T, has an RN...
# Copyright (c) 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. """Top-level presubmit script for Blink. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
# 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 unittest import zen class FlowTestCase(unittest.TestCase): def test_min_cut(self): #sample graph G = zen.DiGraph() G.add_node('a') G.add_node('b') G.add_node('c') G.add_node('d') G.add_node('e') G.add_node('f') G.add_node('g') G.add_node('h') G.add_edge('a','b',weight=10) G.add_edge('...
import os from unittest.mock import patch import pytest from PIL import Image as PILImage from sigal import init_logging from sigal.gallery import Image from sigal.image import ( generate_image, generate_thumbnail, get_exif_data, get_exif_tags, get_iptc_data, get_image_metadata, get_size, ...
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ from __future__ import unicode_literals import inspect from collections im...
from __future__ import division, absolute_import, print_function import warnings import numpy as np from numpy.testing import ( run_module_suite, assert_, assert_raises, assert_equal, assert_warns, assert_no_warnings, assert_array_equal, assert_array_almost_equal, suppress_warnings ) fr...
import json import os from mock import patch from tests import FlexGetBase, MockManager from flexget import __version__ from flexget.manager import Manager from flexget.api import app, API_VERSION from flexget.webserver import User from flexget.utils.database import with_session @with_session def api_key(session=No...
# Copyright 2013 Canonical 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 ...
# Copyright 2016 Twitter. 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 agree...
from __future__ import print_function import numpy as np import scipy.sparse as sp import warnings from abc import ABCMeta, abstractmethod from . import libsvm, liblinear from . import libsvm_sparse from ..base import BaseEstimator, ClassifierMixin, ChangedBehaviorWarning from ..preprocessing import LabelEncoder from...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import re from django.template import Context, loader from django.utils import datetime_safe, six from haystack.exceptions import SearchFieldError from haystack.utils import get_model_ct_tuple class NOT_PROVIDED: ...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ========= fMRI: FSL ========= A workflow that uses fsl to perform a first level analysis on the nipype tutorial data set:: python fmri_fsl.py First tell python where to fin...
""" A dataset that applies a transformation on the fly as examples are requested. """ __authors__ = "Ian Goodfellow" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow"] __license__ = "3-clause BSD" __maintainer__ = "LISA Lab" __email__ = "pylearn-dev@googlegroups" from theano...
#!/usr/bin/python # # occi_api.py - common functions, classes, and variables for Vcycle # # THIS FILE NEEDS UPDATING FOR Vcycle 3.0 CHANGES! # # Andrew McNab, University of Manchester. # Luis Villazon Esteban, CERN. # Copyright (c) 2013-5. All rights reserved. # # Redistribution and use in source and binary forms...
################################################################################ # 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...
#!/usr/bin/env python """ Copyright (c) 2021 Alex Forencich 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, merg...
# -*- coding: utf-8 -*- """ Tests of the neo.core.recordingchannel.RecordingChannel class """ # needed for python 3 compatibility from __future__ import absolute_import, division, print_function try: import unittest2 as unittest except ImportError: import unittest import numpy as np import quantities as pq ...
# 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 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...