Skip to content

Instantly share code, notes, and snippets.

View vessenes's full-sized avatar

Peter Vessenes vessenes

View GitHub Profile
@vessenes
vessenes / google.py
Created January 18, 2019 01:14
Replace tts google.py for home assistant with code that uses wavenet
"""
Support for the google speech service.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tts.google/
Note - this is a hack. It makes no attempt to update tests. It does not have all wavenet voices listed.
It attempts to respect language requests from hass but this has not been tested.
Google cloud gives the first 1 million characters of wavenet generation for free per month, if you exceed
@vessenes
vessenes / onerun.beancount
Last active March 9, 2016 23:17
Example Beancount Inventory File
option "operating_currency" "USD"
plugin "beancount.plugins.book_conversions" "Assets:Inventory:AU,Income:AU"
plugin "beancount.plugins.unrealized"
2016-01-08 open Assets:Cash
2016-01-08 open Assets:Inventory:AU
2016-01-08 open Income:USD
2016-01-08 open Income:AU
2016-01-08 open Expenses:USD
2016-01-08 open Liabilities:Payroll
@vessenes
vessenes / import.py
Created March 9, 2016 19:26
import of fake data for hn user Y0s
import glob
import sqlite3
import shlex
import sys
import io
conn = sqlite3.connect('transaction.db')
c = conn.cursor()
all = glob.glob("transactions/*")
@vessenes
vessenes / gist:12f7dc3a7c5074b6e5c2
Created March 2, 2016 00:16
lipo fat build log
./configure Calculator ios verbose; make -j8
==> configured to build Calculator for ios in normal verbose mode
== using source in /Users/admin/src/lambdanative/apps/Calculator
=== using profile your profile name here [/Users/admin/src/lambdanative/PROFILE]..
=== configured to build Calculator version 1.0 for ios on macosx in normal mode
==> checking for required tools..
=> grep.. ok
=> wget.. ok
=> zip.. ok
@vessenes
vessenes / simplewaitgroup.go
Last active November 16, 2015 18:47
Sample Wait Group usage in go
package main
import "fmt"
import "sync"
import "time"
func main() {
var wg sync.WaitGroup
wg.Add(2)
@vessenes
vessenes / lockfree.go
Last active April 9, 2021 00:14
lock free pointer free golang hash table implementation. DO NOT USE. UNTESTED.
package main
import (
"errors"
"flag"
"log"
"os"
"runtime"
"strconv"
"sync"