-
Install PyXB and IPython:
$ pip install ipython pyxb
-
Generate the bindings:
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import base64 | |
MESSAGE = ''' | |
EUYQGhMMSx0cU0FIU1MCFAQPG01NQ0gTAEICChUGBxZTRVxBSQoZFQYKHQpKSUNURhcVEgoUFR1I | |
SltDSBkBTRwKEAgQHxFCSkFJDgkJCgoGCkMLAQBGUklUQhMPAgAJCgYLV0MOSR0VAxAaABZBQVRP | |
TRICCRVIAk5IEg4dVFRfRkYZBgRARBI= | |
''' |
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 <ctype.h> | |
#include <stdlib.h> | |
#include "morse.h" | |
/* | |
* Function morse_to_index by cypherpunks on Reddit. | |
* See: http://goo.gl/amr6A3 | |
*/ | |
int morse_to_index (const char* str) |
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
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA1 | |
Hello. | |
The path lies empty; epiphany seeks the devoted. | |
Liber Primus is the way. Its words are the map, their | |
meaning is the road, and their numbers are the direction. |
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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
import os | |
import grobid_core | |
import grobid_trainer | |
if __name__ == '__main__': |
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
var addkonamiCode = function () { | |
var status = 0; | |
$("body").keydown(function (e) { | |
if ((e.which === 38 && (status === 0 || status === 1)) | |
|| (e.which === 40 && (status === 2 || status === 3)) | |
|| (e.which === 37 && (status === 4 || status === 6)) | |
|| (e.which === 39 && (status === 5 || status === 7)) | |
|| (e.which === 66 && status === 8)) { | |
status++; |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
kMDItemBitsPerSample = 32 | |
kMDItemColorSpace = "RGB" | |
kMDItemContentCreationDate = 2016-01-09 13:02:34 +0000 | |
kMDItemContentModificationDate = 2016-01-09 13:02:34 +0000 | |
kMDItemContentType = "public.jpeg" | |
kMDItemContentTypeTree = ( | |
"public.jpeg", | |
"public.image", | |
"public.data", | |
"public.item", |
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 | |
# 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", |
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 <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); |
NewerOlder