fix Table 'information_schema.SCHEMATA' doesn't exist
$sudo mysql_upgrade -u root -p --force
Software Developer, Programming, Web resources and entertaiment. Desarrollo de software, programación, recursos web y entretenimiento.
$sudo mysql_upgrade -u root -p --force
$file /lib/systemd/systemd
$lscpu
$uname -i
$uname -m
$dpkg --print-architecture
Navier-Stokes-equations
[0] Thesis: Parallel architecture to solve NSE https://tel.archives-ouvertes.fr/tel-01152623/document
[1] https://www.quora.com/What-are-the-uses-of-the-Bernoulli-equations-Eulers-equations-and-the-Navier-Stokes-equations-and-when-do-we-apply-them
[2] Prof. Wang http://web.cse.ohio-state.edu/~wang.3602/
[2] http://web.cse.ohio-state.edu/~wang.3602/courses/cse3541-2019-fall/
[2] Course http://web.cse.ohio-state.edu/~wang.3602/courses/cse788-2011-fall/
[2.1] SPH Water Simulation equations http://web.cse.ohio-state.edu/~wang.3602/courses/cse788-2011-fall/results/Yi_Liu/SPH%20Water%20Simulation.htm
[3] https://www.comsol.jp/multiphysics/fluid-flow-conservation-of-momentum-mass-and-energy
[4] Matthias Müller http://matthias-mueller-fischer.ch/
[5] CFD Intro https://www.mathematik.uni-dortmund.de/~kuzmin/cfdintro/lecture1.pdf
Others
[1] CSG https://evanw.github.io/csg.js/
python3.2 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
python3 -m venv /path/to/new/virtual/environment
Object arrays cannot be loaded when allow_pickle=False
pip install numpy==1.16.1
pip3 install PyQt5
[1] 2D Gauss+SIPL https://www.eriksmistad.no/gaussian-blur-using-opencl-and-the-built-in-images-textures/all: program
program: cudacode.o
g++ -o program -L/usr/local/cuda/lib64 -lcuda -lcudart main.cpp cudacode.o
cudacode.o:
nvcc -c -arch=sm_20 cudacode.cu
clean: rm -rf *o program
Cuda Tutorials:
Resources:
[1] code https://github.com/DualSPHysics/DualSPHysics
[2] scripts to execute models https://github.com/fincahuanaco/DualSPHysicsScripts
[3] https://dual.sphysics.org/index.php/downloads/
[4] https://dual.sphysics.org/files/3313/8753/4540/DualSPHysics_v3.0_GUIDE.pdf
[5] https://github.com/DualSPHysics/DualSPHysics/wiki/12.-Testcases#obc7
Update 2021
compile GPU version (CMakeLists.txt will find cuda, display ${CUDA_VERSION} to verify if is getting the right version).
See https://melhorum.blogspot.com/2021/03/cuda-8-on-linux18.html to install CUDA and requeriments.
on DualSPHysics/src/source
Make Model
[1] https://www.freecadweb.org/
$git clone https://github.com/gpusph/gpusph.git
$CC=/usr/bin/gcc-4.9 CXX=/usr/bin/g++-4.9 make
$make
[3] Crixus(Boundary definition) https://github.com/Azrael3000/Crixusffmpeg can create gif from mp4/mpeg file, but create low quality, for resolve this we need to create a palette for increase quality.
Create palette colors
$ffmpeg -i file.mpeg -vf fps=15,scale=-1:-1:flags=lanczos,palettegen palette.png
Use palette for create gif from complete mp4 file
$ffmpeg -i file.mp4 -i palette.png -filter_complex "fps=15,scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" out_full.gif
Use palette for create gif from mp4 file (from 0:55 and 9seconds)
$ffmpeg -ss 0:55 -t 9 -i file.mp4 -i palette.png -filter_complex "fps=15,scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" out_fraction.gif
Without palette
$ffmpeg -i imagebind.mp4 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - imagebind.gif
Convert png files list to mp4 (two ways)
$avconv -r 20 -i buffer/plot%d.png -b:v 4000k animation_h1.mp4
$ffmpeg -i buffer/plot%d.png -r 20 -b 4M animation_h2.mp4
Convert jpg files into mp4
$ffmpeg -framerate 1 -i frames/f%d.jpg -r 2 -pix_fmt yuv420p video.mp4
$ffmpeg -framerate 10 -i Dragon.%04d.png -r 2 -pix_fmt yuv420p video.mp4
Cut/Extract video fraction same quality no filter/codec
$ffmpeg -ss 3:19 -t 4 -i Moana_WaterFX.mp4 -vcodec copy -acodec copy Moana_f3.mp4
Convert mp4 to gif using palette and resizing
$ffmpeg -i psplat2_4k.mp4 -i palette_psplat2_4k.png -filter_complex "fps=15,scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" -s 346x264 psplat2_4k.gif
$ffmpeg -i fluidhoudini.mp4 -i palette.png -filter_complex "fps=15,scale=-1:-1:flags=lanczos[x];[x][1:v]paletteuse" -s 640x480 fluidhoudini_palette_640.gif
Crop image video
To crop a 528×336 section, starting from position (264, 30):
ffmpeg -i first_256.mp4 -filter:v "crop=528:336:264:30" -c:a copy first_256_crop.mp4
#ffmpeg -i in.mp4 -filter:v "crop=out_w:out_h:x:y" out.mp4
Error on Image Magick (convert)
convert-im6.q16: cache resources exhausted
open file /etc/ImageMagick-6/policy.xml
and change
<policy domain="resource" name="disk" value="1GiB"/>
To
<policy domain="resource" name="disk" value="8GB"/>
Or
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" /> <------- Here!!
<policy domain="coder" rights="none" pattern="XPS" />
To
<policy domain="coder" rights="read | write" pattern="PDF" />
#Change by code
sed -i -E 's/name="memory" value=".+"/name="memory" value="1GiB"/g' /etc/ImageMagick-6/policy.xml
sed -i -E 's/name="map" value=".+"/name="map" value="1GiB"/g' /etc/ImageMagick-6/policy.xml
sed -i -E 's/name="area" value=".+"/name="area" value="1GiB"/g' /etc/ImageMagick-6/policy.xml
sed -i -E 's/name="disk" value=".+"/name="disk" value="4GiB"/g' /etc/ImageMagick-6/policy.xml
For the default 16:9 aspect ratio, encode at these resolutions:
Online tools[1] Crop gifs https://ezgif.com
OpenVDB Codes
[0] OpenVDB Code Examples https://www.openvdb.org/documentation/doxygen/codeExamples.html
[1] pyopenvdb volume codes https://www.openvdb.org/documentation/doxygen/python.html
[3] https://python.hotexamples.com/examples/pyopenvdb/-/createLinearTransform/python-createlineartransform-function-examples.html
More:
[1] Light, Sound modeling http://gamma.web.unc.edu/software/
[2] OpenVDB Slices to VDB https://github.com/tody411/OpenVDB-Samples
Resources:
[0] OpenVDB https://github.com/AcademySoftwareFoundation/openvdb
For Enable pyOpenVDB (main CMakeLists.txt)
option(OPENVDB_BUILD_PYTHON_MODULE "Build the pyopenvdb Python module" ON)
For Enable Viewer
For Enable Polygonization(grid.convertToPolygons) in python module, change openvdb/openvdb/python/CMakeLists.txt
option(USE_NUMPY "Build the python library with numpy support." ON)
or you will get next error
NotImplementedError: this module was built without NumPy support
Dependences:
[1] OpenExr https://github.com/AcademySoftwareFoundation/openexr
[2] Intel(R) Threading Building Blocks https://github.com/wjakob/tbb
Minimum required is "2017.0" for both above.
[3] Boost https://sourceforge.net/projects/boost/files/boost/
$./bootstrap.sh --prefix=/usr/
$./b2
$sudo ./b2 install
#Preference to Boost 1.7 with python3 support, it enable cmds tools
https://melhorum.blogspot.com/2020/10/boost-17-on-ubuntu16.html
Ubuntu16
$g++-6 openvdb_view.cc ../viewer/Camera.cc ../viewer/ClipBox.cc ../viewer/Font.cc ../viewer/RenderMo
dules.cc ../viewer/Viewer.cc -lopenvdb -ltbb -lglfw -lGL -lGLU -lHalf -lpthread -DGL_GLEXT_PROTOTYPES
Ubuntu18
g++ openvdb_view.cc ../viewer/Camera.cc ../viewer/ClipBox.cc ../viewer/Font.cc ../viewer/RenderModules.cc ../viewer/Viewer.cc -lopenvdb -ltbb -lglfw -DGL_GLEXT_PROTOTYPES -DOPENVDB_USE_GLFW_3 -I ../viewer/ -lHalf -lpthread -o openvdb_view -lboost_thread -lboost_system -lGL -lGLU
[1] Diario/Seq https://apps.odoo.com/apps/modules/17.0/sequence_for_journal
`uname -m` tells only about the kernel, the userspace and distro can be still 32-bit. Similarly `lscpu` only tells what the CPU is capable of, not if OS, kernel and distro are 32 or 64 bit.