Skip to content

Instantly share code, notes, and snippets.

View thinkphp's full-sized avatar

Adrian Statescu thinkphp

View GitHub Profile
@thinkphp
thinkphp / probleme-solutii.R
Last active June 22, 2025 09:28
probleme-solutii.R
# PROBLEMA 1: Analiza stocurilor din magazine
# Calculează valoarea totală a stocului pentru fiecare produs din inventar (inclusiv produsele fără stoc),
# sortează descrescător și creează grafic barplot.
library(dplyr)
library(ggplot2)
# Unele produse din inventar nu au stoc înregistrat
stock_records <- data.frame(
product_id = c(101, 103, 105, 107, 101, 103),
# =============================================================================
# PART 2: RENEWABLE ENERGY TRANSITION (25 points)
# =============================================================================
# Load required libraries
library(readxl)
library(dplyr)
library(ggplot2)
library(gridExtra)
@thinkphp
thinkphp / solutii.R
Last active June 22, 2025 08:19
solutii
# Load required libraries
library(readxl)
library(dplyr)
library(ggplot2)
library(gridExtra)
# Set working directory (adjust as needed)
# setwd("path/to/your/excel/files")
#global data structures for property Management
#hardcoded property details from Table 1 (Task 2 requirement)
PROPERTIES = {
"B12-3AB": {"original_cost": 153450,"residual_mortgage": 112345},
"B13-4CD": {"original_cost": 212130,"residual_mortgage": 180234},
"B14-5GH": {"original_cost": 120100,"residual_mortgage": 85980},
"B15-6JK": {"original_cost": 135230,"residual_mortgage": 101321},
"B16-7MO": {"original_cost": 183230,"residual_mortgage": 130234}
@thinkphp
thinkphp / example-NYSE.md
Last active June 21, 2025 13:44
example-NYSE R Data Science

Part 1: Stock Performance Analysis (25 points)

Dataset stock_performance.xlsx contains data on NYSE-listed companies' stock performance, market capitalization, and sector information. Variables are as follows:

  • ticker: Stock ticker symbol (e.g., AAPL, MSFT)
  • company_name: Full company name
  • sector: Business sector (Technology, Healthcare, Finance, Energy, Consumer, Industrial)
  • market_cap: Market capitalization in billions of USD
  • price_change_1y: One-year percentage price change
  • dividend_yield: Annual dividend yield as percentage
@thinkphp
thinkphp / rental property details.py
Created June 21, 2025 08:55
rental property details
#global data structures for property Management
#hardcoded property details from Table 1 (Task 2 requirement)
PROPERTIES = {
"B12-3AB": {"original_cost": 153450,"residual_mortgage": 112345},
"B13-4CD": {"original_cost": 212130,"residual_mortgage": 180234},
"B14-5GH": {"original_cost": 120100,"residual_mortgage": 85980},
"B15-6JK": {"original_cost": 135230,"residual_mortgage": 101321},
"B16-7MO": {"original_cost": 183230,"residual_mortgage": 130234}
<!-- https://codepen.io/IronMan-the-builder/pen/azORPqM --->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rental Management System Flowcharts</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
@thinkphp
thinkphp / part 3. question 3.R
Last active June 20, 2025 16:21
part 3. question 3
#question 3:
completion_by_age <- traning_clean %>%
mutate(
age_bin = case_when(
age >= 18 & age <= 25 ~ "18-25",
age >= 26 & age <= 45 ~ "26-45",
@thinkphp
thinkphp / part3 #question 2.R
Last active June 20, 2025 16:17
part3 #question 2
library(tidyverse)
library(readxl)
#load the training data
training_data <- read_excel("training_participation_survey.xlsx")
#question 1: Error rates in variables
cat("\nPART 3 - Question 1: Error Rates\n")
#check program status errors (should only be specific values)
@thinkphp
thinkphp / part 3 Q2.R
Last active June 20, 2025 15:29
part 3 Q2.R
library(tidyverse)
library(readxl)
#load the training data
training_data <- read_excel("training_participation_survey.xlsx")
#question 1: Error rates in variables
cat("\nPART 3 - Question 1: Error Rates\n")
#check program status errors (should only be specific values)