Skip to content

Instantly share code, notes, and snippets.

View xiangzhi's full-sized avatar

Zhi xiangzhi

  • Georgia Institute of Technology
  • Atlanta, GA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am xiangzhi on github.
  • I am zhi (https://keybase.io/zhi) on keybase.
  • I have a public key whose fingerprint is 7105 8AAB 2996 5020 6FEF 80D0 5205 8E14 9D67 D782

To claim this, I am signing this object:

@xiangzhi
xiangzhi / gist:481a2f47e116cbd3990e5507422b6f32
Created May 6, 2017 02:57
code to parse fitbit exercise data from website
from dateutil import parser
import csv
csvfile = open('data.csv','wb')
writer = csv.writer(csvfile, delimiter=',')
with open('base.data') as f:
for line in f:
splited_line = line.split('\t')
@xiangzhi
xiangzhi / kinematics.py
Created June 20, 2019 06:03
RobotKinematicExamples
import numpy as np
from math_op import *
def generate_transformation_from_xi(xi, theta):
"""
Given a \\xi, generate the corresponding transformation according
to exponential coordinates
"""
rot = rotation_matrix_from_axis_angle(xi[3:], theta)
trans = (np.eye(3) - rot).dot(np.cross(xi[3:], xi[0:3])) + xi[3:] * xi[3:].T * xi[0:3] * theta
@xiangzhi
xiangzhi / AMT203.py
Created December 17, 2019 23:03
Python Interface for CUI AMT203 Encoder connected by the USB Cable
#!/usr/bin/python3
"""
Released under MIT License
Copyright (c) 2019 CMU-TBD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal