Skip to content

Instantly share code, notes, and snippets.

View smithjessk's full-sized avatar

Jess Smith smithjessk

  • United States
View GitHub Profile
@smithjessk
smithjessk / demo.go
Created September 28, 2016 21:51
Three separate ways of errors in a `http.Handler`
package main
import (
"encoding/json"
"net/http"
)
type request struct {
ID string
}
package main
import (
"fmt"
"math"
"math/rand"
"os"
)
func main() {
@smithjessk
smithjessk / channel_based_aggregator.go
Last active November 2, 2016 20:48
Channel-based event aggregator
package main
import (
"fmt"
"time"
"github.com/gocraft/health"
"github.com/gorilla/websocket"
)
#include "RSA.h"
int main() {
RSA RSAobj;
//RSAobj.set_n();
//RSAobj.set_m();
//RSAobj.set_e();
//RSAobj.compute_d();
RSAobj.prompt();
@smithjessk
smithjessk / tt.py
Created November 5, 2022 02:00
benchmarked typeguard
# %%
from torchtyping import TensorType as TT, patch_typeguard
import torch as t
from typeguard import typechecked
patch_typeguard()
# %%
def compute_times(size):