Skip to content

Instantly share code, notes, and snippets.

View SirmaXX's full-sized avatar
🏠
Working from home

Deniz Balcı SirmaXX

🏠
Working from home
View GitHub Profile
@SirmaXX
SirmaXX / maewhile.R
Last active June 26, 2022 13:36
mae for while
startTime <- Sys.time()
y<-c(10,8,6,4,2)
x<-c(5,4,3,2,1)
n<-length(y)
toplam=0
i <- 1
while (i <= n) {
@SirmaXX
SirmaXX / maefor.R
Last active June 26, 2022 13:35
Mae for two loop
startTime <- Sys.time()
y<-c(10,8,6,4,2)
x<-c(5,4,3,2,1)
n<-length(y)
toplam=0
for (i in 1:n) {
diff=y[i]-x[i]
@SirmaXX
SirmaXX / Factory_Log.py
Last active July 1, 2023 06:01
logging system with factory design pattern
class Log:
global date_time
now = datetime.now()
date_time = now.strftime("%m/%d/%Y, %H:%M:%S")
def __init__(self,severity,message,user):
self.severity=severity
@SirmaXX
SirmaXX / solution.R
Last active April 27, 2022 19:39
CHAPTER10 Solution power of (-1/2)
---
title: "R Notebook"
output: html_notebook
---
# Chapter 10 Canonical correlation Analysis (CH10 p 539)
Chapter is related to Partitioning the covariance matrix (p73 ch2) .(ABbrevation :kısaltma )
@SirmaXX
SirmaXX / chapter8.Rmd
Last active April 28, 2022 04:27
two column
# Multivariate Statisttics 7.Week Lecture Notes
# Multivariate Multiple Regression Analysis
You can find this topic in the chapter 8 in the book.
1. Multiple Regression
$$ Y = X\beta +\varepsilon ~~\to \text{Regression Model} $$
@SirmaXX
SirmaXX / multi.R
Last active April 28, 2022 04:36
multivarite dersinde yazılan kodlar
#y=ax+b^
#y<-matrix(c(12,10,8,11,6,7,2,3,3),nrow=9,ncol=1)
#y
#x<-matrix(0:8,nrow=9,ncol=1)
#x
#b<-solve(t(x)%*%x)%*%t(x)%*%y
@SirmaXX
SirmaXX / factor.R
Last active April 28, 2022 04:35
togonal matrix
#varyans kovaryans matrisi tanımlayalım
Sigma<-matrix(c(19,30,2,12,30,57,5,23,2,5,38,47,12,23,43,68),ncol = 4,byrow = True)
#loading matrix
lodMatrix<-matrix(c(4,1,7,2,-1,6,1,8),ncol = 2,byrow = TRUE)
#loading matrisinin transpozu
TransLodMatrix<-t(lodMatrix)
#matrislerin çarpımı
multiple<-lodMatrix %*% TransLodMatrix
#sigma ile ll' çarpımını çıkarıyoruz
Result=Sigma-multiple
@SirmaXX
SirmaXX / barchartt1.R
Last active January 11, 2022 19:29
alpercode
companies1 <- c("BİST100","USD","ALTIN","ISDMR1","ISDMR")
cash1<-c(17626,28650,38122,75699,62652)
cash1<-cash1[order(cash1)]
df1<-data.frame(companies1)
barplot(cash1, names.arg= companies1,
main = "Şirket değerleri",col=rainbow(3)
,xlab = "Şirket isimleri", ylab = "değeri")
library(reshape2)
library(ggplot2)
#yapılacak işler/görevler
tasks <- c("Literatür taraması", "Veri toplanması", "Veri Analizi", "Rapor ve veri görselleştirmesi")
#görevlerimizi bir dataframe'a aktarıyoruz
dfr <- data.frame(
name = factor(tasks, levels = tasks),
start.date = as.Date(c("2010-08-24", "2010-10-31", "2010-11-01", "2011-02-14")),
end.date = as.Date(c("2010-10-31", "2010-12-14", "2011-02-28", "2011-04-30")),
is.critical = c(TRUE, FALSE, FALSE, TRUE)
public class Friends {
private String Name;
private Friends next;
}
public class Person extends Friends {
private String Name;
private Integer HitCount;
public Friend FriendList;
public Person(String n) {
Name = n;