Skip to content

Instantly share code, notes, and snippets.

Satish Goda satishgoda

Block or report user

Report or block satishgoda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dyn_return_func.py
class A(object):
def __init__(self):
self.var1 = None
self.var2 = None
class B(object):
def __init__(self):
self.var3 = None
self.var4 = None
View gist:1224b699ee0d2868e8214b1b579eac72
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)
@satishgoda
satishgoda / 1.html
Last active Sep 19, 2017
Web Programming
View 1.html
/foo/bar?yeah=loo
你好
View maya-websocket.py
import maya.cmds
import maya.utils
from SimpleWebSocketServer import SimpleWebSocketServer, WebSocket
from threading import Thread
class SimpleEcho(WebSocket):
def handleMessage(self):
# echo message back to client
#self.sendMessage(maya.utils.executeInMainThreadWithResult(self.data))
@satishgoda
satishgoda / painting2sprites.sh
Created Apr 18, 2017 — forked from jessevanherk/painting2sprites.sh
script to convert an ORA file from Krita to PNGs
View painting2sprites.sh
#!/bin/bash
# painting2sprites - A simple script to read an ORA, resize and trim output PNGs.
INPUT_FILE=$1
OUTPUT_DIR=$2
RESIZE_SCALE="25%"
if [ "$2" == "" ]; then
View nodebox1.java
java.lang.NullPointerException
at nodebox.client.NetworkView.paintCurrentConnection(Unknown Source)
at nodebox.client.NetworkView.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(JComponent.java:1045)
at javax.swing.JComponent.paintChildren(JComponent.java:878)
at javax.swing.JComponent.paint(JComponent.java:1054)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5212)
at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:295)
at javax.swing.RepaintManager.paint(RepaintManager.java:1236)
at javax.swing.JComponent._paintImmediately(JComponent.java:5160)
View hello3.6.py
import sys
pyversion = sys.version
pyexecutable = sys.executable
print(f"""You are using \n\tPython {pyversion} \nIt is located at \n\t{pyexecutable}""")
@satishgoda
satishgoda / crontab
Created Feb 10, 2017 — forked from mahmoud/crontab
A supervisord + jupyter notebook setup on a remote server, without root access.
View crontab
# 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
View reactive_data_analysis.py
from rx import Observable, Observer
from collections import defaultdict
users = [
{ "id" : 0, "name" : "Hero" },
{ "id" : 1, "name" : "Dunn" },
{ "id" : 2, "name" : "Sue" },
{ "id" : 3, "name" : "Chi" },
{ "id" : 4, "name" : "Thor" },
{ "id" : 5, "name" : "Clive" },
@satishgoda
satishgoda / outline-mode-folding-python-elisp-shell.el
Created Jan 22, 2017 — forked from alphapapa/outline-mode-folding-python-elisp-shell.el
Emacs: outline-mode folding for Python, elisp, and shell
View outline-mode-folding-python-elisp-shell.el
(defun my/python-mode-outline-hook ()
(setq outline-level 'my/python-outline-level)
(setq outline-regexp
(rx (or
;; Commented outline heading
(group
(* space) ; 0 or more spaces
(one-or-more (syntax comment-start))
(one-or-more space)
You can’t perform that action at this time.