Skip to content

Instantly share code, notes, and snippets.

View ngurajeka's full-sized avatar

Ady Rahmat MA ngurajeka

View GitHub Profile
#!/bin/sh
gofiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.go$')
[ -z "$gofiles" ] && exit 0
unformatted=$(gofmt -l $gofiles)
[ -z "$unformatted" ] || echo "needs formatting: $unformatted"
# tests
go test -v -race $(go list ./... | grep -v /vendor/)
RESULT=$?
[ $RESULT -ne 0 ] && exit 1
@ngurajeka
ngurajeka / student.py
Created May 18, 2020 06:46
Student Grading
import matplotlib.pyplot as plt
import numpy as np
import seaborn
from tabulate import tabulate
seaborn.set() # set plot style
# Student untuk placeholder satu data
class Student(object):
def __init__(self, nama, nim, nilai_tugas, nilai_uts, nilai_uas):
package main
import (
"log"
"net/http"
"sync"
)
func main() {
urls := []string{