Skip to content

Instantly share code, notes, and snippets.

View evalphobia's full-sized avatar

evalphobia

View GitHub Profile
@evalphobia
evalphobia / benchmark.csv
Created September 5, 2019 07:42
Benchmark DeepLearning performance of GPU on GCP AI Platform (Cloud ML Engine)
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
(wip)
@evalphobia
evalphobia / example.go
Last active December 23, 2019 04:19
How to use context.Cancel: Execute multiple process and gets the single fastest result.
package example
import (
"context"
)
// Executor is example process.
// This might be, downloading data via http / reading data from local big file / waiting data from client etc...
type Executor interface {
Exec() (data interface{}, err error) // this might take a long time.
@evalphobia
evalphobia / benchmark_test.go
Last active December 26, 2019 11:40
Golang Benchmark for Slice Map Decoder of DynamoDB result on github.com/evalphobia/aws-sdk-go-wrapper
package dynamodb
import (
"fmt"
"testing"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
)
func BenchmarkToSliceMap_old(b *testing.B) {
(() => {
// initialize app
function init() {
_firebaseInit()
_firebaseAuthInit()
}
function _(el) {
return document.getElementById(el);
@evalphobia
evalphobia / resize_jpg.go
Created March 19, 2020 10:11
Resizing Image (Jpeg) for golang
package library
import (
"bytes"
"image"
"image/jpeg"
"io"
"github.com/disintegration/imaging"
)
@evalphobia
evalphobia / README.md
Last active December 19, 2022 04:15
Golang Benchmark: uuid(v4) vs cuid vs nanoid

Golang Benchmark: uuid(v4) vs cuid vs nanoid

Comparing these libraries

  • github.com/google/uuid
  • github.com/lucsky/cuid
  • github.com/matoous/go-nanoid

result

@evalphobia
evalphobia / list.txt
Created December 19, 2022 12:34
Check PayPal payment data from Transaction ID
1122334455667788A
AABBCCDDEEFFGGHH1