jorandradefig icon

tm.R

jorandradefig | PRO | 06/20/21 06:42:00 PM UTC | 0 ⭐ | 9963 👁️ | Never ⏰ | []
R |

2.98 KB

|

None

|

0 👍

/

0 👎

#########
# Date: 20/6/21
# Author: JA
# #######
 
pacman::p_load(
  tidyverse,
  shiny,
  tm,
  plotly,
  wordcloud,
  treemap,
  viridis
)
 
getwd()
 
songs <- read_csv("jorandradefig/193/input/spotify_songs.csv")
songs <- songs %>%
  filter(language == "es")
#songs[1,]
#songs[,1]
songs <- songs[sample(nrow(songs), 500),]
 
head(songs$lyrics)
 
tail(songs$lyrics)
 
lyrics <- songs$lyrics
 
lyrics <- Corpus(VectorSource(lyrics))
 
stopwords("english")
stopwords("spanish")
 
lyrics <- tm_map(lyrics,removeWords,stopwords("spanish"))
# stemming
 
#writeLines(as.character(lyrics[1]))
 
dtm <- DocumentTermMatrix(lyrics)
 
#tdm <- TermDocumentMatrix(lyrics)
 
#as.matrix(dtm)
 
#as.data.frame(as.matrix(dtm))
 
freq <- colSums(as.matrix(dtm))
#ocurrences <- colSums(as.matrix(dtm))
 
freq <- sort(freq,decreasing=TRUE)
 
findFreqTerms(dtm, lowfreq=200)
 
#names(freq)
 
ocurrences <- data.frame(term=names(freq),ocurrences=freq)
 
plot <- ggplot(
  subset(ocurrences, ocurrences > 300),
  aes(
    x=reorder(term,-ocurrences),
    y=ocurrences
  )
) +
  geom_bar(stat="identity") +
  theme_minimal() +
  theme(
    axis.text.x = element_text(angle=45,hjust=1)
  )
 
ggplotly(plot)
 
set.seed(150)
wordcloud(
  names(freq),
  freq,
  min.freq=200,
  scale=c(4,0.1),
  colors=brewer.pal(6,"Dark2")
)
  
 
#homicidios %>%
#  group_by(anio) %>%
#  summarise(
#    hom_total=sum(hom_total)
#  )
 
# homicidios %>%
# filter(hom_total > 100)
 
###############
 
ui <- fluidPage(
  sidebarLayout(
    sidebarPanel(
      selectInput(
        inputId="lista",
        label="Lista de reproducción:",
        selected="Flow Selecto",
        choices=unique(songs$playlist_name)
      )
    ),
    mainPanel(
      tableOutput(
        outputId="tabla"
      ),
      plotlyOutput(
        outputId="plot"
      )
    )
  )
)
 
 
 
server <- function(input,output) {
  output$tabla <- renderTable({
    songs %>%
      filter(playlist_name==input$lista)
  })
  
  # letras <- reactive({
  #   tm_map(
  #     Corpus(VectorSource(lista()$lyrics)),
  #     removeWords,
  #     stopwords("spanish")
  #   )
  # })
  # 
  # matriz <- reactive({
  #   DocumentTermMatrix(letras())
  # })
  # 
  # frecuencias <- reactive({
  #   colSums(as.matrix(matriz()))
  # })
  
  #repeticiones <- reactive({
  #  data.frame(term=names(frecuencias()),ocurrences=frecuencias())
  #})
  
  #plot <- reactive({
  #  ggplot(
  #    subset(repeticiones(), ocurrences > 300),
  #    aes(
  #      x=reorder(term,-ocurrences),
  #      y=ocurrences
  #    )
  #  ) +
  #    geom_bar(stat="identity") +
  #    theme_minimal() +
  #      axis.text.x = element_text(angle=45,hjust=1)
  #    theme(
  #    )
  #})
  
  #output$plot <- reactive({
  #  ggplotly(plot())
  #})
  
  #set.seed(150)
  #wordcloud(
  #  names(freq),
  #  min.freq=200,
  #  freq,
  #  scale=c(4,0.1),
  #  colors=brewer.pal(6,"Dark2")
  #)
}
 
shinyApp(ui,server)
 

Comments

  • Venzetis icon
    03/30/26 01:51:44 AM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎