code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
from App.Proxys import * data = SimBiController( name = 'Walking', controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), ControlParams( joint = 'pelvis_torso', kp = 200.0, kd = 30.0, tauMax = 10000.0, scale = ( 1...
[ [ 1, 0, 0.0048, 0.0048, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5072, 0.9904, 0, 0.66, 1, 929, 3, 3, 0, 0, 597, 10, 53 ] ]
[ "from App.Proxys import *", "data = SimBiController( \n\n name = 'Walking',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ),\n ControlParams( joint = 'pelvis_torso', kp = 200.0, kd = 30.0, tauMax = 10000.0, scal...
''' Created on 2009-09-09 @author: beaudoin ''' from App.Proxys import * data = SimBiController( name = 'Running', startingState = 0, controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), Contr...
[ [ 8, 0, 0.014, 0.0233, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0326, 0.0047, 0, 0.66, 0.5, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5209, 0.9628, 0, 0.66, ...
[ "'''\nCreated on 2009-09-09\n\n@author: beaudoin\n'''", "from App.Proxys import *", "data = SimBiController( \n\n name = 'Running',\n\n startingState = 0,\n \n controlParamsList = [ \n ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) )," ]
from App.Proxys import * data = SimBiController( name = 'Running', controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, scale = (...
[ [ 1, 0, 0.0048, 0.0048, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5072, 0.9903, 0, 0.66, 1, 929, 3, 3, 0, 0, 597, 10, 57 ] ]
[ "from App.Proxys import *", "data = SimBiController( \n\n name = 'Running',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ),\n ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, sc...
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 300.0, kd = 100.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0, ...
[ [ 1, 0, 0.0035, 0.0035, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5053, 0.9929, 0, 0.66, 1, 929, 3, 3, 0, 0, 511, 10, 63 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 300.0, kd = 100.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0...
''' Created on 2009-09-09 @author: beaudoin ''' from App.Proxys import * data = SimBiController( name = 'Walking', startingState = 0, controlParamsList = [ ControlParams( joint = 'root', kp = 3000, kd = 300, tauMax = 10000, scale = ( 1, 0.2, 1 ) ), ControlParams( join...
[ [ 8, 0, 0.0149, 0.0249, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0348, 0.005, 0, 0.66, 0.5, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5224, 0.9602, 0, 0.66, ...
[ "'''\nCreated on 2009-09-09\n\n@author: beaudoin\n'''", "from App.Proxys import *", "data = SimBiController( \n\n name = 'Walking',\n\n startingState = 0,\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 3000, kd = 300, tauMax = 10000, scale = ( 1, 0.2, 1 ) )," ]
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = WalkController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 500.0, kd = 50.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0, 1....
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5053, 0.9929, 0, 0.66, 1, 929, 3, 3, 0, 0, 293, 10, 63 ] ]
[ "from App.Proxys import *", "data = WalkController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 500.0, kd = 50.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, ...
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0037, 0.0037, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5055, 0.9927, 0, 0.66, 1, 929, 3, 3, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0037, 0.0037, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5055, 0.9927, 0, 0.66, 1, 929, 3, 3, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5053, 0.9929, 0, 0.66, 1, 929, 3, 3, 0, 0, 511, 10, 63 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0036, 0.0036, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5054, 0.9928, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0035, 0.0035, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5052, 0.9931, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0032, 0.0032, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5049, 0.9935, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0035, 0.0035, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5052, 0.993, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
from App.Proxys import * data = IKVMCController( name = '', controlParamsList = [ ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ), ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1.0, 1.0,...
[ [ 1, 0, 0.0029, 0.0029, 0, 0.66, 0, 536, 0, 1, 0, 0, 536, 0, 0 ], [ 14, 0, 0.5044, 0.9942, 0, 0.66, 1, 929, 3, 6, 0, 0, 511, 10, 61 ] ]
[ "from App.Proxys import *", "data = IKVMCController( \n\n name = '',\n\n controlParamsList = [ \n ControlParams( joint = 'root', kp = 1000.0, kd = 200.0, tauMax = 200.0, scale = ( 1.0, 1.0, 1.0 ) ),\n ControlParams( joint = 'pelvis_lowerback', kp = 75.0, kd = 17.0, tauMax = 100.0, scale = ( 1....
''' Created on 2009-08-28 @author: beaudoin ''' from os import path meshDir = path.join( path.dirname(__file__), "Meshes" ) blue = ( 0.5, 0.6, 0.8, 1 ) green = ( 0.5, 0.8, 0.6, 1 ) red = ( 0.892, 0.716, 0.602, 1 ) gray = ( 0.5, 0.5, 0.5, 1 ) from App.Proxys import * data = Character( ...
[ [ 8, 0, 0.0093, 0.0155, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0217, 0.0031, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.028, 0.0031, 0, 0.66,...
[ "'''\nCreated on 2009-08-28\n\n@author: beaudoin\n'''", "from os import path", "meshDir = path.join( path.dirname(__file__), \"Meshes\" )", "blue = ( 0.5, 0.6, 0.8, 1 )", "green = ( 0.5, 0.8, 0.6, 1 )", "red = ( 0.892, 0.716, 0.602, 1 )", "gray = ( 0.5, 0.5, 0.5, 1 )", "from App.Proxys import *", ...
''' Created on 2009-08-28 @author: beaudoin ''' import PyUtils import Core, wx File = "Jumping" #File = "Running" #File = "SideRunning" #File = "JumpWalk" #File = "Walking" #File = "Turning" #PyUtils.load( "RigidBodies.FlatGround" ) PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( ...
[ [ 8, 0, 0.1304, 0.2174, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3043, 0.0435, 0, 0.66, 0.1111, 806, 0, 1, 0, 0, 806, 0, 0 ], [ 1, 0, 0.3478, 0.0435, 0, 0.66...
[ "'''\nCreated on 2009-08-28\n\n@author: beaudoin\n'''", "import PyUtils", "import Core, wx", "File = \"Jumping\"", "PyUtils.load( \"RigidBodies.FiniteFlatGround\" )", "PyUtils.loadMany( \"RigidBodies.DodgeBall\", 5 )", "character = PyUtils.load( \"Characters.Bip\" )", "character.loadReducedStateFromFi...
''' Created on 2009-11-26 @author: beaudoin ''' import PyUtils import Core, wx import Controllers PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( "RigidBodies.DodgeBall", 5 ) character = PyUtils.load( "Characters.BipV3" ) character.computeMass(); controller = Controllers.DanceControl...
[ [ 8, 0, 0.0968, 0.1613, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2258, 0.0323, 0, 0.66, 0.0625, 806, 0, 1, 0, 0, 806, 0, 0 ], [ 1, 0, 0.2581, 0.0323, 0, 0.66...
[ "'''\nCreated on 2009-11-26\n\n@author: beaudoin\n'''", "import PyUtils", "import Core, wx", "import Controllers", "PyUtils.load( \"RigidBodies.FiniteFlatGround\" )", "PyUtils.loadMany( \"RigidBodies.DodgeBall\", 5 )", "character = PyUtils.load( \"Characters.BipV3\" )", "character.computeMass();", "...
''' Created on 2009-08-28 @author: beaudoin This file is just a proxy to indicate which one is the desire framework for typical applications ''' import BipFramework
[ [ 8, 0, 0.4444, 0.7778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 1, 0.1111, 0, 0.66, 1, 569, 0, 1, 0, 0, 569, 0, 0 ] ]
[ "'''\nCreated on 2009-08-28\n\n@author: beaudoin\n\nThis file is just a proxy to indicate which one is the desire framework for typical applications\n'''", "import BipFramework" ]
''' Created on 2009-11-23 @author: beaudoin ''' import PyUtils PyUtils.load( "RigidBodies.FiniteFlatGround" )
[ [ 8, 0, 0.3333, 0.5556, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7778, 0.1111, 0, 0.66, 0.5, 806, 0, 1, 0, 0, 806, 0, 0 ], [ 8, 0, 1, 0.1111, 0, 0.66, 1,...
[ "'''\nCreated on 2009-11-23\n\n@author: beaudoin\n'''", "import PyUtils", "PyUtils.load( \"RigidBodies.FiniteFlatGround\" )" ]
''' Created on 2009-11-26 @author: beaudoin ''' import PyUtils import Core, wx import Controllers PyUtils.load( "RigidBodies.FiniteFlatGround" ) PyUtils.loadMany( "RigidBodies.DodgeBall", 5 ) character = PyUtils.load( "Characters.BipV3" ) character.loadReducedStateFromFile( "Data/Characters/BipV3/Contro...
[ [ 8, 0, 0.1111, 0.1852, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2593, 0.037, 0, 0.66, 0.0588, 806, 0, 1, 0, 0, 806, 0, 0 ], [ 1, 0, 0.2963, 0.037, 0, 0.66, ...
[ "'''\nCreated on 2009-11-26\n\n@author: beaudoin\n'''", "import PyUtils", "import Core, wx", "import Controllers", "PyUtils.load( \"RigidBodies.FiniteFlatGround\" )", "PyUtils.loadMany( \"RigidBodies.DodgeBall\", 5 )", "character = PyUtils.load( \"Characters.BipV3\" )", "character.loadReducedStateFrom...
from App.UtilFuncs import fancify print fancify( """Character( root = ArticulatedRigidBody( name = "pelvis", meshes = [ (path.join(meshDir, "pelvis_2_b.obj"), colourDark), (path.join(meshDir, "pelvis_2_s.obj"), colourLight) ], mass = 12...
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 725, 0, 1, 0, 0, 725, 0, 0 ] ]
[ "from App.UtilFuncs import fancify" ]
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
[ [ 1, 0, 0.0588, 0.0118, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0706, 0.0118, 0, 0.66, 0.125, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0824, 0.0118, 0, 0...
[ "import logging", "import shutil", "import sys", "import urlparse", "import SimpleHTTPServer", "import BaseHTTPServer", "class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',...
#!/usr/bin/python import datetime import sys import textwrap import common from xml.dom import pulldom PARSER = """\ /** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare.parsers; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareError; import com.joel...
[ [ 1, 0, 0.0201, 0.0067, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0268, 0.0067, 0, 0.66, 0.0769, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0336, 0.0067, 0, ...
[ "import datetime", "import sys", "import textwrap", "import common", "from xml.dom import pulldom", "PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;", "BOOLEAN_STANZA = \"\"\"\\\n } else i...
#!/usr/bin/python """ Pull a oAuth protected page from foursquare. Expects ~/.oget to contain (one on each line): CONSUMER_KEY CONSUMER_KEY_SECRET USERNAME PASSWORD Don't forget to chmod 600 the file! """ import httplib import os import re import sys import urllib import urllib2 import urlparse import user from xml....
[ [ 8, 0, 0.0631, 0.0991, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1261, 0.009, 0, 0.66, 0.05, 2, 0, 1, 0, 0, 2, 0, 0 ], [ 1, 0, 0.1351, 0.009, 0, 0.66, 0....
[ "\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD", "import httplib", "import os", "import re", "import sys", "import urllib", "import urllib2", "import urlparse", "import user", "from xml....
#!/usr/bin/python import os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/usr/bin/python import logging from xml.dom import minidom from xml.dom import pulldom BOOLEAN = "boolean" STRING = "String" GROUP = "Group" # Interfaces that all FoursquareTypes implement. DEFAULT_INTERFACES = ['FoursquareType'] # Interfaces that specific FoursqureTypes implement. INTERFACES = { } DEFAULT_CLA...
[ [ 1, 0, 0.0263, 0.0088, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0439, 0.0088, 0, 0.66, 0.0833, 290, 0, 1, 0, 0, 290, 0, 0 ], [ 1, 0, 0.0526, 0.0088, 0, ...
[ "import logging", "from xml.dom import minidom", "from xml.dom import pulldom", "BOOLEAN = \"boolean\"", "STRING = \"String\"", "GROUP = \"Group\"", "DEFAULT_INTERFACES = ['FoursquareType']", "INTERFACES = {\n}", "DEFAULT_CLASS_IMPORTS = [\n]", "CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP...
#!/usr/bin/env python import time t = time.time() u = time.gmtime(t) s = time.strftime('%a, %e %b %Y %T GMT', u) print 'Content-Type: text/javascript' print 'Cache-Control: no-cache' print 'Date: ' + s print 'Expires: ' + s print '' print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 14, 0, 0.2727, 0.0909, 0, 0.66, 0.1111, 15, 3, 0, 0, 0, 654, 10, 1 ], [ 14, 0, 0.3636, 0.0909, 0, ...
[ "import time", "t = time.time()", "u = time.gmtime(t)", "s = time.strftime('%a, %e %b %Y %T GMT', u)", "print('Content-Type: text/javascript')", "print('Cache-Control: no-cache')", "print('Date: ' + s)", "print('Expires: ' + s)", "print('')", "print('var timeskew = new Date().getTime() - ' + str(t...
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2647, 0.1176, 0, 0....
[ "import math", "import sys", "def skipdist(idx):\n return idx%int(TOTALPADS/REALPADS)", " return idx%int(TOTALPADS/REALPADS)", "def centerdistance(idx):\n local = idx % PADS_PER_SIDE\n return abs(local - PADS_PER_SIDE/2)", " local = idx % PADS_PER_SIDE", " return abs(local - PADS_PER_S...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
[ [ 6, 0, 0.7, 0.4, 0, 0.66, 0, 826, 3, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.8, 0.2, 1, 0.32, 0, 535, 3, 1, 0, 0, 0, 0, 1 ] ]
[ "for i in range(32):\n print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))", " print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))" ]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2647, 0.1176, 0, 0....
[ "import math", "import sys", "def skipdist(idx):\n return idx%int(TOTALPADS/REALPADS)", " return idx%int(TOTALPADS/REALPADS)", "def centerdistance(idx):\n local = idx % PADS_PER_SIDE\n return abs(local - PADS_PER_SIDE/2)", " local = idx % PADS_PER_SIDE", " return abs(local - PADS_PER_S...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
[ [ 6, 0, 0.7, 0.4, 0, 0.66, 0, 826, 3, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.8, 0.2, 1, 0.67, 0, 535, 3, 1, 0, 0, 0, 0, 1 ] ]
[ "for i in range(32):\n print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))", " print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))" ]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2647, 0.1176, 0, 0....
[ "import math", "import sys", "def skipdist(idx):\n return idx%int(TOTALPADS/REALPADS)", " return idx%int(TOTALPADS/REALPADS)", "def centerdistance(idx):\n local = idx % PADS_PER_SIDE\n return abs(local - PADS_PER_SIDE/2)", " local = idx % PADS_PER_SIDE", " return abs(local - PADS_PER_S...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
[ [ 6, 0, 0.7, 0.4, 0, 0.66, 0, 826, 3, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.8, 0.2, 1, 0.37, 0, 535, 3, 1, 0, 0, 0, 0, 1 ] ]
[ "for i in range(32):\n print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))", " print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))" ]
#!/usr/bin/env python import math import sys try: verilogfilename = sys.argv[1] verilog = open(verilogfilename,'r') PADS_PER_SIDE=int(sys.argv[2]) except: print >> sys.stderr, "USAGE: %s mapped/design.v pads_per_side"%sys.argv[0] sys.exit(2) TOTALPADS=4*PADS_PER_SIDE # Gather up all the pads to ...
[ [ 1, 0, 0.0588, 0.0588, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 1, 0, 0.1176, 0.0588, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2647, 0.1176, 0, 0....
[ "import math", "import sys", "def skipdist(idx):\n return idx%int(TOTALPADS/REALPADS)", " return idx%int(TOTALPADS/REALPADS)", "def centerdistance(idx):\n local = idx % PADS_PER_SIDE\n return abs(local - PADS_PER_SIDE/2)", " local = idx % PADS_PER_SIDE", " return abs(local - PADS_PER_S...
#!/usr/bin/env python for i in range(32): print "PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );"%(i+3,i,i,i)
[ [ 6, 0, 0.7, 0.4, 0, 0.66, 0, 826, 3, 0, 0, 0, 0, 0, 2 ], [ 8, 1, 0.8, 0.2, 1, 0.23, 0, 535, 3, 1, 0, 0, 0, 0, 1 ] ]
[ "for i in range(32):\n print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))", " print(\"PADINOUT U%d ( .DO(nBUSOUT[%d]), .DI(nBUSOUT[%d]), .OEN(OE), .YPAD(BUSOUT[%d]) );\"%(i+3,i,i,i))" ]
import pbkdf2 def hx(s): return s.encode('hex').upper() vectors=pbkdf2.PBKDF2_tests for i in range(len(vectors)): args, res = vectors[i] print print '******************************************************************' print 'UNIT %d'%i wu = list(pbkdf2.workunits(*args)) if len(wu) != 1: ...
[ [ 1, 0, 0.0175, 0.0175, 0, 0.66, 0, 872, 0, 1, 0, 0, 872, 0, 0 ], [ 2, 0, 0.0614, 0.0351, 0, 0.66, 0.3333, 724, 0, 1, 1, 0, 0, 0, 2 ], [ 13, 1, 0.0702, 0.0175, 1, 0...
[ "import pbkdf2", "def hx(s):\n return s.encode('hex').upper()", " return s.encode('hex').upper()", "vectors=pbkdf2.PBKDF2_tests", "for i in range(len(vectors)):\n args, res = vectors[i]\n\n print('UNIT %d'%i)\n wu = list(pbkdf2.workunits(*args))\n if len(wu) != 1:\n print('Skipping ...
# Generate a couple of 672-bit test vectors to feed through the HashBlock from hashlib import sha1 import random random.seed(12345) datalen_bits=672 datalen=datalen_bits/8 def mkhdata(): return ''.join([chr(random.randint(0,255)) for x in range(datalen)]) def hx(s): return s.encode('hex') def cenc(s): ...
[ [ 1, 0, 0.075, 0.025, 0, 0.66, 0, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.1, 0.025, 0, 0.66, 0.1, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 8, 0, 0.15, 0.025, 0, 0.66, 0....
[ "from hashlib import sha1", "import random", "random.seed(12345)", "datalen_bits=672", "datalen=datalen_bits/8", "def mkhdata():\n return ''.join([chr(random.randint(0,255)) for x in range(datalen)])", " return ''.join([chr(random.randint(0,255)) for x in range(datalen)])", "def hx(s):\n retu...
''' Created on 21-03-2011 @author: maciek ''' def formatString(format, **kwargs): ''' ''' if not format: return '' for arg in kwargs.keys(): format = format.replace("{" + arg + "}", "##" + arg + "##") format = format.replace ("{", "{{") format = format.replace("}", "}}") for...
[ [ 8, 0, 0.1304, 0.2174, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.6739, 0.6957, 0, 0.66, 1, 798, 0, 2, 1, 0, 0, 0, 9 ], [ 8, 1, 0.413, 0.087, 1, 0.11, 0, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "def formatString(format, **kwargs):\n '''\n '''\n if not format: return ''\n \n for arg in kwargs.keys():\n format = format.replace(\"{\" + arg + \"}\", \"##\" + arg + \"##\")\n format = format.replace (\"{\", \"{{\")", " '''\n ...
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
[ [ 8, 0, 0.0341, 0.0568, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0682, 0.0114, 0, 0.66, 0.0303, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.0795, 0.0114, 0, 0.66...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from IndexGenerator import IndexGenerator", "from optparse import OptionParser", "import os", "import tempfile", "import shutil", "import logging", "logging.basicConfig(level = logging.DEBUG)", "parser = OptionParser()", "parser.add_option('-n...
''' Created on 21-03-2011 @author: maciek ''' from formater import formatString import os class IndexGenerator(object): ''' Generates Index.html for iOS app OTA distribution ''' basePath = os.path.dirname(__file__) templateFile = os.path.join(basePath,"templates/index.tmpl") releaseUrls = "" ...
[ [ 8, 0, 0.0526, 0.0877, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1053, 0.0175, 0, 0.66, 0.3333, 11, 0, 1, 0, 0, 11, 0, 0 ], [ 1, 0, 0.1228, 0.0175, 0, 0.66, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from formater import formatString", "import os", "class IndexGenerator(object):\n '''\n Generates Index.html for iOS app OTA distribution\n '''\n basePath = os.path.dirname(__file__)\n templateFile = os.path.join(basePath,\"templates/index....
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.0' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 1.0 ''' try: import json except ImportError: import simplejson as json import time import hmac import uuid import base64 import urllib impo...
[ [ 14, 0, 0.0113, 0.0028, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0142, 0.0028, 0, 0.66, 0.0303, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 8, 0, 0.0227, 0.0085, 0, 0....
[ "__version__ = '1.0'", "__author__ = 'Liao Xuefeng (askxuefeng@gmail.com)'", "'''\nPython client SDK for sina weibo API using OAuth 1.0\n'''", "try:\n import json\nexcept ImportError:\n import simplejson as json", " import json", " import simplejson as json", "import time", "import hmac", ...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.04' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 2. ''' try: import json except ImportError: import simplejson as json import time import urllib import urllib2 import logging def _obj_ho...
[ [ 14, 0, 0.0201, 0.005, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0251, 0.005, 0, 0.66, 0.0435, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 8, 0, 0.0402, 0.0151, 0, 0.66...
[ "__version__ = '1.04'", "__author__ = 'Liao Xuefeng (askxuefeng@gmail.com)'", "'''\nPython client SDK for sina weibo API using OAuth 2.\n'''", "try:\n import json\nexcept ImportError:\n import simplejson as json", " import json", " import simplejson as json", "import time", "import urllib"...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.04' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 2. ''' try: import json except ImportError: import simplejson as json import time import urllib import urllib2 import logging def _obj_ho...
[ [ 14, 0, 0.0201, 0.005, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0251, 0.005, 0, 0.66, 0.0435, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 8, 0, 0.0402, 0.0151, 0, 0.66...
[ "__version__ = '1.04'", "__author__ = 'Liao Xuefeng (askxuefeng@gmail.com)'", "'''\nPython client SDK for sina weibo API using OAuth 2.\n'''", "try:\n import json\nexcept ImportError:\n import simplejson as json", " import json", " import simplejson as json", "import time", "import urllib"...
#!/usr/bin/env python # -*- coding: utf-8 -*- APP_KEY = 'hidden' APP_SECRET = 'hidden'
[ [ 14, 0, 0.8, 0.2, 0, 0.66, 0, 912, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 1, 0.2, 0, 0.66, 1, 675, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "APP_KEY = 'hidden'", "APP_SECRET = 'hidden'" ]
# mako/pygen.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for generating and formatting literal Python code.""" import re, string from StringIO ...
[ [ 8, 0, 0.0246, 0.0035, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0316, 0.0035, 0, 0.66, 0.2, 540, 0, 2, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0351, 0.0035, 0, 0.66, ...
[ "\"\"\"utilities for generating and formatting literal Python code.\"\"\"", "import re, string", "from StringIO import StringIO", "from mako import exceptions", "class PythonPrinter(object):\n def __init__(self, stream):\n # indentation counter\n self.indent = 0\n \n # a stack storin...
# mako/lookup.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import os, stat, posixpath, re from mako import exceptions, util from mako.template import Template...
[ [ 1, 0, 0.0211, 0.003, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0242, 0.003, 0, 0.66, 0.2, 682, 0, 2, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0272, 0.003, 0, 0.66, ...
[ "import os, stat, posixpath, re", "from mako import exceptions, util", "from mako.template import Template", "try:\n import threading\nexcept:\n import dummy_threading as threading", " import threading", " import dummy_threading as threading", "class TemplateCollection(object):\n \"\"\"Re...
# mako/parsetree.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines the parse tree components for Mako templates.""" from mako import exceptions, ast, u...
[ [ 8, 0, 0.0124, 0.0018, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0159, 0.0018, 0, 0.66, 0.05, 682, 0, 4, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0177, 0.0018, 0, 0.66, ...
[ "\"\"\"defines the parse tree components for Mako templates.\"\"\"", "from mako import exceptions, ast, util, filters", "import re", "class Node(object):\n \"\"\"base class for a Node in the parse tree.\"\"\"\n def __init__(self, source, lineno, pos, filename):\n self.source = source\n sel...
# ext/autohandler.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """adds autohandler functionality to Mako templates. requires that the TemplateLookup class is...
[ [ 8, 0, 0.2538, 0.3077, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4308, 0.0154, 0, 0.66, 0.3333, 204, 0, 3, 0, 0, 204, 0, 0 ], [ 2, 0, 0.6615, 0.4154, 0, 0.66...
[ "\"\"\"adds autohandler functionality to Mako templates.\n\nrequires that the TemplateLookup class is used with templates.\n\nusage:\n\n<%!\n from mako.ext.autohandler import autohandler", "import posixpath, os, re", "def autohandler(template, context, name='autohandler'):\n lookup = context.lookup\n _...
# ext/preprocessors.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """preprocessing functions, used with the 'preprocessor' argument on Template, TemplateLooku...
[ [ 8, 0, 0.375, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.05, 0, 0.66, 0.5, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 2, 0, 0.775, 0.4, 0, 0.66, 1, 722...
[ "\"\"\"preprocessing functions, used with the 'preprocessor' \nargument on Template, TemplateLookup\"\"\"", "import re", "def convert_comments(text):\n \"\"\"preprocess old style comments.\n \n example:\n \n from mako.ext.preprocessors import convert_comments\n t = Template(..., preprocessor=preproc...
# ext/babelplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """gettext message extraction via Babel: http://babel.edgewall.org/""" from StringIO import Str...
[ [ 8, 0, 0.053, 0.0076, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0606, 0.0076, 0, 0.66, 0.1667, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0758, 0.0076, 0, 0.66,...
[ "\"\"\"gettext message extraction via Babel: http://babel.edgewall.org/\"\"\"", "from StringIO import StringIO", "from babel.messages.extract import extract_python", "from mako import lexer, parsetree", "def extract(fileobj, keywords, comment_tags, options):\n \"\"\"Extract messages from Mako templates.\...
# ext/pygmentplugin.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re try: set except NameError: from sets import Set as set from pygments.lexer...
[ [ 1, 0, 0.0654, 0.0093, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 7, 0, 0.0888, 0.0374, 0, 0.66, 0.0909, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 8, 1, 0.0841, 0.0093, 1, 0.41...
[ "import re", "try:\n set\nexcept NameError:\n from sets import Set as set", " set", " from sets import Set as set", "from pygments.lexers.web import \\\n HtmlLexer, XmlLexer, JavascriptLexer, CssLexer", "from pygments.lexers.agile import PythonLexer", "from pygments.lexer import Lexer, D...
# ext/turbogears.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, inspect from mako.lookup import TemplateLookup from mako.template import Template cl...
[ [ 1, 0, 0.125, 0.0179, 0, 0.66, 0, 540, 0, 2, 0, 0, 540, 0, 0 ], [ 1, 0, 0.1429, 0.0179, 0, 0.66, 0.3333, 258, 0, 1, 0, 0, 258, 0, 0 ], [ 1, 0, 0.1607, 0.0179, 0, 0...
[ "import re, inspect", "from mako.lookup import TemplateLookup", "from mako.template import Template", "class TGPlugin(object):\n \"\"\"TurboGears compatible Template Plugin.\"\"\"\n\n def __init__(self, extra_vars_func=None, options=None, extension='mak'):\n self.extra_vars_func = extra_vars_func...
# mako/codegen.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides functionality for rendering a parsetree constructing into module source code.""" impo...
[ [ 8, 0, 0.0067, 0.001, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0086, 0.001, 0, 0.66, 0.1111, 654, 0, 1, 0, 0, 654, 0, 0 ], [ 1, 0, 0.0095, 0.001, 0, 0.66, ...
[ "\"\"\"provides functionality for rendering a parsetree constructing into module source code.\"\"\"", "import time", "import re", "from mako.pygen import PythonPrinter", "from mako import util, ast, parsetree, filters, exceptions", "MAGIC_NUMBER = 6", "def compile(node, \n uri, \n ...
# mako/ast.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from A...
[ [ 8, 0, 0.0524, 0.014, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0699, 0.007, 0, 0.66, 0.1429, 682, 0, 3, 0, 0, 682, 0, 0 ], [ 1, 0, 0.0769, 0.007, 0, 0.66, ...
[ "\"\"\"utilities for analyzing expressions and blocks of Python \ncode, as well as generating Python from AST nodes\"\"\"", "from mako import exceptions, pyparser, util", "import re", "class PythonCode(object):\n \"\"\"represents information about a string containing Python code\"\"\"\n def __init__(sel...
# mako/exceptions.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """exception classes""" import traceback, sys, re from mako import util class MakoException(E...
[ [ 8, 0, 0.0228, 0.0033, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0293, 0.0033, 0, 0.66, 0.0769, 423, 0, 3, 0, 0, 423, 0, 0 ], [ 1, 0, 0.0326, 0.0033, 0, 0.66...
[ "\"\"\"exception classes\"\"\"", "import traceback, sys, re", "from mako import util", "class MakoException(Exception):\n pass", "class RuntimeException(MakoException):\n pass", "def _format_filepos(lineno, pos, filename):\n if filename is None:\n return \" at line: %d char: %d\" % (lineno...
# mako/__init__.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php __version__ = '0.5.0'
[ [ 14, 0, 0.8889, 0.1111, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = '0.5.0'" ]
# mako/template.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Template class, a facade for parsing, generating and executing template strings, ...
[ [ 8, 0, 0.0138, 0.0037, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0185, 0.0018, 0, 0.66, 0.0909, 824, 0, 1, 0, 0, 824, 0, 0 ], [ 1, 0, 0.0203, 0.0018, 0, 0.66...
[ "\"\"\"Provides the Template class, a facade for parsing, generating and executing\ntemplate strings, as well as template runtime operations.\"\"\"", "from mako.lexer import Lexer", "from mako import runtime, util, exceptions, codegen", "import imp, os, re, shutil, stat, sys, tempfile, time, types, weakref", ...
# mako/filters.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re, urllib, htmlentitydefs, codecs from StringIO import StringIO from mako import util xm...
[ [ 1, 0, 0.0426, 0.0053, 0, 0.66, 0, 540, 0, 4, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0479, 0.0053, 0, 0.66, 0.0435, 609, 0, 1, 0, 0, 609, 0, 0 ], [ 1, 0, 0.0532, 0.0053, 0, ...
[ "import re, urllib, htmlentitydefs, codecs", "from StringIO import StringIO", "from mako import util", "xml_escapes = {\n '&' : '&amp;',\n '>' : '&gt;', \n '<' : '&lt;', \n '\"' : '&#34;', # also &quot; in html-only\n \"'\" : '&#39;' # also &apos; in html-only \n}", "def legacy_html_esca...
# mako/_ast_util.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
[ [ 8, 0, 0.0232, 0.031, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0393, 0.0012, 0, 0.66, 0.0385, 709, 0, 1, 0, 0, 709, 0, 0 ], [ 14, 0, 0.0447, 0.0048, 0, 0.66...
[ "\"\"\"\n ast\n ~~~\n\n The `ast` module helps Python applications to process trees of the Python\n abstract syntax grammar. The abstract syntax itself might change with\n each Python release; this module helps to find out programmatically what\n the current grammar looks like and allows modifica...
# mako/cache.py # Copyright (C) 2006-2011 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import exceptions cache = None class BeakerMissing(object): def get_cache(self, name...
[ [ 1, 0, 0.0565, 0.0081, 0, 0.66, 0, 682, 0, 1, 0, 0, 682, 0, 0 ], [ 14, 0, 0.0726, 0.0081, 0, 0.66, 0.3333, 419, 1, 0, 0, 0, 0, 9, 0 ], [ 3, 0, 0.0968, 0.0242, 0, 0...
[ "from mako import exceptions", "cache = None", "class BeakerMissing(object):\n def get_cache(self, name, **kwargs):\n raise exceptions.RuntimeException(\"the Beaker package is required to use cache functionality.\")", " def get_cache(self, name, **kwargs):\n raise exceptions.RuntimeExcepti...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import os import web import uuid from mako.lookup import TemplateLookup from mako import exceptions __author__ = 'Michael Liao' class emptyobject(object): def __getattr__(self, attr): return '' def __setattr__(self, attr, value): ...
[ [ 1, 0, 0.037, 0.0093, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0556, 0.0093, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0648, 0.0093, 0, 0...
[ "import logging", "import os", "import web", "import uuid", "from mako.lookup import TemplateLookup", "from mako import exceptions", "__author__ = 'Michael Liao'", "class emptyobject(object):\n def __getattr__(self, attr):\n return ''\n\n def __setattr__(self, attr, value):\n pass"...
from pandas.io.data import DataReader from pandas.io.data import DataFrame import matplotlib.pyplot as plt import matplotlib.ticker as ticker from datetime import datetime from datetime import timedelta import pandas as pd import numpy as np import urllib import codecs import csv import os import glob import json impo...
[ [ 1, 0, 0.0112, 0.0112, 0, 0.66, 0, 190, 0, 1, 0, 0, 190, 0, 0 ], [ 1, 0, 0.0225, 0.0112, 0, 0.66, 0.0455, 190, 0, 1, 0, 0, 190, 0, 0 ], [ 1, 0, 0.0337, 0.0112, 0, ...
[ "from pandas.io.data import DataReader", "from pandas.io.data import DataFrame", "import matplotlib.pyplot as plt", "import matplotlib.ticker as ticker", "from datetime import datetime", "from datetime import timedelta", "import pandas as pd", "import numpy as np", "import urllib", "import codecs"...
import csv import numpy as np from pandas import DataFrame import pandas as pd # all digits are decreased by 1 len_total = 280 len_freq = 7 len_body = 5 len_star = 2 freq_body = [] freq_star = [] relation_body = np.zeros(shape=(50,50)) relation_star = np.zeros(shape=(11,11)) def rel_body(firstC...
[ [ 1, 0, 0.0182, 0.0182, 0, 0.66, 0, 312, 0, 1, 0, 0, 312, 0, 0 ], [ 1, 0, 0.0364, 0.0182, 0, 0.66, 0.0625, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0545, 0.0182, 0, ...
[ "import csv", "import numpy as np", "from pandas import DataFrame", "import pandas as pd", "len_total = 280", "len_freq = 7", "len_body = 5", "len_star = 2", "freq_body = []", "freq_star = []", "relation_body = np.zeros(shape=(50,50))", "relation_star = np.zeros(shape=(11,11))", "def rel_bod...
import sys, string, re, Queue arith = ['sub', 'div', 'mod', 'cmple', 'add', 'mul', 'cmpeq', 'cmplt'] operators = ['-', '/', '%', '<=', '+', '*', '==', '<'] arith1 = ['neg'] targets = [] local_size = 0; # get operand def getOperand(t, sline, access_local): #GP if sline[t] == 'GP': print '(char*)global', ...
[ [ 1, 0, 0.0039, 0.0039, 0, 0.66, 0, 509, 0, 4, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0157, 0.0039, 0, 0.66, 0.0769, 899, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.0196, 0.0039, 0, ...
[ "import sys, string, re, Queue", "arith = ['sub', 'div', 'mod', 'cmple', 'add', 'mul', 'cmpeq', 'cmplt']", "operators = ['-', '/', '%', '<=', '+', '*', '==', '<']", "arith1 = ['neg']", "targets = []", "local_size = 0;", "def getOperand(t, sline, access_local):\n#GP\n if sline[t] == 'GP':\n print('(c...
#!/usr/bin/python2.5 import pacparser pacparser.init() pacparser.parse_pac("wpad.dat") proxy = pacparser.find_proxy("http://www.manugarg.com") print proxy pacparser.cleanup() # Or simply, print pacparser.just_find_proxy("wpad.dat", "http://www2.manugarg.com")
[ [ 1, 0, 0.25, 0.0833, 0, 0.66, 0, 892, 0, 1, 0, 0, 892, 0, 0 ], [ 8, 0, 0.4167, 0.0833, 0, 0.66, 0.1667, 319, 3, 0, 0, 0, 0, 0, 1 ], [ 8, 0, 0.5, 0.0833, 0, 0.66, ...
[ "import pacparser", "pacparser.init()", "pacparser.parse_pac(\"wpad.dat\")", "proxy = pacparser.find_proxy(\"http://www.manugarg.com\")", "print(proxy)", "pacparser.cleanup()", "print(pacparser.just_find_proxy(\"wpad.dat\", \"http://www2.manugarg.com\"))" ]
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it and/or...
[ [ 8, 0, 0.1715, 0.0292, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1971, 0.0073, 0, 0.66, 0.0556, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.2044, 0.0073, 0, 0.66...
[ "\"\"\"\nPython module to parse pac files. Look at project's homepage\nhttp://code.google.com/p/pacparser for more information.\n\"\"\"", "__author__ = 'manugarg@gmail.com (Manu Garg)'", "__copyright__ = 'Copyright (C) 2008 Manu Garg'", "__license__ = 'LGPL'", "from pacparser import _pacparser", "import o...
import shutil import sys from distutils import sysconfig def main(): if sys.platform == 'win32': shutil.rmtree('%s\\pacparser' % sysconfig.get_python_lib(), ignore_errors=True) shutil.copytree('pacparser', '%s\\pacparser' % sysconfig.get_python_lib()) else: print 'This script should b...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.25, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66,...
[ "import shutil", "import sys", "from distutils import sysconfig", "def main():\n if sys.platform == 'win32':\n shutil.rmtree('%s\\\\pacparser' % sysconfig.get_python_lib(),\n ignore_errors=True)\n shutil.copytree('pacparser', '%s\\\\pacparser' % sysconfig.get_python_lib())\n else:\n ...
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it...
[ [ 8, 0, 0.4032, 0.0806, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4516, 0.0161, 0, 0.66, 0.1429, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.4677, 0.0161, 0, 0.66...
[ "\"\"\"\nWrapper script around python module Makefiles. This script take care of\nidentifying python setup and setting up some environment variables needed by\nMakefiles.\n\"\"\"", "import sys", "import os", "from distutils import sysconfig", "from distutils.core import setup", "from distutils.core import...
# Copyright (C) 2007 Manu Garg. # Author: Manu Garg <manugarg@gmail.com> # # pacparser is a library that provides methods to parse proxy auto-config # (PAC) files. Please read README file included with this package for more # information about this library. # # pacparser is free software; you can redistribute it and/or...
[ [ 1, 0, 0.2644, 0.0115, 0, 0.66, 0, 588, 0, 1, 0, 0, 588, 0, 0 ], [ 1, 0, 0.2759, 0.0115, 0, 0.66, 0.1667, 958, 0, 1, 0, 0, 958, 0, 0 ], [ 1, 0, 0.2874, 0.0115, 0, ...
[ "import getopt", "import glob", "import os", "import sys", "def runtests(pacfile, testdata, tests_dir):\n py_ver = '.'.join([str(x) for x in sys.version_info[0:2]])\n if sys.platform == 'win32':\n pacparser_module_path = os.path.join(tests_dir, '..', 'src', 'pymod', 'dist')\n if os.path.exists(os.pa...
import cherrypy import sqlite3 import Common import os import time import hashlib from postmarkup import render_bbcode localdir = os.path.dirname(__file__) absdir = os.path.join(os.getcwd(), localdir) class User(Common.Template): def index (self): return self.default() index.exposed = True ...
[ [ 1, 0, 0.0045, 0.0045, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0089, 0.0045, 0, 0.66, 0.1111, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0134, 0.0045, 0, ...
[ "import cherrypy", "import sqlite3", "import Common", "import os", "import time", "import hashlib", "from postmarkup import render_bbcode", "localdir = os.path.dirname(__file__)", "absdir = os.path.join(os.getcwd(), localdir)", "class User(Common.Template):\n\n\tdef index (self):\n\t\treturn self....
# -*- coding: UTF-8 -*- """ Post Markup Author: Will McGugan (http://www.willmcgugan.com) """ __version__ = "1.1.4" import re from urllib import quote, unquote, quote_plus, urlencode from urlparse import urlparse, urlunparse pygments_available = True try: from pygments import highlight from ...
[ [ 8, 0, 0.003, 0.0027, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0054, 0.0007, 0, 0.66, 0.0222, 162, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.0068, 0.0007, 0, 0.66, ...
[ "\"\"\"\nPost Markup\nAuthor: Will McGugan (http://www.willmcgugan.com)\n\"\"\"", "__version__ = \"1.1.4\"", "import re", "from urllib import quote, unquote, quote_plus, urlencode", "from urlparse import urlparse, urlunparse", "pygments_available = True", "try:\n from pygments import highlight\n f...
import cherrypy import sqlite3 import time from postmarkup import render_bbcode import Common class PrivateMessage(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # This function handles basically everything. If no ID is given, it ...
[ [ 1, 0, 0.0061, 0.0061, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0122, 0.0061, 0, 0.66, 0.2, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0183, 0.0061, 0, 0.6...
[ "import cherrypy", "import sqlite3", "import time", "from postmarkup import render_bbcode", "import Common", "class PrivateMessage(Common.Template):\n\t# Call the default function with no arguments\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\n\t# This function handles basicall...
import sqlite3 import getpass # Create the connection connection = sqlite3.connect("forum.db") cursor = connection.cursor() with open("dump.sql", "w") as f: for line in connection.iterdump(): f.write("%s\n" % line)
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.3333, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 14, 0, 0.5, 0.1, 0, 0.66, 0.6667,...
[ "import sqlite3", "import getpass", "connection = sqlite3.connect(\"forum.db\")", "cursor = connection.cursor()", " for line in connection.iterdump():\n f.write(\"%s\\n\" % line)", " f.write(\"%s\\n\" % line)" ]
import cherrypy import sqlite3 import time import Common class Post(Common.Template): def index(self): return self.default() index.exposed = True # This function allows users to create new posts. It requres the thread_id # argument. If Reply is set, it takes the user name and content from # the given post....
[ [ 1, 0, 0.0062, 0.0062, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0124, 0.0062, 0, 0.66, 0.25, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0186, 0.0062, 0, 0....
[ "import cherrypy", "import sqlite3", "import time", "import Common", "class Post(Common.Template):\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\t\n\t# This function allows users to create new posts. It requres the thread_id\n\t# argument. If Reply is set, it takes the user name...
import cherrypy import sqlite3 import time from postmarkup import render_bbcode import Common class Thread(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # Default function displays a given thread. def default(self, id = None): ...
[ [ 1, 0, 0.0031, 0.0031, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0062, 0.0031, 0, 0.66, 0.2, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0092, 0.0031, 0, 0.6...
[ "import cherrypy", "import sqlite3", "import time", "from postmarkup import render_bbcode", "import Common", "class Thread(Common.Template):\n\t# Call the default function with no arguments\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\n\t# Default function displays a given thre...
import cherrypy import sqlite3 import os.path import hashlib # Import our modules import Common import Subforum import Thread import Post import User import Search import Structure import PrivateMessage # root_dir is used by the config file root_dir = os.path.dirname(os.path.abspath(__file__)) # connect to the datab...
[ [ 1, 0, 0.009, 0.009, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.018, 0.009, 0, 0.66, 0.0588, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.027, 0.009, 0, 0.66, ...
[ "import cherrypy", "import sqlite3", "import os.path", "import hashlib", "import Common", "import Subforum", "import Thread", "import Post", "import User", "import Search", "import Structure", "import PrivateMessage", "root_dir = os.path.dirname(os.path.abspath(__file__))", "def connect(th...
import sqlite3 import getpass import hashlib # Create the connection connection = sqlite3.connect("forum.db") cursor = connection.cursor() # Restore the dump install_dump = open('install.sql', 'r') cursor.executescript(install_dump.read()) install_dump.close() # Add an administrator account cursor.exec...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.05, 0.025, 0, 0.66, 0.1, 784, 0, 1, 0, 0, 784, 0, 0 ], [ 1, 0, 0.075, 0.025, 0, 0.66, ...
[ "import sqlite3", "import getpass", "import hashlib", "connection = sqlite3.connect(\"forum.db\")", "cursor = connection.cursor()", "install_dump = open('install.sql', 'r')", "cursor.executescript(install_dump.read())", "install_dump.close()", "cursor.execute('INSERT INTO User (ID, Username, Passwor...
import cherrypy import sqlite3 import time import Common class Subforum(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # The default view displays a given subforum. If no ID is given, it # displays the root subforum def default(se...
[ [ 1, 0, 0.0072, 0.0072, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0144, 0.0072, 0, 0.66, 0.25, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0216, 0.0072, 0, 0....
[ "import cherrypy", "import sqlite3", "import time", "import Common", "class Subforum(Common.Template):\n\t# Call the default function with no arguments\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\n\t# The default view displays a given subforum. If no ID is given, it \n\t# displ...
import cherrypy import sqlite3 import time import re # central base class that other pages inherit class Template: # header includes the logo and login/register form def header(self, title=None): if title: title = "%s - %s" % (title,self.getForumName()) else: title = "%s" % self.getForumName() out = ''' ...
[ [ 1, 0, 0.0027, 0.0027, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0054, 0.0027, 0, 0.66, 0.25, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.008, 0.0027, 0, 0.6...
[ "import cherrypy", "import sqlite3", "import time", "import re", "class Template:\n\t# header includes the logo and login/register form\n\tdef header(self, title=None):\n\t\tif title:\n\t\t\ttitle = \"%s - %s\" % (title,self.getForumName())\n\t\telse:\n\t\t\ttitle = \"%s\" % self.getForumName()\n\t\tout = '...
import cherrypy import sqlite3 import time import Common from postmarkup import render_bbcode class Search(Common.Template): def index(self): return self.default() index.exposed = True def default(self, q = None): # if the user didn't search for anything if q is None or q == '': # return an error ...
[ [ 1, 0, 0.0118, 0.0118, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0235, 0.0118, 0, 0.66, 0.2, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0353, 0.0118, 0, 0.6...
[ "import cherrypy", "import sqlite3", "import time", "import Common", "from postmarkup import render_bbcode", "class Search(Common.Template):\n\t\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\t\t\n\tdef default(self, q = None):\n\t\t# if the user didn't search for anything", "\...
import cherrypy import sqlite3 import time import Common # restructure the forum class Structure(Common.Template): # Call the default function with no arguments def index(self): return self.default() index.exposed = True # This function is the default view for the restructure view and shows the # subforum t...
[ [ 1, 0, 0.0022, 0.0022, 0, 0.66, 0, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.0044, 0.0022, 0, 0.66, 0.25, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 1, 0, 0.0066, 0.0022, 0, 0....
[ "import cherrypy", "import sqlite3", "import time", "import Common", "class Structure(Common.Template):\n\t# Call the default function with no arguments\n\tdef index(self):\n\t\treturn self.default()\n\tindex.exposed = True\n\t\n\t# This function is the default view for the restructure view and shows the \n...
import sqlite3 as sql conn = sql.connect('sample.db') curs = conn.cursor() # Create Item table curs.execute('''create table item (id integer primary key, itemno text unique, scancode text, descr text, price real)''') curs.execute("insert into item values\ (NULL,0001,32187645,...
[ [ 1, 0, 0.0278, 0.0278, 0, 0.66, 0, 790, 0, 1, 0, 0, 790, 0, 0 ], [ 14, 0, 0.0833, 0.0278, 0, 0.66, 0.0625, 345, 3, 1, 0, 0, 242, 10, 1 ], [ 14, 0, 0.1111, 0.0278, 0, ...
[ "import sqlite3 as sql", "conn = sql.connect('sample.db')", "curs = conn.cursor()", "curs.execute('''create table item\n (id integer primary key, itemno text unique,\n scancode text, descr text, price real)''')", "curs.execute(\"insert into item values\\\n (NULL,0001,32187645,'Milk',2.50)...
""" Tutorial - Multiple objects This tutorial shows you how to create a site structure through multiple possibly nested request handler objects. """ import cherrypy class HomePage: def index(self): return ''' <p>Hi, this is the home page! Check out the other fun stuff on this sit...
[ [ 8, 0, 0.0357, 0.0612, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0816, 0.0102, 0, 0.66, 0.0909, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.1633, 0.1122, 0, 0.66...
[ "\"\"\"\nTutorial - Multiple objects\n\nThis tutorial shows you how to create a site structure through multiple\npossibly nested request handler objects.\n\"\"\"", "import cherrypy", "class HomePage:\n def index(self):\n return '''\n <p>Hi, this is the home page! Check out the other\n ...
""" Tutorial: HTTP errors HTTPError is used to return an error response to the client. CherryPy has lots of options regarding how such errors are logged, displayed, and formatted. """ import os localDir = os.path.dirname(__file__) curpath = os.path.normpath(os.path.join(os.getcwd(), localDir)) import cherrypy cl...
[ [ 8, 0, 0.0617, 0.1111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1358, 0.0123, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1481, 0.0123, 0, 0.66...
[ "\"\"\"\n\nTutorial: HTTP errors\n\nHTTPError is used to return an error response to the client.\nCherryPy has lots of options regarding how such errors are\nlogged, displayed, and formatted.", "import os", "localDir = os.path.dirname(__file__)", "curpath = os.path.normpath(os.path.join(os.getcwd(), localDir)...
""" Tutorial - Hello World The most basic (working) CherryPy application possible. """ # Import CherryPy global namespace import cherrypy class HelloWorld: """ Sample request handler class. """ def index(self): # CherryPy will call this method for the root URI ("/") and send # its return val...
[ [ 8, 0, 0.0857, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2286, 0.0286, 0, 0.66, 0.2, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.4571, 0.3714, 0, 0.66, ...
[ "\"\"\"\nTutorial - Hello World\n\nThe most basic (working) CherryPy application possible.\n\"\"\"", "import cherrypy", "class HelloWorld:\n \"\"\" Sample request handler class. \"\"\"\n\n def index(self):\n # CherryPy will call this method for the root URI (\"/\") and send\n # its return va...
''' Bonus Tutorial: Using SQLObject This is a silly little contacts manager application intended to demonstrate how to use SQLObject from within a CherryPy2 project. It also shows how to use inline Cheetah templates. SQLObject is an Object/Relational Mapper that allows you to access data stored in an RDBMS in a pytho...
[ [ 8, 0, 0.0952, 0.1845, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1964, 0.006, 0, 0.66, 0.125, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 1, 0, 0.2024, 0.006, 0, 0.66, ...
[ "'''\nBonus Tutorial: Using SQLObject\n\nThis is a silly little contacts manager application intended to\ndemonstrate how to use SQLObject from within a CherryPy2 project. It\nalso shows how to use inline Cheetah templates.\n\nSQLObject is an Object/Relational Mapper that allows you to access", "import cherrypy",...
""" Tutorial: File upload and download Uploads ------- When a client uploads a file to a CherryPy application, it's placed on disk immediately. CherryPy will pass it to your exposed method as an argument (see "myFile" below); that arg will have a "file" attribute, which is a handle to the temporary uploaded file. If...
[ [ 8, 0, 0.1963, 0.3832, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4019, 0.0093, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.4112, 0.0093, 0, 0.6...
[ "\"\"\"\n\nTutorial: File upload and download\n\nUploads\n-------\n\nWhen a client uploads a file to a CherryPy application, it's placed", "import os", "localDir = os.path.dirname(__file__)", "absDir = os.path.join(os.getcwd(), localDir)", "import cherrypy", "from cherrypy.lib import static", "class Fil...
""" Bonus Tutorial: Using generators to return result bodies Instead of returning a complete result string, you can use the yield statement to return one result part after another. This may be convenient in situations where using a template package like CherryPy or Cheetah would be overkill, and messy string concatena...
[ [ 8, 0, 0.0957, 0.1702, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2128, 0.0213, 0, 0.66, 0.2, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.4894, 0.4468, 0, 0.66, ...
[ "\"\"\"\nBonus Tutorial: Using generators to return result bodies\n\nInstead of returning a complete result string, you can use the yield\nstatement to return one result part after another. This may be convenient\nin situations where using a template package like CherryPy or Cheetah\nwould be overkill, and messy st...
""" Tutorial - The default method Request handler objects can implement a method called "default" that is called when no other suitable method/object could be found. Essentially, if CherryPy2 can't find a matching request handler object for the given request URI, it will use the default method of the object located de...
[ [ 8, 0, 0.1406, 0.2656, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2969, 0.0156, 0, 0.66, 0.2, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.5625, 0.4531, 0, 0.66, ...
[ "\"\"\"\nTutorial - The default method\n\nRequest handler objects can implement a method called \"default\" that\nis called when no other suitable method/object could be found.\nEssentially, if CherryPy2 can't find a matching request handler object\nfor the given request URI, it will use the default method of the o...
""" Tutorial - Multiple methods This tutorial shows you how to link to other methods of your request handler. """ import cherrypy class HelloWorld: def index(self): # Let's link to another method here. return 'We have an <a href="showMessage">important message</a> for you!' index.exposed...
[ [ 8, 0, 0.1094, 0.1875, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.25, 0.0312, 0, 0.66, 0.2, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.4688, 0.3438, 0, 0.66, ...
[ "\"\"\"\nTutorial - Multiple methods\n\nThis tutorial shows you how to link to other methods of your request\nhandler.\n\"\"\"", "import cherrypy", "class HelloWorld:\n \n def index(self):\n # Let's link to another method here.\n return 'We have an <a href=\"showMessage\">important message</...
""" Tutorial - Passing variables This tutorial shows you how to pass GET/POST variables to methods. """ import cherrypy class WelcomePage: def index(self): # Ask for the user's name. return ''' <form action="greetUser" method="GET"> What is your name? <input ...
[ [ 8, 0, 0.0566, 0.0943, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1321, 0.0189, 0, 0.66, 0.2, 639, 0, 1, 0, 0, 639, 0, 0 ], [ 3, 0, 0.4717, 0.5849, 0, 0.66, ...
[ "\"\"\"\nTutorial - Passing variables\n\nThis tutorial shows you how to pass GET/POST variables to methods.\n\"\"\"", "import cherrypy", "class WelcomePage:\n\n def index(self):\n # Ask for the user's name.\n return '''\n <form action=\"greetUser\" method=\"GET\">\n What i...