Skip to content

Instantly share code, notes, and snippets.

View atvKumar's full-sized avatar

Kumaran atvKumar

View GitHub Profile
@GetUpKidAK
GetUpKidAK / ExportTextures.jsx
Last active February 8, 2022 08:46
Photoshop script to export textures from layered PSD
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Enables exporting of several PBR texture maps from a single PSD with a few clicks:
//
// 1. Select an export folder
// 2. Choose which PSD layer group corresponds to which map (split into separate RGB/Alpha channels)
// 3. Change the file export options (if required)
// 4. Hit export.
//
// Created by Ash Kendall. ash.kendall(at)gmail.com
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@edouardp
edouardp / radiance_writer.py
Created July 11, 2012 10:47
Numpy based writer for Radiance HDR files
# Assumes you have a np.array((height,width,3), dtype=float) as your HDR image
import numpy as np
f = open("xxx.hdr", "wb")
f.write("#?RADIANCE\n# Made with Python & Numpy\nFORMAT=32-bit_rle_rgbe\n\n")
f.write("-Y {0} +X {1}\n".format(image.shape[0], image.shape[1]))
brightest = np.maximum(np.maximum(image[...,0], image[...,1]), image[...,2])
mantissa = np.zeros_like(brightest)
@tomekc
tomekc / ps-export-layers-to-png.jsx
Created June 7, 2012 22:21
Photoshop script that exports to PNG all layers and groups whose names end with ".png".
#target photoshop
// $.level = 2;
/*
* Script by Tomek Cejner (tomek (at) japko dot info)
* based on work of Damien van Holten:
* http://www.damienvanholten.com/blog/export-groups-to-files-photoshop/
*
* My version adds support of nested layer groups,
* and exports single layers in addition to groups.
@jobliz
jobliz / RedisPythonPubSub1.py
Created May 4, 2012 17:58
A short script exploring Redis pubsub functions in Python
import redis
import threading
class Listener(threading.Thread):
def __init__(self, r, channels):
threading.Thread.__init__(self)
self.redis = r
self.pubsub = self.redis.pubsub()
self.pubsub.subscribe(channels)
@danpaluska
danpaluska / uploader2.py
Created March 2, 2010 18:06
youtube uploading python script.
from gdata.youtube import YouTubeVideoEntry
from gdata.youtube.service import YouTubeService
import gdata
from gdata.service import BadAuthentication, CaptchaRequired
from optparse import OptionParser
import sys
import time
import os