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 argparse | |
import datetime | |
import requests | |
import sys | |
from scripts import utils as utils | |
def get_dois_from_page(page, since_days): | |
posts = page["hits"] | |
dois = dict() |
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 indieweb_utils | |
def send_webmention(source_url, target_url, dry_run=False): | |
print(f"Found a webmention: {source_url} -> {target_url}") | |
try: | |
indieweb_utils.discover_webmention_endpoint(source_url) | |
except Exception as e: | |
print(f"Error discovering webmention endpoint: {e}") |
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 datetime | |
import fire | |
import marko | |
from scripts.webmention.utils import send_webmention | |
from scripts import utils as utils | |
DATABASE_PATH = "scripts/webmention/outgoing_processed.txt" |
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
from bs4 import BeautifulSoup | |
from urllib.parse import urlparse | |
import argparse | |
import datetime | |
import pprint | |
import requests | |
import sys | |
from scripts.webmention.utils import send_webmention |
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
"""Add URLs to blogroll database. | |
scripts/blogroll.txt is a flat file containing URLs and titles of blog posts | |
I submitted via https://github.com/j2kun/extension-trigger-gh-workflow | |
Each entry contains two lines: the first line is a URL and the second is a | |
title extracted from the URL. Entries are separated by a blank line. | |
Example: |
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 os | |
import fire | |
from atproto import Client, models | |
from scripts import utils as utils | |
from scripts import syndication as syndication | |
# A simple text file with two urls per line | |
DATABASE_FILE = "scripts/published_bluesky.txt" | |
BLUESKY_HANDLE = "jeremykun.com" |
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 os | |
import time | |
from scripts import utils as utils | |
from scripts import syndication as syndication | |
import fire | |
import tweepy | |
# A simple text file with two urls per line |
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
from collections import deque, defaultdict | |
from itertools import zip_longest | |
import datetime | |
import os | |
import pathlib | |
import re | |
import subprocess | |
import marko |
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 os | |
import pathlib | |
import pprint | |
import re | |
import subprocess | |
import fire | |
import marko | |
from mastodon import Mastodon |
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
module { | |
func.func @box_blur(%arg0: !secret.secret<tensor<4096xi16>>) -> !secret.secret<tensor<4096xi16>> { | |
%cst = arith.constant dense<4096> : tensor<64xindex> | |
%cst_0 = arith.constant dense<[49, 16, 62, 7, 45, 4, 25, 11, 37, 58, 29, 21, 50, 41, 33, 54, 46, 48, -1, 61, 17, 3, 10, 26, 6, 34, 57, 38, 22, 53, 30, 42, 31, 60, 47, 2, 18, 14, 5, 39, 13, 9, 23, 52, 27, 56, 35, 43, 19, 15, 8, 44, 40, 12, 1, 24, 20, 51, 28, 59, 36, 32, 55]> : tensor<63xindex> | |
%cst_1 = arith.constant dense<4096> : tensor<128xindex> | |
%cst_2 = arith.constant dense<"0x1D0000000000000004000000000000001000000000000000040000000000000010000000000000003A000000000000003A000000000000003E000000000000003E0000000000000036000000000000000B0000000000000019000000000000002D0000000000000007000000000000000B0000000000000036000000000000002D000000000000002100000000000000070000000000000021000000000000003200000000000000290000000000000011000000000000001500000000000000250000000000000029000000000000001500000000000000250000000000000032000000000000 |
NewerOlder