Skip to content

Instantly share code, notes, and snippets.

@beatty
beatty / analyzer_openai.user.js
Last active March 21, 2023 16:26
Analyzes selected text using OpenAI Completion API
// ==UserScript==
// @name Analyzer (OpenAI)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Analyze selected text using OpenAI Completion API
// @author John Beatty
// @match *://*/*
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// ==/UserScript==
@apirogov
apirogov / rsync-prepare
Created September 7, 2022 18:08
Script to fix moved/renamed files before running rsync to avoid useless retransmissions
#!/usr/bin/env python3
"""
Fix moved/renamed files before running rsync to avoid useless retransmissions.
Copyright (C) 2022 Anton Pirogov, licensed under the MIT License
"""
from itertools import chain
from typing import List, Dict, Optional
from dataclasses import dataclass
from pathlib import Path
@geryogam
geryogam / uri_normalizer.py
Last active April 15, 2021 00:08 — forked from mnot/urlnorm.py
URI Normalizer
"""
==============
URI Normalizer
==============
An URI normalization library providing syntax-based normalization (case
normalization, percent-encoding normalization, path segment normalization) and
scheme-based normalization to URIs according to RFC 3986
(https://tools.ietf.org/html/rfc3986).