Skip to content

Instantly share code, notes, and snippets.

"""
wget https://huggingface.co/datasets/thewh1teagle/hebright/resolve/main/knesset.txt.zip
unzip knesset.txt.zip
uv run main.py
"""
from pathlib import Path
import time
import requests
import UIKit
import SafariServices
import AuthenticationServices
import AppAuth
import Reachability
class OIDExternalUserAgentASWebAuthenticationSession: NSObject, OIDExternalUserAgent {
private let presentingViewController: UIViewController
private var externalUserAgentFlowInProgress: Bool = false
private var authenticationViewController: ASWebAuthenticationSession?
@Humbedooh
Humbedooh / asf-oauth-example.py
Created July 19, 2019 07:03
ASF Oauth Examples
#!/usr/bin/env python3
""" ASF OAuth example in Python 3"""
import cgi
import os
import requests
import urllib
import uuid
def init_oauth():
@CrystalOnScript
CrystalOnScript / firstemail.html
Last active November 28, 2024 12:01
Create your first AMP email
<!doctype html>
<html ⚡4email>
<head>
<meta charset="utf-8">
<script async src="https://cdn.ampproject.org/v0.js"></script>
<script async custom-element="amp-bind" src="https://cdn.ampproject.org/v0/amp-bind-0.1.js"></script>
<script async custom-element="amp-carousel" src="https://cdn.ampproject.org/v0/amp-carousel-0.1.js"></script>
<style amp4email-boilerplate>body{visibility:hidden}</style>
<style amp-custom>
-- quick and dirty JSON conversion
local function quickJSON(input)
if type(input) == "table" then
local t = 'array'
for k, v in pairs(input) do
if type(k) ~= "number" then
t = 'hash'
break
end
end
@fredley
fredley / upload.user.js
Created March 4, 2015 18:56
Drag+Drop image uploader for SE chat
// ==UserScript==
// @name Chat Image Upload
// @description Drag and Drop upload images
// @author fredley
// @version 1.0.0
// @include *://chat.meta.stackoverflow.com/rooms/*
// @include *://chat.meta.stackexchange.com/rooms/*
// @include *://chat.stackexchange.com/rooms/*
// @include *://chat.stackoverflow.com/rooms/*
// @include *://chat.askubuntu.com/rooms/*