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
#!/bin/bash | |
# version 2.0 | |
# {jq} needed | |
# | |
# Make sure to add teams incoming webhook URL to global variable : | |
# export WEBHOOK_URL={your webhook URL} | |
# Help. | |
if [[ "$1" == "-h" || "$1" == "--help" ]]; then |
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(shiny) | |
library(httr) | |
# OAuth setup -------------------------------------------------------- | |
# Most OAuth applications require that you redirect to a fixed and known | |
# set of URLs. Many only allow you to redirect to a single URL: if this | |
# is the case for, you'll need to create an app for testing with a localhost | |
# url, and an app for your deployed app. |
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
#!/bin/bash | |
# (c) @nurandi | |
# Make sure to add teams incoming webhook URL to ~/.bashrc : | |
# export WEBHOOK_URL={your webhook URL} | |
source ~/.bashrc | |
# Help. | |
if [[ "$1" == "-h" || "$1" == "--help" ]]; then |
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
# Grey colours palette in R | |
# Credit to | |
# . Code: http://research.stowers-institute.org/efg/R/Color/Chart/ | |
# . Graphics: http://www.mango-solutions.com/wp/2015/02/50-shades-of-grey-according-to-r | |
greys = grep("^grey", colours(), value = TRUE) | |
colCount <- 6 | |
rowCount <- 17 | |
plot( c(1,colCount), c(0,rowCount), type="n", ylab="", xlab="", | |
axes=FALSE, ylim=c(rowCount,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
# Menghitung frequensi per kata | |
text = readLines("pidato-presiden.txt") | |
text = unlist(strsplit(text, "\\W+")) | |
text = tolower(text) | |
text = data.frame(table(text)) | |
# Menghapus stop-words | |
stopw = readLines("stopwords-id.txt") | |
text = text[!is.element(text$text, stopw),] |