Skip to content

Instantly share code, notes, and snippets.

View Mike-Honey's full-sized avatar

Mike Honey Mike-Honey

View GitHub Profile
@Mike-Honey
Mike-Honey / License.MD
Created October 6, 2024 22:35
License - All my Gists are Public Domain

All public gists in this account are Public Domain unless a separate license is included in the Gist.

let func =
(Table as table, optional Step as number, optional SelectedColumns, optional GroupByColumns, optional Suffix as text, optional Buffer as any) =>
let
// Steps to prepare the (optional) parameters for the nested function "fnFetchNextRow"
Source = if Buffer = null then Table else Table.Buffer(Table),
Step0 = if Step = null then -1 else Step,
Step_ = if Step = null then 1 else Number.Abs(Step),
Suffix = if Suffix = null then ".Prev" else Suffix,
GroupByColumns = if GroupByColumns = null then null else GroupByColumns,
@Seddryck
Seddryck / Character.FromHtmlEntity.pq
Created March 28, 2018 04:04
Function to translate en html entity (such as ♣ or À) to the equivalent character
shared Character.FromHtmlEntity = (entity as text) =>
let
list =
{
[Name="Agrave", Number=192]
, [Name="Aacute", Number=193]
, [Name="Acirc", Number=194]
, [Name="Atilde", Number=195]
, [Name="Auml", Number=196]
, [Name="Aring", Number=197]
@anup50695
anup50695 / extract_chunks.r
Last active May 16, 2019 10:04
Key Phrase Extraction from Tweets
extractChunks <- function(x) {
x <- as.String(x)
wordAnnotation <- annotate(x, list(Maxent_Sent_Token_Annotator(), Maxent_Word_Token_Annotator()))
POSAnnotation <- annotate(x, Maxent_POS_Tag_Annotator(), wordAnnotation)
POSwords <- subset(POSAnnotation, type == "word")
tags <- sapply(POSwords$features, '[[', "POS")
tokenizedAndTagged <- data.frame(Tokens = x[POSwords], Tags = tags)
tokenizedAndTagged$Tags_mod = grepl("NN|JJ", tokenizedAndTagged$Tags)
@bruceh48
bruceh48 / gist:22733a575c4faded54421ae4c5b4572e
Created February 16, 2017 04:49
Bounding Box of Australia in WKT format
POLYGON((112.76 -10.23, 155.48 -10.23, 155.48 -44.28, 112.76 -44.28, 112.76 -10.23))