Skip to content

Instantly share code, notes, and snippets.

View egonw's full-sized avatar
💭
I don't want a status.

Egon Willighagen egonw

💭
I don't want a status.
View GitHub Profile
@egonw
egonw / gist:13cc98fbf14bbf6588a4b7cfe5fb88fb
Created December 4, 2018 11:15 — forked from JervenBolleman/gist:60cc9dd13614c05fe9743519cd6ef5aa
Let virtuoso discover all sparql endpoints in wikidata and use it to improve federations capabilities
for iri in $(wget -q --header "accept:text/csv" "https://query.wikidata.org/sparql?query=SELECT DISTINCT ?iri WHERE { [] wdt:P5305 ?iri }" -O -|grep -oP '^http[\S]+')
do
echo "isql $port $user $password exec='LOAD SERVICE <$iri> DATA;'";
done
@egonw
egonw / de.md
Last active November 25, 2018 10:48 — forked from lucaswerkmeister/de.md
Wikidata For Long-Time Wikipedians elevator pitch, written at the Wikidata Train the Trainers workshop in Berlin

Elevator Pitch: Wikidata für langjährige Wikipedianer_innen

Du arbeitest bei Wikipedia mit, oder? Okay, stell dir vor:

Im südostasiatischen Hinterhuglhapfing wurde eine neue Volkszählung durchgeführt. Artikel in der bairischen Wikipedia für alle Orte in der Region wurden schon vor Jahren angelegt – wer aktualisiert jetzt die Einwohnerzahlen?

Oder: Eine schwedische Wikipedianerin war in Feuerland im Urlaub und hat einheimische Insektenarten fotografiert. Wie landen die Fotos jetzt in den entsprechenden Wikipedia-Artikeln in fünfzehn Sprachversionen?

@egonw
egonw / gcc2018mainz.txt
Created November 13, 2018 20:14 — forked from baoilleach/gcc2018mainz.txt
#gcc2018mainz tweets at 13/11/2018 15:50
WendyAnneWarr #gcc2018mainz GCC next year will be nov 3-5 2019 in Mainz
WendyAnneWarr #gcc2018mainz nowStefan Kast does closing comments.
WendyAnneWarr #gcc2018mainz AZ’s design make test analysis DMTA will take some time to implement
WendyAnneWarr #gcc2018mainz first thing to do at AZ was to clean up the data and make knowledge base including @Reaxys etc. An automation platform prototype was built during 2017.
WendyAnneWarr #gcc2018mainz Tyrchan. Working with Marwin Segler. https://t.co/yAnt0PQFQn
MichaelKGilson #gcc2018mainz Tyrchan... Empirical eval of drug design by AI in Astra Zeneca projects. Observes will need automated synthesis and rxn prediction for this to really work.
--> MichaelKGilson Already doing automated synthesis. Next couple years expect to integrate with the AI.
WendyAnneWarr #gcc2018mainz Tyrchan presents filtering down of AI-generated compounds. Don’t like to show his slides since Work unpublished but I guess that this one is OK https://t.co/opWYT3Exw5
WendyAnneWarr #gcc2018mainz
@egonw
egonw / spectre.c
Created January 5, 2018 16:07 — forked from ErikAugust/spectre.c
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
#!/usr/bin/env python
from sys import stdin, stdout
import csv
rdr = csv.reader(stdin, delimiter='\t')
wrt = csv.writer(stdout, delimiter='\t')
vals = []
rows = []
for row in rdr:
@egonw
egonw / WD_WP_inchiKey.sparql
Created August 20, 2016 13:21 — forked from andrawaag/WD_WP_inchiKey.sparql
SPARQL query to link Wikidata and Wikipathways with an InchiKey
#QUERY <http://sparql.wikipathways.org>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT str(?inchikeyLit) as ?inchikey str(?pathwayIDLit) as ?pathwayID WHERE {
SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql> {
all: sql2rdf.jar
curl -s "http://ebi.edu.au/ftp/databases/chembl/ChEMBLdb/releases/chembl_15/chembl_15_mysql.tar.gz" |\
tar xOvzf - chembl_15_mysql/chembl_15.mysqldump.sql |\
java -cp sql2rdf.jar SQLToRDF
sql2rdf.jar : SQL2RDF.jj
javacc SQL2RDF.jj ## tested with javacc 5.0
javac SQLToRDF.java
jar cvf $@ *.class
@egonw
egonw / elsevier-open-miner-service.php
Created February 20, 2012 15:16 — forked from hubgit/elsevier-open-miner-service.php
Elsevier's Text Miner Service
<?php
$params = array(
'client' => 'lipids', // or 'locus', for Arabidopis
'app' => 'lipids', // or 'locus', for Arabidopis
'mimetype' => 'text/html',
'contents' => file_get_contents('article.html'),// read the article HTML from a separate file
);
$curl = curl_init('http://tryit.elsevier.com/oms/OpenMinerService');
@egonw
egonw / buildMolecule.js
Created April 16, 2009 18:57 — forked from olas/buildmol
Build a molecule using Bioclipse script for JChemPaint
/*******************************************************************************
* Bioclipse-script to iteratively build a molecule in JChemPaint
* Author: Ola Spjuth
* Author: Egon Willighagen
******************************************************************************/
//Start with a carbon and open in JCP
mol=cdk.fromSMILES("C")
mol2=cdk.generate2dCoordinates(mol)
ui.open(mol2)
@egonw
egonw / sstructuredb test script.js
Created November 17, 2008 10:13 — forked from jonalv/sstructuredb test script.js
Creates a local structure database and adds three molecules to it.
var dbName = "exampleScriptDB";
if ( structuredb.allDatabaseNames().contains(dbName) ) {
structuredb.deleteDatabase(dbName);
}
structuredb.createDatabase(dbName);
smiles = new Array("Cc1ccccc1", "CCO", "O=O");
names = new Array("toluene", "beer", "air");