Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Hacking away

Samuel Lampa samuell

💻
Hacking away
View GitHub Profile
View RuleOfFive_PrologExample.pro
% *** Some facts about substances ***
hasHBondDonorsCount( substanceX, 3 ).
hasHBondDonorsCount( substanceY, 5 ).
hasHBondDonorsCount( substanceZ, 7 ).
hasHBondAcceptorsCount( substanceX, 7 ).
hasHBondAcceptorsCount( substanceY, 10 ).
hasHBondAcceptorsCount( substanceZ, 13 ).
View ruleoffive.pl
% *** Some facts about substances ***
hasHBondDonorsCount( substanceX, 3 ).
hasHBondDonorsCount( substanceY, 5 ).
hasHBondDonorsCount( substanceZ, 7 ).
hasHBondAcceptorsCount( substanceX, 7 ).
hasHBondAcceptorsCount( substanceY, 10 ).
hasHBondAcceptorsCount( substanceZ, 13 ).
View time string in Bioclipse JS editor.js
function getDateTimeString() {
var d = new Date();
var now = d.getFullYear() + "-" +
pad( d.getMonth(), 2 ) + "-" +
pad( d.getDate(), 2 ) + "." +
pad( d.getHours(), 2 ) + "." +
pad( d.getMinutes(), 2 ) + "." +
pad( d.getSeconds(), 2 );
return now;
}
View GetRDFFromSMWStoreLocallyAndQuery.js
/**
* @title: Testing the Semantic MediaWiki connector plugin
* @author: samuel.lampa@gmail.com
**/
// Get RDF Data from Wiki
var wikiURL = "http://drugmet.rilspace.org/wiki/";
var rdfXml = smw.getTriples( wikiURL, 0 );
View gist:744215
// Bioclipse Script (BSL) to import contents of an RDF/XML file into a Semantic MediaWiki
// Create an empty RDF Store
rdfStore = rdf.createInMemoryStore();
// Yeah, obviously, fill the RDF Store with some triples from an RDF/XML file
rdf.importFile(rdfStore, "2nd-degreeproject/nmrshiftdata.1.rdf.xml", "RDF/XML")
// Write the RDF to a Semantic MediaWiki (with the RDFIO extension installed)
result = smw.putRDF(rdfStore, "http://drugmet.rilspace.org/wiki")
@samuell
samuell / AddOperatorHighligtingToPyDevForEclipse.diff
Created Dec 28, 2010
Add Operator Highligting to PyDev for Eclipse
View AddOperatorHighligtingToPyDevForEclipse.diff
diff --git a/org.python.pydev/src/org/python/pydev/editor/PyCodeScanner.java b/org.python.pydev/src/org/python/pydev/editor/PyCodeScanner.java
index 3e527cb..a4bb900 100644
--- a/org.python.pydev/src/org/python/pydev/editor/PyCodeScanner.java
+++ b/org.python.pydev/src/org/python/pydev/editor/PyCodeScanner.java
@@ -47,6 +47,7 @@ public class PyCodeScanner extends RuleBasedScanner {
private IToken numberToken ;
private IToken classNameToken;
private IToken funcNameToken ;
+ private IToken operatorToken ;
View gist:1477500
diff --git a/irods.html b/irods.html
index fedfee4..2f99d6f 100644
--- a/irods.html
+++ b/irods.html
@@ -516,6 +516,9 @@ You'll also need to enter your username for signing your edits: <<option t
Yee ...</pre>
@samuell
samuell / gist:1477609
Created Dec 14, 2011
Compiling iRODS 3.0 fails on Ubuntu 11.10 32bit
View gist:1477609
Module properties
------------------------------------------------------------------------
Compile flags:
-Wno-write-strings -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPARA_OPR=1 -Dlinux_platform -Wall -DTAR_STRUCT_FILE -DTAR_EXEC_PATH="/bin/tar" -DRBUDP_TRANSFER -I/home/samuel/opt/irods/lib/core/include -I/home/samuel/opt/irods/lib/api/include -I/home/samuel/opt/irods/lib/md5/include -I/home/samuel/opt/irods/lib/rbudp/include -DCOMPAT_201
Compile properties module propertiesMS.o...
Module msoDrivers
------------------------------------------------------------------------
Compile flags:
-Wno-write-strings -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -DPARA_OPR=1 -Dlinux_platform -Wall -DTAR_STRUCT_FILE -DTAR_EXEC_PATH="/bin/tar" -DRBUDP_TRANSFER -I/home/samuel/opt/irods/lib/core/include -I/home/samuel/opt/irods/lib/api/include -I/home/samuel/opt/irods/lib/md5/include -I/home/samuel/opt/irods/lib/rbudp/include -DCOMPAT_201
@samuell
samuell / gist:1481351
Created Dec 15, 2011
iRODS finishSetup log 20111215, 15:45
View gist:1481351
Finishing the iRODS setup
------------------------------------------------------------------------
Thu Dec 15 15:36:37 2011
Script:
Script: ./scripts/perl/finishSetup.pl
CWD: /home/samuel/opt/irods
Perl:
Perl path: /usr/bin/perl
@samuell
samuell / gist:1481827
Created Dec 15, 2011
SQL Test Errors on iRODS 3.0 install on Ubutnu 11.10 (32bit)
View gist:1481827
Finishing the iRODS setup
------------------------------------------------------------------------
Thu Dec 15 17:41:58 2011
Script:
Script: ./scripts/perl/finishSetup.pl
CWD: /home/samuel/opt/irods
Perl:
Perl path: /usr/bin/perl
You can’t perform that action at this time.