gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # Given a certificate chain that the log won't accept, try to fix it up # into one that will be accepted. # Based on pyasn1 example code. from __future__ import print_function from base64 import b64encode from ct.crypto.pem import PemError from ct.crypto.pem import from_pem from pyasn1 import d...
''' BSD 3-Clause License Copyright (c) 2019, Donald N. Bockoven III 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 ...
import os import tempfile from io import StringIO from wsgiref.util import FileWrapper from django import forms from django.conf.urls import url from django.contrib import admin from django.contrib.admin import BooleanFieldListFilter from django.contrib.admin.views.main import ChangeList from django.contrib.auth.admin...
# Copyright 2018 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 -*- """ """ import os import re import copy import odml import csv import datetime import xlrd from future.utils import iteritems from six import string_types # Workaround Python 2 and 3 unicode handling. try: unicode = unicode except NameError: unicode = str class OdmlTable(object): ...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Run tests in the farm sub-directory. Designed for nose.""" import difflib import filecmp import fnmatch import glob import os import re import shutil import sy...
# Copyright 2017-present Open Networking 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 # # Unless required by applicable law or agr...
from Config import JConfig from Config import JConfigEnum from Config import JConfigInt from Config import JConfigString from Config import JConfigHex from Config import JConfigBool from Config import JConfigTristate from Item import JConfigItem class Dialog: def __init__(self): pass @staticmethod ...
#!/usr/bin/env python """ CERN@school - Sorting Clusters See the README.md for more information. """ # Import the code needed to manage files. import os, inspect, glob, argparse #...for the logging. import logging as lg #...for file manipulation. from shutil import rmtree, copyfile # Import the JSON library. ...
# -*- coding: utf-8 -*- # Copyright 2022 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...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module contains classes to wrap Python VTK to make nice molecular plots. """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer__ ...
# 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 ...
import contextlib import itertools from sqlalchemy import bindparam from sqlalchemy import event from sqlalchemy import exc as sa_exc from sqlalchemy import func from sqlalchemy import literal_column from sqlalchemy import testing from sqlalchemy.ext import baked from sqlalchemy.orm import aliased from sqlalchemy.orm ...
import json import logging import webapp2 from datetime import datetime from google.appengine.ext import ndb from controllers.api.api_base_controller import ApiBaseController from database.event_query import EventListQuery from helpers.award_helper import AwardHelper from helpers.event_insights_helper import EventI...
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import gevent.monkey gevent.monkey.patch_all() import logging import tempfile from pprint import pformat import coverage import fixtures import testtools from testtools import content from flexmock import flexmock from webtest import TestA...
from __future__ import division, print_function, absolute_import import numpy import pandas from sklearn.utils import column_or_1d from hep_ml.commonutils import check_sample_weight, compute_cut_for_efficiency, compute_knn_indices_of_signal from hep_ml.metrics_utils import compute_bin_weights, compute_bin_efficiencie...
# Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Documentation on PRESUBMIT.py can be found at: # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts import os import subproc...
from ..errors import InvalidVersion from ..utils import check_resource, minimum_version from ..utils import version_lt from .. import utils class NetworkApiMixin(object): def networks(self, names=None, ids=None, filters=None): """ List networks. Similar to the ``docker networks ls`` command. ...
data = ( 'mya', # 0x00 'myag', # 0x01 'myagg', # 0x02 'myags', # 0x03 'myan', # 0x04 'myanj', # 0x05 'myanh', # 0x06 'myad', # 0x07 'myal', # 0x08 'myalg', # 0x09 'myalm', # 0x0a 'myalb', # 0x0b 'myals', # 0x0c 'myalt', # 0x0d 'myalp', # 0x0e 'myalh', # 0x0f 'myam', # ...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes for calculating the ewald sum of a structure. """ from math import pi, sqrt, log from datetime import datetime from copy import deepcopy, copy from warnings import warn import ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import absolute_import import io from builtins import * from lxml import etree from lxml import objectify import json import sys sys.path.append('..') import pyreqif.pyreqif from pprint import pprint import re def pretty(d, indent=0): for key, valu...
import sys import numpy as np from ..extern.six import string_types from ..extern.six.moves import range from ..header import Header from ..util import (_is_pseudo_unsigned, _unsigned_zero, _is_int, _normalize_slice, lazyproperty) from .base import DELAYED, _ValidHDU, ExtensionHDU class _ImageBa...
import os import warnings from functools import lru_cache from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Set from typing import Tuple from typing import Union import py import _pytest._code from _pytest._code.code import ExceptionChainRepr from _p...
# 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 import re import threading import six if six.PY3: import queue # pylint: disable=wrong-import-order else: import Queue as queue # pylint...
''' Author: Christoph Garbers keras layers that are needed if no CuDNN speed up is available and layers that fell out of favor in keras2 ''' from keras import backend as K from keras.engine.topology import Layer, InputSpec import numpy as np import copy import warnings from keras.layers import Conv2DTranspose from ker...
# Copyright (c) 2013-2015 Unidata. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT import logging import xml.etree.ElementTree as ET from .metadata import TDSCatalogMetadata from .http_util import create_http_session, urlopen try: from urlparse import urljoin except ImportError: ...
from django.utils.translation import ugettext as _ from dimagi.ext.jsonobject import JsonObject, StringProperty, BooleanProperty, ListProperty, DictProperty, ObjectProperty from jsonobject.base import DefaultProperty from sqlagg import CountUniqueColumn, SumColumn from sqlagg.columns import ( MonthColumn, Simpl...
""" Listener handling functionality for Empire. Handles listener startup from the database, listener shutdowns, and maintains the current listener configuration. """ import http import helpers from pydispatch import dispatcher import hashlib import sqlite3 class Listeners: def __init__(self, MainMenu, args=...
from django.core.exceptions import ValidationError try: # bis 1.8.x from django.db.models.fields.related import ReverseSingleRelatedObjectDescriptor from django.db.models.fields.related import ManyRelatedObjectsDescriptor from django.db.models.fields.related import ReverseManyRelatedObjectsDescriptor ...
#!/usr/bin/env python # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Wrapper around git blame that ignores certain commits. """ from __future__ import print_function import argparse import collection...
#!/usr/bin/python import cgi import logging import os import sys import time import urllib import urlparse import bs4 from itsdangerous import Signer """ Copyright 2011 Jon Rifkin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may ...
import argparse import sqlite3 import re import pandas as pd import numpy as np from TestScripts.doc.Structure import * from TestScripts.doc.Format import * import os.path import yaml refCoreName="" # Command to get last runid lastID="""SELECT runid FROM RUN ORDER BY runid DESC LIMIT 1 """ # Command to get last ru...
"""Code run on the client side for unstaging complete Pulsar jobs.""" import fnmatch from contextlib import contextmanager from logging import getLogger from os.path import join, relpath from json import loads from ..action_mapper import FileActionMapper from ..staging import COMMAND_VERSION_FILENAME log = getLogger...
from __future__ import unicode_literals import collections from django.contrib import auth from django.contrib.auth import models as auth_models from django.core import exceptions from django.utils import six from .. import core __all__ = ( "LoginRequired", "ActiveRequired", "StaffRequired", "SuperuserRequired...
#!/usr/bin/env python2 """ Copyright (C) 2014, Michael Trunner 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 li...
#!/usr/bin/python3 # # Copyright (C) 2011 Google 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list o...
from numpy.testing import * from scipy.interpolate import KroghInterpolator, krogh_interpolate, \ BarycentricInterpolator, barycentric_interpolate, \ PiecewisePolynomial, piecewise_polynomial_interpolate, \ approximate_taylor_polynomial import scipy import numpy as np from scipy.interpolate imp...
# Copyright 2014, Doug Wiegley (dougwig), A10 Networks # # 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...
import datetime import json import re import sys import time from email.header import Header from http.client import responses from urllib.parse import urlparse from django.conf import settings from django.core import signals, signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.j...
''' Created on 9 Mar 2015 @author: Tan Ming Sheng ''' import json, collections, Queue, time, re from scrapy.spider import Spider from scrapy import signals, Request, Selector from scrapy.contrib.loader import ItemLoader from scrapy.item import Item, Field from scrapy.exceptions import CloseSpider from bs4 import Beaut...
# Copyright (c) 2014 Hortonworks, 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 ...
# Copyright 2010-2011, Sikuli.org # Released under the MIT License. ## # This module provides a Jython interface of Sikuli Script to automate GUI # interactions. ## from __future__ import with_statement import java.io.File import time from org.sikuli.script import SikuliScript from org.sikuli.script import Match from o...
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def metric_accessors(): cars = h2o.import_file(path=pyunit_utils.locate("smalldata/junit/cars_20mpg.csv")) r = cars[0].runif() train = cars[r > .2] valid = car...
""" path.py - An object representing a path to a file or directory. Example: from path import path d = path('/home/guido/bin') for f in d.files('*.py'): f.chmod(0755) This module requires Python 2.2 or later. URL: http://www.jorendorff.com/articles/python/path Author: Jason Orendorff <jason.orendorff\x40g...
import config from gmusicapi import Mobileclient import logging from gi.repository import Gst, GLib from collections import deque from gevent import Greenlet import gevent class PlayerStates: Stopped = "Stopped" Paused = "Paused" Playing = "Playing" class RattleMediaPlayer: def __init__(self): ...
#!/usr/bin/python from math import sqrt import sys import argparse from collections import deque from struct import pack, unpack import numpy as np from osgeo import gdal gdal.UseExceptions() gdal.TermProgress = gdal.TermProgress_nocb # # NormalVector # # Calculate the normal vector of a triangle. (Unit vector perp...
from __future__ import division, unicode_literals import base64 import io import itertools import os import time from .fragment import FragmentFD from ..compat import ( compat_etree_fromstring, compat_urlparse, compat_urllib_error, compat_urllib_parse_urlparse, compat_struct_pack, compat_struc...
"""XML utilities.""" ########################################################################### # PYTHON FILE: xmlutils.py # CREATED BY: Peter Taylor (November 2002) # # Some XML utilities. # # $Header$ ########################################################################### # system libraries import copy import...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_netuitive ---------------------------------- Tests for `netuitive` module. """ import unittest import os import json import time import netuitive import datetime try: from cStringIO import StringIO except ImportError: try: from StringIO import ...
# Copyright (c) 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 # # Unless required by applicable law or agreed to...
import operator from django import template from django.template.defaultfilters import stringfilter from django.template.loader import get_template from django.utils import six register = template.Library() @register.filter @stringfilter def trim(value, num): return value[:num] @register.filter def noop(value...
#!/usr/bin/env python # # svnmerge-migrate-history-remotely.py: Remotely migrate merge history from # svnmerge.py's format to Subversion 1.5's format. # # ==================================================================== # Copyright (c) 2008 CollabNet. All rights reserved. # # This software is licensed as descr...
# Copyright 2013 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. from itertools import izip import logging import re from net import bsonrpc from net import gorpc from vtdb import cursorv3 from vtdb import dbexceptions from vtdb im...
""" Simplified "overlays" on top of TensorFlow graphs. TensorFlow graphs are often too low-level to represent our conceptual understanding of a model. This module provides abstractions to represent simplified graphs on top of a TensorFlow graph: `OverlayGraph` - A subgraph of a TensorFlow computational graph. Each no...
# # 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...
# 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 appli...
# coding: utf-8 """Tornado handlers for WebSocket <-> ZMQ sockets.""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import os import json import struct import warnings try: from urllib.parse import urlparse # Py 3 except ImportError: from urlparse impor...
import re from django.contrib.auth.models import (AbstractBaseUser, AbstractUser, BaseUserManager) from django.db import connections, models from django.db.models import Q, DO_NOTHING, SET_NULL from django.utils.translation import ugettext_lazy as _ from django.utils import time...
# Copyright (C) 2014 Napuzba [[email protected]] # Licensed under MIT license [http://openreq.source.org/licenses/MIT] import base64 import codecs import ftplib import hashlib import io import time import urllib3 import socket import os import os.path import sys from .cachemode import CacheMode from .filerequest imp...
""" File handler to support different file extensions. Uses reflectometer registry utility. The default readers are found in the 'readers' sub-module and registered by default at initialization time. To add a new default reader, one must register it in the register_readers method found in read...
from datetime import datetime import json from unittest.mock import Mock, patch from django.contrib.auth.models import User from django.core.urlresolvers import reverse from rest_framework.test import APITestCase from builder.models import BranchBuild, Build, Deploy, Environment, Owner, Site def ordered(obj): ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Project Details: DR14_arrange.py Arranges downloaded data from SDSS-DR14 into structure similar to 'bubbleimg' Link to Bubbleimg: "https://github.com/aileisun/bubbleimg" Created on Fri Aug 11 11:38:47 2017 __author__ = "nnarenraju" __copyrigh...
# Copyright 2012 OpenStack Foundation # Copyright 2012 Canonical Ltd. # # 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...
import py.test from tiddlyweb.config import config from tiddlyweb.model.tiddler import Tiddler from tiddlyweb.model.bag import Bag from tiddlywebplugins.utils import get_store from tiddlywebplugins.mysql3 import index_query from tiddlywebplugins.mysql3 import Base def setup_module(module): module.store = get_st...
from bs4 import BeautifulSoup from datetime import datetime, timezone from collections import OrderedDict import requests, time, json, csv, os, random def new_payload(block, flat_type, contract, bto_date): return { "Flat": flat_type, "Block": block, "Contract": contract, "Town": "To...
# Licensed under a 3-clause BSD style license - see PYFITS.rst from __future__ import division, with_statement import bz2 import gzip import mmap import operator import os import sys import tempfile import warnings import zipfile from functools import reduce import numpy as np from numpy import memmap as Memmap fr...
#!/usr/bin/env python from __future__ import absolute_import, print_function try: # Python 2.x import ConfigParser as configparser except ImportError: # Python 3.x import configparser import atexit import logging import logging.handlers import os import pwd import socket import sys from mcrunner impo...
import re from datetime import timedelta from django import template from django.utils import html, safestring from django.template.defaultfilters import stringfilter from math import ceil register = template.Library() @register.simple_tag def sitenav(): return """<ul id="sitenav"> <li><a href="/" rel="sigrie" cla...
# -*- coding: utf-8 -*- from thumbnails.conf import settings from thumbnails.errors import ThumbnailError CROP_ALIASES = { 'x': { 'left': 0, 'center': 50, 'right': 100 }, 'y': { 'top': 0, 'center': 50, 'bottom': 100 } } class BaseThumbnailEngine(object)...
# -*- encoding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2015 Haltu Oy, http://haltu.fi # # 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 li...
import copy from django.http import ( HttpResponse, HttpResponseRedirect ) from django.template import loader from django.shortcuts import render from django.views.generic import ( View, ListView, DetailView ) from django.views.generic.edit import ( FormView, UpdateView ) from django.db.mode...
from pylab import show, quiver, figure, gca, imshow, colorbar, draw from matplotlib.patches import Ellipse import numpy as np from pyBA.classes import Bivarg, Bgmap import matplotlib.pyplot as plt import matplotlib.colors as cols import matplotlib.cm as cmx def draw_objects(objects=np.array( [Bivarg()] ), replot=Fals...
#!/usr/local/bin/python3.3 # pymysql : https://github.com/PyMySQL/PyMySQL # mutagenx : https://github.com/LordSputnik/mutagen # ============================================================================== import os import sys import time import uuid import shutil import mutagen as ID3 import pymysql as SQL # ======...
import os import sys import urwid import subprocess from multiprocessing import Pool from globalBase import * import urwidHelper as ur import myutil import tool from tool import git, system, systemSafe, systemRet, programPath """ itemList = list of (terminal, attr) """ def refreshBtnListTerminal(terimalItemList,...
""" Naming convention: * item - the visual element in MikiTree * page - denoted by item hierarchy e.g. `foo/bar` is a subpage of `foo` * file - the actual file on disk """ import os import datetime from PyQt5.QtCore import Qt from PyQt5 import QtCore, QtGui, QtWidgets """ from PyQt4.QtCore import Qt, QDir...
from __future__ import division, print_function,absolute_import import pylab as plt import amitgroup.plot as gr import numpy as np import amitgroup as ag import os import pnet import matplotlib.pylab as plot from pnet.cyfuncs import index_map_pooling from queue import Queue def extract(ims,allLayers): #print(allLay...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <[email protected]> # # 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/lice...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
#! /usr/bin/env ipython ''' this will load in info/data relevant for a specific cluster ''' #adam-note# a derivative of adam_plot_radial_shear_profile.py from readtxtfile import readtxtfile import astropy import astropy.io.fits pyfits=astropy.io.fits from astropy.io import ascii import sys,os,re,string,time import nump...
import operator from django.db.models import * from django.contrib.auth.models import User, UserManager from fate.custom.batch_select import batch_select from fate.game.managers import * test_types = [(x,x) for x in ("Short answer", "MC", "Argument")] test_features = [(x,x) for x in ("Map", "Quotation", "Cartoon"...
import logging from redbreast.core import WFException from redbreast.core.spec import * from uuid import uuid4 import time LOG = logging.getLogger(__name__) class Task(object): ACTIVE = 1 READY = 2 EXECUTING = 4 EXECUTED = 8 COMPLETED = 16 # active --> ready() --> ready # r...
''' Kivy framework ============== Kivy is an open source library for developing multi-touch applications. It is cross-platform (Linux/OSX/Windows/Android/iOS) and released under the terms of the `MIT License <https://en.wikipedia.org/wiki/MIT_License>`_. It comes with native support for many multi-touch input devices...
''' The MIT License (MIT) Copyright (c) 2016 Bonggun Shin 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,...
''' Support ======= Activate other frameworks/toolkits inside the kivy event loop. ''' __all__ = ('install_gobject_iteration', 'install_twisted_reactor', 'uninstall_twisted_reactor', 'install_android') def install_gobject_iteration(): '''Import and install gobject context iteration inside our event ...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from twit...
# 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 (c) 2011-2020, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Miscellaneous Data I/O ^^^^^^^^^^^^^^^^^^^^^^ .. autosummary:: :nosignatures: :toctree: generated/ {} """ __all__ = [ "write_polygon_to_text", "to_pickle", ...
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
# 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...
"""Functions for dealing with evoked BOLD response from brain regions. The functions in this module are integrated with the lyman hierarchy and use Python tools (nibabel and nitime) for processing. """ import os import os.path as op from glob import glob import hashlib import numpy as np import scipy as sp from scipy...
# -*- coding: utf-8 -*- import copy import glob import io import os import struct import sys import time import unittest from PIL import Image import piexif from piexif import _common, ImageIFD, ExifIFD, GPSIFD, TAGS, InvalidImageDataError from piexif import _webp from piexif import helper print("piexif version: {}...
# pylint: disable=function-redefined from __future__ import unicode_literals from prompt_toolkit.buffer import SelectionType, indent, unindent from prompt_toolkit.keys import Keys from prompt_toolkit.enums import IncrementalSearchDirection, SEARCH_BUFFER, SYSTEM_BUFFER from prompt_toolkit.filters import CLIFilter, Alwa...
# This program rearranges raw Egderyders data and builds two lists of dicts, userlist and ciommentslist, containing # of the data needed to buildm graphs. These objects are then saved into files. import os, sys import json import csv from datetime import datetime import time import networkx as nx import logging impor...
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/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...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from .mininode import * from .blockstore import BlockStore, TxStore from .util import p2p_port ''' This...
import logging import json import uuid import tornado.web import pymongo import motor from iceprod.server.rest import RESTHandler, RESTHandlerSetup, authorization from iceprod.server.util import nowstr logger = logging.getLogger('rest.pilots') def setup(config, *args, **kwargs): """ Setup method for Pilots ...
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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: # # * Redistributions of source code must retain the above...
# Copyright 2014, Doug Wiegley, A10 Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...