Skip to content

Instantly share code, notes, and snippets.

View fuwiak's full-sized avatar
💭
I may be slow to respond.

Pawel fuwiak

💭
I may be slow to respond.
View GitHub Profile
@fuwiak
fuwiak / git_cheat-sheet.md
Created February 24, 2020 19:32 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
#Correlation with output variable
cor_target = abs(cor["Sales"])
#Selecting highly correlated features
relevant_features = cor_target[cor_target>0.9]
relevant_features # you have columns highly correlated with Sales
#Correlation with output variable
cor_target = abs(cor["Sales"])
#Selecting highly correlated features
relevant_features = cor_target[cor_target>0.9]
relevant_features # you have columns highly correlated with Sales
#Correlation with output variable
cor_target_list = list(map(np.abs, cor_target))
score=[]
for target in cor_target:
#Selecting highly correlated features
relevant_features = cor_target[target>0.9]
library(dplyr)
library(sqldf)
temp<-sqldf("select * from suicides_tmp")
#zmienilem nazwe na total, bo stara nazwa rzucala wyjatki
names(temp)[names(temp) == 'suicides.100k.pop_total'] <- 'total'
#tutaj mamy podzielony dataframe na kawalki dla kazdego roku oddzielie
temp_by_year<-split(temp, temp$year)
def wartosc_bezwgledna(x):
if x>=0:
return x
else:
return -x
wartosc_bezwgledna(8)
wartosc_bezwgledna(-6)
punkty = int(input("Podaj poczatkowa liczbe punktow "))
f = int(input("Podaj liczbe procent frekwencji "))
so = float(input("Podaj srednia ocen "))
if so>=4.0 and f>94:
punkty+=20
print("Liczba punktow wynosi %d" % punkty)
else:
print("Liczba punktow wynosi %d" % punkty)
#include<iostream>
using namespace std;
int wartosc_bezwgledna(int x){
if(x>=0)
return x;
else
return -x;
}
#include<iostream>
using namespace std;
int liczba_punktow(int x, int f, float so){
if(f>94 && so>4.0)
return x+20;
else
return x;
}