gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#!/usr/bin/env python
"""
Auxiliary functions for f2py2e.
Copyright 1999,2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) LICENSE.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS... | |
import csv
import json
import math
import sys
results = {
'n': {
'2009': 0,
'2010': 0,
'2011': 0,
'2012': 0,
'2013': 0,
'2015': 0,
'2016': 0
},
'demographics': {
'age': {
'2009': {},
'2010': {},
'2011': {},
... | |
import base64
import hashlib
import json
import os
import re
import smtplib
import sys
import urllib
from django.core.context_processors import csrf
from django.core.validators import validate_email
from django.db.utils import IntegrityError
from django.http import *
from django.shortcuts import render_to_response
fro... | |
from __future__ import print_function
import os
import logging
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
from django.core.files.storage import default_storage
from django.core.files.images import ImageFile
from django.utils import six
from PIL import Image, Ex... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 Cisco Systems, 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... | |
#!/usr/bin/env python
# Copyright (c) 2017 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.
"""Parses OWNERS recursively and generates a machine readable component mapping.
OWNERS files are expected to contain a well-forma... | |
import math
import operator
from datetime import date, datetime
from operator import methodcaller
import pandas as pd
import pandas.testing as tm
import pytest
from pytest import param
import ibis
import ibis.expr.datatypes as dt
import ibis.expr.types as ir
from ibis import literal as L
pytest.importorskip("clickho... | |
# Copyright (c) 2014, James Hensman, Max Zwiessele
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from .parameterized import Parameterized
from .param import Param
class Remapping(Parameterized):
def mapping(self):
"""
The return value of this function gives the val... | |
#
"""
Copyright (c) 2016 World Wide Technology, Inc.
All rights reserved.
Revision history:
28 March 2016 | 1.0 - initial release
29 March 2016 | 1.1 - comments and style modifications
30 March 2016 | 1.2 - documentation update
31 March 2016 | 1.3 - password 'data type' shoul... | |
# stdlib
import json
from typing import Dict
from typing import List as TypeList
from typing import Optional
# third party
from google.protobuf.reflection import GeneratedProtocolMessageType
from typing_extensions import final
# relative
from ...... import serialize
from ......proto.grid.messages.setup_messages_pb2 i... | |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# BroBeur Studios Blog
#
# This is similar to the artcontrolme script but it deals with BroBeur Studios posts.
# It takes a folder of .meta and .wp/md/html and mashes it together as a json object.
# It also outputs a html file with a random post, a... | |
from __future__ import absolute_import
from mock import Mock, patch
import responses
from django.http import HttpRequest
from sentry.identity.vsts.provider import VSTSOAuth2CallbackView, VSTSIdentityProvider
from sentry.integrations.vsts.integration import AccountConfigView, AccountForm
from sentry.testutils import Tes... | |
#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
import os
from tests.beeswax.impala_beeswax import ImpalaBeeswaxException
from tests.common.test_vector import *
from tests.common.impala_test_suite import *
from tests.common.impala_cluster import ImpalaCluster
from tests.common.skip impor... | |
# coding: utf-8
"""
Gmail
Access Gmail mailboxes including sending user email.
OpenAPI spec version: v1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import io
import json
import ssl
import certifi
import logging
import re
# pytho... | |
import json
from importlib import reload
from unittest import TestCase
from unittest.mock import patch, MagicMock
from api_background import dhis2_export
import api_background
from api_background.dhis2_export import put, delete, get, post, NewIdsProvider, get_form_keys_to_data_elements_dict, \
get_dhis2_organisat... | |
# 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 ... | |
# 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 compliance with the License. You may obtain
# a... | |
"""
Example python code to call the 2 mocks correlation function
routines from python. (The codes are written in C)
Author: Manodeep Sinha <manodeep@gmail.com>
Requires: numpy
"""
from __future__ import print_function
from os.path import dirname, abspath, join as pjoin
import time
import numpy as np
from _countpair... | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
import collections as col
import sqlite3
def get_2d_tileset_info(db_file):
conn = sqlite3.connect(db_file)
c = conn.cursor()
row = c.execute("SELECT * from tileset_info").fetchone()
tileset_info = {
"zoom_step": row[0],
"max_length": row[1],
"assembly": row[2],
"chrom_... | |
from __future__ import absolute_import
import re
from sentry.constants import TAG_LABELS
from sentry.tagstore.exceptions import (
TagKeyNotFound,
TagValueNotFound,
GroupTagKeyNotFound,
GroupTagValueNotFound,
)
from sentry.utils.services import Service, raises
# Valid pattern for tag key names
TAG_KEY... | |
#!/usr/bin/env python
"""
Usage:
./top_filters <path_to_a_saved_DBM.pkl> <optional: output path prefix>
Displays the matrix product of the layer 1 and layer 2 weights.
Also displays a grid visualization the connections in more detail.
Row i of the grid corresponds to the second layer hidden unit
with the ith largest f... | |
import sys
import threading
import warnings
import weakref
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
from django.utils.inspect import func_accepts_kwargs
from django.utils.six.moves import range
if six.PY2:
from .weakref_backports import WeakMethod
else:
from w... | |
# 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 ... | |
# -*- coding: utf-8 -*-
import pytest
import mock
usefixtures = pytest.mark.usefixtures
parametrize = pytest.mark.parametrize
@pytest.fixture
def operation():
import operation
return operation
@pytest.fixture
def model():
import model
return model
@usefixtures('database')
@parametrize('count, o... | |
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... | |
# -*- coding: utf-8 -*-
"""
treebeard.ns_tree
-----------------
Nested Sets Tree.
:copyright: 2008 by Gustavo Picon
:license: Apache License 2.0
An implementation of Nested Sets trees for Django 1.0+, as described by
`Joe Celko`_ in `Trees and Hierarchies in SQL for Smarties`_.
Nest... | |
#
# Copyright (c) 2018 SUNET
# Copyright (c) 2013, 2014, 2016, 2017 NORDUnet A/S
# Copyright 2012 Roland Hedberg. All rights reserved.
# All rights reserved.
#
# See the file eduid-IdP/LICENSE.txt for license statement.
#
# Author : Fredrik Thulin <fredrik@thulin.net>
# Roland Hedberg
#
import logging
import t... | |
'''
Created on Sep 13, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
'''
import os
from arelle import ViewFile
from lxml import etree
from arelle.RenderingResolver import resolveAxesStructure, RENDER_UNITS_PER_CHAR
from arelle.ViewFile import HTML, XML
from arelle... | |
from functools import reduce
import numpy as np
import numpy.core.umath as umath
import numpy.core.fromnumeric as fromnumeric
from numpy.testing import (
assert_, assert_raises, assert_equal,
)
from numpy.ma import (
MaskType, MaskedArray, absolute, add, all, allclose, allequal, alltrue,
arange, arccos... | |
# The content of this file was contributed by leppton
# (http://mail.python.org/pipermail/patches/2006-November/020942.html) to
# ctypes project, under MIT License.
# This example shows how to use ctypes module to read all
# function names from dll export directory
import os
if os.name != "nt":
raise Exception("W... | |
from __future__ import unicode_literals
import datetime
import re
from decimal import Decimal
from django.core.exceptions import FieldError
from django.db import connection
from django.db.models import (
F, Aggregate, Avg, Count, DecimalField, DurationField, FloatField, Func,
IntegerField, Max, Min, Sum, Valu... | |
from __future__ import division, absolute_import
import os
import itertools
import random
import traceback
import warnings
import numpy as np
from scipy import spatial, sparse
from . import utils
from . import geometry
from . import graphics
class Network(dict):
'''
A network as defined by MiniPNM is essen... | |
"""Contains the base scenario class."""
from flow.core.params import InitialConfig
from flow.core.params import TrafficLightParams
from flow.core.params import SumoCarFollowingParams
from flow.core.params import SumoLaneChangeParams
import time
import xml.etree.ElementTree as ElementTree
from lxml import etree
from co... | |
import datetime
from pprint import pprint
from bitmovin import Bitmovin, Encoding, S3Output, H264CodecConfiguration, \
AACCodecConfiguration, H264Profile, StreamInput, SelectionMode, Stream, EncodingOutput, ACLEntry, \
ACLPermission, FMP4Muxing, MuxingStream, CloudRegion, DashManifest, FMP4Representation, FMP4... | |
"""
This bootstrap module contains code for ensuring that the astropy_helpers
package will be importable by the time the setup.py script runs. It also
includes some workarounds to ensure that a recent-enough version of setuptools
is being used for the installation.
This module should be the first thing imported in th... | |
# 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.
from code import Code
from model import PropertyType, Type
import cpp_util
import model
import schema_util
import sys
import util_cc_helper
class CCGene... | |
# Copyright (c) 2010 Cloud.com, Inc
# Copyright (c) 2012 Cloudbase Solutions Srl
#
# 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.... | |
"""
Support for repeating alerts when conditions are met.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/alert/
"""
import asyncio
from datetime import datetime, timedelta
import logging
import voluptuous as vol
from homeassistant.components.notify im... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
from django.contrib.sites.models import Site
from django.contrib.auth.models import AnonymousUser, Group
from cms.api import create_page
from cms.menu import get_visible_pages
from cms.models import Page
from cms.models import ACCESS_DESCENDANTS, ACCESS_CH... | |
import xml.dom.minidom as xml
import tempfile, os, codecs, sys, re, shutil, yaml
class TempFile(object):
def __init__(self, finalTargetFilePath):
tmpfd, self.temppath = tempfile.mkstemp()
self.tmpfo = os.fdopen(tmpfd, 'wb')
self.targetPath = finalTargetFilePath
def __enter__(self):
... | |
# -*- coding: utf-8 -*-
from datetime import date
from django.conf import settings
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
from django.contrib.auth.models import PermissionsMixin
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | |
import numpy as np
import matplotlib.pyplot as pylab
from matplotlib.widgets import Slider
pylab.rcParams['image.interpolation'] = 'sinc'
#==================================================
# display tools
#==================================================
class KeyHandler(object):... | |
from math import isnan
import itertools
import numpy as np
from AnyQt.QtWidgets import QTableView, QItemDelegate, QHeaderView
from AnyQt.QtGui import QColor, QPen, QBrush
from AnyQt.QtCore import Qt, QAbstractTableModel, QModelIndex, \
QItemSelectionModel, QItemSelection, QSize
from Orange.data import Table, Var... | |
"""Config flow to configure the Netgear integration."""
import logging
from urllib.parse import urlparse
from pynetgear import DEFAULT_HOST, DEFAULT_PORT, DEFAULT_USER
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components import ssdp
from homeassistant.const import (
CONF... | |
#!/usr/bin/env python
# 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... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
import os
import unittest
from monty.serialization import loadfn
from pymatgen.core.structure import Molecule
from pymatgen.io.qchem.inputs import QCInput
from pymatgen.util.testing import Pym... | |
"""Weight initializer."""
from __future__ import absolute_import, print_function
import re
import logging
import warnings
import json
import numpy as np
from .base import string_types
from .ndarray import NDArray, load
from . import random
from . import registry
# inherit str for backward compatibility
class InitDesc... | |
"""
Utilities to manipulate graphs (vertices and edges, not control flow graphs).
Convention:
'vertices' is a set of vertices (or a dict with vertices as keys);
'edges' is a dict mapping vertices to a list of edges with its source.
Note that we can usually use 'edges' as the set of 'vertices' too.
"""
from rpyth... | |
"""
A test spanning all the capabilities of all the serializers.
This class defines sample data and a dynamically generated
test case that is capable of testing the capabilities of
the serializers. This includes all valid data values, plus
forward, backwards and self references.
"""
import datetime
import decimal
impo... | |
import warnings
from lexer import lang
from .types import DataType
from .types import Integer
from .types import Decimal
from .types import String
from .types import Bool
from .declarations import Declaration
from .declarations import VarDeclarator
from .declarations import Identifier
from .declarations import Funct... | |
#!/usr/bin/python
# =============================================================================================
# MODULE DOCSTRING
# =============================================================================================
"""
Test restraints module.
"""
# =====================================================... | |
# -*- test-case-name: miru.test.test_camera -*-
# Copyright (c) 2008 Drew Smathers.
# See LICENSE for details
from pyglet import gl
from miru import imiru
from miru.utils import glvec
from miru import components
from miru import core
from miru import options
from euclid import Vector3
from UserList import UserList
im... | |
from pymatch import *
import functions as uf
class Matcher:
'''
Matcher Class -- Match data for an observational study.
Args:
test (pd.DataFrame): Data representing the test group
control (pd.DataFrame): Data representing the control group
formula (str): custom formula to use f... | |
"""
Module for handling Fekete points approximations.
"""
from math import pi, sin
from numpy import empty, arange
from numpy.linalg import solve
from gauss_lobatto_points import points
def get_x_phys(x_ref, a, b):
return (a+b)/2. + x_ref*(b-a)/2.;
class Mesh1D(object):
def __init__(self, points, orders):... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# pylint: disable=invalid-name
import pytest
import numpy as np
from numpy.testing import assert_allclose, assert_array_equal, assert_array_less
from astropy.modeling import models, InputParameterError
from astropy.coordinates import Angle
from astropy.m... | |
import logging.handlers
import re
import sys
import types
import warnings
from django.utils import six
from django.utils.deprecation import RemovedInDjango19Warning
warnings.warn("django.utils.dictconfig will be removed in Django 1.9.",
RemovedInDjango19Warning, stacklevel=2)
# This is a copy of the Python loggi... | |
# Copyright (c) 1996-2015 PSERC. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""Evaluates Hessian of Lagrangian for AC OPF.
"""
from numpy import array, zeros, ones, exp, arange, r_, flatnonzero as find
from scipy.sparse import vstack, hst... | |
"""Rewrite assertion AST to produce nice error messages"""
from __future__ import absolute_import, division, print_function
import ast
import errno
import itertools
import imp
import marshal
import os
import re
import six
import string
import struct
import sys
import types
import atomicwrites
import py
from _pytest.a... | |
# (c) Copyright 2012-2015 Hewlett Packard Enterprise Development LP
# 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/lic... | |
#
# __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... | |
# Copyright 2014 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | |
"""
Handle a region file, containing 32x32 chunks.
For more info of the region file format look:
http://www.minecraftwiki.net/wiki/Region_file_format
"""
from .nbt import NBTFile, MalformedFileError
from struct import pack, unpack
from gzip import GzipFile
from collections import Mapping
import zlib
import gzip
from i... | |
# Copyright 2012 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
from clang.cindex import *
import vim
import time
import re
import threading
def initClangComplete(clang_complete_flags):
global index
index = Index.create()
global translationUnits
translationUnits = dict()
global complete_flags
complete_flags = int(clang_complete_flags)
# Get a tuple (fileName, fileCont... | |
#!/usr/bin/env 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.
from cpp_type_generator import CppTypeGenerator
from json_schema import CachedLoad
import model
import unittest
class CppTypeGener... | |
#
# 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 us... | |
#!/usr/bin/env python
#
# 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 "Li... | |
"""Tests for acme.messages."""
import unittest
import mock
from acme import challenges
from acme import jose
from acme import test_util
CERT = test_util.load_comparable_cert('cert.der')
CSR = test_util.load_comparable_csr('csr.der')
KEY = test_util.load_rsa_private_key('rsa512_key.pem')
class ErrorTest(unittest.T... | |
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from c7n.utils import local_session, type_schema
from c7n_gcp.actions import MethodAction
class SetIamPolicy(MethodAction):
""" Sets IAM policy. It works with bindings only.
The action supports two lists for modifying the exi... | |
"""Testing the metric for classification with imbalanced dataset"""
# Authors: Guillaume Lemaitre <g.lemaitre58@gmail.com>
# Christos Aridas
# License: MIT
from __future__ import division, print_function
from functools import partial
import numpy as np
from pytest import approx, raises
from sklearn impor... | |
"""The tests for the time_pattern automation."""
import pytest
import homeassistant.components.automation as automation
from homeassistant.setup import async_setup_component
import homeassistant.util.dt as dt_util
from tests.common import async_fire_time_changed, async_mock_service, mock_component
from tests.componen... | |
from django.forms import ValidationError
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.tests.utils import HAS_SPATIALREFSYS
from django.test import SimpleTestCase
from django.utils import six
from django.utils.html import escape
from django.utils.unittest import skipUnless
if HAS_SPATIALREFSYS:
... | |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2013 The Swarming Authors. All rights reserved.
# Use of this source code is governed by the Apache v2.0 license that can be
# found in the LICENSE file.
import StringIO
import base64
import json
import logging
import os
import signal
import shutil
import subprocess
imp... | |
#!/usr/bin/env python
#
# __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,
... | |
import sys, os, math
from priority_queue import *
class Node:
def __init__(self, name, group, value = 0):
self.name = name;
self.value = value;
self.group = group;
# def __eq__( self, other ):
# return self.name == other.name and self.value == other.value;
def same_name_with( self, other ):
return self.... | |
# coding=utf-8
from lib.Logging import get_log
__author__ = 'Anatoli Kalysch'
import ui.SettingsWindow as SettingsWindow
from dynamic.dynamic_deobfuscate import *
from lib.VMRepresentation import *
from static.static_deobfuscate import *
from ui.AboutWindow import AboutWindow
from ui.UIManager import UIManager
clas... | |
# MyInventory.setInventory(self.tab_inventory)
from tkinter import *
from tkinter.ttk import *
from hack_classes import Item
import os.path
from tooltip import ToolTip
from tkinter import messagebox
from random import *
class SetInventoryItem():
"""
Store inventory item info, grid position, and character item... | |
# Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | |
"""
Test lldb-mi startup options.
"""
from __future__ import print_function
import lldbmi_testcase
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
import os
class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
mydir = TestBase.compute... | |
"""
NetworkX to d3.js Force Layout
==============================
MPLD3 Plugin to convert a NetworkX graph to a force layout.
This is an example demoed `here
<http://blog.kdheepak.com/mpld3-networkx-d3js-force-layout.html>`_
You can download the plugin from the Github repo `here
<https://github.com/kdheepak/mpld3_plu... | |
from __future__ import absolute_import
from __future__ import with_statement
import socket
from mock import patch
from kombu import common
from kombu.common import (Broadcast, maybe_declare, declared_entities,
send_reply, isend_reply, collect_replies)
from .utils import TestCase
from .util... | |
"""Utilities related archives.
"""
import logging
import os
import shutil
import stat
import tarfile
import zipfile
from pip._internal.exceptions import InstallationError
from pip._internal.utils.filetypes import (
BZ2_EXTENSIONS,
TAR_EXTENSIONS,
XZ_EXTENSIONS,
ZIP_EXTENSIONS,
)
from pip._internal.uti... | |
from direct.directnotify import DirectNotifyGlobal
from toontown.battle import BattlePlace
from direct.fsm import ClassicFSM, State
from direct.fsm import State
from direct.showbase import BulletinBoardWatcher
from pandac.PandaModules import *
from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAv... | |
# Lint as: python3
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | |
from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import (Net, RealApplianceSource,
BLSTMLayer, DimshuffleLayer,
Bidirectio... | |
#
# Contents.py -- Table of Contents plugin for fits viewer
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.util.six import itervalues
from ginga.util.six.moves import map
from ginga import GingaPlugin
from ginga.misc import Bunch
from ginga.g... | |
#
# 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
# ... | |
from __future__ import print_function
from collections import namedtuple, defaultdict
import copy
import os
import sys
from itertools import permutations, takewhile
import numpy as np
from llvmlite import ir as llvmir
import llvmlite.llvmpy.core as lc
from llvmlite.llvmpy.core import Type, Constant, LLVMException
im... | |
from utils import ViewBox, attributesToSVG
from ..utils.struct import Vector as V, identity
from ..utils.dictionary import Dictionary
class Element (object):
def __init__ (self, **attr):
if attr.has_key ('name'):
self.name = attr['name']
else:
self.name = None
if at... | |
# Copyright 2014 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
# 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
# distributed unde... | |
x = ('R0lGODlhigJnAef/AAABAAEEAAkCAAMGAg0GBAYJBQoMCBMODQ4QDRITEBkS'
+'CxsSEhkWDhYYFQ0aJhkaGBweGyccGh8hHiIkIiMmGTEiHhQoPSYoJSkqKDcp'
+'Ii0uLDAxLzI0Mh44U0gxMDI5JkM0JjU3NDY6Kjc5Njo7OUE8Ozw+Oz89QTxA'
+'F1akOFFiRIgPHTZksKBAgMCLGTdGNIAAQgKfDAcgZbj0odOnUA8GBAA7'
+'CxsSEhkWDhYYFQ0aJhkaGBweGyccGh8hHiIkIiMmGT... | |
"""Qubits for quantum computing.
Todo:
* Finish implementing measurement logic. This should include POVM.
* Update docstrings.
* Update tests.
"""
import math
from sympy import Integer, log, Mul, Add, Pow, conjugate
from sympy.core.basic import sympify
from sympy.matrices.matrices import Matrix, zeros
from sympy.pri... | |
#!/usr/bin/python
import getopt
import sys
from Bio import SeqIO
import time
import os
import shutil
import pandas
__author__ = "Andriy Sheremet"
#Helper functions definitions
def parse_contigs_ind(f_name):
"""
Returns sequences index from the input files(s)
remember to close index object after use
... | |
"""Support for providing temporary directories to test functions."""
import os
import re
import sys
import tempfile
from pathlib import Path
from typing import Optional
import attr
from .pathlib import LOCK_TIMEOUT
from .pathlib import make_numbered_dir
from .pathlib import make_numbered_dir_with_cleanup
from .pathli... | |
""" Properties are objects that can be assigned as class level
attributes on Bokeh models, to provide automatic serialization
and validation.
For example, the following defines a model that has integer,
string, and list[float] properties::
class Model(HasProps):
foo = Int
bar = String
baz ... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\race.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_RaceWindow(object):
def setupUi(self, RaceWindow):
RaceWindow... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.