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
license: mit |
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
// v2 | |
/* UPDATE 13/02/2022 | |
Added columns argument and made each optional | |
*/ | |
// Returns an array of unique random numbers | |
RANDUNIQUE = | |
LAMBDA([rows],[columns],[min],[max], |
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
let | |
BaseUrl = "https://fake-odata-api.com/v1/Entities?", | |
Token = "F4K3-T0K3N-D0NT-U5E-L0L", | |
EntitiesPerPage = 1000, | |
GetJson = (Url) => | |
let Options = [Headers=[ #"Authorization" = "Bearer " & Token ]], | |
RawData = Web.Contents(Url, Options), | |
Json = Json.Document(RawData) | |
in Json, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
name: Dad Joke API Example | |
description: Very basic implementation of fetching data and putting into Excel | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
const button = document.querySelector("button"); | |
button.addEventListener("click", run); | |
async function getRandomDadJoke(){ |
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
let | |
Value.WaitFor = (producer as function, interval as function, optional count as number) as any => | |
let | |
list = List.Generate( | |
() => {0, null}, | |
(state) => state{0} <> null and (count = null or state{0} < count), | |
(state) => if state{1} <> null | |
then {null, state{1}} | |
else {1 + state{0}, Function.InvokeAfter(() => producer(state{0}), interval(state{0}))}, | |
(state) => state{1}) |
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
let | |
Web.MultiPartPost = (url as text, parts as record) as binary => | |
let | |
unique = Text.NewGuid(), | |
boundary = "--" & unique, | |
crlf = "#(cr)#(lf)", | |
item = (name, value) => | |
let | |
filename = Value.Metadata(value)[name]?, | |
contentType = Value.Metadata(value)[type]?, |
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
Public Function quote(sString As String) As String | |
quote = Chr(34) + sString + Chr(34) | |
End Function | |
Public Function URLEncode(sString As String) As String | |
Dim iLen As Integer | |
iLen = Len(sString) | |
If iLen > 0 Then | |
ReDim sResult(iLen) As String |
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
## https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/ | |
library(raster) | |
library(sp) | |
library(rgdal) | |
library(viridisLite) | |
library(rasterVis) | |
## Read age data | |
data <- read.csv("input/avg_age_15.csv", stringsAsFactors = F) | |
## Read shapefile |
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
/** | |
* Start a workflow | |
* | |
* @param {Object} params | |
* @param {String} params.listName The name of the list | |
* @param {Number} params.itemID The item ID | |
* @param {String} params.workflowName The name of the workflow | |
* @param {Array|Object} [params.parameters] An array of object with {Name:"Name of the parameter", Value:"Value of the parameter"} | |
* @param {Function} [params.after] Callback after the request is done | |
*/ |
NewerOlder