add canonical permacomputer preamble to all source files
This commit is contained in:
parent
2e787cb9e4
commit
57fa1008ee
124 changed files with 1965 additions and 572 deletions
|
|
@ -1,21 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
#
|
#
|
||||||
# unsandbox.com Bash SDK (Synchronous)
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
# Full API with execution, sessions, services, snapshots, and images.
|
# four values:
|
||||||
#
|
#
|
||||||
# Library Usage:
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
# source un.sh
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
# result=$(execute "python" "print(42)")
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
# echo "$result" | jq -r '.stdout'
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
#
|
#
|
||||||
# CLI Usage:
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
# bash un.sh script.py
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
# bash un.sh -s python 'print(42)'
|
|
||||||
# bash un.sh session --list
|
|
||||||
# bash un.sh service --list
|
|
||||||
#
|
|
||||||
# Copyright 2025 TimeHexOn & foxhop & russell@unturf
|
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Unit Tests for un.sh Library Functions
|
# Unit Tests for un.sh Library Functions
|
||||||
#
|
#
|
||||||
# Tests the ACTUAL exported functions from Un module.
|
# Tests the ACTUAL exported functions from Un module.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Test suite for COBOL Unsandbox SDK
|
# Test suite for COBOL Unsandbox SDK
|
||||||
# Run: bash tests/test_un.sh
|
# Run: bash tests/test_un.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,39 +1,19 @@
|
||||||
#!/usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
# PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
#
|
#
|
||||||
# This is free public domain software for the public good of a permacomputer hosted
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
# at permacomputer.com - an always-on computer by the people, for the people. One
|
# four values:
|
||||||
# which is durable, easy to repair, and distributed like tap water for machine
|
|
||||||
# learning intelligence.
|
|
||||||
#
|
#
|
||||||
# The permacomputer is community-owned infrastructure optimized around four values:
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
#
|
#
|
||||||
# TRUTH - First principles, math & science, open source code freely distributed
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
# FREEDOM - Voluntary partnerships, freedom from tyranny & corporate control
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
# HARMONY - Minimal waste, self-renewing systems with diverse thriving connections
|
|
||||||
# LOVE - Be yourself without hurting others, cooperation through natural law
|
|
||||||
#
|
|
||||||
# This software contributes to that vision by enabling code execution across 42+
|
|
||||||
# programming languages through a unified interface, accessible to all. Code is
|
|
||||||
# seeds to sprout on any abandoned technology.
|
|
||||||
#
|
|
||||||
# Learn more: https://www.permacomputer.com
|
|
||||||
#
|
|
||||||
# Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
|
|
||||||
# software, either in source code form or as a compiled binary, for any purpose,
|
|
||||||
# commercial or non-commercial, and by any means.
|
|
||||||
#
|
|
||||||
# NO WARRANTY. THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
|
|
||||||
#
|
|
||||||
# That said, our permacomputer's digital membrane stratum continuously runs unit,
|
|
||||||
# integration, and functional tests on all of it's own software - with our
|
|
||||||
# permacomputer monitoring itself, repairing itself, with minimal human in the
|
|
||||||
# loop guidance. Our agents do their best.
|
|
||||||
#
|
|
||||||
# Copyright 2025 TimeHexOn & foxhop & russell@unturf
|
|
||||||
# https://www.timehexon.com
|
|
||||||
# https://www.foxhop.net
|
|
||||||
# https://www.unturf.com/software
|
|
||||||
|
|
||||||
# un.ex - Unsandbox CLI client in Elixir
|
# un.ex - Unsandbox CLI client in Elixir
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
|
|
||||||
# Functional Tests for Un Elixir SDK
|
# Functional Tests for Un Elixir SDK
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env elixir
|
#!/usr/bin/env elixir
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
|
|
||||||
# Tests for Un Elixir SDK
|
# Tests for Un Elixir SDK
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Test suite for Fortran Unsandbox SDK
|
# Test suite for Fortran Unsandbox SDK
|
||||||
# Run: bash tests/test_un.sh
|
# Run: bash tests/test_un.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Async Job Polling example - standalone version
|
Async Job Polling example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Concurrent Execution example - standalone version
|
Concurrent Execution example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Hello World example - standalone version
|
Hello World example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,90 +1,18 @@
|
||||||
/*
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
unsandbox.com Go SDK (Asynchronous)
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
Library Usage:
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
import "un_async"
|
// four values:
|
||||||
|
//
|
||||||
// Create credentials
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
creds, err := un_async.ResolveCredentials("", "")
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
if err != nil {
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
log.Fatal(err)
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
}
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
// Execute code asynchronously (returns channel)
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
resultChan := un_async.ExecuteCode(creds, "python", `print("hello")`)
|
|
||||||
result := <-resultChan
|
|
||||||
if result.Err != nil {
|
|
||||||
log.Fatal(result.Err)
|
|
||||||
}
|
|
||||||
fmt.Println(result.Data)
|
|
||||||
|
|
||||||
// Submit async job and get job ID
|
|
||||||
jobChan := un_async.ExecuteAsync(creds, "javascript", `console.log("hello")`)
|
|
||||||
jobResult := <-jobChan
|
|
||||||
if jobResult.Err != nil {
|
|
||||||
log.Fatal(jobResult.Err)
|
|
||||||
}
|
|
||||||
fmt.Println(jobResult.JobID)
|
|
||||||
|
|
||||||
// Wait for job completion with timeout
|
|
||||||
waitChan := un_async.WaitForJob(creds, jobResult.JobID, 60*time.Second)
|
|
||||||
waitResult := <-waitChan
|
|
||||||
if waitResult.Err != nil {
|
|
||||||
log.Fatal(waitResult.Err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// List all jobs
|
|
||||||
listChan := un_async.ListJobs(creds)
|
|
||||||
listResult := <-listChan
|
|
||||||
if listResult.Err == nil {
|
|
||||||
for _, job := range listResult.Jobs {
|
|
||||||
fmt.Println(job)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get supported languages (cached)
|
|
||||||
langChan := un_async.GetLanguages(creds)
|
|
||||||
langResult := <-langChan
|
|
||||||
if langResult.Err == nil {
|
|
||||||
for _, lang := range langResult.Languages {
|
|
||||||
fmt.Println(lang)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Detect language from filename (synchronous, no I/O)
|
|
||||||
lang := un_async.DetectLanguage("script.py") // Returns "python"
|
|
||||||
|
|
||||||
// Snapshot operations
|
|
||||||
snapChan := un_async.SessionSnapshot(creds, sessionID, "my_snapshot", false)
|
|
||||||
snapResult := <-snapChan
|
|
||||||
|
|
||||||
Authentication Priority (4-tier):
|
|
||||||
1. Function arguments (creds struct with PublicKey, SecretKey)
|
|
||||||
2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY)
|
|
||||||
3. Config file (~/.unsandbox/accounts.csv, line 0 by default)
|
|
||||||
4. Local directory (./accounts.csv, line 0 by default)
|
|
||||||
|
|
||||||
Format: public_key,secret_key (one per line)
|
|
||||||
Account selection: UNSANDBOX_ACCOUNT=N env var (0-based index)
|
|
||||||
|
|
||||||
Request Authentication (HMAC-SHA256):
|
|
||||||
Authorization: Bearer <public_key> (identifies account)
|
|
||||||
X-Timestamp: <unix_seconds> (replay prevention)
|
|
||||||
X-Signature: HMAC-SHA256(secret_key, msg) (proves secret + body integrity)
|
|
||||||
|
|
||||||
Message format: "timestamp:METHOD:path:body"
|
|
||||||
- timestamp: seconds since epoch
|
|
||||||
- METHOD: GET, POST, DELETE, etc. (uppercase)
|
|
||||||
- path: e.g., "/execute", "/jobs/123"
|
|
||||||
- body: JSON payload (empty string for GET/DELETE)
|
|
||||||
|
|
||||||
Languages Cache:
|
|
||||||
- Cached in ~/.unsandbox/languages.json
|
|
||||||
- TTL: 1 hour
|
|
||||||
- Updated on successful API calls
|
|
||||||
*/
|
|
||||||
|
|
||||||
package un_async
|
package un_async
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Tests for the unsandbox Go SDK (Asynchronous)
|
Tests for the unsandbox Go SDK (Asynchronous)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,18 @@
|
||||||
/*
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
unsandbox.com Go SDK (Synchronous)
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
Library Usage:
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
import "un"
|
// four values:
|
||||||
|
//
|
||||||
// Create credentials
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
creds, err := un.ResolveCredentials("", "")
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
if err != nil {
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
log.Fatal(err)
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
}
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
// Execute code synchronously
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
result, err := un.ExecuteCode(creds, "python", `print("hello")`)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Execute asynchronously
|
|
||||||
jobID, err := un.ExecuteAsync(creds, "javascript", `console.log("hello")`)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for job completion with exponential backoff
|
|
||||||
result, err := un.WaitForJob(creds, jobID)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// List all jobs
|
|
||||||
jobs, err := un.ListJobs(creds)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get supported languages
|
|
||||||
languages, err := un.GetLanguages(creds)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Detect language from filename
|
|
||||||
lang := un.DetectLanguage("script.py") // Returns "python"
|
|
||||||
|
|
||||||
// Snapshot operations (NEW)
|
|
||||||
snapshotID, err := un.SessionSnapshot(creds, sessionID, "my_snapshot", false)
|
|
||||||
snapshots, err := un.ListSnapshots(creds)
|
|
||||||
result, err := un.RestoreSnapshot(creds, snapshotID)
|
|
||||||
err = un.DeleteSnapshot(creds, snapshotID)
|
|
||||||
|
|
||||||
Authentication Priority (4-tier):
|
|
||||||
1. Function arguments (publicKey, secretKey)
|
|
||||||
2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY)
|
|
||||||
3. Config file (~/.unsandbox/accounts.csv, line 0 by default)
|
|
||||||
4. Local directory (./accounts.csv, line 0 by default)
|
|
||||||
|
|
||||||
Format: public_key,secret_key (one per line)
|
|
||||||
Account selection: UNSANDBOX_ACCOUNT=N env var (0-based index)
|
|
||||||
|
|
||||||
Request Authentication (HMAC-SHA256):
|
|
||||||
Authorization: Bearer <public_key> (identifies account)
|
|
||||||
X-Timestamp: <unix_seconds> (replay prevention)
|
|
||||||
X-Signature: HMAC-SHA256(secret_key, msg) (proves secret + body integrity)
|
|
||||||
|
|
||||||
Message format: "timestamp:METHOD:path:body"
|
|
||||||
- timestamp: seconds since epoch
|
|
||||||
- METHOD: GET, POST, DELETE, etc. (uppercase)
|
|
||||||
- path: e.g., "/execute", "/jobs/123"
|
|
||||||
- body: JSON payload (empty string for GET/DELETE)
|
|
||||||
|
|
||||||
Languages Cache:
|
|
||||||
- Cached in ~/.unsandbox/languages.json
|
|
||||||
- TTL: 1 hour
|
|
||||||
- Updated on successful API calls
|
|
||||||
*/
|
|
||||||
|
|
||||||
package un
|
package un
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
// Tests for the Go unsandbox SDK
|
// Tests for the Go unsandbox SDK
|
||||||
// Run with: go test -v ./tests/
|
// Run with: go test -v ./tests/
|
||||||
package un
|
package un
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Async Job Polling example for unsandbox JavaScript SDK
|
* Async Job Polling example for unsandbox JavaScript SDK
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Concurrent Execution example for unsandbox JavaScript SDK
|
* Concurrent Execution example for unsandbox JavaScript SDK
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fibonacci example - standalone version
|
* Fibonacci example - standalone version
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hello World example - standalone version
|
* Hello World example - standalone version
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language Detection example - standalone version
|
* Language Detection example - standalone version
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,68 +1,19 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/**
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
* PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
*
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
* unsandbox.com JavaScript SDK (Asynchronous with native fetch)
|
// for machine learning intelligence.
|
||||||
* Isomorphic: Works in Node.js (CLI + SDK) and Browser environments
|
//
|
||||||
*
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
* Library Usage:
|
// four values:
|
||||||
* import {
|
//
|
||||||
* // Code execution
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
* executeCode, executeAsync, getJob, waitForJob, cancelJob, listJobs,
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
* getLanguages, detectLanguage,
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
* // Session management
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
* listSessions, getSession, createSession, deleteSession,
|
//
|
||||||
* freezeSession, unfreezeSession, boostSession, unboostSession, shellSession,
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
* // Service management
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
* listServices, createService, getService, updateService, deleteService,
|
|
||||||
* freezeService, unfreezeService, lockService, unlockService, setUnfreezeOnDemand, setShowFreezePage,
|
|
||||||
* getServiceLogs, getServiceEnv, setServiceEnv, deleteServiceEnv,
|
|
||||||
* exportServiceEnv, redeployService, executeInService,
|
|
||||||
* // Snapshot management
|
|
||||||
* sessionSnapshot, serviceSnapshot, listSnapshots, restoreSnapshot,
|
|
||||||
* deleteSnapshot, lockSnapshot, unlockSnapshot, cloneSnapshot,
|
|
||||||
* // Key validation
|
|
||||||
* validateKeys,
|
|
||||||
* } from './un_async.js';
|
|
||||||
*
|
|
||||||
* // Execute code (awaits until completion)
|
|
||||||
* const result = await executeCode('python', 'print("hello")', publicKey, secretKey);
|
|
||||||
*
|
|
||||||
* // Execute asynchronously (returns job_id immediately)
|
|
||||||
* const jobId = await executeAsync('javascript', 'console.log("hello")', publicKey, secretKey);
|
|
||||||
*
|
|
||||||
* // Wait for job completion with exponential backoff
|
|
||||||
* const result = await waitForJob(jobId, publicKey, secretKey);
|
|
||||||
*
|
|
||||||
* // Snapshot operations
|
|
||||||
* const snapshotId = await sessionSnapshot(sessionId, publicKey, secretKey, 'my-snapshot');
|
|
||||||
* const snapshots = await listSnapshots(publicKey, secretKey);
|
|
||||||
*
|
|
||||||
* Authentication Priority (5-tier):
|
|
||||||
* 1. Function arguments (publicKey, secretKey)
|
|
||||||
* 2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY) [Node.js]
|
|
||||||
* 3. Encrypted vault or localStorage [Browser] (vault preferred if CryptoJS available)
|
|
||||||
* 4. ~/.unsandbox/accounts.csv [Node.js]
|
|
||||||
* 5. ./accounts.csv [Node.js]
|
|
||||||
*
|
|
||||||
* Request Authentication (HMAC-SHA256):
|
|
||||||
* Authorization: Bearer <publicKey>
|
|
||||||
* X-Timestamp: <unixSeconds>
|
|
||||||
* X-Signature: HMAC-SHA256(secretKey, "timestamp:METHOD:path:body")
|
|
||||||
*
|
|
||||||
* Languages Cache:
|
|
||||||
* - Cached in ~/.unsandbox/languages.json (Node.js only)
|
|
||||||
* - TTL: 1 hour
|
|
||||||
* - Updated on successful API calls
|
|
||||||
*
|
|
||||||
* Browser Usage:
|
|
||||||
* - Import as ES module: <script type="module">
|
|
||||||
* - Credentials stored in encrypted vault (requires CryptoJS):
|
|
||||||
* UnsandboxVault.createVault('mypassword');
|
|
||||||
* UnsandboxVault.saveKeysToVault(vaultId, [{publicKey, secretKey}], 'mypassword');
|
|
||||||
* - Or pass credentials directly to functions
|
|
||||||
* - Uses Web Crypto API for HMAC-SHA256 signing
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Environment detection for isomorphic support (Node.js + Browser)
|
// Environment detection for isomorphic support (Node.js + Browser)
|
||||||
const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for async operations
|
* Tests for async operations
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for credential resolution
|
* Tests for credential resolution
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for HMAC request signing
|
* Tests for HMAC request signing
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for language detection from filenames
|
* Tests for language detection from filenames
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
// Hello World example for unsandbox JavaScript SDK
|
// Hello World example for unsandbox JavaScript SDK
|
||||||
// Expected output: Hello from unsandbox!
|
// Expected output: Hello from unsandbox!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
transform: {},
|
transform: {},
|
||||||
|
|
|
||||||
|
|
@ -1,69 +1,19 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
/**
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
* PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
*
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
* unsandbox.com JavaScript SDK (Synchronous/Async)
|
// for machine learning intelligence.
|
||||||
* Isomorphic: Works in Node.js (CLI + SDK) and Browser environments
|
//
|
||||||
*
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
* Library Usage (ES Modules):
|
// four values:
|
||||||
* import {
|
//
|
||||||
* // Code execution
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
* executeCode, executeAsync, getJob, waitForJob, cancelJob, listJobs,
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
* getLanguages, detectLanguage,
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
* // Session management
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
* listSessions, getSession, createSession, deleteSession,
|
//
|
||||||
* freezeSession, unfreezeSession, boostSession, unboostSession, shellSession,
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
* // Service management
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
* listServices, createService, getService, updateService, deleteService,
|
|
||||||
* freezeService, unfreezeService, lockService, unlockService, setUnfreezeOnDemand, setShowFreezePage,
|
|
||||||
* getServiceLogs, getServiceEnv, setServiceEnv, deleteServiceEnv,
|
|
||||||
* exportServiceEnv, redeployService, executeInService,
|
|
||||||
* // Snapshot management
|
|
||||||
* sessionSnapshot, serviceSnapshot, listSnapshots, restoreSnapshot,
|
|
||||||
* deleteSnapshot, lockSnapshot, unlockSnapshot, cloneSnapshot,
|
|
||||||
* // Images API (LXD container images)
|
|
||||||
* imagePublish, listImages, getImage, deleteImage,
|
|
||||||
* lockImage, unlockImage, setImageVisibility,
|
|
||||||
* grantImageAccess, revokeImageAccess, listImageTrusted,
|
|
||||||
* transferImage, spawnFromImage, cloneImage,
|
|
||||||
* // Key validation
|
|
||||||
* validateKeys,
|
|
||||||
* } from './un.js';
|
|
||||||
*
|
|
||||||
* // Execute code asynchronously (returns Promise)
|
|
||||||
* const result = await executeCode('python', 'print("hello")', publicKey, secretKey);
|
|
||||||
* const jobId = await executeAsync('javascript', 'console.log("hello")', publicKey, secretKey);
|
|
||||||
* const result = await waitForJob(jobId, publicKey, secretKey);
|
|
||||||
*
|
|
||||||
* Authentication Priority (5-tier):
|
|
||||||
* 1. Function arguments (publicKey, secretKey)
|
|
||||||
* 2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY) [Node.js]
|
|
||||||
* 3. Encrypted vault or localStorage [Browser] (vault preferred if CryptoJS available)
|
|
||||||
* 4. ~/.unsandbox/accounts.csv [Node.js]
|
|
||||||
* 5. ./accounts.csv [Node.js]
|
|
||||||
*
|
|
||||||
* Request Authentication (HMAC-SHA256):
|
|
||||||
* Authorization: Bearer <publicKey>
|
|
||||||
* X-Timestamp: <unixSeconds>
|
|
||||||
* X-Signature: HMAC-SHA256(secretKey, "timestamp:METHOD:path:body")
|
|
||||||
*
|
|
||||||
* Languages Cache:
|
|
||||||
* - Cached in ~/.unsandbox/languages.json (Node.js only)
|
|
||||||
* - TTL: 1 hour
|
|
||||||
* - Updated on successful API calls
|
|
||||||
*
|
|
||||||
* Browser Usage:
|
|
||||||
* - Import as ES module: <script type="module">
|
|
||||||
* - Credentials can be stored in encrypted vault (requires CryptoJS):
|
|
||||||
* UnsandboxVault.createVault('mypassword');
|
|
||||||
* UnsandboxVault.saveKeysToVault(vaultId, [{publicKey, secretKey}], 'mypassword');
|
|
||||||
* - Or configure via plain localStorage (legacy):
|
|
||||||
* localStorage.setItem('useUnsandbox', 'true');
|
|
||||||
* localStorage.setItem('unsandboxPublicKey', 'unsb-pk-...');
|
|
||||||
* localStorage.setItem('unsandboxSecretKey', 'unsb-sk-...');
|
|
||||||
* - Or pass credentials directly to functions
|
|
||||||
* - Uses Web Crypto API for HMAC-SHA256 signing
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Environment detection for isomorphic support (Node.js + Browser)
|
// Environment detection for isomorphic support (Node.js + Browser)
|
||||||
const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
const IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests for new SDK functions (feature parity with C implementation)
|
* Tests for new SDK functions (feature parity with C implementation)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Test suite for Prolog Unsandbox SDK
|
# Test suite for Prolog Unsandbox SDK
|
||||||
# Run: bash tests/test_un.sh
|
# Run: bash tests/test_un.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Async job polling example - demonstrates fire-and-forget execution
|
Async job polling example - demonstrates fire-and-forget execution
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Concurrent execution example - standalone version
|
Concurrent execution example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Concurrent HTTP Requests example - standalone version
|
Concurrent HTTP Requests example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Fibonacci example for unsandbox Python SDK - Asynchronous Version
|
Fibonacci example for unsandbox Python SDK - Asynchronous Version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Hello World example - standalone async version
|
Hello World example - standalone async version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Stream Processing example - standalone version
|
Stream Processing example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Sync (blocking) operations demonstration - standalone version
|
Sync (blocking) operations demonstration - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Setup script for unsandbox async Python SDK
|
Setup script for unsandbox async Python SDK
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,102 +1,19 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
unsandbox.com Python SDK (Asynchronous)
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
Library Usage:
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
import asyncio
|
# four values:
|
||||||
from un_async import (
|
#
|
||||||
# Execution
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
execute_code,
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
execute_async,
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
get_job,
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
wait_for_job,
|
#
|
||||||
cancel_job,
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
list_jobs,
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
get_languages,
|
|
||||||
detect_language,
|
|
||||||
# Sessions
|
|
||||||
list_sessions,
|
|
||||||
get_session,
|
|
||||||
create_session,
|
|
||||||
delete_session,
|
|
||||||
freeze_session,
|
|
||||||
unfreeze_session,
|
|
||||||
boost_session,
|
|
||||||
unboost_session,
|
|
||||||
shell_session,
|
|
||||||
# Services
|
|
||||||
list_services,
|
|
||||||
create_service,
|
|
||||||
get_service,
|
|
||||||
update_service,
|
|
||||||
delete_service,
|
|
||||||
freeze_service,
|
|
||||||
unfreeze_service,
|
|
||||||
lock_service,
|
|
||||||
unlock_service,
|
|
||||||
set_unfreeze_on_demand,
|
|
||||||
set_show_freeze_page,
|
|
||||||
get_service_logs,
|
|
||||||
get_service_env,
|
|
||||||
set_service_env,
|
|
||||||
delete_service_env,
|
|
||||||
export_service_env,
|
|
||||||
redeploy_service,
|
|
||||||
execute_in_service,
|
|
||||||
# Snapshots
|
|
||||||
session_snapshot,
|
|
||||||
service_snapshot,
|
|
||||||
list_snapshots,
|
|
||||||
restore_snapshot,
|
|
||||||
delete_snapshot,
|
|
||||||
lock_snapshot,
|
|
||||||
unlock_snapshot,
|
|
||||||
clone_snapshot,
|
|
||||||
# Key validation
|
|
||||||
validate_keys,
|
|
||||||
# Image generation
|
|
||||||
image,
|
|
||||||
)
|
|
||||||
|
|
||||||
async def main():
|
|
||||||
# Execute code synchronously
|
|
||||||
result = await execute_code("python", 'print("hello")', public_key, secret_key)
|
|
||||||
|
|
||||||
# Execute asynchronously
|
|
||||||
job_id = await execute_async("javascript", 'console.log("hello")', public_key, secret_key)
|
|
||||||
|
|
||||||
# Wait for job completion with exponential backoff
|
|
||||||
result = await wait_for_job(job_id, public_key, secret_key)
|
|
||||||
|
|
||||||
# List all jobs
|
|
||||||
jobs = await list_jobs(public_key, secret_key)
|
|
||||||
|
|
||||||
# Get supported languages
|
|
||||||
languages = await get_languages(public_key, secret_key)
|
|
||||||
|
|
||||||
# Snapshot operations
|
|
||||||
snapshot_id = await session_snapshot(session_id, public_key, secret_key)
|
|
||||||
|
|
||||||
asyncio.run(main())
|
|
||||||
|
|
||||||
Authentication Priority (4-tier):
|
|
||||||
1. Function arguments (public_key, secret_key)
|
|
||||||
2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY)
|
|
||||||
3. Config file (~/.unsandbox/accounts.csv, line 0 by default)
|
|
||||||
4. Local directory (./accounts.csv, line 0 by default)
|
|
||||||
|
|
||||||
Request Authentication (HMAC-SHA256):
|
|
||||||
Authorization: Bearer <public_key>
|
|
||||||
X-Timestamp: <unix_seconds>
|
|
||||||
X-Signature: HMAC-SHA256(secret_key, "timestamp:METHOD:path:body")
|
|
||||||
|
|
||||||
Languages Cache:
|
|
||||||
- Cached in ~/.unsandbox/languages.json
|
|
||||||
- TTL: 1 hour
|
|
||||||
- Updated on successful API calls
|
|
||||||
"""
|
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Tests for unsandbox async SDK
|
Tests for unsandbox async SDK
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Pytest configuration for async tests
|
Pytest configuration for async tests
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Tests for async operations (requires mocking or real API access)
|
Tests for async operations (requires mocking or real API access)
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Tests for credential resolution system
|
Tests for credential resolution system
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Tests for HMAC request signing
|
Tests for HMAC request signing
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Tests for language detection
|
Tests for language detection
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
##
|
##
|
||||||
# Validation script for Python SDK examples
|
# Validation script for Python SDK examples
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Fibonacci example demonstrating recursive functions
|
Fibonacci example demonstrating recursive functions
|
||||||
Expected output: fib(10) = 55
|
Expected output: fib(10) = 55
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Fibonacci Client example - standalone version
|
Fibonacci Client example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
File Operations example for unsandbox Python SDK - Synchronous Version
|
File Operations example for unsandbox Python SDK - Synchronous Version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Hello World example for unsandbox Python SDK
|
Hello World example for unsandbox Python SDK
|
||||||
Expected output: Hello from unsandbox!
|
Expected output: Hello from unsandbox!
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Hello World Client pattern demonstration - standalone version
|
Hello World Client pattern demonstration - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
HTTP Request example - standalone version
|
HTTP Request example - standalone version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
JSON Processing example for unsandbox Python SDK - Synchronous Version
|
JSON Processing example for unsandbox Python SDK - Synchronous Version
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Setup configuration for unsandbox Python SDK (Synchronous)"""
|
"""Setup configuration for unsandbox Python SDK (Synchronous)"""
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Unsandbox Python SDK (Synchronous)
|
Unsandbox Python SDK (Synchronous)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,138 +1,19 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
"""
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
PUBLIC DOMAIN - NO LICENSE, NO WARRANTY
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
unsandbox.com Python SDK (Synchronous)
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
Library Usage:
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
from un import (
|
# four values:
|
||||||
# Execution (8)
|
#
|
||||||
execute_code,
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
execute_async,
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
get_job,
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
wait_for_job,
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
cancel_job,
|
#
|
||||||
list_jobs,
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
get_languages,
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
detect_language,
|
|
||||||
# Sessions (9)
|
|
||||||
list_sessions,
|
|
||||||
get_session,
|
|
||||||
create_session,
|
|
||||||
delete_session,
|
|
||||||
freeze_session,
|
|
||||||
unfreeze_session,
|
|
||||||
boost_session,
|
|
||||||
unboost_session,
|
|
||||||
shell_session,
|
|
||||||
# Services (17)
|
|
||||||
list_services,
|
|
||||||
create_service,
|
|
||||||
get_service,
|
|
||||||
update_service,
|
|
||||||
delete_service,
|
|
||||||
freeze_service,
|
|
||||||
unfreeze_service,
|
|
||||||
lock_service,
|
|
||||||
unlock_service,
|
|
||||||
set_unfreeze_on_demand,
|
|
||||||
set_show_freeze_page,
|
|
||||||
get_service_logs,
|
|
||||||
get_service_env,
|
|
||||||
set_service_env,
|
|
||||||
delete_service_env,
|
|
||||||
export_service_env,
|
|
||||||
redeploy_service,
|
|
||||||
execute_in_service,
|
|
||||||
resize_service,
|
|
||||||
# Snapshots (9)
|
|
||||||
session_snapshot,
|
|
||||||
service_snapshot,
|
|
||||||
list_snapshots,
|
|
||||||
get_snapshot,
|
|
||||||
restore_snapshot,
|
|
||||||
delete_snapshot,
|
|
||||||
lock_snapshot,
|
|
||||||
unlock_snapshot,
|
|
||||||
clone_snapshot,
|
|
||||||
# Images (13)
|
|
||||||
image_publish,
|
|
||||||
list_images,
|
|
||||||
get_image,
|
|
||||||
delete_image,
|
|
||||||
lock_image,
|
|
||||||
unlock_image,
|
|
||||||
set_image_visibility,
|
|
||||||
grant_image_access,
|
|
||||||
revoke_image_access,
|
|
||||||
list_image_trusted,
|
|
||||||
transfer_image,
|
|
||||||
spawn_from_image,
|
|
||||||
clone_image,
|
|
||||||
# PaaS Logs (2)
|
|
||||||
logs_fetch,
|
|
||||||
logs_stream,
|
|
||||||
# Key validation
|
|
||||||
validate_keys,
|
|
||||||
# Utilities
|
|
||||||
version,
|
|
||||||
health_check,
|
|
||||||
last_error,
|
|
||||||
hmac_sign,
|
|
||||||
# Image generation (AI)
|
|
||||||
image,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Execute code synchronously
|
|
||||||
result = execute_code("python", 'print("hello")', public_key, secret_key)
|
|
||||||
|
|
||||||
# Execute asynchronously
|
|
||||||
job_id = execute_async("javascript", 'console.log("hello")', public_key, secret_key)
|
|
||||||
|
|
||||||
# Wait for job completion with exponential backoff
|
|
||||||
result = wait_for_job(job_id, public_key, secret_key)
|
|
||||||
|
|
||||||
# List all jobs
|
|
||||||
jobs = list_jobs(public_key, secret_key)
|
|
||||||
|
|
||||||
# Get supported languages
|
|
||||||
languages = get_languages(public_key, secret_key)
|
|
||||||
|
|
||||||
# Detect language from filename
|
|
||||||
lang = detect_language("script.py") # Returns "python"
|
|
||||||
|
|
||||||
# Snapshot operations
|
|
||||||
snapshot_id = session_snapshot(session_id, public_key, secret_key, name="my-snapshot")
|
|
||||||
snapshot_id = service_snapshot(service_id, public_key, secret_key, name="svc-snapshot")
|
|
||||||
snapshots = list_snapshots(public_key, secret_key)
|
|
||||||
result = restore_snapshot(snapshot_id, public_key, secret_key)
|
|
||||||
delete_snapshot(snapshot_id, public_key, secret_key)
|
|
||||||
|
|
||||||
Authentication Priority (4-tier):
|
|
||||||
1. Function arguments (public_key, secret_key)
|
|
||||||
2. Environment variables (UNSANDBOX_PUBLIC_KEY, UNSANDBOX_SECRET_KEY)
|
|
||||||
3. Config file (~/.unsandbox/accounts.csv, line 0 by default)
|
|
||||||
4. Local directory (./accounts.csv, line 0 by default)
|
|
||||||
|
|
||||||
Format: public_key,secret_key (one per line)
|
|
||||||
Account selection: UNSANDBOX_ACCOUNT=N env var (0-based index)
|
|
||||||
|
|
||||||
Request Authentication (HMAC-SHA256):
|
|
||||||
Authorization: Bearer <public_key> (identifies account)
|
|
||||||
X-Timestamp: <unix_seconds> (replay prevention)
|
|
||||||
X-Signature: HMAC-SHA256(secret_key, msg) (proves secret + body integrity)
|
|
||||||
|
|
||||||
Message format: "timestamp:METHOD:path:body"
|
|
||||||
- timestamp: seconds since epoch
|
|
||||||
- METHOD: GET, POST, DELETE, etc. (uppercase)
|
|
||||||
- path: e.g., "/execute", "/jobs/123"
|
|
||||||
- body: JSON payload (empty string for GET/DELETE)
|
|
||||||
|
|
||||||
Languages Cache:
|
|
||||||
- Cached in ~/.unsandbox/languages.json
|
|
||||||
- TTL: 1 hour
|
|
||||||
- Updated on successful API calls
|
|
||||||
"""
|
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import hmac
|
import hmac
|
||||||
|
|
|
||||||
|
|
@ -1 +1,17 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for unsandbox Python SDK (Synchronous)"""
|
"""Tests for unsandbox Python SDK (Synchronous)"""
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for languages cache functionality"""
|
"""Tests for languages cache functionality"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for credential resolution in unsandbox SDK"""
|
"""Tests for credential resolution in unsandbox SDK"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Integration tests with mocked API responses"""
|
"""Integration tests with mocked API responses"""
|
||||||
|
|
||||||
from unittest.mock import patch, MagicMock
|
from unittest.mock import patch, MagicMock
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for language detection in unsandbox SDK"""
|
"""Tests for language detection in unsandbox SDK"""
|
||||||
|
|
||||||
from un import detect_language
|
from un import detect_language
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for new SDK functions (feature parity with C implementation)"""
|
"""Tests for new SDK functions (feature parity with C implementation)"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Real-world scenario tests demonstrating SDK usage patterns"""
|
"""Real-world scenario tests demonstrating SDK usage patterns"""
|
||||||
|
|
||||||
from unittest.mock import patch, MagicMock
|
from unittest.mock import patch, MagicMock
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""Tests for HMAC-SHA256 request signing"""
|
"""Tests for HMAC-SHA256 request signing"""
|
||||||
|
|
||||||
from un import _sign_request
|
from un import _sign_request
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Verification script for unsandbox Python SDK (Synchronous)
|
Verification script for unsandbox Python SDK (Synchronous)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Aggregate performance reports across releases.
|
Aggregate performance reports across releases.
|
||||||
Analyzes variance, patterns, and draws conclusions about orchestrator placement & concurrency.
|
Analyzes variance, patterns, and draws conclusions about orchestrator placement & concurrency.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Build SDKs - primarily the C CLI for inception testing
|
# Build SDKs - primarily the C CLI for inception testing
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Fast parallel cleanup of orphaned test resources
|
# Fast parallel cleanup of orphaned test resources
|
||||||
# Usage: scripts/cleanup-test-resources.sh [--dry-run]
|
# Usage: scripts/cleanup-test-resources.sh [--dry-run]
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Collect pool metrics during test execution
|
# Collect pool metrics during test execution
|
||||||
# Runs in background and samples CPU, memory, latency from /cluster and /pools
|
# Runs in background and samples CPU, memory, latency from /cluster and /pools
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Detect which SDKs changed in this commit/PR
|
# Detect which SDKs changed in this commit/PR
|
||||||
# Output: JSON array of changed languages
|
# Output: JSON array of changed languages
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Aggregate test results and generate final report
|
# Aggregate test results and generate final report
|
||||||
# Hides skipped tests, shows only what ran
|
# Hides skipped tests, shows only what ran
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Generate aggregated performance charts from multiple perf.json files.
|
Generate aggregated performance charts from multiple perf.json files.
|
||||||
Run via: build/un -a -f reports/4.2.0/perf.json -f reports/4.2.3/perf.json -f reports/4.2.4/perf.json scripts/generate-aggregated-charts.py
|
Run via: build/un -a -f reports/4.2.0/perf.json -f reports/4.2.3/perf.json -f reports/4.2.4/perf.json scripts/generate-aggregated-charts.py
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Generate dynamic test matrix based on detected changes
|
# Generate dynamic test matrix based on detected changes
|
||||||
# Reads changes.json, outputs test-matrix.yml as a child pipeline config
|
# Reads changes.json, outputs test-matrix.yml as a child pipeline config
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Generate performance visualization charts from CI timing data.
|
Generate performance visualization charts from CI timing data.
|
||||||
Outputs PNG charts to /tmp/artifacts/ for collection by unsandbox.
|
Outputs PNG charts to /tmp/artifacts/ for collection by unsandbox.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Generate performance report for a tagged release
|
# Generate performance report for a tagged release
|
||||||
# Fetches job timing data from GitLab CI and creates a historical record
|
# Fetches job timing data from GitLab CI and creates a historical record
|
||||||
#
|
#
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Benchmark SDK performance across implementations
|
# Benchmark SDK performance across implementations
|
||||||
# Burns pool with parallel execution of stress tests
|
# Burns pool with parallel execution of stress tests
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Lint all SDKs using local syntax checkers
|
# Lint all SDKs using local syntax checkers
|
||||||
# Validates code compiles/parses without runtime execution
|
# Validates code compiles/parses without runtime execution
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Validate all SDK examples by executing them through unsandbox
|
# Validate all SDK examples by executing them through unsandbox
|
||||||
# This proves documentation examples actually work
|
# This proves documentation examples actually work
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Set version across VERSION file and all client source files
|
# Set version across VERSION file and all client source files
|
||||||
# Usage: scripts/set-version.sh 4.2.0
|
# Usage: scripts/set-version.sh 4.2.0
|
||||||
# Or: make set-version VERSION=4.2.0
|
# Or: make set-version VERSION=4.2.0
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Inception test: Use un (C CLI) to test SDKs AND API endpoints through unsandbox
|
# Inception test: Use un (C CLI) to test SDKs AND API endpoints through unsandbox
|
||||||
#
|
#
|
||||||
# Pattern: build/un → unsandbox API → SDK/code → unsandbox API → result
|
# Pattern: build/un → unsandbox API → SDK/code → unsandbox API → result
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# validate-examples.sh - Core script that FINDS and VALIDATES all SDK examples
|
# validate-examples.sh - Core script that FINDS and VALIDATES all SDK examples
|
||||||
# This is the HEART of self-validating documentation
|
# This is the HEART of self-validating documentation
|
||||||
#
|
#
|
||||||
|
|
|
||||||
16
test/fib.ex
16
test/fib.ex
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
defmodule Fib do
|
defmodule Fib do
|
||||||
def fib(n) when n <= 1, do: n
|
def fib(n) when n <= 1, do: n
|
||||||
def fib(n), do: fib(n-1) + fib(n-2)
|
def fib(n), do: fib(n-1) + fib(n-2)
|
||||||
|
|
|
||||||
16
test/fib.go
16
test/fib.go
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
|
||||||
16
test/fib.js
16
test/fib.js
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
function fib(n) {
|
function fib(n) {
|
||||||
if (n <= 1) return n;
|
if (n <= 1) return n;
|
||||||
return fib(n-1) + fib(n-2);
|
return fib(n-1) + fib(n-2);
|
||||||
|
|
|
||||||
16
test/fib.py
16
test/fib.py
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
def fib(n):
|
def fib(n):
|
||||||
if n <= 1:
|
if n <= 1:
|
||||||
return n
|
return n
|
||||||
|
|
|
||||||
16
test/fib.sh
16
test/fib.sh
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
fib() {
|
fib() {
|
||||||
local n=$1
|
local n=$1
|
||||||
if [ $n -le 1 ]; then
|
if [ $n -le 1 ]; then
|
||||||
|
|
|
||||||
16
test/qr.ex
16
test/qr.ex
|
|
@ -1,3 +1,19 @@
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
qr = EQRCode.encode("unsandbox-qr-ok")
|
qr = EQRCode.encode("unsandbox-qr-ok")
|
||||||
matrix = qr.matrix
|
matrix = qr.matrix
|
||||||
rows = length(matrix)
|
rows = length(matrix)
|
||||||
|
|
|
||||||
16
test/qr.go
16
test/qr.go
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
||||||
16
test/qr.js
16
test/qr.js
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
const QRCode = require('qrcode');
|
const QRCode = require('qrcode');
|
||||||
QRCode.toString('unsandbox-qr-ok', { type: 'utf8', margin: 0 }, function(err, str) {
|
QRCode.toString('unsandbox-qr-ok', { type: 'utf8', margin: 0 }, function(err, str) {
|
||||||
const rows = str.trim().split('\n').length;
|
const rows = str.trim().split('\n').length;
|
||||||
|
|
|
||||||
16
test/qr.py
16
test/qr.py
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
import qrcode
|
import qrcode
|
||||||
q = qrcode.QRCode(border=0)
|
q = qrcode.QRCode(border=0)
|
||||||
q.add_data("unsandbox-qr-ok")
|
q.add_data("unsandbox-qr-ok")
|
||||||
|
|
|
||||||
16
test/qr.sh
16
test/qr.sh
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Bash QR: qrencode is the native CLI for libqrencode
|
# Bash QR: qrencode is the native CLI for libqrencode
|
||||||
OUTPUT=$(qrencode -t UTF8 -m 0 "unsandbox-qr-ok")
|
OUTPUT=$(qrencode -t UTF8 -m 0 "unsandbox-qr-ok")
|
||||||
ROWS=$(echo "$OUTPUT" | wc -l)
|
ROWS=$(echo "$OUTPUT" | wc -l)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Test runner for the 'un' CLI client
|
# Test runner for the 'un' CLI client
|
||||||
# Runs all Fibonacci test programs and verifies output
|
# Runs all Fibonacci test programs and verifies output
|
||||||
# Automatically delays between tests to respect API rate limits (7 req/min)
|
# Automatically delays between tests to respect API rate limits (7 req/min)
|
||||||
|
|
|
||||||
16
tests/fib.go
16
tests/fib.go
|
|
@ -1,3 +1,19 @@
|
||||||
|
// This is free software for the public good of a permacomputer hosted at
|
||||||
|
// permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
// One which is durable, easy to repair, & distributed like tap water
|
||||||
|
// for machine learning intelligence.
|
||||||
|
//
|
||||||
|
// The permacomputer is community-owned infrastructure optimized around
|
||||||
|
// four values:
|
||||||
|
//
|
||||||
|
// TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
// FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
// HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
// LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
//
|
||||||
|
// This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
// Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Run all integration tests for UN CLI implementations
|
# Run all integration tests for UN CLI implementations
|
||||||
# These tests verify component interactions without making real API calls
|
# These tests verify component interactions without making real API calls
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Integration tests for request building - tests component interactions without API calls
|
Integration tests for request building - tests component interactions without API calls
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# UN CLI Inception - Complete Test Matrix Runner
|
# UN CLI Inception - Complete Test Matrix Runner
|
||||||
# Tests ALL 42 language implementations with unit, integration, and functional tests
|
# Tests ALL 42 language implementations with unit, integration, and functional tests
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Simple test runner for the core UN CLI implementations
|
# Simple test runner for the core UN CLI implementations
|
||||||
# Tests: Python, JavaScript, TypeScript, Ruby, PHP, Perl, Lua
|
# Tests: Python, JavaScript, TypeScript, Ruby, PHP, Perl, Lua
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Run all UN CLI Inception tests for compiled languages
|
# Run all UN CLI Inception tests for compiled languages
|
||||||
# Usage: ./run_compiled_tests.sh
|
# Usage: ./run_compiled_tests.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,19 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# UN CLI Inception Matrix Test
|
# UN CLI Inception Matrix Test
|
||||||
# Uses un2 with semitrusted network to execute each un.* implementation
|
# Uses un2 with semitrusted network to execute each un.* implementation
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,20 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# This is free software for the public good of a permacomputer hosted at
|
||||||
|
# permacomputer.com, an always-on computer by the people, for the people.
|
||||||
|
# One which is durable, easy to repair, & distributed like tap water
|
||||||
|
# for machine learning intelligence.
|
||||||
|
#
|
||||||
|
# The permacomputer is community-owned infrastructure optimized around
|
||||||
|
# four values:
|
||||||
|
#
|
||||||
|
# TRUTH First principles, math & science, open source code freely distributed
|
||||||
|
# FREEDOM Voluntary partnerships, freedom from tyranny & corporate control
|
||||||
|
# HARMONY Minimal waste, self-renewing systems with diverse thriving connections
|
||||||
|
# LOVE Be yourself without hurting others, cooperation through natural law
|
||||||
|
#
|
||||||
|
# This software contributes to that vision by enabling code execution across 42+ programming languages through a unified interface, accessible to all.
|
||||||
|
# Code is seeds to sprout on any abandoned technology.
|
||||||
|
|
||||||
# Complete Inception Matrix Test - uses un2 with semitrust to test all implementations
|
# Complete Inception Matrix Test - uses un2 with semitrust to test all implementations
|
||||||
|
|
||||||
source /home/fox/git/unsandbox.com/vars.sh
|
source /home/fox/git/unsandbox.com/vars.sh
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue