This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/nortikin/sverchok | |
mkdir ~/BioBlender | |
git clone https://github.com/MonZop/BioBlender.git ~/BioBlender | |
ln -s ~/BioBlender ~/.config/blender/%BLENDER_VERSION_NUM%/scripts/addons/BioBlender | |
== or == | |
# in a folder wich contains BioBlender. | |
git clone https://github.com/MonZop/BioBlender.git BioBlender |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from mathutils import Vector | |
listOfVectors = [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))] | |
shapes = [ [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((2,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,2,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((-1,1,0,1))] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from mathutils import Vector | |
listOfVectors = [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))] | |
shapes = [ [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((2,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,2,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((-1,1,0,1))] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from mathutils import Vector | |
listOfVectors = [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))] | |
shapes = [ [((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((2,0,0,1)),((1,1,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,2,0,1)),((0,1,0,1))], | |
[((0,0,0,1)),((1,0,0,1)),((1,1,0,1)),((-1,1,0,1))] | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// super class | |
import java.util.ArrayList; | |
class GraphicsObject { | |
PVector pos; | |
int overthreshold = 2; | |
GraphicsObject(PVector _pos) { | |
pos = _pos; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xml.dom import minidom | |
from urllib.parse import urlencode | |
from urllib.request import urlopen | |
import base64 | |
import os | |
def upload_image(path_to_image): | |
url = 'http://api.imgur.com/2/upload.xml' | |
apikey = '-------- your API key ---------' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to_hash = (pairs) -> | |
hash = {} | |
hash[key] = value for [key, value] in pairs | |
hash | |
# usage: | |
to_hash ([n, n * n] for n in [0..5]) # {0:0, 1:1, 2:4, 3:9, 4:16, 5:25} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.linuxhomenetworking.com/forums/showthread.php/1095-Linux-console-Colors-And-Other-Trick-s | |
def printWarning(input): | |
print("\033[31m%s\033[0m" % input) | |
def funkyprint(input): | |
print("\033[36m%s\033[0m" % input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
from mathutils import Vector | |
# surface_points = bpy.context.object.data.splines[0].points | |
# points = [point.co for point in surface_points] | |
points = [ Vector((-1.5, -1.5, 1.2507835626602173, 1.0)), | |
Vector((-1.5, -0.5, 0.0, 1.0)), | |
Vector((-1.5, 0.5, 0.0, 1.0)), | |
Vector((-1.5, 1.5, 0.0, 1.0)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# meta_troll.py | |
# This is me messing around with Python type constructors just for fun. | |
# Try and see what happens if you uncomment the __metaclass__ line in Foo. | |
class TrollType(type): | |
def __new__(meta, classname, bases, clssDict): | |
class MyTroll(object): | |
def say_stuff(self): | |
print("you mad bro?") | |
return MyTroll |
OlderNewer