gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Variational Auto-Encoder. Copyright (C) 2017, Lucas Ondel 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...
import gevent import socket from gevent.queue import Empty class BaseTransport(object): """Base class for all transports. Mostly wraps handler class functions.""" def __init__(self, handler): self.content_type = ("Content-Type", "text/plain; charset=UTF-8") self.handler = handler def enco...
# Copyright 2014 eBay Software Foundation # Copyright [2015] 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 # # ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
from benchmark.fortune_html_parser import FortuneHTMLParser from setup.linux import setup_util from benchmark.test_types import * import importlib import os import subprocess import time import re from pprint import pprint import sys import traceback import json import logging import csv import shlex import math from ...
# Copyright 2022 The Flax Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# Copyright 2009 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
# Copyright 2017 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 required by applicable ...
''' Mathematical operations that generalize many operations from the standard math module so that they also work on numbers with uncertainties. Examples: from umath import sin # Manipulation of numbers with uncertainties: x = uncertainties.ufloat((3, 0.1)) print sin(x) # prints 0.141120008...+/-0.098999... ...
from sympy import (Symbol, Set, Union, Interval, oo, S, sympify, nan, GreaterThan, LessThan, Max, Min, And, Or, Eq, Ge, Le, Gt, Lt, Float, FiniteSet, Intersection, imageset, I, true, false, ProductSet, E, sqrt, Complement, EmptySet, sin, cos, Lambda, ImageSet, pi, Eq, Pow, Contains, Sum, RootOf, Symmetr...
import sys from mypyli import taxstring, taxtree class TaxNode(object): taxNodeCollection = {} @classmethod def get_node(cls, id): return cls.taxNodeCollection.get(id, None) @classmethod def add_node(cls, id, taxnode): cls.taxNodeCollection[id] = taxnode @classmethod d...
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Parcoords(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "parcoords" _valid_props = { "customdata", "customdatasrc", "dimensiondefaults...
import xml.etree.ElementTree import fractions import os import collections from collections import defaultdict import fractions import midi_to_statematrix import math lowerBound = 24 upperBound = 102 numPitches = upperBound - lowerBound #get the "divisions" which is the number of time #units per beat def getDivisio...
# Copyright (c) 2012 Roberto Alsina y otros. # 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, pub...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 # # Unle...
#! /usr/bin/python import datetime import logging import os import os.path import media_common import pyexiv2 import sqlite3 import time import unittest from mock import * class TestRepository(unittest.TestCase): def setUp(self): self.rep = media_common.Repository() pass @patch('sqlite3.dbapi2.connect'...
# 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 python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # """ This module contains convertors for converting MODS to XML required by URN\:NBN project. See: - http://resolver.nkp.cz/api/v3/digDocRegistration.xsd - https://code.google.com/p/czidlo/wiki/ApiV3 """ # Imports =============...
# 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...
"""TestCases for checking that it does not segfault when a DBEnv object is closed before its DB objects. """ import os, sys import unittest from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path # We're going to get warnings in this module about trying to close the db when # ...
#!/usr/bin/python from Tkinter import * import ttk from PIL import Image, ImageTk import os import re import csv def selectExp(event): app.selectExp(event) def closeTab(event): app.closeTabMiddleClick(event) class Application(Frame): def scrapeExperiments(self): listall = os.listdir("XRD/Processed") self.fil...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2016, Nigel Small # # 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/bin/env python """The JIP command line package contains utilities and the modules that expose command line functions for the JIP command. The module hosts a set of utility functions that can be used to simplify the process of interacting with the JIP API from within a command line tool. Functions in this module...
from __future__ import absolute_import, unicode_literals """ Django settings for decisions project. Generated by 'django-admin startproject' using Django 1.9.3. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://do...
with open("input.txt") as f: data = f.read().strip() intcode = [int(a) for a in data.split(",")] from collections import defaultdict from random import choice def run_yield(nums, get_input): ops = { 1: { 'in': 2, 'out': 1, 'op': lambda a, b: a+b, }, ...
# pylint: disable=g-bad-file-header # 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/LICENS...
# -*- coding: utf-8 -*- # # Copyright 2013 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/LICENS...
# 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 use ...
#!/usr/bin/env python import json import netaddr import os import random import re import requests import sys import base64 from azure.storage.blob import AppendBlobService from azure.storage.table import TableService import azure.mgmt.network from azure.common.credentials import ServicePrincipalCredentials from azure...
import logging import sqlite3 from logging import Logger from sqlite3 import Connection from typing import Optional from slack_sdk.oauth.installation_store.async_installation_store import ( AsyncInstallationStore, ) from slack_sdk.oauth.installation_store.installation_store import InstallationStore from slack_sdk....
from pygame.locals import * import pygame import math import json import socket from get_ip import check_for_internet_conection as get_ip import sys from time import sleep, localtime from weakref import WeakKeyDictionary from PodSixNet.Server import Server from PodSixNet.Channel import Channel from settings import * ...
r""" ``$ mwpersistence diffs2persistence -h`` :: Generates token persistence information from JSON revision documents annotated with diff information (see `mwdiffs dump2diffs|revdocs2diffs`). This utility expects to be fed revision documents in as a page-partitioned chronological sequence so that diff...
# 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...
# Hidden Markov Model Implementation import pylab as pyl import numpy as np import matplotlib.pyplot as pp #from enthought.mayavi import mlab import scipy as scp import scipy.ndimage as ni import roslib; roslib.load_manifest('sandbox_tapo_darpa_m3') import rospy #import hrl_lib.mayavi2_util as mu import hrl_lib.viz ...
#!/usr/bin/env python # queue-cmd.py # GusE 2013.12.16 V0.1 """ Queue shell commands """ __version__ = "1.3" import getopt import sys import os import subprocess import traceback import logging import logging.handlers import tempfile import argparse from re import match __app__ = os.path.basename(__file__) __author__...
# 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 ...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
#! /usr/bin/env python import logging import re import time import requests import json class Slacker(object): def __init__(self, slack_name, token, logger=None): """ slack name is the short name of the slack (preceding '.slack.com') token should be a Slack API Token. """ ...
# # Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Engine for generating reports""" # System imports: import ftplib import glob import os.path import shutil import socket import sys import syslog import threading import time import traceback # 3rd ...
# coding=utf8 # -*- coding: utf8 -*- # vim: set fileencoding=utf8 : from __future__ import unicode_literals from django.test.utils import override_settings from django.utils.timezone import now, timedelta from rest_framework.reverse import reverse from rest_messaging.models import Message, NotificationCheck, Partic...
""" Script entry point """ from src.calrissian.particle_vector_n_network_local_conv4 import ParticleVectorNLocalConvolution4Network from src.calrissian.layers.particle_vector_n_local_conv4 import ParticleVectorNLocalConvolution4 from src.calrissian.layers.particle_vector_n_local_conv4 import ParticleVectorNLocalConvol...
# Copyright 2021, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import warnings import math from ...maths import * from ..core import * from .core import * from .common import AcceleratableElement class _BezierBasePathElement(AcceleratableElement): """ An internal base class for BezierPathElements and ReparametrizableBezierPathElements. """ def initialize(self, **config): ...
import unittest, doctest from test import test_support from collections import namedtuple import pickle, cPickle, copy from collections import Hashable, Iterable, Iterator from collections import Sized, Container, Callable from collections import Set, MutableSet from collections import Mapping, MutableMapping from coll...
#!/usr/bin/python # # Copyright 2015 Red Hat # # 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 ...
from unittest import TestCase from dark.blast.hsp import normalizeHSP class Frame(object): def __init__(self, read, hit): self.read = read self.hit = hit class FakeHSP(dict): def __init__(self, subjectStart, subjectEnd, readStart, readEnd, frame, hit='', read=''): "...
import traceback from django.contrib.auth.decorators import login_required, permission_required from django.db.models.aggregates import Sum from django.shortcuts import render from WhatManager2 import manage_torrent from WhatManager2.settings import MIN_FREE_DISK_SPACE, MIN_WHAT_RATIO from WhatManager2.templatetags.c...
#!/usr/bin/env python """igcollect - PostgreSQL Copyright (c) 2019 InnoGames GmbH """ from argparse import ArgumentParser from time import time from psycopg2 import connect from psycopg2.extensions import ISOLATION_LEVEL_REPEATABLE_READ from psycopg2.extras import RealDictCursor def parse_args(): parser = Argu...
# -*- coding: utf-8 -*- """ Seamless Polymorphic Inheritance for Django Models ================================================== Please see README.rst and DOCS.rst for further information. Or on the Web: http://chrisglass.github.com/django_polymorphic/ http://github.com/chrisglass/django_polymorphic Copyright: This...
"""Implementation of JSONDecoder """ from __future__ import absolute_import import re import sys import struct from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr from .scanner import make_scanner def _import_c_scanstring(): try: from ._speedups import scanstring return scanstring...
# Copyright (C) 2004 Python Software Foundation # Author: barry@python.org (Barry Warsaw) # License: http://www.opensource.org/licenses/PythonSoftFoundation.php import unittest from string import Template class Bag: pass class Mapping: def __getitem__(self, name): obj = self for part in name...
#!/usr/bin/env python # # Use the raw transactions API to spend eternitys received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a eternityd or E...
"""Tests for chebyshev module. """ from __future__ import division import numpy as np import numpy.polynomial.chebyshev as cheb from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run_module_suite) def trim(x...
import numpy as np import pytest from pandas.core.dtypes.common import is_integer import pandas as pd from pandas import Series, Timestamp, date_range, isna import pandas._testing as tm def test_where_unsafe_int(sint_dtype): s = Series(np.arange(10), dtype=sint_dtype) mask = s < 5 s[mask] = range(2, 7)...
# -*- coding: utf-8 -*- # Copyright 2015 Metaswitch Networks # # 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 applicab...
#!/usr/bin/env python3 from io import StringIO import pandas as pd import traceback import psycopg2 import boto3 import sys import os import re import uuid import logging S3_ACCEPTED_KWARGS = [ 'ACL', 'Body', 'CacheControl ', 'ContentDisposition', 'ContentEncoding', 'ContentLanguage', 'ContentLength', 'Conten...
from __future__ import absolute_import, division, print_function # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed w...
#!/usr/bin/python2.5 # Copyright (c) 2009 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. """Snapshot Build Bisect Tool This script bisects a snapshot archive using binary search. It starts at a bad revision (it will try ...
# Copyright 2011 OpenStack LLC. # 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...
# Copyright 2019 PerfKitBenchmarker 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...
from fontParts.base.base import BaseDict, dynamicProperty, reference from fontParts.base import normalizers from fontParts.base.deprecated import DeprecatedGroups, RemovedGroups class BaseGroups(BaseDict, DeprecatedGroups, RemovedGroups): """ A Groups object. This object normally created as part of a :cl...
# Copyright 2012 One Laptop per Child # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
from __future__ import with_statement import os, re, glob #def to_strong(s): # s = re.sub(r'\{\{\*', '<strong>', s) # s = re.sub(r'\*\}\}', '</strong>', s) # return s # #def to_unstrong(str): # s = re.sub(r'\{\{\*', '', s) # s = re.sub(r'\*\}\}', '', s) # return s # #def pre_to_console(s): # s = ...
import mysql.connector import json import os import sys import requests import urllib2 from bs4 import BeautifulSoup from time import sleep def get_user_pass(): f=open('data/userpass.txt') for line in f: c=line.split(' ') user,pas = c[0].strip(),c[1].strip() f.close() print (user,pas) ...
""" Tools for converting PyPI packages to conda recipes. """ from __future__ import absolute_import, division, print_function import requests import keyword import os import re import subprocess import sys from collections import defaultdict from os import makedirs, listdir, getcwd, chdir from os.path import join, i...
""" Identifier Class for ip-cidr-list-url """ import datetime import radix import time import threading from ...iso8601 import * from ...jqfilter import * from ...jsonval import * from ...psjson import * from ...psurl import * data_validator = { "type": "object", "properties": { "source": { "$ref": ...
# 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...
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
import bz2 import zlib from datetime import datetime import pika from pika.spec import Basic, BasicProperties from mock import patch, sentinel from nose_parameterized import parameterized from pikachewie.data import Properties from pikachewie.message import Message from tests import _BaseTestCase, unittest mod = 'pi...
# electoral_district/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .models import ElectoralDistrict, ElectoralDistrictManager import wevote_functions.admin from wevote_functions.functions import positive_value_exists, convert_to_int, extract_state_from_ocd_division_id, \ extract...
import argparse import os from joblib import Parallel, delayed import numpy as np import autosklearn import autosklearn.data import autosklearn.data.competition_data_manager from autosklearn.pipeline.classification import SimpleClassificationPipeline parser = argparse.ArgumentParser() parser.add_argument('input') pa...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
""" Admin commands """ import time, re from django.conf import settings from django.contrib.auth.models import User from src.server.sessionhandler import SESSIONS from src.server.models import ServerConfig from src.utils import utils, prettytable, search from src.commands.default.muxcommand import MuxCommand PERMIS...
#!/usr/bin/env python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import json from collections import deque from ca_entities import ALL_ENTITIES from ca_base_entity import VoidEntity, ENTITIES_NAMES, ENTITIES_IDS, Point, NEIGHBORHOOD_TYPES from ca_link import LINK_TYPE_NAMES, LINK_TYPE_IDS from utils import rotate_point, debug, Point from collections import defaultdict from six impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import generators ''' Test the basic functions of parsec.py. ''' __author__ = 'He Tao, sighingnow@gmail.com' import random import unittest from parsec import * class ParsecTest(unittest.TestCase): '''Test the implementation of Text.Parsec. (The fin...
from __future__ import print_function, unicode_literals from unittest import TestCase import mock from nose.case import FunctionTestCase from nose.plugins.skip import SkipTest from skipnose.skipnose import SkipNose, walk_subfolders class TestWalkSubfolders(TestCase): @mock.patch('os.walk') def test_walk_sub...
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.test import TestCase, skipUnlessDBFeature from .models import ( CustomMembership, Employee, Event, Friendship, Group, Ingredient, Invitation, Membership, Person, PersonSelfRefM2M, Recipe, RecipeI...
from __future__ import print_function, division import time from copy import deepcopy import numpy as np from pymanopt.solvers.linesearch import LineSearchAdaptive from pymanopt.solvers.solver import Solver from pymanopt import tools BetaTypes = tools.make_enum( "BetaTypes", "FletcherReeves PolakRibiere He...
# # 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...
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Code to support writing parsers. Classes: AbstractParser Base class for parsers....
""" Support for iptables Configuration Options --------------------- The following options can be set in the minion config, grains, pillar, or master config. The configuration is read using :py:func:`config.get <salt.modules.config.get>`. - ``iptables.save_filters``: List of REGEX strings to FILTER OUT matching line...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright (c) 2015-2022 Vector 35 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 use, copy, modify, merge, publish, ...
# Copyright 2013 Dell 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 app...
#!/usr/bin/python # -*- coding: utf-8 -*- from nvd3 import lineChart from nvd3 import lineWithFocusChart from nvd3 import stackedAreaChart from nvd3 import multiBarHorizontalChart from nvd3 import linePlusBarChart from nvd3 import cumulativeLineChart from nvd3 import scatterChart from nvd3 import discreteBarChart from...
# Copyright (c) 2013 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
from random import random, choice from apiritif import random_string from bzt.modules.aggregator import ConsolidatingAggregator, DataPoint, KPISet, SAMPLE_STATES, AGGREGATED_STATES from bzt.utils import to_json, BetterDict from tests.unit import BZTestCase, EngineEmul from tests.unit.mocks import r, MockReader, MockL...
""" file: consumers.py desc: Implements WebSocket bindings for Django Channels. auth: Lukas Yelle (@lxy5611) Peter Zujko (pxz3370) """ import json import string from collections import namedtuple import petitions.views as views from asgiref.sync import async_to_sync from channels.generic.websocket import JsonWeb...
import os import subprocess import time from distutils import dir_util from ccmlib import common as ccmcommon from dtest import Tester, debug, create_ks, create_cf from tools.assertions import assert_all, assert_none, assert_one from tools.decorators import since # WARNING: sstableloader tests should be added to Te...
# -*- 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...
# 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...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
import ast import token import tokenize from os.path import islink from StringIO import StringIO from itertools import izip from dxr.build import unignored from dxr.filters import FILE, LINE from dxr.indexers import (Extent, FileToIndex as FileToIndexBase, iterable_per_line, Position, split_i...
#! /usr/bin/env python3 # SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2018, ARM Limited and contributors. # # 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/l...
# by amounra 0216 : http://www.aumhaa.com # written against Live 9.6 release on 021516 from __future__ import absolute_import, print_function import Live from ableton.v2.base import listens, forward_property, clamp, listenable_property, depends, task, liveobj_valid, liveobj_changed from ableton.v2.control_surface imp...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...