jorandradefig icon

hallazgosmusicales.R

jorandradefig | PRO | 07/04/21 07:27:12 PM UTC | 0 ⭐ | 9641 👁️ | Never ⏰ | []
R |

2.29 KB

|

None

|

0 👍

/

0 👎

#########
# Date: 4/6/21
# Author: JA
#########
 
pacman::p_load(
  #dataframe
  tidyverse,
  #viz
  plotly,
  #webapps
  shiny,
  #api
  spotifyr
)
 
# Authentication
# Authorization
 
readRenviron(".env")
 
# Dashboard
# Tablero
 
# (Graphical) User Interface
ui <- pageWithSidebar(
  titlePanel("Hallazgos Musicales"),
  sidebarPanel(
    selectInput(
      inputId="a",
      label="Artista A:",
      choices=c("The XX","Billie Eilish","Adele","The Killers"),
      selected="The XX"
    ),
    selectInput(
      inputId="b",
      label="Artista B:",
      choices=c("Willie Colón","Bad Bunny","J Balvin","Buena Vista Social Club"),
      selected="Buena Vista Social Club"
    ),
    selectInput(
      inputId="x",
      label="X:",
      choices=c("valence","danceability","instrumentalness","key_name"),
      selected="valence"
    ),
    selectInput(
      inputId="y",
      label="Y:",
      choices=c("valence","danceability","instrumentalness","key_name"),
      selected="key_name"
    ),
  ),
  mainPanel(
    plotlyOutput(
      outputId="plot"
    )
  )
)
 
# Server
# Reactivity
 
server <- function(input,output) {
  
  access_token <- reactive({
    get_spotify_access_token(
      client_id=Sys.getenv("SPOTIFY_CLIENT_ID"),
      client_secret=Sys.getenv("SPOTIFY_CLIENT_SECRET")
    )
  })
  
  a <- reactive({
    get_artist_audio_features(
      artist=input$a,
      authorization=access_token()
    )
  })
  
  b <- reactive({
    get_artist_audio_features(
      artist=input$b,
      authorization=access_token()
    )
  })
  
  x <- reactive({
    input$x
  })
  
  y <- reactive({
    input$y
  })
  
  output$plot <- renderPlotly({
    plot <- ggplot() +
      geom_point(a(),mapping=aes_string(x=x(),y=y()),color="blue") +
      geom_point(b(),mapping=aes_string(x=x(),y=y()),color="red")
    ggplotly(plot)
  })
}
 
shinyApp(ui,server)
 
# killers <- get_artist_audio_features(
#   artist="The Killers",
#   authorization=access_token
# )
#
# willie <- get_artist_audio_features(
#   artist="Willie Colón",
#   authorization=access_token
# )
# 
# ggplot() +
#   geom_point(willie,mapping=aes(x=valence,y=key_name),color="red") +
#   geom_point(killers,mapping=aes(x=valence,y=key_name),color="blue")
 

Comments

  • Venzetis icon
    03/30/26 01:51:43 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

    |

    👍

    /

    👎