Skip to content

Instantly share code, notes, and snippets.

View Macorreag's full-sized avatar
😎
Writing better code every day

Miller Correa Macorreag

😎
Writing better code every day
View GitHub Profile
@Macorreag
Macorreag / mpi-hosts
Last active June 11, 2019 13:30
MPI with omp for calculate Pi
# The Hostfile for Open MPI
# The master node, 'slots=4' is used because it is a dual-processor machine.
localhost slots=8
# The following slave nodes are single processor machines:
#cluster-nodo1
#cluster-nodo2
@Macorreag
Macorreag / mpi_HelloWorld.c
Created June 11, 2019 12:32
Hello World with MPI
/*
* compile with : mpicc -o helloworld mpi_HelloWorld.c
* run with mpirun -np [#Number of Cores] helloworld
*/
#include <stdio.h>
#include "mpi.h"
int main(int argc,char **argv){
int rank,size;
@Macorreag
Macorreag / fibonaci.pl
Created May 29, 2019 17:55
fibonacci prolog recurcion hacia adelante
fibo(0,1).
fibo(1,1).
fibo(N,M):- +N>1,r(2,1,2,N,M).
r(I,B,_,N,B) :- I>N.
r(I,B,C,N,M) :- I=<N,I1 is I+1,D is C+B,r(I1,C,D,N,M).
@Macorreag
Macorreag / fibo.pl
Created May 29, 2019 17:33
fibonacci en prolog
fibo(0,1).
fibo(1,1).
fibo(N,M):-N>0,N1 is N-1,N2 is N-2,fibo(N1,M1),fibo(N2,M2),M is M1+M2.
@Macorreag
Macorreag / factorial.pl
Created May 29, 2019 17:31
factorial en prolog
factorial(0,1).
factorial(N,M):-N>0, N1 is N-1,factorial(N1,M1),M is N*M1.
@Macorreag
Macorreag / untitled0.ipynb
Last active October 1, 2020 15:59
Pi with Cuda.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Macorreag
Macorreag / untitled0.ipynb
Last active October 2, 2020 21:53
GPU of Colab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Macorreag
Macorreag / an-lisis-de-criptografia.ipynb
Created May 8, 2019 04:36
Análisis de Criptografia.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.