Python 官方文档:入门教程 => 点击学习
程序员的520怎么表白 照片墙 TODO 爱心情书 TODO 原文地址: https://GitHub.com/HeLiangHIT/coders_love 照片墙 依赖: pip install Im
原文地址: https://GitHub.com/HeLiangHIT/coders_love
依赖:
pip install Image clize
使用:
python picture_wall.py --help
Usage: ./picture_wall.py [OPTioNS] [text...]
生成照片墙
Arguments:
text... Text of picture wall, if not defined this will generage a rectangle picture wall
Options:
-s, --font-size=INT font size of a clear value (default: 20)
-e, --edge-len=INT sub picture's egde length (default: 50)
-w, --wall-width=INT picture number of rectangle width (default: 20)
-l, --wall-length=INT picture number of rectangle length (default: 10)
-d, --pic-dir=STR picture's path (default: ./img)
-o, --out-dir=STR output dir (default: ./out)
-p, --font-path=STR font path (default: ./demo.ttf)
Other actions:
-h, --help Show the help
for example:
./picture_wall.py I Love U -s 30 -e 10
./picture_wall.py 我爱你 -s 30 -e 10
依赖:
pip install jieba numpy pandas matplotlib Wordcloud scipy wordcloud
使用:
Python heart_cloud_word.py --help
Usage: ./heart_cloud_word.py [OPTIONS] [par...]
生成文字云
Arguments:
par...
Options:
-t, --text-file=STR text file that contain all you word (default: ./data/love_letter.txt)
-s, --stop-file=STR the stop word which can't be considered (default: ./data/stopwords.txt)
-c, --color-img=STR the color map img (default: ./data/pink.jpg)
-m, --mask-file=STR the mask img for the word
-o, --out-file=STR output file path which should with sufix of png/jpg... (default: ./out/word_cloud.png)
-p, --font-path=STR font path (default: ./demo.ttf)
Other actions:
-h, --help Show the help
for example:
./heart_cloud_word.py
--结束END--
本文标题: 用python完成程序员的表白
本文链接: https://www.lsjlt.com/news/192113.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0