Skip to content

Instantly share code, notes, and snippets.

@bbartley
bbartley / document.cpp
Last active September 19, 2015 18:13
Reading an RDF/XML file with Raptor
#define SBOL_URI "http://sbolstandard.org/v2"
static void
print_triple(void* user_data, raptor_statement* triple)
{
raptor_statement_print_as_ntriples(triple, stdout);
fputc('\n', stdout);
}
void Document::read(std::string filename)
@bbartley
bbartley / CustomWidget.js
Last active August 29, 2015 14:23
Example of a custom widget for iPython 3.1 notebook
/* Should be placed inside your .ipython/nbextensions folder */
require(["widgets/js/widget", "widgets/js/manager"], function(widget, manager){
console.log('Module loaded');
var CustomPickerView = widget.DOMWidgetView.extend({
// Render the view.
render: function(){
this.$el.text('Hello World!');
},
update: function(options) {