Skip to content

Instantly share code, notes, and snippets.

View josestg's full-sized avatar

Jose Sitanggang josestg

View GitHub Profile
from LAS import Converter
c = Converter() # create converter object
log = c.set_file("file.las") #return LogWrapper
# get section
data = log.data
version = log.version
curve = log.curve
class LSE(object):
def __init__(self):
self.__fitted = False
def fit(self, X, y):
""" Menentukan nilai m dan y dengan menggunakan LSE"""
y_mean = y.mean()
x_mean = X.mean()
sum_x = sum(X)
@josestg
josestg / lazy_loader.go
Created January 9, 2023 12:28
A simple implementation of lazy loader in Go with generics.
package lazy
import "sync"
// Loader is a generic Lazy loader.
type Loader[T any] struct {
onc sync.Once
val T
}
@josestg
josestg / sha256.go
Created February 1, 2023 13:29
Implementasi SHA-256
package sha256
import (
"encoding/binary"
"encoding/hex"
"math/bits"
)
var K = [64]uint32{
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,

Keybase proof

I hereby claim:

  • I am josestg on github.
  • I am josestg (https://keybase.io/josestg) on keybase.
  • I have a public key whose fingerprint is 2F82 D694 67DF FE19 5283 773D AF7B 4FE1 485D 25D4

To claim this, I am signing this object: