Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / google_saved_content_to_file.js
Last active July 16, 2024 19:27
Google Saved Content to File
// allow saving google.com/saved folder to a file
var href_list = [];
var cols = document.querySelectorAll(".OmLvtc")
cols.forEach((col) => {
var items = col.querySelectorAll(".EHB20b")
items.forEach((item) => {
href_list.push(
item.querySelector("a").getAttribute("href").indexOf("/url?q=") !== -1 ? decodeURI(item.querySelector("a").getAttribute("href").replace("/url?q=", "")) : decodeURI(item.querySelector("a").getAttribute("href"))
)
@CypherpunkSamurai
CypherpunkSamurai / chunk_speed_test.py
Created July 13, 2024 09:07
Chunk Speed Test - Python
# utils.py
import time
import requests
def benchmark_chunk_sizes(url: str, headers: dict = {}, verify_ssl: bool = False):
print(">> Benchmarking Chunk Sizes...")
print(f">> Url: {url}")
# generate chunk sizes
chunk_sizes = [1024*i for i in range(1, 20)]
results = {}
@CypherpunkSamurai
CypherpunkSamurai / m3u8_threaded.py
Created July 12, 2024 20:47
Threading to Download M3u8 using Python
# streamwriter.py
import os
import glob
import m3u8
import requests
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Callable
from tqdm import tqdm
# fix ssl warnings
# streamwriter.py
import os
import glob
import m3u8
import requests
from concurrent.futures import ThreadPoolExecutor, as_completed
from typing import Callable
from rich import progress
# fix ssl warnings
@CypherpunkSamurai
CypherpunkSamurai / download m3u8.py
Created July 11, 2024 17:55
Download a M3U8 using Python3
# Arabic Toons
import m3u8
import requests
import cloudscraper
from bs4 import BeautifulSoup
# create a scraper
scraper = cloudscraper.create_scraper()
@CypherpunkSamurai
CypherpunkSamurai / forward_proxies.md
Last active July 11, 2024 09:13
Proxies, Types, and Open-Source Proxy Tools
@CypherpunkSamurai
CypherpunkSamurai / Nous_Hermes_Modelfile
Last active July 11, 2024 05:42
Ollama OpenAI Function Calling Support
FROM hermes-2-pro-llama-3.gguf
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant"""
FUNCTIONTMPL """
You have access to the following functions:
FROM hermes-2-pro-llama-3.gguf
TEMPLATE """<|im_start|>system
{{ .System }}<|im_end|>
<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant"""
FUNCTIONTMPL """
You have access to the following functions:
@CypherpunkSamurai
CypherpunkSamurai / readme.md
Created July 10, 2024 08:07
YT-Dlp, Whisper CPP and Faster Whisper Standalone Installer

YT-dlp, Whisper CPP and Faster Whisper Standalone

YT-Dlp is a youtube-dl fork with additional websites, updates and features

FFMpeg is media tool / library

Whisper CPP is a C++ version of openai whisper that uses GGML (PTorch alternative AI Lib for c++).

Faster Whisper is a whisper implementation using ctranslate2.