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 / 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 / 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 / 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 / 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 / README.md
Created October 18, 2022 16:23
The boilerplate description for every project


Google Images Scraper

@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 / 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;
import { Component } from "react";
import logo from "./logo.svg";
import "./App.css";
class App extends Component {
constructor() {
super();
this.state = {
@algonacci
algonacci / check_gpu.py
Created July 12, 2022 15:22
A script to check the GPU used in Google Colab
gpu_info = !nvidia-smi
gpu_info = '\n'.join(gpu_info)
if gpu_info.find('failed') >= 0:
print('Not connected to a GPU')
else:
print(gpu_info)
from psutil import virtual_memory
ram_gb = virtual_memory().total / 1e9
print('Your runtime has {:.1f} gigabytes of available RAM\n'.format(ram_gb))
@algonacci
algonacci / batch_pdf.py
Created June 29, 2022 04:05 — forked from mgnisia/batch_pdf.py
Python File to batch download pdfs from a website
import requests
from bs4 import BeautifulSoup as soup
import os
# Define Website to Download pdf
url = 'website to download pdfs'
# Get Website content
r = requests.get(url)