Skip to content

Instantly share code, notes, and snippets.

View zeffii's full-sized avatar

Dealga McArdle zeffii

View GitHub Profile
@beniwohli
beniwohli / greek_alphabet.py
Created January 4, 2011 19:29
A Python dictionary mapping the Unicode codes of the greek alphabet to their names
greek_alphabet = {
u'\u0391': 'Alpha',
u'\u0392': 'Beta',
u'\u0393': 'Gamma',
u'\u0394': 'Delta',
u'\u0395': 'Epsilon',
u'\u0396': 'Zeta',
u'\u0397': 'Eta',
u'\u0398': 'Theta',
u'\u0399': 'Iota',
@enjalot
enjalot / README.md
Last active November 27, 2023 00:28
Bookmarklet
@zeffii
zeffii / vertex_colour_remap.py
Created June 16, 2012 19:12
vertex_colors_bmesh_remapping_to_height
# vertex_color_from_z_height.py
import bpy
import random
from mathutils import Color, Vector
def remap(current, lower_old, upper_old, lower_new, upper_new):
'''
Remaps one range of values to another range of values, types must be float
@dantheman213
dantheman213 / count_lines_of_code_git.sh
Created May 27, 2017 19:06
Count how many lines of code are in git repo
git ls-files | xargs wc -l
@earonesty
earonesty / qjson.h
Last active December 4, 2020 12:32
#ifndef INCLUDED_QJSON_H
#define INCLUDED_QJSON_H
#include <string>
#include <vector>
#include <map>
#include <stdexcept>
#include <memory>
#include <algorithm>
#include <istream>
@nortikin
nortikin / bra
Created September 10, 2020 16:45
Sverchok.0.6.0.0 (2620430) | Blender.2.83.3 | bra | 2020.09.10 | 19:45
{
"export_version": "0.079",
"framed_nodes": {},
"groups": {},
"nodes": {
"A Number": {
"bl_idname": "SvNumberNode",
"height": 100.0,
"hide": false,
"label": "",
@zeffii
zeffii / rd4.py
Last active February 20, 2020 09:52
rd fix for all numpy
"""
in steps s d=1200 n=2
in seed s d=14 n=2
in framenum s d=0 n=2
out verts_out v
"""
def setup():
@zeffii
zeffii / blender_polyline.py
Created August 9, 2011 06:41
adding polyline in blender 2.5
import bpy
from mathutils import Vector
listOfVectors = [((0,0,0,1)),((1,0,0,1)),((2,0,0,1)),((2,3,0,1)),((0,2,0,1))]
# create a spline curve from a number of points
def MakePolyLine(objname, curvename, cList):
curvedata = bpy.data.curves.new(name=curvename, type='CURVE')
curvedata.dimensions = '2D'
{'NurbsPath.055':
[[(0.12160392850637436, 0.05287003517150879, -0.03692507743835449, 1.0),
(0.20541998744010925, 0.13668608665466309, -0.03692507743835449, 1.0),
(0.06398054212331772, 0.10001659393310547, -0.03692507743835449, 1.0)]],
'NurbsPath.054':
[[(0.415458083152771, 0.9291355013847351, -0.03692507743835449, 1.0),
(0.6130191087722778, 0.9274251461029053, -0.03692507743835449, 1.0),
(0.5703786015510559, 0.5558017492294312, -0.03692507743835449, 1.0),
(0.7150659561157227, 0.47425976395606995, -0.03692507743835449, 1.0),
(0.5637456178665161, 0.4129241108894348, -0.03692507743835449, 1.0),
@zeffii
zeffii / stats2.py
Last active December 19, 2015 23:59 — forked from anonymous/stats2.py
reading stats from api.stackexchange uncompressing gzipped response
import time
import json
from urllib.request import urlopen
import gzip
# site stats collector possible add filter &filter=!*LIKa78145bHnc-F
url = "http://api.stackexchange.com/2.1/info?site=blender.stackexchange.com"
b_time = time.time()