Skip to content

Instantly share code, notes, and snippets.

View b5's full-sized avatar
💭
use of moved value

Brendan O'Brien b5

💭
use of moved value
View GitHub Profile
@b5
b5 / geo.py
Created January 22, 2019 16:38
Starlark Geospatial sample
# this is a Qri starlark transform script, use it with qri: https://qri.io
load("http.star", "http")
load("geo.star", "geo")
def download(ctx):
# Download list of 311 complaints, currently capped to 10000 responses for testing purposes
complaints = http.get("https://data.cityofnewyork.us/resource/fhrw-4uyv.json?$offset=0&$limit=10000")
# Download the New York Borough Boundaries
boros = http.get("http://data.beta.nyc//dataset/68c0332f-c3bb-4a78-a0c1-32af515892d6/resource/7c164faa-4458-4ff2-9ef0-09db00b509ef/download/42c737fd496f4d6683bba25fb0e86e1dnycboroughboundaries.geojson")
@b5
b5 / prefix-postfix.go
Created February 25, 2019 13:25
Top Down & Bottom Up Tree Traversal
package main
import "fmt"
// Node is a named element of a tree witha any number of children
type Node struct {
Name string
Children []Node
}
@b5
b5 / labels.json
Created February 27, 2019 17:41
qri github labels
[
{
"name": "bug",
"color": "ee0701"
},
{
"name": "chore",
"color": "14272D"
},
{
@b5
b5 / gov.epa.yosemite-walk.job.json
Created April 24, 2019 15:28
github.com/qri-io/walk job
{
"Seeds": [
"https://yosemite.epa.gov"
],
"SeedsPath": "",
"Crawl": true,
"Domains": [
"https://yosemite.epa.gov"
],
"IgnorePatterns": null,
@b5
b5 / gov.noaa.esrl-walk.job.json
Last active April 24, 2019 15:35
github.com/qri-io/walk job
{
"Seeds": [
"https://esrl.noaa.gov/"
],
"SeedsPath": "",
"Crawl": true,
"Domains": [
"https://esrl.noaa.gov/"
],
"IgnorePatterns": null,
load("http.star", "http")
load("bsoup.star", "bsoup")
baseUrl = "http://www.lawhelp.org"
def download(ctx):
soup, rows = fetch_page(baseUrl + '/dc/find-legal-help/directory/')
pages = page_links(soup)

Log

Qri is a version control system (VCS) for datasets. Since most VCS's provide some system for collaborating, we aim to do the same. Collaboration within the context of a version control system means coordinating who has done what. Providing tools to syncronize collaborator's actions is a prerequisite for working together effectively.

The characteristics we want:

  • provide a foundation for about version histories.
  • trak & map to human names
  • Decentralized.
  • Offline first. Accomodate sync lags that may be years in length
  • as-small-as-possible storage footprint, size must be calculatable
@b5
b5 / main.go
Last active June 22, 2020 21:54
"local" dsync
package main
import (
"bufio"
"context"
"os"
"path/filepath"
coreiface "github.com/ipfs/interface-go-ipfs-core"
"github.com/qri-io/dag/dsync"
@b5
b5 / wnfs_private_file_walkthrough.go
Created August 20, 2021 19:07
constructing a private file in WNFS v2
package wnfs
import (
"context"
"testing"
mockipfs "github.com/qri-io/wnfs-go/ipfs/mock"
"github.com/qri-io/wnfs-go/mdstore"
)
@b5
b5 / github_golang_api_v4.gql
Created November 24, 2022 23:00
GraphQL Example: Fetch stargazers at "go" topic
query ($cursor: String) {
topic(name: "go") {
repositories(
after: $cursor
first: 100
orderBy: {field: STARGAZERS, direction: DESC}
) {
totalCount
pageInfo {
endCursor