Skip to content

Instantly share code, notes, and snippets.

View 648trindade's full-sized avatar
🏠
Working from home

Rafael Trindade 648trindade

🏠
Working from home
View GitHub Profile
@648trindade
648trindade / MPI_Merge_Sort.md
Last active February 28, 2022 20:42
MPI Merge Sort in C++

MPI Merge Sort in C++

Sort an integer array filled with random numbers, and distributed over MPI nodes.

The maximum array size N for a node must be at least three times smaller than the memory available to the node.

The algorithm is very simple and not optimal:

  • Recursively subdivide node range until we got a single node
  • Sort the subarray on this node
  • Recursively merge arrays from neighbors nodes
@648trindade
648trindade / DBFileGenerator.py
Last active September 21, 2022 21:01
Python script to convert the text file that is inside the compressed .bak project file from software Magic Set Editor to a .db sqlite3 file. Please read the comments to custom it your way
#!/usr/bin/python3
"""
The MIT License (MIT)
Copyright (c) 2016 Rafael Gauna Trindade
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions: