This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
) | |
func stringPrompt(label string) string { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resp, err := svc.InvokeModel(context.TODO(), &bedrockruntime.InvokeModelInput{ | |
Accept: &accept, | |
ModelId: &modelId, | |
ContentType: &contentType, | |
Body: []byte(string(payloadBody)), | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
CREATE FUNCTION base58_encode (num bigint(64)) RETURNS varchar(255) | |
DETERMINISTIC | |
BEGIN | |
DECLARE alphabet varchar(255); | |
DECLARE base_count int DEFAULT 0; | |
DECLARE encoded varchar(255); | |
DECLARE divisor DECIMAL(10,4); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Rotary Phone Dial Reader | |
This sketch reads out the number dialed on a rotary phone dial. | |
The rotary dial has two signals: | |
1) turns ON when the wheel is turning | |
2) pulses a count based on the number dialed. | |
The results are printed to the serial monitor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
loadlib("http"); | |
################################################################# | |
function rest_call($method, $more=array()){ | |
$defaults = array( | |
'request_method' => 'GET', |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### code to make rest calls to the Tessitura API | |
import requests | |
import json | |
import base64 | |
import os | |
## Tessitura API | |
hostName = os.environ['TESSITURA_API'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import oauth2 as oauth | |
import urlparse | |
import urllib | |
consumer_key = '<your-key-here>' | |
consumer_secret = '<your-secret-key-here>' | |
request_token_url = 'http://www.tumblr.com/oauth/request_token' |