b.rs
尝试了一下用Wplace调色板的效果,结果不好,颜色都失真了。排除掉算法实现有问题情况下,那就是这种纯比较亮度的方案在准确原色彩上依然太欠缺。
This file contains hidden or 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 | |
ia search wplace_snapshot | jq '.identifier' -r | while read -r id; do | |
ia ls "$id" | rg '\.zip$' | while read -r filename; do | |
echo "https://archive.org/download/$id/$filename" | |
done | |
done |
This file contains hidden or 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
pub const WPLACE_PALETTE: [[u8; 3]; 63] = [ | |
// black | |
[0, 0, 0], | |
[60, 60, 60], | |
[120, 120, 120], | |
[170, 170, 170], | |
[210, 210, 210], | |
[255, 255, 255], | |
[96, 0, 24], | |
[165, 14, 30], |
This file contains hidden or 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
use image::Luma; | |
fn bayer_matrix(n: usize) -> Vec<Vec<u8>> { | |
assert!([2, 4, 8, 16, 32, 64, 128, 256].contains(&n)); | |
// 递归生成 | |
fn generate(size: usize) -> Vec<Vec<u32>> { | |
if size == 2 { | |
return vec![vec![0, 2], vec![3, 1]]; | |
} |
This file contains hidden or 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
#![feature(decl_macro)] | |
use crate::cli::Commands; | |
use anyhow::anyhow; | |
use clap::Parser; | |
use flate2::Compression; | |
use indicatif::{ProgressBar, ProgressStyle}; | |
use once_cell::sync::Lazy; | |
use pathdiff::diff_paths; | |
use png::{BitDepth, ColorType, Info}; |
由于我需要使用代理访问Wplace,所以使用mitmproxy的代理链支持。运行如下命令:
mitmdump --mode upstream:http://127.0.0.1:16619 -s mitm.py
然后把浏览器的代理设置成http://localhost:8080
即可。
但是使用下来,我不知道问题出在哪里,很不稳定。有时就加载不出来,需要重启mitmdump以及刷新网页。反正很不稳定。不好用。遂放弃。
https://github.com/bczhc/discord-mutual-friends-and-servers
- 使用venv安装好依赖。
- 运行
python3 main.py -j True -i <Server Name>
- 获取结果保存在
output/out.jsonl
- 使用jq对mutualGuilds数量由高到低排序
cat out.jsonl \ | jq '[.name, (.mutualGuilds | length), (.mutualGuilds | map(.guild.name))]' -c \
| jq -s 'sort_by(.[1]) | reverse[]' -c | bat
This file contains hidden or 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
Happy 2015! 😄 | |
William♥Allie | |
Nathan♥Noriko | |
Nathan & Noriko♥Noah | |
JH♥LH | |
brad♥http://www.blockchain.capital | |
1♥1 | |
Matt♥Tacos | |
Nathan♥DraperU | |
Nathan♥Draper University |
This file contains hidden or 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
https://ebird.org/map/points?speciesCode=rewbul&byr=1900&eyr=2025&yr=all&bmo=1&emo=12&maxY=30.478507676961687&maxX=120.7798322521297&minY=29.78845980687814&ev=Z&excludeExX=false&excludeExAll=false&minX=119.1978010021297 |
NewerOlder