This file contains 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
#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# convert_print.py | |
# Aptana Ruble Commands | |
# | |
# Created by André Berg on 28.05.2013. | |
# Copyright 2013 Berg Media. All rights reserved. | |
# | |
# Used from a Python.ruble command in Eclipse |
This file contains 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
# -*- coding: utf-8 -*- | |
# | |
# == Aptana Ruble Commands | |
# Convert Between Python 2 and Py3k Print Statements | |
# | |
# Created by André Berg on 2013-05-23. | |
# Copyright 2013 Berg Media. All rights reserved. | |
# | |
# Used from a Python.ruble command in Eclipse | |
# Aptana Studio 3: |
This file contains 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
/** | |
* Guild Wars 2 Spidy Functions | |
* | |
* for use in Google Docs spreadsheets | |
* via the Script Editor. | |
* | |
* After an idea and first concept of | |
* Valaadus.5012 on Northern Shiverpeaks | |
* | |
* Additional functions by Cauldron.1653 |
This file contains 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
class MinMax(object): | |
""" | |
Calculate various area metrics from a list of points, | |
such as min, max, midpoint, radius and size. | |
""" | |
def __init__(self): | |
super(MinMax, self).__init__() | |
FLOATMIN = sys.float_info[3]-1000 # workaround for underflow error | |
FLOATMAX = sys.float_info[0] | |
self.min = c4d.Vector(FLOATMAX, FLOATMAX, FLOATMAX) |
This file contains 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
class Plane(object): | |
"""Represents a plane defined by position and normal vector""" | |
def __init__(self, pos, n): | |
super(Plane, self).__init__() | |
self.pos = pos | |
self.n = n.GetNormalized() | |
if DEBUG: print "self.pos = %r, self.n = %r" % (pos, n) | |
def setN(self, newn): | |
self.n = newn.GetNormalized() |
This file contains 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
class Helpers(object): | |
"""Contains various helper methods.""" | |
def __init__(self, arg): | |
super(Helpers, self).__init__() | |
@staticmethod | |
def readConfig(filepath=None): | |
""" | |
Read settings from a configuration file. |
This file contains 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
def SetGlobalAxisRotation(obj, rot, depth=0): | |
""" | |
Set the global rotation of the object axis (i.e. keeping points in place). | |
obj object | |
rot vector | |
""" | |
# unfortunately tail recursion and depth guard | |
# seem needed because of the MatrixToHPB(HPBToMatrix(Rad(angle)) | |
# roundtrip round-off error, so we need to improve |
This file contains 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
''' | |
${module} -- ${shortdesc} | |
${module} is a ${description} | |
It defines ${classes_and_methods} | |
@author: ${user_name} |
This file contains 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
#!/usr/local/bin/python2.7 | |
# encoding: utf-8 | |
''' | |
${module} -- ${shortdesc} | |
${module} is a ${description} | |
It defines ${classes_and_methods} | |
@author: ${user_name} |
This file contains 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
/* | |
* Create a file TestDependent.java with the contents in this file and substitute the | |
* values as needed... | |
*/ | |
package org.python.pydev.core; | |
public class TestDependent { | |
//NOTE: this should be gotten from some variable to point to the python lib (less system dependence, but still, some). | |