• Stars
    star
    1,070
  • Rank 42,257 (Top 0.9 %)
  • Language
    Python
  • License
    Mozilla Public Li...
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

【幼女Code】反和谐超级武器!

【幼女Code】反和谐超级武器!

你还在因为在群名里加入色图而被QQ改成一个「*」而苦恼吗?你还在因为在红包祝福里写「年轻人好好自慰」而白白花钱吗?

快使用幼女Code吧!

幼女Code使用Librian幼女娱乐中心最新研发的unvcode,可以快速解决你的一切问题!

原理

在unicode中(注意这不是unvcode),有很多字,它们看起来长得很像,但是它们的ord不一样。

这样一来,只要把字符串里原本的字……啊,点到为止,再说下去就不好玩了。

效果

./doc/2333.jpg

幼女Code真是太棒了!

在线Demo

https://unvcode.librian.net/

因为JS处理图像很麻烦,所以这是把中间结果打表到代码里的,如果和Python的输出对不齐是正常现象。

接口

def unvcode(s: str, skip_ascii=True, mse=0.1) -> Tuple[str, Tuple[float, ...]]:

输入一个字符串,返回改变后的字符串、每个字符被改变后与原本的像素差异(没变就是None)

如果skip_ascii开启则会跳过ascii字符。

mse是字符相似度的阈值。

样例:

import unvcode
s, var = unvcode.unvcode('Librian幼女娱乐中心开业了,注册即送色图!')
print(s) 
print(var) 

输出:

Librian幼⼥娱乐㆗⼼开业了,注册即送⾊图!
(None, None, None, None, None, None, None, None, 0.0, None, None, 0.009146429779930796, 0.0, None, None, 0.0, None, None, None, None, None, 0.0, None, None)

注意,这句话看起来的样子取决于你的系统字体,所以我也不知道它会是什么样的……因为有一些字在A字体下看起来是一样的,但是在B字体下看起来就不一样。

默认的字体是思源宋体,思源宋体好啊。
如果你要选择字体,比如用微软雅黑,那就unvcode.font = 'msyh.ttc',顺便一提,我发现YuGothM.ttc的效果是最好的……

安装

pip install unvcode

然后在代码里import unvcode就行了,就是这么简单!

结束

如果你觉得幼女Code对你的工作或学习有所帮助,欢迎给作者送一些幼女过来。

More Repositories

1

match-you

【您配吗】配你吗
JavaScript
1,448
star
2

Vtuber_Tutorial

【教程】从零开始的自制Vtuber!
Python
915
star
3

Librian

【Librian】簡明強大的 Galgame | Visual Novel 引擎
Python
652
star
4

yinglish

【yinglish】淫语翻译机!
Python
517
star
5

sese-engine

【sese-engine】新时代的搜索引擎!
Python
480
star
6

steal_piano

【steal piano】GitHub偷情分析工具!
Python
463
star
7

Night-Beam

【Night Beam】去除文本马赛克的随机算法!
Python
206
star
8

internet-dataset

【数据集】好耶,是互联网数据集!
168
star
9

kill3d

三次元人类屏蔽器!
Python
167
star
10

color_site

【色圖網站】
HTML
144
star
11

unv-shield

【幼盾】个性化图片徽章服务!
Python
141
star
12

bnhhsh

【不能好好说话】不对劲的拼音首字母缩写翻译工具
Python
103
star
13

modnet-entry

【MODNet-entry】开箱即用的人像抠图工具
Python
100
star
14

not_translator

【not translator】不会翻译机!
Python
79
star
15

cotrace

【cotrace】同事追踪器!
Python
73
star
16

thyrune

你的纪念碑!
Python
72
star
17

librian-can

【轻小说连载】Librian萝莉会所!
57
star
18

minecraft

用Python-OpenGL实现的minecraft
Python
53
star
19

loliimg

【萝莉图片算法】高损图像压缩算法!?
Python
52
star
20

smoke_of_deceit

把代码藏起来!
50
star
21

python-anti-seduce-system

针对Python语言防沉迷调整的说明
Python
49
star
22

ciallo

【ciallo】别他妈了隔壁念你那通稿
JavaScript
44
star
23

rimochan

莉沫酱GitHub展板
Python
44
star
24

...

【萝莉病毒?】删不掉的..!
Pascal
42
star
25

rimo-rss-reader

【rimo-rss-reader】莉沫酱RSS阅读器!
Python
40
star
26

Je-Suis-Le-Deluge

莉沫酱革命协议!
40
star
27

i7h

【i18nglish】自动i18n!
Python
35
star
28

hoshi

【星】pdf扫描件 转 docx
Python
34
star
29

water-generator

这次是真的发水机!
34
star
30

chao

【超】Python魔法加速器!
Python
33
star
31

rime-unvcode

幼⼥输⼊法!
33
star
32

raspberry-pi-bedroom-monitor

基于树莓派的多功能寝室监控系统
Python
32
star
33

rimochan-LORA

【rimochan-LORA】量产型电子莉沫酱!
32
star
34

rimochan-cookbook

莉沫酱小本子!
32
star
35

flowerpot

不用浇水的花盆!
30
star
36

kokoro

这次是可可萝病毒!
Python
30
star
37

lunar-Ci

【lunar-Ci】今日诸事不宜!
Python
27
star
38

Rimo-Kitchen

莉沫酱小厨房!
27
star
39

unvdisco

【幼女盘】网盘界文艺复兴!
Python
24
star
40

changgelog

【唱歌log】让你的程序学会唱歌!
Python
22
star
41

GPT-reader

【GPT-reader】让GPT帮你读小说吧!
Python
21
star
42

Invoker

【Invoker】word2vec的智能記單詞app
Python
21
star
43

True-tool

【真具】真正的CG包去重壓縮工具
Python
20
star
44

PSO-image-match

神奇的粒子群图像匹配! Particle Swarm Optimization(PSO) image template matching
Python
20
star
45

inherit

【教程】莉沫酱教你学继承!?
Python
17
star
46

child-lock

【child-lock】儿童锁!
Python
15
star
47

dota2-card

【dota2卡】老子不上班了!
Python
14
star
48

Cinder

烤肉识别器!
Python
13
star
49

Lunatic_red_eyes

【幻朧月睨】催眠調教的app!
Python
11
star
50

rimo-lab

莉沫酱人体实验室!
11
star
51

my_2dkf_css

我在緋月論壇用的CSS
Sass
10
star
52

paradox-mod-translator

P社mod翻译器!
Python
9
star
53

jiu_zi_qie

【九字切】背誦日文單詞!
Python
9
star
54

rimo_utils

莉沫工具箱
Python
9
star
55

hrml

【hrml】超莉沫酱自慰语言!
Python
9
star
56

negate_hypnotic

抗催眠装置!
Python
9
star
57

hw

黄巍机器人!
Python
8
star
58

conception-license

绝对遵守☆强制子作许可证
8
star
59

github-close-machine

GitHub快速取关机!
Python
8
star
60

copylot

【copylot】Photoshop的实时stable diffusion插件!
Python
8
star
61

unvqlo

【unvqlo】莉沫酱周边博物馆!
JavaScript
8
star
62

keras-ACG-face-alignment

【ACG-face-alignment】ACG臉部對齊
Python
8
star
63

readme-hack

【???】給github的readme添加css
CSS
7
star
64

rimo_storage

莉沫酱存储!
Python
7
star
65

yuri

这次是真的催眠调教器!
Python
7
star
66

sunder

心灵控制器!
Python
6
star
67

the-destiny-star-of-girlfriend

【宗教迷信】宿星的女朋友
6
star
68

Pepin

同事批评器!
Python
6
star
69

waifu-sensor

【老婆探测器】一个普通的动漫角色分类模型
Python
5
star
70

Mask-Translator

可重用的代碼翻譯器!
Python
4
star
71

synthetic-css

Synthetic風格CSS
Sass
4
star
72

not_view

【不看】不好的图片浏览器
Python
4
star
73

Gensho

【幻書】能編程的自然中文!
Python
4
star
74

stable-diffusion-anime-tag-benchmark

stable diffusion 动漫标签自动化评测
Python
4
star
75

snow

【雪】自用的编译运行工具
Python
3
star
76

Free4

放肆的解压算法!
Python
3
star
77

false_moon

【夜空珠】keras的深度圖像隱寫術!
Python
3
star
78

seal-sorcery

印刷术!
Python
3
star
79

LG-University

莆田理工大学文档
HTML
2
star
80

cm3d2-parser

3D定制女仆MOD解析器
Python
2
star
81

pmd

【pmd】python雜交cmd!
Python
2
star
82

vscode-rimo-theme

vscode主题
Sass
1
star
83

Qi

气象观测站!
1
star