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 numpy as np | |
import bpy | |
import math | |
import mathutils | |
base_dir = "/Users/raghavmittal101/Documents/tcs/blenderNerf/" | |
def getDepthMap(filename): | |
z = bpy.data.images['Viewer Node'] | |
w, h = z.size |
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
/* | |
options = { | |
"since" : { | |
"date" : "yyyy-mm-dd", | |
"time" : "hh:mm:ss" | |
}, | |
"until" : { | |
"date" : "yyyy-mm-dd", | |
"time" : "hh:mm:ss" | |
} |
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
function getElementByXpath(src_xpath){ | |
var ele = document.evaluate(src_xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; | |
return ele; | |
} | |
function replaceNode(new_html, src_xpath){ | |
var elem = getElementByXpath(src_xpath); | |
elem.outerHTML = new_html; | |
} |
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
function rel_to_abs(url){ | |
/* Only accept commonly trusted protocols: | |
* Only data-image URLs are accepted, Exotic flavours (escaped slash, | |
* html-entitied characters) are not supported to keep the function fast */ | |
if(/^(https?|file|ftps?|mailto|javascript|data:image\/[^;]{2,9};):/i.test(url)) | |
return url; //Url is already absolute | |
var base_url = location.href.match(/^(.+)\/?(?:#.+)?$/)[0]+"/"; | |
if(url.substring(0,2) == "//") | |
return location.protocol + url; |
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
<!DOCTYPE html> | |
<html> | |
<style> | |
#floater-box, #button-box, #form, #posts{ | |
border: 1px black solid; | |
padding: 10px; | |
width: 100hh; | |
} | |
#button-box > ul { |