Skip to content

Instantly share code, notes, and snippets.

View emonhossainraihan's full-sized avatar
🎯
Focusing on topology

EmonHR emonhossainraihan

🎯
Focusing on topology
View GitHub Profile
%% Read in files and extrapolate mortality rate
x = csv.read('life.csv','format', '%f %f');
age = x{1};
prob = x{2};
model = stats.lm(log(prob(61:end)), log(age(61:100)));
pfun = @(a) util.if_(a<60, @()prob(a), util.if_(a>121, 1, exp(model.beta(1) + model.beta(2) * log(a))));
@emonhossainraihan
emonhossainraihan / interactive_google_oauth2.py
Created August 9, 2021 16:17 — forked from frankie567/interactive_google_oauth2.py
Interactive Google OAuth2 flow with Streamlit
import asyncio
import streamlit as st
from httpx_oauth.clients.google import GoogleOAuth2
st.title("Google OAuth2 flow")
"## Configuration"
client_id = st.text_input("Client ID")

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@emonhossainraihan
emonhossainraihan / bobp-python.md
Created January 26, 2021 06:19 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@emonhossainraihan
emonhossainraihan / markdown-text-101.md
Created November 5, 2020 14:53 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@emonhossainraihan
emonhossainraihan / after_res_hooks.js
Created September 5, 2020 11:20 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups