This is an example of a sharded map using spin locks. It is extremely fast.
BenchmarkCacheSet-8 30000000 52.6 ns/op 0 B/op 0 allocs/op
BenchmarkCacheGet-8 30000000 37.7 ns/op 0 B/op 0 allocs/op
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
fmt.Println("Loan calculator") | |
package main | |
import ( | |
"crypto/sha256" | |
"encoding/hex" | |
"fmt" | |
"github.com/alecthomas/kingpin" | |
"github.com/tyler-smith/go-bip32" | |
"github.com/tyler-smith/go-bip39" | |
"golang.org/x/crypto/ripemd160" |
package main | |
import ( | |
"container/heap" | |
"fmt" | |
"math" | |
"math/big" | |
"sort" | |
"time" | |
) |
package main | |
import "fmt" | |
import "math" | |
const ( | |
costPerMille float64 = 4.8 | |
clickThroughRate float64 = 0.04 | |
conversionRate float64 = 0.05 |
/* ADS1256 simple library for Arduino | |
ADS1256, datasheet: http://www.ti.com/lit/ds/sbas288j/sbas288j.pdf | |
connections to Atmega328 (UNO) | |
CLK - pin 13 | |
DIN - pin 11 (MOSI) | |
DOUT - pin 12 (MISO) | |
CS - pin 10 | |
DRDY - pin 9 | |
RESET- pin 8 (or tie HIGH?) |
package main | |
import ( | |
"time" | |
"github.com/g3n/engine/app" | |
"github.com/g3n/engine/camera" | |
"github.com/g3n/engine/core" | |
"github.com/g3n/engine/gls" | |
"github.com/g3n/engine/light" |
This ZSH theme is a modification of agnoster
theme. It looks best with the Solarized Dark
or Base16 Solarized Dark iTerm2 themes.