This file contains 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 | |
# This script will setup the git repository where it is executed to ignore | |
# output, metadata, and execution count data from ipython/jupyter notebooks | |
# anywhere in the local tree. It will install a fast JSON parser called jq | |
# to help in this effort. This will take ~50 MB on your disk, but it's likely | |
# a good idea to add the whole jq directory to .gitignore. | |
# with guidance from http://timstaley.co.uk/posts/making-git-and-jupyter-notebooks-play-nice/ | |
# Note that this script will overwrite .gitconfig and .gitattributes in its |
This file contains 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 <stdio.h> | |
#include <math.h> | |
#include <stdlib.h> | |
#define _USE_MATH_DEFINES | |
const float two_pi = 2*M_PI; | |
void basic_box_muller(float *retval); | |
void polar_box_muller(float *retval); |
This file contains 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<stdio.h> | |
#include<mpi.h> | |
int main (char **args, int nargs) { | |
MPI_Init (&nargs, &args); | |
int rank; | |
MPI_Comm_rank (MPI_COMM_WORLD, &rank); | |
fprintf (stdout, "Greetings from process of rank %d.\n", rank); | |
MPI_Finalize(); | |
return 0; |
This file contains 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 <sys/time.h> | |
#include <stdio.h> | |
unsigned long get_time(); | |
int main(int nargs, char **args) { | |
fprintf (stdout, "The current epoch time / ms: %ld\n", get_time()); | |
long start_time = get_time(); | |
int i; | |
for (i = 0; i < 1e8; ++i); |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="500" height="500" style="border:1px solid #c3c3c3;"> | |
Your browser does not support the HTML5 canvas tag. | |
</canvas> | |
<script> |