gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to use the AWS SDK for Python (Boto3) with Amazon Polly to synthesize
speech and manage custom lexicons.
"""
import io
import json
import logging
import time
from botocore.exceptions impor... | |
import time
import threading
import uuid
from nose.tools import eq_
from nose.tools import raises
from kazoo.exceptions import KazooException
from kazoo.protocol.states import EventType
from kazoo.testing import KazooTestCase
class KazooDataWatcherTests(KazooTestCase):
def setUp(self):
super(KazooDataWa... | |
import calendar
import time
import uuid
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import Http404
import commonware.log
from jingo.helpers import urlparams
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest... | |
'''This is a test for functionality of ANN_simulation.py
'''
import sys, os, math, subprocess, matplotlib
from functools import reduce
matplotlib.use('agg')
sys.path.append('../src/') # add the source file folder
from ANN_simulation import *
from numpy.testing import assert_almost_equal, assert_equal
class test_S... | |
import datetime
import docker
import multiprocessing
import os
import pkg_resources
import platform
import subprocess
from vent.api.plugins import Plugin
from vent.api.templates import Template
from vent.helpers.paths import PathDirs
def Version():
""" Get Vent version """
version = ''
try:
versio... | |
from django import oldforms, template
from django.conf import settings
from django.contrib.admin.filterspecs import FilterSpec
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cache import never_cache
from django.contrib.contenttypes.models import ContentType
from dja... | |
import os
import re
import json
import base64
import logging
import datetime
import time
import copy
import decimal
import cgi
import itertools
import StringIO
import subprocess
import gevent
import gevent.pool
import gevent.ssl
import numpy
import pymongo
from geventhttpclient import HTTPClient
from geventhttpclient.... | |
"""Support for the SpaceAPI."""
import voluptuous as vol
from homeassistant.components.http import HomeAssistantView
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_ICON,
ATTR_LOCATION,
ATTR_STATE,
ATTR_UNIT_OF_MEASUREMENT,
CONF_ADDRESS,
CONF_EMAIL,
CONF_ENTITY_ID,
CONF_SENSO... | |
__author__ = 'tom.bailey'
'''TB Animation Tools is a toolset for animators
*******************************************************************************
License and Copyright
Copyright 2015-Tom Bailey
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU L... | |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import unittest
import os
import random
from collections import OrderedDict
import gzip
import json
import numpy as np
import pandas as pd
from ruamel.yaml import YAML
from pymatgen import Molecule, Element, La... | |
#!/usr/bin/env python
# Copyright (C) 2013 Adobe Systems Incorporated. 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 n... | |
# 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... | |
#Scrape a facebook group and add to a specified user's playlist
import sys, os
sys.path.insert(0, os.path.abspath('..'))
import argparse
import re
import csv
from datetime import datetime
from common import posts
from common.posts import facebook_post
from common.posts.facebook_post import FacebookPost as FacebookPos... | |
# -*- coding: utf-8 -*-
"""This module contains some Neural Networks functions.
"""
__author__ = 'Wenzhi Mao'
__all__ = ["NeuralNet"]
class NeuralNet(object):
'''This is a neu web class to setup a web and perform the training.
The content is based on the Artificial Neural Networks.
The training is perf... | |
# Copyright (C) 2013 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 ... | |
import itertools
import numpy as np
nax = np.newaxis
import gaussians
from misc import array_map, my_inv, full_shape, broadcast, dot, process_slice, match_shapes, _err_string, set_err_info, transp
import scipy.linalg
class BaseMatrix:
def __init__(self):
self.mutable = False
def set_mutable(self, m):... | |
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from PyQt4 import QtCore, QtGui
class StateSwitchEvent(QtCore.QEvent):
StateSwitchType = QtCore.QEvent.User + 256
def __init__(self, rand=0):
super(StateSwitchEvent, self).__init__(StateSwitchEvent.StateSwitchType)
self.m_rand = rand
def rand(... | |
# Copyright 2015 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 ... | |
from __future__ import division
import numpy as np
from functools import partial
import warnings
from menpo.feature import no_op
from menpo.base import name_of_callable
from menpofit.visualize import print_progress
from menpofit.base import batch
from menpofit.builder import (scale_images, rescale_images_to_reference... | |
# Copyright 2012 Anton Beloglazov
#
# 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... | |
"""Accumuldated days"""
import datetime
from pandas.io.sql import read_sql
from pyiem.plot import figure_axes
from pyiem.util import get_autoplot_context, get_dbconn
from pyiem.exceptions import NoDataFound
PDICT = {
"high_above": "High Temperature At or Above",
"high_below": "High Temperature Below",
"lo... | |
# Run the _testcapi module tests (tests for the Python/C API): by defn,
# these are all functions _testcapi exports whose name begins with 'test_'.
import os
import pickle
import random
import subprocess
import sys
import time
import unittest
from test import support
try:
import _posixsubprocess
except ImportErro... | |
#!/usr/bin/env python
""" UCS worker class for pyflex
In the future, this will really be the core renderer. All of the
work of deleting config that shouldn't be there, or creating it
when it should, will be handled here.
Think of the functions file(s) as just that - containers of functions.
This f... | |
# Copyright 2012 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# Copyright 2011 OpenStack Foundation
# Copyright 2011 - 2012, 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-... | |
import numpy as np
import pandas as pd
from deap import algorithms, base, creator, tools
import copy
import logging
import random
from precis import abbreviate
from precis import evaluate
from precis import plot
from precis.base import AbbreviatedMeasure
class Generator:
'''Generates abbreviated measures.
A... | |
#!/usr/bin/python
"""
PDU
"""
import re
import socket
import struct
try:
import netifaces
except ImportError:
netifaces = None
from .settings import settings
from .debugging import ModuleLogger, bacpypes_debugging, btox, xtob
from .comm import PCI as _PCI, PDUData
# pack/unpack constants
_short_mask = 0xFF... | |
import os
import uuid
from datetime import date, datetime, time
from django.db import models
from django.db.models.query import QuerySet
from django.db.models import sql, manager
from django.contrib.auth.models import User
### For basic tests and bench
class Category(models.Model):
title = models.CharField(max_... | |
"""
Test featurize.py.
"""
import joblib
import numpy as np
from rdkit_utils import conformers, serial
import shutil
import tempfile
import unittest
from rdkit import Chem
from rdkit.Chem import AllChem
from vs_utils.scripts.featurize import main, parse_args
from vs_utils.utils import read_pickle, write_pickle
clas... | |
"""Tests for the main tournament class."""
import axelrod
import logging
from multiprocess import Queue, cpu_count
import unittest
import random
import tempfile
import csv
from hypothesis import given, example, settings
from hypothesis.strategies import integers, lists, sampled_from, random_module, floats
try:
... | |
import sys, os, binascii, shutil, io
from . import __version_verifier_modules__
from . import ffiplatform
if sys.version_info >= (3, 3):
import importlib.machinery
def _extension_suffixes():
return importlib.machinery.EXTENSION_SUFFIXES[:]
else:
import imp
def _extension_suffixes():
ret... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# Copyright 2014 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | |
#!/usr/bin/env python
import numpy as np
from scipy.interpolate import interp1d
import matplotlib.pyplot as plt
def debye_fun(x):
"""
Return debye integral value
- calculation done using interpolation in a lookup table
- interpolation done in log-space where behavior is close to linear
- linear ext... | |
# ==============================================================================
# Copyright 2018-2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | |
# 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... | |
"""
Interface to Constrained Optimization By Linear Approximation
Functions
---------
.. autosummary::
:toctree: generated/
fmin_cobyla
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy.lib.six import callable
from scipy.optimize import _cobyla
from .optimize... | |
# -*- coding: utf-8 -*-
"""
Display number of todos and more for Thunderbird.
Configuration parameters:
cache_timeout: refresh interval for this module (default 60)
format: display format for this module (default '{format_todo}')
format_datetime: specify strftime formatting to use (default {})
format_s... | |
# -*- coding: utf-8 -*-
import markupsafe
from django.db import models
from addons.base import exceptions
from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings,
BaseStorageAddon)
from addons.bitbucket.api import BitbucketClient
from addons.bitbucket.serializer ... | |
from contextlib import contextmanager
import tracemalloc
import numpy as np
import pytest
from pandas._libs import hashtable as ht
import pandas._testing as tm
@contextmanager
def activated_tracemalloc():
tracemalloc.start()
try:
yield
finally:
tracemalloc.stop()
def get_allocated_kha... | |
__file__ = 'OffSystem_v1'
__date__ = '5/29/14'
__author__ = 'ABREZNIC'
import os, arcpy, xlwt, datetime
#date
now = datetime.datetime.now()
curMonth = now.strftime("%m")
curDay = now.strftime("%d")
curYear = now.strftime("%Y")
today = curYear + "_" + curMonth + "_" + curDay
#variables
qcfolder = "C:\\TxDOT\\QC\\Off... | |
from __future__ import unicode_literals
from rbpkg.utils.matches import matches_current_system, matches_version_range
class PackageRules(object):
"""A set of rules for installing and managing packages.
The rules provide rbpkg with the information needed to install or manage
packages, and to handle non-P... | |
# 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 ... | |
# Lint as: python3
# Copyright 2020 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 ... | |
#
# 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... | |
# Copyright 2013 OpenStack Foundation
# Copyright 2013 Red Hat, 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... | |
"""
The :mod:`sklearn.kernel_approximation` module implements several
approximate kernel feature maps base on Fourier transforms.
"""
# Author: Andreas Mueller <amueller@ais.uni-bonn.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
import scipy.sparse as sp
from scipy.linalg import svd
from .base im... | |
# -*- coding: utf-8 -*-
"""
Copyright [2009-2019] EMBL-European Bioinformatics Institute
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... | |
# -*- coding: utf-8 -*-
#
# Copyright 2015-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... | |
"""
I would like to remove this to a dedicated async HTTP server.
Upload flow:
1 Upload handled by nginx (written to /tmp).
2 Upload handed off to uWSGI application, which auths users and performs
validation.
3 Upload handed off to aiohttp server, temp file path passed.
4 Application waits for aiohttp and nginx... | |
import pandas as pd
import numpy as np
import os
from datetime import datetime
import numbers
import requests
import re
import cPickle
from sklearn.cluster import DBSCAN
from matplotlib import colors, cm
from statsmodels.api import OLS
class ChicagoData():
def __init__(self, *args):
self.DATA_PATH = os.path.join... | |
# 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... | |
"""
OEShape overlap utilities.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "3-clause BSD"
import collections
import numpy as np
from openeye.oechem import *
from openeye.oeshape import *
from oe_utils.shape.color import ColorForceField
class ColorOverlap(O... | |
"""
Base classes for writing management commands (named commands which can
be executed through ``django-admin`` or ``manage.py``).
"""
import os
import sys
import warnings
from argparse import ArgumentParser, HelpFormatter
from io import TextIOBase
import django
from django.core import checks
from django.core.exceptio... | |
"""Test the zerproc lights."""
import pytest
import pyzerproc
from homeassistant import setup
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_HS_COLOR,
ATTR_RGB_COLOR,
ATTR_XY_COLOR,
SCAN_INTERVAL,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
)
from homeassistant.components.zerproc... | |
#!/usr/bin/env python
"""Surge: cryptocurrency data downloader.
Downloads cryptocurrency price data from the public APIs of BitcoinAverage,
CryptoCoinCharts, and Bittrex. Writes to a PostgreSQL database.
"""
from __future__ import division, print_function, unicode_literals, absolute_import
try:
import sys
im... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of kothic, the realtime map renderer.
# kothic 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
# ... | |
# Copyright (c) 2012-2016, Neville-Neil Consulting
# 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 condi... | |
# We can not use pytest here, because we run
# build_tools/azure/test_pytest_soft_dependency.sh on these
# tests to make sure estimator_checks works without pytest.
import unittest
import sys
import numpy as np
import scipy.sparse as sp
import joblib
from sklearn.base import BaseEstimator, ClassifierMixin
from sklea... | |
"""Support for installing and building the "wheel" binary package format.
"""
# The following comment should be removed at some point in the future.
# mypy: strict-optional=False
from __future__ import absolute_import
import collections
import compileall
import csv
import logging
import os.path
import re
import shut... | |
# -*- test-case-name: pyflakes -*-
# (c) 2005-2008 Divmod, Inc.
# See LICENSE file for details
import __builtin__
import os.path
from compiler import ast
from pyflakes import messages
class Binding(object):
"""
Represents the binding of a value to a name.
The checker uses this to keep track of which n... | |
from numpy import (
vstack, where, intersect1d, in1d, unique,
cross, abs, arccos, sign,
dot, array, cov, nan_to_num, inf, pi,
hstack, repeat, bincount, arange
)
from numpy.linalg import norm, solve
class Box2D:
def __init__(self, *args, **kwargs):
if len(args) <= 5:
self._comp... | |
import random
import math
def gen_gradient(args, resource, inflow, radius, loc, common=True):
"""
Returns a line of text to add to an environment file, initializing a
gradient resource with the specified
name (string), inflow(int), radius(int), and location (tuple of ints)
"""
return "".join([... | |
#(C) Copyright Syd Logan 2017-2020
#(C) Copyright Thousand Smiles Foundation 2017-2020
#
#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 req... | |
# -*- coding: utf-8 -*-
"""A searcher to find file entries within a file system."""
import re
import sre_constants
from dfvfs.lib import definitions
from dfvfs.lib import errors
from dfvfs.path import factory as path_spec_factory
class FindSpec(object):
"""Find specification object."""
def __init__(
self... | |
# encoding: utf8
from django.test import TestCase
from django.db.migrations.autodetector import MigrationAutodetector, MigrationQuestioner
from django.db.migrations.state import ProjectState, ModelState
from django.db.migrations.graph import MigrationGraph
from django.db import models
class AutodetectorTests(TestCase... | |
# coding: utf-8
from __future__ import division, unicode_literals
"""
This module implements an interface to enumlib, Gus Hart"s excellent Fortran
code for enumerating derivative structures.
This module depends on a compiled enumlib with the executables multienum.x and
makestr.x available in the path. Please downloa... | |
#!/usr/bin/env python3
# Copyright (c) 2020 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 addr relay
"""
from test_framework.messages import (
CAddress,
NODE_NETWORK,
NODE_WITNESS... | |
from collections import namedtuple
from itertools import chain
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from sqlalchemy.dialects.postgresql import JSON, JSONB
from sqlalchemy.orm.attributes import InstrumentedAttribute
from sqlalchemy.sql.elements import Label
from sqlalchemy.sql.expression i... | |
import socket
import struct
import threading
from _pydev_comm.pydev_io import PipeIO, readall
from _shaded_thriftpy.thrift import TClient
from _shaded_thriftpy.transport import TTransportBase
REQUEST = 0
RESPONSE = 1
class MultiplexedSocketReader(object):
def __init__(self, s):
self._socket = s
... | |
#!/usr/bin/env python
# -*- coding: latin-1 -*-
import argparse
import textwrap
from datetime import datetime
import json
import numpy as np
import os
import pycurl
import pandas as pd
from pandas.io.json import json_normalize
from utils.utils import check_create_folder, exit, timer, list_files
from charts import set... | |
# -*- coding: utf-8 -*-
"""
Django settings for nectR Tutoring project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from __future__ import absolute_import, unic... | |
from flask import abort, flash, render_template, redirect, url_for, request
from flask.ext.login import login_required
from sqlalchemy.exc import IntegrityError
from wtforms.fields import SelectField
from flask_wtf.file import InputRequired
from forms import (
AddDescriptorOptionValueForm,
EditDescriptorNameFo... | |
#
# 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
## Copyright 2015 Novartis Institutes for BioMedical Research
## 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
##
#... | |
"""
(c) RIKEN 2017. All rights reserved.
Author: Keitaro Yamashita
This software is released under the new BSD License; see LICENSE.
"""
import iotbx.phil
import os
import subprocess
import tempfile
import shutil
import h5py
import bitshuffle.h5
master_params_str = """
h5in = None
.type = path
.help = "Input fil... | |
# 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
# d... | |
#
# 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... | |
# 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 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Question.accepted_time'
db.alter_column(u'catalog_ques... | |
import logging, re, os, shutil, sys
from datetime import date, datetime
from dataclasses import dataclass
from collections import defaultdict
from os.path import expanduser
from typing import List, Optional
from dateutil.parser import parse as dateutil_parse
from modgrammar import *
import yaml
from invoice import In... | |
# Copyright (C) 2010, 2011 Sebastian Thiel (byronimo@gmail.com) and contributors
#
# This module is part of GitDB and is released under
# the New BSD License: http://www.opensource.org/licenses/bsd-license.php
"""Contains interfaces for basic database building blocks"""
__all__ = ( 'ObjectDBR', 'ObjectDBW', 'RootPathD... | |
#!/usr/bin/env 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, softwa... | |
import numpy as np
from histomicstk.utils import gradient_diffusion
def gvf_tracking(I, Mask, K=1000, Diffusions=10, Mu=5, Lambda=5, Iterations=10,
dT=0.05):
"""
Performs gradient-field tracking to segment smoothed images of cell nuclei.
Takes as input a smoothed intensity or Laplacian-... | |
import os
from contextlib import contextmanager
from unittest import mock
import pytest
import great_expectations.exceptions as gee
from great_expectations.data_context.util import (
PasswordMasker,
parse_substitution_variable,
secretmanager,
substitute_value_from_aws_secrets_manager,
substitute_v... | |
#! /usr/bin/env python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions ... | |
"""
$url abema.tv
$type live, vod
$region Japan
"""
import hashlib
import hmac
import logging
import re
import struct
import time
import uuid
from base64 import urlsafe_b64encode
from binascii import unhexlify
from Crypto.Cipher import AES
from requests import Response
from requests.adapters import BaseAdapter
from ... | |
# 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... | |
"""
Copyright (c) 2016 Stepan Fedorko-Bartos, Ceegan Hale
Under MIT License - https://github.com/Step7750/ScheduleStorm/blob/master/LICENSE.md
This file is a resource for Schedule Storm - https://github.com/Step7750/ScheduleStorm
"""
from .University import University
import requests
import json
import time
import t... | |
# Copyright 2017 The dm_control 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 i... | |
# -*- coding: utf-8 -*-
"""
celery.app.defaults
~~~~~~~~~~~~~~~~~~~
Configuration introspection and defaults.
:copyright: (c) 2009 - 2012 by Ask Solem.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import sys
from collections import deque
from datetime ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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/li... | |
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | |
"""Tests for the HomeKit component."""
from unittest.mock import patch, ANY, Mock
import pytest
from homeassistant import setup
from homeassistant.components.homekit import (
generate_aid, HomeKit, MAX_DEVICES, STATUS_READY,
STATUS_RUNNING, STATUS_STOPPED, STATUS_WAIT)
from homeassistant.components.homekit.ac... | |
#-------------------------------------------------------------------------------
# Name: Main
# Purpose: To handle the main gui
#
# Author: ParkerMc
#
# Created: 21/05/2016
# Copyright: (c) ParkerMc 2016
# Licence: MIT
#--------------------------------------------------------------------------... | |
# Natural Language Toolkit: Logic
#
# Author: Peter Wang
# Updated by: Dan Garrette <dhgarrette@gmail.com>
#
# Copyright (C) 2001-2015 NLTK Project
# URL: <http://nltk.org>
# For license information, see LICENSE.TXT
"""
An implementation of the Hole Semantics model, following Blackburn and Bos,
Representation and ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_canframe
----------------------------------
Tests for `canframe` module.
"""
import sys
import unittest
assert sys.version_info >= (3, 3, 0), "Python version 3.3 or later required!"
from can4python import exceptions
from can4python import cansignal
from can4py... | |
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Library to make common google storage operations more reliable.
"""
import logging
import os
from chromite.buildbot import constants
from chromit... | |
"""Transformed histograms.
These histograms use a transformation from input values to bins
in a different coordinate system.
There are three basic classes:
* PolarHistogram
* CylindricalHistogram
* SphericalHistogram
Apart from these, there are their projections into lower dimensions.
And of course, it is possible... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.