Skip to content

Instantly share code, notes, and snippets.

View micahwalter's full-sized avatar
👋

Micah Walter micahwalter

👋
View GitHub Profile
package main
import (
"bufio"
"fmt"
"os"
)
func stringPrompt(label string) string {
resp, err := svc.InvokeModel(context.TODO(), &bedrockruntime.InvokeModelInput{
Accept: &accept,
ModelId: &modelId,
ContentType: &contentType,
Body: []byte(string(payloadBody)),
})
func stringPrompt(label string) string {
var s string
r := bufio.NewReader(os.Stdin)
for {
fmt.Fprint(os.Stderr, label+" ")
s, _ = r.ReadString('\n')
if s != "" {
break
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### code to make rest calls to the Tessitura API
import requests
import json
import base64
import os
## Tessitura API
hostName = os.environ['TESSITURA_API']
const http = require('http');
const path = require('path');
const express = require('express');
const translate = require('moji-translate');
const app = express();
app.use(express.static(path.join(__dirname, '')));
app.set('views', './views')
app.set('view engine', 'pug')

Project Title

Project description goes here. This should include:

  • Is this project currently being used in production?
  • If not, what was its purpose? Is it an ongoing experiment or deprecated code?

How this Fits

  • What's the role this code plays in the org's ecosystem?

Getting Started

git filter-branch --prune-empty --tree-filter '
git lfs track "*.csv"
git add .gitattributes .gitconfig
for file in $(git ls-files | xargs git check-attr filter | grep "filter: lfs" | sed -r "s/(.*): filter: lfs/\1/"); do
echo "Processing ${file}"
git rm -f --cached ${file}
echo "Adding $file lfs style"
git add ${file}
@micahwalter
micahwalter / gist:45c0202032c8c0d9146972862661b0c8
Created July 16, 2016 21:56
one-line git command to pull all branches
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs
micah@ubuntu:~/Data$ git clone git@github.com:cooperhewitt/the-pen-data.git
Cloning into 'the-pen-data'...
remote: Counting objects: 42, done.
remote: Total 42 (delta 0), reused 0 (delta 0), pack-reused 42
Receiving objects: 100% (42/42), 11.93 KiB | 0 bytes/s, done.
Resolving deltas: 100% (17/17), done.
Checking connectivity... done.
Downloading data/pen-collected-items.csv (159.08 MB)
Error downloading object: data/pen-collected-items.csv (f0a5de8f675eb5152d1d79778adb8f92b4d202e05437fcdab409221cbedf2219)