Skip to content

Instantly share code, notes, and snippets.

View yayamamo's full-sized avatar
🏠
Working from home

Yasunori yayamamo

🏠
Working from home
View GitHub Profile
# Obtain the label of a given class (:class1).
SELECT DISTINCT ?c (STR(?l) AS ?lb)
WHERE {
?c a :class1 ;
<http://www.w3.org/2000/01/rdf-schema#label> ?l .
}
# Obtain a list of classes.
SELECT DISTINCT ?c
WHERE {
@yayamamo
yayamamo / mhlw2orphanet_via_LSD
Last active August 29, 2015 14:06
パブコメ案件番号495140196で別紙に記載されている指定難病リストとRDFized LSDへのリンク。LSDの日英対訳を用いてOrphanetへのリンクを加えたものもあり。ご自由にお使いください。ただし、内容の正確性については保証しかねます。
<http://purl.jp/bio/10/mhlword20140908/102> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://purl.jp/bio/10/lsd/term/J078068> .
<http://purl.jp/bio/10/mhlword20140908/38> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://purl.jp/bio/10/lsd/term/J038273> .
<http://purl.jp/bio/10/mhlword20140908/105> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://purl.jp/bio/10/lsd/term/J146645> .
<http://purl.jp/bio/10/mhlword20140908/31> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.orpha.net/ORDO/Orphanet_610> .
<http://purl.jp/bio/10/mhlword20140908/62> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.orpha.net/ORDO/Orphanet_90035> .
<http://purl.jp/bio/10/mhlword20140908/13> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://www.orpha.net/ORDO/Orphanet_71211> .
<http://purl.jp/bio/10/mhlword20140908/11> <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://purl.jp/bio/10/lsd/term/J013955> .
<http://purl.jp/bio/10/mhlword20140908/47> <http://www.w3.org/2000/01/rdf-schema#label>
@yayamamo
yayamamo / Success_RedHat4
Last active September 23, 2016 05:21
Failure of installing umakaviewer.
$ pip install -U setuptools
Downloading/unpacking setuptools from https://pypi.python.org/packages/8d/ae/766f375fc05b3d345b7082333da9f8b49af02d9c5680ff4eb15655fc5ae1/setuptools-27.3.0-py2.py3-none-any.whl#md5=53f779309b8d04422b4f65cd09af4a28
Downloading setuptools-27.3.0-py2.py3-none-any.whl (467kB): 467kB downloaded
Installing collected packages: setuptools
Found existing installation: setuptools 5.8
Uninstalling setuptools:
Successfully uninstalled setuptools
Successfully installed setuptools
Cleaning up...
@yayamamo
yayamamo / file0.txt
Last active November 28, 2018 08:09
Fusekiをダウンロードして立ち上げるまで。Mac OS X編 ref: https://qiita.com/yayamamo/items/b03f35ebbb0667779c85
$ java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
<http://identifiers.org/refseq/NC_011757.1#feature:567410-567778:-1:CDS.525> insdc:prote<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "ht2 - WWW Error 500 Diagnostic</title>s"> true .
$ java -jar ~/src/ConvRDF-master/ConvRDF.jar -i:turtle /tmp/yayamamo_fifo > refseq.nt
14:54:43 WARN riot :: [line: 2669123396, col: 90] Bad IRI: <http://identifiers.org/obo.go/0003676; GO> Code: 17/WHITESPACE in PATH: A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
14:54:43 WARN riot :: [line: 2669123397, col: 1 ] Bad IRI: <http://identifiers.org/obo.go/0003676; GO> Code: 17/WHITESPACE in PATH: A single whitespace character. These match no grammar rules of URIs/IRIs. These characters are permitted in RDF URI References, XML system identifiers, and XML Schema anyURIs.
14:54:43 WARN riot :: [line: 2669123398, col: 1 ] Bad IR
<http://purl.org/allie/id/longform/1528191> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://purl.org/allie/ontology/201108#LongForm> .
<http://purl.org/allie/id/longform/1528191> <http://www.w3.org/2000/01/rdf-schema#label> "specific pathogen-free"@en .
<http://purl.org/allie/id/longform/1528191> <http://www.w3.org/2000/01/rdf-schema#label> "特定病原体除去"@ja .
<http://purl.org/allie/id/longform/1528191> <http://www.w3.org/2002/07/owl#sameAs> <http://dbpedia.org/resource/Specific_Pathogen_Free> .
<http://purl.org/allie/id/longform/1528191> <http://www.w3.org/2002/07/owl#sameAs> <http://dbpedia.org/resource/Specific_pathogen_free> .
<http://purl.org/allie/id/longform/1528191> <http://purl.org/allie/ontology/201108#frequency> "474" .
<http://purl.org/allie/id/pair/1547869> <http://purl.org/allie/ontology/201108#hasLongFormOf> <http://purl.org/allie/id/longform/1528191> .
<http://purl.org/allie/id/pair/1943614> <http://purl.org/allie/ontology/201108#hasLongFormOf> <http://purl.org/allie/id/longform/1528191>
@yayamamo
yayamamo / json2ld-context.json
Created September 19, 2019 02:17
Sample JSON2LS mapping.
{
"@context": [
"https://schema.org/docs/jsonldcontext.json",
{
"@vocab": "http://json2ld.mapper.tokyo/ns/",
"json2ld": "http://json2ld.mapper.tokyo/ns/",
"name": {
"@id": "schema:name"
},
"homepage": {
@yayamamo
yayamamo / umakaparser.md
Created April 14, 2022 05:06 — forked from sasaujp/umakaparser.md
UmakaParserがどのようにデータを収集しているか

umakaparserが吐き出すJSONは以下のフィールドから成り立っています。

  • meta_data
  • prefixes
  • classes
  • properties
  • inheritance_structure

それぞれどのように情報を取得しているのかについて記述します。

@yayamamo
yayamamo / gist:7a8faa84d93dd705b92cdded22b3cd48
Last active February 25, 2023 01:26
Setting up BioGPT on macOS
pip install torch
brew update
brew install rustup
rustup-init
source "$HOME/.cargo/env"
git clone https://github.com/huggingface/tokenizers
cd tokenizers/bindings/python
pip install setuptools_rust
python setup.py install
pip install transformers -U