Skip to content

Instantly share code, notes, and snippets.

View satishgoda's full-sized avatar

Satish Goda satishgoda

View GitHub Profile
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@satishgoda
satishgoda / numSpacesPerArea.py
Last active May 21, 2023 18:21
The goal of this script is to print the number of Spaces in each area of the current screen in Blender (http://learningblender3dsoftware.blogspot.in)
# http://www.blender.org/documentation/blender_python_api_2_65_3/bpy.types.Area.html
# http://www.blender.org/documentation/blender_python_api_2_65_3/bpy.types.Space.html
import bpy
template_Area = "Area: {0}\n"
template_Space = "\tSpace: {0} {1}\n"
for area in bpy.context.screen.areas:
print(template_Area.format(area.type))
@satishgoda
satishgoda / DownloadMixamoByLouisHong.js
Created May 20, 2023 02:57 — forked from ChairGraveyard/DownloadMixamoByLouisHong.js
Downloads all the free Mixamo Animations
// Anonymous "self-invoking" function
alert("Thank you for using this script created by Louis Hong (/u/loolo78)\n\nThe download will now begin.");
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://code.jquery.com/jquery-latest.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
@satishgoda
satishgoda / BlenderToUsdCurves.py
Created April 3, 2023 19:31 — forked from n-burk/BlenderToUsdCurves.py
Converting blender curve geometry to UsdGeomBasisCurves
#################################################################
# This script works on a single selected hair geometry object
# modify the stagePath before using
#
################################################################
import bpy
from pxr import Usd, UsdGeom, Sdf, Gf
stagePath = r'C:\work\dumpTest.usda'
@satishgoda
satishgoda / git-completion.tcsh
Created January 30, 2013 07:54
Tcsh shell completions for git based on work by David Adler, David Aguilar
# Source this script in tcsh to setup shell completions
# for git. Completions are activated by typing or Control-D
# in the shell after entering a partial command.
#
# Usage:
# source git-completion.tcsh (e.g. in ~/.cshrc)
#
# Supported completions:
import bge
controller = bge.logic.getCurrentController()
sensor = controller.sensors['up_WKEY']
if sensor.getKeyStatus(bge.events.WKEY) == bge.logic.KX_INPUT_JUST_ACTIVATED:
owner = controller.owner
actuator = controller.actuators['upkeycount']
actuator.value = str(owner.get(actuator.propName) + 1)
controller.activate(actuator)
@satishgoda
satishgoda / crontab
Created February 10, 2017 17:21 — forked from mahmoud/crontab
A supervisord + jupyter notebook setup on a remote server, without root access.
# restart supervisor (and the notebook) every minute in case the machine has been restarted
*/1 * * * * /x/home/notebook_training/start_supervisord.sh >> /x/home/notebook_training/nbserver_start_log.txt
# separate user does something like:
# */1 * * * * /x/home/mhashemi/notebook_repo_update.sh >> /x/home/mhashemi/notebook_cron_log.txt 2>&1
@satishgoda
satishgoda / README.md
Last active April 26, 2020 02:30 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.

The upstream script was failing with an error on the path.exists function call. So I forked the script and patched it. I am using node.js v12.16.2

@satishgoda
satishgoda / dyn_return_func.py
Created August 29, 2019 08:03 — forked from r4inm4ker/dyn_return_func.py
dynamic return func
class A(object):
def __init__(self):
self.var1 = None
self.var2 = None
class B(object):
def __init__(self):
self.var3 = None
self.var4 = None
def reMap(value, maxInput, minInput, maxOutput, minOutput):
value = maxInput if value > maxInput else value
value = minInput if value < minInput else value
inputSpan = maxInput - minInput
outputSpan = maxOutput - minOutput
scaledThrust = float(value - minInput) / float(inputSpan)