Skip to content

Instantly share code, notes, and snippets.

View junaid1460's full-sized avatar
๐Ÿ™ƒ
I may be slow to respond.

J junaid1460

๐Ÿ™ƒ
I may be slow to respond.
View GitHub Profile
@junaid1460
junaid1460 / jupyter_html_table.py
Last active January 7, 2023 20:57
Jupyter HTML Table class, Pythonic way of creating Table for jupyter
from IPython.display import HTML, display
class Tag:
def __init__(self, name, value):
self.name = name
self.value = value
def __repr__(self):
return "<%s>%s</%s>"%(self.name, str(self.value), self.name)
class Linear:
def __init__(self, data):
@junaid1460
junaid1460 / README.md
Last active September 26, 2017 08:43
Floyd-warshall with Distance Vector Generator

Floyd-warshall's algorithm with Distance Vector plugin

The code below is a plugin to this algorithm to generate path.

@junaid1460
junaid1460 / Bringing_Gun_To_a_Guard_Fight.py
Last active November 5, 2024 16:11
Google Foobar: Bringing a Gun to a Guard Fight
import math
def generate_dist_vector(size, start, tot_length, length):
tmp = [start]
count = 0
l, r = -length, tot_length - length
for i in range(size):
left = tmp[0]
right = tmp[count]
left += (l*2)
right += (r*2)