This file contains hidden or 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
english_t <- c() | |
for (i in article) { | |
element <- translate(i, from = "ru", to = "en") | |
english_t <- c(english_t, element) | |
} | |
unlisted_result <- unlist(english_t, use.names=FALSE) | |
write(unlisted_result, "en_translated_article.txt") |
This file contains hidden or 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
install.packages("xml2", "rvest") | |
#Loading the rvest package | |
library(rvest) | |
url <- 'https://tjournal.ru/analysis/240516-glavnye-vakciny-ot-covid-19-dolgo-li-zhdat-skolko-budut-stoit-i-poyavyatsya-li-v-rossii-zarubezhnye-preparaty' | |
webpage <- read_html(url) | |
article_nodeset <- html_nodes(webpage,'.content--full p') | |
article <- html_text(article_nodeset) |
This file contains hidden or 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
install.packages("aws.translate", repos = c(getOption("repos"), "http://cloudyr.github.io/drat")) | |
# accessKeys.csv == the CSV downloaded from AWS containing your Acces & Secret keys | |
keyTable <- read.csv("accessKeys.csv", header = T) | |
AWS_ACCESS_KEY_ID <- as.character(keyTable$Access.key.ID) | |
AWS_SECRET_ACCESS_KEY <- as.character(keyTable$Secret.access.key) | |
#activate | |
Sys.setenv("AWS_ACCESS_KEY_ID" = AWS_ACCESS_KEY_ID, |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Detect JavaScript Data Types</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function show_type(arg){ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Detect JavaScript Data Types</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
function show_type(arg){ |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//Write a JavaScript function that returns a passed string with letters in alphabetical order. Assume punctuation and numbers symbols are not included in the passed string. |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
//Write a JavaScript function that returns a passed string with letters in alphabetical order. Assume punctuation and numbers symbols are not included in the passed string. |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p id="demo"></p> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<p id="_day"></p> | |
NewerOlder