This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import concurrent.futures | |
import gzip | |
import io | |
import os | |
import multiprocessing | |
import json | |
import queue | |
import threading | |
from typing import Dict, Optional, Tuple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python | |
import os | |
import json | |
import sys | |
import subprocess | |
whitelist_url = 'https://raw.githubusercontent.com/ptgolden/ma-browser/master/src/gene_whitelist.json' | |
if __name__ == '__main__': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@base <file:///home/patrick/Code/projects/annot/> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix oa: <http://www.w3.org/ns/oa#> . | |
@prefix bibo: <http://purl.org/ontology/bibo/> . | |
<#annotation1> | |
rdf:Type oa:Annotation ; | |
oa:hasBody <#body1> ; | |
oa:hasTarget <#target1> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import html | |
import mailbox | |
import re | |
import sys | |
import time | |
from urllib.parse import urljoin | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Initialize project | |
npm init -y | |
# Install dependences | |
npm install --save-dev browserify watchify babelify | |
# Set browserify commands | |
BROWSERIFY_ARGS='src/index -o dist/bundle.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
html, body { margin: 0; padding: 0; } | |
#message { height: 3em; width: 800px; text-align: center; padding: 1em 0; box-sizing: border-box;} | |
</style> | |
<body> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<div id="message"></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var NUM_BINS = 2; | |
var data = [ | |
[5, 15, 25, 35], | |
[25, 35, 5, 15], | |
[25, 25, 15, 5], | |
[0, 10, 20, 40] | |
] | |
var all = Array.prototype.concat.apply([], data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@context": { | |
"periodization": { | |
"@id": "http://perio.do/#periodization", | |
"@container": "@index" | |
}, | |
"label": "schema:name", | |
"definitions": "http://perio.do/#period" | |
}, | |
"@id": "http://perio.do/data", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX dbo: <http://dbpedia.org/ontology/> | |
PREFIX dbprop: <http://dbpedia.org/property/> | |
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | |
PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
SELECT ?place, ?label, ?geonamesURI, ?depiction WHERE { | |
?place a dbo:Country . | |
?place rdfs:label ?label . | |
?place foaf:depiction ?depiction . | |
FILTER langMatches(lang(?label), 'en') . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// vim: set filetype=javascript | |
{ | |
function zeroPadded(number) { | |
var numberInt = parseInt(number) | |
, numberStr = '' + Math.abs(numberInt) | |
, sign = numberInt < 0 ? '-' : '+' | |
if (numberStr.length < 4) numberStr = ('0000' + numberStr).substr(-4, 4); |
NewerOlder