Spaces:
Running
Running
Delete rename.ipynb
Browse files- rename.ipynb +0 -105
rename.ipynb
DELETED
@@ -1,105 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"cells": [
|
3 |
-
{
|
4 |
-
"cell_type": "code",
|
5 |
-
"execution_count": 1,
|
6 |
-
"metadata": {},
|
7 |
-
"outputs": [
|
8 |
-
{
|
9 |
-
"data": {
|
10 |
-
"text/plain": [
|
11 |
-
"2"
|
12 |
-
]
|
13 |
-
},
|
14 |
-
"execution_count": 1,
|
15 |
-
"metadata": {},
|
16 |
-
"output_type": "execute_result"
|
17 |
-
}
|
18 |
-
],
|
19 |
-
"source": [
|
20 |
-
"1 + 1"
|
21 |
-
]
|
22 |
-
},
|
23 |
-
{
|
24 |
-
"cell_type": "code",
|
25 |
-
"execution_count": 2,
|
26 |
-
"metadata": {},
|
27 |
-
"outputs": [],
|
28 |
-
"source": [
|
29 |
-
"all_filelists_path = \"embeddings/all_filelists.txt\"\n",
|
30 |
-
"\n",
|
31 |
-
"with open(all_filelists_path, \"r\", encoding=\"utf-8\") as f:\n",
|
32 |
-
" all_filelists = f.readlines()\n",
|
33 |
-
"\n",
|
34 |
-
"all_filelists = [x.strip() for x in all_filelists]"
|
35 |
-
]
|
36 |
-
},
|
37 |
-
{
|
38 |
-
"cell_type": "code",
|
39 |
-
"execution_count": 5,
|
40 |
-
"metadata": {},
|
41 |
-
"outputs": [
|
42 |
-
{
|
43 |
-
"data": {
|
44 |
-
"text/plain": [
|
45 |
-
"\"audio_files\\\\Aino+Links_Sousaku_Kanojo_no_Ren'ai_Koushiki\\\\ちなみ\\\\tin_0000.ogg\""
|
46 |
-
]
|
47 |
-
},
|
48 |
-
"execution_count": 5,
|
49 |
-
"metadata": {},
|
50 |
-
"output_type": "execute_result"
|
51 |
-
}
|
52 |
-
],
|
53 |
-
"source": [
|
54 |
-
"all_filelists[0]"
|
55 |
-
]
|
56 |
-
},
|
57 |
-
{
|
58 |
-
"cell_type": "code",
|
59 |
-
"execution_count": 6,
|
60 |
-
"metadata": {},
|
61 |
-
"outputs": [],
|
62 |
-
"source": [
|
63 |
-
"# Make all suffice to \".ogg\"\n",
|
64 |
-
"from pathlib import Path\n",
|
65 |
-
"\n",
|
66 |
-
"all_filelists = [str(Path(x).with_suffix(\".ogg\")) for x in all_filelists]"
|
67 |
-
]
|
68 |
-
},
|
69 |
-
{
|
70 |
-
"cell_type": "code",
|
71 |
-
"execution_count": 7,
|
72 |
-
"metadata": {},
|
73 |
-
"outputs": [],
|
74 |
-
"source": [
|
75 |
-
"# Write\n",
|
76 |
-
"\n",
|
77 |
-
"all_filelists_path = \"embeddings/all_filelists_ogg.txt\"\n",
|
78 |
-
"\n",
|
79 |
-
"with open(all_filelists_path, \"w\", encoding=\"utf-8\") as f:\n",
|
80 |
-
" f.write(\"\\n\".join(all_filelists))"
|
81 |
-
]
|
82 |
-
}
|
83 |
-
],
|
84 |
-
"metadata": {
|
85 |
-
"kernelspec": {
|
86 |
-
"display_name": ".venv",
|
87 |
-
"language": "python",
|
88 |
-
"name": "python3"
|
89 |
-
},
|
90 |
-
"language_info": {
|
91 |
-
"codemirror_mode": {
|
92 |
-
"name": "ipython",
|
93 |
-
"version": 3
|
94 |
-
},
|
95 |
-
"file_extension": ".py",
|
96 |
-
"mimetype": "text/x-python",
|
97 |
-
"name": "python",
|
98 |
-
"nbconvert_exporter": "python",
|
99 |
-
"pygments_lexer": "ipython3",
|
100 |
-
"version": "3.11.10"
|
101 |
-
}
|
102 |
-
},
|
103 |
-
"nbformat": 4,
|
104 |
-
"nbformat_minor": 2
|
105 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|