# install required stuff (you should have already installed it anyways)
pip install --user mkdocs
pip install --user mkdocs-material
sudo apt install nodejs
# clone the repo
git clone https://github.com/biggis-project/biggis-docs.git
cd biggis-docs
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 node | |
// TODO: this is currently just a helper script included from `fix-mkdocs-pages.sh` | |
const fs = require('fs') | |
const yaml = require('js-yaml') | |
function firstObjectKey(obj) { | |
return Object.keys(obj)[0] | |
} |
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
library(lsa) | |
# create some sample data in temp dir | |
td = tempfile() | |
dir.create(td) | |
write(c("dog", "cat", "mouse"), file = paste(td, "D1", sep = "/")) | |
write(c("ham", "mouse", "sushi"), file = paste(td, "D2", sep = "/")) | |
write(c("dog", "pet", "pet"), file = paste(td, "D3", sep = "/")) | |
data(stopwords_en) |
- async : Nice library which among other features provides queue processing using multiple cores
- https://goldfirestudios.com/blog/136/Horizontally-Scaling-Node.js-and-WebSockets-with-Redis
- https://yarnpkg.com/en/package/node-http-proxy
- https://github.com/airbnb/javascript - airbnb's js style guide
- https://flow.org/en/docs/usage/ - using a type checker in js
- 8 non-flux strategies for react communication
- react apollo
- apollo with optimistic ui updates
- https://github.com/skale-me/skale-engine
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
// sending-a-file-as-multipart-through-xmlhttprequest | |
https://stackoverflow.com/questions/9395911/sending-a-file-as-multipart-through-xmlhttprequest | |
// change the id `USE-YOUR-ID` | |
const img = document.getElementById('USE-YOUR-ID'); | |
// extracts image data from <img> element through canvas | |
const canvas = document.createElement('canvas'); |
# show whole messages as formatted JSON
curl -s https://stream.wikimedia.org/v2/stream/recentchange | grep data | sed 's/^data: //g' | jq .
# show only title and comment
curl -s https://stream.wikimedia.org/v2/stream/recentchange | grep data | sed 's/^data: //g' | jq '{title:.title, comment:.comment}'
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
myscatter_lower <- function(data, | |
point_color = "white", | |
border_color = NA, | |
point_size = 3) { | |
drawcell <- function(fx, fy, datax, datay) { | |
oldpar <- par(mar = c(0,0,0,0), bg = "white") | |
on.exit(par(oldpar), add = TRUE) |
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
\makeatletter | |
\renewenvironment{thebibliography}[1]{ | |
\section*{\refname}% | |
\@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% | |
\list{\@biblabel{\@arabic\c@enumiv}}{ | |
\leftmargin0pt | |
\@openbib@code | |
\usecounter{enumiv} | |
}% | |
\let\p@enumiv\@empty |
How to install node-red:
mkdir mynodered
cd mynodered
yarn add --network-concurrency 1 node-red
./node_modules/.bin/node-red
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
# these libraries required corrplot 0.84, download from github | |
# install.packages("devtools") | |
# devtools::install_github("taiyun/corrplot") | |
library(raster) | |
library(corrplot) | |
citation("corrplot") | |
s <- stack("~/Work/biggis/data/data-julian/Auto150_georef.tif") | |
nlayers(s) | |
plot(s[[1]]) |