Skip to content

Instantly share code, notes, and snippets.

View micahscopes's full-sized avatar
🐢

Micah micahscopes

🐢
View GitHub Profile
@micahscopes
micahscopes / batch_import_obj.py
Last active April 14, 2022 11:33
Batch import a folder of Wavefront OBJ files to Blender. It used to be that you could do this with the built-in OBJ import/export script, but I've been getting an error with that. Here's a workaround.
import os
import bpy
path_to_dir = "/directory/full/of/obj/files/"
files_in_dir = os.listdir(path_to_dir)
for file_in_dir in files_in_dir:
bpy.ops.import_scene.obj(filepath=path_to_dir+file_in_dir)
@micahscopes
micahscopes / failure.cpp
Created August 3, 2012 12:24
Sd2Card.init() is successful vs. not successful
//SD Card Library
#include <stdlib.h>
#include <stdint.h>
#include <SdFat.h>
#include <algorithm>
uint16 bufferA[40];
uint16 bufferB[40];
uint16 * incomingBuffer = bufferA;
uint16 * outgoingBuffer = bufferB;
import bge
cont = bge.logic.getCurrentController()
VertexShader = """
uniform float leftIsoclinic[ 4 ];
uniform float rightIsoclinic[ 4 ];
uniform float radius;
uniform float offset[ 3 ];
varying vec3 vNormal;
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<meta http-equiv="Content-type" content=
"text/html; charset=us-ascii">
<title>Graph from a matrix</title>
<script type="text/javascript" src=
@micahscopes
micahscopes / index.html
Created June 5, 2012 07:51 — forked from mbostock/.block
Graph from a matrix.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<meta http-equiv="Content-type" content=
"text/html; charset=us-ascii">
<title>Graph from a matrix</title>
<script type="text/javascript" src=