Skip to content

Instantly share code, notes, and snippets.

View IsuraManchanayake's full-sized avatar
🏠
Working from home

Isura D. Manchanayake IsuraManchanayake

🏠
Working from home
  • University of Melbourne
  • Melbourne
View GitHub Profile
var maxIterations;
var maxVal;
var height;
var width;
var pointx;
var pointy;
var thresh;
@IsuraManchanayake
IsuraManchanayake / demanglify.py
Created June 7, 2019 06:33
Demangle the mangled names in C++ flamegraphs (perf)
import cxxfilt
def toxml(s):
s = str.replace(str(s), '&', '&')
s = str.replace(str(s), '<', '&lt;')
return str.replace(str(s), '>', '&gt;')
def tostr(s):
s = str.replace(str(s), '&gt;', '>')
s = str.replace(str(s), '&lt;', '<')
@IsuraManchanayake
IsuraManchanayake / Solution.h
Last active May 16, 2020 19:55
Find edges that appear on every MST and find edges that appear in none of the MSTs.
#pragma once
#include <vector>
#include <map>
#include <unordered_set>
template<typename T>
struct AdjM {
std::vector<T> mat;
size_t V;