<commit_before>// The MIT License (MIT)
//
// Copyright (c) 2017 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import Console

public final class Update: Command {
    public let id = "update"

    public let signature: [Argument] = [
        Option(name: "self", short: "s", help: [
            "Updates Ether"
        ])
    ]

    public let help: [String] = [
        "Updates your dependencies."
    ]

    public let console: ConsoleProtocol

    public init(console: ConsoleProtocol) {
        self.console = console
    }

    public func run(arguments: [String]) throws {
        if let _ = arguments.option("self") {
            let updateBar = console.loadingBar(title: "Updating Ether")
            updateBar.start()
            _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "curl https://raw.githubusercontent.com/calebkleveter/Ether/master/install.sh | bash"])
            updateBar.finish()
            self.printEtherArt()
        } else {
            console.output("This may take some time...", style: .info, newLine: true)
            
            let updateBar = console.loadingBar(title: "Updating Packages")
            updateBar.start()
            _ = try console.backgroundExecute(program: "rm", arguments: ["-rf", ".build"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["package", "--enable-prefetching", "update"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["package", "--enable-prefetching", "resolve"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["build", "--enable-prefetching"])
            updateBar.finish()
        }
    }

    private func printEtherArt() {
        let etherArt = """
          | • |
          | • |
          | • |
         /     \\
        /       \\
        """

        let characterColors: [Character: ConsoleColor] = [
            "/": .cyan,
            "=": .cyan,
            "_": .cyan,
            "|": .cyan,
            "\\": .cyan,
            "~": .green,
            "•": .green
        ]

        for character in console.center(etherArt) {
            let style: ConsoleStyle

            if let color = characterColors[character] {
                style = .custom(color)
            } else {
                style = .plain
            }

            console.output("\(character)", style: style, newLine: false)
        }

        console.print()
        console.print()
        console.output(console.center("Thanks for Updating Ether!"), style: .plain, newLine: true)
    }

}
<commit_msg>Removed blue coloring from flask in logo<commit_after>// The MIT License (MIT)
//
// Copyright (c) 2017 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import Console

public final class Update: Command {
    public let id = "update"

    public let signature: [Argument] = [
        Option(name: "self", short: "s", help: [
            "Updates Ether"
        ])
    ]

    public let help: [String] = [
        "Updates your dependencies."
    ]

    public let console: ConsoleProtocol

    public init(console: ConsoleProtocol) {
        self.console = console
    }

    public func run(arguments: [String]) throws {
        if let _ = arguments.option("self") {
            let updateBar = console.loadingBar(title: "Updating Ether")
            updateBar.start()
            _ = try console.backgroundExecute(program: "/bin/sh", arguments: ["-c", "curl https://raw.githubusercontent.com/calebkleveter/Ether/master/install.sh | bash"])
            updateBar.finish()
            self.printEtherArt()
        } else {
            console.output("This may take some time...", style: .info, newLine: true)
            
            let updateBar = console.loadingBar(title: "Updating Packages")
            updateBar.start()
            _ = try console.backgroundExecute(program: "rm", arguments: ["-rf", ".build"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["package", "--enable-prefetching", "update"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["package", "--enable-prefetching", "resolve"])
            _ = try console.backgroundExecute(program: "swift", arguments: ["build", "--enable-prefetching"])
            updateBar.finish()
        }
    }

    private func printEtherArt() {
        let etherArt = """
          | • |
          | • |
          | • |
         /     \\
        /       \\
        """

        let characterColors: [Character: ConsoleColor] = [
            "•": .green
        ]

        for character in console.center(etherArt) {
            let style: ConsoleStyle

            if let color = characterColors[character] {
                style = .custom(color)
            } else {
                style = .plain
            }

            console.output("\(character)", style: style, newLine: false)
        }

        console.print()
        console.print()
        console.output(console.center("Thanks for Updating Ether!"), style: .plain, newLine: true)
    }

}

{'fraction_non_alphanumeric': 0.11374806909141974, 'fraction_numerical': 0.0011234377194214297, 'mean_word_length': 2.2639780018331805, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '1749816', 'n_tokens_mistral': 1883, 'n_tokens_neox': 1795, 'n_words': 654}