-
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
{ | |
"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) |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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
const withPWA = require('next-pwa') | |
module.exports = withPWA({ | |
async redirects() { | |
return [ | |
{ | |
source: "/(.*)", | |
has: [ | |
{ | |
type: "header", | |
key: "User-Agent", |
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 | |
if [ $# -lt 6 ]; then | |
echo "Usage: $0 [source-namespace] [source-pvc-name] [target-namespace] [target-pvc-name] [target-aws-zone] [target-pv-name] [kind/workload=None]" | |
echo "Clone EBS, PV and PVC from source to target. Will stop kind/workload if defined." | |
exit | |
fi | |
set -eu |
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; // ¯\\_(ツ)_/¯ |
NewerOlder