gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
try:
from builtins import object
except ImportError:
pass
from transitions import Machine, State, MachineError
from unittest import TestCase
from .utils import Stuff, InheritedStuff
try:
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock
class TestTransitions(TestCase... | |
import unicodedata
import sqlalchemy as sa
from sqlalchemy import schema, inspect
from sqlalchemy import MetaData, Integer, String
from sqlalchemy.testing import (
ComparesTables, engines, AssertsCompiledSQL,
fixtures, skip)
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy.testing import eq_,... | |
import json
from datetime import datetime, timedelta, timezone
from laceworksdk import LaceworkClient
import demistomock as demisto
from CommonServerPython import *
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
handle_proxy()
''' GLOBAL VARS '''
LACEWORK_ACCOUNT = demisto.params().get('l... | |
#!/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 XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
import unittest
from datetime import date, time
from ...compatibility import StringIO
from ...worksheet import Worksheet
from ..helperfunctions imp... | |
#!/usr/bin/env python
# Copyright 2015 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
from __future__ import unicode_literals
import getpass
import optparse
import os
import re
import subprocess
import sys
try:
import urllib.request as compat_urllib_request
except ImportError: # Python 2
import urllib2 as compat_urllib_request
try:
import urllib.error as compat_urllib_error
except Impor... | |
import pytest
from snovault.util import _get_calculated_properties_from_paths
from snovault.util import select_distinct_values
# Test item with calculated property.
COLLECTION_URL = '/testing-link-targets/'
def test_get_calculated_properties_from_paths(dummy_request):
paths = [
COLLECTION_URL + 'ABC12... | |
# Copyright 2009-2020 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""
A collection of tools around :doc:`multi-table inheritance </dev/mti>`.
"""
import logging ; logger = logging.getLogger(__name__)
from django.db import models
from django.db import router
# from dj... | |
# Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | |
# Copyright (c) 2012 Andy Davidoff http://www.disruptek.com/
# Copyright (c) 2010 Jason R. Coombs http://www.jaraco.com/
# Copyright (c) 2008 Chris Moyer http://coredumped.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "... | |
# Copyright 2018 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... | |
# 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.
# --------------------------------------------------------------------... | |
# Copyright (c) 2006-2010 Tampere University of Technology
#
# 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, modi... | |
# coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 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,... | |
from .context import sol
import os
import random
import pytest
# ============================ defines ===============================
FILENAME = 'temp_test_file.sol'
EXAMPLE_MAC = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08]
# ============================ fixtures ==============================
@pytest.fixtur... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
"""
Service monitor DB to store VM, SI information
"""
import inspect
from cfgm_common import jsonutils as json
from cfgm_common.vnc_object_db import VncObjectDBClient
from sandesh_common.vns.constants imp... | |
import sys
import contextlib
import StringIO
# This is intended to be executed in the same environment as the script.
# Among other things, it creates a doctest implementation and cleans up the
# namespace from the previous run.
class _testmod(object):
sys = sys
StringIO = StringIO
def __init__(self):
self... | |
"""HTML table parsing.
ClientTable is a Python module for generic HTML table parsing. It is
most useful when used in conjunction with other parsers (htmllib or
HTMLParser, regular expressions, etc.), to divide up the parsing work
between your own code and ClientTable.
RFC 1866: HTML 2.0
RFC 1942: HTML Tables
HTML 4.... | |
from __future__ import unicode_literals
from collections import OrderedDict
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import models
from django.db import transaction
from django.db.models.query import QuerySet
from django.utils.encoding import python_2_unicode... | |
import time
from django.conf.urls.defaults import patterns, url, include
from django.contrib.auth.models import User
from django.test import Client, TestCase
from djangorestframework.views import View
# Since oauth2 / django-oauth-plus are optional dependancies, we don't want to
# always run these tests.
# Unfortun... | |
# Copyright (c) 2010-2012 OpenStack, 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 ... | |
import re
from django.forms import ValidationError
from nose.tools import eq_
from pyquery import PyQuery as pq
from kitsune.users.forms import (
AuthenticationForm, ProfileForm, RegisterForm, SetPasswordForm,
ForgotUsernameForm, username_allowed)
from kitsune.sumo.tests import TestCase
from kitsune.users.tes... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012-2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | |
"""Edit a JPG Exif segment via an Exif instance """
## http://exif.org/
## EXIF segment looks like this:
## 2 bytes JPEG EXIF marker
## 2 bytes length
## 2 bytes EXIF identifier code
## TIFF header
## then there are 2 IFD's (1 for metadata, one for thumbnail)
## 0 IFD - metadata (not so easy, there is actualy exi... | |
# jaccard join
from joblib import delayed, Parallel
import pandas as pd
from py_stringsimjoin.join.set_sim_join import set_sim_join
from py_stringsimjoin.utils.generic_helper import convert_dataframe_to_array, \
get_attrs_to_project, get_num_processes_to_launch, remove_redundant_attrs, \
split_table
from py_st... | |
# -*- encoding: utf-8
"""
The main class that starts and runs Suplemon.
"""
__version__ = "0.1.38"
import os
import sys
import logging
from . import ui
from . import modules
from . import themes
from . import helpers
from .file import File
from .logger import LoggingHandler
from .config import Config
from .editor ... | |
from contextlib import contextmanager
from functools import wraps
import datetime
import logging
import os
import re
import unittest
try:
from unittest import mock
except ImportError:
from .libs import mock
from peewee import *
from peewee import sqlite3
from playhouse.mysql_ext import MariaDBConnectorDatabase... | |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow/core/framework/function.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | |
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from ..azure_common import BaseTest, arm_template, cassette_name
from c7n_azure.resources.key_vault import (KeyVaultUpdateAccessPolicyAction, WhiteListFilter,
KeyVaultFirewallRulesFilter,
... | |
# version code 941
# Please fill out this stencil and submit using the provided submission script.
from vecutil import list2vec
from solver import solve
from matutil import listlist2mat, coldict2mat, mat2rowdict, mat2coldict
from mat import Mat
from GF2 import one
from vec import Vec
from hw4 import vec2rep, rep2vec
f... | |
"""distutils.command.bdist_wininst
Implements the Distutils 'bdist_wininst' command: create a windows installer
exe-program."""
import sys, os
from distutils.core import Command
from distutils.util import get_platform
from distutils.dir_util import create_tree, remove_tree
from distutils.errors import *
from distutil... | |
"""Tests for certbot.client."""
import os
import shutil
import tempfile
import unittest
import OpenSSL
import mock
from acme import jose
from certbot import account
from certbot import errors
from certbot import le_util
from certbot.tests import test_util
KEY = test_util.load_vector("rsa512_key.pem")
CSR_SAN = te... | |
import copy
import inspect
import os
from six.moves import http_client as httplib
import pytest
import yaml
from vcr.compat import mock, contextlib
from vcr.cassette import Cassette
from vcr.errors import UnhandledHTTPRequestError
from vcr.patch import force_reset
from vcr.stubs import VCRHTTPSConnection
def test_c... | |
#!/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.
"""Makes sure that all files contain proper licensing information."""
import optparse
import os.path
import subprocess
import sys... | |
#!/usr/bin/env python
# Created by Pearu Peterson, June 2003
import warnings
from numpy.testing import assert_equal, assert_almost_equal, assert_array_equal, \
assert_array_almost_equal, assert_allclose, TestCase, run_module_suite
from numpy.testing.utils import WarningManager
from numpy import array, diff, li... | |
import copy
import mock
import pytest
import scrapi
from scrapi.linter.document import NormalizedDocument
from scrapi import tasks
from scrapi import registry
from scrapi.migrations import delete
from scrapi.migrations import rename
from scrapi.migrations import cross_db
from scrapi.migrations import renormalize
from... | |
#!/usr/bin/env python
#
# Basic VAPIX PTZ node, based on documentation here:
# http://www.axis.com/global/en/support/developer-support/vapix
import threading
import rospy
from axis_camera.msg import Axis
from std_msgs.msg import Bool
from dynamic_reconfigure.server import Server
from axis_camera.cfg import PTZConfi... | |
import _locale
import javascript
# Javascript Date constructor
date = javascript.Date.new
now = javascript.Date.now
#daylight = 0 # fix me.. returns Non zero if DST timezone is defined
##############################################
# Added to pass some tests
# Are there timezone always in the browser?
# I'm assuming... | |
# Copyright (c) 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2014 The Plaso Project Authors.
# Please see the AUTHORS file for details on individual authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the L... | |
# -*- coding: utf-8 -*-
# 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 require... | |
# -*- coding: utf8 -*-
"""
.. module:: lesscpy.lessc.color
:synopsis: Lesscpy Color functions
Copyright (c)
See LICENSE for details.
.. moduleauthor:: Johann T. Mariusson <jtm@robot.is>
"""
import colorsys
from . import utility
from lesscpy.lib import colors
class Color():
def process(self, expressi... | |
# Copyright 2013-2018 ARM Limited
#
# 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 w... | |
"""HighThroughputExecutor builds on the Swift/T EMEWS architecture to use MPI for fast task distribution
"""
from concurrent.futures import Future
import logging
import threading
import queue
import pickle
from multiprocessing import Process, Queue
from ipyparallel.serialize import pack_apply_message # ,unpack_apply... | |
"""Runs for paper"""
import matplotlib as mpl
mpl.use('Agg')
import numpy as np
import pickle
from collections import defaultdict
from funkyyak import grad, kylist, getval
import hypergrad.mnist as mnist
from hypergrad.mnist import random_partition
from hypergrad.nn_utils import make_nn_funs, VectorParser
from hypergr... | |
# 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 ... | |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Test the timeline view."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
import mock
from grr_response_core.lib.rdfvalues import client_fs as rdf_client_fs
from grr_response_core.li... | |
from afqueue.messages.base_message import BaseMessage #@UnresolvedImport
from afqueue.messages import message_types #@UnresolvedImport
class SystemOrderedQueueExhaustedOwnersMessage(BaseMessage):
def __init__(self, thread_name, queue_name, exhausted_owner_id_string_list):
# Build base.
... | |
import os
import os.path
import cherrypy
from cherrypy.lib import static
from cherrypy.lib.static import serve_file
import shutil
import tempfile
import glob
from clarityviz import claritybase
localDir = os.path.dirname(__file__)
absDir = os.path.join(os.getcwd(), localDir)
# print absDir
def image_parse(filename)... | |
#!/usr/bin/env python
#--------------------------------------------------------------
# The functions and classes for the lattice modifications with
# different type of error nodes. You do not need these classes
# if you apply errors only to handful number of nodes, but it will
# be useful if, for instance, you want ... | |
'''
Asynchronous data loader
========================
This is the Asynchronous Loader. You can use it to load an image
and use it, even if data are not yet available. You must specify a default
loading image when using the loader::
from kivy.loader import Loader
image = Loader.image('mysprite.png')
You can a... | |
# -*- coding: utf-8 -*-
# pylint: disable=line-too-long, unused-argument, invalid-name, too-many-arguments, too-many-locals
"""
Utilities to support integration of Vowpal Wabbit and scikit-learn
"""
import numpy as np
from pyvw import vw
import re
from scipy.sparse import csr_matrix
from sklearn import metrics
from sk... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011,2012 Akira YOSHIYAMA <akirayoshiyama@gmail.com>
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "Lic... | |
'''---------------------------------------------------------------------------------------
DJANGO MAP CLUSTERING
- kmeans
- grid
VERSION: 0.1
AUTHOR: biodiv
LICENSE: GPL
---------------------------------------------------------------------------------------'''
'''---------------------------------------------------... | |
# -*- coding: utf-8 -*-
from cms.forms.utils import get_site_choices, get_page_choices
from cms.models import Page, PageUser, Placeholder
from cms.plugin_pool import plugin_pool
from cms.utils import get_language_from_request
from django.conf import settings
from django.contrib.sites.models import Site
from django.form... | |
# coding: utf-8
"""
Cloudbreak API
Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud... | |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
# Standard imports
from future import standard_library
standard_library.install_aliases()
from builtins import *
import unittest
import datetime as pydt
import logging
imp... | |
#!/usr/bin/env python
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | |
import CatalogItem
from panda3d.core import *
from panda3d.direct import *
import types
from direct.distributed.PyDatagram import PyDatagram
from direct.distributed.PyDatagramIterator import PyDatagramIterator
class CatalogItemList:
def __init__(self, source = None, store = 0):
self.store = store
... | |
# 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... | |
# -*- coding: utf-8 -*-
"""
PyMLGame - Controller
"""
from uuid import uuid4
import time
from datetime import datetime
import socket
from queue import Queue
from threading import Thread
from pymlgame.locals import E_NEWCTLR, E_DISCONNECT, E_PING, E_KEYUP, E_KEYDOWN, E_MESSAGE, E_RUMBLE
from pymlgame.event import Eve... | |
from __future__ import absolute_import
from __future__ import unicode_literals
from builtins import next
from builtins import map
from builtins import str
from builtins import object
import os, re, rdflib, zipfile, tempfile, codecs, chardet, unicodedata, iso8601
import shutil, copy, logging
import xml.etree.ElementTr... | |
#!/usr/bin/env python
# ex:ts=4:sw=4:sts=4:et
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
#
# Copyright (C) 2003, 2004 Chris Larson
# Copyright (C) 2003, 2004 Phil Blundell
# Copyright (C) 2003 - 2005 Michael 'Mickey' Lauer
# Copyright (C) 2005 Holger Hans Peter Freyther
# Copyright (C) 20... | |
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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... | |
import sublime
import sublime_plugin
_ST3 = sublime.version() >= "3000"
# highlight pushed region options
if _ST3:
_FLAGS = sublime.DRAW_EMPTY | sublime.DRAW_NO_FILL
else:
_FLAGS = sublime.DRAW_EMPTY | sublime.DRAW_OUTLINED
def get_settings(key, default=None):
"""Get the setting specified by the key."""... | |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/datacatalog_v1beta1/proto/gcs_fileset_spec.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.proto... | |
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import json
import subprocess
import sys
from dataclasses import dataclass
from pathlib import Path, PurePath
from textwrap import dedent
from typing im... | |
"""
Expose top-level symbols that are safe for import *
"""
import platform
import re
import sys
import warnings
from ._version import get_versions
from numba.misc.init_utils import generate_version_info
__version__ = get_versions()['version']
version_info = generate_version_info(__version__)
del get_versions
del ge... | |
################################################################################
# Copyright (C) 2011-2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
import numpy as np
from bayespy.utils import misc
from .node im... | |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | |
#!/usr/bin/python2.5
# Copyright (C) 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 la... | |
#!/usr/bin/env python
"""Hunts-related part of GRR API client library."""
from typing import Optional
from typing import Sequence
from typing import Union
from google.protobuf import message
from grr_api_client import client
from grr_api_client import context as context_lib
from grr_api_client import utils
from grr_r... | |
from functools import update_wrapper
from django.http import Http404, HttpResponseRedirect
from django.contrib.admin import ModelAdmin, actions
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.views.decorators.csrf import csrf_protect
from django.db.models.base import ModelBase
from django.apps import ap... | |
__author__ = 'lisette-espin'
################################################################################
### Local
################################################################################
from org.gesis.libs import graph as c
from org.gesis.libs.janus import JANUS
from org.gesis.libs.graph import DataMatr... | |
# 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 ... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
import base64
import collections
import itertools
import json
import os
import re
import sys
import unidecode
import urllib2
from boto.ec2 import connect_to_region
from boto.exception import EC2ResponseError
import boto.ec2.autoscale
from fabric.api impor... | |
# (c) Copyright IBM Corp. 2021
# (c) Copyright Instana Inc. 2020
from __future__ import absolute_import
import unittest
import urllib3
import tests.apps.pyramid_app
from ..helpers import testenv
from instana.singletons import tracer
class TestPyramid(unittest.TestCase):
def setUp(self):
""" Clear all s... | |
# ***** BEGIN GPL LICENSE BLOCK *****
#
#
# 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 2
# of the License, or (at your option) any later version.
#
# This program is distribute... | |
"""
Pulsar :mod:`~greenio` facilitates the integration of synchronous
third-party libraries into pulsar asynchronous framework.
It requires the :greenlet:`greenlet <>` library.
If you want to understand how integration works but you are unfamiliar with
greenlets, check out the :greenlet:`greenlet documentation <>` fir... | |
# 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 -*-
# Copyright (c) 2013, Theo Crevon
# Copyright (c) 2013, Greg Leclercq
#
# See the file LICENSE for copying permission.
from boto.swf.exceptions import SWFResponseError
from swf.constants import REGISTERED
from swf.querysets.base import BaseQuerySet
from swf.models import Domain
from swf.model... | |
# 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... | |
# -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# #Convert existing time series NetCDF files in 4D (T,Z,Y,X) "grid" format to CF-1.6 format
# <codecell>
import glob
import os
import netCDF4
import cStringIO
import pandas as pd
import re
# <codecell>
projs = '''
ARGO_MERCHANT,B. Butman,Argo Mer... | |
import select
import socket
import time
import struct
import warnings
import operator
import apis.current as sphinxapi
import logging
import re
try:
import decimal
except ImportError:
from django.utils import _decimal as decimal # for Python 2.3
from django.db.models.query import QuerySet, Q
from django.conf i... | |
# 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 agr... | |
# Copyright 2015 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... | |
import unittest
from myhdl import *
from myhdl_lib.arbiter import arbiter_roundrobin
import myhdl_lib.simulation as sim
class TestArbiterRoundrobin(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.simulators = ["myhdl", "icarus"]
def testOneHot(self):
''' ARBITER_ROUNDROBIN: O... | |
# The MIT License
#
# Copyright (C) 2009 Erick Tryzelaar
#
# Copyright (C) 2009 Floris Bruynooghe
#
#
# 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 ... | |
# Copyright 2013 dotCloud 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 t... | |
# -*- coding: utf-8 -*-
#*****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYIN... | |
# coding: utf-8
"""
ASN.1 type classes for public and private keys. Exports the following items:
- DSAPrivateKey()
- ECPrivateKey()
- EncryptedPrivateKeyInfo()
- PrivateKeyInfo()
- PublicKeyInfo()
- RSAPrivateKey()
- RSAPublicKey()
Other type classes are defined that help compose the types listed above.
"""
... | |
import os
import json
from vector2d import Vector2D
from interpolator import Interpolator
from utils import map_range
# Each game controller axis returns a value in the closed interval [-1, 1]. We
# limit the number of decimal places we use with the PRECISION constant. This is
# done for a few reasons: 1) it makes th... | |
"""
Create C Code that will evaluate the approximator
class much more quickly.
Code that runs an adaptive interpolation method, then runs it
as C code. I also writes the method
as C code into a file to save if the user wishes to use it later
"""
from __future__ import absolute_import
from __future__ import print_fun... | |
import logging
import cgi
import sys
import traceback
import hashlib
import os
from functools import wraps
import webapp2
from webapp2_extras import sessions, json, auth, i18n
from jinja2.runtime import TemplateNotFound
import settings
import utils
from handlers import jinja_environment
def get_json_error(code, key... | |
# coding=utf-8
from __future__ import unicode_literals
import os
import unittest
import pandas as pd
from nose.tools import raises
from py_entitymatching.io.parsers import read_csv_metadata, to_csv_metadata, _get_metadata_from_file
from py_entitymatching.utils.generic_helper import get_install_path, del_files_in_dir,... | |
# Copyright (c) 2014 Hitachi Data 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.org/licenses/LICENSE-2.0
#
# U... | |
# -*- coding: utf-8 -*-
#
# Copyright 2018 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.