-
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
/* 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) |
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 |
NewerOlder