🐛fix?...
Browse files
files_cells/notebooks/en/downloading_en.ipynb
CHANGED
|
@@ -88,7 +88,7 @@
|
|
| 88 |
" clear_output()\n",
|
| 89 |
"\n",
|
| 90 |
"\n",
|
| 91 |
-
"#
|
| 92 |
"def load_settings(path):\n",
|
| 93 |
" if os.path.exists(path):\n",
|
| 94 |
" with open(path, 'r') as file:\n",
|
|
@@ -110,7 +110,7 @@
|
|
| 110 |
"locals().update({key: settings.get(key) for key in VARIABLES})\n",
|
| 111 |
"\n",
|
| 112 |
"\n",
|
| 113 |
-
"#
|
| 114 |
"# Setup Timer\n",
|
| 115 |
"try:\n",
|
| 116 |
" start_colab\n",
|
|
@@ -144,17 +144,16 @@
|
|
| 144 |
" print(\"\\r🔥 The files have been moved!\")\n",
|
| 145 |
"\n",
|
| 146 |
"\n",
|
| 147 |
-
"# ================= MAIN CODE
|
| 148 |
"# WebUI switch\n",
|
| 149 |
"if os.path.exists(webui_path):\n",
|
| 150 |
" if UI != OLD_UI:\n",
|
| 151 |
-
" print(f'Switching the WebUI from \\033[33m{OLD_UI}\\033[0m to \\033[33m{UI}\\033[0m
|
| 152 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 153 |
" shutil.rmtree(webui_path)\n",
|
| 154 |
"\n",
|
| 155 |
" # Updating the environment variable after a change\n",
|
| 156 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
| 157 |
-
" print('\\rDone!')\n",
|
| 158 |
" time.sleep(2)\n",
|
| 159 |
" clear_output()\n",
|
| 160 |
"\n",
|
|
|
|
| 88 |
" clear_output()\n",
|
| 89 |
"\n",
|
| 90 |
"\n",
|
| 91 |
+
"# ============ loading settings V4 =============\n",
|
| 92 |
"def load_settings(path):\n",
|
| 93 |
" if os.path.exists(path):\n",
|
| 94 |
" with open(path, 'r') as file:\n",
|
|
|
|
| 110 |
"locals().update({key: settings.get(key) for key in VARIABLES})\n",
|
| 111 |
"\n",
|
| 112 |
"\n",
|
| 113 |
+
"# =================== OTHER ====================\n",
|
| 114 |
"# Setup Timer\n",
|
| 115 |
"try:\n",
|
| 116 |
" start_colab\n",
|
|
|
|
| 144 |
" print(\"\\r🔥 The files have been moved!\")\n",
|
| 145 |
"\n",
|
| 146 |
"\n",
|
| 147 |
+
"# ================= MAIN CODE ==================\n",
|
| 148 |
"# WebUI switch\n",
|
| 149 |
"if os.path.exists(webui_path):\n",
|
| 150 |
" if UI != OLD_UI:\n",
|
| 151 |
+
" print(f'Switching the WebUI from \\033[33m{OLD_UI}\\033[0m to \\033[33m{UI}\\033[0m:\\n', end='')\n",
|
| 152 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 153 |
" shutil.rmtree(webui_path)\n",
|
| 154 |
"\n",
|
| 155 |
" # Updating the environment variable after a change\n",
|
| 156 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
|
|
|
| 157 |
" time.sleep(2)\n",
|
| 158 |
" clear_output()\n",
|
| 159 |
"\n",
|
files_cells/notebooks/ru/downloading_ru.ipynb
CHANGED
|
@@ -88,7 +88,7 @@
|
|
| 88 |
" clear_output()\n",
|
| 89 |
"\n",
|
| 90 |
"\n",
|
| 91 |
-
"#
|
| 92 |
"def load_settings(path):\n",
|
| 93 |
" if os.path.exists(path):\n",
|
| 94 |
" with open(path, 'r') as file:\n",
|
|
@@ -110,7 +110,7 @@
|
|
| 110 |
"locals().update({key: settings.get(key) for key in VARIABLES})\n",
|
| 111 |
"\n",
|
| 112 |
"\n",
|
| 113 |
-
"# =================== OTHER
|
| 114 |
"# Setup Timer\n",
|
| 115 |
"try:\n",
|
| 116 |
" start_colab\n",
|
|
@@ -144,17 +144,16 @@
|
|
| 144 |
" print(\"\\r🔥 Файлы были перемещены!\")\n",
|
| 145 |
"\n",
|
| 146 |
"\n",
|
| 147 |
-
"# ================= MAIN CODE
|
| 148 |
"# WebUI switch\n",
|
| 149 |
"if os.path.exists(webui_path):\n",
|
| 150 |
" if UI != OLD_UI:\n",
|
| 151 |
-
" print(f'Переключение веб-интерфейса с \\033[33m{OLD_UI}\\033[0m на \\033[33m{UI}\\033[0m
|
| 152 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 153 |
" shutil.rmtree(webui_path)\n",
|
| 154 |
"\n",
|
| 155 |
" # Updating the environment variable after a change\n",
|
| 156 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
| 157 |
-
" print('\\rГотово!')\n",
|
| 158 |
" time.sleep(2)\n",
|
| 159 |
" clear_output()\n",
|
| 160 |
"\n",
|
|
|
|
| 88 |
" clear_output()\n",
|
| 89 |
"\n",
|
| 90 |
"\n",
|
| 91 |
+
"# ============ loading settings V4 =============\n",
|
| 92 |
"def load_settings(path):\n",
|
| 93 |
" if os.path.exists(path):\n",
|
| 94 |
" with open(path, 'r') as file:\n",
|
|
|
|
| 110 |
"locals().update({key: settings.get(key) for key in VARIABLES})\n",
|
| 111 |
"\n",
|
| 112 |
"\n",
|
| 113 |
+
"# =================== OTHER ====================\n",
|
| 114 |
"# Setup Timer\n",
|
| 115 |
"try:\n",
|
| 116 |
" start_colab\n",
|
|
|
|
| 144 |
" print(\"\\r🔥 Файлы были перемещены!\")\n",
|
| 145 |
"\n",
|
| 146 |
"\n",
|
| 147 |
+
"# ================= MAIN CODE ==================\n",
|
| 148 |
"# WebUI switch\n",
|
| 149 |
"if os.path.exists(webui_path):\n",
|
| 150 |
" if UI != OLD_UI:\n",
|
| 151 |
+
" print(f'Переключение веб-интерфейса с \\033[33m{OLD_UI}\\033[0m на \\033[33m{UI}\\033[0m:\\n', end='')\n",
|
| 152 |
" copy_items_with_replace(webui_path, temporarily_dir)\n",
|
| 153 |
" shutil.rmtree(webui_path)\n",
|
| 154 |
"\n",
|
| 155 |
" # Updating the environment variable after a change\n",
|
| 156 |
" os.environ['SDW_OLD_UI'] = UI\n",
|
|
|
|
| 157 |
" time.sleep(2)\n",
|
| 158 |
" clear_output()\n",
|
| 159 |
"\n",
|
files_cells/python/en/downloading_en.py
CHANGED
|
@@ -78,7 +78,7 @@ if not os.path.exists(flag_file):
|
|
| 78 |
clear_output()
|
| 79 |
|
| 80 |
|
| 81 |
-
#
|
| 82 |
def load_settings(path):
|
| 83 |
if os.path.exists(path):
|
| 84 |
with open(path, 'r') as file:
|
|
@@ -100,7 +100,7 @@ VARIABLES = [
|
|
| 100 |
locals().update({key: settings.get(key) for key in VARIABLES})
|
| 101 |
|
| 102 |
|
| 103 |
-
#
|
| 104 |
# Setup Timer
|
| 105 |
try:
|
| 106 |
start_colab
|
|
@@ -134,17 +134,16 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 134 |
print("\r🔥 The files have been moved!")
|
| 135 |
|
| 136 |
|
| 137 |
-
# ================= MAIN CODE
|
| 138 |
# WebUI switch
|
| 139 |
if os.path.exists(webui_path):
|
| 140 |
if UI != OLD_UI:
|
| 141 |
-
print(f'Switching the WebUI from \033[33m{OLD_UI}\033[0m to \033[33m{UI}\033[0m
|
| 142 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 143 |
shutil.rmtree(webui_path)
|
| 144 |
|
| 145 |
# Updating the environment variable after a change
|
| 146 |
os.environ['SDW_OLD_UI'] = UI
|
| 147 |
-
print('\rDone!')
|
| 148 |
time.sleep(2)
|
| 149 |
clear_output()
|
| 150 |
|
|
|
|
| 78 |
clear_output()
|
| 79 |
|
| 80 |
|
| 81 |
+
# ============ loading settings V4 =============
|
| 82 |
def load_settings(path):
|
| 83 |
if os.path.exists(path):
|
| 84 |
with open(path, 'r') as file:
|
|
|
|
| 100 |
locals().update({key: settings.get(key) for key in VARIABLES})
|
| 101 |
|
| 102 |
|
| 103 |
+
# =================== OTHER ====================
|
| 104 |
# Setup Timer
|
| 105 |
try:
|
| 106 |
start_colab
|
|
|
|
| 134 |
print("\r🔥 The files have been moved!")
|
| 135 |
|
| 136 |
|
| 137 |
+
# ================= MAIN CODE ==================
|
| 138 |
# WebUI switch
|
| 139 |
if os.path.exists(webui_path):
|
| 140 |
if UI != OLD_UI:
|
| 141 |
+
print(f'Switching the WebUI from \033[33m{OLD_UI}\033[0m to \033[33m{UI}\033[0m:\n', end='')
|
| 142 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 143 |
shutil.rmtree(webui_path)
|
| 144 |
|
| 145 |
# Updating the environment variable after a change
|
| 146 |
os.environ['SDW_OLD_UI'] = UI
|
|
|
|
| 147 |
time.sleep(2)
|
| 148 |
clear_output()
|
| 149 |
|
files_cells/python/ru/downloading_ru.py
CHANGED
|
@@ -78,7 +78,7 @@ if not os.path.exists(flag_file):
|
|
| 78 |
clear_output()
|
| 79 |
|
| 80 |
|
| 81 |
-
#
|
| 82 |
def load_settings(path):
|
| 83 |
if os.path.exists(path):
|
| 84 |
with open(path, 'r') as file:
|
|
@@ -100,7 +100,7 @@ VARIABLES = [
|
|
| 100 |
locals().update({key: settings.get(key) for key in VARIABLES})
|
| 101 |
|
| 102 |
|
| 103 |
-
# =================== OTHER
|
| 104 |
# Setup Timer
|
| 105 |
try:
|
| 106 |
start_colab
|
|
@@ -134,17 +134,16 @@ def copy_items_with_replace(src_base, dst_base):
|
|
| 134 |
print("\r🔥 Файлы были перемещены!")
|
| 135 |
|
| 136 |
|
| 137 |
-
# ================= MAIN CODE
|
| 138 |
# WebUI switch
|
| 139 |
if os.path.exists(webui_path):
|
| 140 |
if UI != OLD_UI:
|
| 141 |
-
print(f'Переключение веб-интерфейса с \033[33m{OLD_UI}\033[0m на \033[33m{UI}\033[0m
|
| 142 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 143 |
shutil.rmtree(webui_path)
|
| 144 |
|
| 145 |
# Updating the environment variable after a change
|
| 146 |
os.environ['SDW_OLD_UI'] = UI
|
| 147 |
-
print('\rГотово!')
|
| 148 |
time.sleep(2)
|
| 149 |
clear_output()
|
| 150 |
|
|
|
|
| 78 |
clear_output()
|
| 79 |
|
| 80 |
|
| 81 |
+
# ============ loading settings V4 =============
|
| 82 |
def load_settings(path):
|
| 83 |
if os.path.exists(path):
|
| 84 |
with open(path, 'r') as file:
|
|
|
|
| 100 |
locals().update({key: settings.get(key) for key in VARIABLES})
|
| 101 |
|
| 102 |
|
| 103 |
+
# =================== OTHER ====================
|
| 104 |
# Setup Timer
|
| 105 |
try:
|
| 106 |
start_colab
|
|
|
|
| 134 |
print("\r🔥 Файлы были перемещены!")
|
| 135 |
|
| 136 |
|
| 137 |
+
# ================= MAIN CODE ==================
|
| 138 |
# WebUI switch
|
| 139 |
if os.path.exists(webui_path):
|
| 140 |
if UI != OLD_UI:
|
| 141 |
+
print(f'Переключение веб-интерфейса с \033[33m{OLD_UI}\033[0m на \033[33m{UI}\033[0m:\n', end='')
|
| 142 |
copy_items_with_replace(webui_path, temporarily_dir)
|
| 143 |
shutil.rmtree(webui_path)
|
| 144 |
|
| 145 |
# Updating the environment variable after a change
|
| 146 |
os.environ['SDW_OLD_UI'] = UI
|
|
|
|
| 147 |
time.sleep(2)
|
| 148 |
clear_output()
|
| 149 |
|