Skip to content

Instantly share code, notes, and snippets.

View abdu95's full-sized avatar
🏠
Working from home

Abduvosid Malikov abdu95

🏠
Working from home
  • EPAM
  • Tashkent, UZ
View GitHub Profile
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")
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)
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,
@abdu95
abdu95 / index.html
Created May 10, 2017 15:17
Detect JavaScript Data Types // source http://jsbin.com/muvoweyiwa
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Detect JavaScript Data Types</title>
</head>
<body>
<script id="jsbin-javascript">
function show_type(arg){
@abdu95
abdu95 / index.html
Created May 10, 2017 15:16
Detect JavaScript Data Types // source http://jsbin.com/muvoweyiwa
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Detect JavaScript Data Types</title>
</head>
<body>
<script id="jsbin-javascript">
function show_type(arg){
<!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.
<!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.
<!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>
<!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">
<!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>