$g++ --std=c++11 main.cpp -lpthread -o sim
running (make sure the simulation input file "input.txt" is places at the location with the current name)
./sim
| #include <vector> | |
| #include <functional> | |
| #include <iostream> | |
| #include <string> | |
| // Forward declaration of the interface that will be used in the functions. | |
| class NestedInteger { | |
| public: | |
| // Return true if this NestedInteger holds a single integer, rather than a nested list. | |
| bool isInteger() const | |
| { |
| #include <iostream> | |
| template<typename T> | |
| void fnc(T&& x) | |
| { | |
| // std::cout << x; | |
| x++; | |
| } | |
| int main() |
| find ../build/bin/ -type f \( -name \*.so \) -exec nm -A {} + | grep symBoL |
| #undef UNICODE | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <windows.h> | |
| #include <winsock2.h> | |
| #include <ws2tcpip.h> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string> |
| #include "stdio.h" | |
| #include <stdlib.h> | |
| #include <math.h> | |
| #include <mpi.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| int process_Rank, size_Of_Comm; | |
| double distro_Array[] = {1, 2, 3, 4, 5, 6 ,7, 8, 9, 10, 11, 12, 13, 14}; // data to be distributed | |
| int N = sizeof(distro_Array)/sizeof(distro_Array[0]); |
| import os | |
| extension = '.csv' | |
| tree = os.walk('./dataset') | |
| paths = sorted([os.path.join(f[0], name) for f in tree if len(f[2])!=0 for name in f[2] if os.path.splitext(name)[-1] == '.csv']) |
| import multiprocessing | |
| import os | |
| # split a list into evenly sized chunks | |
| def chunks(l, n): | |
| return [l[i:i+n] for i in range(0, len(l), n)] | |
| def do_job(job_id, data_slice, queue): | |
| for item in data_slice: | |
| print ("job", job_id, item) |