<commit_before>#!/usr/bin/env python

'''Display an image.

Usage::

    display.py <filename>

A checkerboard background is visible behind any transparent areas of the
image.
'''

import sys

from pyglet.gl import *
from pyglet import window
from pyglet import image

if __name__ == '__main__':
    if len(sys.argv) != 1:
        print __doc__
        sys.exit(1)

    filename = sys.argv[1]

    w = window.Window(visible=False, resizable=True)
    img = image.load(filename).texture

    checks = image.create(32, 32, image.CheckerImagePattern())
    background = image.TileableTexture.create_for_image(checks)<commit_msg>Fix argument handling.<commit_after>#!/usr/bin/env python

'''Display an image.

Usage::

    display.py <filename>

A checkerboard background is visible behind any transparent areas of the
image.
'''

import sys

from pyglet.gl import *
from pyglet import window
from pyglet import image

if __name__ == '__main__':
    if len(sys.argv) != 2:
        print __doc__
        sys.exit(1)

    filename = sys.argv[1]

    w = window.Window(visible=False, resizable=True)
    img = image.load(filename).texture

    checks = image.create(32, 32, image.CheckerImagePattern())
    background = image.TileableTexture.create_for_image(checks)
{'fraction_non_alphanumeric': 0.10722795869737888, 'fraction_numerical': 0.011119936457505957, 'mean_word_length': 3.6323529411764706, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5416639', 'n_tokens_mistral': 413, 'n_tokens_neox': 393, 'n_words': 111}