Skip to content

Instantly share code, notes, and snippets.

View CS-savvy's full-sized avatar

Mukul Kumar CS-savvy

View GitHub Profile
@CS-savvy
CS-savvy / dependency_tags.txt
Last active December 26, 2021 14:50
Converts Spacy dependency parser output to DGL graph object.
ROOT
acl
acomp
advcl
advmod
agent
amod
appos
attr
aux
@CS-savvy
CS-savvy / Visulaize_graph_in_jupyter.py
Last active March 18, 2019 01:07
Visualizing Keras Tensorflow graph directly in Jupyter Notebook
''' You just need to copy this code to jupyter Notebook '''
from IPython.display import clear_output, Image, display, HTML
def strip_consts(graph_def, max_const_size=32):
"""Strip large constant values from graph_def."""
strip_def = tf.GraphDef()
for n0 in graph_def.node:
n = strip_def.node.add()
n.MergeFrom(n0)
@CS-savvy
CS-savvy / Generate_strings.py
Created March 16, 2019 11:22
This python script generates all possible strings using provided string
print("This algorithm use backtrack to first find all possible sets using combination \n then uses permutation to get all possible arrangements \n\n\n")
class find_all_possiblities():
def __init__(self,source_str):
self.source_str = source_str
self.generated_str = list()
self.prepare_for_combination(self.source_str)