gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2012-2016 The Meson 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 copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
""" Test Scipy functions versus mpmath, if available. """ import re import numpy as np from numpy.testing import dec import scipy.special as sc from scipy.special._testutils import FuncData, assert_func_equal try: import mpmath except ImportError: try: import sympy.mpmath as mpmath except ImportE...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of my-weather-indicator # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
"""Test to verify that we can load components.""" from unittest.mock import ANY, patch import pytest from homeassistant import core, loader from homeassistant.components import http, hue from homeassistant.components.hue import light as hue_light from tests.common import MockModule, async_mock_service, mock_integrat...
""" Tests for zipline.pipeline.loaders.frame.DataFrameLoader. """ from unittest import TestCase from mock import patch from numpy import arange, ones from numpy.testing import assert_array_equal from pandas import ( DataFrame, DatetimeIndex, Int64Index, ) from zipline.lib.adjustment import ( ADD, ...
######### # Copyright (c) 2015 GigaSpaces Technologies 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 # # Unless...
""" functions to access the data dictionary in a clearer way """ import os import toolz as tz from bcbio.utils import file_exists from bcbio.log import logger import sys LOOKUPS = { "config": {"keys": ['config']}, "tmp_dir": {"keys": ['config', 'resources', 'tmp', 'dir']}, "num_cores": {"keys": ['config',...
# (c) Copyright 2014 Hewlett-Packard Development Company, L.P. # 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...
# Copyright (C) 2010 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 ...
# Copyright (c) 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# -*- coding: utf-8 -*- # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
""" Copyright (c) 2015, Tim Thompson 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 followi...
# -*- coding: utf-8 -*- ''' Return cached data from minions ''' from __future__ import absolute_import # Import python libs import logging # Import salt libs import salt.log import salt.utils import salt.utils.master import salt.payload from salt.ext.six import string_types from salt.exceptions import SaltInvocationEr...
from django.http import (HttpResponse, HttpResponseRedirect) from django.shortcuts import render from django.core.urlresolvers import reverse from django.utils.datastructures import MultiValueDictKeyError from django.shortcuts import get_object_or_404 from django.contrib.auth.decorators import login_required from djang...
from IoTPy.errors import IoTPy_APIError, errmsg from IoTPy.pinmaps import CAP_GPIO from IoTPy.sfp import encode_sfp, decode_sfp import struct class GPIO(object): """ GPIO (General Purpose Input and Output) pin module. :param board: IoBoard to which the pin belongs to. :type board: :class:`IoTPy.pyupe...
# -*- coding: utf-8 -*- from __future__ import print_function, absolute_import import numpy, matplotlib, matplotlib.pyplot, math, re from scipy.interpolate import interp1d import CoolProp.CoolProp as CP from .Common import BasePlot from scipy import interpolate from scipy.spatial.kdtree import KDTree class IsoLine...
from __future__ import absolute_import, unicode_literals from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import SimpleUploadedFile from django.cor...
# 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...
from twisted.internet.defer import succeed from twisted.mail import smtp from twisted.python.failure import Failure from twisted.trial import unittest from axiom.iaxiom import IScheduler from axiom import attributes, item, store, userbase from axiom.dependency import installOn from xquotient import exmess, smtpout, ...
""" (Can be view as [html](http://menzies.us/cs472/?niching) or [raw Python](http://unbox.org/open/trunk/472/14/spring/src/where.py).) How to Find Niche Solutions =========================== ### Why Niche? When exploring complex multi-objective surfaces, it is trite to summarize that space with one number such _max...
import pygame from pygame.locals import * from zort import hex_view from zort import config from zort import gui from zort import resources from zort.environ import util from zort.hex_model import * from zort.entity import * from zort.dialog import Dialog from zort.scenes import Scene from zort.euclid import Point2, V...
""" Tests for Mixin class that handles IO between the Narrative and workspace service. """ __author__ = 'Bill Riehl <wjriehl@lbl.gov>' import unittest from getpass import getpass from biokbase.narrative.contents.narrativeio import ( KBaseWSManagerMixin, PermissionsError ) from biokbase.workspace.client import ...
""" .. todo:: WRITEME """ import os import cPickle import logging _logger = logging.getLogger(__name__) import numpy as np import warnings N = np from pylearn2.datasets import cache, dense_design_matrix from pylearn2.expr.preprocessing import global_contrast_normalize from pylearn2.utils import contains_nan cla...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # ...
from .. import signals # NOQA :signals import needs to be here so signals get registered import logging import collections from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.template import Context from django.contrib.a...
from rest_framework.views import APIView from rest_framework.response import Response from analysis.corpus import get_dual_corpora_by_metadata, find_doc_in_hierarchy, trace_doc_in_hierarchy from analysis.utils import profile from django.conf import settings from django.http import Http404 from django.core.cache import ...
#!/usr/bin/python """ This script ... Takes: parameters.pkl from a theanet training instance, Data files x, y, auxillary, Builds: A neural net with specified parameters, Runs: The training data images through the network, Reports: The errors made on the data samp...
# Log Parser for RTI Connext. # # Copyright 2016 Real-Time Innovations, 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 # # ...
from tornado import gen, netutil from tornado.escape import ( json_decode, json_encode, utf8, _unicode, recursive_unicode, native_str, ) from tornado.http1connection import HTTP1Connection from tornado.httpclient import HTTPError from tornado.httpserver import HTTPServer from tornado.httputil im...
#!/usr/bin/python import os,sys,glob,re import numpy as np import scipy import datetime import time from datetime import timedelta from AnalyzedFish import AnalyzedFish # fish object from scipy.stats import norm import copy import math import matplotlib import fileloading # prepares all the files import statsandgraph...
# 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...
from __future__ import absolute_import, division, print_function from collections import Iterable from functools import partial import numpy as np import pandas as pd from . import rolling from .computation import apply_ufunc from .npcompat import flip from .pycompat import iteritems from .utils import is_scalar c...
""" Covariance estimators using shrinkage. Shrinkage corresponds to regularising `cov` using a convex combination: shrunk_cov = (1-shrinkage)*cov + shrinkage*structured_estimate. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile ...
from __future__ import unicode_literals import json import socket from uuid import uuid4 from time import sleep from random import randrange from unittest import TestCase import six from six.moves.queue import Queue, Empty from six.moves.urllib.parse import urlparse, urlencode, parse_qsl import pytest import cherrypy...
#!/usr/bin/env python # Copyright (c) 2014 Quanta Research Cambridge, Inc # # 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 u...
import os import re import ssl import sys import html import json import shutil import crayons import traceback import basc_py4chan import configparser import urllib.error import urllib.parse import urllib.request import multiprocessing import better_exceptions from time import sleep from collections import deque from...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Enumerator with the libxc identifiers. This is a low level object, client code should not interact with LibxcFunc directly but use the API provided by the Xcfunc object defined in core.xcfunc.py. Part of thi...
from __future__ import absolute_import, unicode_literals from unittest import TestCase as UnitTestCase import django from django.contrib.contenttypes.models import ContentType from django.core import serializers from django.core.exceptions import ImproperlyConfigured, ValidationError from django.core.management impor...
from craft_ai.pandas import CRAFTAI_PANDAS_ENABLED if CRAFTAI_PANDAS_ENABLED: import unittest import pandas as pd from numpy.random import randn import craft_ai.pandas from craft_ai import errors as craft_err from . import settings from .utils import generate_entity_id from .data impo...
# 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 applicable ...
from __future__ import unicode_literals import logging from django.template.context import Context from django.template.loader import render_to_string from django.utils.safestring import mark_safe from djblets.cache.backend import cache_memoize from pygments import highlight from pygments.lexers import (ClassNotFound...
""" configureblocksdialog.py """ from __future__ import absolute_import, division, print_function import json import logging import os from PySide import QtGui, QtCore from PySide.QtCore import Qt from mcedit2.util.directories import getUserFilesDirectory from mcedit2.util.load_ui import load_ui from mcedit2.widget...
#!/usr/bin/env python # # cloudlet infrastructure for mobile computing # # author: kiryong ha <krha@cmu.edu> # # copyright (c) 2011-2013 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 obt...
"""Very simple example using a pair of Lennard-Jones particles. This script has several pieces to pay attention to: - Importing the pieces from wepy to run a WExplore simulation. - Definition of a distance metric for this system and process. - Definition of the components used in the simulation: resampler, boundary...
import datetime import hashlib import time from django.contrib.auth.models import User from django.core.cache import cache from django.db.models import ( CASCADE, PROTECT, BooleanField, CharField, DateTimeField, ForeignKey, Model, SlugField, TextField, ) from django.urls import reve...
from __future__ import absolute_import from django.core import mail from django.core.urlresolvers import reverse from mock import patch from sentry.models import ( AuthProvider, OrganizationMember, OrganizationMemberTeam) from sentry.testutils import APITestCase class UpdateOrganizationMemberTest(APITestCase): ...
import datetime import os import stat import types import warnings from twisted.python import log from twisted.internet import defer from twisted.internet.endpoints import TCP4ClientEndpoint from twisted.internet.endpoints import UNIXClientEndpoint from twisted.internet.interfaces import IReactorCore from twisted.inte...
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
from __future__ import division import warnings import numpy as np import scipy.sparse as sp from sklearn.base import clone from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import a...
# Copyright 2004-2017 Tom Rothamel <pytom@bishoujo.us> # # 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, m...
# 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 (C) 2004-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
from config.api1_1_config import config as config_old #TODO remove when 2.0 worklfow API is implemented from config.api2_0_config import config from config.amqp import * from modules.logger import Log from modules.amqp import AMQPWorker from modules.worker import WorkerThread, WorkerTasks from on_http_api1_1 import W...
"""Contains methods for building XML structures for interacting with IDE The methods from this file are used for the debugger interaction. Please note that Python console now uses Thrift structures with the similar methods contained in `pydevd_thrift.py` file. """ from _pydev_bundle import pydev_log import traceback f...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import os, json from binascii import hexlify, unhexlify from hashlib import sha256 from .params import _Params from .parameters.ed25519 import ParamsEd25519 DefaultParams = ParamsEd25519 class SPAKEError(Exception): pass class OnlyCallStartOnce(SPAKEError): """start() may only be called once. Re-using a SPAKE...
# -*- coding: utf-8 -*- """ requests.sessions ~~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os import sys import time from datetime import timedelta from collections import OrderedDict from .auth import _basic_auth_str from...
#!/usr/bin/python3 """ Cleaner interface into api_client, for the most part. """ import json import sys import secrets import os import logging import time import aaargh import pyqrcode from walkingliberty import WalkingLiberty from . import api_client from . import validate from .version import __version__ cli =...
#Organic Compound Analyser V2 #Features: #Branch-type, straight-chain and cyclo types are implemented to this version. #Also includes Alcohols #No proper imaging system...yet #Has a feature to scan for isomers of a formula. #Cleaner code, easier to debug. #A proper menu import re import math print("""Welcome to the o...
#!/usr/bin/env python """ Service Helper Classes """ from bacpypes.debugging import bacpypes_debugging, ModuleLogger from bacpypes.capability import Capability from bacpypes.comm import Client, bind from bacpypes.iocb import IOCB from bacpypes.pdu import Address, LocalBroadcast from bacpypes.npdu import NPDU from ba...
import logging from collections import namedtuple from .main import special_command, RAW_QUERY TableInfo = namedtuple("TableInfo", ['checks', 'relkind', 'hasindex', 'hasrules', 'hastriggers', 'hasoids', 'tablespace', 'reloptions', 'reloftype', 'relpersistence']) log = logging.getLogger(__name__) @special_command('\\...
# This is Retort, a thing to boil iKettles in Flask. # It is built on the shoulders of giants. # # This is the kettle access library. Most of it is from # Mark J Cox's GUI project (https://github.com/iamamoose/moosekettle) because # it does the socket stuff, and I'm a web guy who doesn't understand sockets. # # I've...
import math from typing import Optional, Tuple, TYPE_CHECKING from dataclasses import dataclass import torch import torch.nn.functional as F from allennlp.common import FromParams from allennlp.common.checks import ConfigurationError from allennlp.modules.matrix_attention.matrix_attention import MatrixAttention from a...
import re import csv import urllib import datetime from django.utils.encoding import smart_unicode, force_unicode from django.db.models import Avg, Sum, Min, Max, Count from time import strptime, strftime import time from urlparse import urljoin from BeautifulSoup import BeautifulSoup from college.models import * from ...
#!python # Copyright 2017 The ANGLE 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. # # gen_proc_table.py: # Code generation for entry point loading tables. # NOTE: don't run this script directly. Run scripts/run_code_generati...
# Notes in google docs, "How do you discover / learn algebra?" # Possible yak shaving tasks: # - Implement more operators, including parsing & printing. # - Implement integer literals, including parsing & printing. # - DRY the parser, at least the Infix part. # - Write tests for the "pragma: no cover" comments in this...
# -*- coding: utf-8 -*- #***************************************************************************** # Copyright (C) 2003-2006 Gary Bishop. # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu> # # Distributed under the terms of the BSD License. The full license is in # the file COPYIN...
import re import six from graphite.errors import NormalizeEmptyResultError, InputParameterError from graphite.functions import SeriesFunction from graphite.logger import log from graphite.render.grammar import grammar from graphite.render.datalib import fetchData, TimeSeries, prefetchData from graphite.functions.param...
"""Utilities for sending e-mail messages.""" from __future__ import unicode_literals import logging from django.contrib.auth.models import User from django.db.models import Q from djblets.mail.utils import (build_email_address, build_email_address_for_user) from reviewboard.accounts....
from SimpleCV.base import * from SimpleCV.ImageClass import Image, ImageSet from SimpleCV.DrawingLayer import * from SimpleCV.Features import FeatureExtractorBase """ This class is encapsulates almost everything needed to train, test, and deploy a multiclass k-nearest neighbors image classifier. Training data should be...
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from uiPeer import * from wallaby.common.pathHelper import SelectionNotSpecified, PathHelper from viewer import Viewer from editor import Editor from documentChanger import DocumentChanger class EmbeddedViewer(UIPeer): Select = Pillo...
# -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (c) 2020, 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: # # ...
from django.core.urlresolvers import reverse from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.db.models import Q class Player(models.Model): """ TicTacToe player. """ PLAYER_TYPE = ( ('ai_random', 'AI Random'), ('ai_min_m...
# -*- encoding: utf-8 -*- import os from supriya.tools.systemtools.SupriyaObject import SupriyaObject class ServerRecorder(SupriyaObject): ### CLASS VARIABLES ### __documentation_section__ = 'Server Internals' __slots__ = ( '_channel_count', '_current_channel_count', '_current_h...
#!/usr/bin/env python3 # pylint: disable=invalid-name,bad-continuation,too-many-statements, # pylint: disable=too-many-branches,too-many-locals """ Simple web interfaceDocker for [lgogdownloader](https://github.com/Sude-/lgogdownloader), an gog.com download manager for Linux. """ import sys import json import os from ...
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import math import numpy as np import pytest from numpy.testing import assert_almost_equal, assert_array_equal from landlab import FieldError, HexModelGrid, RasterModelGrid from landlab.components import FlowAccumulator, FlowDirectorSteepest from landlab.utils.flow__distance import calculate_flow__distance def test...
''' ''' from __future__ import absolute_import, print_function import logging log = logging.getLogger(__name__) from ..document import Document from ..resources import _SessionCoordinates, DEFAULT_SERVER_HTTP_URL from ..util.deprecation import deprecated from ..util.session_id import generate_session_id DEFAULT_SES...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#!/usr/bin/python """ Copyright 2013 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Calulate differences between image pairs, and store them in a database. """ # System-level imports import contextlib import errno import json import logging import os im...
import sys import unittest from test import support from test.test_grammar import (VALID_UNDERSCORE_LITERALS, INVALID_UNDERSCORE_LITERALS) L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dever-manage tools name:dever.py author:rabin """ from core import * import json class Dever(object): git = 'http://git.dever.cc:3000/' ssh = 'ssh://git@git.dever.cc:10022/' lib = Core.path + 'container/share/lib/php/' dev = Core.path + 'container/web/'...
# Copyright (c) 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.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ A scoring script. """ import os import csv import sys import logging from tqdm import tqdm from kbpo.util import micro, macro, confidence_intervals from kbpo.data import load_queries, load_gold, load_output from kbpo.analysis import compute_entity_scores, compute_ment...
# # 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...
import threading import time import math import Adafruit_Nokia_LCD as LCD import Adafruit_GPIO.SPI as SPI from PIL import Image from PIL import ImageDraw from PIL import ImageFont import pb_bin_reader MAX_UINT = 65535 DC = 'P9_15' RST = 'P9_12' SPI_PORT = 1 SPI_DEVICE = 0 MAX_FREQ = 10000 / 2 edgeByChannelId = ...
import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Series, Timestamp, date_range, timedelta_range, ) import pandas._testing as tm class TestDataFrameAppend: def test_append_multiindex(self, multiindex_dataframe_random_data, frame_or_series): obj = mul...
from __future__ import absolute_import from functools import wraps, partial from flask import request, url_for, current_app from flask import abort as original_flask_abort from flask import make_response as original_flask_make_response from flask.views import MethodView from flask.signals import got_request_exception f...
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
import libcontext, bee from bee.segments import * from libcontext.socketclasses import * from libcontext.pluginclasses import * class near(object): """The near sensor detects other objects that are nearby The other objects can be filtered by material, property or identifier""" metaguiparams = { ...
import uuid from typing import Optional, Union from mitmproxy import connection from mitmproxy import flow from mitmproxy import http from mitmproxy import tcp from mitmproxy import websocket from mitmproxy.test.tutils import treq, tresp from wsproto.frame_protocol import Opcode def ttcpflow(client_conn=True, server...
# 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 applicabl...
# -*- coding: utf-8 -*- # Copyright 2019 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 # # Copyright (C) 2011-2018 Red Hat, Inc. (https://github.com/Commonjava/indy) # # 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...
# Copyright (c) 2017 Trail of Bits, 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 ...
import os, os.path import buffer, term import logging log = logging.getLogger("pytality.ansi") #This module can get _really_ log-spammy if you turn it to debug log.setLevel(logging.WARN) class Escape(object): ''' Container for an ANSI escape sequence. These can be used both for 'drawing' and keyb...
# 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...