Skip to content

Instantly share code, notes, and snippets.

View stuarteberg's full-sized avatar

Stuart Berg stuarteberg

  • Ashburn, Virginia, USA
View GitHub Profile
import openmesh as om
import numpy as np
mesh = om.read_trimesh('earth.obj', vertex_normal=True, vertex_tex_coord=True)
# make mesh handle these attributes
mesh.request_vertex_normals()
mesh.request_vertex_texcoords2D()
# create decimater
@cadrev
cadrev / pandas_shuffle.py
Last active August 22, 2020 08:40
Shuffle the rows of a python pandas dataframe
'''
Title : Pandas Row Shuffler
Author : Felan Carlo Garcia
'''
import numpy as np
import pandas as pd
def shuffler(filename):
df = pd.read_csv(filename, header=0)
# return the pandas dataframe
@willprice
willprice / .travis.yml
Last active June 15, 2024 04:29
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@johanmeiring
johanmeiring / gist:3002458
Created June 27, 2012 08:32
"git lg" alias for pretty git log
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --"