gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # 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, thi...
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2013-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and binary forms, with or without # modification, are permitted pro...
""" Evaluate hermite polynomials using cuda * use modified version of previously written polynomial evaluator """ import warnings warnings.simplefilter('ignore',Warning) import numpy import time from math import sqrt, log10, exp, ceil import sys from optparse import OptionParser from scipy.special import hermite im...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Page output and find dimensions of console. This module deals with paging on Linux terminals and Windows consoles in a cross-platform way. The major difference for paging here is line ends. Not line end characters, but the console behavior when the last character on a ...
"""Test Axis Applications API. pytest --cov-report term-missing --cov=axis.applications.applications tests/applications/test_applications.py """ import pytest import respx from axis.applications import Applications from ..conftest import HOST @pytest.fixture def applications(axis_device) -> Applications: """...
# -*- coding: latin-1 -*- #retriever """Retriever script for direct download of vertnet-fishes data""" import os from builtins import str from pkg_resources import parse_version from retriever.lib.models import Table from retriever.lib.templates import Script try: from retriever.lib.defaults import VERSION exce...
#!/usr/bin/python from dolfin import * import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc Print = PETSc.Sys.Print # from MatrixOperations import * import numpy as np # import matplotlib.pylab as plt import scipy.sparse as sps import scipy.sparse.linalg as slinalg import os import scipy.io...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import six import utool as ut from six.moves import builtins from utool._internal.meta_util_six import get_funcname print, rrr, profile = ut.inject2(__name__, '[decor]') DEBUG_ADDERS = ut.get_argflag(('--debug-adders', '--verbadd...
"""Script for publishing new versions of Selenium to cloud storage. When you run this script, it will use OAuth 2.0 to authenticate with Google Cloud Storage before attempting to upload any files. This script will fail if the authenticated account does not have write access to the indicated bucket. By default, this s...
import os import socket import threading import Queue import time import struct import logging from consts import * from utils import * logger = logging.getLogger(__name__) # mfsmaster need to been patched with dcache ENABLE_DCACHE = False class StatInfo: def __init__(self, totalspace, availspace, trashspace, ...
# Copyright 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.0 # # Unless required by applicable law or ag...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix remote services: MQTT pseudo RPC An remote service protocol based on MQTT. This implementation tries to mimic the MQTT-RPC Javascript project: https://github.com/wolfeidau/mqtt-rpc This module depends on the paho-mqtt package (ex-mosquitto), provided by ...
# # Copyright 2013 NEC Corporation. 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...
"""Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are a...
''' Inspector ========= .. versionadded:: 1.0.9 .. warning:: This module is highly experimental, use it with care. The Inspector is a tool for finding a widget in the widget tree by clicking or tapping on it. Some keyboard shortcuts are activated: * "Ctrl + e": activate / deactivate the inspector view ...
# -*- coding: utf-8 -*- # # Copyright 2011-2013 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, bu...
#!/usr/bin/env python """Parse an object catalog data, returning a list of data dictionaries, one per object. History: 2003-11-04 ROwen 2003-11-18 ROwen Modified to use SeqUtil instead of MathUtil. 2004-02-23 ROwen Preference files are now read with universal newline support on Python 2.3 or ...
# -*- 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...
from typing import TYPE_CHECKING from typing import List from typing import Optional from poetry.core.semver.empty_constraint import EmptyConstraint from poetry.core.semver.version_range_constraint import VersionRangeConstraint from poetry.core.semver.version_union import VersionUnion if TYPE_CHECKING: from poet...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
#!/usr/bin/env python3 # Copyright (c) 2016-2018 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 the bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 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. Yo...
# -*- coding: utf-8 -*- # The class in this module emulates System.out.print/println # for testing reasons. It puts the method inside # the bootstrap Classloader classloader.py on a # prebuild phase. # It is not used on a JVM-Startup via java.py. aloader = None #XXXX must be set before make_String funtion call from he...
''' Combine data sources on fuzzy-matched titles to create final data set ''' from multiprocessing import Pool, cpu_count from functools import partial import pandas as pd import numpy as np from fuzzywuzzy import process from src.my_aws import S3 KEY_OMDB_TOR = 'OMDB_Torrents.csv' KEY_NUM = 'TheNumbers_budgets....
import json import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning import logging from .ibmappliance import IBMAppliance from .ibmappliance import IBMError from .ibmappliance import IBMFatal from ibmsecurity.utilities import tools from io import open try: basestring except NameErro...
# -*- coding: utf-8 -*- # Copyright (c) 2014, Elvis Tombini <elvis@mapom.me> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDE...
import os import django.conf.global_settings as DEFAULT_SETTINGS BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) DATA_DIR = os.path.join(BASE_DIR, os.pardir, 'data') ROOT_URLCONF = 'deploy.urls' WSGI_APPLICATION = 'deploy.wsgi.application' INSTALLED_APPS = ( 'django.contrib.auth...
import os os.environ["GLOG_minloglevel"] = "2" import sys import re import caffe import numpy as np import tensorflow as tf import skimage.io from caffe.proto import caffe_pb2 from synset import * import resnet weight_dir = os.path.join(os.environ["TV_DIR_DATA"], 'weights') rundir = 'tensorflow_resnet_convert_1.1' ...
# Version 0.2.0 # 2009/06/18 # Copyright Michael Foord 2005-2009 # akismet.py # Python interface to the akismet API # E-mail fuzzyman@voidspace.org.uk # http://www.voidspace.org.uk/python/modules.shtml # http://akismet.com # Released subject to the BSD License # See http://www.voidspace.org.uk/python/license.shtml ...
""" @package mi.instrument.wetlabs.fluorometer.flord_d.test.test_driver @file marine-integrations/mi/instrument/wetlabs/fluorometer/flort_d/driver.py @author Tapana Gupta @brief Test cases for flord_d driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driv...
# Copyright (c) 2014 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 ...
# 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 os import os.path import tempfile import shutil from nose.tools import eq_ from build_pack_utils import utils from compile_helpers import setup_webdir_if_it_doesnt_exist from compile_helpers import convert_php_extensions from compile_helpers import is_web_app from compile_helpers import find_stand_alone_app_to_r...
# -*- coding: utf-8 -*- # Copyright (c) 2015-2018, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 """ Basis Set Representations ############################## This module provides classes that support representations of various basis sets. There are a handful of basis sets in com...
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** from . import AWSObject, AWSProperty, PropsDictType, Tags from .validators import boolean, integer class ContactFlow(AWSObject): """ `Cont...
#!/usr/bin/env python # -*- coding: utf-8 -*-# from sqlalchemy import Column, DateTime, Float, ForeignKey, Integer, Numeric, Text, create_engine from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() __engine = create_engine('sqlite:/...
# Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, sof...
import urllib import sys import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.contrib.auth import authenticate, login from django.core.handlers.base import BaseHandler from django.core.handlers.wsgi import WSGIRequest from ...
""" Try monte-carloing EAZY ZP corrections """ import threedhst from threedhst import catIO from threedhst import eazyPy as eazy import unicorn from unicorn import utils_c import matplotlib.pyplot as plt import numpy as np class IterZeropoints(): def __init__(self, root='hudf09', PATH='OUTPUT'): if n...
#!/usr/bin/env python from unittest import mock import unittest from mkdocs.exceptions import PluginError from mkdocs.structure.pages import Page from mkdocs.structure.files import File, Files from mkdocs.structure.nav import get_navigation from mkdocs.commands import build from mkdocs.tests.base import load_config, ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# 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...
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """ Train post-hoc SVMs using the algorithm and ...
import openbabel as ob import pybel as pb import numpy as np import glob, os import multiprocessing as mp from multiprocessing import Pool def bmin_call(file_list): for filename in file_list: infile = filename.replace(".com","") os.system("bmin -WAIT {};".format(infile)) return 0 def cons_o...
r""" Filename: normal_form_game.py Authors: Tomohiro Kusano, Daisuke Oyama Tools for normal form games. Definitions and Basic Concepts ------------------------------ An :math:`N`-player *normal form game* :math:`g = (I, (A_i)_{i \in I}, (u_i)_{i \in I})` consists of - the set of *players* :math:`I = \{0, \ldots, N...
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix shell service bundle. Provides the basic command parsing and execution support to make a Pelix shell. :author: Thomas Calmant :copyright: Copyright 2016, Thomas Calmant :license: Apache License 2.0 :version: 0.6.4 .. Copyright 2016 Thomas Calmant ...
# Copyright 2014 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 base64 import logging import urlparse from common.chrome_proxy_measurements import ChromeProxyValidation from integration_tests import chrome_proxy_m...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Users\JohnnyG\Documents\CHESS\XRDproject_Python\import_attr.ui' # # Created: Sun Jan 09 18:39:36 2011 # by: PyQt4 UI code generator 4.5.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui clas...
"""The airvisual component.""" import asyncio from datetime import timedelta from math import ceil from pyairvisual import CloudAPI, NodeSamba from pyairvisual.errors import ( AirVisualError, InvalidKeyError, KeyExpiredError, NodeProError, ) from homeassistant.config_entries import SOURCE_REAUTH from ...
#!/usr/bin/env python # Copyright 2011 Google Inc. All Rights Reserved. """Test the grr aff4 objects.""" import time from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib import utils class MockChangeEvent(flow.EventListener): EVENTS = ["MockChang...
"""Analog log report object.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from collections import Counter, defaultdict, OrderedDict import time from analog.renderers import Renderer from analog.utils import PrefixMatchingCounter try: from statisti...
# coding=utf-8 # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import import os import re import tarfile import zipfile from contextlib import closing from email.message import Message from email.parser ...
# -*- coding: utf-8 -*- """ Deployments """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) s3db.hrm_vars() # ----------------------------------------------------------------------------- def index(): "...
#Copyright ReportLab Europe Ltd. 2000-2007 #see license.txt for license details __version__=''' $Id: fontfinder.py 3280 2008-09-10 17:57:51Z rgbecker $ ''' #modification of users/robin/ttflist.py. """This provides some general-purpose tools for finding fonts. The FontFinder object can search for font files. It aims ...
from __future__ import division import math from itertools import product import numpy as np from numpy.testing import assert_allclose, assert_equal, assert_ from pytest import raises as assert_raises from scipy.sparse import csr_matrix, csc_matrix, lil_matrix from scipy.optimize._numdiff import ( _adjust_schem...
from django.template.defaulttags import kwarg_re from django.template import Library, TemplateSyntaxError, Node from django.utils.encoding import smart_str try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.models import User else: User = get_user_model() regi...
# File: transcript/modules/re/__init__.py # Author: Carl Allendorph # Date: 13NOV2016 # # Description: # This file contains the definition of a simulated re python # regular expression parsing module. The idea is to leverage the # javascript native regular expression interface as much as # possible. In fact, where n...
from __future__ import print_function import sys import random import os from builtins import range import time import json sys.path.insert(1, "../../../") import h2o from tests import pyunit_utils from h2o.estimators.glm import H2OGeneralizedLinearEstimator from h2o.grid.grid_search import H2OGridSearch class Test...
"""SCons.Script This file implements the main() function used by the scons script. Architecturally, this *is* the scons script, and will likely only be called from the external "scons" wrapper. Consequently, anything here should not be, or be considered, part of the build engine. If it's something that we expect ot...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ import division # from psychopy import visual, core, data, event, logging, gui from psychopy.constants import * import pandas as pd import numpy as np from numpy import sin, cos, tan, log, log10, pi, average, sqrt, std, deg2rad, rad2deg, linspace, asarray ...
# # 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...
from galaxy.web.base.controller import * from galaxy.web.framework.helpers import time_ago, iff, grids from galaxy import util import webhelpers, logging from datetime import datetime from cgi import escape log = logging.getLogger( __name__ ) # States for passing messages SUCCESS, INFO, WARNING, ERROR = "done", "info...
import math import numpy as np import random import time import mss from tkinter import * from tkinter import font import IPython class Minesweeper(object): def __init__(self, ROWS = 10, OUT = "FULL", COLS = 10, SIZEOFSQ = 100, MINES = 13, interval = 0, display = False, rewards = {"win" : 10, "loss" : -10, "progr...
import sys import json import uuid import logging from testtools.matchers import Equals, Contains, Not from testtools import content, content_type, ExpectedException from vnc_api.vnc_api import * sys.path.append('../common/tests') from test_utils import * import test_common import test_case logger = logging.getLog...
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
#!/usr/bin/env python # Copyright 2019 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...
import os.path import re import tornado.web import tornado.websocket import logging import json import base64 from netlib.http import CONTENT_MISSING from .. import version, filt def _strip_content(flow_state): """ Remove flow message content and cert to save transmission space. Args: flow_state...
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
# This mocks the GDB module for test generation import types as _types ARCH_FRAME = 5 class Architecture: pass BP_ACCESS_WATCHPOINT = 9 BP_BREAKPOINT = 1 BP_HARDWARE_WATCHPOINT = 7 BP_NONE = 0 BP_READ_WATCHPOINT = 8 BP_WATCHPOINT = 6 class Block: pass class BlockIterator: pass class Breakpoint: pass class BreakpointEv...
import os import web import libweasyl.ratings as ratings from libweasyl import staff from weasyl.controllers.base import controller_base from weasyl.error import WeasylError from weasyl import ( api, avatar, banner, blocktag, collection, commishinfo, define, emailer, errorcode, folder, followuser, frienduser...
# '''Problem 54 Poker Hands from ProjectEuler.net In the card game poker, a hand consists of five cards and are ranked, from lowest to highest, in the following way: High Card: Highest value card. One Pair: Two cards of the same value. Two Pairs: Two different pairs. Three of a Kind: Three cards of th...
import os import pandas import re import sys import types from collections import defaultdict from hyperloglog import HyperLogLog from crawlplot import CrawlPlot, PLOTDIR from crawlstats import CST, CrawlStatsJSONDecoder, HYPERLOGLOG_ERROR,\ MonthlyCrawl class CrawlSizePlot(CrawlPlot): def __init__(self): ...
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
#!/usr/bin/env python # GYB: Generate Your Boilerplate (improved names welcome; at least # this one's short). See -h output for instructions from __future__ import print_function import os import re try: from cStringIO import StringIO except ImportError: from io import StringIO import textwrap import tokeniz...
#!/usr/bin/env python # # Azure Linux extension # # Linux Azure Diagnostic Extension (see below for version) # Copyright (c) Microsoft Corporation # All rights reserved. # MIT License # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files ...
# 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 limitation the rights ...
# -*- coding: utf-8 -*- # farmeconomy.py module # authors: Jonathan Conning & Aleks Michuda # An OOP implementation import numpy as np from matplotlib import pyplot as plt from scipy.optimize import minimize from collections import namedtuple class Economy(object): """ Economy with an Equilibrium Farm Size Dis...
#!/bin/env python3 import ewebsockets from ewebsockets import Frame, OpCode from time import time, sleep import maxthreads from .forms import * import logging from .chat_room import * from .database import * from .client import Client from .crypto import * import random, string from .email_functions import * import pd...
# 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 ...
# Copyright (C) 2012 - 2014 EMC Corporation. # 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 # # Unle...
import subprocess import sys, imp, codecs, shlex, os, json import node_variables PACKAGE_PATH = os.path.dirname(os.path.abspath(os.path.dirname(__file__))) def get_node_js_custom_path(): with open(os.path.join(PACKAGE_PATH, "JavaScript-Completions.sublime-settings")) as data_file: return json.load(data_fi...
# encoding: utf-8 """ dmec.py -- Real-time (non-caching) procedural model of MEC grid cell responses capable of translational and rotational realignment. Created by Joe Monaco on 2009-07-29. Completed/frozen on 2009-12-15. Copyright (c) 2009 Johns Hopkins University. All rights reserved. """ # Library imports ...
# 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...
"""Methods related to display of information to the user.""" import csv import datetime import io import sys import webbrowser import dateutil import googleapiclient.http #TODO: get rid of these hacks import gam from gam.var import * from gam import controlflow from gam import gapi def current_count(i, count): ...
# Copyright 2012 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 law...
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
#!/usr/bin/env python import os import sys import math import time import bisect import signal import optparse import traceback try: import whisper except ImportError: raise SystemExit('[ERROR] Please make sure whisper is installed properly') class Approximator(object): "Generates approximated value for arbitr...
import builtins from io import StringIO from itertools import product from string import ascii_lowercase import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall import pandas as pd from pandas import DataFrame, Index, MultiIndex, Series, Timestamp, date_range, isna import pandas.core.nanop...
"""Support for SolarEdge Monitoring API.""" from abc import abstractmethod from datetime import date, datetime import logging from requests.exceptions import ConnectTimeout, HTTPError import solaredge from stringcase import snakecase from homeassistant.const import CONF_API_KEY, DEVICE_CLASS_BATTERY, DEVICE_CLASS_POW...
import numpy from django.template import Context, Template from django.utils.safestring import mark_safe from leslie_probit import leslie_probit_model, leslie_probit_parameters import logging import time import datetime def getheaderpvu(): headings = ["Parameter", "Value", "Units"] return headings def getheaderpva(...
# -*- coding: utf-8 -*- # Copyright (c) 2010 matt # Copyright (c) 2010 Dieter Plaetinck # Copyright (c) 2010, 2012 roger # Copyright (c) 2011-2012 Florian Mounier # Copyright (c) 2011 Mounier Florian # Copyright (c) 2011 Timo Schmiade # Copyright (c) 2012 Mikkel Oscar Lyderik # Copyright (c) 2012, 2014 Tycho Andersen #...
from __future__ import (absolute_import, division, print_function) import re from qtpy.QtCore import QModelIndex from qtpy.QtGui import QStandardItem, QStandardItemModel from qtpy.QtWidgets import QAction from addie.utilities import customtreeview as base from addie.widgets.filedialog import get_save_file from addie.r...
""" Search indexing classes to index into Elasticsearch. Django settings that should be defined: `ES_HOSTS`: A list of hosts where Elasticsearch lives. E.g. ['192.168.1.1:9200', '192.168.2.1:9200'] `ES_DEFAULT_NUM_REPLICAS`: An integer of the number of replicas. `ES_DEFAULT_NUM_SHARDS`: ...
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2012 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. # You may obtain a c...
# -*- coding: utf-8 -*- import os import re from opensextant import TextMatch, Extractor NOT_SUBMATCH = 0 IS_SUBMATCH = 1 IS_DUPLICATE = 2 def reduce_matches(matches): """ Mark each match if it is a submatch or overlap or exact duplicate of other. :param matches: array of TextMatch (or TextEntity). This...
#!/usr/bin/env python3 import os import sys import urllib import logging from datetime import datetime import stripe import requests from flask import Flask, render_template, request,\ redirect, url_for, session, g, flash from flask.ext.sqlalchemy import SQLAlchemy # Config app = Flask(__name__, static_url_pat...
# Copyright 2015 Hewlett-Packard Development Company, L.P.dsvsv # Copyright 2015 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 # # ...
#!/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 "License");...