Skip to content

Instantly share code, notes, and snippets.

View horlabyc's full-sized avatar

OLAOSEBIKAN, Sulaiman Olabisi horlabyc

View GitHub Profile
@horlabyc
horlabyc / script.js
Last active March 20, 2023 06:44
Fraud detection script
View script.js
// d = Number of prior transaction days
// transactions
function calculateNumberOfNotification(d, transactions) {
const n = transactions.length;
let numberOfNotifications = 0;
if (!n) {
return numberOfNotifications
}
if (n <= d) {
return numberOfNotifications
@horlabyc
horlabyc / main.go
Created January 4, 2022 06:56
Create a Golang CSv reader
View main.go
package main
import (
"encoding/csv"
"log"
"os"
)
func main() {
// CSV Reader
file, err := os.Open("games.csv")