Skip to content

Instantly share code, notes, and snippets.

View algonacci's full-sized avatar
🎯
Very Active in GitHub

Eric Julianto algonacci

🎯
Very Active in GitHub
View GitHub Profile
@algonacci
algonacci / claude_desktop_config.json
Created March 22, 2025 17:07
mcp config starters
{
"mcpServers": {
"mcp-tools": {
"command": "uv",
"args": [
"--directory",
"C:/Users/Braincore/Documents/GitHub/mcp-tools",
"run",
"python",
"server.py"
@algonacci
algonacci / compression.ipynb
Created October 18, 2024 03:02
a simple script for image compression
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@algonacci
algonacci / fashion_gan.md
Created October 7, 2024 08:38
Fashion GAN

Step 1: Data Ingestion

Using Google Cloud Storage to store raw data from multiple sources

from google.cloud import storage
from google.cloud import bigquery

def upload_to_gcs(bucket_name, file_name, data):
    client = storage.Client()
@algonacci
algonacci / bulk_image_prediction.py
Created May 22, 2024 03:20
YOLO bulk image prediction
from ultralytics import YOLO
import os
import cv2
# Load the model
model = YOLO("model.pt")
# Specify the folder containing the images
image_folder = "./images"
@algonacci
algonacci / arab_to_latin.py
Created May 2, 2024 04:51
Transliterate from Arabic to Indonesian
MAPPING = {
'ا': 'a', 'أ': 'a', 'إ': 'i', 'آ': 'a', 'ب': 'b', 'ت': 't', 'ث': 'th', 'ج': 'j', 'ح': 'h',
'خ': 'kh', 'د': 'd', 'ذ': 'dh', 'ر': 'r', 'ز': 'z', 'س': 's', 'ش': 'sh', 'ص': 's',
'ض': 'd', 'ط': 't', 'ظ': 'z', 'ع': "'a", 'غ': 'gh', 'ف': 'f', 'ق': 'q', 'ك': 'k',
'ل': 'l', 'م': 'm', 'ن': 'n', 'ه': 'h', 'و': 'w', 'ي': 'y', 'ئ': 'y', 'ى': 'a',
'ة': 'h', 'ؤ': 'w'
}
VOWELS = {
'\u064E': 'a', # Fatha
@algonacci
algonacci / Dockerfile
Created April 11, 2024 06:22
A simple Dockerfile to deploy a Vite-based frontend app
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:lts-alpine as serve-stage
WORKDIR /app
RUN npm install -g serve
@algonacci
algonacci / check_postgre_database_connection.py
Created February 28, 2024 05:39
Check PostgreSQL Database Connection
import psycopg2
def check_tables_in_database(host, port, username, password, database):
try:
# Attempt to connect to the PostgreSQL database
connection = psycopg2.connect(
host=host,
port=port,
user=username,
password=password,
@algonacci
algonacci / check_mysql_database_connection.py
Created December 9, 2023 01:02
Check MySQL Database Connection
import mysql.connector
def check_tables_in_database(host, username, password, database):
try:
# Attempt to connect to the MySQL database
connection = mysql.connector.connect(
host=host,
user=username,
password=password,
database=database
@algonacci
algonacci / bulk_model_testing.py
Last active October 28, 2023 05:59
Model predicting image in bulking
import os
from keras.models import load_model
from PIL import Image, ImageOps
import numpy as np
# Load the model
model = load_model("keras_Model.h5", compile=False)
# Load the labels
class_names = open("labels.txt", "r").readlines()
@algonacci
algonacci / Image_Dataset_Augmentation.ipynb
Created April 24, 2023 14:01
A simple script to augment image dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.