This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pi@pi02:~/website $ npm ls | |
[email protected] /home/pi/website | |
├─┬ [email protected] | |
│ ├─┬ [email protected] | |
│ │ ├─┬ [email protected] | |
│ │ │ └── [email protected] | |
│ │ └── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] | |
│ ├── [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using Raspbian | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
node -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @Author: Jordi Corbilla | |
while true; do | |
(echo "%CPU %MEM ARGS $(date)" && ps -e -o pcpu,pmem,args --sort=pcpu | cut -d" " -f1-5 | tail) >> cpu.log; sleep 0.1; | |
done | |
#Example results; | |
#%CPU %MEM ARGS Fri 12 Aug 19:11:20 UTC 2016 | |
#87.0 1.8 python /home/pi/mpi4py-2.0.0/demo/matrixmultiplication.py | |
#90.0 1.8 python /home/pi/mpi4py-2.0.0/demo/matrixmultiplication.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
@Author: Jordi Corbilla | |
@Description: Parallel MPI Matrix Multiplication (NxN) | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ****************************** | |
# These steps will allow you to configure SSH on every device | |
# Jordi Corbilla | |
# ****************************** | |
# run this from PiController using PuTTY | |
cd ~ | |
cd .ssh | |
scp 192.168.1.71:/home/pi/.ssh/pi01 . | |
cat pi01 >> authorized_keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ****************************** | |
# These steps will allow you to configure SSH on every device | |
# Run the commands below from PiController device | |
# Jordi Corbilla | |
# ****************************** | |
# PiController (192.168.1.74) | |
ssh-keygen | |
cd ~ | |
cd .ssh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ****************************** | |
# These steps will allow you to install MPI4PY to your Raspbian Jessie distro | |
# Jordi Corbilla | |
# ****************************** | |
# download mpi4py | |
wget https://bitbucket.org/mpi4py/mpi4py/downloads/mpi4py-2.0.0.tar.gz | |
#unzip the file | |
sudo tar -zxf mpi4py-2.0.0.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ****************************** | |
# These steps will allow you to install MPICH3 to your Raspbian Jessie distro | |
# Jordi Corbilla | |
# ****************************** | |
# update the system | |
sudo apt-get update | |
# update packages | |
sudo apt-get dist-upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2016, Jordi Corbilla | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// - Redistributions of source code must retain the above copyright notice, | |
// this list of conditions and the following disclaimer. | |
// - Redistributions in binary form must reproduce the above copyright notice, | |
// this list of conditions and the following disclaimer in the documentation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2016, Jordi Corbilla | |
// All rights reserved. | |
// | |
// Redistribution and use in source and binary forms, with or without | |
// modification, are permitted provided that the following conditions are met: | |
// | |
// - Redistributions of source code must retain the above copyright notice, | |
// this list of conditions and the following disclaimer. | |
// - Redistributions in binary form must reproduce the above copyright notice, | |
// this list of conditions and the following disclaimer in the documentation |