gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Wrapper module for _ssl, providing some additional facilities
# implemented in Python. Written by Bill Janssen.
"""\
This module provides some more Pythonic support for SSL.
Object types:
SSLSocket -- subtype of socket.socket which does SSL over the socket
Exceptions:
SSLError -- exception raised for I/O er... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.examples.tutorials.mnist import input_data
import tabular_logger as tlogger
import tensorflow as tf
import numpy as np
import argparse
import time
import sys
import os
def normal(x, mu, sigma):... | |
#!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Performance runner for d8.
Call e.g. with tools/run-benchmarks.py --arch ia32 some_suite.json
The suite json format is expected... | |
# 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 ... | |
# -*- coding: utf-8 -*-
"""
Dimension reduction with optimal transport
"""
# Author: Remi Flamary <remi.flamary@unice.fr>
#
# License: MIT License
from scipy import linalg
import autograd.numpy as np
from pymanopt.manifolds import Stiefel
from pymanopt import Problem
from pymanopt.solvers import SteepestDescent, Trus... | |
"""Tests for ``tinymemory``."""
import itertools as it
from multiprocessing.pool import ThreadPool
import random
import pytest
from tinymr import MapReduce
from tinymr.errors import KeyCountError, ClosedTaskError
from tinymr.tools import single_key_output
class _WordCount(MapReduce):
"""Define outside a func... | |
# Import flask dependencies
from flask import (Blueprint, request, render_template,
flash, g, session, redirect, url_for)
# Import password / encryption helper tools
from werkzeug import check_password_hash, generate_password_hash
# Import the database object from the main app module
from app import... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from textwrap import dedent
import pytest
from pants.backend.codegen.protobuf.python import additional_fields
from pants.backend.codegen.protobuf.pyth... | |
"""Validation schemas for API requests."""
import werkzeug.datastructures
from flask_restplus import inputs
import api.reqparse as reqparse
MAX_PASSWORD_LENGTH = 1024
def object_type(value):
"""To make the openAPI object type show up in the docs."""
return value
object_type.__schema__ = {"type": "object"} ... | |
from __future__ import unicode_literals
from django.conf.urls import url
from django.test import TestCase, override_settings
from rest_framework import serializers
from rest_framework.test import APIRequestFactory
from tests.models import (
ForeignKeySource, ForeignKeyTarget, ManyToManySource, ManyToManyTarget,
... | |
import re, util
from collections import Counter
def get_actions(cursor):
actions = [] #[(regex, function)]
def action(regex):
regex = re.sub(r'\{(.*?)}', lambda m:r'(?P<{0}>.*?)'.format(m.group(1)), regex) + r'\.?$'
compiled_regex = re.compile(regex, flags=re.IGNORECASE)
re... | |
from __future__ import print_function
import glob
import os
import platform
import subprocess
import sys
import tempfile
import textwrap
from timing import monotonic_time_nanos
from tracing import Tracing
from buck_tool import BuckTool, check_output, JAVA_MAX_HEAP_SIZE_MB
from buck_tool import BuckToolException, Resta... | |
# coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | |
# coding=utf-8
# Copyright 2022 The TensorFlow GAN 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 applicabl... | |
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_HTTPError,
compat_str,
compat_urlparse,
)
from ..utils import (
ExtractorError,
js_to_json,
parse_duration,
parse_iso8601,
)
class ViideaIE(InfoExtractor):
_VALID_URL = r... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | |
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
import re
# 3p
from nose.plugins.attrib import attr
from mock import Mock
# project
from tests.checks.common import AgentCheckTest
from checks import AgentCheck
from tests.core.test_wmi import TestCommo... | |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
PERF_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
from telemetry.unittest_util import system_stub
from unitt... | |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import copy
from collections.abc import MappingView
from types import MappingProxyType
import numpy as np
from astropy import units as u
from astropy.utils.state import ScienceState
from astropy.utils.decorators import format_doc... | |
"""Copyright 2008 Orbitz WorldWide
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... | |
"""
Context managers for use with the ``with`` statement.
.. note:: When using Python 2.5, you will need to start your fabfile
with ``from __future__ import with_statement`` in order to make use of
the ``with`` statement (which is a regular, non ``__future__`` feature of
Python 2.6+.)
.. note:: If you are... | |
"""Real-time information about public transport departures in Norway."""
from datetime import datetime, timedelta
from enturclient import EnturPublicTransportData
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_LATIT... | |
"""Miscellaneous network and PF-related utilities"""
import re
import glob
import time
import ctypes
from socket import *
from fcntl import ioctl
from pf.constants import *
from pf.exceptions import PFError
from pf._struct import ifreq, if_data, timeval
# Dictionaries for mapping strings to constants
# Debug level... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2020 The Fujicoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid network messages."""
import struct
import time
from test_framework.me... | |
# original Copyright Ruben Decrop
# modifications by Chessdevil Consulting BVBA
import logging
log = logging.getLogger(__name__)
import simplejson as json
from django.shortcuts import render
from django.db.models import Max
from rest_framework import status
from rest_framework.decorators import api_view
from rest_fra... | |
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanyi... | |
# 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 (t... | |
#!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from collections import defaultdict
import logging
import re
from datetime import datetime
from sqlalchemy.orm import relationship
from sqlalchemy.orm.exc import NoResultFound
... | |
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
import requests
import time
import random
import os
import re
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
try:
from lxml impor... | |
#!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : Libs/IOST_WMain/IOST_WMain_I2C.py
# Date : Oct 20, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copy... | |
'''
CmndHelperPQ is a helper class for dealing with commands
sent to a PyQt piped viewer.
This package was developed by the Thermal Modeling and Analysis
Project (TMAP) of the National Oceanographic and Atmospheric
Administration's (NOAA) Pacific Marine Environmental Lab (PMEL).
'''
import sys
# First try to import ... | |
#
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | |
"""
Base classes for writing management commands (named commands which can
be executed through ``django-admin.py`` or ``manage.py``).
"""
from __future__ import with_statement
import os
import sys
from optparse import make_option, OptionParser
import traceback
import django
from django.core.exceptions import Imprope... | |
# Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# License: BSD 3 clause
from sys import version_info
import numpy as np
from scipy import interpolate, sparse
from copy import deepcopy
from sklearn.datasets import load_boston
from sklearn.utils.testing ... | |
# 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 required by applica... | |
# http://127.0.0.1:8000/api/accidents_in_rect?ne=52.012788283447016,-1.8865173453125408&sw=51.95756835101524,-2.468304454687541&Weather_Conditions=1&Road_Surface_Conditions=4,1
#
# Weather Conds:
#1 Fine no high winds
#2 Raining no high winds
#3 Snowing no high winds
#4 Fine + high winds
#5 Raining + high winds
#6 Sno... | |
import os
import platform
import sys
from datetime import datetime, timezone
from pathlib import Path
from unittest.mock import MagicMock, Mock
import pytest
import tzlocal.unix
import tzlocal.utils
if sys.version_info >= (3, 9):
from zoneinfo import ZoneInfo, ZoneInfoNotFoundError
else:
from backports.zonei... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
"""
This module is for inspecting OGR data sources and generating either
models for GeoDjango and/or mapping dictionaries for use with the
`LayerMapping` utility.
Author: Travis Pinney, Dane Springmeyer, & Justin Bronn
"""
from itertools import izip
# Requires GDAL to use.
from django.contrib.gis.gdal import DataSourc... | |
"""Sensitivity Analysis Tasks"""
import numpy as np
from caput import config
from ..core import task, io, containers
from ..util import tools
class ComputeSystemSensitivity(task.SingleTask):
"""Compute the sensitivity of beamformed visibilities.
Parameters
----------
exclude_intracyl : bool
... | |
# -*- coding: utf-8 -*-
"""
amqp.five
~~~~~~~~~~~
Compatibility implementations of features
only available in newer Python versions.
"""
from __future__ import absolute_import
import io
import sys
try:
from collections import Counter
except ImportError: # pragma: no cover
from collections ... | |
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import AnonymousUser
from django.contrib.messages.storage import (
default_storage as default_messages_storage)
from django.db import connection
from django.test import RequestFactory
from django.test.utils import Capt... | |
"""
This module provides WSGI application to serve the Home Assistant API.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/http/
"""
import hmac
import json
import logging
import mimetypes
import threading
import re
import ssl
from ipaddress import ip_ad... | |
# Copyright (c) 2015 Mirantis, 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 requir... | |
from datetime import datetime
from django.contrib.auth.models import User
from django.db import models
from jsonfield import JSONField
from orchestra.core.errors import ModelSaveError
from orchestra.workflow import get_workflow_choices
from orchestra.workflow import get_step_choices
from orchestra.workflow import get_... | |
# Copyright (c) 2010 OpenStack Foundation
# 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 complianc... | |
import logging
import traceback
import ujson as json
from collections import *
from itertools import chain
from bs4 import BeautifulSoup, SoupStrainer
from openvenues.extract.util import *
logger = logging.getLogger('extract.soup')
def tag_value_and_attr(tag):
value_attr = None
value_attr = property_values... | |
""" Philips PAR file interpreter. Reads several important fields from PAR
files, and returns them in a structure. Reads version number of Philips
research tools and interpretes accordingly. Research tools are used to
extract data from database; dataformats differ considerably between
versions. We now handle V3 and V4
... | |
from __future__ import with_statement
from decimal import Decimal, InvalidOperation
import time
from django.core import serializers
from django.db import models
from django.db.models import Q
from django.db.models.signals import post_save
from django.db.utils import DatabaseError
from django.dispatch.dispatcher import... | |
#!/usr/bin/env python
"""This file implements a VFS abstraction on the client."""
from grr.client import client_utils
from grr.lib import rdfvalue
from grr.lib import registry
from grr.lib import utils
# A central Cache for vfs handlers. This can be used to keep objects alive
# for a limited time.
DEVICE_CACHE = ut... | |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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... | |
import numpy as np
from os import name as os_name
import mrptlib
class MRPTIndex(object):
"""
An MRPT index object
"""
def __init__(self, data, shape=None, mmap=False):
"""
Initializes an MRPT index object.
:param data: Input data either as a NxDim numpy ndarray or as a filepa... | |
import hashlib
from collections import OrderedDict
from decimal import Decimal as D
from django.conf import settings
from django.db import models
from django.db.models import Sum
from django.utils import timezone
from django.utils.datastructures import SortedDict
from django.utils.encoding import python_2_unicode_comp... | |
from __future__ import absolute_import
import os
import numpy as np
import scipy
from scipy.misc import logsumexp
from scipy.special import gammaln, beta
from .dirichlet import log_dirichlet_density
from scipy.integrate import simps
from numpy import newaxis as na
import pypolyagamma as ppg
def initialize_polya_gamm... | |
# Copyright 2013 - Mirantis, Inc.
# Copyright 2015 - StackStorm, Inc.
# Copyright 2016 - Brocade Communications Systems, Inc.
# Copyright 2018 - Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | |
# Copyright (C) 2012 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 os
import sys
import subprocess
import gdal, ogr
import numpy as np
import json
import argparse
import time
def read_dem(filepath):
print(filepath)
#"""
dem_dataset = gdal.Open(filepath)
dem_tmp_cols = dem_dataset.RasterXSize
dem_tmp_rows = dem_dataset.RasterYSize
dem_geotransform =... | |
import os
from distutils.version import LooseVersion
import numpy as np
try:
import astropy.io.fits as fits
except ImportError:
import pyfits as fits
import pyLikelihood
import matplotlib
matplotlib.use('Agg')
matplotlib.rc('font', **{'family': 'serif', 'serif': ['Computer Modern'], 'size': 15})
matplotlib.rc('... | |
#!/usr/bin/env python2.7
"""Check CFC - Check Compile Flow Consistency
This is a compiler wrapper for testing that code generation is consistent with
different compilation processes. It checks that code is not unduly affected by
compiler options or other changes which should not have side effects.
To use:
-Ensure th... | |
##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
FLAGS = tf.app.flags.FLAGS
# Basic model parameters.
tf.app.flags.DEFINE_integer('batch_size', 128,
"""Number of images to process in a batch.""... | |
import sys
import codecs
import os.path
import warnings
from werkzeug.utils import cached_property
from browsepy.compat import range, PY_LEGACY # noqa
from browsepy.file import Node, File, Directory, \
underscore_replace, check_under_base
if PY_LEGACY:
import ConfigParser as configpa... | |
###############################################################################
# Universal Analytics for Python
# Copyright (c) 2013, Analytics Pros
#
# This project is free software, distributed under the BSD license.
# Analytics Pros offers consulting and integration services if your firm needs
# assistance in strat... | |
# Copyright 2011 OpenStack Foundation
# Copyright 2013 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/LIC... | |
#!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | |
# Copyright 2020 Google Research. 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... | |
# -*- coding: utf-8 -*-
import functools
import inspect
import uuid
import marshmallow as ma
import sqlalchemy as sa
from marshmallow import fields, validate
from sqlalchemy.dialects import mssql, mysql, postgresql
from .exceptions import ModelConversionError
from .fields import Related
def _is_field(value):
re... | |
#!/usr/bin/env python3
# Copyright (c) 2014-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 fee estimation code."""
from decimal import Decimal
import random
from test_framework.messages im... | |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
from dataclasses import dataclass, field
from typing import List, Tuple
import numpy as np
import torch
import torch.nn as nn
imp... | |
"""Plugin for plex media server (www.plexapp.com)."""
from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import re
import logging
import os
from datetime import datetime
from os.path import basename
from socket import getho... | |
# -*- coding: utf-8 -*-
#
# HMM Aligner
# Simon Fraser University
# NLP Lab
#
# This is the main programme of the HMM aligner
#
import sys
import os
import importlib
import argparse
import StringIO
import multiprocessing
from ConfigParser import SafeConfigParser
from loggers import logging, init_logger
from models.mod... | |
import os
import time
import socket
import struct
from traceback import format_exc, format_stack
from scapy.utils import wrpcap, rdpcap, PcapReader
from scapy.plist import PacketList
from vpp_interface import VppInterface
from scapy.layers.l2 import Ether, ARP
from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND... | |
#!/usr/bin/python
import argparse
import os
from distutils.version import StrictVersion
import utility
from config import REQDEPS_FILE_PATH, DEPSINSTALL_DIR_PATH, CURRENTDEPS_FILE_PATH, GENERATED_ENVIRONMENT_PATH
from registryclient import RegistryClient
from repositoryclient import RepositoryClient
from dependencyman... | |
from bottle import get, post, request, run, template, static_file, redirect, static_file
from classes import controller
import bottle
import bottle_session
import os
import time
import cgi
import re
from beaker.middleware import SessionMiddleware
session_opts = {
'session.type': 'file',
'session.cookie_expires... | |
# Copyright 2013 VMware, 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... | |
# Natural Language Toolkit: Chunk parsing API
#
# Copyright (C) 2001-2013 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Named entity chunker
"""
from __future__ import print_function
import os, re, pickle
from xml.etree import ElementT... | |
#from scamp import entryExit
import utilities
global itr
itr = 0
def load_spectra():
import pickle
f = open('picklespectra','r')
m = pickle.Unpickler(f)
spectra = m.load()
return spectra
''' get SDSS zeropoint if exists '''
def get_sdss_zp(run,night,snpath):
import MySQLdb
db2 = My... | |
from panda3d.core import *
from direct.showbase.DirectObject import DirectObject
import math
import copy
class TexMemWatcher(DirectObject):
"""
This class creates a separate graphics window that displays an
approximation of the current texture memory, showing the textures
that are resident and/or activ... | |
# -*- coding: utf-8 -*-
"""
Testing using the Test Client
The test client is a class that can act like a simple
browser for testing purposes.
It allows the user to compose GET and POST requests, and
obtain the response that the server gave to those requests.
The server Response objects are annotated with the details
... | |
#!/usr/bin/env python3
# tertiary Helper
# Unless absolutely necessary, do not use self.controller.send(...)
# Implement the method in micron.py and call that instead
# Abstraction yo
# Advanced level functions combining multiple basic functions are to be implemented here
# Methods involving multiple functions in thi... | |
# coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import logging
import ssl
from urllib.parse import url... | |
"""
homeassistant.components.recorder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component that records all events and state changes. Allows other components
to query this database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/recorder/
"""
from contextlib imp... | |
import datetime
import numpy as np
import pytest
import pytz
import pandas as pd
from pandas import Timedelta, merge_asof, read_csv, to_datetime
from pandas.core.reshape.merge import MergeError
from pandas.util.testing import assert_frame_equal
class TestAsOfMerge:
def read_data(self, datapath, name, dedupe=Fal... | |
# Copyright 2015 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | |
# -*- coding: utf-8 -*-
"""
S3 Microsoft Excel codec
@copyright: 2011 (c) Sahana Software Foundation
@license: MIT
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... | |
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | |
#!/usr/bin/env python
# Copyright (C) 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... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from datetime import datetime
from django.contrib.gis.db import models
from django.contrib.auth.models import User
from picklefield.fields import PickledObjectField
from model_utils.managers import QueryManager
from .behaviours import Publishable, Expir... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import numpy as np
from astropy.extern import six
from .inputvalidation import as_iterable, clamp, as_unsigned_integer
if six.PY2: # pragma: ... | |
import numpy
import configs2D
import sino_proj2D
pi = numpy.pi
zeros = numpy.zeros
array = numpy.array
ones = numpy.ones
sin = numpy.sin
cos = numpy.cos
tan = numpy.tan
sqrt = numpy.sqrt
float32 = numpy.float32
float64 = numpy.float64
indicator_type = numpy.int8
#default_type = numpy.float32
default_type = numpy.f... | |
# Copyright 2013 eBay Inc.
# Copyright 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/LIC... | |
"""Support for Snips on-device ASR and NLU."""
from datetime import timedelta
import json
import logging
import voluptuous as vol
from homeassistant.components import mqtt
from homeassistant.core import callback
from homeassistant.helpers import config_validation as cv, intent
DOMAIN = "snips"
CONF_INTENTS = "intent... | |
#
# 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... | |
from base import Base as BaseTestCase
from roletester.actions.glance import image_create
from roletester.actions.glance import image_wait_for_status
from roletester.actions.nova import server_create
from roletester.actions.nova import server_delete
from roletester.actions.nova import server_wait_for_status
from roletes... | |
#############################################
# Image Processing Constants
############################################
CV_BLUR_NO_SCALE = 0
CV_BLUR = 1
CV_GAUSSIAN = 2
CV_MEDIAN = 3
CV_BILATERAL = 4
CV_TERMCRIT_NUMBER = 1
CV_TERMCRIT_ITER = 1
CV_TERMCRIT_EPS = 2
CV_INTER_NN = 0
CV_INTER_LINEAR = 1
CV_INTER_CUBIC =... | |
#!/usr/bin/env python
# Zed Attack Proxy (ZAP) and its related class files.
#
# ZAP is an HTTP/HTTPS proxy for assessing web application security.
#
# Copyright 2017 ZAP Development Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... | |
# Copyright (c) 2016 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | |
# Copyright 2017 Brandon T. Gorman
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.