repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
pip | pip-main/tests/functional/test_new_resolver_errors.py | import pathlib
import sys
from tests.lib import (
PipTestEnvironment,
create_basic_wheel_for_package,
create_test_package_with_setup,
)
def test_new_resolver_conflict_requirements_file(
tmpdir: pathlib.Path, script: PipTestEnvironment
) -> None:
create_basic_wheel_for_package(script, "base", "1.0... | 3,755 | 27.240602 | 80 | py |
pip | pip-main/tests/functional/test_install_extras.py | import re
import textwrap
from os.path import join
import pytest
from tests.lib import PipTestEnvironment, ResolverVariant, TestData
@pytest.mark.network
def test_simple_extras_install_from_pypi(script: PipTestEnvironment) -> None:
"""
Test installing a package from PyPI using extras dependency Paste[openid... | 6,540 | 27.942478 | 87 | py |
pip | pip-main/tests/functional/test_download.py | import os
import re
import shutil
import textwrap
import uuid
from dataclasses import dataclass
from enum import Enum
from hashlib import sha256
from pathlib import Path
from textwrap import dedent
from typing import Callable, Dict, List, Optional, Tuple
import pytest
from pip._internal.cli.status_codes import ERROR
... | 47,397 | 27.760922 | 148 | py |
pip | pip-main/tests/functional/test_broken_stdout.py | import os
import subprocess
from pathlib import Path
from typing import List, Tuple
_BROKEN_STDOUT_RETURN_CODE = 120
def setup_broken_stdout_test(
args: List[str], deprecated_python: bool
) -> Tuple[str, int]:
proc = subprocess.Popen(
args,
stdout=subprocess.PIPE,
stderr=subprocess.PI... | 2,325 | 27.716049 | 87 | py |
pip | pip-main/tests/functional/test_install_upgrade.py | import itertools
import os
import sys
import textwrap
from pathlib import Path
import pytest
from tests.lib import (
PipTestEnvironment,
ResolverVariant,
TestData,
assert_all_changes,
pyversion, # noqa: F401
)
from tests.lib.local_repos import local_checkout
from tests.lib.wheel import make_wheel... | 14,212 | 32.600473 | 86 | py |
pip | pip-main/tests/functional/test_configuration.py | """Tests for the config command
"""
import re
import textwrap
from pip._internal.cli.status_codes import ERROR
from pip._internal.configuration import CONFIG_BASENAME, get_configuration_files
from tests.lib import PipTestEnvironment
from tests.lib.configuration_helpers import ConfigurationMixin, kinds
from tests.lib.v... | 6,015 | 39.106667 | 87 | py |
pip | pip-main/tests/functional/test_install_config.py | import os
import ssl
import sys
import tempfile
import textwrap
from pathlib import Path
from typing import Callable, List
import pytest
from tests.conftest import CertFactory, MockServer, ScriptFactory
from tests.lib import PipTestEnvironment, TestData
from tests.lib.server import (
authorization_response,
f... | 16,146 | 29.125 | 87 | py |
pip | pip-main/docs/pip_sphinxext.py | """pip sphinx extensions"""
import optparse
import pathlib
import re
import sys
from textwrap import dedent
from typing import Dict, Iterable, Iterator, List, Optional, Union
from docutils import nodes, statemachine
from docutils.parsers import rst
from docutils.statemachine import StringList, ViewList
from sphinx.ap... | 10,298 | 32.330097 | 87 | py |
pip | pip-main/docs/html/conf.py | """Sphinx configuration file for pip's documentation."""
import glob
import os
import pathlib
import re
import sys
from typing import List, Tuple
# Add the docs/ directory to sys.path, because pip_sphinxext.py is there.
docs_dir = os.path.dirname(os.path.dirname(__file__))
sys.path.insert(0, docs_dir)
# -- General c... | 4,760 | 33.007143 | 87 | py |
g-ssl-crf | g-ssl-crf-master/bin/indexer.py | #!/usr/bin/python
import sys, getopt
import operator
def main(argv):
labeledFile = ''
unlabeledFile = ''
devFile = ''
testFile = ''
seperator = ' '
try:
opts, args = getopt.getopt(argv,"hl:u:d:t:s:",["help", "labeled=", "unlabeled=", "dev=", "test=", "seperator="])
except geto... | 7,758 | 33.793722 | 120 | py |
g-ssl-crf | g-ssl-crf-master/bin/split.py | #!/usr/bin/python
import sys, getopt
from random import shuffle
def main(argv):
inputfile = ''
labeled = 0.0
unlabeled = 0.0
dev = 0.0
try:
opts, args = getopt.getopt(argv,"i:l:u:d:",["input=","labeled-ratio=","unlabeled-ratio=","dev-ratio="])
except getopt.GetoptError:
#print 'test.py -i <inputfile> -o <ou... | 2,217 | 24.204545 | 111 | py |
g-ssl-crf | g-ssl-crf-master/bin/crfutils.py | """
A miscellaneous utility for sequential labeling.
Copyright 2010,2011 Naoaki Okazaki.
"""
import optparse
import sys
def apply_templates(X, templates):
"""
Generate features for an item sequence by applying feature templates.
A feature template consists of a tuple of (name, offset) pairs,
where nam... | 6,173 | 33.3 | 83 | py |
g-ssl-crf | g-ssl-crf-master/bin/shuffle.py | #!/usr/bin/python
import sys, getopt
from random import shuffle
def main(argv):
inputfile = ''
labeled = 0.0
unlabeled = 0.0
dev = 0.0
try:
opts, args = getopt.getopt(argv,"i:l:u:d:",["input=","labeled-ratio=","unlabeled-ratio=","dev-ratio="])
except getopt.GetoptError:
#print 'test.py -i <inputfile> -o <ou... | 2,215 | 24.471264 | 111 | py |
g-ssl-crf | g-ssl-crf-master/bin/template.py | #!/usr/bin/env python
import re
import sys
class FeatureExtractor:
def __init__(self):
self.macro = re.compile(r'%x\[(?P<row>[\d-]+),(?P<col>[\d]+)\]')
self.inst = []
self.t = 0
self.templates = []
def read(self, fi):
self.templates = []
for line in fi:
... | 2,536 | 27.505618 | 78 | py |
g-ssl-crf | g-ssl-crf-master/bin/updatedicts.py | #!/usr/bin/python
import sys
ref_dict = sys.argv[1]
classes_dict = sys.argv[2]
prepositions_dict = sys.argv[3]
classes_output = ""
preps_output = ""
ref = dict()
with open(ref_dict) as r:
for l in r:
ref[l.split()[1].strip()] = l.split()[0].strip()
with open(classes_dict) as c:
for l in c:
... | 683 | 21.8 | 87 | py |
g-ssl-crf | g-ssl-crf-master/bin/reindexer.py | #!/usr/bin/python
import sys, getopt
def main(argv):
inputFile = ''
wordFile = ''
classFile = ''
labelFile = ''
outputFile = ''
seperator = ' ' #default is SPACE
wordDict = dict()
classDict = dict()
labelDict = dict()
try:
opts, args = getopt.getopt(argv,"hi:w... | 2,348 | 28.3625 | 141 | py |
g-ssl-crf | g-ssl-crf-master/bin/understanding.py | #!/usr/bin/env python
"""
A feature extractor for chunking.
Copyright 2010,2011 Naoaki Okazaki.
"""
# Separator of field values.
separator = ' '
# Field names of the input data.
fields = 'w c y'
# Attribute templates.
templates = (
(('c', 0), ),
(('c', 1), ),
(('c', 2), ),
)
import crfutils
de... | 713 | 20 | 72 | py |
g-ssl-crf | g-ssl-crf-master/bin/labelreindexer.py | #!/usr/bin/python
import sys, getopt
def main(argv):
inputFile = ''
labelFile = ''
outputFile = ''
labelDict = dict()
try:
opts, args = getopt.getopt(argv,"hi:l:o:",["help", "input=", "labeldict=", "output="])
except getopt.GetoptError:
print 'labelreindex... | 1,458 | 23.316667 | 94 | py |
g-ssl-crf | g-ssl-crf-master/bin/crf2nor.py | #!/usr/bin/python
import sys, getopt
def main(argv):
inputFile = ''
outputFile = ''
try:
opts, args = getopt.getopt(argv,"hi:o:",["help", "input=", "output="])
except getopt.GetoptError:
print 'crf2nor.py -i <inputfile> -o <outputfile>'
sys.exit(2)
for opt, a... | 1,208 | 25.866667 | 78 | py |
g-ssl-crf | g-ssl-crf-master/bin/labelInject.py | #!/usr/bin/python
"""
Injects the labels of the input file into the file with format of CRFSuite.
Note that the script assumes that all the sequences are of the same length in both files.
And it assumes that the CRFSuite file already has its own labels and it replaces them.
"""
import sys, getopt
def main(argv):
... | 1,489 | 28.8 | 93 | py |
g-ssl-crf | g-ssl-crf-master/bin/CRFSuiteAligned2TBLFormat.py | #!/usr/bin/python
import sys, getopt
def main(argv):
inputfile = ''
testfile = ''
outpred = ''
outref = ''
try:
opts, args = getopt.getopt(argv,"hi:t:p:r:",["help", "prediction=", "testfile=", "tblprediction=", "tblreference="])
except getopt.GetoptError:
print 'CRFSuiteA... | 2,331 | 33.294118 | 124 | py |
pyrebox | pyrebox-master/run.py | # -------------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/... | 10,480 | 39.157088 | 119 | py |
pyrebox | pyrebox-master/mw_monitor/dumper.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 15,473 | 41.745856 | 126 | py |
pyrebox | pyrebox-master/mw_monitor/api_tracer.py | # -------------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/... | 12,047 | 40.688581 | 112 | py |
pyrebox | pyrebox-master/mw_monitor/mw_monitor_logging.py | # -------------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/... | 8,754 | 42.341584 | 111 | py |
pyrebox | pyrebox-master/mw_monitor/mw_monitor.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 14,034 | 36.327128 | 122 | py |
pyrebox | pyrebox-master/mw_monitor/populate_db.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 3,615 | 42.047619 | 330 | py |
pyrebox | pyrebox-master/mw_monitor/DeviareDbParser.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 41,167 | 34.736111 | 125 | py |
pyrebox | pyrebox-master/mw_monitor/coverage.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 1,487 | 32.818182 | 75 | py |
pyrebox | pyrebox-master/mw_monitor/__init__.py | 0 | 0 | 0 | py | |
pyrebox | pyrebox-master/mw_monitor/interproc.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 42,577 | 37.884018 | 126 | py |
pyrebox | pyrebox-master/mw_monitor/mw_monitor_classes.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 43,892 | 36.741187 | 131 | py |
pyrebox | pyrebox-master/mw_monitor/third_party/msdn_parser/zynamics_msdn_crawler.py | # zynamics msdn-crawler (http://github.com/zynamics/msdn-crawler)
# Copyright (C) 2010
#
# 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) an... | 11,716 | 39.264605 | 152 | py |
pyrebox | pyrebox-master/mw_monitor/ida_scripts/mw_monitor_coverage.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 2,093 | 33.9 | 75 | py |
pyrebox | pyrebox-master/mw_monitor/ida_scripts/coverage_reader_32.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 1,673 | 29.436364 | 75 | py |
pyrebox | pyrebox-master/mw_monitor/ida_scripts/coverage_reader_64.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 1,677 | 29.509091 | 75 | py |
pyrebox | pyrebox-master/mw_monitor/ida_scripts/mw_monitor_binary_log_reader.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 1,419 | 32.023256 | 75 | py |
pyrebox | pyrebox-master/mw_monitor/ida_scripts/mw_monitor_ida_functions_rename.py | # -------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/or mod... | 24,943 | 37.553323 | 124 | py |
pyrebox | pyrebox-master/qemu/python/qemu/qtest.py | # QEMU qtest library
#
# Copyright (C) 2015 Red Hat Inc.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# Based on qmp.py.
#
import socket
import os
from . import QEMUMachine
class QEMUQtestProtoc... | 3,406 | 28.119658 | 79 | py |
pyrebox | pyrebox-master/qemu/python/qemu/qmp.py | # QEMU Monitor Protocol Python class
#
# Copyright (C) 2009, 2010 Red Hat Inc.
#
# Authors:
# Luiz Capitulino <lcapitulino@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
import json
import errno
import socket
import logging
class ... | 8,244 | 31.081712 | 79 | py |
pyrebox | pyrebox-master/qemu/python/qemu/__init__.py | # QEMU library
#
# Copyright (C) 2015-2016 Red Hat Inc.
# Copyright (C) 2012 IBM Corp.
#
# Authors:
# Fam Zheng <famz@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# Based on qmp.py.
#
import errno
import logging
import os
import... | 16,847 | 31.462428 | 80 | py |
pyrebox | pyrebox-master/qemu/scripts/simpletrace.py | #!/usr/bin/env python
#
# Pretty-printer for simple trace backend binary trace files
#
# Copyright IBM, Corp. 2010
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# For help see docs/devel/tracing.txt
from __future__ import print_function
impor... | 8,609 | 31.737643 | 114 | py |
pyrebox | pyrebox-master/qemu/scripts/analyze-migration.py | #!/usr/bin/env python
#
# Migration Stream Analyzer
#
# Copyright (c) 2015 Alexander Graf <agraf@suse.de>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the Lic... | 20,791 | 32.80813 | 122 | py |
pyrebox | pyrebox-master/qemu/scripts/analyse-locks-simpletrace.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Analyse lock events and compute statistics
#
# Author: Alex Bennée <alex.bennee@linaro.org>
#
from __future__ import print_function
import simpletrace
import argparse
import numpy as np
class MutexAnalyser(simpletrace.Analyzer):
"A simpletrace Analyser for checkin... | 3,580 | 34.81 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi-gen.py | #!/usr/bin/env python
# QAPI generator
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
from __future__ import print_function
import argparse
import re
import sys
from qapi.common import QAPIError, QAPISchema
from qapi.types import gen_typ... | 2,101 | 35.241379 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/signrom.py | from __future__ import print_function
#
# Option ROM signing utility
#
# Authors:
# Jan Kiszka <jan.kiszka@siemens.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
import sys
import struct
if len(sys.argv) < 3:
print('usage: sig... | 1,451 | 23.610169 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Command-line wrapper for the tracetool machinery.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintai... | 4,522 | 28.562092 | 81 | py |
pyrebox | pyrebox-master/qemu/scripts/dump-guest-memory.py | """
This python script adds a new gdb command, "dump-guest-memory". It
should be loaded with "source dump-guest-memory.py" at the (gdb)
prompt.
Copyright (C) 2013, Red Hat, Inc.
Authors:
Laszlo Ersek <lersek@redhat.com>
Janosch Frank <frankja@linux.vnet.ibm.com>
This work is licensed under the terms of the GNU... | 20,765 | 33.61 | 86 | py |
pyrebox | pyrebox-master/qemu/scripts/render_block_graph.py | #!/usr/bin/env python
#
# Render Qemu Block Graph
#
# Copyright (c) 2018 Virtuozzo International GmbH. All rights reserved.
#
# 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 ... | 3,782 | 29.756098 | 72 | py |
pyrebox | pyrebox-master/qemu/scripts/analyse-9p-simpletrace.py | #!/usr/bin/env python
# Pretty print 9p simpletrace log
# Usage: ./analyse-9p-simpletrace <trace-events> <trace-pid>
#
# Author: Harsh Prateek Bora
from __future__ import print_function
import os
import simpletrace
symbol_9p = {
6 : 'TLERROR',
7 : 'RLERROR',
8 : 'TSTATFS',
9 : 'RSTATFS',
12... | 9,140 | 41.516279 | 142 | py |
pyrebox | pyrebox-master/qemu/scripts/replay-dump.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Dump the contents of a recorded execution stream
#
# Copyright (c) 2017 Alex Bennée <alex.bennee@linaro.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Fre... | 12,154 | 38.209677 | 80 | py |
pyrebox | pyrebox-master/qemu/scripts/decodetree.py | #!/usr/bin/env python
# Copyright (c) 2018 Linaro Limited
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# T... | 31,059 | 27.919926 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/qemu-gdb.py | #!/usr/bin/python
# GDB debugging support
#
# Copyright 2012 Red Hat, Inc. and/or its affiliates
#
# Authors:
# Avi Kivity <avi@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
# Usage:
# At the (gdb) prompt, type "source sc... | 1,207 | 24.702128 | 73 | py |
pyrebox | pyrebox-master/qemu/scripts/minikconf.py | #
# Mini-Kconfig parser
#
# Copyright (c) 2015 Red Hat Inc.
#
# Authors:
# Paolo Bonzini <pbonzini@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2
# or, at your option, any later version. See the COPYING file in
# the top-level directory.
from __future__ import print_function
import o... | 23,525 | 32.181946 | 94 | py |
pyrebox | pyrebox-master/qemu/scripts/vmstate-static-checker.py | #!/usr/bin/python
#
# Compares vmstate information stored in JSON format, obtained from
# the -dump-vmstate QEMU command.
#
# Copyright 2014 Amit Shah <amit.shah@redhat.com>
# Copyright 2014 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Pu... | 16,066 | 36.19213 | 418 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/mtree.py | #!/usr/bin/python
# GDB debugging support
#
# Copyright 2012 Red Hat, Inc. and/or its affiliates
#
# Authors:
# Avi Kivity <avi@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
# 'qemu mtree' -- display the memory hierarchy
... | 2,759 | 30.363636 | 69 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/tcg.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# GDB debugging support, TCG status
#
# Copyright 2016 Linaro Ltd
#
# Authors:
# Alex Bennée <alex.bennee@linaro.org>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
# 'qemu tcg-lock-status' -... | 1,486 | 32.795455 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/timers.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GDB debugging support
#
# Copyright 2017 Linaro Ltd
#
# Author: Alex Bennée <alex.bennee@linaro.org>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
#
# SPDX-License-Identifier: GPL-2.0-or-later
... | 1,867 | 31.206897 | 75 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/__init__.py | #!/usr/bin/python
# GDB debugging support
#
# Copyright (c) 2015 Linaro Ltd
#
# 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 ve... | 914 | 30.551724 | 70 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/coroutine.py | #!/usr/bin/python
# GDB debugging support
#
# Copyright 2012 Red Hat, Inc. and/or its affiliates
#
# Authors:
# Avi Kivity <avi@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2
# or later. See the COPYING file in the top-level directory.
import gdb
VOID_PTR = gdb.lookup_type('void').... | 3,531 | 29.188034 | 132 | py |
pyrebox | pyrebox-master/qemu/scripts/qemugdb/aio.py | #!/usr/bin/python
# GDB debugging support: aio/iohandler debug
#
# Copyright (c) 2015 Red Hat, Inc.
#
# Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or
# later. See the COPYING file in the top-level directory.
#
import gdb
from qemugdb impor... | 1,860 | 30.542373 | 93 | py |
pyrebox | pyrebox-master/qemu/scripts/modules/module_block.py | #!/usr/bin/python
#
# Module information generator
#
# Copyright Red Hat, Inc. 2015 - 2016
#
# Authors:
# Marc Mari <markmb@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.
# See the COPYING file in the top-level directory.
from __future__ import print_function
import sys
import os
de... | 2,731 | 25.784314 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/vcpu.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generic management for the 'vcpu' property.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2016, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "S... | 2,087 | 28.408451 | 77 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/transform.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Type-transformation rules.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnocz... | 4,293 | 24.408284 | 106 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Machinery for generating tracing-related intermediate files.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"... | 14,361 | 29.363636 | 91 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/dtrace.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
DTrace/SystemTAP backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi... | 1,463 | 21.875 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/simple.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple built-in backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"... | 3,136 | 26.761062 | 103 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/log.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Stderr built-in backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"... | 1,519 | 26.636364 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/ftrace.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Ftrace built-in backend.
"""
__author__ = "Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>"
__copyright__ = "Copyright (C) 2013 Hitachi, Ltd."
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"
__email__ ... | 1,493 | 27.188679 | 80 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/ust.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
LTTng User Space Tracing backend.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan ... | 1,210 | 22.745098 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Backend management.
Creating new backends
---------------------
A new backend named 'foo-bar' corresponds to Python module
'tracetool/backend/foo_bar.py'.
A backend module should provide a docstring, whose first non-empty line will be
considered its short descripti... | 4,118 | 31.433071 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/backend/syslog.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Syslog built-in backend.
"""
__author__ = "Paul Durrant <paul.durrant@citrix.com>"
__copyright__ = "Copyright 2016, Citrix Systems Inc."
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"
__email__ = "s... | 1,197 | 22.96 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/d.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
trace/generated-tracers.dtrace (DTrace only).
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer_... | 1,764 | 28.416667 | 77 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/tcg_helper_wrapper_h.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate trace/generated-helpers-wrappers.h.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__... | 2,165 | 29.083333 | 85 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/simpletrace_stap.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate .stp file that outputs simpletrace binary traces (DTrace with SystemTAP only).
"""
__author__ = "Stefan Hajnoczi <redhat.com>"
__copyright__ = "Copyright (C) 2014, Red Hat, Inc."
__license__ = "GPL version 2 or (at your option) any later version"
__m... | 2,489 | 32.648649 | 99 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/ust_events_h.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
trace/generated-ust-provider.h
"""
__author__ = "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
__copyright__ = "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan ... | 3,736 | 33.601852 | 86 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/stap.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate .stp file (DTrace with SystemTAP only).
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintain... | 1,673 | 26 | 86 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/tcg_helper_c.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate trace/generated-helpers.c.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefa... | 2,448 | 28.865854 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/tcg_h.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate .h file for TCG code generation.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = ... | 2,769 | 31.588235 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/log_stap.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate .stp file that printfs log messages (DTrace with SystemTAP only).
"""
__author__ = "Daniel P. Berrange <berrange@redhat.com>"
__copyright__ = "Copyright (C) 2014-2019, Red Hat, Inc."
__license__ = "GPL version 2 or (at your option) any later version"
... | 3,805 | 28.734375 | 78 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/tcg_helper_h.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Generate trace/generated-helpers.h.
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2016, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefa... | 1,363 | 26.28 | 84 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Format management.
Creating new formats
--------------------
A new format named 'foo-bar' corresponds to Python module
'tracetool/format/foo_bar.py'.
A format module should provide a docstring, whose first non-empty line will be
considered its short description.
A... | 2,422 | 27.174419 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/c.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
trace/generated-tracers.c
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi... | 2,078 | 26.355263 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/h.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
trace/generated-tracers.h
"""
__author__ = "Lluís Vilanova <vilanova@ac.upc.edu>"
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <vilanova@ac.upc.edu>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi... | 2,862 | 27.346535 | 76 | py |
pyrebox | pyrebox-master/qemu/scripts/tracetool/format/ust_events_c.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
trace/generated-ust.c
"""
__author__ = "Mohamad Gebai <mohamad.gebai@polymtl.ca>"
__copyright__ = "Copyright 2012, Mohamad Gebai <mohamad.gebai@polymtl.ca>"
__license__ = "GPL version 2 or (at your option) any later version"
__maintainer__ = "Stefan Hajnoczi"... | 990 | 26.527778 | 96 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/events.py | """
QAPI event generator
Copyright (c) 2014 Wenchao Xia
Copyright (c) 2015-2018 Red Hat Inc.
Authors:
Wenchao Xia <wenchaoqemu@gmail.com>
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file in the top-level directory.
"""
from qapi.common imp... | 6,070 | 28.614634 | 78 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/doc.py | #!/usr/bin/env python
# QAPI texi generator
#
# This work is licensed under the terms of the GNU LGPL, version 2+.
# See the COPYING file in the top-level directory.
"""This script produces the documentation of a qapi schema in texinfo format"""
from __future__ import print_function
import re
import qapi.common
MSG_F... | 9,154 | 31.349823 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/visit.py | """
QAPI visitor generator
Copyright IBM, Corp. 2011
Copyright (C) 2014-2018 Red Hat, Inc.
Authors:
Anthony Liguori <aliguori@us.ibm.com>
Michael Roth <mdroth@linux.vnet.ibm.com>
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file in the t... | 9,674 | 26.330508 | 88 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/commands.py | """
QAPI command marshaller generator
Copyright IBM, Corp. 2011
Copyright (C) 2014-2018 Red Hat, Inc.
Authors:
Anthony Liguori <aliguori@us.ibm.com>
Michael Roth <mdroth@linux.vnet.ibm.com>
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file ... | 7,910 | 24.852941 | 93 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/types.py | """
QAPI types generator
Copyright IBM, Corp. 2011
Copyright (c) 2013-2018 Red Hat Inc.
Authors:
Anthony Liguori <aliguori@us.ibm.com>
Michael Roth <mdroth@linux.vnet.ibm.com>
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
# See the COPYING file in the top-l... | 7,242 | 26.965251 | 77 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/common.py | #
# QAPI helper library
#
# Copyright IBM, Corp. 2011
# Copyright (c) 2013-2018 Red Hat Inc.
#
# Authors:
# Anthony Liguori <aliguori@us.ibm.com>
# Markus Armbruster <armbru@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2.
# See the COPYING file in the top-level directory.
from __futu... | 84,446 | 34.025715 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/introspect.py | """
QAPI introspection generator
Copyright (C) 2015-2018 Red Hat, Inc.
Authors:
Markus Armbruster <armbru@redhat.com>
This work is licensed under the terms of the GNU GPL, version 2.
See the COPYING file in the top-level directory.
"""
from qapi.common import *
def to_qlit(obj, level=0, suppress_first_indent=Fal... | 7,907 | 34.303571 | 79 | py |
pyrebox | pyrebox-master/qemu/scripts/qapi/__init__.py | 0 | 0 | 0 | py | |
pyrebox | pyrebox-master/qemu/tests/qemu-iotests/nbd-fault-injector.py | #!/usr/bin/env python
# NBD server - fault injection utility
#
# Configuration file syntax:
# [inject-error "disconnect-neg1"]
# event=neg1
# io=readwrite
# when=before
#
# Note that Python's ConfigParser squashes together all sections with the same
# name, so give each [inject-error] a unique name.
#
# inject-... | 8,715 | 30.810219 | 106 | py |
pyrebox | pyrebox-master/qemu/tests/qemu-iotests/qcow2.py | #!/usr/bin/env python
from __future__ import print_function
import sys
import struct
import string
class QcowHeaderExtension:
def __init__(self, magic, length, data):
if length % 8 != 0:
padding = 8 - (length % 8)
data += b"\0" * padding
self.magic = magic
self.l... | 7,769 | 27.884758 | 103 | py |
pyrebox | pyrebox-master/qemu/tests/qemu-iotests/qed.py | #!/usr/bin/env python
#
# Tool to manipulate QED image files
#
# Copyright (C) 2010 IBM, Corp.
#
# Authors:
# Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
from __future__ import print_func... | 7,247 | 29.582278 | 103 | py |
pyrebox | pyrebox-master/qemu/tests/qemu-iotests/iotests.py | from __future__ import print_function
# Common utilities and Python wrappers for qemu-iotests
#
# Copyright (C) 2012 IBM Corp.
#
# 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 ... | 30,243 | 34.665094 | 119 | py |
pyrebox | pyrebox-master/qemu/tests/qapi-schema/test-qapi.py | #
# QAPI parser test harness
#
# Copyright (c) 2013 Red Hat Inc.
#
# Authors:
# Markus Armbruster <armbru@redhat.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
#
from __future__ import print_function
import sys
from qapi.common imp... | 3,317 | 31.213592 | 77 | py |
pyrebox | pyrebox-master/qemu/tests/guest-debug/test-gdbstub.py | from __future__ import print_function
#
# This script needs to be run on startup
# qemu -kernel ${KERNEL} -s -S
# and then:
# gdb ${KERNEL}.vmlinux -x ${QEMU_SRC}/tests/guest-debug/test-gdbstub.py
import gdb
failcount = 0
def report(cond, msg):
"Report success/fail of test"
if cond:
print ("PASS: %s... | 4,647 | 24.96648 | 73 | py |
pyrebox | pyrebox-master/qemu/tests/migration/guestperf-plot.py | #!/usr/bin/python
#
# Migration test graph plotting command
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (a... | 861 | 30.925926 | 78 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.