Skip to content

Instantly share code, notes, and snippets.

View gaurav's full-sized avatar

Gaurav Vaidya gaurav

View GitHub Profile
@gaurav
gaurav / test.json
Last active December 13, 2017 15:30
Converting a blank node from JSON-LD (test.json) -> XML/RDF (test.xml) -> JSON-LD (test_back.json) and Turtle (test_back.ttl)
{
"@context": {
"obo": "http://purl.obolibrary.org/obo/",
"denotes": {
"@id": "obo:IAO_0000219",
"@type": "@id"
}
},
[{
"@context": "https://www.phyloref.org/curation-tool/json/phyx.json",
"@type": "owl:Ontology",
"citation": "Example"
}]
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:ns1="http://www.w3.org/2002/07/owl#"
xmlns:ns2="http://www.essepuntato.it/2012/04/tvc/"
xmlns:ns3="http://rs.tdwg.org/dwc/terms/"
xmlns:ns4="http://vocab.phyloref.org/phyloref/testcase.owl#"
xmlns:ns5="http://purl.org/opentree/nexson#"
xmlns:ns6="http://purl.obolibrary.org/obo/"
xmlns:ns7="http://ontology.phyloref.org/phyloref.owl#"
xmlns:ns8="http://purl.org/spar/pso/"
@gaurav
gaurav / .vimrc
Created December 5, 2018 15:48
My .vimrc
" Activate pathogen.
call pathogen#infect()
call pathogen#helptags()
" These are a few of my favourite settings.
syntax on
set background=dark
set hlsearch
set incsearch
set smartindent
@gaurav
gaurav / batman bares bear arms
Last active July 9, 2019 04:58
Batman Backlog
Jon Jon Wendt gives Gene Valgene his hooded cloak.
Gene Valgene: ...
Gene Valgene: [Batman voice] I'm the Batman now.
Jon Jon Wendt: Batman!
Gene Valgene: Batman.
Jon Jon Wendt: Batman! Batman! Batman!
Gene Valgene: BAAAAAAAAAT
Gene Valgene: MAAAAAAAAAAN
Jon Jon Wendt: That's the spirit!
Gene Valgene: [Batman voice] Hmm.
@gaurav
gaurav / field_summaries.2019-nov-4
Created November 4, 2019 23:33
List of fields used in PubMed Annual Baseline 2019
# '.' indicates XML nodes
# '/' indicates XML attributes
# '#' are XML values, but only for some fields
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText,34722040)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.mn,2)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.mrow.mi,7)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.mrow.mo,6)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.mrow.msub.mi,4)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.msup.mi,1)
(PubmedArticleSet.PubmedArticle.MedlineCitation.Article.Abstract.AbstractText.DispFormula.math.mfrac.msup.mrow.mi,1)
@gaurav
gaurav / CGEX_CtxAll010-shex-validation.json
Created January 14, 2020 16:23
ShEx validation of example validation for CGEX_CtxAll010
{
"type": "Failure",
"node": "http://dataexchange.clinicalgenome.org/CGEX_CtxAll010",
"shape": "http://dataexchange.clinicalgenome.org/interpretation/shacl/shapes/ContextualAllele",
"errors": [
{
"type": "TypeMismatch",
"triple": {
"type": "TestedTriple",
"subject": "http://dataexchange.clinicalgenome.org/CGEX_CtxAll010",
{
"nodes": [
{
"name": "root",
"ontology_reference": "",
"values": {},
"links": [],
"properties": []
},
{
@gaurav
gaurav / Shell output
Last active May 12, 2021 15:09
linkml-classes-bug
$ pipenv install linkml==0.0.7
Creating a Pipfile for this project...
Installing linkml==0.0.7...
Adding linkml to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
@gaurav
gaurav / crdch_model_pr_112_vs_v1.0.1.diff
Last active September 16, 2021 20:23
Diff between CRDCH model in PR 112 vs v1.0.1
--- ccdhmodel.yaml 2021-09-16 14:57:11.000000000 -0400
+++ crdch_model.yaml 2021-09-16 14:56:48.000000000 -0400
@@ -1,84 +1,84 @@
name: CRDC-H
notes:
- Derived from [CDM_Dictionary_v1 (Active)](https://docs.google.com/spreadsheets/d/1oWS7cao-fgz2MKWtyr8h2dEL9unX__0bJrWKv6mQmM4)
-id: https://example.org/ccdh
-version: v1.0-3-g99ffd30c-dirty
+id: https://example.org/crdch
+version: v0.2-346-g2a758251