gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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... | |
#!/usr/bin/python
from fvregress import *
import string # really? you have to do this?
import xmlrpclib
wantPause = True
test="ports"
try:
h= FvRegress()
port=16633
h.addController("alice", 54321)
h.addController("bob", 54322)
if len(sys.argv) > 1 :
wantPause = False
... | |
# Copyright (c) 2013-2015 by California Institute of Technology
# 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
# notice,... | |
# -*- coding: utf-8 -*-
from typing import Iterable
import os, numpy as np, pandas as pd, pyarrow as pa, pytest, queue
from common import NoAuthTestCase
from concurrent.futures import Future
from mock import patch
from gremlin_python.driver.resultset import ResultSet
from gremlin_python.structure.graph import Vertex, ... | |
"""
Soft Voting/Majority Rule classifier and Voting regressor.
This module contains:
- A Soft Voting/Majority Rule classifier for classification estimators.
- A Voting regressor for regression estimators.
"""
# Authors: Sebastian Raschka <se.raschka@gmail.com>,
# Gilles Louppe <g.louppe@gmail.com>,
# ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import platform
import gtk
from interfaces.signalizable import Signalizable
from objects.tag import Tag
from objects import HORIZONTAL, VERTICAL
if platform.system() != 'Windows':
gtk.threads_init()
import cairo
import pango
import pangocairo
class Ruler(gtk.Viewport, S... | |
import re
from contextlib import contextmanager
from parso.python.errors import ErrorFinder, ErrorFinderConfig
from parso.normalizer import Rule
from parso.python.tree import search_ancestor, Flow, Scope
_IMPORT_TYPES = ('import_name', 'import_from')
_SUITE_INTRODUCERS = ('classdef', 'funcdef', 'if_stmt', 'while_stm... | |
from __future__ import print_function, division
from sympy.core import symbols, Add, Dummy
from sympy.core.compatibility import combinations_with_replacement
from sympy.core.numbers import Rational
from sympy.polys import cancel, ComputationFailed, parallel_poly_from_expr, reduced, Poly
from sympy.polys.monomials impo... | |
#!/usr/bin/python
import numpy as np
import os
import sys
import math
import matplotlib
matplotlib.use('Pdf')
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.font_manager as fm
## 6-1-15
## Simple code to e... | |
#!/usr/bin/env python3
# Copyright 2017 The Kubernetes 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 appl... | |
# Copyright (c) 2007 Ruben Reifenberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | |
#!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin P2P ... | |
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... | |
"""Test zha fan."""
import pytest
import zigpy.profiles.zha as zha
import zigpy.zcl.clusters.general as general
import zigpy.zcl.clusters.hvac as hvac
import zigpy.zcl.foundation as zcl_f
from homeassistant.components import fan
from homeassistant.components.fan import (
ATTR_SPEED,
DOMAIN,
SERVICE_SET_SPE... | |
#!/usr/bin/env python3
# Copyright (c) 2017-2021 The Particl Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import random
from test_framework.test_particl import ParticlTestFramework
from test_framework.util impor... | |
"""Testing for K-means"""
import numpy as np
import warnings
from scipy import sparse as sp
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import SkipTest
from sklearn.utils.test... | |
# Copyright 2020 The TensorFlow Quantum 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... | |
# 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... | |
from ..db.utils import get_cursor, set_cursor
from .testmodels import FieldsWithOptionsModel, EmailModel, DateTimeModel, \
OrderedModel, BlobModel
from django.db.models import Q
from django.db.utils import DatabaseError
from django.test import TestCase
from django.utils import unittest
from google.appengine.api.dat... | |
#!/usr/bin/python -u
# 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 applica... | |
# Copyright 2015 FUJITSU 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 writ... | |
r"""
Composition Statistics (:mod:`skbio.stats.composition`)
=======================================================
.. currentmodule:: skbio.stats.composition
This module provides functions for compositional data analysis.
Many 'omics datasets are inherently compositional - meaning that they
are best interpreted as... | |
#Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
__version__='3.3.0'
#modification of users/robin/ttflist.py.
__doc__="""This provides some general-purpose tools for finding fonts.
The FontFinder object can search for font files. It aims to build
a catalogue of fonts which our framewor... | |
# -*- coding: utf-8 -*-
# Copyright 2011 Mats Ekberg
#
# 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 -*-
from __future__ import print_function
import operator
import pytest
from pandas.compat import (zip, range, lrange, StringIO)
from pandas import DataFrame, Series, Index, MultiIndex, date_range
import pandas as pd
import numpy as np
from numpy.random import randn
from pandas.util.testing imp... | |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""This module contains functions and methods that relate to the DataInfo class
which provides a container for informational attributes as well as summary info
methods.
A DataInfo object is attached to the Quantity, SkyCoord, and ... | |
# 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
# Copyright 2022 The TensorFlow Datasets 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 appl... | |
from __future__ import absolute_import, unicode_literals
from itertools import groupby
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.db import transaction
from django.template.loader import ... | |
# -*- coding: utf-8 -*-
"""IPython Test Suite Runner.
This module provides a main entry point to a user script to test IPython
itself from the command line. There are two ways of running this script:
1. With the syntax `iptest all`. This runs our entire test suite by
calling this script (with different arguments)... | |
from __future__ import unicode_literals
from django.core import mail
from django.utils import six
from reviewboard.reviews.models import Review
from reviewboard.webapi.resources import resources
from reviewboard.webapi.tests.base import BaseWebAPITestCase
from reviewboard.webapi.tests.mimetypes import (review_reply_i... | |
from App.Proxys import *
data = IKVMCController(
name = '',
controlParamsList = [
ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),
ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0, 1.0 ) )... | |
import os
import sys
import copy
import AutoGemmParameters
import Common
import KernelParameters
def indent(il):
returnTabs = ""
for i in range(0, il):
returnTabs += " "
return returnTabs
def tileInRange( tileMin, tileMax, rangeMin, rangeMax):
if ( tileMax < 0 or (tileMax >= rangeMax and rangeMax>0) ) a... | |
#!/usr/bin/env python
#
# Copyright 2016 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... | |
#!/usr/bin/env python
"""Tests for the FileFinder flow."""
import os
from grr.client import vfs
from grr.lib import aff4
from grr.lib import rdfvalue
from grr.lib import test_lib
# pylint:mode=test
class FileFinderActionMock(test_lib.ActionMock):
def __init__(self):
super(FileFinderActionMock, self).__ini... | |
# This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import absolute_import, unicode_literals
import ast
import codecs
import os
import re
imp... | |
import logging
from operator import itemgetter
import asyncio
import time
from typing import Optional, Dict, Callable
from .streams import BinanceSocketManager
from .threaded_stream import ThreadedApiManager
class DepthCache(object):
def __init__(self, symbol, conv_type=float):
"""Initialise the DepthCa... | |
# -*- coding: utf-8 -*-
import datetime
import httplib as http
from flask import request
from modularodm import Q
from modularodm.exceptions import NoResultsFound
from modularodm.exceptions import ValidationValueError
import framework.auth
from framework.auth import cas
from framework import forms, status
from fram... | |
#------------------------------------------------------------------------------
# pycparser: c_lexer.py
#
# CLexer class: lexer for the C language
#
# Copyright (C) 2008-2015, Eli Bendersky
# License: BSD
#------------------------------------------------------------------------------
import re
import sys
from .ply imp... | |
# 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 ... | |
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | |
# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Abstract Base Classes (ABCs) for collections, according to PEP 3119.
DON'T USE THIS MODULE DIRECTLY! The classes here should be imported
via collections; they are defined here only to alleviate certain
bootstrappin... | |
# -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
from collections import Mapping
from datetime import datetime
from .auth import _basic_auth_str
from .compat import cookielib, Ord... | |
"""Main Lomb-Scargle Implementation"""
import numpy as np
from .implementations import lombscargle, available_methods
from .implementations.mle import periodic_fit
from . import _statistics
from ... import units
def has_units(obj):
return hasattr(obj, 'unit')
def get_unit(obj):
return getattr(obj, 'unit',... | |
"""Apache Configuration based off of Augeas Configurator."""
# pylint: disable=too-many-lines
import itertools
import logging
import os
import re
import shutil
import socket
import subprocess
import zope.interface
from acme import challenges
from letsencrypt import achallenges
from letsencrypt import errors
from let... | |
from datetime import datetime
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas import (
DataFrame,
DatetimeIndex,
Series,
concat,
isna,
notna,
)
import pandas._testing as tm
import pandas.tseries.offsets as offsets
@pytest.mark.parametrize(
"compar... | |
# -*- coding: utf-8 -*-
import os
import sys
try:
from gluon import current
except ImportError:
print >> sys.stderr, """
The installed version of Web2py is too old -- it does not define current.
Please upgrade Web2py to a more recent version.
"""
# Version of 000_config.py
# Increment this if the user should... | |
# 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... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Developed by Massimo Di Pierro <mdipierro@cs.depaul.edu>,
limodou <limodou@gmail.com> and srackham <srackham@gmail.com>.
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
"""
import os
import sys
import code
import ... | |
# 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 ... | |
import numpy as np
from ... import util
from ... import graph
from ... import grouping
from ..entities import Line, Arc
from collections import deque
def dict_to_path(as_dict):
"""
Turn a pure dict into a dict containing entity objects that
can be sent directly to a Path constructor.
Parameters
... | |
# stdlib
import re
import time
import urllib
# 3p
import pymongo
# project
from checks import AgentCheck
from urlparse import urlsplit
from config import _is_affirmative
from distutils.version import LooseVersion # pylint: disable=E0611,E0401
DEFAULT_TIMEOUT = 30
GAUGE = AgentCheck.gauge
RATE = AgentCheck.rate
cla... | |
"""
homeassistant.components.light.limitlessled
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for LimitlessLED bulbs.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.limitlessled/
"""
import logging
from homeassistant.components.light import ... | |
# Copyright 2015 Cray
# Copyright 2016 FUJITSU LIMITED
# Copyright 2017 Hewlett Packard Enterprise Development LP
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lic... | |
import ctypes
import mmap
import platform
import sys
import windows
import windows.winproxy
from . import simple_x86 as x86
from . import simple_x64 as x64
class PyObj(ctypes.Structure):
_fields_ = [("ob_refcnt", ctypes.c_size_t),
("ob_type", ctypes.c_void_p)] # must be cast
class PyMmap(PyOb... | |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
from future.moves.urllib.error import HTTPError, URLError
from future.utils import python_2_unicode_compatible
import logging
import os
import re
import time
import warnings
imp... | |
"""
tests.components.automation.test_state
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests state automation.
"""
import unittest
from datetime import timedelta
from unittest.mock import patch
import homeassistant.util.dt as dt_util
import homeassistant.components.automation as automation
import homeassistant.components.... | |
import time
import traceback
from uuid import uuid4
import ircd
from ircd.constants import *
class Channel(object):
channels = {}
@classmethod
def get(cls, name, user=None):
return cls.channels.get(name, None)
def __init__(self, name, creator):
self.name = name
self._modes =... | |
# -*- coding: utf-8 -*-
'''
flask.ext.login
---------------
This module provides user session management for Flask. It lets you log
your users in and out in a database-independent manner.
:copyright: (c) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
'''
__version_i... | |
from sympy import (symbols, sympify, Dummy, simplify, Equality, S, Interval,
oo, EmptySet, Q)
from sympy.logic.boolalg import (
And, Boolean, Equivalent, ITE, Implies, Nand, Nor, Not, Or, POSform,
SOPform, Xor, conjuncts, disjuncts, distribute_or_over_and,
distribute_and_over_or, eliminat... | |
# 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... | |
#### PATTERN | XX ##################################################################################
# -*- coding: utf-8 -*-
# Copyright (c) year, institute, country
# Author: Name (e-mail)
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
#########################################... | |
"""
.. module:: task_runners.task_runner
:synopsis: Base TaskRunner class to use with DivePythonOperator
.. moduleauthor:: Laura Lorenz <llorenz@industrydive.com>
.. moduleauthor:: Miriam Sexton <miriam@industrydive.com>
"""
import datetime
import json
from fileflow.utils import read_and_clean_csv_to_dataframe, ... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | |
import warnings
import _zeros
from numpy import finfo, sign, sqrt
_iter = 100
_xtol = 1e-12
# not actually used at the moment
_rtol = finfo(float).eps * 2
__all__ = ['newton', 'bisect', 'ridder', 'brentq', 'brenth']
CONVERGED = 'converged'
SIGNERR = 'sign error'
CONVERR = 'convergence error'
flag_map = {0 : CONVER... | |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from datetime import datetime
from helper.utils import TestUtils as tu
from mushroom_rl.core import Agent
from mushroom_rl.algorithms.value import *
from mushroom_rl.approximators.parametric import LinearApproximator, TorchApproxim... | |
# Copyright (C) 2013-2015 MetaMorph Software, Inc
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this data, including any software or models in source or binary
# form, as well as any drawings, specifications, and documentation
# (collectively "the Data"), to deal in the Data witho... | |
# Copyright (c) 2013 Dell Inc.
# Copyright 2013 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
#
# Unle... | |
#!/usr/local/bin/Python3
# Based on code created for Udacity Linear Algebra Refresher course
import math
class Vector(object):
SAME_DIMENSION_ERROR = "Vectors must be same dimension"
CANNOT_NORMALIZE_ZERO_VECTOR_MSG = "Unable to normalize zero vector"
CANNOT_FIND_ANGLE_BETWEEN_VECTORS = "Unable to find ... | |
from flask import session, redirect, request
from webViews.view import normalView
from webViews.dockletrequest import dockletRequest
from webViews.dashboard import *
from webViews.checkname import checkname
import time, re
class addClusterView(normalView):
template_path = "addCluster.html"
@classmethod
de... | |
"""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Utility class designed to access the DOM of various web pages and perform a number of different
fucntional tests. Any combination of these methods can be used to test a variety of functionality
within the applicat... | |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import click
import logging
import os
import subprocess
import operator
from datetime import datetime
import pandas as pd
from pandas.api.types import is_string_dtype, is_numeric_dtype
from ray.tune.result imp... | |
# -*- coding: utf-8 -*-
#
# This file is part of Flask-Collect.
# Copyright (C) 2012, 2013, 2014 Kirill Klenov.
# Copyright (C) 2014 CERN.
#
# Flask-Collect is free software; you can redistribute it and/or modify it
# under the terms of the Revised BSD License; see LICENSE file for
# more details.
import time
from os i... | |
"""
A small templating language
This implements a small templating language. This language implements
if/elif/else, for/continue/break, expressions, and blocks of Python
code. The syntax is::
{{any expression (function calls etc)}}
{{any expression | filter}}
{{for x in y}}...{{endfor}}
{{if x}}x{{elif y}}y... | |
import collections
import cv2
import math
import numpy as np
class Shred(collections.namedtuple('_Shred',
'contour features name piece_fname features_fname '
'piece_in_context_fname simplified_contour sheet img_roi '
'tags_suggestions')):
"""Stores the shred information, incl. ... | |
# -*- coding: utf-8 -*-
"""
Use blaze.bkernel to assemble ckernels for evaluation.
"""
from __future__ import absolute_import, division, print_function
import collections
from pykit.ir import visit, transform, Op
from datashape.util import to_numba
from numba import jit
from ...bkernel.blaze_kernels import frompyf... | |
#!/usr/bin/env python2.7
# 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 la... | |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright 2011 Disney Enterprises, 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 copyrig... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test Analog Value COV Services
------------------------------
"""
import unittest
from bacpypes.debugging import bacpypes_debugging, ModuleLogger
from bacpypes.apdu import (
SubscribeCOVRequest, SimpleAckPDU,
ConfirmedCOVNotificationRequest, UnconfirmedCOVNo... | |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | |
from abc import ABCMeta, abstractmethod
from six import with_metaclass
from os.path import join
import numpy as np
from MCEq.misc import theta_rad
from MCEq.misc import info
import mceq_config as config
class EarthsAtmosphere(with_metaclass(ABCMeta)):
"""
Abstract class containing common methods on atmosphe... | |
import sys
import numpy as np
from PyQt4 import QtGui
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QComboBox
import Orange.data
from Orange.preprocess import impute
from Orange.base import Learner
from Orange.widgets import gui, settings
from Orange.widgets.utils import itemmodels
from Orange.widgets.utils.sql... | |
import botocore.client
import boto3
import json
import pytest
import time
import sure # noqa # pylint: disable=unused-import
import uuid
from moto import (
mock_dynamodb2,
mock_lambda,
mock_logs,
mock_sns,
mock_sqs,
)
from uuid import uuid4
from .utilities import (
get_role_name,
get_test_... | |
import struct
from types import StringType
class _BUILDER:
'''Virtual base helper class for structured file scanning'''
def _get_struct_fmt(self,info):
fmt = '<'
for f, _, _ in info:
fmt += f
return fmt
def _scan_from_file(self,f,info):
fmt = self._get_struct_fmt(info)
size = struct.calcsize(fmt)
T =... | |
"""
Database module
used to fetch and insert data into the database.
Constructs queries from arguments with most of them being optional.
Prevent some SQL injection attacks (most of them are secured via psycopg2)
"""
import psycopg2
import random
from pyMetricServer import DEBUG
from pyMetricServer.config import *
imp... | |
# -*- coding: utf-8 -*-
from base64 import b64encode
from hashlib import sha1
import os
import socket
import ssl
from ws4py import WS_KEY, WS_VERSION
from ws4py.exc import HandshakeError
from ws4py.websocket import WebSocket
from ws4py.compat import urlsplit
__all__ = ['WebSocketBaseClient']
class WebSocketBaseClien... | |
import math, os
import pygame
import thorpy
has_surfarray = False
try:
from PyWorld2D.rendering.tilers.beachtiler import BeachTiler
from PyWorld2D.rendering.tilers.basetiler import BaseTiler
from PyWorld2D.rendering.tilers.roundtiler import RoundTiler
from PyWorld2D.rendering.tilers.loadtiler import Lo... | |
# sympy/galgebra/manifold.py
"""
manifold.py defines the Manifold class which allows one to create a
vector manifold (manifold defined by vector field of coordinates in
embedding vector space) calculate the tangent vectors and derivatives
of tangent vectors.
Once manifold is created multivector fields can be construc... | |
# 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 ... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
"""
Foscam camera's motion state support.
"""
import base64
import logging
from asyncio import TimeoutError, coroutine, sleep
from collections import deque
from json import dumps
from typing import List
import async_timeout
import voluptuous as vol
from aiohttp import ClientSession
from libpyfoscam.foscam import Fosca... | |
"""
voweltimbre.py - module for comparative analysis of sung timbres in a musical audio context.
Evaluate extraction of sung vowel formants compared to a ground truth mark-up
usage:
(r,p), Z, Z2 = test_vowel_analysis(harmonic=True,tsne=True,dfw=True,perplexity=3)
inputs:
harmonic - whether to use predominant har... | |
import unittest
import unittest.mock
import functools
from g1.asyncs import kernels
from g1.asyncs.bases import tasks
from g1.databases import sqlite
from g1.operations.databases.bases import interfaces
from g1.operations.databases.servers import connections
from g1.operations.databases.servers import servers
def s... | |
#!/usr/bin/env python2
#
# Copyright 2015-2016 Carnegie Mellon University
#
# 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: utf-8
import os
import threading
import traceback
import time
from datetime import datetime
from flask import Flask
from influxdb import InfluxDBClient
from kombu import Connection, Exchange, Queue
from kubernetes import client, config as kube_config
from oslo_service import periodic_task
from oslo_config ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import ConfigParser
import csv
import datetime
import logging
import os.path
import socket
import subprocess
import sys
import time
from trademybitapi import TradeMyBitAPI
from pycgminer import CgminerAPI
class Algo:
def __init__(self, name):
self.command ... | |
#!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
21a.py
~~~~~~
Advent of Code 2017 - Day 21: Fractal Art
Part One
You find a program trying to generate some art. It uses a strange process
that involves repeatedly enhancing the detail of an image through a set of
rules.
The image cons... | |
"""
This module provides the Scan Op
Scanning is a general form of recurrence, which can be used for looping.
The idea is that you *scan* a function along some input sequence, producing
an output at each time-step that can be seen (but not modified) by the
function at the next time-step. (Technically, the function can... | |
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.