gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from nose.tools import * # noqa: F403
import datetime as datetime
import pytest
from django.test import RequestFactory
from django.db.models import Q
from django.contrib.auth.models import Group
from django.core.exceptions import ValidationError, PermissionDenied
from django.contrib.admin.sites import AdminSite
from ... | |
from __future__ import division, print_function, absolute_import
from decimal import Decimal
from numpy.testing import TestCase, run_module_suite, assert_equal, \
assert_almost_equal, assert_array_equal, assert_array_almost_equal, \
assert_raises, assert_
import scipy.signal as signal
from scipy.signal impor... | |
"""
Filename: plot_hemispheric_timeseries.py
Author: Damien Irving, irving.damien@gmail.com
Description: Plot ensemble aggregated hemispheric timeseries
"""
# Import general Python modules
import sys, os, pdb, re
import argparse
import numpy
import iris
from iris.experimental.equalise_cubes import equali... | |
import logging
import requests
from six.moves import urllib
from . import dcos_url, rpcclient
from ..clients.rpcclient import verify_ssl
from ..errors import (DCOSAuthenticationException,
DCOSAuthorizationException,
DCOSBadRequest,
DCOSException,
... | |
#!/router/bin/python
from .trex_stl_exceptions import *
from .trex_stl_types import verify_exclusive_arg, validate_type
from .trex_stl_packet_builder_interface import CTrexPktBuilderInterface
from .trex_stl_packet_builder_scapy import STLPktBuilder, Ether, IP, UDP, TCP, RawPcapReader
from collections import OrderedDic... | |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# (c) 2012 Mike Lewis
import logging; log = logging.getLogger(__name__)
from . import image_util
class Connection(object):
"""Enclosing object through which the system is managed"""
def __init__(self, s3_connection, bucket_name, bucket_url):
"""Set up t... | |
'''
Created on Aug 19, 2012
@author: eric
'''
from ambry.sourcesupport.uscensus import UsCensusDimBundle
from ambry.sourcesupport.uscensus import UsCensusFactBundle
class Us2000CensusDimBundle(UsCensusDimBundle):
'''
Bundle code for US 2000 Census, Summary File 1
'''
def __init__(self,directory=Non... | |
# 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 ... | |
# Copyright 2019-2021 The Matrix.org Foundation C.I.C.
#
# 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... | |
# coding: utf-8
#
# Copyright 2014 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... | |
#!/usr/bin/env python
#
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# Copyright 2015 - Mirantis, Inc.
# Copyright 2015 - StackStorm, 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
#
# Unl... | |
#!/usr/bin/env python
"""A command line client for Google Tasks
It's done by following the tutorials in Google Developers:
https://developers.google.com/google-apps/tasks/quickstart/python.
In order to use this script, please look at the "Using scripts involve Google
App API" section of the sorno-py-scripts README (c... | |
# Copyright 2021 The Matrix.org Foundation C.I.C.
#
# 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 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.mock import (
MagicMock,
patch,
NO_MOCK,
NO_MOCK_REASON
)
fr... | |
# -*- coding: utf-8 -*-
import logging
import weakref
from collections import namedtuple
from typing import List, Iterable, Tuple
import pandas as pd
from PyQt5.QtCore import Qt, pyqtSignal, QTimer, QObject
from PyQt5.QtWidgets import QInputDialog, QMenu
from pyqtgraph import LinearRegionItem, TextItem, AxisItem, Plo... | |
# 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 ... | |
#python3
import requests
#import logging
#import json
from pprint import pprint
import re
from subprocess import Popen, PIPE
from bs4 import BeautifulSoup
import misc
#misc.py - personal info
#token = '*****'
#domen ='https://api.telegram.org/bot' + token + '/'
#login = '*****'
#psw = '*******'
#routerIp = 'http://192... | |
from django.contrib.gis.geoip import GeoIPException
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.template import loader
from django.template import Context
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
fro... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import datetime
from frappe import _
import frappe
import frappe.database
import frappe.utils
from frappe.utils import cint
import frappe.utils.user
from frappe import conf
from ... | |
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
import OSIM.Simulation.Utils as u
fig = plt.figure()
Ix = fig.gca(projection='3d')
dUC = fig.gca(projection='3d')
dUE = fig.gca(projection='3d')
dUB = fig.gca(projection='3d')
vbic_is = 1 # TODO: !!
v... | |
# Copyright 2013 Cloudbase Solutions Srl
# 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 r... | |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pylab import *
import Image
from tifffile import imsave
#%matplotlib inline
# <codecell>
def addBead(r,xf,yf,zf):
'''
r - spher... | |
import logging
import cffi
import cle
from sortedcontainers import SortedDict
from ..analysis import Analysis
_l = logging.getLogger(name=__name__)
class CFBlanketView:
"""
A view into the control-flow blanket.
"""
def __init__(self, cfb):
self._cfb = cfb
def __getitem__(self, item):
... | |
#
# Copyright 2013 Quantopian, 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 wr... | |
"""
Utility functions.
Includes:
- Logging decorators
- Logging functions log_start() and log_end()
"""
__author__ = 'Dan Gunter <dkgunter@lbl.gov>'
__date__ = '8/4/15'
from collections import deque
from datetime import datetime
import logging
import logging.config
import os
import six
import time
ENTRY_MESS... | |
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
# Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | |
import ast
import datetime
import json
import logging
import copy
from django.http import HttpResponse
from multiprocessing import Process
from threading import Thread, local
try:
from mongoengine.base import ValidationError
except ImportError:
from mongoengine.errors import ValidationError
from multiprocess... | |
# Copyright (c) 2012 NetApp, Inc. All rights reserved.
# Copyright (c) 2014 Ben Swartzlander. All rights reserved.
# Copyright (c) 2014 Navneet Singh. All rights reserved.
# Copyright (c) 2014 Clinton Knight. All rights reserved.
# Copyright (c) 2014 Alex Meade. All rights reserved.
# Copyright (c) 2014 Andrew Ker... | |
# Copyright 2010 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, 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.apach... | |
# Copyright 2010 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 or agreed to in writing,... | |
import os.path
import shutil
import string
import tempfile
from characteristic import Attribute, attributes
from .exceptions import InvalidRegistrationVariable, NousagiTestError
@attributes([
Attribute("variables", instance_of=dict),
Attribute("environ", instance_of=dict),
])
class State(object):
pass
... | |
"""Chebyshev Rational Approximation Method module
Implements two different forms of CRAM for use in openmc.deplete.
"""
from itertools import repeat
from multiprocessing import Pool
import time
import numpy as np
import scipy.sparse as sp
import scipy.sparse.linalg as sla
from .. import comm
def deplete(chain, x,... | |
# EPlusInterface (EPI) - An interface for EnergyPlus
# Copyright (C) 2004 Santosh Philip
# This file is part of EPlusInterface.
# =======================================================================
# Distributed under the MIT License.
# (See accompanying file LICENSE or copy at
# http://opensource.org/licenses/... | |
import tensorflow as tf
from tfsnippet.ops import assert_shape_equal
from tfsnippet.utils import (add_name_and_scope_arg_doc, get_static_shape,
validate_enum_arg, assert_deps,
get_shape)
from .base import FeatureMappingFlow
from .utils import SigmoidScale, ExpS... | |
"""AVM FRITZ!Box binary sensors."""
from __future__ import annotations
import datetime
import logging
from typing import Callable, TypedDict
from fritzconnection.core.exceptions import (
FritzActionError,
FritzActionFailedError,
FritzConnectionException,
FritzServiceError,
)
from fritzconnection.lib.f... | |
import requests
import json
from urllib.parse import urljoin
from robot.api import logger
from .version import VERSION
__version__ = VERSION
class WireMockLibrary(object):
"""Robot Framework library for interacting with [http://wiremock.org|WireMock]
The purpose of this library is to provide a keyword-base... | |
##########################################################################
#
# Copyright (c) 2012-2013, Image Engine Design 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:
#
# * Redi... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# 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 (t... | |
from __future__ import print_function, absolute_import, division
"""searchspace.py
This module contains code for specifying the hyperparameter search space.
The search space is specified as a product of bounded intervals. Each dimension
can be either an integer, floating-point or enumeration.
The base measure on the ... | |
# 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... | |
from pyswagger import SwaggerApp, errs
from ..utils import get_test_data_folder
from pyswagger.primitives import Model, Array
from pyswagger.io import SwaggerRequest
import unittest
app = SwaggerApp._create_(get_test_data_folder(version='1.2', which='wordnik'))
class SwaggerRequest_Pet_TestCase(unittest.TestCase):... | |
from __future__ import unicode_literals
from base64 import b64encode
import unittest
from flask import Response
from route53_dyndns import app, route53, views
from mock import patch
from .helpers import new_resource_record
class FrontendTestCase(unittest.TestCase):
def setUp(self):
self.app = app.tes... | |
#!/usr/bin/env python
"""
.. py:currentmodule:: FileFormat.test_SimulationParameters
.. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca>
Tests for module `SimulationParameters`.
"""
# Script information for the file.
__author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)"
__version__ = ""
__date__ ... | |
from typing import ClassVar, FrozenSet
from ..config import Config
from .dependency import IngressClassesDependency, SecretDependency, ServiceDependency
from .k8sobject import KubernetesGVK, KubernetesObject
from .k8sprocessor import ManagedKubernetesProcessor
from .resource import NormalizedResource, ResourceManager... | |
""" Module for visualizer controller.
"""
import os
import imp
import gtk
import cairo
import json
import hashlib
import traceback
import settings
from gi.repository import Gtk
from views.visualizer import MainFrame
from views.network_view import NetworkView
from plots.base_plot import REGISTERED_PLOTS
class Visual... | |
"""Stupid tests that ensure logging works as expected"""
import sys
import threading
import logging as log
from io import StringIO
import unittest
import beets.logging as blog
from beets import plugins, ui
import beetsplug
from test import _common
from test._common import TestCase
from test import helper
class Logg... | |
# Generated by Django 3.1.3 on 2020-12-08 17:56
import django.db.models.deletion
import netfields.fields
from django.db import migrations, models
import peering.fields
import peeringdb.models
import utils.validators
class Migration(migrations.Migration):
dependencies = [
("peering", "0065_auto_20201025... | |
from __future__ import unicode_literals, division, absolute_import
import logging
import os
import re
import sys
from copy import copy
from datetime import datetime, date, time
import locale
from email.utils import parsedate
from time import mktime
from jinja2 import (Environment, StrictUndefined, ChoiceLoader,
... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'NPCType'
db.create_table('dm_npctype', (
('id', self.gf('django.db.models.fields... | |
"""Quizzes API Version 1.0.
This API client was generated using a template. Make sure this code is valid before using it.
"""
import logging
from datetime import date, datetime
from .base import BaseCanvasAPI
from .base import BaseModel
class QuizzesAPI(BaseCanvasAPI):
"""Quizzes API Version 1.0."""
def __i... | |
#!/usr/bin/python
# Copyright 2016 Mender Software AS
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | |
# coding=utf-8
"""
Behave BDD runner.
See _bdd_utils#get_path_by_env for information how to pass list of features here.
Each feature could be file, folder with feature files or folder with "features" subfolder
Other args are tag expressionsin format (--tags=.. --tags=..).
See https://pythonhosted.org/behave/behave.htm... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 Nebula Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | |
#!/usr/bin/python
#------------------------------------------------------------------------------
# The MIT License (MIT)
# Copyright (c) 2014 Jordi Arnavat
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configparser
from enum import Enum
import logging
import optpars... | |
from datetime import date
import flask
import pymysql.cursors
from donut.auth_utils import check_permission, get_permissions, get_user_id
from donut.constants import Gender
from donut.default_permissions import Permissions
from .permissions import DirectoryPermissions, ManageMembersPermissions
HIDDEN_FIELDS = \
se... | |
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
import miscIO
import sys
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
NA_VALUE = -999999
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
def lookAtHeaderTokens(aTok... | |
import sys
sys.path.append('..')
import time
import pygame
from pygame import Rect, Color
from pathfinder import PathFinder
from gridmap import GridMap
class Visualizer(object):
def __init__(self, screen, field, message_func):
self.screen = screen
self.field = field
self.message_func = m... | |
import unittest
import numpy
import chainer
from chainer import backend
from chainer.backend import CpuDevice
from chainer import links
from chainer import testing
@testing.parameterize(*testing.product({
'dtype': [numpy.float16, numpy.float32, numpy.float64],
't': [[0, 2], [-1, 1, 2]],
'reduce': ['sum'... | |
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for L{twisted.logger._io}.
"""
from __future__ import print_function
import sys
from twisted.trial import unittest
from .._levels import LogLevel
from .._logger import Logger
from .._observer import LogPublisher
from .._io impor... | |
import mxnet as mx
import numpy as np
def conv_act_layer(from_layer, name, num_filter, kernel=(1,1), pad=(0,0), \
stride=(1,1), act_type="relu", use_batchnorm=False):
"""
wrapper for a small Convolution group
Parameters:
----------
from_layer : mx.symbol
continue on which layer
nam... | |
# -*- coding: utf-8 -*-
"""
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | |
import errno
import fcntl
import json
import os
import threading
import time
from subprocess import PIPE
from subprocess import Popen
import mock
import service_configuration_lib
from behave import given
from behave import then
from behave import when
from itest_utils import get_service_connection_string
from kazoo.ex... | |
#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 use thi... | |
"""
Matrix Market I/O in Python.
See http://math.nist.gov/MatrixMarket/formats.html
for information about the Matrix Market format.
"""
#
# Author: Pearu Peterson <pearu@cens.ioc.ee>
# Created: October, 2004
#
# References:
# http://math.nist.gov/MatrixMarket/
#
import os
import sys
from numpy import (asarray, ... | |
"""
sentry.tasks.deletion
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from celery.utils.log import get_task_logger
from sentry.exceptions import DeleteAborted
from sentry.sig... | |
"""
Sensors on Zigbee Home Automation networks.
For more details on this platform, please refer to the documentation
at https://home-assistant.io/components/sensor.zha/
"""
import logging
from homeassistant.components.sensor import DOMAIN
from homeassistant.components.zha import helpers
from homeassistant.components.... | |
from django.utils.translation import ugettext as _
from corehq.apps.groups.models import Group
from corehq.apps.reports.standard.cases.basic import CaseListReport
from corehq.apps.api.es import CaseES
from corehq.apps.reports.standard import CustomProjectReport
from corehq.apps.reports.datatables import DataTablesHead... | |
"""Provides models for processes and process patches.
"""
# System imports
import warnings
from inspect import getsource
from copy import copy
from os.path import isfile
from os import stat
# Six imports
from six import string_types
# ROOT imports
from ROOT import TChain, TColor, SetOwnership
# owls-hep imports
fr... | |
# Copyright 2014 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... | |
from __future__ import print_function, division
from sympy import Basic, Symbol, symbols, lambdify
from util import interpolate, rinterpolate, create_bounds, update_bounds
from sympy.core.compatibility import xrange
class ColorGradient(object):
colors = [0.4, 0.4, 0.4], [0.9, 0.9, 0.9]
intervals = 0.0, 1.0
... | |
#!/usr/bin/python
ANSIBLE_METADATA = {'metadata_version': '1.0',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = '''
---
module: dellemc_unity
short_description: Configure and manage Dell EMC Unity Storage System
description:
- This module can be used to... | |
from app.lookups.sqlite.protpeptable import ProtPepTable
from app.dataformats import prottable as ph
class ProtGeneTableBase(ProtPepTable):
stdheaderfields = [
ph.HEADER_NO_PSM,
ph.HEADER_NO_PEPTIDE,
ph.HEADER_NO_UNIPEP,
]
singlefields = stdheaderfields + [ph.HE... | |
# Modified works:
# --------------------------------------------------------
# Copyright (c) 2017 - 2018 Kentaro Wada.
# Licensed under The MIT License [see LICENSE for details]
# --------------------------------------------------------
# Original works:
# --------------------------------------------------------
# exp... | |
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | |
# 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 use ... | |
#!/usr/bin/env python
##############################################################################
# Copyright (c) 2016 Huawei Technologies Co.,Ltd.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this di... | |
#!/usr/bin/env python
import sys
sys.path.append("../build/")
import phisSchema
import pyxb
import warnings
# Strategy:
# Perhaps cleanest would be to build a separate interface for data that may vary from VFB.
# This also allows separation of Jython code
# OTOH - this gives another layer of mappings to maintain.
... | |
# pylint: disable-msg=W0611, W0612, W0511,R0201
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
:version: $Id: test_subclassing.py 3473 2007-10-29 15:18:13Z jarrod.millman $
"""
from __future__ import division, absolute_import, print_function
__author__... | |
# Author: Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import inspect
import os.path as op
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_equal)
import pytest
from scipy import linalg
import scipy.io
import mne
from mn... | |
#
# Builder.py -- build schedule plugin
#
# Eric Jeschke (eric@naoj.org)
#
import os
from collections import OrderedDict
from datetime import timedelta, datetime
# ginga imports
from ginga.misc.Bunch import Bunch
from ginga.gw import Widgets
# local imports
from qplan.plugins import PlBase
from qplan import entity
... | |
# -*- coding: utf-8 -*-
"""Helper functions and classes for Houdini.
The name of this module is inspired from the Maya module.
"""
import hou
def get_network_pane():
"""returns the network pane"""
return hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor)
def get_scene_viewer():
"""returns the scene vi... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import locale
import argparse
import json
import csv
import uuid
import os
import datetime
from filters import valid_json_filter
from functools import partial
from pyspark import SparkContext, SparkConf
def dump(x):
return json.dumps(x)
def make_csv(email... | |
"""
SAS distributions for polydispersity.
"""
# TODO: include dispersion docs with the disperser models
from __future__ import division, print_function
from math import sqrt # type: ignore
from collections import OrderedDict
import numpy as np # type: ignore
from scipy.special import gammaln # type: ignore
# pyli... | |
# 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 ... | |
# Copyright (c) 2010-2012 OpenStack Foundation
# Copyright (c) 2016 OpenIO SAS
#
# 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 requir... | |
# 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... | |
#!/usr/bin/env python
__version__ = '1.0'
import itertools
import random
from kivy.app import App
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.uix.image import Image
from kivy.uix.label import Label
from kivy.uix.widget import Widget
from kivy.core.audio import SoundLoader
sfx_flap = S... | |
# -*- test-case-name: twisted.python.test.test_util
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for L{twisted.python.util}.
"""
from __future__ import division, absolute_import
import errno
import os.path
import shutil
import sys
import warnings
try:
import pwd, grp
except ... | |
from collections import defaultdict
from itertools import chain
import logging
from flask import session
from cla_public.apps.checker.constants import YES, NO
from cla_public.apps.checker.means_test import MeansTest
from cla_public.libs.money_interval import MoneyInterval
from cla_public.apps.base.tests import FlaskA... | |
# Copyright 2015, 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | |
"""
Basic IIR Bilinear Transform-Based Digital Filter Design Helper
Copyright (c) March 2017, Mark Wickert
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 ... | |
# Copyright 2015 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 unittest
from google.appengine.ext import ndb
from dashboard.common import testing_common
from dashboard.common import utils
from dashboard.models i... | |
"""Classes to work with sam and bam files"""
import struct, zlib, sys, re, itertools
from collections import namedtuple
import seqtools.format.sam
from seqtools.format.sam.header import SAMHeader
#from seqtools.sequence import rc
from cStringIO import StringIO
from string import maketrans
_bam_ops = maketrans('01234567... | |
# coding=UTF-8
"""Server stuff."""
from __future__ import print_function
from cfy import (create_server,
create_ssh_key,
attach_ssh_key,
wait_for_state,
wait_for_cond,
create_nic,
attach_nic,
get_res... | |
#-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Created on 2015/06/08
@author: Administrator
'''
from models import app_user,application
from utils import sftp2,ssh2_deploy
import logging
from datetime import datetime
from time import sleep
today = (datetime.now().date()).strftime('%Y-%m-%d')
def welogic_deploy(data_r... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# -*- coding: utf-8 -*-
import os
import random
import reversion
import six
import string
import unittest
from datetime import datetime, date
from easy_thumbnails.files import get_thumbnailer
from operator import itemgetter
from random import randint
from django.conf import settings
from django.contrib.auth.models i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.