-
Run the command:
python pixiv_auth.py login
This will open the browser with Pixiv login page.
Discover gists
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 requests | |
import sys | |
import json | |
def waybackurls(host, with_subs): | |
if with_subs: | |
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host | |
else: | |
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host |
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
#!/usr/bin/env bash | |
# Simple backup script for borg. http://borgbackup.readthedocs.io/en/stable/ | |
# Install on Fedora: sudo dnf install borgbackup | |
# | |
# Configure BORG_REPO below to match some path on your own system. In my case | |
# it points to an autofs mount on my network backup device. | |
# Configure your own borg_excludes. | |
# by Stefan Midjich <swehack at gmail dot com> | |
export BORG_REPO="/media/nas/backups/$(hostname -s)-borgbackup" |
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
/* Save this file with a jsx extension and place in your | |
Illustrator/Presets/en_US/Scripts folder. You can then | |
access it from the File > Scripts menu */ | |
var decimalPlaces = 3; | |
if (app.documents.length > 0) { | |
if (app.activeDocument.selection.length < 1) { | |
alert('Select a path'); |
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
{ | |
"chainify": "https://github.com/liquality/chainify", | |
"solana-chat-app": "https://github.com/jsoneaday/solana-chat-app", | |
"wallet-adapter": "https://github.com/solana-labs/wallet-adapter", | |
"audius-protocol": "https://github.com/AudiusProject/audius-protocol", | |
"raydium-ui": "https://github.com/raydium-io/raydium-ui", | |
"espresso-cash-public": "https://github.com/espresso-cash/espresso-cash-public", | |
"backpack": "https://github.com/coral-xyz/backpack", | |
"projects": "https://github.com/solidproof/projects", | |
"protocol-v1": "https://github.com/drift-labs/protocol-v1", |
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
#!/bin/bash | |
# | |
# Show user stats (commits, files modified, insertions, deletions, and total | |
# lines modified) for a repo | |
git_log_opts=( "$@" ) | |
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \ | |
| tr '[A-Z]' '[a-z]' \ | |
| grep -v '^$' \ |
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
"""Script for fine-tuning Pegasus | |
Example usage: | |
# use XSum dataset as example, with first 1000 docs as training data | |
from datasets import load_dataset | |
dataset = load_dataset("xsum") | |
train_texts, train_labels = dataset['train']['document'][:1000], dataset['train']['summary'][:1000] | |
# use Pegasus Large model as base for fine-tuning | |
model_name = 'google/pegasus-large' | |
train_dataset, _, _, tokenizer = prepare_data(model_name, train_texts, train_labels) |
NewerOlder