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
| /* | |
| Breaks down a string containing a list of numbers in a float array. | |
| Recipe copied from here: https://stackoverflow.com/a/1862712/793218 | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <ctype.h> |
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
| /* | |
| Example demonstrating how to allocate and use a multdimensional | |
| array. | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
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
| /* | |
| Example demonstrating how to allocate and use a multdimensional | |
| array. | |
| Reference: http://pleasemakeanote.blogspot.com.br/2008/06/2d-arrays-in-c-using-malloc.html | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> |
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
Show hidden characters
| [ | |
| { | |
| "args": | |
| { | |
| "characters": ">" | |
| }, | |
| "command": "insert" | |
| }, | |
| { | |
| "args": |
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 | |
| """ | |
| This script solves a very specific problem: I am uploading files | |
| to figshare and exceeding the limits on the number of uploaded | |
| files. Since the file size limit is 5GB and I need to upload a | |
| large quantity of files, I want to compress sequences of data files | |
| and upload only the compressed ones. | |
| Given a pattern string and a number, this script will compress | |
| all files that match the pattern. Each compressed file will |
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
| # Generic template for a Makefile | |
| # put here the root name of your code | |
| PROGRAM = randomauger_omp | |
| CC = gcc-6 | |
| FC = gfortran | |
| FFLAGS = -fopenmp -O2 | |
| CFLAGS = -fopenmp -O2 |
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 <stdio.h> | |
| #include <math.h> | |
| int main(int argc, char *argv[]){ | |
| printf("%f \n", M_PI); | |
| return(0); | |
| } |
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
| /* | |
| Generates 1000 pseudo random numbers (integers). | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <time.h> | |
| int main(){ | |
| int i, imax=1000; |
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
| /* | |
| Illustrates how to get arguments from the command-line. | |
| Usage: | |
| args 10.0 | |
| will print out the number you entered. If not given any | |
| argument, will print out usage info. | |
| */ |
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
| /* | |
| Gets a command-line argument that provides the number of | |
| elements in an array. Dynamically allocates the array. | |
| Generates random numbers and print them. | |
| Usage: | |
| args 10 | |
| will print out the 10 random numbers. |