This file contains hidden or 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
| from openai import OpenAI | |
| import csv | |
| import os | |
| import time | |
| import json | |
| from typing import Dict, Any | |
| # docker run --pull=always -p 8080:8080 ghcr.io/edgelesssys/privatemode/privatemode-proxy:latest | |
| # PRIVATEMODE_API_KEY=<> uv run --with openai function_call.py |
This file contains hidden or 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
| // docker run --pull=always -p 8080:8080 ghcr.io/edgelesssys/privatemode/privatemode-proxy:latest --apiKey <KEY> | |
| // bun install @ai-sdk/openai-compatible ai zod | |
| // bun run structured-image-output.js | |
| import { createOpenAICompatible } from '@ai-sdk/openai-compatible'; | |
| import { generateObject } from 'ai'; | |
| import { z } from 'zod'; | |
| import fs from 'fs'; | |
| import path from 'path'; | |
| const config = { |
This file contains hidden or 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
| from openai import OpenAI | |
| import base64 | |
| import os | |
| import time | |
| # docker run --pull=always -p 8080:8080 ghcr.io/edgelesssys/privatemode/privatemode-proxy:latest | |
| # PRIVATEMODE_API_KEY=<> uv run --with openai gemma-vision.py | |
| api_key = os.environ.get("PRIVATEMODE_API_KEY") # insert | |
| api_base = "http://localhost:8080/v1" |
This file contains hidden or 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
| { | |
| "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
| "basics": { | |
| "name": "Adrian Stobbe", | |
| "label": "Software craftsman with expertise in Kubernetes and distributed systems using Go and Rust", | |
| "image": "", | |
| "email": "[email protected]", | |
| "phone": "", | |
| "url": "https://adrianstobbe.com/projects", | |
| "summary": "I'm an aspiring software craftsman. I appreciate clean code and TDD and have experience with full-stack, but specifically backend development.\nAt work, I gained lots of experience with Kubernetes in the last 1.5 years and am interested in Cloud Computing. \nI'm proficient in Golang, Python, JavaScript (TS), C++ and learning Rust at the moment.", |
This file contains hidden or 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
| // source: https://github.com/golang/mock/issues/616#issuecomment-1049275800 | |
| // see the differences between expected and wanted object in a nice format | |
| type eqMatcher struct { | |
| want interface{} | |
| } | |
| func EqMatcher(want interface{}) eqMatcher { | |
| return eqMatcher{ | |
| want: want, | |
| } |
This file contains hidden or 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
| compgen -c # list commands |
This file contains hidden or 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
| export HISTCONTROL=ignoredups:erasedups # no duplicate entries | |
| export HISTSIZE=100000 # big big history | |
| export HISTFILESIZE=100000 # big big history | |
| # shopt -s histappend # append to history, don't overwrite it | |
| # Save and reload the history after each command finishes | |
| #export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" | |
| HISTCONTROL=ignorespace:ignoredups |
This file contains hidden or 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
| # go get golang.org/x/tools/cmd/cover | |
| # in Go 1.19 go build -cover ? | |
| go test -coverprofile=coverage.out ./... ; go tool cover -html=coverage.out |
This file contains hidden or 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
| git tag v1.x # on branch | |
| git push --tags | |
| gh release create --target v1.x |
This file contains hidden or 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
| echo "./script.sh" | at now + "5 minutes" | |
| # Execute commands from a given file next Tuesday: | |
| at -f path/to/file 9:30 PM Tue | |
| # Check queue | |
| atq | |
| # Remove job from queue | |
| at -r ${JOB_ID} | |
| # Cat the jobs listed on the command line to standard output | |
| at -c ${JOB_ID} |