gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Implement -f aka looponfailing for pytest. NOTE that we try to avoid loading and depending on application modules within the controlling process (the one that starts repeatedly test processes) otherwise changes to source code can crash the controlling process which should best never happen. """...
from .. import app from .. import db from .. import util from ..models import Post, Setting, get_settings from flask.ext.login import login_required from flask import request, redirect, url_for, render_template, flash,\ has_request_context import requests import json import urllib def register(): pass @ap...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
"""Test the nifti_region module Functions in this file only test features added by the NiftiLabelsMasker class, not the underlying functions (clean(), img_to_signals_labels(), etc.). See test_masking.py and test_signal.py for details. """ from nose.tools import assert_raises, assert_equal, assert_true import numpy as...
""" Famous social networks. """ import networkx as nx __author__ = """\n""".join(['Jordi Torrents <jtorrents@milnou.net>', 'Katy Bold <kbold@princeton.edu>', 'Aric Hagberg <aric.hagberg@gmail.com)']) __all__ = ['karate_club_graph', 'davis_southern_women_graph', ...
# Copyright (c) 2016 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 writing, so...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# -*- coding: utf-8 -*- import json from os import path from gluon import current from gluon.html import * from gluon.storage import Storage from s3 import FS, S3CustomController from s3theme import formstyle_foundation_inline THEME = "EVASS" # =====================================================================...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import logging import pprint import time import requests from django.conf import settings from django.forms.models import fields_for_model from django.http import QueryDict from django.utils import timezone from djan...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module provides classes to perform fitting of structures. """ from __future__ import division, unicode_literals import six from six.moves import filter from six.moves import zip import numpy as np i...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
# Copyright 2013-present Barefoot Networks, 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...
# 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...
from __future__ import absolute_import # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import numpy as np from ._segmentation import _ve_step, _interaction_energy NITERS = 10 NGB_SIZE = 26 BETA = 0.1 nonzero = lambda x: np.maximum(x, 1e-50) log = lambd...
# # Copyright 2012 New Dream Network, LLC (DreamHost) # Copyright 2013 eNovance # # 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 __future__ import absolute_import, division, unicode_literals, print_function import collections import contextlib import logging import logging.handlers import sys import threading import uuid import warnings from flexget import __version__ from flexget.utils.tools import io_encoding # A level more detailed tha...
"""Support for Homekit covers.""" import logging from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, SUPPORT_CLOSE, SUPPORT_CLOSE_TILT, SUPPORT_OPEN, SUPPORT_OPEN_TILT, SUPPORT_SET_POSITION, SUPPORT_STOP, SUPPORT_SET_TILT_POSITION, CoverDevice, ) from...
import socket import re import pickle import urllib2 import time import os import csv import math #Global variables irc = socket.socket ( socket.AF_INET, socket.SOCK_STREAM ) global milkcount global dataTime global notesDic global officerEmails global officerNames global officerOrder #Sets up the IRC for the rest of ...
""" Template dispatcher module. A dispatcher is a function that can contains multiple behaviors. Its specific behavior is can be controlled by DispatchContext. DispatchContext is used in two ways, usually via different implementation of the DispatchContext base class. - During search, we can use it to pass the curre...
#! /usr/bin/env python # # Class for profiling python code. rev 1.0 6/2/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # # See profile.doc for more information """Class for profiling Python code.""" # Copyright 1994, by InfoSeek Corporation, all rights ...
from oslo.config import cfg import addons src = cfg.OptGroup(name='src', title='Credentials and general config for source cloud') src_opts = [ cfg.StrOpt('type', default='os', help='os - OpenStack Cloud'), cfg.StrOpt('auth_url', default='-', help='Keystone servi...
#!/usr/bin/env python """ This class implements the Quine-McCluskey algorithm for minimization of boolean functions. Based on code from Robert Dick <dickrp@eecs.umich.edu> and Pat Maupin <pmaupin@gmail.com>. Most of the original code was re-written for performance reasons. >>> qm = QM(['A','B']) >>> qm.get_function...
# Copyright 2015 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...
# 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 agreed ...
__author__ = 'jiataogu' """ The file is the implementation of Grid-LSTM In this stage we only support 2D LSTM with Pooling. """ from recurrent import * from attention import Attention import logging import copy logger = logging.getLogger(__name__) class Grid(Recurrent): """ Grid Cell for Grid-LSTM =======...
""" RealBack RESTful API functions """ from django.http import JsonResponse from django.views import View from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.db.models import Max from django.utils import timezone from . import models, forms class...
# -- coding: utf-8 -- from __future__ import absolute_import from bs4 import BeautifulSoup from urlparse import urlparse, urljoin from re import search from chime import repo_functions class ChimeTestClient: ''' Stateful client for Chime Flask test client. ''' def __init__(self, client, test): '''...
from django.core.exceptions import ObjectDoesNotExist from django.db.models.query import F from django.http import Http404 from django_filters import ModelChoiceFilter from django_filters.rest_framework import CharFilter from django_filters.rest_framework import DjangoFilterBackend from django_filters.rest_framework im...
from AppKit import * import re from lib.tools.defaults import getDefault from lib.scripting.PyDETextView import PyDETextView, Output from lib.scripting.scriptTools import ScriptRunner from lib.scripting.scriptingWindow import PyTextEditor from lib.scripting.cocoaDrawingTools import DrawingTools import warnings epsP...
import numpy as np import pytest from sklearn.base import clone from sklearn.base import BaseEstimator from sklearn.base import TransformerMixin from sklearn.dummy import DummyRegressor from sklearn.utils._testing import assert_allclose from sklearn.utils._testing import assert_no_warnings from sklearn.preprocessin...
# -*- encoding: utf-8 -*- # CLASSIFICATION METRICS (work on solutions in {0, 1} and predictions in [0, 1]) # These can be computed for regression scores only after running # normalize_array from __future__ import print_function import numpy as np import scipy as sp import scipy.stats from autosklearn.constants import...
"""Reliable low-latency audio playback and recording. http://python-rtmixer.readthedocs.io/ """ __version__ = '0.1.0' import sounddevice as _sd from pa_ringbuffer import init as _init_ringbuffer from _rtmixer import ffi as _ffi, lib as _lib RingBuffer = _init_ringbuffer(_ffi, _lib) # Get constants from C library f...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
import datetime import json import logging.handlers import os import pprint import random import re import types from configparser import RawConfigParser import six.moves.urllib.error import six.moves.urllib.parse import six.moves.urllib.request from splunk_eventgen.lib.eventgenexceptions import FailedLoadingPlugin, ...
# coding: utf-8 # # Copyright 2019 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
"""Tests for unix_events.py.""" import collections import contextlib import errno import io import os import signal import socket import stat import sys import tempfile import threading import unittest if sys.platform == 'win32': raise unittest.SkipTest('UNIX only') import trollius as asyncio from trollius impo...
import numpy as np from .Transform import * class TransformObject: def __init__(self, local=None): self.quat = Float4(0.0, 0.0, 0.0, 1.0) self.local = local if local is not None else Matrix4() self.updated = True self.left = WORLD_LEFT.copy() self.up = WORLD_UP.copy() ...
from __future__ import unicode_literals import os import re from unittest import skipUnless from django.contrib.gis.db.models import Extent3D, Union from django.contrib.gis.db.models.functions import ( AsGeoJSON, AsKML, Length, Perimeter, Scale, Translate, ) from django.contrib.gis.gdal import HAS_GDAL from djang...
#!/usr/bin/env python # Copyright (c) 2002-2005 ActiveState Corp. # See LICENSE.txt for license details. # Author: # Trent Mick (TrentM@ActiveState.com) # Home: # http://trentm.com/projects/which/ r"""Find the full path to commands. which(command, path=None, verbose=0, exts=None) Return the full path to the f...
import numpy as np import copy from .base import Visuals from . import color from .. import util from .. import caching from .. import grouping from .material import SimpleMaterial, PBRMaterial, empty_material # NOQA class TextureVisuals(Visuals): def __init__(self, uv=None, ...
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function import datetime as dt from decimal import Decimal from itertools import product, cycle from flask import json from evesrp import db from evesrp.models import Request, ActionType from evesrp.auth import P...
import time import urllib import urllib2 import socket from platform import python_version_tuple import anyjson from . import AuthenticationError, ConnectionError, USER_AGENT class BaseStream(object): """A network connection to Twitters streaming API :param username: Twitter username for the account accessi...
# Copyright 2016 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 obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
# -*- coding: utf-8 -*- """ python -c "import utool as ut; ut.write_modscript_alias('Tgen.sh', 'ibeis.templates.template_generator')" sh Tgen.sh --key review --invert --Tcfg with_getters=True with_setters=False --modfname manual_review_funcs # TODO: Fix this name it is too special case """ from __future__ import absol...
# coding=utf-8 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Hendrik Volkmer, Thijs Metsch # Copyright (c) 2013 Daniele Stroppa # # 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 t...
import json import time import requests import logging from datetime import datetime from urllib.parse import urljoin from .exceptions import AuthenticationError, ResourceNotFoundError, InternalServerError, ConnectionError JSON_HTTP_HEADERS = {'content-type': 'application/json'} class RequestsMixin: def __init__...
#!/home/ubuntu/anaconda2/envs/tensorflow/bin/python # MIT License # Copyright (c) 2016 Druce Vertes drucev@gmail.com # 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, in...
# # __COPYRIGHT__ # # 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, publish, # distribute, sublicen...
import math from pandac.PandaModules import Vec3, deg2Rad, Point3, NodePath, VBase4, CollisionHandlerEvent, CollisionNode, CollisionSphere from direct.fsm import ClassicFSM, State from direct.distributed.ClockDelta import globalClockDelta from direct.gui.DirectGui import DirectLabel from direct.interval.IntervalGlobal ...
# coding: utf-8 """ Deals with models for deepseg module. Available models are listed under MODELS. """ import os import json import logging import colored import spinalcordtoolbox as sct import spinalcordtoolbox.download logger = logging.getLogger(__name__) # List of models. The convention for model names is: (s...
# -*- coding: utf-8 -*- """ <DefineSource> @Date : Fri Nov 14 13:20:38 2014 \n @Author : Erwan Ledoux \n\n </DefineSource> A Noder defines Child ordered dicts with <DoStr> as KeyStr. The items inside are automatically setted with Noded<DoStr><TypeStr> and have a Pointer to the parent InstanceVariable. This is the...
# Copyright 2013 Google Inc. All Rights Reserved. """A module that provides parsing utilities for argparse. For details of how argparse argument pasers work, see: http://docs.python.org/dev/library/argparse.html#type Example usage: import argparse import arg_parsers parser = argparse.ArgumentParser() p...
from mako.template import Template from mako.lookup import TemplateLookup from mako import lookup import shutil, unittest, os from util import result_lines from test import TemplateTest, template_base, module_base from test import eq_ try: import beaker except: from nose import SkipTest raise SkipTest("Bea...
# Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin # # 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, c...
from cloudify.decorators import workflow from cloudify.workflows import ctx from cloudify.workflows import tasks as workflow_tasks from utils import set_state_task from utils import operation_task from utils import link_tasks from utils import CustomContext from utils import generate_native_node_workflows from utils im...
# Copyright 2021 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, ...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2020 Makani Technologies 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...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2011 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC. # 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/L...
# Copyright 2016 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, s...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2012 The Plaso Project Authors. # Please see the AUTHORS file for details on individual 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 L...
import hashlib from struct import * from pyelliptic import arithmetic from binascii import hexlify, unhexlify #There is another copy of this function in Bitmessagemain.py def convertIntToString(n): a = __builtins__.hex(n) if a[-1:] == 'L': a = a[:-1] if (len(a) % 2) == 0: return unhexlify...
# -*- coding: utf-8 -*- # 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...
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
# # 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 # distr...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Thomas Scholtes. # # 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 ...
import math import random import pygame from pygame.locals import * import koon.app from koon.gui import * from koon.geo import * from koon.res import resman import koon.gfx as gfx import koon.input as input from settings import GameType, Configuration from player import * from sndman import SoundManager import sce...
# Copyright 2017 The Forseti Security 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 ap...
"""ONVIF device abstraction.""" import asyncio import datetime as dt import os from typing import List from httpx import RequestError import onvif from onvif import ONVIFCamera from onvif.exceptions import ONVIFError from zeep.exceptions import Fault from homeassistant.config_entries import ConfigEntry from homeassis...
# coding=utf-8 from django import template from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from ..models import FriendRequest, SocialGroup, GroupMembershipRequest register = template.Library() #--------------------------------------FOLLOWER TAGS--------------------------...
from typing import Any, Dict, Optional import pytz from django.conf import settings from django.contrib.auth import authenticate, update_session_auth_hash from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.shortcuts import render from django.utils.html impo...
import gflags import logging from ct.client import entry_decoder from ct.client import state from ct.client import aggregated_reporter from ct.crypto import error from ct.crypto import merkle from ct.client import db_reporter from ct.client import text_reporter from ct.proto import client_pb2 from twisted.internet imp...
"""Helper classes for formatting data as tables""" from collections import OrderedDict from collections.abc import Mapping from django.forms import MediaDefiningClass from django.template.loader import get_template from django.urls import reverse from django.utils.functional import cached_property from django.utils.t...
import numpy as np try: from scipy.sparse.linalg import spsolve from scipy.sparse import coo_matrix, eye except ImportError: pass from . import triangles from .util import unitize from .geometry import index_sparse from .triangles import mass_properties def filter_laplacian(mesh, la...
# 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 datetime import io import os from functools import wraps from itertools import count from shutil import copyfileobj from threading import Lock from zipfile import ZipFile import dateutil.parser import imageio import requests from pixivpy3 import PixivAPI, AppPixivAPI, PixivError from .constants import ( Il...
# -*- coding: utf-8 -*- # # The MIT License (MIT) # Copyright (c) 2017-2018 Taro Sato # # 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...
# Copyright (C) 2005 Graham Ashton <ashtong@users.sourceforge.net> # # This module is free software, and you may redistribute it and/or modify # it under the same terms as Python itself, so long as this copyright message # and disclaimer are retained in their original form. # # IN NO EVENT SHALL THE AUTHOR BE LIABLE TO...
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # Copyright (c) 2015, Google, Inc. # # 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 ...
""" This file is part of pyS5p https://github.com/rmvanhees/pys5p.git The class S5Pmsm read HDF5 measurement data including its attributes and dimensions. Initialization: S5Pmsm attribute | hdf5 dataset | Numpy array ------------------------------------------------------------------------- name ...
# Copyright (c) 2016-present, Facebook, 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...
""" The MIT License Copyright (c) 2009 Vic Fryzel 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, publi...
"""Some test functions for bivariate interpolation. Most of these have been yoinked from ACM TOMS 792. http://netlib.org/toms/792 """ from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six from matplotlib.externals.six.moves i...
#!/usr/bin/env python import sys if len(sys.argv) < 2: print "Provide the integer size in bytes" sys.exit(1) size = int(sys.argv[1]) full_rows = size // 10 init_size = size % 10 if init_size == 0: full_rows = full_rows - 1 init_size = 10 def rx(i): return i + 2 def ry(i): return i + 12 d...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
#!/usr/bin/env python import os import struct import sys import math import warnings from psr_constants import ARCSECTORAD telescope_ids = {"Fake": 0, "Arecibo": 1, "ARECIBO 305m": 1, "Ooty": 2, "Nancay": 3, "Parkes": 4, "Jodrell": 5, "GBT": 6, "GMRT": 7, "Effelsberg": 8, "ATA": 9, ...
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 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 requ...
"""Creates beautiful visualizations of the publication database.""" import datetime import numpy as np from astropy import log from matplotlib import pyplot as pl import matplotlib.patheffects as path_effects import matplotlib as mpl from . import SCIENCES # Configure the aesthetics mpl.rcParams["figure.figsize"] = ...
# # Copyright 2010 Suinova Designs Ltd. # __author__ = "Ted Wen" __version__ = "0.1" import logging, re, os try: from includes import * #assign global variables in this module except: logging.error('failed to load includes') global_vars = {} gTempVarPtn = re.compile(ur'{{\s*([\w\|:"/.?_$()]+)\s*}}',r...
from django.conf import settings from django.conf.urls import url, patterns, include from django.views.generic import TemplateView, RedirectView from django.contrib import admin from django.conf.urls.static import static from threadedcomments.models import ThreadedComment admin.autodiscover() from audiotracks.models i...
from __future__ import absolute_import, division from django.conf import settings from django.core import urlresolvers from django.db import connection from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponseNotFound, HttpRequest, HttpResponse from django.templa...
from rest_framework import status, viewsets, exceptions, generics from rest_framework.authtoken.models import Token from rest_framework.authtoken.serializers import AuthTokenSerializer from rest_framework.decorators import action, api_view from rest_framework.exceptions import ParseError, PermissionDenied from rest_fra...
#!/usr/bin/env python from google.appengine.ext.webapp import template from google.appengine.ext import ndb import logging import os.path import webapp2 from webapp2_extras import auth from webapp2_extras import sessions from webapp2_extras.auth import InvalidAuthIdError from webapp2_extras.auth import InvalidPassw...
import base64 import re import threading from binascii import hexlify, unhexlify from functools import partial from electrum.util import bfh, bh2u from electrum.bitcoin import (is_segwit_address, b58_address_to_hash160, xpub_from_pubkey, public_key_to_p2pkh, EncodeBase58Check, ...
""" vcfexplorer.api.resources VCF Explorer api resources """ from flask.ext.restful import Api, Resource, abort, reqparse import pymongo from ..helpers import get_mongodb ## Common argument parsing common_reqparse = reqparse.RequestParser() common_reqparse.add_argument('limit', type = int, default = 1) comm...
# -*- coding: utf-8 -*- """ 1) Ambiguity / num names 2) independence of annotations 3) continuous 4) exponential case 5) speicifc examples of our prob 6) human in loop """ from __future__ import absolute_import, division, print_function, unicode_literals import six # NOQA import utool as ut import numpy as np from six...
import warnings import numpy as np from pandas import compat from pandas._libs import reduction from pandas.core.dtypes.generic import ABCSeries from pandas.core.dtypes.common import ( is_extension_type, is_sequence) from pandas.util._decorators import cache_readonly from pandas.io.formats.printing import ppri...
#!/usr/bin/python __appname__ = 'libgdx_library_updater' __version__ = "0.91" __author__ = "Jon Renner <rennerjc@gmail.com>" __url__ = "http://github.com/jrenner/libgdx-updater" __licence__ = "MIT" import os, time, sys, urllib2, re, datetime, tempfile, zipfile, argparse # error handling functions and utils def fatal...
import hashlib import hmac from .compat import binary_type, constant_time_compare, is_string_type from .exceptions import InvalidKeyError from .utils import der_to_raw_signature, raw_to_der_signature try: from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.serialization impor...