Skip to content

Instantly share code, notes, and snippets.

View SanjayShetty01's full-sized avatar

Sanjaya J Shetty SanjayShetty01

View GitHub Profile

Implementing Linear Regression from Scratch

Theory

The Formula for Linear Regression:

 y = a + bx

@SanjayShetty01
SanjayShetty01 / Rank_languages_by_popularity.R
Created September 10, 2023 05:13
This R script serves as a solution to a task on the Rosetta Code website. It uses the rvest and dplyr libraries to scrape data from the Rosetta Code website, specifically ranking programming languages by popularity based on task entries. The script fetches data from the website, processes it, and presents insights into the popularity of programm…
library(rvest)
library(dplyr)
options(stringsAsFactors=FALSE)
# getting the required table from the rosetta website
langUrl <- "https://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity/Full_list"
langs <- read_html(langUrl) %>%
html_nodes(xpath='/html/body/div/div/div[1]/div[3]/main/div[2]/div[3]/div[1]/table') %>%
html_table() %>%
data.frame() %>%
title author date
Futures-Options Arbitrage Trade
Sanjaya J Shetty
2022-06-02

What are Futures and Options?