Friday, November 26, 2021

Sunday, November 21, 2021

Rip current detection

 

[1] Correntes de retorno https://www.youtube.com/watch?v=yKvDOzvjApE

[2] Rip Current  https://www.youtube.com/watch?v=RJ4hcaJ91TY

[3] Paper 2021 https://arxiv.org/pdf/2102.02902.pdf

 

Tuesday, November 16, 2021

3D grid savig methods using struct.pack

 

Python version for ints
def save2grid(filename,volume,dimx,dimy,dimz):

  with open(filename, "wb") as file:
    for i in range(dimx):
      for j in range(dimy):
        for k in range(dimz):
          f = (volume[i][j][k]*255).astype(np.uint8) #numpy.uint8
          #print(type(f))
          b = struct.pack('B', f)  #was f
          file.write(b)
          
def save2gridfast(filename,volume,dimx,dimy,dimz):
  flat=volume.reshape((dimx*dimy*dimz))
  flat=(flat*255).astype(np.uint8)
  with open(filename, "wb") as file:
       b = struct.pack('%sB' % len(flat), *flat)
       file.write(b) 

Python version for floats

def save2grid(filename,volume,dimx,dimy,dimz):

  with open(filename, "wb") as file:
    for i in range(dimx):
      for j in range(dimy):
        for k in range(dimz):
          f = volume[i][j][k] #[3.14, 2.7, 0.0, -1.0, 1.1]
          b = struct.pack('f', f)
          file.write(b)
def save2grid2(filename,volume,dimx,dimy,dimz):
  flat=volume.reshape((dimx*dimy*dimz))
  with open(filename, "wb") as file:
    for i in range(dimx*dimy*dimz):
       f = flat[i]
       b = struct.pack('f', f)
       file.write(b)
def save2grid3(filename,volume,dimx,dimy,dimz):
  flat=volume.reshape((dimx*dimy*dimz))
  with open(filename, "wb") as file:
       b = struct.pack('%sf' % len(flat), *flat)
       #b = struct.pack('f', f)
       file.write(b)

Update Chrome in Ubuntu

 


# Install
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update 
sudo apt-get install google-chrome-stable


# Update

sudo apt-get --only-upgrade install google-chrome-stable

Sunday, November 14, 2021

Time series forecasting

To review

 

[1] https://machinelearningmastery.com/how-to-develop-lstm-models-for-time-series-forecasting/

[2] https://www.tensorflow.org/tutorials/structured_data/time_series

[3] https://analyticsindiamag.com/tutorial-on-univariate-single-step-style-lstm-in-time-series-forecasting/

[4] https://towardsdatascience.com/multivariate-time-series-forecasting-with-transformers-384dc6ce989b

 

 

Friday, October 29, 2021

Houdini 18 - Changing temp directory

 

Setting temp directory

$ locate houdini.env

/home/cloud/houdini18.0/houdini.env

#
# Houdini Environment Settings
#
# The contents of this file are read into the environment
# at startup.  They will override any existing entries in
# the environment.
#
# The syntax is one entry per line as follows:
#    VAR = VALUE
#
# Values may be quoted
#    VAR = "VALUE"
#
# Values may be empty
#    VAR =  
#

# Example:
#
# HOUDINI_NO_SPLASH = 1


HOUDINI_TEMP_DIR = /home/cloud/.houdinitmp

 

 

Wednesday, October 27, 2021

DualSPHysics Simulation pipeline

 

First Step: Create geometry

[1] FreeCAD https://www.freecadweb.org/downloads.php

[2] Plugin DesignSPHysics https://github.com/DualSPHysics/DesignSPHysics

Second Step: Compile/Install DualSPHysics

[1] How to https://melhorum.blogspot.com/2019/07/dualsphysics.html

Third Step: Run smulation CPU or GPU

[1] ...

Fourth Step: Polygonize/Render

[1] ...

 

 

Tuesday, October 26, 2021

Video tools online

Rotate/Crop/Resize

[1] https://ezgif.com/rotate-video

[2] Fast https://www.rotatevideo.org/ 


Thursday, October 21, 2021

Linux check input ports

 $ sudo cat /proc/ioports

0000-0cf7 : PCI Bus 0000:00
 0000-001f : dma1
 0020-0021 : pic1
 0040-0043 : timer0
 0050-0053 : timer1
 0060-0060 : keyboard
 0061-0061 : PNP0800:00
 0064-0064 : keyboard
 0070-0071 : rtc0
 0080-008f : dma page reg
 00a0-00a1 : pic2
 00c0-00df : dma2
 00f0-00ff : PNP0C04:00
   00f0-00ff : fpu
 0290-0297 : pnp 00:03
 0378-037a : parport0
 037b-037f : parport0
 03c0-03df : vesafb
 03f8-03ff : serial
 0400-041f : 0000:00:1f.3
 04d0-04d1 : pnp 00:04
 0500-053f : 0000:00:1f.0
 0778-077a : parport0
 0800-087f : 0000:00:1f.0
   0800-087f : pnp 00:04
     0800-0803 : ACPI PM1a_EVT_BLK
     0804-0805 : ACPI PM1a_CNT_BLK
     0808-080b : ACPI PM_TMR
     0820-082f : ACPI GPE0_BLK
     0830-0833 : iTCO_wdt.0.auto
     0850-0850 : ACPI PM2_CNT_BLK
     0860-087f : iTCO_wdt.0.auto
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
 1000-1fff : PCI Bus 0000:05
 2000-2fff : PCI Bus 0000:04

$ cat /proc/bus/input/devices

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
U: Uniq=
H: Handlers=kbd event0  
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
U: Uniq=
H: Handlers=kbd event1  
B: PROP=0
B: EV=3
B: KEY=10000000000000 0

I: Bus=0003 Vendor=046d Product=c016 Version=0110
N: Name="Logitech Optical USB Mouse"
P: Phys=usb-0000:00:1d.0-1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/0003:046D:C016.0001/i
nput/input5
U: Uniq=
H: Handlers=mouse0 event2  
B: PROP=0
B: EV=17
B: KEY=70000 0 0 0 0
B: REL=103
B: MSC=10

I: Bus=0003 Vendor=045e Product=0750 Version=0111
N: Name="Microsoft Wired Keyboard 600"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.0/0003:045E:0750.0002/i
nput/input6
U: Uniq=
H: Handlers=sysrq kbd event3 leds  
B: PROP=0
B: EV=120013
B: KEY=1000000000007 ff9f207ac14057ff febeffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=045e Product=0750 Version=0111
N: Name="Microsoft Wired Keyboard 600"
P: Phys=usb-0000:00:1d.0-2/input1
S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.1/0003:045E:0750.0003/i
nput/input7
U: Uniq=
H: Handlers=sysrq kbd event4  
B: PROP=0
B: EV=10001f
B: KEY=3f0003007f 0 0 4c3ffff17aff32d bf54445600000000 1 130f938b17c007 ffff7bfa
d971dfff febeffdfffefffff fffffffffffffffe
B: REL=40
B: ABS=10100000000
B: MSC=10

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="HDA Intel Front Mic"
P: Phys=ALSA
S: Sysfs=/devices/pci0000:00/0000:00:1b.0/sound/card0/input8
U: Uniq=
H: Handlers=event5  
B: PROP=0
B: EV=21
B: SW=10


$sudo cat /dev/input/event3 #test if it's working



Saturday, October 16, 2021

Linux Touchpad issues

 

xinput list

⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Dell Dell Universal Receiver              id=11   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint TouchPad          id=16   [slave  pointer  (2)]
⎜   ↳ AlpsPS/2 ALPS DualPoint Stick             id=15   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
   ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
   ↳ Power Button                              id=6    [slave  keyboard (3)]
   ↳ Video Bus                                 id=7    [slave  keyboard (3)]
   ↳ Power Button                              id=8    [slave  keyboard (3)]
   ↳ Sleep Button                              id=9    [slave  keyboard (3)]
   ↳ Dell Dell Universal Receiver              id=10   [slave  keyboard (3)]
   ↳ Laptop_Integrated_Webcam_HD: In           id=12   [slave  keyboard (3)]
   ↳ Dell WMI hotkeys                          id=13   [slave  keyboard (3)]
   ↳ AT Translated Set 2 keyboard              id=14   [slave  keyboard (3)]
   ↳ Dell Dell Universal Receiver              id=17   [slave  keyboard (3)]

xinput -list-props 16

 
Device 'AlpsPS/2 ALPS DualPoint TouchPad':
       Device Enabled (142):   1
       Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
       Device Accel Profile (275):     0
       Device Accel Constant Deceleration (276):       1.000000
       Device Accel Adaptive Deceleration (277):       1.000000
       Device Accel Velocity Scaling (278):    5.000000
       Trackpad Disable Input (305):   0
       Trackpad Sensitivity (306):     0.500000
       Trackpad Touch Pressure (307):  5, 5
       Trackpad Button Settings (308): 1, 1
       Trackpad Button Emulation Settings (309):       0, 1, 100
       Trackpad Button Emulation Values (310): 3, 2, 0
       Trackpad Tap Settings (311):    50, 120, 400
       Trackpad Tap Button Emulation (312):    1, 3, 2, 0
       Trackpad Thumb Detection (313): 0, 0
       Trackpad Thumb Size (314):      25, 70
       Trackpad Palm Detection (315):  0, 0
       Trackpad Palm Size (316):       40
       Trackpad Gesture Settings (317):        10, 100
       Trackpad Scroll Distance (318): 150
       Trackpad Scroll Buttons (319):  4, 5, 6, 7
       Trackpad Swipe Distance (320):  700
       Trackpad Swipe Buttons (321):   8, 9, 10, 11
       Trackpad Swipe4 Distance (322): 700
       Trackpad Swipe4 Buttons (323):  0, 0, 0, 0
       Trackpad Scale Distance (324):  150
       Trackpad Scale Buttons (325):   14, 15
       Trackpad Rotate Distance (326): 150
       Trackpad Drag Settings (327):   1, 350, 40, 200
       Trackpad Axis Inversion (328):  0, 0


xinput -set-prop 16 306 0.5

 

Tuesday, October 05, 2021

Processing mp3 by Python3 in Linux

 

 

$ sudo apt install llvm-8
 

$ locate llvm-config

$ LLVM_CONFIG=/usr/bin/llvm-config-8 pip3 install librosa --user
 

 

packages: llvmlite, numba, soundfile, resampy, audioread, librosa


 

Monday, September 20, 2021

Tuesday, August 31, 2021

Cryptocurrencies Resources

Where to Check

[1] Cryptocurrencies info (BR)  https://investidor10.com.br/criptomoedas/chiliz/

[2] Cryptocurrencies info https://coinmarketcap.com/

[3] https://panoramacrypto.com.br/

[4] Bitcoin https://www.lookintobitcoin.com

[5] Prediction chart https://www.lookintobitcoin.com/charts/stock-to-flow-model/

Where to buy

[1] Choose where to buy by country https://www.buybitcoinworldwide.com/

[2] Exchange in Brazil www.mercadobitcoin.com.br  

Where to Save

[1] Wallet MetaMask (Expensive to transfer in Wallet)

 

Perú

[1] https://fluyez.com/

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


Whales

[1] https://www.whalestats.com/


Software

[1] ATANI Windows/MacOS/Linux https://atani.com/download

   
$ sudo apt update
$ sudo apt install snapd
$ sudo snap install core

$sudo snap install atani

 

 

 

 

 

 

 


Thursday, August 19, 2021

OpenGL in Cuda Study

Starting

[1] https://www.geeksforgeeks.org/getting-started-with-opengl/

 


1) http://www.opengl-tutorial.org/beginners-tutorials/tutorial-2-the-first-triangle/

2) https://math.hws.edu/graphicsbook/c3/s4.html

 

 

Thursday, July 15, 2021

Spanish books

 [1] Calculo http://blog.espol.edu.ec/srpinarg/files/2014/05/Calculo-de-Purcell-9na-Edici%C3%B3n.pdf


Wednesday, July 14, 2021

English movie subtitles

 

Game of Thrones Blue Ray sub titles

https://australiapopulation.com/game-of-thrones-season-3-subtitles/

[2] Shifter https://subshifter.bitsnbites.eu/

Thursday, July 01, 2021

Images to PDF file (case study)

0. Previous requeriments

$sudo apt install img2pdf
$sudo apt install ocrmypdf

1. Download images by script

for n in `seq 1 23`
do
  sn=`printf "%02d" $n`
  echo $sn
  wget https://larepublica.cronosmedia.glr.pe/printed/2021/07/01/lima/pages/$sn.jpeg
done
 

2. Convert images to pdf (after executed download script by sh)

$img2pdf *.jpeg --output rep1.pdf #or

$convert *.jpeg rep2.pdf

$ocrmypdf rep1.pdf rep1_ocr.pdf #reduce size

 

Notes for convert command(change from none to read|write):

sudo vim /etc/ImageMagick-6/policy.xml

<policy domain="coder" rights="none" pattern="PDF" />

<policy domain="coder" rights="read|write" pattern="PDF" />
 
 
Bonus
[1] El Pueblo news url https://www.diarioelpueblo.com.pe/wp-content/uploads/2021/07/01-07-2021.pdf
 

Wednesday, June 30, 2021

Challenges

 

https://www.edx.org/course/high-dimensional-data-analysis

Monday, June 21, 2021

Python Settings to use in environments

Solving multiple python instalation:
 
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
sudo update-alternatives --config python3
  

Solving:

Error: Command '['/home/DRIVE/Temp/aa/bin/python3.9', '-Im', 'ensurepip', '--upg
rade', '--default-pip']' returned non-zero exit status 1.
 

apt-get install python3.6-dev python3.6-venv
python3.6 -m venv myVenv 

Upgrade pip

pip3 install --upgrade pip
 

 

Friday, June 04, 2021

Saturday, March 27, 2021

Houdini Courses

 

[1] https://www.cgcircuit.com/tutorial/houdini-basics-episode-i

 

Developer postions Brazil

 

[1] https://jobs.kenoby.com/eldorado

 

Friday, March 26, 2021

Houdini18 topics

 

Import libraries

 

/opt/hfs18.0/python/lib/python2.7


 

Asset libraries

Digital assets are stored in digital asset library files, with a .hda extension. (Older versions of Houdini used a .otl extension.) Houdini loads any .hda (or .otl) files it finds in HOUDINIPATH/otls.

Steps:

 1) Create Subnet

 2) Define Parameters and Save .otl

References:

[1] creating an otl on Houdini18 https://www.sidefx.com/tutorials/getting-cozy-with-houdini-engine-lesson-3-creating-our-first-otl/ 

[2] Create digital assets https://www.sidefx.com/docs/houdini/assets/create.html

[2] https://www.youtube.com/watch?v=Q6U_q5PASiU


Tuesday, March 23, 2021

Rendering by Python 3

 

trimesh
trimesh-3.9.10-py3-none-any.whl

pyrender
pyrender-0.1.45-py3-none-any.whl

Dependences:
  PyOpenGL==3.1.0
  PyOpenGL-3.1.0.tar.gz

  pyglet>=1.4.10
  pyglet-1.5.15-py3-none-any.whl

  freetype-py
  freetype_py-2.1.0.post1-py2.py3-none-manylinux1_x86_64.whl
 



 

Friday, March 19, 2021

Amazonas deforestation

 

Main page

[1] http://terrabrasilis.dpi.inpe.br/en/home-page/

Dataset

[2] http://www.dpi.inpe.br/prodesdigital/dadosn/

[3] 2005-2009 http://www.dpi.inpe.br/prodesdigital/dadosn/mosaicos/

[4] Image 9GB http://www.dpi.inpe.br/prodesdigital/dadosn/mosaicos/2019/

Wednesday, March 17, 2021

Python set right version to execute 3.6 3.7 3.8

 

 

https://tech.serhatteker.com/post/2019-12/upgrade-python38-on-ubuntu/

https://stackoverflow.com/questions/63823964/importerror-cannot-import-name-sysconfig-from-distutils-usr-lib-python3-8

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

python3 get-pip.py --force-reinstall


ModuleNotFoundError: No module named 'apt_pkg' error
sudo apt-get remove python3-apt
sudo apt-get install python3-apt

 

 


ImportError: No module named OpenGL.GL

apt-get install python3-opengl
or  
pip3 install pyopengl --user

As well as:

sudo apt-get install python python-numpy python-opengl python-qt4 python-qt4-gl

 

 

 

 

Monday, March 15, 2021

Cuda on Linux18 (y2021)

After installation don't forget it(.bashrc):

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

 

Drivers

[1] Legacy https://www.nvidia.com/en-us/drivers/unix/

To Review (Cuda and Driver)

CUDA 11.2             >= 450.80.02
CUDA 11.1 (11.1.0)     >= 450.80.02
CUDA 11.0 (11.0.3)     >= 450.36.06
CUDA 10.2 (10.2.89)     >= 440.33
CUDA 10.1 (10.1.105)     >= 418.39
CUDA 10.0 (10.0.130)     >= 410.48
CUDA 9.2 (9.2.88)     >= 396.26
CUDA 9.1 (9.1.85)     >= 390.46
CUDA 9.0 (9.0.76)     >= 384.81
CUDA 8.0 (8.0.61 GA2)     >= 375.26
CUDA 8.0 (8.0.44)     >= 367.48
CUDA 7.5 (7.5.16)     >= 352.31
CUDA 7.0 (7.0.28)     >= 346.46

[1] Compatibility  https://docs.nvidia.com/deploy/cuda-compatibility/index.html 

To Review (Cuda and GCC)

CUDA version     Max GCC version
11.1             10.0
11                9
10.1, 10.2    8
9.2, 10.0      7
9.0, 9.1        6
8                  5.3
7                  4.9
5.5, 6           4.8
4.2, 5           4.6
4.1               4.5
4.0               4.4

Cuda Toolkit from 6.5 to 10 and more

[1] https://developer.nvidia.com/cuda-toolkit-archive

Common problems

[1] Can't locate InstallUtils.pm in @INC

$sh ./cuda(your version).run --tar mxvf #for unpack

$cp InstallUtils.pm /usr/lib/x86_64-linux-gnu/perl-base #check path in error message

[2] Messages during Cuda installation

$sudo ./cuda_6.5.14_linux_64.run --override

$sudo ./cuda_xxx.run --override  #to ignore last compiler or related

#During Cuda 6.5

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29?

#During Cuda 8

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?

#During Cuda 9

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?

[3] Adicional  notes

https://forums.dual.sphysics.org/discussion/1324/get-the-gpu-running


[4] How to disable nouveau driver to install NVIDIA drivers

$vi /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
$sudo update-initramfs -u 
$sudo reboot 

 

 

Friday, March 12, 2021

Ubuntu users tools

 

To hidden (no initial list at login)

sudo vi /var/lib/AccountsService/users/cloud

SystemAccount=true #change this from false to true

References:

[1] add user https://linoxide.com/usr-mgmt/give-normal-user-root-privileges/

[2] hidden user https://swatij.me/hacks/ubuntu/hide-user-from-login-screen-in-ubuntu-14-04.html

Wednesday, March 10, 2021

Ubuntu enable Sony Xperia USB transfer

 

sudo apt-get install libusb-dev

sudo apt-get install gmtp

References:

[1] Manual installation of libmtp http://www.humans-enabled.com/2011/12/how-to-fix-samsung-galaxy-nexus-mtp.html

[2] https://gmtp.sourceforge.io/

[3] Original post https://android.stackexchange.com/questions/36376/cant-explore-files-on-my-sony-xperia-u-using-my-ubuntu-12-10-laptop

VideoChat Background Filter

 

[1] https://github.com/scumjr/cameo

 


Friday, March 05, 2021

Deep nostalgia

 

https://time-travel-rephotography.github.io/

https://www.myheritage.com.br/deep-nostalgia

Tuesday, March 02, 2021

3D Models (free)

 

[1] Gallery https://free3d.com/3d-models/toys?page=2


[2] Cat with Wings https://www.cgtrader.com/items/716159/download-page

Sunday, February 28, 2021

Banks Perú - Credits

 

 75%
Tasa Efectiva Anual (TEA)

https://www.crediscotia.com.pe/Negocios/simuladores/simuladores/credito-libre-disponibilidad

 

 http://aplicacionespichincha.com.pe/simuladorWEB/cotizador.aspx


https://web.compartamos.com.pe/crear/simulador.php


https://www.cajaarequipa.pe/simulador/

Tuesday, February 09, 2021

Online Book Stores

 

[1] https://www.bookdepository.com/ (Problems by tracking/UK?)

[2] https://www.thriftbooks.com (Unavailable by covid)

[3] https://www3.livrariacultura.com.br

[4] http://betterworldbooks.com/ (block brazil country)

[5] https://www.awesomebooks.com (UK?)

Sunday, February 07, 2021

Poligonization tools

 

 

https://snorpey.github.io/triangulation/

https://polygonize.net/

 

 

Friday, February 05, 2021

Houdini 18: Fundamentals

 

PDG & examples (~2020)

[1] https://www.sidefx.com/learn/pipeline-pdg/


Materials

[1] https://www.youtube.com/watch?v=TzDAxvPFh1E


Hair Shading

[1] https://www.youtube.com/watch?v=aO1r5yv3QT8

Objects

[1] Rock https://www.youtube.com/watch?v=gINvU11LHB0


Flip

[0] Tips to improve https://blendermarket.com/posts/flip-fluids-10-tips-to-improve-your-blender-workflow

[1] https://vimeo.com/182074285

[2] https://vimeo.com/189254805

[3] Splash https://vimeo.com/209763376

[4] Collider https://vimeo.com/252645795

 

Sources

[1] pool https://www.sidefx.com/forum/topic/27689/?page=1#post-130379


Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com