I hereby claim:
- I am zjuyk on github.
- I am zjuyk (https://keybase.io/zjuyk) on keybase.
- I have a public key ASDXHX6FhJDoD4p-XnZ70T1a5FxgnZmsIU78wg6W3I8Jxgo
To claim this, I am signing this object:
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
int main(){ | |
FILE *fp = fopen("badapple.txt", "r"); // open character file | |
fseek(fp, 0, SEEK_END); // play from end of file | |
int fsize = ftell(fp); // get file size (byte) | |
fseek(fp, 0, SEEK_SET); // back to start of file |
import jieba | |
from wordcloud import WordCloud | |
file = open("input.txt", encoding='utf-8') | |
word_stream = file.read() | |
word_list = jieba.lcut(word_stream) | |
word_string = " ".join(word_list) | |
w = WordCloud('NotoSansCJK-Regular.ttc', width=1920, height=1080) | |
w.generate(word_string) | |
image = w.to_image() |
import re | |
# 注意默认编码是 UTF-8 | |
file = open("input.srt") | |
lines = file.readlines() | |
file.close() | |
text = "" | |
for line in lines: | |
if re.search('^[0-9]+$', line) is None and \ |
I hereby claim:
To claim this, I am signing this object:
import matplotlib.image as img | |
import pandas as pd | |
from scipy.cluster.vq import whiten, kmeans | |
target_image = img.imread("path/to/target_image") | |
r = [] | |
g = [] | |
b = [] | |
for row in target_image: | |
for temp_r, temp_g, temp_b in row: |