<commit_before>$blab.compute = ()->

    console.log "######## pre-code ########"

    for type of app.component
        for i of app.component[type]
            item = app.component[type][i]
            if item.isSource is "true"
                item.update()

    for sym of app.sheet
        app.sheet[sym].toLocal()

    console.log "######## user-code ########"

    # ??? eval app.file["user.coffee"] ???

    fn = (A, x) ->
        A.dot x
    
    b = fn(A, x)

    q = y*z[0][0]

    console.log "######## post-code ########"

    # local vars -> sheets
    for sym of app.sheet
        app.sheet[sym].fromLocal(eval(sym))

    # update sinks
    for c of app.component
        for i of app.component[c]
            item = app.component[c][i]
            item.update() # if item.isSink is "true"

class App

    # from dev.json
    #dev = $blab.resource "dev"
    #token: dev.token
    #gistId: dev.gistId
    
    constructor: ->
        
        #github = new Github
        #    token: @token
        #    auth: "oauth"

        github = new Github
            username: "anonymous"
            password: "<PASSWORD>"

        @gist = github.getGist(@gistId)
        
        $("#widget-menu").menu select: (event, ui) ->
            switch ui.item[0].innerHTML
                when "Read" then app.readGist()
                when "Save" then app.saveGist()

        @readGist()

    readGist: ->
        fn = (err, gist) =>
            @file = {}
            @file[gf] = gist.files[gf].content for gf of gist.files
            @build(err,gist)

        @gist.read(fn)

    build: (err,gist) ->

        # toolbox (of component types) 

        @toolbox={}
        types = JSON.parse(@file["toolbox.json"])
        @toolbox[t.id] = $blab[t.id] for t in types

        # (data) sheets
<commit_msg>Try public access to garyballantyne.<commit_after>$blab.compute = ()->

    console.log "######## pre-code ########"

    for type of app.component
        for i of app.component[type]
            item = app.component[type][i]
            if item.isSource is "true"
                item.update()

    for sym of app.sheet
        app.sheet[sym].toLocal()

    console.log "######## user-code ########"

    # ??? eval app.file["user.coffee"] ???

    fn = (A, x) ->
        A.dot x
    
    b = fn(A, x)

    q = y*z[0][0]

    console.log "######## post-code ########"

    # local vars -> sheets
    for sym of app.sheet
        app.sheet[sym].fromLocal(eval(sym))

    # update sinks
    for c of app.component
        for i of app.component[c]
            item = app.component[c][i]
            item.update() # if item.isSink is "true"

class App

    # from dev.json
    #dev = $blab.resource "dev"
    #token: dev.token
    #gistId: dev.gistId
    
    constructor: ->
        
        #github = new Github
        #    token: @token
        #    auth: "oauth"

        github = new Github
            username: "garyballantyne"

        @gist = github.getGist(@gistId)
        
        $("#widget-menu").menu select: (event, ui) ->
            switch ui.item[0].innerHTML
                when "Read" then app.readGist()
                when "Save" then app.saveGist()

        @readGist()

    readGist: ->
        fn = (err, gist) =>
            @file = {}
            @file[gf] = gist.files[gf].content for gf of gist.files
            @build(err,gist)

        @gist.read(fn)

    build: (err,gist) ->

        # toolbox (of component types) 

        @toolbox={}
        types = JSON.parse(@file["toolbox.json"])
        @toolbox[t.id] = $blab[t.id] for t in types

        # (data) sheets

{'fraction_non_alphanumeric': 0.1596009975062344, 'fraction_numerical': 0.0016625103906899418, 'mean_word_length': 1.6466275659824048, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 20, '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': '1290133', 'n_tokens_mistral': 1236, 'n_tokens_neox': 1168, 'n_words': 276}