Skip to content

Instantly share code, notes, and snippets.

View noczero's full-sized avatar
🇮🇩
ID

Satrya Budi Pratama noczero

🇮🇩
ID
View GitHub Profile
@noczero
noczero / jina-ai-reader.py
Created July 13, 2024 06:17
Scraping websites using Jina AI reader.
import requests
from typing import Optional
def scrape_website(url: str) -> Optional[str]:
url = f"https://r.jina.ai/{url}"
try:
response = requests.get(url)
if response.status_code == 200:
return response.text
@noczero
noczero / gmm.rb
Created February 6, 2024 05:43
Clustering using Gaussian Mixture Model with Multi Label Output
require 'rumale'
require 'rumale/dataset'
p "Clustering using Gaussian Mixture Model with Multi Label Output"
class MultiLabelGMM < Rumale::Clustering::GaussianMixture
def initialize(n_clusters: 8, init: 'k-means++', covariance_type: 'diag',
max_iter: 50, tol: 1.0e-4, reg_covar: 1.0e-6, random_seed: nil)
super()