Skip to content

Instantly share code, notes, and snippets.

@bglearning
bglearning / largest_graph_adj_eigenvector.py
Last active July 1, 2022 08:30
Largest Eigenvector of Graph Adjacency gives node importance (?)
import numpy as np
graph_str = """
E - F
|
A - B - C
| |
` - D
"""
from random import randint
def is_prime(num):
flag = True;
for i in range(2,int(num**0.5)):
if num%i == 0:
flag = False;
break;
return flag;
@bglearning
bglearning / Vim logs
Last active February 24, 2016 13:39
My experiences with vim (logs)
-> Ctrl-r to search and auto-complete previous commands in terminal
-> Ctrl-d and Ctrl-u to scroll around
-> Installed Vundle to manage the plugins for vim. Following a blog was error prone. Finally got it right by....
simply following the instructions on Vundle's git repo -_- It's so obvious that I feel stupid for not going that way earlier.
Anyway, things seem to be working well.
-> imap defines a mapping that works in insert mode.
@bglearning
bglearning / Ubuntu days experience log
Last active October 18, 2016 03:46
A log detailing my Ubuntu experience
Day 1:
-> Finally, completed installing Ubuntu with help from Mahendra.
Was planning to dual boot with windows 8.1 but somehow the GRUB wouldn't show up at the beginning.
The installment involved partitioning the HDD using gparted after booting ubuntu from the usb.
Had to do it twice: a ~200MB partition had been left out in the first installment. It was causing a problem. However, formatting the
partition (gparted again) didn't help. This time, it was an even scarier blackout.
Installing everything from scratch solved the problem. We had to allocate space for the EFI boot loader and voila!
-> So, now that I'm on Ubuntu, I have no idea of what to do next. So, after running queries like "things to do after installing ubuntu"
in google, I stumbled upon a blog article which seemed pretty legit.
-> The first step as pointed out by the article was to run sudo apt-get update. The problem being that I've no idea what the terms: sudo,