Skip to content

Instantly share code, notes, and snippets.

@jacquerie
jacquerie / Elasticsearch percolate API
Created November 26, 2013 16:35
When run gives: {"ok":true,"_index":"_percolator","_type":"foo","_id":"barbaz1","_version":1} {"ok":true,"_index":"_percolator","_type":"foo","_id":"barbaz2","_version":1} {"ok":true,"matches":[]} Expecting: {"ok":true,"_index":"_percolator","_type":"foo","_id":"barbaz1","_version":1} {"ok":true,"_index":"_percolator","_type":"foo","_id":"barbaz…
#!/bin/bash
# Deletes, then creates the collection "foo".
curl -s -XDELETE localhost:9200/foo > /dev/null
curl -s -XPUT localhost:9200/foo > /dev/null
# Creates two percolators called "barbaz1" and "barbaz2" with different
# values in the "plugh" field.
curl -XPUT localhost:9200/_percolator/foo/barbaz1 -d '{
"plugh": "xyzzy",
#include <mpi.h>
#include <stdio.h>
int main (int argc, char** argv) {
int i, rank, size, left, right;
double A, B, SUM;
MPI_Status status;
MPI_Init(&argc, &argv);
#include <mpi.h>
#include <stdio.h>
#define SIZE 10000
int main (int argc, char** argv) {
int i, rank, size, left, right;
int A[SIZE], B[SIZE];
MPI_Request request;
#include <mpi.h>
#include <stdio.h>
#define SIZE 10000
int main (int argc, char** argv) {
int i, rank;
int A[SIZE], B[SIZE];
MPI_Status s1, s2;
#include <mpi.h>
#include <stdio.h>
int main (int argc, char** argv) {
int rank, size;
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
#include <mpi.h>
#include <stdio.h>
#define ROOT 0
#define REORDER 0
int main (int argc, char** argv) {
int i, j, local_rank, rank, size;
int rank_src, rank_dest, north, east, south, west;
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#define ROOT 0
int main (int argc, char** argv) {
int i, j, rank, size;
MPI_Datatype diagonal;