This file contains hidden or 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
URL: https://www.bbc.com/news/articles/c93716xdgzqo | |
=== Mozilla Readability === | |
{ | |
"title": "Elon Musk adds Microsoft to lawsuit against ChatGPT-maker OpenAI", | |
"excerpt": "Mr Musk, a co-founder of the company, is accusing it and the tech giant of operating a monopoly.", | |
"length": 2617, | |
"content": "Elon Musk has stepped up his ongoing feud with ChatGPT-maker OpenAI with a revived lawsuit against the firm, adding Microsoft as a defendant.Mr Musk, a co-founder of the artificial intelligence (AI) company, accused it and the tech giant of operating a monopoly in an amended legal complaint on Thursday.It follows previous lawsuits accusing the firm of breaching the principles he agreed to when he helped found it in 2015.Microsoft declined to comment on the lawsuit.An OpenAI spokesperson said Mr Musk's refreshed complaint was \"baseless\".\"Elon’s third attempt in less than a year to reframe his claims is even more baseless and overreaching than the previous ones,\" they told the BBC.They added that previous |
This file contains hidden or 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
Feature | Mozilla Readability | Article-extractor | Node-unfluff | HTML-to-text | |
---|---|---|---|---|---|
Content Quality | Excellent - clean and complete | Very Good - with HTML markup | Good - some formatting issues | Poor - noisy | |
Structure Preservation | ✅ Excellent hierarchy | ✅ Good with HTML tags | ⚠️ Partial | ❌ Poor | |
Formatting | ✅ Clean paragraphs and headers | ✅ HTML formatted | ⚠️ Inconsistent | ❌ Many line breaks | |
Metadata | Title/excerpt | Title/author/date | Title/description/author/date | None | |
Navigation/UI Removal | ✅ Complete removal | ✅ Good removal | ⚠️ Some remnants | ❌ Contains UI elements | |
Signal-to-noise Ratio | High | High | Medium | Low | |
Text Cleanliness | Very clean | Clean with HTML | Moderately clean | Very noisy | |
Link Handling | ✅ Preserved appropriately | ✅ HTML links | ⚠️ Raw URLs | ❌ Raw URLs scattered | |
Output Format | Plain text with structure | HTML | Plain text | Plain text |
This file contains hidden or 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 os | |
import json | |
import logging | |
import replicate | |
from pathlib import Path | |
from time import time as get_time | |
from typing import Optional, Dict, Any | |
from dotenv import load_dotenv | |
from pydub import AudioSegment | |
import tempfile |
This file contains hidden or 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
from scipy.spatial.distance import euclidean | |
from fastdtw import fastdtw | |
import numpy as np | |
def calculate_similarity_percentage(distance, max_distance): | |
similarity_percentage = (1 - distance / max_distance) * 100 | |
return similarity_percentage | |
def main(): | |
test_sets = [ |
This file contains hidden or 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
// logger.ts | |
export function logError(message: string, ...optionalParams: any[]): void { | |
try { | |
// Get the caller function | |
const caller = logError.caller?.name || 'anonymous'; | |
// Extract filename from the stack trace | |
const stack = new Error().stack || ''; | |
const fileMatch = stack.split('\n')[2]?.match(/(?:http:\/\/|https:\/\/|file:\/\/\/).*?\/(.*?)(?:\?|:)/) || []; |
This file contains hidden or 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
/** | |
* | |
* Usage | |
* | |
* node getRemote.js [target url] | |
* | |
*/ | |
// import { readSync } from "to-vfile"; |
This file contains hidden or 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
// e.g. | |
// node index.js https://googe.com | |
import { readSync } from "to-vfile"; | |
import { toString } from "nlcst-to-string"; | |
import { retext } from "retext"; | |
import retextPos from "retext-pos"; | |
import retextKeywords from "retext-keywords"; | |
import fetch from "node-fetch"; |
This file contains hidden or 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 UIKit | |
import FirebaseAuth | |
import Kingfisher | |
class NextVC: UIViewController { | |
@IBOutlet var profileImageView: UIImageView! | |
@IBOutlet var nameLabel: UILabel! | |
This file contains hidden or 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
<html> | |
<head> | |
<link | |
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" | |
rel="stylesheet" | |
/> | |
</head> | |
<body> | |
<div class=""> | |
<img |
This file contains hidden or 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
var weatherApiKey = "YOUR API KEY" | |
var destinationUrl = (cityName) => { | |
return `http://api.openweathermap.org/data/2.5/weather?q=${cityName}&appid=${weatherApiKey}` | |
} | |
fetch(destinationUrl(city)) | |
.then((response) => response.json()) | |
.then((data) => { | |
console.log(data) |
NewerOlder