This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import perf_counter | |
import torch | |
device = 'cpu' # cpu | |
a = torch.randn(7000,5000).to(device) | |
b = torch.randn(5000,7000).to(device) | |
print(a.device, b.device) | |
start = perf_counter() | |
a @ b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Получить .spec файл командой | |
pyinstaller --onefile src/main.py | |
2. Добавить в datas .spec файла пути | |
datas=[ | |
('C:\\Program Files\\poppler-22.01.0\\Library\\bin', 'poppler'), | |
('src', 'src'), | |
('config', 'config'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. Вход | |
User/.git-credentials: записать одну строку | |
https://maxfil333:[email protected] | |
1. Восстановить до состояния последнего коммита | |
git reset --hard HEAD | |
git checkout HEAD -- .\config\styles.css (для одного файла) | |
2. Удалить файл из индекса | |
git reset / git reset <file> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. (CMD) -> OK X: \\10.10.0.3\docs Microsoft Windows Network | |
net use | |
2. (terminal) | |
pyinstaller --add-data "C:\Program Files\Tesseract-OCR;Tesseract-OCR" --onefile main.py | |
3) (terminal) -> main.spec | |
pyi-makespec main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U | |
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
создать ярлык на рабочем столе: | |
C:\Users\user\anaconda3\Scripts\jupyter-notebook-script.py --notebook-dir="D:\\CODE" | |
расположение файла (строка C:\Users\user\anaconda3\Scripts\jupyter-notebook-script.py)(может отличаться): | |
Пуск - Jupyter Notebook- перейти к расположению - свойства - ярлык - объект | |
OR | |
Jupyter notebook -> terminal -> jupyter notebook --notebook-dir="D:\\filippMI" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Для того чтобы установить библиотеки в виртуальное окружение (venv) в PyCharm, следуйте этим шагам: | |
1) | |
cd путь_к_вашему_репозиторию | |
python -m venv venv | |
Это создаст папку venv в вашем проекте, которая будет содержать виртуальное окружение. | |
2) | |
venv\Scripts\activate | |
3) | |
pip install -r requirements.txt | |
4) |