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

set -e -o pipefail

[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh

if  [[ -z "$(type -t dart)" ]]; then
    travis_fold start install.dart
    echo INSTALLING Dart SDK and Dartium ...
    
    # URLs for sdk and dartium:
    # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip
    # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/dartium/dartium-macos-x64-release.zip

    DART_ARCHIVE=https://storage.googleapis.com/dart-archive/channels
    # VERS=stable/release/latest
    VERS=stable/release/1.18.1

    mkUrl() {
        local dir=$1
        local pkg=$2
        local arch=$3
        local zip=$pkg-$_OS_NAME-$arch-release.zip
        echo "$DART_ARCHIVE/$VERS/$dir/$zip";
    }

    getAndInstall() {
        local dir=$1
        local pkg=${2:-$dir};
        local arch=${3:-x64}
        local URL=$(mkUrl $dir $pkg $arch)
        local exitStatus=0;
        local zip=$(basename $URL)

        echo "Getting $pkg from:"
        echo "  $URL"
<commit_msg>chore(travis): use latest Dart SDK (#2320)<commit_after>#!/usr/bin/env bash

set -e -o pipefail

[[ -z "$NGIO_ENV_DEFS" ]] && . ./scripts/env-set.sh

if  [[ -z "$(type -t dart)" ]]; then
    travis_fold start install.dart
    echo INSTALLING Dart SDK and Dartium ...
    
    # URLs for sdk and dartium:
    # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip
    # https://storage.googleapis.com/dart-archive/channels/stable/release/latest/dartium/dartium-macos-x64-release.zip

    DART_ARCHIVE=https://storage.googleapis.com/dart-archive/channels
    VERS=stable/release/latest
    # VERS=stable/release/1.18.1 # If necessary, pin a specific version like this

    mkUrl() {
        local dir=$1
        local pkg=$2
        local arch=$3
        local zip=$pkg-$_OS_NAME-$arch-release.zip
        echo "$DART_ARCHIVE/$VERS/$dir/$zip";
    }

    getAndInstall() {
        local dir=$1
        local pkg=${2:-$dir};
        local arch=${3:-x64}
        local URL=$(mkUrl $dir $pkg $arch)
        local exitStatus=0;
        local zip=$(basename $URL)

        echo "Getting $pkg from:"
        echo "  $URL"

{'fraction_non_alphanumeric': 0.15030946065428824, 'fraction_numerical': 0.016799292661361626, 'mean_word_length': 2.4869029275808936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, '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': '5420423', 'n_tokens_mistral': 823, 'n_tokens_neox': 769, 'n_words': 149}