- install python package manager pip in local user dir
> curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py”
> python get-pip.py --user
> rm get-pip.py
- install requests module in user dir
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="2.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:db="http://docbook.org/ns/docbook" | |
xmlns:fn="http://www.w3.org/2005/xpath-functions"> | |
<xsl:output method="text" encoding="UTF-8" indent="no" /> | |
<xsl:strip-space elements="*"/> | |
<xsl:template match="/"> |
from __future__ import unicode_literals | |
import requests | |
import json | |
import argparse | |
parser = argparse.ArgumentParser(description="""Retrieves pull request numbers and titles from the GitHub REST API. | |
Only merged pull requests will be listed.""") | |
parser.add_argument('-t', '--token', required=True, | |
help="""Generate an OAUTH token on your GitHub personal settings page, under Personal access tokens, | |
and provide it as an argument here. You need not give it any scopes.""") |
license: gpl-3.0 | |
height: 960 |
> curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py”
> python get-pip.py --user
> rm get-pip.py
var slack = require('slack-notify') | |
var moment = require('moment-timezone') | |
function formatFloat(value) { | |
return (value && !isNaN(value)) ? parseFloat(value).toFixed(1) : value | |
} | |
function formatValue(value) { | |
if(typeof value == 'number') { | |
return value.toFixed(1) |
import json | |
import subprocess | |
# read file | |
with open('scraped.json', 'r') as scraped: | |
data=scraped.read() | |
# parse file | |
obj = json.loads(data) |
library(remotes) | |
install_github("molgenis/molgenis-r-datashield") | |
install_github("datashield/dsBaseClient@v6.0-dev") | |
install_github("datashield/DSI") | |
install_github("obiba/opalr") | |
install_github("datashield/DSOpal") | |
library(DSI) | |
library(DSOpal) | |
library(dsBaseClient) | |
server <- c("opal-dsi") |
.get_info <- function(armadillo_server) { | |
info_url <- armadillo_server | |
urltools::path(info_url) <- "actuator/info" | |
response <- httr::GET(info_url) | |
httr::stop_for_status(response, task="fetch server info") | |
return(httr::content(response)) | |
} | |
.discover_endpoint <- function(auth_server) { | |
openid_config_url <- auth_server |
import urllib.request | |
import json | |
body = json.dumps({'clientUrl': 'http://localhost/api/fdp'}).encode('utf-8') | |
req = urllib.request.Request('https://home.fairdatapoint.org') | |
req.add_header('Content-Type', 'application/json; charset=utf-8') | |
response = urllib.request.urlopen(req, body) |
/* | |
* RSQL parser | |
*/ | |
or = head:and tail:("," and)* { | |
if(tail.length == 0) return head; | |
var result = [head], i; | |
for (i = 0; i < tail.length; i++) { | |
result.push(tail[i][1]); | |
} |