Friday, September 28, 2018
video face fake
Resources:
[1] Original article (pt) https://medium.com/ensina-ai/deep-fakes-ao-vivo-que-tal-entrar-em-uma-video-confer%C3%AAncia-com-o-rosto-de-outra-pessoa-92fc8c2d5726
[2] source code using docker https://github.com/alew3/faceit_live
Monday, September 24, 2018
opengl compile error
Compiling Collisions, quadtrees, uniform grid.
https://github.com/MarcusMathiassen/P2D
$g++ Circle.cpp getTime64.cpp Process.cpp Utility.cpp Color.cpp hwinfo.cpp Inputs.cpp Quadtree.cpp Vec2.cpp Config.cpp main.cpp Rect.cpp FixedGrid.cpp Node.cpp Render.cpp -I ../include/ -lGL -lglut -lGLU -lGLEW -lpthread -lX11 -lglfw -o q5
error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory
$sudo apt-get install libglew-dev
$locate libGLEW.so.2.1
...
/usr/lib64/libGLEW.so.2.1.0
/usr/local/lib/libGLEW.so.2.1
/usr/local/lib/libGLEW.so.2.1.0
...
...
sudo vi /etc/ld.so.conf.d/glew.conf
/usr/local/lib
$sudo ldconfig
Resources:
[1] https://sourceforge.net/projects/glew/files/glew/snapshots/
https://github.com/MarcusMathiassen/P2D
$g++ Circle.cpp getTime64.cpp Process.cpp Utility.cpp Color.cpp hwinfo.cpp Inputs.cpp Quadtree.cpp Vec2.cpp Config.cpp main.cpp Rect.cpp FixedGrid.cpp Node.cpp Render.cpp -I ../include/ -lGL -lglut -lGLU -lGLEW -lpthread -lX11 -lglfw -o q5
error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory
$sudo apt-get install libglew-dev
$locate libGLEW.so.2.1
...
/usr/lib64/libGLEW.so.2.1.0
/usr/local/lib/libGLEW.so.2.1
/usr/local/lib/libGLEW.so.2.1.0
...
...
sudo vi /etc/ld.so.conf.d/glew.conf
/usr/local/lib
$sudo ldconfig
Resources:
[1] https://sourceforge.net/projects/glew/files/glew/snapshots/
Wednesday, September 19, 2018
Delaunay Resources
Delaunay
[1] http://www.cs.uu.nl/docs/vakken/ga/slides9alt.pdf
[1.1] Geometric Algorithms
http://www.cs.uu.nl/docs/vakken/ga/
[2] Geometric modeling codes* http://jeffe.cs.illinois.edu/compgeom/code.html
[3] Hexahedral mesh https://www.hextreme.eu/download/
[4] Delaunay 3D https://github.com/ashwin/gDel3D
[5] Delaunay 3D https://github.com/ashwin/gStar4D
[6] Delaunay 2D/3D https://github.com/mikolalysenko/delaunay-triangulate
[7] D3D for C++ http://www.geom.at/fade3d/html/
Friday, September 14, 2018
3D Models & tools
1) Open .obj 3D format
view3dscene
$sudo apt-get install view3dscene
meshlab - System for processing and editing triangular meshes
$sudo apt-get install meshlab
g3dviewer
$sudo apt-get install g3dviewer
Other tools
- glc_player which is said to read-and-show '.3ds', '.obj', '.stl', '.off', '.3dxml', and Collada ('.dae') files
- g3dviewer which is said to read-and-show '.3ds', '.lwo', '.obj', '.dxf', '.md2', '.md3', '.wrl', '.vrml', '.dae' (COLLADA), '.ase' (ASCII Scene Exporter), '.ac' (AC3D)
- ivview which reads-and-shows '.iv' and VRML1 files
- paraview which reads-and-shows '.ply' and '.vt*' files
- varicad-view which reads-and-shows '.dwg' (2D), '.dxf' (2D only?), '.igs' (maybe?), '.stp' (3D) files
- wings3d - Nendo-inspired 3D polygon mesh modeller (legacy)
- gmsh - Three-dimensional finite element mesh generator
- libadmesh-dev - Tool for processing triangulated solid meshes.
- libgmsh-dev - Three-dimensional finite element mesh generator.
- libmadlib-dev - mesh adaptation library
- libnglib-dev - Automatic 3d tetrahedral mesh generator development files
- libscotch-dev - programs and libraries for graph, mesh and hypergraph partitioning
- netgen - Automatic 3d tetrahedral mesh generator
- libtriangle-dev - High-quality 2-D mesh generator development files
[1] mview http://mview.sourceforge.net/
Models
[1] .max, .obj, blender, etc. www.turbosquid.com
[1] http://tf3dm.com/
Thursday, September 13, 2018
Python extending functions from C/C++
References
[1] https://docs.python.org/3/library/ctypes.html
https://cython.readthedocs.io/en/latest/src/tutorial/cython_tutorial.html
https://opensourceforu.com/2010/05/extending-python-via-shared-libraries/
https://en.wikibooks.org/wiki/Python_Programming/Extending_with_C%2B%2B
Friday, September 07, 2018
Linear Regresion
[1] Regresion linear http://onlinestatbook.com/2/regression/intro.html
[2] https://towardsdatascience.com/linear-regression-with-example-8daf6205bd49
Thursday, September 06, 2018
Wednesday, September 05, 2018
pip3 ImportError: cannot import name 'main'
In linux you need to change the file: /usr/bin/pip3 from:
to:
from pip import main
if __name__ == '__main__':
sys.exit(main())
to:
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
Monday, September 03, 2018
c++ realloc references
https://en.cppreference.com/w/c/memory/realloc
https://www.tutorialspoint.com/c_standard_library/c_function_realloc.htm
Sunday, September 02, 2018
quadtree
References:
[1] http://www.lcad.icmc.usp.br/~jbatista/procimg/quadtree_neighbours.pdf
[2] http://homepage.divms.uiowa.edu/~kvaradar/sp2012/daa/ann.pdf
[3] http://web.archive.org/web/20120907211934/http://ww1.ucmss.com/books/LFS/CSREA2006/MSV4517.pdf
[3] operations cost https://arxiv.org/pdf/1712.05591.pdf
Resources:
[1] quadtree neighbors https://bl.ocks.org/mbostock/4343214
[2] neighbors https://gist.github.com/patricksurry/6478178
[3] neighbors https://github.com/geidav/quadtree-neighbor-finding/blob/master/neighbors.py
[4] https://geidav.wordpress.com/2017/12/02/advanced-octrees-4-finding-neighbor-nodes/
[5] for check https://github.com/xoolive/quadtree
[6] gaussian kd-tree https://www.cg.tuwien.ac.at/courses/Visualisierung2/HallOfFame/2012/7-Labschuetz/Homepage/index.html#References
[7] quadtree over CUDA source code http://ecee.colorado.edu/~siewerts/extra/code/example_code_archive/a490dmis_code/CUDA/cuda_work/samples/Samples.html
[1] http://www.lcad.icmc.usp.br/~jbatista/procimg/quadtree_neighbours.pdf
[2] http://homepage.divms.uiowa.edu/~kvaradar/sp2012/daa/ann.pdf
[3] http://web.archive.org/web/20120907211934/http://ww1.ucmss.com/books/LFS/CSREA2006/MSV4517.pdf
[3] operations cost https://arxiv.org/pdf/1712.05591.pdf
Resources:
[1] quadtree neighbors https://bl.ocks.org/mbostock/4343214
[2] neighbors https://gist.github.com/patricksurry/6478178
[3] neighbors https://github.com/geidav/quadtree-neighbor-finding/blob/master/neighbors.py
[4] https://geidav.wordpress.com/2017/12/02/advanced-octrees-4-finding-neighbor-nodes/
[5] for check https://github.com/xoolive/quadtree
[6] gaussian kd-tree https://www.cg.tuwien.ac.at/courses/Visualisierung2/HallOfFame/2012/7-Labschuetz/Homepage/index.html#References
[7] quadtree over CUDA source code http://ecee.colorado.edu/~siewerts/extra/code/example_code_archive/a490dmis_code/CUDA/cuda_work/samples/Samples.html
Thursday, August 30, 2018
Linux: mount folder to different folders
Code:
mount -o bind /media/disk1/pictures /home/user1/pictures mount -o bind /media/disk1/pictures /home/user2/pictures
Code:
/media/disk1/pictures /home/add1cker/pictures none defaults,bind 0 0
Sunday, August 26, 2018
OpenGL Tutorial
Common libs for start
Matrix Class [3]
Error:
_dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
Fixed using -lpthread parameter [2].
References:
[1] https://www.opengl.org/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib
[2] http://stackoverflow.com/questions/20007961/error-running-a-compiled-c-file-uses-opengl-error-inconsistency-detected
[3] http://www.songho.ca/opengl/index.html
http://www.songho.ca/opengl/gl_matrix.html#example1
[4] Image Libraries
https://www.opengl.org/wiki/Image_Libraries
[5] SFML
http://www.sfml-dev.org/tutorials/2.3/start-linux.php
$sudo apt-get install freeglut3-dev
Matrix Class [3]
Error:
_dl_check_map_versions: Assertion `needed != ((void *)0)' failed!
Fixed using -lpthread parameter [2].
References:
[1] https://www.opengl.org/wiki/Programming_OpenGL_in_Linux:_GLX_and_Xlib
[2] http://stackoverflow.com/questions/20007961/error-running-a-compiled-c-file-uses-opengl-error-inconsistency-detected
[3] http://www.songho.ca/opengl/index.html
http://www.songho.ca/opengl/gl_matrix.html#example1
[4] Image Libraries
https://www.opengl.org/wiki/Image_Libraries
[5] SFML
http://www.sfml-dev.org/tutorials/2.3/start-linux.php
Wednesday, August 22, 2018
Tuesday, August 21, 2018
Raspberry pi 3
1) user and passwords:
Distribution | Username | Password
---------------|------------|-------------
Debian Squeeze | pi | raspberry
Arch | root | root
QtonPi | root | rootme
Raspbian | pi | raspberry
OpenElec | root | openelec
Pidora | root | raspberrypi
RISC OS | n/a | n/a
raspbmc | pi | raspberry
2) add users
$sudo adduser username
$
usermod -aG sudo username
3) Ports
$lsof -nP -i | grep LISTEN
$netstat -tlpn | grep LISTEN
4) vncserver (reinstall, by default sometime doesn't works)
$sudo apt-get install tightvncserver
5) Firewalls
iptables -I INPUT -p tcp --dport 5900 -j ACCEPT iptables -I INPUT -p tcp --dport 5901 -j ACCEPT
Resources:
[1] https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
[2] direct way https://www.shellhacks.com/how-to-grant-root-access-user-root-privileges-linux/
[3] vncserver https://quaintproject.wordpress.com/2013/03/24/establish-a-vnc-connection-to-your-raspberry-pi-from-a-linux-pc/
Monday, August 20, 2018
Thursday, August 16, 2018
Optimize code C/C++
If you are using linux: use
In Windows the equivalent is
Resources:
[1] fast input/output https://ideone.com/BrsDz4
Enteprise solutions:
[1] http://www.fastformat.org/
getchar_unlocked()
and putchar_unlocked()
for taking fast single character I/O.In Windows the equivalent is
getchar()
and puchar()
repectivelyResources:
[1] fast input/output https://ideone.com/BrsDz4
Enteprise solutions:
[1] http://www.fastformat.org/
Monday, August 13, 2018
Thursday, August 09, 2018
Programming online C++ and others
Online programming tools
Resources:
[1] C++, Python https://repl.it/@melhorum
[2] Multi Language Support https://code.dcoder.tech/
[3] Account for C/C++, C#, Java http://rextester.com
[4] http://www.onlinegdb.com/
Resources:
[1] C++, Python https://repl.it/@melhorum
[2] Multi Language Support https://code.dcoder.tech/
[3] Account for C/C++, C#, Java http://rextester.com
[4] http://www.onlinegdb.com/
Wednesday, August 01, 2018
Subscribe to:
Posts (Atom)
-
Resources: [1] Hela https://ome.grc.nia.nih.gov/iicbu2008/hela/index.html
-
en inglĆ©s se llama “A potentially dangerous Request.Form value was detected from the client”. varias pĆ”ginas indican dos cosas: 1. agrega...
-
mas plugins http://devsnippets.com/reviews/using-jquery-to-style-design-elements-20-impressive-plugins.html http://www.extjs.com/deploy/dev/...
Ubuntu Forware port 80
#!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069 iptables -t nat -A PREROUTING -i eth0 -p tc...