<commit_before>#!/usr/bin/python
import appindicator
import gtk
import gtk.glade
import gconf
import sys
import pexpect
from os import path

VERSION = "1.0.0"


class Fluxgui:

    def __init__(self):
        self.indicator = Indicator(self)
        self.settings = Settings(self)

        if self.settings.latitude is "" and self.settings.zipcode is "":
            self.open_preferences("activate")

        self.start_xflux(self.settings.latitude, self.settings.zipcode)

    def start_xflux(self, latitude, zipcode):
        command = "-z"
        value = zipcode

        if self.settings.latitude:
            command = "-l"
            value = latitude

        args = [command, value, '-nofork']
        self.xflux = pexpect.spawn("xflux", args)

    def stop_xflux(self, item):
        self.indicator.item_turn_off.hide()
        self.indicator.item_turn_on.show()

        self.xflux.terminate(force=True)

    def restart_xflux(self, item):
        self.stop_xflux("activate")
<commit_msg>logfile test<commit_after>#!/usr/bin/python
import appindicator
import gtk
import gtk.glade
import gconf
import sys
import pexpect
from os import path

VERSION = "1.0.0"


class Fluxgui:

    def __init__(self):
        self.indicator = Indicator(self)
        self.settings = Settings(self)

        if self.settings.latitude is "" and self.settings.zipcode is "":
            self.open_preferences("activate")

        self.start_xflux(self.settings.latitude, self.settings.zipcode)

    def start_xflux(self, latitude, zipcode):
        command = "-z"
        value = zipcode

        if self.settings.latitude:
            command = "-l"
            value = latitude

        args = [command, value, '-nofork']
        self.xflux = pexpect.spawn("xflux", args)
        self.xflux.logfile = None

    def stop_xflux(self, item):
        self.indicator.item_turn_off.hide()
        self.indicator.item_turn_on.show()

        self.xflux.terminate(force=True)

    def restart_xflux(self, item):
        self.stop_xflux("activate")

{'fraction_non_alphanumeric': 0.10969011313330054, 'fraction_numerical': 0.002951303492375799, 'mean_word_length': 2.537391304347826, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '6502532', 'n_tokens_mistral': 681, 'n_tokens_neox': 641, 'n_words': 137}