12/25/2020
12/23/2020
delete over than specific megabyte in git history using bfg
firstly, install bfg
on mac
> brew install bfg
delete object if over than 50m in git commit history
> bfg --strip-blobs-bigger-than 50M
make sure & apply .gitignore
First, to check what files are you actually tracking
> git ls-tree --name-only --full-tree -r HEAD
Let say that you found unwanted files in a directory like cache/ so, it's safer to target that directory instead of all of your files.
So instead of:
> git rm -r --cached .
It's safer to target the unwanted file or directory:
> git rm -r --cached cache/
Then proceed to add all changes:
> git add .
and commit
> git commit -m ".gitignore is now working"
list up and sorting file(object) size in git / command
use following cmd:
> git rev-list --objects --all | git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' | sed -n 's/^blob //p' | sort --numeric-sort --key=2 | cut -c 1-12,41- | $(command -v gnumfmt || echo numfmt) --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
12/22/2020
get YouTube video url from channel name, python youtube-dl library
install youtube-dl package first.
pip install YouTube-dl
<code>
</code>
Thank you.
Download or streaming YouTube video through cv2, python sample code
firstly, install pafy python package
> pip install pafyok then everything will be work using following code:
Thank you.
12/21/2020
python notebook clear output
from IPython.display import clear_output
for i in range(10):
clear_output(wait=True)
print("Hello World!")
12/17/2020
generate .spec file with onefile option for pyinstaller
Use
pyi-makespec --onefile yourprogram.py
to generate a sample spec file for onefile mode.
reference :
https://stackoverflow.com/questions/47143315/using-onefile-with-a-spec-in-pyinstaller
12/14/2020
rsync exclude file and folder
command is like that:
rsync -avz --progress ./source ./destination --exclude-from './exclude-list.txt'
you can make ignore file and folder like this:
exclude-list.txt
*.txt
*.jpg
*.jpeg
*.zip
*.ipynb
.git
*.json
*.done
*.png
*.xml
*.pyc
*/build
*/dist
*/experiment
*/grapher_outputs
*.pkl
*/system_evaluation
12/10/2020
linux screen command list in summary
screen -S name
*leave with alive
Ctrl a, d
*enter screen
*kill specific screen
screen -S name -X quit
*show screen list
screen -ls
*detach specific screen
screen -d name
killall screen
12/07/2020
shuffle dict in python
code
result
{'b': [2, 4], 'd': [2, 4], 'a': [1, 2], 'c': [3, 5]}
12/01/2020
torch.nan_to_num not found error
torch.nan_to_num
This is for 1.8 version.
so use it instead of this.
temp[torch.isnan(temp)] = 0
temp is tensor
-
CUDA_ARCH_BIN Table for gpu type Jetson Products GPU Compute Capability Jetson AGX Xavier 7.2 Jetson Nano 5.3 Jetson TX2 6.2 Jetson TX1 5.3 ...
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv <-> rgb converting example code. refer to this page -> ht...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
make different port number Window > .\python_embeded\python.exe -s ComfyUI\ main.py --port 8189 --windows-standalone-build Linux or Ma...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
On the window, we made new file easily by right button click. But on the mac, there is no function. So, very incompatible... By the way, ...
-
This is example for background subtraction on opencv 3.2 version previously, I post 2.7 version example on here. http://study.marearts.co...
-
error: . VanillaPipeline.get_train_loss_dict: 12.6875 Traceback (most recent call last): File "/home/mare/anaconda3...
-
>sudo lsof -i :8188 python 231134 mare 45u IPv4 2074469 0t0 TCP localhost:8188->localhost:42132 (CLOSE_WAIT) python 23113...