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
Christian [03/12/2019 13:31] | |
I think I see what they’re alluding to though | |
A “stream” would be the octets corresponding to one single HTTP/2 message | |
And there can be multiple streams over the same connection | |
All interwoven and beautiful af | |
as [03/12/2019 13:32] | |
it's not a message, it's a connectionette |
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
package main | |
import ( | |
"fmt" | |
"math/rand" | |
) | |
func main() { | |
t := 0 | |
i := 0 |
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
package main | |
import ( | |
"fmt" | |
"math/bits" | |
) | |
func main() { | |
fmt.Println(bgcd(6, 36)) | |
fmt.Println(bgcd(2, 36)) |
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
// ParseFlagsOrEnv: Order of priority (Flag, Env, Default) | |
func ParseFlagsOrEnv() { | |
flag.VisitAll(func(fl *flag.Flag) { | |
if env, set := os.LookupEnv(fl.Name); set { | |
fl.DefValue = env | |
flag.Set(fl.Name, env) | |
} | |
}) | |
flag.Parse() |
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
package main | |
import ( | |
"fmt" | |
"math/bits" | |
"math/rand" | |
) | |
type spool struct { | |
*rand.Rand |
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
Don't Re-add all the Elements: The Arithmetic Mean in a Running Average Can Be Efficient | |
---------------------------------------------------------------------------------------- | |
The arithmetic mean of a set is the sum of the set's elements, divided by the set's cardinality. | |
We observe this definition as a formula: A = 1/n * (a1 + a2 + ... + an), where n is the number of elements. | |
To demonstrate, we compute the arithmetic mean of the set (1, 2): | |
A(1, 2) = 1/2 * (1 + 2) |
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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
ε := 0.1 | |
if ε == -1+ε+1 { | |
panic("ε") |
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
package main | |
import ( | |
. "go/ast" | |
"go/format" | |
"go/token" | |
"os" | |
) | |
func main() { |
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/godoc | |
#:: Q: Where's godoc? | |
#:: A: They removed it.... | |
#:: | |
#:: This is a system agnostic script that will download and install the godoc command |
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
package main | |
import ( | |
"crypto/sha256" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) | |
var x = string(0x60) |