Skip to content

Instantly share code, notes, and snippets.

// Compiled with:
// g++ -std=c++17 -Wall -Wextra -pedantic test_parallel_algorithms_tbb.cpp -ltbb
#include <iostream>
#include <vector>
#include <random>
#include <algorithm>
#include <chrono>
#include <execution>
" Simple .vimrc configuration file
set nocompatible
set backspace=indent,eol,start
set number
syntax on
filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
@sol-prog
sol-prog / commands.sh
Last active August 27, 2024 09:53
Install GCC 9 on Raspberry Pi and build C++17 programs
# Commands used in the video https://youtu.be/-bCG87jBDqA :
sudo apt update && sudo apt upgrade -y
git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git
cd raspberry-pi-gcc-binary
tar -xjvf gcc-9.1.0-armhf-raspbian.tar.bz2
sudo mv gcc-9.1.0 /opt
cd ..
rm -rf raspberry-pi-gcc-binary
# SciPy and Matplotlib installation test
# plotting a function
import scipy as sp
import matplotlib.pylab as plt
t = sp.arange(0, 10, 1/100)
plt.plot(t, sp.sin(1.7 * 2 * sp.pi *t) + sp.sin(1.9 * 2 * sp.pi * t))
plt.show()
@sol-prog
sol-prog / Help.md
Last active October 5, 2024 23:52

Compilation with TCC, The Tiny C Compiler:

tcc test_sdl2.c -lSDL2

Also see these video tutorials:

@sol-prog
sol-prog / .bashrc
Last active May 17, 2019 17:48
Install Clang 8 in Raspberry Pi and compile C++ programs
# Add to end of your .bashrc file:
export PATH=/usr/local/clang_8.0.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/clang_8.0.0/lib:$LD_LIBRARY_PATH
{
"terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": ["--login"],
"terminal.integrated.env.windows": {
"CHERE_INVOKING":"1",
"MSYSTEM":"MINGW64"
}
}
@sol-prog
sol-prog / opencv.pc
Last active December 17, 2021 16:22
libdir = /opt/opencv-4.1.0/lib
includedir = /opt/opencv-4.1.0/include/opencv4
Name: OpenCV
Description: OpenCV (Open Source Computer Vision Library) is an open source computer vision and machine learning software library.
Version: 4.1.0
Libs: -L${libdir} -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_calib3d -lopencv_ccalib -lopencv_core -lopencv_datasets -lopencv_dnn_objdetect -lopencv_dnn -lopencv_dpm -lopencv_face -lopencv_features2d -lopencv_flann -lopencv_freetype -lopencv_fuzzy -lopencv_gapi -lopencv_hfs -lopencv_highgui -lopencv_imgcodecs -lopencv_img_hash -lopencv_imgproc -lopencv_line_descriptor -lopencv_ml -lopencv_objdetect -lopencv_optflow -lopencv_phase_unwrapping -lopencv_photo -lopencv_plot -lopencv_quality -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_shape -lopencv_stereo -lopencv_stitching -lopencv_structured_light -lopencv_superres -lopencv_surface_matching -lopencv_text -lopencv_tracking -lopencv_videoio -lopencv_video -lopencv_videostab -lopencv_xfeatures2d -lopencv
@sol-prog
sol-prog / RPi-GCC-cross-compiler.md
Last active February 14, 2024 22:07
How to build a cross compiler for Raspberry Pi

Sources:

http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
https://www.raspberrypi.org/documentation/linux/kernel/building.md


https://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F
https://wiki.osdev.org/GCC_Cross-Compiler
https://wiki.osdev.org/Building_GCC