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
import { Component } from "react";
import logo from "./logo.svg";
import "./App.css";
class App extends Component {
constructor() {
super();
this.state = {
@algonacci
algonacci / app.conf
Last active October 16, 2022 04:42
Nginx Configuration for Flask App Deployment
server {
listen 80;
server_name www.travens-ai.my.id;
location /static {
alias /root/flask-vm/static;
}
location / {
proxy_pass http://127.0.0.1:5000;
@algonacci
algonacci / nginx-certbot.txt
Last active October 16, 2022 04:47
Configuration to install nginx and certbot for Flask app
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install python3-certbot-nginx
sudo certbot --nginx
@algonacci
algonacci / README.md
Created October 18, 2022 16:23
The boilerplate description for every project


Google Images Scraper

@algonacci
algonacci / colab.js
Created November 9, 2022 14:27
A script to keep Google Colab alive.
function ClickConnect() {
console.log('Working')
document
.querySelector('#top-toolbar > colab-connect-button')
.shadowRoot.querySelector('#connect')
.click()
}
setInterval(ClickConnect, 60000)
@algonacci
algonacci / normalize_alay.py
Created December 7, 2022 09:25
Normalize Indonesian Slang Words
alay_dict = pd.read_csv('new_kamusalay.csv', names=['original', 'replacement'], encoding='latin-1')
alay_dict_map = dict(zip(alay_dict['original'], alay_dict['replacement']))
def normalize_alay(text):
return ' '.join([alay_dict_map[word] if word in alay_dict_map else word for word in text.split(' ')])
print("normalize_alay: ", normalize_alay("aamiin adek abis"))
# normalize_alay: amin adik habis
@algonacci
algonacci / risk.md
Last active January 19, 2023 12:54
Asset Name Asset Type IP Address Operating System Software Version Threat Type Vulnerability Impact Likelihood Mitigation Strategy Last Patch Date Number of Users Number of Admins Number of Connections Location Backup Frequency Backup Type Backup Location Encryption Type Compliance Logging Auditing Incident Response Business Continuity Risk Label
Server 1 Physical 192.168.0.1 Windows Server 2019 10.0.177
@algonacci
algonacci / Rename_File.ipynb
Created April 10, 2023 05:04
A script to rename file
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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.
@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()