Skip to content

Instantly share code, notes, and snippets.

View abhirup-dev's full-sized avatar
💭
I love Open Source and AI!

Abhirup Das abhirup-dev

💭
I love Open Source and AI!
  • AML Platform @ ShareChat
  • Kolkata
View GitHub Profile
@abhirup-dev
abhirup-dev / svm.py
Created July 28, 2017 05:52 — forked from mblondel/svm.py
Support Vector Machines
# Mathieu Blondel, September 2010
# License: BSD 3 clause
import numpy as np
from numpy import linalg
import cvxopt
import cvxopt.solvers
def linear_kernel(x1, x2):
return np.dot(x1, x2)
@abhirup-dev
abhirup-dev / export-toby.js
Created November 17, 2019 08:24 — forked from krishpop/export-toby.js
Export Toby
// code courtesy of Toby team
chrome.storage.local.get("state", o => (
((f, t) => {
let e = document.createElement("a");
e.setAttribute("href", `data:text/plain;charset=utf-8,${encodeURIComponent(t)}`);
e.setAttribute("download", f);
e.click();
})(`TobyBackup${Date.now()}.json`, o.state)
));
@abhirup-dev
abhirup-dev / wsl2-hosts-sync.ps1
Created June 26, 2020 04:03 — forked from MichaelBelgium/wsl2-hosts-sync.ps1
WSL v2 windows hosts sync (powershell - updates domains to wsl2 ip)
# Requires -RunAsAdministrator
# Only works for WSL v2, this is completely not needed for WSL v1 where u always can use 127.0.0.1 in hosts file
Clear-Host
if ((Get-InstalledModule "Carbon" -ErrorAction SilentlyContinue) -eq $null) {
Install-Module -Name 'Carbon' -AllowClobber
}
Import-Module 'Carbon'
@abhirup-dev
abhirup-dev / gist:1195ea793c42af4bce344dd88809f0ab
Created July 7, 2020 02:54 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
@abhirup-dev
abhirup-dev / tmux.conf
Last active March 2, 2021 17:25 — forked from rajanand02/tmux.conf
Tmux configurations with status bar theme
unbind C-b
set -g prefix C-z
bind-key C-a send-prefix
# split panes using | and -
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
unbind '"'
unbind %