Skip to content

Instantly share code, notes, and snippets.

View WangZixuan's full-sized avatar
💭
Microsoft Suzhou is hiring!

Zixuan Wang WangZixuan

💭
Microsoft Suzhou is hiring!
View GitHub Profile
@WangZixuan
WangZixuan / PostfixToInfix.cpp
Last active September 7, 2018 09:07
Postfix to Infix
#include <string>
#include <stack>
#include <iostream>
using namespace std;
bool isOperand(char x)
{
return (x >= 'a' && x <= 'z') ||
(x >= 'A' && x <= 'Z');
}
@WangZixuan
WangZixuan / Chamfer_Distance_Pytorch.py
Created May 18, 2018 14:08
Use Pytorch to calculate Chamfer distance
import torch
def chamfer_distance_without_batch(p1, p2, debug=False):
'''
Calculate Chamfer Distance between two point sets
:param p1: size[1, N, D]
:param p2: size[1, M, D]
:param debug: whether need to output debug info