Skip to content

Instantly share code, notes, and snippets.

View eblume's full-sized avatar

Erich Blume eblume

  • Camano Island, WA
View GitHub Profile
import getpass
import typer
from typerassistant import TyperAssistant
from openai import OpenAI
app = typer.Typer()
client = OpenAI() # Assuming OPENAI_API_KEY is set in the environment
@app.command()
def say_hello(name: str):
my_summarize () {
if [ $# -eq 0 ]
then
echo "Usage: my_summarize FILE_OR_URL"
return 1
fi
local content
if [[ $1 =~ ^https?:// ]]
then
content=$(curl -s "$1" | lynx -dump -stdin)
@eblume
eblume / poetry
Created May 3, 2019 01:48
directory dependency with develop=false example
[tool.poetry]
name = "poetry_test"
version = "0.1.0"
description = ""
authors = ["Erich Blume <blume.erich@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
hermes = {path = "../hermes/", develop = false}
@eblume
eblume / pyproject.toml
Created November 20, 2018 21:54
Example poetry version issue
[tool.poetry]
name = "poetry_example"
version = "0.1.0"
description = ""
authors = ["Erich Blume <blume.erich@gmail.com>"]
[tool.poetry.dependencies]
python = "^3.7"
apsw = "^3.9"
@eblume
eblume / gist:2483618
Created April 24, 2012 20:53
Output of Homebrew config log
tristan:cs_sjsu eblume$ cat ~/Library/Logs/Homebrew/config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by guile configure 1.8.7, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/guile/1.8.7 --with-libreadline-prefix=/usr/local/Cellar/readline/6.2.2
## --------- ##
@eblume
eblume / gist:2483554
Created April 24, 2012 20:42
brew install guile failure
tristan:cs_sjsu eblume$ brew install guile
==> Downloading http://ftpmirror.gnu.org/guile/guile-1.8.7.tar.gz
Already downloaded: /Users/eblume/Library/Caches/Homebrew/guile-1.8.7.tar.gz
==> ./configure --prefix=/usr/local/Cellar/guile/1.8.7 --with-libreadline-prefix
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
@eblume
eblume / gist:2483524
Created April 24, 2012 20:38
brew doctor output
tristan:cs_sjsu eblume$ brew doctor
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts: