This file is indexed.

/usr/share/pyshared/guiqwt/tests/hist2d.py is in python-guiqwt 2.1.6-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 CEA
# Pierre Raybaut
# Licensed under the terms of the CECILL License
# (see guiqwt/__init__.py for details)

"""2-D Histogram test"""

SHOW = True # Show test in GUI-based test launcher

from numpy import random, array, dot, concatenate

from guiqwt.plot import ImageDialog
from guiqwt.builder import make
from guiqwt.config import _

def hist2d(X, Y):
    win = ImageDialog(edit=True, toolbar=True,
                      wintitle="2-D Histogram X0=(0,1), X1=(-1,-1)")
    hist2d = make.histogram2D(X, Y, 200, 200)
    curve = make.curve(X[::50], Y[::50],
                       linestyle='', marker='+', title=_("Markers"))
    plot = win.get_plot()
    plot.set_aspect_ratio(lock=False)
    plot.set_antialiasing(False)
    plot.add_item(hist2d)
    plot.add_item(curve)
    plot.set_item_visible(curve, False)
    win.show()
    win.exec_()

if __name__ == "__main__":
    import guidata
    _app = guidata.qapplication()
    N = 150000
    m = array([[ 1., .2], [-.2, 3.]])
    X1 = random.normal(0, .3, size=(N, 2))
    X2 = random.normal(0, .3, size=(N, 2))
    X = concatenate((X1+[0, 1.], dot(X2, m)+[-1, -1.])) 
    hist2d(X[:, 0], X[:, 1])