<commit_before>#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = '<NAME>'

from gtk import gdk


class ScreenProperties(object):
    """
     Usefull to get basic screen informations
    """

    @classmethod
    def screen_dimension(cls):
        """
            Return a dic with the screen height and screen width
        """
        width = gdk.screen_width()
        height = gdk.screen_height()
        return {'width': width, 'height': height}<commit_msg>Use Xlib instead of gtk to get screen width and screen height This limit dependances<commit_after>#!/usr/bin/env python
# -*- coding:utf-8 -*-

__author__ = '<NAME>'


class ScreenProperties(object):
    """
     Usefull to get basic screen informations
    """

    @classmethod
    def screen_dimension(cls):
        """
            Return a dic with the screen height and screen width
        """
        from Xlib import display
        display = display.Display()
        root = display.screen().root
        desktop = root.get_geometry()

        return {'width': desktop.width, 'height': desktop.height}
{'fraction_non_alphanumeric': 0.11378353376503238, 'fraction_numerical': 0.0018501387604070306, 'mean_word_length': 2.490322580645161, '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': '310750', 'n_tokens_mistral': 301, 'n_tokens_neox': 290, 'n_words': 93}