Skip to content

Instantly share code, notes, and snippets.

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

Francis Tseng frnsys

🏠
Working from home
View GitHub Profile
@frnsys
frnsys / atlas.py
Last active December 9, 2022 00:32
Blender auto-merging objects and textures
"""
To install additional libraries:
cd /opt/blender/3.2/python/bin
./python3.10 -m ensurepip
./python3.10 -m pip install pillow shapely networkx cairosvg
Python headers are required for compiling nest2d.
Download the source for your blender python version
(e.g. 3.10.8) from <https://www.python.org/downloads/source/>
@frnsys
frnsys / mixamo-to-mpfb2_game_engine.bmap
Created December 2, 2022 17:42
Mixamo to MPFB2 Game Engine remap for Auto-Rig Pro
head%False%ABSOLUTE%0.0,0.0,0.0%0.0,0.0,0.0%1.0%False%False%
mixamorig:Head
False
False
None%False%ABSOLUTE%0.0,0.0,0.0%0.0,0.0,0.0%1.0%False%False%
mixamorig:HeadTop_End
False
False
@frnsys
frnsys / mixamo.json
Created July 25, 2022 20:38
Mixamo rig mapping for BVH retargeter
{
"name" : "Mixamo",
"url" : "",
"bones" : {
"mixamorig:Hips" : "hips",
"mixamorig:Spine" : "spine",
"mixamorig:Spine1" : "spine-1",
"mixamorig:Spine2" : "chest",
"mixamorig:Neck" : "neck",
@frnsys
frnsys / quick_tree.py
Created April 19, 2021 00:16
Quick low-poly tree addon for Blender
import bpy
import bmesh
from random import random, uniform, choice, randrange
from mathutils import Matrix, Vector
from bmesh.types import BMVert, BMFace, BMEdge
from bpy.props import (
IntProperty,
IntVectorProperty,
FloatProperty,
FloatVectorProperty,
@frnsys
frnsys / gltf.js
Created September 16, 2019 17:54
3d objects code
/**
* @author Rich Tibbett / https://github.com/richtr
* @author mrdoob / http://mrdoob.com/
* @author Tony Parisi / http://www.tonyparisi.com/
* @author Takahiro / https://github.com/takahirox
* @author Don McCurdy / https://www.donmccurdy.com
*/
import * as THREE from 'three';
@frnsys
frnsys / index.html
Last active August 22, 2019 02:21
grid system
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>test</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

Installed:

sudo apt install pulseaudio-module-raop paprefs

Ran paprefs and check the option to use AirPlay speakers locally.

Restarted pulseaudio:

@frnsys
frnsys / distributed_estimator.py
Created November 26, 2018 15:47
example of a custom tensorflow estimator with distributed training
"""
Tensorflow estimator API example
References:
- <https://www.tensorflow.org/guide/custom_estimators>
- <https://github.com/tensorflow/models/blob/master/samples/core/get_started/custom_estimator.py>
- <https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/distribute/README.md>
"""
import numpy as np
import tensorflow as tf
// dummy data
let orders = [{
userId: 0
}, {
userId: 1
}, {
userId: 1
}];
let users = [{
@frnsys
frnsys / quadtree.pyx
Created March 24, 2018 21:18
quadtree.pyx
"""
adapted from:
https://github.com/karimbahgat/Pyqtree/blob/master/pyqtree.py
TODO implement remove methods
"""
from libcpp cimport bool
from libcpp.vector cimport vector