Skip to content

Instantly share code, notes, and snippets.

View abrarShariar's full-sized avatar
🎯
Focusing

Abrar Shariar abrarShariar

🎯
Focusing
View GitHub Profile
@abrarShariar
abrarShariar / minSwap.py
Created March 29, 2020 02:58
Hashmap for consecutive integers
# our position mapper
posMap = {
1: 4,
2: 2,
3: 3,
4: 1
}
@abrarShariar
abrarShariar / nuxt.config.js
Created March 12, 2020 06:58
nuxt.config.js updated
auth: {
redirect: {
login: '/login',
logout: '/',
callback: '/login',
home: false
},
@abrarShariar
abrarShariar / nuxt.config.js
Created March 12, 2020 06:52
nuxt.config.js
auth: {
redirect: {
login: '/login',
logout: '/',
callback: '/login',
home:
},
@abrarShariar
abrarShariar / login.js
Created March 12, 2020 06:46
Authenticate function body
try {
await this.$auth.loginWith('local', { data: this.user })
// some other line of code that shows loading msgs
// ...
this.$router.push(this.localePath({ path: 'dashboard' }))
} catch (e) {
// handling error
}
@abrarShariar
abrarShariar / docker-compose-dev.yml
Last active March 5, 2020 11:38
docker compose dev
mysql:
ports: '33060:3306'
appid:
ports: '8001:80'
redis:
ports: '6378: 6379'
@abrarShariar
abrarShariar / docker-compose.yml
Created March 5, 2020 11:22
docker config file
mysql:
ports: '3306:3306'
appid:
ports: '8000:80'
redis:
ports: '6379: 6379'
@abrarShariar
abrarShariar / m_1.R
Last active September 12, 2019 15:51
all_males_surivived <- data.combined[which(data.combined$sex == 'male' & data.combined$survived == 1),]
ggplot(all_males_surivived, aes(x = all_males_surivived$age, fill = factor(all_males_surivived$pclass))) +
geom_bar(width = 0.5) +
xlab("Age") +
ylab("Pclass") +
labs(fill = "Age")
x = -50:50
y = 500 - (900*x)
plot(x,y, type="l", col="red", xlim=c(-100,100), ylim=c(-1000, 1000))
abline(h=0, v=0)
title(main="500 - (900*x)", col.main="blue", font.main=2)
x = -50:50
y = x^2
plot(x,y, type="l", col="red", xlim=c(-100,100), ylim=c(-1000, 1000))
abline(h=0, v=0)
title(main="y=x^2", col.main="blue", font.main=2)
x = -50:50
y = x^2-500
plot(x,y, type="l", col="red", xlim=c(-100,100), ylim=c(-1000, 1000))
abline(h=0, v=0)
title(main="y=x^2-500", col.main="blue", font.main=2)