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
| // Asyncronous for each | |
| async.forEach(messageIds, function(messageId, callback) { | |
| // Do stuff | |
| callback(); | |
| }, function(err) { | |
| if (err) return next(err); | |
| // Success | |
| }); |
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
| function mit18086_poisson | |
| %MIT18086_POISSON | |
| % Sets up and solves a 1d, 2d and 3d Poisson problem | |
| % on domain [0 1]^dim, with homogeneous Dirichlet b.c. | |
| % everywhere and constant right hand side. | |
| % Uses successive Kronecker products to construct | |
| % sparse system matrices | |
| % 03/2007 by Benjamin Seibold | |
| % http://www-math.mit.edu/~seibold/ |
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
| //Mongo Installation | |
| // Generate mongod with parameters | |
| echo "mongod --dbpath=~/data --nojournal" > mongod | |
| chmod a+x mongod | |
| // 1. Run the mongo deamon (mongod) | |
| cd ~/data | |
| ./mondog |
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
| <html> | |
| <header> | |
| <title>Form with bootstrap</title> | |
| <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
| <style> | |
| body {background-color: #ddd;} | |
| strong { font-size: 1.3em; } |
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
| from pymongo import MongoClient | |
| import datetime | |
| from datetime import timedelta | |
| import pprint | |
| client = MongoClient('mongodb://localhost:27017/') | |
| db = client['demodb'] | |
| collection = db['test_collection'] |
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
| conda info --envs | |
| conda create --name mongo_py_env | |
| source activate mongo_py_env | |
| source deactivate | |
| conda install <package> | |
| conda install pymongo |
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
| brew install mongodb | |
| mkdir -p /Users/gichavez/Documents/Github/data | |
| echo "mongod --dbpath=/Users/gichavez/Documents/Github/data --nojournal" > mongod | |
| chmod a+x mongod | |
| ./mongod |
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
| #include "misc/TaskTimer.hpp" | |
| { | |
| timer.start(); | |
| // CODE here | |
| if (!mpi_rank()) | |
| cout << "# time = " << timer.elapsed() << endl; |
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
| g++ -E helloworld.cpp > helloworld.txt |
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
| // g++ -std=c++11 testTimer.cpp -o testTimer.out | |
| // ./testTimer.out | |
| #include <iostream> | |
| #include <chrono> | |
| #include <ctime> | |
| long fibonacci(unsigned n) | |
| { | |
| if (n < 2) return n; |