This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |