Friday, December 23, 2022

Download zip file from Google Drive

 First

Share your file in GD (with anybody access by link) and get FILEID

Second

Execute next code(replace FILEID and choose FILENAME):

wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

 

Note:

Previous methods doesn't work, because now GD needs confirmation, then using cookies it's possible.

Monday, December 12, 2022

Ubuntu NFS Installation

On Server (10.10.7.229):

$ sudo apt install nfs-kernel-server  #install server

$ sudo mkdir -p /mnt/nfs_drive  #create share point

$ sudo chown -R nobody:nogroup /mnt/nfs_drive  #no owner

$ sudo chmod 777 /mnt/nfs_drive  #set r/w permission

$ sudo vi /etc/exports  #define clients grants
 

/mnt/nfs_drive 10.10.7.218(rw,sync,no_subtree_check) #mine
/mnt/nfs_drive 10.10.7.235(rw,sync,no_subtree_check) #houdini

$ sudo exportfs -a

$ sudo systemctl restart nfs-kernel-server
 

On Client: 

$ sudo apt install nfs-common 

$ sudo mkdir -p /mnt/nfs_drive_client   #mirror

$ sudo mount 10.10.7.229:/mnt/nfs_drive /mnt/nfs_drive_client

Notes: 

$ sudo ufw status  #verify the firewall, more details in reference[0]


References: 

[0] Working https://linuxhint.com/install-and-configure-nfs-server-ubuntu-22-04/

[1] https://www.tecmint.com/install-nfs-server-on-ubuntu/

Wednesday, November 23, 2022

qemu bridge to enable network during simulation

 Install brctl

 sudo apt install bridge-utils

Add new virtual bridge

sudo brctl addbr virbr0
sudo brctl addif virbr0 eth0 

Check

/etc/qemu-ifup and /etc/qemu-ifdown  #files
 

 

 

 

Monday, November 21, 2022

Candide Model Applications

 

[0] Model and code https://github.com/wobushizhanghua/candide3-face/blob/master/src/main.cpp

[1] Landmark 3D https://webspace.science.uu.nl/~veltk101/publications/art/wss06.pdf 

[2] https://github.com/MarekKowalski/FaceSwap

[3] https://github.com/jorticus/face-replace/blob/master/README.md

 

Friday, November 18, 2022

Gimp Python-Fu

 

[0] https://www.gimp.org/docs/python/index.html#PREGION-OBJECT-MEMBERS

[1] https://www.gimp.org/docs/python/index.html#DRAWABLE-OBJECT-METHODS

[2] http://myvirtualbrain.blogspot.com/2012/06/gimp-python-fu-very-basics.html 

[3] Samples https://github.com/jfmdev/PythonFuSamples

[4] https://github.com/gummyCowboy/GIMP-python-fu

[5] https://gist.github.com/garystafford/5259576a7e9299d5b80284489aa25fc3


Tuesday, May 31, 2022

OnLine Animation

[0] gif editor crop, mp4 to gif https://ezgif.com

[1] https://www.powtoon.com/?locale=en

[2] https://www.animaker.com/

[3] https://biteable.com/

 

 

Tuesday, May 10, 2022

Houdini Trying to use textures

 

[1] How to use textures on Houdini

http://wordpress.discretization.de/houdini/home/advanced-2/textures/

[2] Repository of textures with normals

https://opengameart.org/content/50-free-textures-4-normalmaps

[3] Textures for Blender

https://polyhaven.com/textures/brick/outdoor/wall

[4] HDRs (Environment Ilumination patterns) https://polyhaven.com/hdris

Thursday, May 05, 2022

NVIDIA tools

 

 

[1] https://github.com/NVIDIA/warp

https://media.githubusercontent.com/media/NVIDIA/warp/main/docs/img/gifs/nanovdb.gif

Tuesday, May 03, 2022

Ubuntu upgrade cmake

 

1. Download https://cmake.org/download/

2. Unpack and enter to folder to execute commands

./bootstrap
make -j$(nproc)
sudo make install
 

 References

[1] https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line

 

Wednesday, April 27, 2022

Monday, April 25, 2022

Python tools

#Force to install a version Python-3.7.4

 wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz

tar xvf Python-3.7.4.tgz
cd Python-3.7.4
./configure --enable-optimizations --with-ensurepip=install
make -j 8
sudo make altinstall



#Install pip module into any version of Python

curl -o get-pip.py https://bootstrap.pypa.io/pip/get-pip.py
python3.8 get-pip.py  #or
python3.9 get-pip.py

Wednesday, March 23, 2022

Stock Price Prediction - data source

 

[1] Nasdaq API https://data.nasdaq.com/sign-up 

[2] API https://data.nasdaq.com/tools/python (API is in setting option)


Sunday, March 20, 2022

Monday, March 14, 2022

Convert webp to png

 

Any file to PNG

$ sudo apt install webp
$ for i in *.webp; do name=`echo "$i" | cut -d'.' -f1`; echo "$name"; dwebp "$i"
-o "${name}.png"; done

Add to Nautilus Script
fincahuanaco@pisces:~/.local/share/nautilus/scripts$ cat toPNG   
dwebp $1 -o "$1.png"
rm $1

$chmod +x toPNG 
 
Updated to Selection to PNG (2023)
#!/bin/bash
count=0
success=0

# Transform command line arguments (if provided)
[[ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]] &&
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS=$(printf "%s\n" "$@")

# Process each file in turn
while IFS= read -r src
do
if [[ -f "$src" ]]
then
# Target
dst="${src}.png"

# Primary conversion to PNG
step=0

dwebp $src -o $dst && ((step++))

# Remove src
if [[ step -eq 1 ]]
then
rm $src && ((step++))
fi

# Update
if [[ step -eq 2 ]]
then
((success++))
fi

# Count it
((count++))
fi

done <<<"$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"

[[ count -gt 1 ]] &&
notify-send "Conversion finished ($success files of $count)"

exit $((count - success)) 
 
AVIF format support
[1] libavif https://github.com/AOMediaCodec/libavif/ 
 
References:

[1] https://unix.stackexchange.com/questions/710013/making-a-bash-script-apply-to-only-selected-files-nautilus 








Saturday, March 12, 2022

Linux Libraries path

#Cuda 8.0 Settings
export CUDA_HOME=/usr/local/cuda-8.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64  
PATH=${CUDA_HOME}/bin:${PATH}


#Cuda 9.1 Settings
export CUDA_HOME=/usr/local/cuda-9.1
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64  
PATH=${CUDA_HOME}/bin:${PATH}


#Cuda 9.2 Settings
export CUDA_HOME=/usr/local/cuda-9.2
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64  
PATH=${CUDA_HOME}/bin:${PATH}

 

$ LD_LIBRARY_PATH=. ./programtest  #direct execution
 

$ echo $LD_LIBRARY_PATH  
/usr/local/cuda-8.0/lib64
 

$ ls /etc/ld.so.conf.d
cuda-8-0.conf                   opencv.conf
fakeroot-x86_64-linux-gnu.conf  x86_64-linux-gnu.conf
glew.conf                       x86_64-linux-gnu_EGL.conf
i386-linux-gnu.conf             x86_64-linux-gnu_GL.conf
libc.conf                       zz_i386-biarch-compat.conf

$ldconfig -p  #list libraries

$sudo ldconfig #update paths

 

 


 

C/C++ Tools

 

[1] BIC Interactive C tracer https://github.com/hexagonal-sun/bic


Friday, March 11, 2022

Miner cryptocurrency

 

[0] Card power https://whattomine.com

[1] Linux Dodge https://www.youtube.com/watch?v=Ng-OU38-RjY

     Tool for mine Dodge https://xmrig.com/download

[2] Linux bittorrent https://www.youtube.com/watch?v=y5EWimXPOD0 

[3] Linux Minero(Alternative to xmrig) https://www.youtube.com/watch?v=NMMiT_eMd-s

[1] Windows tool https://unmineable.com/coins/MATIC

[2] How to mine Matic ESP https://www.youtube.com/watch?v=m_qLQQSWRW0

 

Wednesday, February 23, 2022

Cryptomarket Trading and bots

Bots

[1] Master disseration about bots https://repositorio.ufpe.br/bitstream/123456789/30495/1/DISSERTA%C3%87%C3%83O%20Severino%20Mizael%20da%20Silva.pdf

[2] Api info https://www.mercadobitcoin.com.br/trade-api/

[3] Documentation https://www.mercadobitcoin.com.br/docv4#section/Overview 

[3] Documentation v5.3 https://api.mercadobitcoin.net/api/v4/docs

[3] Glossary https://www.mercadobitcoin.com.br/trade-api/#glossario-trade-api

[4]  Api Wrapper MB

       https://github.com/mbampi/mercado-bitcoin 

       https://github.com/samuelfac/mb-api-client-python

[5] Api Wrapper Binance https://python-binance.readthedocs.io/en/latest/

 

Other Strategies

[1] https://zignaly.com/

[2] Free option/triggers https://www.cryptohopper.com/pricing 

[3] Copy trading https://www.napbots.com

[4] Bots $15 / month  https://tradesanta.com/en/pricing 

[5] 1 free Bot https://3commas.io/pricing

[6] AI powered https://signalboa.com

[7] Bots https://bitsgap.com/pricing/



 


Thursday, February 17, 2022

Paraview Convert VTK file to PLY using Paraview script

 

1. vtk2ply 


from paraview.simple import *

import sys

pFrame30vtk = LegacyVTKReader(FileNames=[sys.argv[1]])

SaveData(sys.argv[2], proxy=pFrame30vtk)

PostgreSQL json fields

select name->'es_PE',* from product_template where name->>'es_PE' like '%MEGACI%'   References: [1] https:/...