gt
stringclasses
1 value
context
stringlengths
2.49k
119k
import pandas as pd import astropy.coordinates as cd from ctc_observ import * from ctc_arrays import * #from scipy.interpolate import interp1d from scipy.interpolate import pchip from statsmodels.nonparametric.smoothers_lowess import lowess #load HSC catalog first #hsc = pd.read_csv('/cuc36/xxl/multiwavelength/HSC/wid...
#An automated selenium test designed to test the interface of a web calculator # Available @ http://teaching.csse.uwa.edu.au/units/CITS5501/Assinments/calculator.html # By Aden Huen #Tests web interface by input space partitioning import unittest from selenium import webdriver from selenium.webdriver.support import e...
# 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...
import re from LUIObject import LUIObject from LUISprite import LUISprite from LUILabel import LUILabel from LUIInitialState import LUIInitialState from LUILayouts import LUIHorizontalStretchedLayout __all__ = ["LUIInputField"] class LUIInputField(LUIObject): """ Simple input field, accepting text input. This ...
import unittest import random from array import array from coldb import compress from coldb import colimpl def _get_data(length, drange): """ return a list of randomized data """ _min, _max = drange return list(random.randint(_min, _max - 1) for i in range(length)) def _get_sorted_data(length, drange):...
# Copyright (c) 2003-2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: Alberto Solino (@agsolino) # # Description: # [MS-TSCH] ATSVC Interface implementation # # ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from typing import Any, List, Dict, Optional, Callable, Tuple, Iterable, Sequence from django.utils import translation from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, login, ...
#!/usr/bin/python # -*- coding: utf-8 -*- # ramaplot.AmberForceField.py # # Copyright (C) 2015 Karl T Debiec # All rights reserved. # # This software may be modified and distributed under the terms of the # BSD license. See the LICENSE file for details. """ Reads and represents AMBER-format force fields """ #...
# -*- coding: utf-8 -*- """ Created on Fri Feb 21 11:05:31 2014 @author: david """ # -*- coding: utf-8 -*- """ Created on Wed Feb 12 14:30:37 2014 @author: david """ import numpy as np from osgeo import gdal from osgeo import osr import numpy.ma as ma import os import matplotlib.pyplot as plt from sklearn.deco...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hickle as hkl import numpy as np from tensorflow.python.pywrap_tensorflow import do_quantize_training_on_graphdef np.random.seed(9 ** 10) from keras import backend as K K.set_image_dim_ordering('tf') fr...
r''' Copyright: Brainwy Software Ltda. License: EPL. ============= Works for Windows relying on a fork of winappdbg which works in py2/3 (at least for the part we're interested in). See: https://github.com/fabioz/winappdbg (py3 branch). Note that the official branch for winappdbg is: https://github.com/MarioVilas/wi...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
# Copyright DataStax, 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, softwa...
""" Main loop (early stopping). TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" class Unbuffered: def __init__(self, stream): self.s...
""" pydevd_vars deals with variables: resolution/conversion to XML. """ import pickle from _pydevd_bundle.pydevd_constants import dict_contains, get_frame, get_thread_id, xrange from _pydevd_bundle.pydevd_custom_frames import get_custom_frame from _pydevd_bundle.pydevd_xml import ExceptionOnEvaluate, get_type, var...
# 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...
import logging, inspect from robot.utils import ConnectionCache from pyuia import PageObject, get_page_object from util import is_test_failed, log_screenshot, log_text, in_context as in_robot_context __all__ = ['BaseAppLibrary'] _logger = logging.getLogger(__name__) def _state_capturing_decorator(method): def dec...
# Copyright 2015-2018 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """ Resource Filtering Logic """ import copy import datetime from datetime import timedelta import fnmatch import ipaddress import logging import operator import re import os from dateutil.tz ...
import click import json import sci_parameter_utils.fragment import sci_parameter_utils.parsers import sci_parameter_utils.general import yaml try: import typing # noqa: F401 from typing import Any, Callable, Iterable, Type # noqa: F401 except: pass def get_dict_from_file(fobj): """ Get dictiona...
from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app from flask.ext.login import UserMixin, AnonymousUserMixin from . import db, login_manager from datetime import datetime from hashlib import md5 f...
import numpy as np import sys import pylab import cPickle filename = sys.argv[1] def load_cpickle(filename): f = open(filename,"rb") p = cPickle.load(f) f.close() return p cpickle_data = load_cpickle(filename) #cpickle_data["E_native"] = E_native #cpickle_data["E_non_native"] = E_non_native #cpickl...
# -*- coding: UTF-8 -*- # Copyright 2009-2017 Luc Saffre # License: BSD (see file COPYING for details) """Views for `lino.modlib.bootstrap3`. """ from __future__ import division from past.utils import old_div import logging logger = logging.getLogger(__name__) from django import http from django.conf import setting...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import str import uuid, filecmp, os, sys, time, tempfile from nose.tools import assert_raises, assert_equals, assert_is_none, asser...
# coding=utf-8 # Copyright 2013 International Business Machines Corporation # 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/...
import datetime import ujson import zlib from django.utils.translation import ugettext as _ from django.utils.timezone import now as timezone_now from six import binary_type from zerver.lib.avatar import avatar_url_from_dict import zerver.lib.bugdown as bugdown from zerver.lib.cache import cache_with_key, to_dict_ca...
"""Support for installing and building the "wheel" binary package format. """ import collections import compileall import contextlib import csv import importlib import logging import os.path import re import shutil import sys import warnings from base64 import urlsafe_b64encode from email.message import Message from i...
"""gccxmlparser - parse a gccxml created XML file into sequence type descriptions""" try: from xml.etree import cElementTree except ImportError: try: import cElementTree except ImportError: cElementTree = None if cElementTree: base = object else: import xml.sax base = xml.sax.Co...
"""Support for Epson projector.""" from __future__ import annotations import logging from epson_projector.const import ( BACK, BUSY, CMODE, CMODE_LIST, CMODE_LIST_SET, DEFAULT_SOURCES, EPSON_CODES, FAST, INV_SOURCES, MUTE, PAUSE, PLAY, POWER, SOURCE, SOURCE_...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import transaction from BTrees.OOBTree import OOSet from zeo_connector import transaction_manager from zeo_connector.examples import DatabaseHandler from ...
from django.core.exceptions import ValidationError from nose.plugins.skip import SkipTest from cyder.base.tests import ModelTestMixin, TestCase from cyder.cydhcp.site.models import Site from cyder.cydhcp.network.models import Network from cyder.cydhcp.range.models import Range from cyder.cydhcp.validation import get_p...
import ankle import unittest class SimpleTestCase(unittest.TestCase): def test_works(self): document = ''' <form id="test1" class="form"></form> <form id="test2" class="form"></form> ''' skeleton = '<form class="form"></form>' ankle.find_all(skeleton, docume...
#!/usr/bin/python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """SVN to GIT mapping for the public Chromium repositories.""" import re GIT_HOST = 'https://chromium.googlesource.com/' BLINK_TRUN...
""" Copyright (c) 2017-2022, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file LICENSE, distributed with this software. Created on May 20, 2017 @author: jrm """ def activity_indicator_factory(): from .uikit_activity_indicator import UiKitActivityIndicator retu...
from filebeat import BaseTest import os import platform import time import shutil import json from nose.plugins.skip import Skip, SkipTest # Additional tests: to be implemented # * Check if registrar file can be configured, set config param # * Check "updating" of registrar file # * Check what happens when registrar...
#!/usr/bin/python # # 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 # ...
''' QuickCoords/main.py QuickCoords is a simple tool for quickly and easily capturing a series of pixel coordinates from a large number of images. Copyright (c) 2014, Brendan Gray and Sylvermyst Technologies Permission is hereby granted, free of charge, to any person obtaining a copy of this softwar...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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 with the License. You may obtain # a copy of the License...
# coding: utf-8 from sqlalchemy.testing import AssertsExecutionResults, eq_, \ assert_raises_message, AssertsCompiledSQL from sqlalchemy import Table, Column, MetaData, Integer, String, bindparam, \ Sequence, ForeignKey, text, select, func, extract, literal_column, \ tuple_, DateTime, Time, literal, and_, ...
# 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...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import warnings from distutils.version import LooseVersion from .pycompat import OrderedDict, zip, dask_array_type from .common import full_like from .combine import concat from .ops import (...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 REST API.""" import binascii from decimal import Decimal from enum import Enum from io import...
# Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 """ Python Standard Logging integration with CloudWatch Logs Double Buffered with background thread delivery. We do an initial buffering on the log handler directly, to avoid some of the over...
# -*- coding: utf-8 -*- # # 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 ...
import os import datetime import logging import json import base64 import zlib try: import urllib.parse as urlparse except ImportError: import urlparse # silence pyflakes import jwt import requests from flask_oauthlib.client import OAuth, OAuthException from .models import get_permission, get_user, create_o...
# -*- coding: utf-8 -*- from __future__ import absolute_import import mongoengine, inspect from flask import abort, current_app from mongoengine.base.fields import BaseField from mongoengine.queryset import (MultipleObjectsReturned, DoesNotExist, QuerySet) from mongoengine.base import ValidationError from pymongo...
import io import os import base64 import urllib import aiohttp import asyncio import hashlib import tarfile import json import datetime as dt import ssl from aiohttp import websocket from .channel import Channel from .utils import identical from .multiplexed import MultiplexedResult from .jsonstream import JsonStreamR...
# AUV resizable thread pool - forked from the eventlet thread pool, # but with modifications that allow it to dynamically grow as more # threads are added. For now, it never shrinks - that shouldn't be a # large issue, as the threads are doing legitimate waits instead of busy # waits. # Copyright (c) 2007-2009, Linden...
""" ROC Analysis Widget ------------------- """ import operator from functools import reduce, wraps from collections import namedtuple, deque, OrderedDict import numpy import sklearn.metrics as skl_metrics from PyQt4 import QtGui from PyQt4.QtGui import QColor, QPen, QBrush from PyQt4.QtCore import Qt import pyqtgrap...
# Copyright 2017 Google 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/LICENSE-2.0 # # Unless required by applicable law or ag...
# -*- coding: utf-8 -*- """ This file is part of Urban Mediator software. Copyright (c) 2008 University of Art and Design Helsinki See the file LICENSE.txt for copying permission. Widget controller. To add new widget several places should be edited (in links.py, code.py, widgetize.py and her...
"""An implementation of the Zephyr Abstract Syntax Definition Language. See http://asdl.sourceforge.net/ and http://www.cs.princeton.edu/research/techreps/TR-554-97 Only supports top level module decl, not view. I'm guessing that view is intended to support the browser and I'm not interested in the browser. Changes...
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # 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...
# XML DOM Tk Text Browser Editor # May 18, 2004 # Alex Caldwell M.D. # alcald2000@yahoo.com # derived from xmlbrowser.tcl # by Richard Suchenwirth http://wiki.tcl.tk/3884 # Comparison: # Modified to allow real time editing of the XML DOM in memory via events in the Tk text # widg...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Openstack, LLC # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 ...
# 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...
"""Parameter manipulation utilities.""" from collections.abc import Iterable, Mapping from urllib.parse import quote import datetime import json # Removed top-level import to correct circular imports # (we're in backport territory, these things happen) # from mws.mws import MWSError def enumerate_param(param, value...
"""Test requirements module.""" import os from pathlib import Path from unittest.mock import patch, call from pytest import raises from homeassistant import setup from homeassistant.requirements import ( CONSTRAINT_FILE, async_get_integration_with_requirements, async_process_requirements, PROGRESS_FILE...
import os import sqlite3 import pandas as pd import datetime import numpy as np import wget def updateModisDB(filenames, cacheDir): if len(filenames) > 0: db_fn = os.path.join(cacheDir, "modis_db.db") fn = filenames[0].split(os.sep)[-1] product = fn.split('.')[0] years = [] ...
""" Created on 26 Sep 2016 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) example JSON: 4-Way AFE: {"serial_number":"250011","type":"810-00000","pt1000_v20":2.0,"calibrated_on":null,"dispatched_on":null, "sn1":{"serial_number":"123456789","sensor_type":"IRMA1","ae_total_zero_mv":"287.0","we_total_zero_mv"...
# python imports import warnings import logging # django imports from django.db import IntegrityError from django.db import connection from django.db.models import Q from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotEx...
# 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 to in writing, ...
# 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...
import copy import shutil from typing import Callable from requests import Response import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 GENERAL_DATE_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ' DATE_FORMAT = "%a, %d %b %Y %H:%M:%S GMT" account_sas_token = '' storage_account_name = '' cla...
import logging import os import time import requests from nflmisc.browser import BrowserScraper from nba.dates import convert_format, strtodate, subtract_datestr, today class BasketballScraper(object): def __init__(self, headers=None, cookies=None, cache_name=None, delay=1, expire_hours=12, as_string=False): ...
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 Eldar Nugaev # 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://...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Low-level objects providing an abstraction for the objects involved in the calculation. """ from __future__ import unicode_literals, division, print_function import collections import abc import six import ...
"""Entity for Zigbee Home Automation.""" from __future__ import annotations import asyncio from collections.abc import Awaitable import functools import logging from typing import Any from homeassistant.const import ATTR_NAME from homeassistant.core import CALLBACK_TYPE, Event, callback from homeassistant.helpers imp...
from datetime import datetime from typing import Union, Dict, Optional, List # noqa: F401 import requests from pykechain.defaults import API_EXTRA_PARAMS from pykechain.enums import ( Multiplicity, ScopeStatus, SubprocessDisplayMode, KEChainPages, ScopeRoles, ScopeMemberActions, ScopeCate...
# 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 agreed to in...
from inspect import isclass from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',) class _LOG(object): action_class = None class CREATE_ADDON(_LOG): id = 1 action_class = 'add' format = _(u'{addon} was created.') keep =...
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
"""Test Z-Wave config panel.""" from http import HTTPStatus import json from unittest.mock import MagicMock, patch import pytest from homeassistant.bootstrap import async_setup_component from homeassistant.components import config from homeassistant.components.zwave import DATA_NETWORK, const from tests.mock.zwave i...
# -*- 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...
""" Tests - Deuce Client - Client - Deuce - Block """ import json import random import urllib.parse import uuid import httpretty import deuceclient.client.deuce import deuceclient.api as api from deuceclient.tests import * from deuceclient.common import errors as errors @httpretty.activate class ClientDeuceBlockTe...
# Copyright 2012 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011,2012 Akira YOSHIYAMA <akirayoshiyama@gmail.com> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Lic...
# Copyright 2013 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 in...
#!/usr/bin/env python """Json related utilities.""" import copy import datetime import logging from mapreduce.lib import simplejson from google.appengine.api import datastore_errors from google.appengine.api import datastore_types from google.appengine.ext import db # pylint: disable=invalid-name class JsonEncoder...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ShakesCorpus is an iterable over the lines of The Complete Workds of William Shakespeare This module provides the ShakesCorpus class and functions for segmenting Gutenberg Project books with f...
# Copyright 2016 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Code originally from Demo code distributed with Python 2.6 # Sun RPC version 2 -- RFC1057. # XXX There should be separate exceptions for the various reasons why # XXX an RPC can fail, rather than using RuntimeError for everything # XXX Need to use class based exceptions rather than string exceptions # XXX The UDP ...
# 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 ...
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of thi...
"""A connection adapter that tries to use the best polling method for the platform pika is running on. """ import logging import select import time from pika.adapters.base_connection import BaseConnection LOGGER = logging.getLogger(__name__) # One of select, epoll, kqueue or poll SELECT_TYPE = None # Use epoll's c...
import os from ecs_deplojo import task_definitions BASE_DIR = os.path.dirname(os.path.abspath(__file__)) def test_generate_task_definition(tmpdir): task_data = """ { "family": "default", "volumes": [], "containerDefinitions": [ { "name": "default", "image": "${i...
# 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...
# -*- coding: utf-8 -*- if not settings.has_module(c): raise HTTP(404, body="Module disabled: %s" % c) # ----------------------------------------------------------------------------- def index(): """ Module Homepage """ module_name = settings.modules[c].get("name_nice") response.title = module_name ...
""" kombu.transport.redis ===================== Redis transport. """ from __future__ import absolute_import import socket from bisect import bisect from contextlib import contextmanager from time import time from anyjson import loads, dumps from kombu.exceptions import InconsistencyError, VersionMismatch from kom...
#! /usr/bin/env python # # Copyright (C) 2007-2009 Rich Lewis <rl403@cam.ac.uk> # License: 3-clause BSD """ ## skchem.descriptors.fingerprints Fingerprinting classes and associated functions are defined. """ import pandas as pd from rdkit.Chem import GetDistanceMatrix from rdkit.DataStructs import ConvertToNumpyArra...
"""Module containing class `MetadataImporter`.""" from collections import defaultdict import datetime import logging from django.db import transaction from vesper.command.command import CommandSyntaxError from vesper.django.app.models import ( AnnotationConstraint, AnnotationInfo, Device, DeviceConnection, ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division import numpy as np import warnings from affine import Affine from shapely.geometry import shape from .io import read_features, Raster from .utils import (rasterize_geom, get_percentile, check_stats, remap_...
from functools import reduce from operator import iand, ior from string import punctuation import django from django.apps import apps from django.contrib.sites.managers import CurrentSiteManager as DjangoCSM from django.core.exceptions import ImproperlyConfigured from django.db.models import CharField, Manager, Q, Tex...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
"""Tests for useful utilities for higher level polynomial classes. """ from sympy import S, Integer, sin, cos, sqrt, symbols, pi, Eq, Integral, exp from sympy.utilities.pytest import raises from sympy.polys.polyutils import ( _nsort, _sort_gens, _unify_gens, _analyze_gens, _sort_factors, paral...
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** This will append site-specific paths to the module sear...
#!/usr/bin/env python __authors__ = "Vincent Dumoulin" __copyright__ = "Copyright 2013, Universite de Montreal" __credits__ = ["Guillaume Desjargins", "Vincent Dumoulin"] __license__ = "3-clause BSD" __maintainer__ = "Vincent Dumoulin" """ This script computes both an estimate of the partition function of the provided...
# coding: utf-8 """ HTCondor job manager. See https://research.cs.wisc.edu/htcondor. """ __all__ = ["HTCondorJobManager", "HTCondorJobFileFactory"] import os import stat import time import re import subprocess from law.config import Config from law.job.base import BaseJobManager, BaseJobFileFactory from law.util i...
# Copyright (c) 2013 Thomas Nicholson <tnnich@googlemail.com> # 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, t...
# Copyright 2013 IBM Corp. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...