Popular Post

_

Friday, December 15, 2023

"Scale in Clouds. What, How, Where, Why and When to Scale" - my new www.CMG.org presentation

Our presentation (with Jignesh Shah) was accepted for www.CMGimpact.com conference.

Title: Scale in Clouds. What, How, Where, Why and When to Scale
Venue:  Atlanta, GA on February 6 & 7

ABSTRACT:

Scale in Clouds

What, How, Where, Why and When to Scale


Igor Trubin, Jignesh Shah -  Capital One bank 


ABSTRACT

Presentation includes the following discussion themes. 

  • What to scale: servers, databases, containers, load balancers.

  • How to scale: horizontally/rightsizing, vertically, manually, automatically, ML based, predictive, serverless.

  • Where to scale: AWS (ASG,ECS, EKS, ELB), AZURE, GCP, K8s.

  • Why to scale: cost optimization, incidents avoidance, seasonality.

  • When to scale:  auto-scaling policies and parameters, pre-warming to fight  latency, correlating with business/app drivers.

Presentation includes a user case study of scaling parameters optimization: monitoring, modeling and balancing vertical and horizontal scaling, calculating optimal initial/desired cluster size and more.


Tuesday, November 21, 2023

AI!?

куда идёт AI


Tuesday, September 5, 2023

Me at work.... #datamanagement #rap

Friday, April 21, 2023

My 1st dialog with #chatGBT about R (text data to convert to code to create a #dataframe).


ME: I have CSV table  and need a code to convert that to dataframe.

GPT: Sure! Here is some code that will read a CSV file into a dataframe in R:

# set the working directory to the folder where your CSV file is located

setwd("/path/to/folder")

# read the CSV file into a dataframe

mydata <- read.csv("mycsvfile.csv", header = TRUE)

# view the dataframe

mydata


In this code, you will need to replace "/path/to/folder" with the actual path to the folder where your CSV file is located, and "mycsvfile.csv" with the actual name of your CSV file.

The read.csv() function reads a CSV file and creates a dataframe from it. The header = TRUE argument tells R that the first row of the CSV file contains column names.

After running this code, you should have a dataframe called mydata that contains the data from your CSV file. You can view the dataframe by simply typing mydata into the R console.


ME: I know that, but what is I have no ability to use file system? No read.csv, no write.csv, just a coma separated text to code like the following: 

first_column <- c("value_1", "value_2", ...)

second_column <- c("value_1", "value_2", ...)

df <- data.frame(first_column, second_column)


GPT: I see! Here's an example of how you could create a dataframe in R from comma-separated text using the format you provided:

lua

Copy code

# sample comma-separated text

text <- "value_1, value_2, value_3

         value_4, value_5, value_6

         value_7, value_8, value_9"


# split the text into separate lines

lines <- strsplit(text, "\n")[[1]]


# split each line into separate values

values <- lapply(lines, function(x) strsplit(x, ", ")[[1]])


# create a dataframe from the values

df <- data.frame(matrix(unlist(values), nrow=length(lines), byrow=TRUE))


# add column names to the dataframe

colnames(df) <- c("first_column", "second_column", "third_column")


# view the dataframe

In this code, you would need to replace the text variable with your own comma-separated text. The strsplit() function is used to split the text into lines and then into separate values. The lapply() function is used to apply the strsplit() function to each line of the text.

The data.frame() function is used to create a dataframe from the values. The matrix() function is used to reshape the values into a matrix with the appropriate dimensions.

Finally, the colnames() function is used to add column names to the dataframe. You would need to replace the column names in the colnames() function with the appropriate column names for your data.

____

I have tested that and that is not working well.

By googling I got better suggestion: 

https://sparkbyexamples.com/r-programming/different-ways-to-create-a-dataframe-in-r/