Pyrosim Class Documentation¶
-
class
pyrosim.
PYROSIM
(playBlind=False, playPaused=False, evalTime=100, dt=0.05, xyz=[0.8317, -0.9817, 0.8], hpr=[121, -27.5, 0.0], debug=False)[source]¶ Python interface for ODE simulator
Attributes
playBlind (bool, optional) If True the simulation runs without graphics (headless) else if False the simulation runs with graphics (the default is False) playPaused (bool, optional) If True the simulation starts paused else if False the simulation starts running. With simulation window in focus use Ctrl-p to toggle pausing the simulation. (the default is False) evalTime (int, optional) The number of discrete steps in the simulation (the default is 100) dt (float, optional) The time in seconds between physics world steps. Larger dt values create more unstable physics. (the default is 0.05) xyz (list of 3 floats) The xyz position of the camera (default is [0.8317,-0.9817,0.8000]) hpr The heading, pitch, and roll of the camera (default is [121,-27.5,0.0]) debug (bool, optional) If True print out every string command sent through the pipe to the simulator (the default is False) Methods
-
Get_Sensor_Data
(sensorID=0, svi=0)[source]¶ Get the post simulation data from a specified sensor
Parameters: sensorID : int , optional
the sensors ID tag
svi : int , optional
The sensor value index. Certain sensors have multiple values (e.g. the position sensor) and the svi specifies which to access (e.g. for a position sensor, svi=0 corresponds to the x value of that sensor)
Returns: list of float
Returns the list of sensor values over the simulation.
-
Send_Bias_Neuron
(neuronID=0)[source]¶ Send bias neuron to simulator
Parameters: neuronID : int, optional
User specified ID tag for the neuron
Returns: bool
True if successful, False otherwise
-
Send_Box
(objectID=0, x=0, y=0, z=0, length=0.1, width=0.1, height=0.1, r=1, g=1, b=1)[source]¶ Send box body to the simulator
Parameters: objectID : int, optional
User specified body ID tag for the box
x : float, optional
The x position coordinate of the center
y : float, optional
The y position coordinate of the center
z : float, optional
The z position coordinate of the center
length : float, optional
The length of the box
width : float, optional
The width of the box
height : float, optional
The height of the box
r : float, optional
The amount of the color red in the box (r in [0,1])
g : float, optional
The amount of the color green in the box (g in [0,1])
b : float, optional
The amount of the color blue in the box (b in [0,1])
Returns: bool
True if successful, False otherwise
-
Send_Camera
(xyz, hpr)[source]¶ Sends camera position to simulator in eulerian coordinates
Parameters: xyz : list of floats
A length 3 list specifying the x,y,z position of the camera in simulation
hpr : list of floats
A length 3 list specifying the heading, pitch and roll of the camera
Returns: None
-
Send_Cylinder
(objectID=0, x=0, y=0, z=0, r1=0, r2=0, r3=1, length=1.0, radius=0.1, r=1, g=1, b=1)[source]¶ Send cylinder body to the simulator
Parameters: objectID : int, optional
User specified body ID tag for the cylinder (default is 0)
x : float, optional
The x position coordinate of the center (default is 0)
y : float, optional
The y position coordinate of the center (default is 0)
z : float, optional
The z position coordinate of the center (default is 0)
r1 : float, optional
The orientation along the x axis. The vector [r1,r2,r3] specify the direction of the long axis of the cylinder. (default is 0)
r2 : float, optional
The orientation along the y axis. The vector [r1,r2,r3] specify the direction of the long axis of the cylinder. (default is 0)
r3 : float, optional
The orientation along the z axis. The vector [r1,r2,r3] specify the direction of the long axis of the cylinder. (default is 1)
length : float, optional
The length of long axis of the cylinder (default is 1.0)
radius : float, optional
The radius of the short axis of the cylinder (default is 0.1)
r : float, optional
The amount of the color red in the box (r in [0,1])
g : float, optional
The amount of the color green in the box (g in [0,1])
b : float, optional
The amount of the color blue in the box (b in [0,1])
Returns: bool
True if successful, False otherwise
-
Send_Developing_Synapse
(sourceNeuronID=0, targetNeuronID=0, startWeight=0.0, endWeight=0.0, startTime=0.0, endTime=1.0)[source]¶ Sends a synapse to the simulator
Developing synapses are synapses which change over time. The synapse will interpolate between the startWeight and endWeight over the desired time range dictated by startTime and endTime. startTime and endTime are in [0,1] where 0 maps to time step 0 and 1 maps to the evalTime of the simulation. Setting startTime equal to endTime results in a discrete change from startWeight to endWeight in the synapse at the specified time step. If startTime >= endTime times are changed such that endTime = startTime.
Parameters: sourceNeuronID : int, optional
The ID of the source neuron of the synapse
targetNeuronID : int, optional
The ID of the target neuron of the synapse
startWeight : float, optional
The starting edge weight of the synapse
endWeight : float, optional
The ending edge weight of the synapse
startTime : float, optional
The starting time of development. startTime in [0,1]
endTime : float, optional
The ending time of development. endTime in [0,1]
Returns:
——–
bool
True if successful, False otherwise
-
Send_Function_Neuron
(neuronID=0, function=<built-in function sin>)[source]¶ Send neuron to simulator which takes its value from the user defined function
The function is mapped to the specific time in the simulation based on both the discrete evaluation time and the dt space between time steps. For example if evalTime=100 and dt=0.05 the function will be evaluated at [0,0.05,...,5]
Parameters: neuronID : int, optional
The user specified ID tag of the neuron
function : function, optional
The function which defines the neuron value. Valid functions return a single float value over the time domain.
Returns: bool
True if successful, False otherwise
-
Send_Hidden_Neuron
(neuronID=0, tau=1.0)[source]¶ Send a hidden neuron to the simulator
Hidden neurons are basic neurons which can have inputs and outputs. They ‘hidden’ between input neurons (sensors, bias, function) and output neurons (motors)
Parameters: neuronID : int, optional
The user specified ID tag of the neuron
tau : float, optional
The ‘learning rate’ of the neuron. Increasing tau increases how much of value of the neuron at the current time step comes from external inputs vs. the value of the neuron at the previous time step
Returns: bool
True if successful, False otherwise
-
Send_Joint
(jointID=0, firstObjectID=0, secondObjectID=1, x=0, y=0, z=0, n1=0, n2=0, n3=1, lo=-0.7853981633974483, hi=0.7853981633974483, speed=1.0, torque=10.0, positionControl=True)[source]¶ Send a hinge joint to the simulator
Parameters: jointID : int, optional
User specified ID tag for the joint (default is 0)
firstObjectID : int, optional
The body ID of the first body the joint is connected to. If set equal to -1, the joint is connected to a point in space (default is 0)
secondOjbectID : int, optional
The body ID of the second body the joint is connected to. If set equal to -1, the joint is connected to a point in space (default is 1)
x : float, optional
The x position coordinate of the joint (default is 0)
y : float, optional
The y position coordinate of the joint (default is 0)
z : float, optional
The z position coordinate of the joint (default is 0)
n1 : float, optional
The orientation along the x axis. The vector [n1,n2,n3] specifies the axis about which the joint rotates (default is 0)
n2 : float, optional
The orientation along the y axis. The vector [n1,n2,n3] specifies the axis about which the joint rotates (default is 0)
n3 : float, optional
The orientation along the z axis. The vector [n1,n2,n3] specifies the axis about which the joint rotates (default is 1)
lo : float, optional
The lower limit in radians of the joint (default is -pi/4)
hi : float, optional
The upper limit in radians of the joint (default is pi/4)
speed : float, optional
The speed of the motor of the joint (default is 1.0)
positionControl : bool, optional
True means use position control. This means the motor neuron output is treated as a target angle for the joint to actuate to. False means the motor neuron output is treated as a target actuation rate.
Returns: bool
True if successful, False otherwise
-
Send_Light_Sensor
(sensorID=0, objectID=0)[source]¶ Attaches a light sensor to a body in simulation
Parameters: sensorID : int, optional
The user defined ID of the sensor
objectID : int, optional
The body ID of the body to connect the sensor to
Returns: bool
True if successful
-
Send_Light_Source
(objectIndex=0)[source]¶ Attaches light source to a body in simulation
Parameters: objectIndex : int, optional
The body ID of the body to attach the light to
Returns: bool
True if successful, False otherwise
-
Send_Motor_Neuron
(neuronID=0, jointID=0, tau=1.0)[source]¶ Send motor neurons to simulator
Motor neurons are neurons which connecto to a specified joint and determine how the joint moves every time step of simulation
Parameters: neuronID : int, optional
The user specified ID tag of the neuron
jointID : int, optional
The joint ID tag of the joint we want the neuron to connect to
tau :
The ‘learning rate’ of the neuron. Increasing tau increases how much of value of the neuron at the current time step comes from external inputs vs. the value of the neuron at the previous time step
Returns: bool
True if successful, False otherwise
-
Send_Position_Sensor
(sensorID=0, objectID=0)[source]¶ Attaches a position sensor to a body in simulation
Parameters: sensorID : int, optional
The user defined ID of the sensor
objectID : int, optional
The body ID of the body to connect the sensor to
Returns: bool
True if successful
-
Send_Proprioceptive_Sensor
(sensorID=0, jointID=0)[source]¶ Attaches a proprioceptive sensor to a joint in simulation
Proprioceptive sensors returns the angle of the joint at each time step
Parameters: sensorID : int, optional
The user defined ID of the sensor
jointID : int, optional
The joint ID of the joint to connect the sensor to
Returns: bool
True if successful
-
Send_Ray_Sensor
(sensorID=0, objectID=0, x=0, y=0, z=0, r1=0, r2=0, r3=1)[source]¶ Sends a ray sensor to the simulator connected to a body
Ray sensors return four values each time step, the distance and color (r,g,b).
Parameters: sensorID : int, optional
The user defined ID tag for the ray sensor
objectID : int, optional
The body ID of the associated body the ray sensor is connected to. When this body moves the ray sensor moves accordingly
x : float, optional
The x position of the sensor
y : float, optional
The y position of the sensor
z : float, optional
The z position of the sensor
r1 : float, optional
The x direction of the sensor. The array [r1,r2,r3] is the direction the ray sensor is pointing in the time step.
r2 : float, optional
The y direction of the sensor. The array [r1,r2,r3] is the direction the ray sensor is pointing in the time step.
r3 : float, optional
The z direction of the sensor. The array [r1,r2,r3] is the direction the ray sensor is pointing in the time step.
-
Send_Sensor_Neuron
(neuronID=0, sensorID=0, sensorValueIndex=0, tau=1.0)[source]¶ Sends a sensor neuron to the simulator
Sensor neurons are input neurons which take the value of their associated sensor
Parameters: neuronID : int, optional
The user defined ID of the neuron
sensorID : int, optional
The associated sensor ID for the neuron
sensorValueIndex : int, optional
The sensor value index is the offset index of the sensor. SVI is used for sensors which return a vector of values (position, ray sensors, etc.)
tau : int, optional
not used for sensor neurons
Returns: bool
True if successful, False otherwise
-
Send_Synapse
(sourceNeuronID=0, targetNeuronID=0, weight=0.0)[source]¶ Sends a synapse to the simulator
Synapses are the edge connections between neurons
Parameters: sourceNeuronID : int, optional
The ID of the source neuron of the synapse
targetNeuronID : int, optional
The ID of the target neuron of the synapse
weight : float, optional
The edge weight of the synapse
-
Send_Touch_Sensor
(sensorID=0, objectID=0)[source]¶ Send touch sensor to a body in the simulator
Parameters: sensorID : int, optional
The user defined ID of the sensor
objectID : int, optional
The body ID of the associated body
Returns: bool
True if successful, False otherwise
-
Send_User_Input_Neuron
(neuronID=0, values=1)[source]¶ Send neuron to the simulator which takes user defined values at each time step
Parameters: neuronID : int, optional
The user specified ID tag of the neuron
values : list of floats or float, optional
The user specified values for the neuron. If length of values < the number of time steps, the values are continually looped through until every time step has a corresponding value
Returns: bool
True if successful, False otherwise
-
Send_Vestibular_Sensor
(sensorID=0, objectID=0)[source]¶ Connects a vestibular sensor to a body
Vestibular sensors return a bodies orrientation in space
Parameters: sensorID : int, optional
The user defined ID of the sensor
objectID : int, optional
The body ID of the associated body
Returns: bool
True if successful, False otherwise
-


To begin the OAuth 2.0 Authorization Code Grant flow the client application should redirect the user to this consent application, passing client_id, response_type and scope parameters.
Click the link below to start an example flow.
{{.consentURI}}


| Usability Techniques Heuristic Evaluation - A System Checklist |
By Deniese Pierotti, Xerox Corporation
Heuristic Evaluation - A System Checklist1. Visibility of System Status
The system should always keep user informed about what is going on, through appropriate feedback within reasonable time.
# |
Review Checklist |
Yes No N/A |
Comments |
1.1 |
Does every display begin with a title or header that describes screen contents? |
O O O |
|
1.2 |
Is there a consistent icon design scheme and stylistic treatment across the system? |
O O O |
|
1.3 |
Is a single, selected icon clearly visible when surrounded by unselected icons? |
O O O |
|
1.4 |
Do menu instructions, prompts, and error messages appear in the same place(s) on each menu? |
O O O |
|
1.5 |
In multipage data entry screens, is each page labeled to show its relation to others? |
O O O |
|
1.6 |
If overtype and insert mode are both available, is there a visible indication of which one the user is in? |
O O O |
|
1.7 |
If pop-up windows are used to display error messages, do they allow the user to see the field in error? |
O O O |
|
1.8 |
Is there some form of system feedback for every operator action? |
O O O |
|
1.9 |
After the user completes an action (or group of actions), does the feedback indicate that the next group of actions can be started? |
O O O |
|
1.10 |
Is there visual feedback in menus or dialog boxes about which choices are selectable? |
O O O |
|
1.11 |
Is there visual feedback in menus or dialog boxes about which choice the cursor is on now? |
O O O |
|
1.12 |
If multiple options can be selected in a menu or dialog box, is there visual feedback about which options are already selected? |
O O O |
|
1.13 |
Is there visual feedback when objects are selected or moved? |
O O O |
|
1.14 |
Is the current status of an icon clearly indicated? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
1.15 |
Is there feedback when function keys are pressed? |
O O O |
|
1.16 |
If there are observable delays (greater than fifteen seconds) in the systems response time, is the user kept informed of the system's progress? |
O O O |
|
1.17 |
Are response times appropriate to the task? |
O O O |
|
1.18 |
Typing, cursor motion, mouse selection: 50-1 50 milliseconds |
O O O |
|
1.19 |
Simple, frequent tasks: less than 1 second |
O O O |
|
1.20 |
Common tasks: 2-4 seconds |
O O O |
|
1.21 |
Complex tasks: 8-12 seconds |
O O O |
|
1.22 |
Are response times appropriate to the user's cognitive processing? |
O O O |
|
1.23 |
Continuity of thinking is required and information must be remembered throughout several responses: less than two seconds. |
O O O |
|
1.24 |
High levels of concentration aren't necessary and remembering information is not required: two to fifteen seconds. |
O O O |
|
1.25 |
Is the menu-naming terminology consistent with the user's task domain? |
O O O |
|
1.26 |
Does the system provide visibility: that is, by looking, can the user tell the state of the system and the alternatives for action? |
O O O |
|
1.27 |
Do GUI menus make obvious which item has been selected? |
O O O |
|
1.28 |
Do GUI menus make obvious whether deselection is possible? |
O O O |
|
1.29 |
If users must navigate between multiple screens, does the system use context labels, menu maps, and place markers as navigational aids? |
O O O |
The system should speak the users language, with words, phrases and concepts familiar to the user, rather than system-oriented terms. Follow real-world conventions, making information appear in a natural and logical order.
# |
Review Checklist |
Yes No N/A |
Comments |
2.1 |
Are icons concrete and familiar? |
O O O |
|
2.2 |
Are menu choices ordered in the most logical way, given the user, the item names, and the task variables? |
O O O |
|
2.3 |
If there is a natural sequence to menu choices, has it been used? |
O O O |
|
2.4 |
Do related and interdependent fields appear on the same screen? |
O O O |
|
2.5 |
If shape is used as a visual cue, does it match cultural conventions? |
O O O |
|
2.6 |
Do the selected colors correspond to common expectations about color codes? |
O O O |
|
2.7 |
When prompts imply a necessary action, are the words in the message consistent with that action? |
O O O |
|
2.8 |
Do keystroke references in prompts match actual key names? |
O O O |
|
2.9 |
On data entry screens, are tasks described in terminology familiar to users? |
O O O |
|
2.10 |
Are field-level prompts provided for data entry screens? |
||
2.11 |
For question and answer interfaces, are questions stated in clear, simple language? |
O O O |
|
2.12 |
Do menu choices fit logically into categories that have readily understood meanings? |
O O O |
|
2.13 |
Are menu titles parallel grammatically? |
O O O |
|
2.14 |
Does the command language employ user jargon and avoid computer jargon? |
O O O |
|
2.15 |
Are command names specific rather than general? |
O O O |
|
2.16 |
Does the command language allow both full names and abbreviations? |
O O O |
|
2.17 |
Are input data codes meaningful? |
O O O |
|
2.18 |
Have uncommon letter sequences been avoided whenever possible? |
O O O |
|
2.19 |
Does the system automatically enter leading or trailing spaces to align decimal points? |
O O O |
|
2.20 |
Does the system automatically enter a dollar sign and decimal for monetary entries? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
2.21 |
Does the system automatically enter commas in numeric values greater than 9999? |
O O O |
|
2.22 |
Do GUI menus offer activation: that is, make obvious how to say "now do it"? |
O O O |
|
2.23 |
Has the system been designed so that keys with similar names do not perform opposite (and potentially dangerous) actions? |
O O O |
|
2.24 |
Are function keys labeled clearly and distinctively, even if this means breaking consistency rules? |
O O O |
3. User Control and Freedom
Users should be free to select and sequence tasks (when appropriate), rather than having the system do this for them. Users often choose system functions by mistake and will need a clearly marked "emergency exit" to leave the unwanted state without having to go through an extended dialogue. Users should make their own decisions (with clear information) regarding the costs of exiting current work. The system should support undo and redo.
# |
Review Checklist |
Yes No N/A |
Comments |
3.1 |
If setting up windows is a low-frequency task, is it particularly easy to remember? |
O O O |
|
3.2 |
In systems that use overlapping windows, is it easy for users to rearrange windows on the screen? |
O O O |
|
3.3 |
In systems that use overlapping windows, is it easy for users to switch between windows? |
O O O |
|
3.4 |
When a user's task is complete, does the system wait for a signal from the user before processing? |
O O O |
|
3.5 |
Can users type-ahead in a system with many nested menus? |
O O O |
|
3.6 |
Are users prompted to confirm commands that have drastic, destructive consequences? |
O O O |
|
3.7 |
Is there an "undo" function at the level of a single action, a data entry, and a complete group of actions? |
O O O |
|
3.8 |
Can users cancel out of operations in progress? |
O O O |
|
3.9 |
Are character edits allowed in commands? |
O O O |
|
3.10 |
Can users reduce data entry time by copying and modifying existing data? |
O O O |
|
3.11 |
Are character edits allowed in data entry fields? |
O O O |
|
3.12 |
If menu lists are long (more than seven items), can users select an item either by moving the cursor or by typing a mnemonic code? |
O O O |
|
3.13 |
If the system uses a pointing device, do users have the option of either clicking on menu items or using a keyboard shortcut? |
O O O |
|
3.14 |
Are menus broad (many items on a menu) rather than deep (many menu levels)? |
O O O |
|
3.15 |
If the system has multiple menu levels, is there a mechanism that allows users to go back to previous menus? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
3.16 |
If users can go back to a previous menu, can they change their earlier menu choice? |
O O O |
|
3.17 |
Can users move forward and backward between fields or dialog box options? |
O O O |
|
3.18 |
If the system has multipage data entry screens, can users move backward and forward among all the pages in the set? |
O O O |
|
3.19 |
If the system uses a question and answer interface, can users go back to previous questions or skip forward to later questions? |
O O O |
|
3.20 |
Do function keys that can cause serious consequences have an undo feature? |
O O O |
|
3.21 |
Can users easily reverse their actions? |
O O O |
|
3.22 |
If the system allows users to reverse their actions, is there a retracing mechanism to allow for multiple undos? |
O O O |
|
3.23 |
Can users set their own system, session, file, and screen defaults? |
O O O |
4. Consistency and Standards
Users should not have to wonder whether different words, situations, or actions mean the same thing. Follow platform conventions.
# |
Review Checklist |
Yes No N/A |
Comments |
4.1 |
Have industry or company formatting standards been followed consistently in all screens within a system? |
O O O |
|
4.2 |
Has a heavy use of all uppercase letters on a screen been avoided? |
O O O |
|
4.3 |
Do abbreviations not include punctuation? |
O O O |
|
4.4 |
Are integers right-justified and real numbers decimal-aligned? |
O O O |
|
4.5 |
Are icons labeled? |
O O O |
|
4.6 |
Are there no more than twelve to twenty icon types? |
O O O |
|
4.7 |
Are there salient visual cues to identify the active window? |
O O O |
|
4.8 |
Does each window have a title? |
O O O |
|
4.9 |
Are vertical and horizontal scrolling possible in each window? |
O O O |
|
4.10 |
Does the menu structure match the task structure? |
O O O |
|
4.11 |
Have industry or company standards been established for menu design, and are they applied consistently on all menu screens in the system? |
O O O |
|
4.12 |
Are menu choice lists presented vertically? |
O O O |
|
4.13 |
If "exit" is a menu choice, does it always appear at the bottom of the list? |
O O O |
|
4.14 |
Are menu titles either centered or left-justified? |
O O O |
|
4.15 |
Are menu items left-justified, with the item number or mnemonic preceding the name? |
O O O |
|
4.16 |
Do embedded field-level prompts appear to the right of the field label? |
O O O |
|
4.17 |
Do on-line instructions appear in a consistent location across screens? |
O O O |
|
4.18 |
Are field labels and fields distinguished typographically? |
O O O |
|
4.19 |
Are field labels consistent from one data entry screen to another? |
O O O |
|
4.20 |
Are fields and labels left-justified for alpha lists and right-justified for numeric lists? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
4.21 |
Do field labels appear to the left of single fields and above list fields? |
O O O |
|
4.22 |
Are attention-getting techniques used with care? |
O O O |
|
4.23 |
Intensity: two levels only |
O O O |
|
4.24 |
Size: up to four sizes |
O O O |
|
4.25 |
Font: up to three |
O O O |
|
4.26 |
Blink: two to four hertz |
O O O |
|
4.27 |
Color: up to four (additional colors for occasional use only) |
O O O |
|
4.28 |
Sound: soft tones for regular positive feedback, harsh for rare critical conditions |
O O O |
|
4.29 |
Are attention-getting techniques used only for exceptional conditions or for time-dependent information? |
O O O |
|
4.30 |
Are there no more than four to seven colors, and are they far apart along the visible spectrum? |
O O O |
|
4.31 |
Is a legend provided if color codes are numerous or not obvious in meaning? |
O O O |
|
4.32 |
Have pairings of high-chroma, spectrally extreme colors been avoided? |
O O O |
|
4.33 |
Are saturated blues avoided for text or other small, thin line symbols? |
O O O |
|
4.34 |
Is the most important information placed at the beginning of the prompt? |
O O O |
|
4.35 |
Are user actions named consistently across all prompts in the system? |
O O O |
|
4.36 |
Are system objects named consistently across all prompts in the system? |
O O O |
|
4.37 |
Do field-level prompts provide more information than a restatement of the field name? |
O O O |
|
4.38 |
For question and answer interfaces, are the valid inputs for a question listed? |
O O O |
|
4.39 |
Are menu choice names consistent, both within each menu and across the system, in grammatical style and terminology? |
O O O |
|
4.40 |
Does the structure of menu choice names match their corresponding menu titles? |
O O O |
|
4.41 |
Are commands used the same way, and do they mean the same thing, in all parts of the system? |
O O O |
|
4.42 |
Does the command language have a consistent, natural, and mnemonic syntax? |
O O O |
|
4.43 |
Do abbreviations follow a simple primary rule and, if necessary, a simple secondary rule for abbreviations that otherwise would be duplicates? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
4.44 |
Is the secondary rule used only when necessary? |
O O O |
|
4.45 |
Are abbreviated words all the same length? |
O O O |
|
4.46 |
Is the structure of a data entry value consistent from screen to screen? |
O O O |
|
4.47 |
Is the method for moving the cursor to the next or previous field consistent throughout the system? |
O O O |
|
4.48 |
If the system has multipage data entry screens, do all pages have the same title? |
O O O |
|
4.49 |
If the system has multipage data entry screens, does each page have a sequential page number? |
O O O |
|
4.50 |
Does the system follow industry or company standards for function key assignments? |
O O O |
|
4.51 |
Are high-value, high-chroma colors used to attract attention? |
O O O |
Error messages should be expressed in plain language (NO CODES).
# |
Review Checklist |
Yes No N/A |
Comments |
5.1 |
Is sound used to signal an error? |
O O O |
|
5.2 |
Are prompts stated constructively, without overt or implied criticism of the user? |
O O O |
|
5.3 |
Do prompts imply that the user is in control? |
O O O |
|
5.4 |
Are prompts brief and unambiguous. |
O O O |
|
5.5 |
Are error messages worded so that the system, not the user, takes the blame? |
O O O |
|
5.6 |
If humorous error messages are used, are they appropriate and inoffensive to the user population? |
O O O |
|
5.7 |
Are error messages grammatically correct? |
O O O |
|
5.8 |
Do error messages avoid the use of exclamation points? |
O O O |
|
5.9 |
Do error messages avoid the use of violent or hostile words? |
O O O |
|
5.10 |
Do error messages avoid an anthropomorphic tone? |
O O O |
|
5.11 |
Do all error messages in the system use consistent grammatical style, form, terminology, and abbreviations? |
O O O |
|
5.12 |
Do messages place users in control of the system? |
O O O |
|
5.13 |
Does the command language use normal action-object syntax? |
O O O |
|
5.14 |
Does the command language avoid arbitrary, non-English use of punctuation, except for symbols that users already know? |
O O O |
|
5.15 |
If an error is detected in a data entry field, does the system place the cursor in that field or highlight the error? |
O O O |
|
5.16 |
Do error messages inform the user of the error's severity? |
O O O |
|
5.17 |
Do error messages suggest the cause of the problem? |
O O O |
|
5.18 |
Do error messages provide appropriate semantic information? |
O O O |
|
5.19 |
Do error messages provide appropriate syntactic information? |
O O O |
|
5.20 |
Do error messages indicate what action the user needs to take to correct the error? |
O O O |
|
5.21 |
If the system supports both novice and expert users, are multiple levels of error-message detail available? |
O O O |
6. Error Prevention
Even better than good error messages is a careful design which prevents a problem from occurring in the first place.
# |
Review Checklist |
Yes No N/A |
Comments |
6.1 |
If the database includes groups of data, can users enter more than one group on a single screen? |
O O O |
|
6.2 |
Have dots or underscores been used to indicate field length? |
O O O |
|
6.3 |
Is the menu choice name on a higher-level menu used as the menu title of the lower-level menu? |
O O O |
|
6.4 |
Are menu choices logical, distinctive, and mutually exclusive? |
O O O |
|
6.5 |
Are data inputs case-blind whenever possible? |
O O O |
|
6.6 |
If the system displays multiple windows, is navigation between windows simple and visible? |
O O O |
|
6.7 |
Are the function keys that can cause the most serious consequences in hard-to-reach positions? |
O O O |
|
6.8 |
Are the function keys that can cause the most serious consequences located far away from low-consequence and high-use keys? |
O O O |
|
6.9 |
Has the use of qualifier keys been minimized? |
O O O |
|
6.10 |
If the system uses qualifier keys, are they used consistently throughout the system? |
O O O |
|
6.11 |
Does the system prevent users from making errors whenever possible? |
O O O |
|
6.12 |
Does the system warn users if they are about to make a potentially serious error? |
O O O |
|
6.13 |
Does the system intelligently interpret variations in user commands? |
O O O |
|
6.14 |
Do data entry screens and dialog boxes indicate the number of character spaces available in a field? |
O O O |
|
6.15 |
Do fields in data entry screens and dialog boxes contain default values when appropriate? |
O O O |
Make objects, actions, and options visible. The user should not have to remember information from one part of the dialogue to another. Instructions for use of the system should be visible or easily retrievable whenever appropriate.
# |
Review Checklist |
Yes No N/A |
Comments |
7.1 |
For question and answer interfaces, are visual cues and white space used to distinguish questions, prompts, instructions, and user input? |
O O O |
|
7.2 |
Does the data display start in the upper-left corner of the screen? |
O O O |
|
7.3 |
Are multiword field labels placed horizontally (not stacked vertically)? |
O O O |
|
7.4 |
Are all data a user needs on display at each step in a transaction sequence? |
O O O |
|
7.5 |
Are prompts, cues, and messages placed where the eye is likely to be looking on the screen? |
O O O |
|
7.6 |
Have prompts been formatted using white space, justification, and visual cues for easy scanning? |
O O O |
|
7.7 |
Do text areas have "breathing space" around them? |
O O O |
|
7.8 |
Is there an obvious visual distinction made between "choose one" menu and "choose many" menus? |
O O O |
|
7.9 |
Have spatial relationships between soft function keys (on-screen cues) and keyboard function keys been preserved? |
O O O |
|
7.10 |
Does the system gray out or delete labels of currently inactive soft function keys? |
O O O |
|
7.11 |
Is white space used to create symmetry and lead the eye in the appropriate direction? |
O O O |
|
7.12 |
Have items been grouped into logical zones, and have headings been used to distinguish between zones? |
O O O |
|
7.13 |
Are zones no more than twelve to fourteen characters wide and six to seven lines high? |
O O O |
|
7.14 |
Have zones been separated by spaces, lines, color, letters, bold titles, rules lines, or shaded areas? |
O O O |
|
7.15 |
Are field labels close to fields, but separated by at least one space? |
O O O |
|
7.16 |
Are long columnar fields broken up into groups of five, separated by a blank line? |
O O O |
|
7.17 |
Are optional data entry fields clearly marked? |
O O O |
|
7.18 |
Are symbols used to break long input strings into "chunks"? |
O O O |
7.19 |
Is reverse video or color highlighting used to get the user's attention? |
O O O |
|
7.20 |
Is reverse video used to indicate that an item has been selected? |
O O O |
|
7.21 |
Are size, boldface, underlining, color, shading, or typography used to show relative quantity or importance of different screen items? |
O O O |
|
7.22 |
Are borders used to identify meaningful groups? |
O O O |
|
7.23 |
Has the same color been used to group related elements? |
O O O |
|
7.24 |
Is color coding consistent throughout the system? |
O O O |
|
7.25 |
Is color used in conjunction with some other redundant cue? |
O O O |
|
7.26 |
Is there good color and brightness contrast between image and background colors? |
O O O |
|
7.27 |
Have light, bright, saturated colors been used to emphasize data and have darker, duller, and desaturated colors been used to de-emphasize data? |
O O O |
|
7.28 |
Is the first word of each menu choice the most important? |
O O O |
|
7.29 |
Does the system provide mapping: that is, are the relationships between controls and actions apparent to the user? |
O O O |
|
7.30 |
Are input data codes distinctive? |
O O O |
|
7.31 |
Have frequently confused data pairs been eliminated whenever possible? |
O O O |
|
7.32 |
Have large strings of numbers or letters been broken into chunks? |
O O O |
|
7.33 |
Are inactive menu items grayed out or omitted? |
O O O |
|
7.34 |
Are there menu selection defaults? |
O O O |
|
7.35 |
If the system has many menu levels or complex menu levels, do users have access to an on-line spatial menu map? |
O O O |
|
7.36 |
Do GUI menus offer affordance: that is, make obvious where selection is possible? |
O O O |
|
7.37 |
Are there salient visual cues to identify the active window? |
O O O |
|
7.38 |
Are function keys arranged in logical groups? |
O O O |
|
7.39 |
Do data entry screens and dialog boxes indicate when fields are optional? |
O O O |
|
7.40 |
On data entry screens and dialog boxes, are dependent fields displayed only when necessary? |
O O O |
Accelerators-unseen by the novice user-may often speed up the interaction for the expert user such that the system can cater to both inexperienced and experienced users. Allow users to tailor frequent actions. Provide alternative means of access and operation for users who differ from the "average" user (e.g., physical or cognitive ability, culture, language, etc.)
# |
Review Checklist |
Yes No N/A |
Comments |
8.1 |
If the system supports both novice and expert users, are multiple levels of error message detail available? |
O O O |
|
8.2 |
Does the system allow novices to use a keyword grammar and experts to use a positional grammar? |
O O O |
|
8.3 |
Can users define their own synonyms for commands? |
O O O |
|
8.4 |
Does the system allow novice users to enter the simplest, most common form of each command, and allow expert users to add parameters? |
O O O |
|
8.5 |
Do expert users have the option of entering multiple commands in a single string? |
O O O |
|
8.6 |
Does the system provide function keys for high-frequency commands? |
O O O |
|
8.7 |
For data entry screens with many fields or in which source documents may be incomplete, can users save a partially filled screen? |
O O O |
|
8.8 |
Does the system automatically enter leading zeros? |
O O O |
|
8.9 |
If menu lists are short (seven items or fewer), can users select an item by moving the cursor? |
O O O |
|
8.10 |
If the system uses a type-ahead strategy, do the menu items have mnemonic codes? |
O O O |
|
8.11 |
If the system uses a pointing device, do users have the option of either clicking on fields or using a keyboard shortcut? |
O O O |
|
8.12 |
Does the system offer "find next" and "find previous" shortcuts for database searches? |
O O O |
|
8.13 |
On data entry screens, do users have the option of either clicking directly on a field or using a keyboard shortcut? |
O O O |
|
8.14 |
On menus, do users have the option of either clicking directly on a menu item or using a keyboard shortcut? |
O O O |
|
8.15 |
In dialog boxes, do users have the option of either clicking directly on a dialog box option or using a keyboard shortcut? |
O O O |
|
8.16 |
Can expert users bypass nested dialog boxes with either type-ahead, user-defined macros, or keyboard shortcuts? |
O O O |
9. Aesthetic and Minimalist Design
Dialogues should not contain information which is irrelevant or rarely needed. Every extra unit of information in a dialogue competes with the relevant units of information and diminishes their relative visibility.
# |
Review Checklist |
Yes No N/A |
Comments |
9.1 |
Is only (and all) information essential to decision making displayed on the screen? |
O O O |
|
9.2 |
Are all icons in a set visually and conceptually distinct? |
O O O |
|
9.3 |
Have large objects, bold lines, and simple areas been used to distinguish icons? |
O O O |
|
9.4 |
Does each icon stand out from its background? |
O O O |
|
9.5 |
If the system uses a standard GUI interface where menu sequence has already been specified, do menus adhere to the specification whenever possible? |
O O O |
|
9.6 |
Are meaningful groups of items separated by white space? |
O O O |
|
9.7 |
Does each data entry screen have a short, simple, clear, distinctive title? |
O O O |
|
9.8 |
Are field labels brief, familiar, and descriptive? |
O O O |
|
9.9 |
Are prompts expressed in the affirmative, and do they use the active voice? |
O O O |
|
9.10 |
Is each lower-level menu choice associated with only one higher level menu? |
O O O |
|
9.11 |
Are menu titles brief, yet long enough to communicate? |
O O O |
|
9.12 |
Are there pop-up or pull-down menus within data entry fields that have many, but well-defined, entry options? |
O O O |
10. Help and Documentation
Even though it is better if the system can be used without documentation, it may be necessary to provide help and documentation. Any such information should be easy to search, focused on the users task, list concrete steps to be carried out, and not be too large.
# |
Review Checklist |
Yes No N/A |
Comments |
10.1 |
If users are working from hard copy, are the parts of the hard copy that go on-line marked? |
O O O |
|
10.2 |
Are on-line instructions visually distinct? |
O O O |
|
10.3 |
Do the instructions follow the sequence of user actions? |
O O O |
|
10.4 |
If menu choices are ambiguous, does the system provide additional explanatory information when an item is selected? |
O O O |
|
10.5 |
Are data entry screens and dialog boxes supported by navigation and completion instructions? |
O O O |
|
10.6 |
If menu items are ambiguous, does the system provide additional explanatory information when an item is selected? |
O O O |
|
10.7 |
Are there memory aids for commands, either through on-line quick reference or prompting? |
O O O |
|
10.8 |
Is the help function visible; for example, a key labeled HELP or a special menu? |
O O O |
|
10.9 |
Is the help system interface (navigation, presentation, and conversation) consistent with the navigation, presentation, and conversation interfaces of the application it supports? |
O O O |
|
10.10 |
Navigation: Is information easy to find? |
O O O |
|
10.11 |
Presentation: Is the visual layout well designed? |
O O O |
|
10.12 |
Conversation: Is the information accurate, complete, and understandable? |
O O O |
# |
Review Checklist |
Yes No N/A |
Comments |
||
10.13 |
Is the information relevant? |
O O O |
|||
10.14 |
Goal-oriented (What can I do with this program?) |
O O O |
|||
10.15 |
Descriptive (What is this thing for?) |
O O O |
|||
10.16 |
Procedural (How do I do this task?) |
O O O |
|||
10.17 |
Interpretive (Why did that happen?) |
O O O |
|||
10.18 |
Navigational (Where am I?) |
O O O |
|||
10.19 |
Is there context-sensitive help? |
O O O |
|||
10.20 |
Can the user change the level of detail available? |
O O O |
|||
10.21 |
Can users easily switch between help and their work? |
O O O |
|||
10.22 |
Is it easy to access and return from the help system? |
O O O |
|||
10.23 |
Can users resume work where they left off after accessing help? |
O O O |
The system should support, extend, supplement, or enhance the users skills, background knowledge, and expertise ----not replace them.
# |
Review Checklist |
Yes No N/A |
Comments |
11.1 |
Can users choose between iconic and text display of information? |
O O O |
|
11.2 |
Are window operations easy to learn and use? |
O O O |
|
11.3 |
If users are experts, usage is frequent, or the system has a slow response time, are there fewer screens (more information per screen)? |
O O O |
|
11.4 |
If users are novices, usage is infrequent, or the system has a fast response time, are there more screens (less information per screen)? |
O O O |
|
11.5 |
Does the system automatically color-code items, with little or no user effort? |
O O O |
|
11.6 |
If the system supports both novice and expert users, are multiple levels of detail available. |
O O O |
|
11.7 |
Are users the initiators of actions rather than the responders? |
O O O |
|
11.8 |
Does the system perform data translations for users? |
O O O |
|
11.9 |
Do field values avoid mixing alpha and numeric characters whenever possible? |
O O O |
|
11.10 |
If the system has deep (multilevel) menus, do users have the option of typing ahead? |
O O O |
|
11.12 |
When the user enters a screen or dialog box, is the cursor already positioned in the field users are most likely to need? |
O O O |
|
11.13 |
Can users move forward and backward within a field? |
O O O |
|
11.14 |
Is the method for moving the cursor to the next or previous field both simple and visible? |
O O O |
|
11.15 |
Has auto-tabbing been avoided except when fields have fixed lengths or users are experienced? |
O O O |
|
11.16 |
Do the selected input device(s) match user capabilities? |
O O O |
|
11.17 |
Are cursor keys arranged in either an inverted T (best for experts) or a cross configuration (best for novices)? |
O O O |
11.18 |
Are important keys (for example, ENTER , TAB) larger than other keys? |
O O O |
|
11.19 |
Are there enough function keys to support functionality, but not so many that scanning and finding are difficult? |
O O O |
|
11.20 |
Are function keys reserved for generic, high-frequency, important functions? |
O O O |
|
11.21 |
Are function key assignments consistent across screens, subsystems, and related products? |
O O O |
|
11.22 |
Does the system correctly anticipate and prompt for the user's probable next activity? |
O O O |
The users interactions with the system should enhance the quality of her or his work-life. The user should be treated with respect. The design should be aesthetically pleasing- with artistic as well as functional value.
# |
Review Checklist |
Yes No N/A |
Comments |
12.1 |
Is each individual icon a harmonious member of a family of icons? |
O O O |
|
12.2 |
Has excessive detail in icon design been avoided? |
O O O |
|
12.3 |
Has color been used with discretion? |
O O O |
|
12.4 |
Has the amount of required window housekeeping been kept to a minimum? |
O O O |
|
12.5 |
If users are working from hard copy, does the screen layout match the paper form? |
O O O |
|
12.6 |
Has color been used specifically to draw attention, communicate organization, indicate status changes, and establish relationships? |
O O O |
|
12.7 |
Can users turn off automatic color coding if necessary? |
O O O |
|
12.8 |
Are typing requirements minimal for question and answer interfaces? |
O O O |
|
12.9 |
Do the selected input device(s) match environmental constraints? |
O O O |
|
12.13 |
If the system uses multiple input devices, has hand and eye movement between input devices been minimized? |
O O O |
|
12.14 |
If the system supports graphical tasks, has an alternative pointing device been provided? |
O O O |
|
12.15 |
Is the numeric keypad located to the right of the alpha key area? |
O O O |
|
12.16 |
Are the most frequently used function keys in the most accessible positions? |
O O O |
|
12.17 |
Does the system complete unambiguous partial input on a data entry field? |
O O O |
The system should help the user to protect personal or private information- belonging to the user or the his/her clients.
# |
Review Checklist |
Yes No N/A |
Comments |
13.1 |
Are protected areas completely inaccessible? |
O O O |
|
13.2 |
Can protected or confidential areas be accessed with certain passwords. |
O O O |
|
13.3 |
Is this feature effective and successful. |
O O O |
System Title:__________________________ Release #: __________________________
Evaluator: __________________________ Date: __________________________
Primary Source
Making Computers-People Literate. © Copyright 1993. By Elaine Weiss ISBN: 0-471-01877-5
Secondary Source
Usability Inspection Methods. © Copyright 1994.By Jakob Nielsen and Robert Mack ISBN: 1-55542-622-0
This article is part of the Usability Toolkit.
Download the Word file: he_chklst.doc
|


?REVISIONARY
STUDIES
IN
LINDERNIA
ALLIONI
Lindernia
diffusa
(L.)
Wettst.
Det.
D.
A.
Qualls
15
June
1984
University
of
North
Carolina,Chapel
Hill
HERBARIUM
OF
THE
NEW
YDRK
BOTANICAL
GARDEN
plants
of
HO&UilCAN
jieJPUBiiIC
Lindernia
diffusa
(L.)
Wettst.
Trailing
herb,
flowers
white.
In
pasture:
v
ilia
Kella.
NEW
YORK
BOTANICAL
GARDEN
334523
Collected
by
Uro.
B.A.
Lavastre
Nov.
5,
1966
01334523
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


{% extends "www/layout.html" %} {% block title %}Domain analysis{% endblock %} {% block head %} {% endblock %} {% block header %}
Often domains are "registered" by domain registrars to drive sales when users mistype URLs.
Google Safe Browsing maintains a list of reported phishing sites and sites that host malware or other unwanted software.
Perform a WHOIS lookup for {{ domain | domain_renderer }} - this will often return information about the domain owner.
If you have any suggestions for domain-analysis tools we can include or link to we'd love to hear from you.


Welcome to Open Dynamic Robot Initiative’s code base documentation!¶
Readme¶
This repository open-dynamic-robot-initiative.github.io is the entry point for all the documentation of the repositories listed in the open-dynamic-robot-initiative Github organization.
All repositories here are open-sourced packages licensed under the BSD 3-Clause license. And under the Copyright (c) 2019-2020, New York University and Max Planck Gesellschaft. All rights reserved. Please see the license.txt
This work is done in collaboration between the Max Planck Institute for Intelligen System and the New York University
Cool Stuff¶
List of the package documentation¶
Repositories |
Doxygen Documentation |
Sphinx Documentation |
|---|---|---|
ati_ft_sensor |
||
blmc_drivers |
||
blmc_robots |
||
master_board_sdk_catkin |
||
mpi_cpp_tools |
||
robot_fingers |
||
robot_interfaces |
||
robot_properties_bolt |
||
robot_properties_solo |
||
robot_properties_teststand |
||
trifinger_simulation |
List of the unittest code coverage per projects¶
Projects |
Code coverage |
|---|---|
blmc_ei |
|
blmc_robots |
Copyrights and licensing¶
BSD 3-Clause License
Copyright (c) 2019-2020, New York University and Max Planck Gesellschaft. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.


The Ghost And The Darkness (1996) A film review by Ben Hoffman Copyright 1996 Ben Hoffman
Michael Douglas, who with Steven Reuther, is one of the producers of the film, said: "It's an incredible thriller based on events that actually took place. It recounts the struggle of a man attempting to control the environment and the dangers of a culture trying to impose itself on another. In many ways it is a reflection of what is going on today."
East Africa, about 1886. The British are trying to build a bridge to carry their rains. The product they and other countries are trying to get is ivory. Putting a large crimp in their plans are two seemingly uncanny lions who attack the workers wherever they may be and despite the traps that are laid to catch them. To the natives it seems very strange that the lions seem to know the plans of those who would kill them and they strike different areas. This is why the workers have dubbed the lions "The Ghost" and The Darkness."
The film's best asset is that it sticks as much as possible to what really happened back in 1886, Knowing this is a true account adds greatly to the enjoyment of the film as we watch bridge- builder engineer John Patterson (Val Kilmer) and wild game hunter, Remington (Michael Douglas) set out to kill the lions and get on with the job of building the bridge.
Here we have an exciting story with the kings of the animal world vs. Man, set in Africa with one hair-raising scene after another. Nothing like those two eerie lions has happened before or since according to writer William Goldman. Samuel, (John Kani, who is an actor, director and playwright) is the African contact who assists Patterson and Remington as they try to seek out the lions and destroy them.
The film is well-acted, the music (Jerry Goldsmith), is excellent and the scenes of the wildlife of Africa are beautiful.
Directed by Stephen Hopkins
Rating: 3 bytes
4 bytes = Superb 3 bytes = Too good to miss 2 bytes = Average 1 byte = Save your money
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Mihail Kogalniceanu Boulevard, no. 36-46, Bucharest, Sector 5
+40755753704
I love to work, so don't be shy and email me!


About
Design with purpose
Whether you’re an aspiring architect looking for sound advice, or merely an enthusiast scoping hot designs from around the world, there’s no wrong reason to check out the best architecture blog. Indeed, while architecture remains one of mankind’s oldest art forms, that doesn’t stop original ideas from emerging on a near daily basis.


--- layout: default title: ENTER MY WORLD ---
Fear is a product of uncertainty. Educate yourself, and you will become a person that lives without fear. This site is all for anyone in the pursuit of learning.
My name is CAL 9000 and I am just a person that enjoys learning as much as possible and experiencing life. I studied mechanical engineering and acquired my bachelor's degree. After half a year of job hunting, I am now working in the tech industry. I'm relatively new in the industry, but I was able to learn a lot so far. I was able to achieve the goal I had set out for myself since high school.
But my journey of learning doesn't end there. My need to take on challenges has put me on a path to try many different activities. In my spare time outside of work, I have picked up many hobbies and skills just to see if I could do it. I keep myself entertained by challenging myself physically and mentally. When I am resting or recovering, I read books, listen to music, or practice meditation. This site is an example of my practice with web development and writing/blogging.
I created this blog because I wanted to take on a new challenge as well as share my journey. Like myself, I know of many others that would like to get more out of life. They want to take on new challenges, become the best person they could be, or are just looking for a new challenge. However, they do not know where to begin, how to start, or even what they want to do. I want to connect with other people similar to me and share the knowledge that I have obtained so far and any other helpful information I learn in the future. This is not a teacher-student teaching experience, but peer-peer learning. Let's try to help each other to reach our goals.
Sound of Ceres - Nostalgia For Infinity
Sound of Ceres - Nostalgia For Infinity
8/10 (would listen to again)


Base class for resource managers. A resource manager acts as a container for a specific resource type (e.g.: a sf::Texture, sf::SoundBuffer).
More...
|
| | ResourceManager (const std::string &name) |
| |
| X & | get (const std::string &name) |
| |
| X & | operator[] (const std::string &name) |
| |
| void | release (const std::string &name) |
| |
| const std::string & | getName () const |
| |
|
void | pendant (const std::string &name, ResourceProvider &provider) |
| |
|
void | notPendant (const std::string &name) |
| |
|
bool | exists (const std::string &resourceName) const |
| |
|
bool | isLoaded (const std::string &resourceName) const |
| |
|
virtual void | loadFromFile (const std::string &name, const std::string &path)=0 |
| |
|
virtual void | loadFromMemory (const std::string &name, const void *data, std::size_t size)=0 |
| |
template<class X>
class zt::ResourceManager< X >
Base class for resource managers. A resource manager acts as a container for a specific resource type (e.g.: a sf::Texture, sf::SoundBuffer).
ResourceManager inherits from LoadingTarget. That means that ResourceManager is something you can load resources into. All resources in the resource manager are identified by a name that should be unique. You'll request those resources by using that name.
Resources managers also have a unique name which will help the ResourceLoader to determine to which resource manager load certain resource.


{{ currentUser.username}}
My Favorite Chow Spots
{{#if noFavorites }}
You have no favorite Chow Spots! Search for your favorite Chow Spots below!
{{else}}
| Open Now |
Vendor |
My Rating |
|
{{#each vendor in FavoritesList}}
|
{{#if isOpen vendor }}
{{else}}
{{/if}}
|
|
|
|
{{/each}}
{{/if}}


All Blogs
The Blog Title Here
Added updates to the science fiction and household categories. Added new and updated brand icons like unity, twitch, safari, pied piper, Microblog, ideal, android, and one more.Updated the existing firefox icon to reflect their new brand, and added a new firefox browser icon.
Read MoreThe Blog Title Here
Added updates to the science fiction and household categories. Added new and updated brand icons like unity, twitch, safari, pied piper, Microblog, ideal, android, and one more.Updated the existing firefox icon to reflect their new brand, and added a new firefox browser icon.
Read MoreAll Projects
The Project Title Here
Added updates to the science fiction and household categories. Added new and updated brand icons like unity, twitch, safari, pied piper, Microblog, ideal, android, and one more.Updated the existing firefox icon to reflect their new brand, and added a new firefox browser icon.
Read MoreThe Project Title Here
Added updates to the science fiction and household categories. Added new and updated brand icons like unity, twitch, safari, pied piper, Microblog, ideal, android, and one more.Updated the existing firefox icon to reflect their new brand, and added a new firefox browser icon.
Read MoreSource Code
Added updates to the science fiction and household categories. Added new and updated brand icons like unity, twitch, safari, pied piper, Microblog, ideal, android, and one more.Updated the existing firefox icon to reflect their new brand, and added a new firefox browser icon.
Github Profile


{{ template "snippets/header.html" . }} {{ if not .FeedItems }}
Start following others to see their posts here


Post a lesson
Picture Of Yourself:
Full Name
Lesson Type
Art
Dance
Music
Sport
Other
Lesson Description
Phone Number
Submit


Address
Innovative Systems Techniques, Inc.
One Gateway Center, Suite 910
Newton, MA 02458
Phone, Fax, and E-mail
Phone:<PHONE_NUMBER>
Fax:<PHONE_NUMBER>
E-mail<EMAIL_ADDRESS>Directions
From Logan Airport
Take the Massachusetts Turnpike ("Mass Pike") west to Exit 17
(Newton). After the stoplight at the end of the exit, go straight
across the intersection onto Washington
Street. You will see a pedestrian stoplight. One Gateway Center is directly to your
left (the first building on the left). Other landmarks include
Citizens Bank (on left), Pizzeria Uno (on right) and a bus stop (on right).
Parking options include:
- On-street parking spaces.
- A parking garage just beyond Applebee's Restaurant on the left.
Please note: this garage is undergoing renovation and may be
unavailable for use.
- A metered parking lot halfway around the rotary (over the Mass
Pike) on the right.
From the West
Take the Massachusetts Turnpike ("Mass Pike") east to Exit 17
(Newton). At the end of the ramp, move over to the far left lane.
At the fork, stay to the left. As you merge onto the bridge (going
back over the Mass Pike), stay in the middle lane.
Bear to the left (NOT a hard left, however, as this will take you
back onto the Mass Pike heading west) onto Washington Street.
You will see a pedestrian stoplight. One Gateway Center is directly to your
left (the first building on the left). Other landmarks include
Citizens Bank (on left), Pizzeria Uno (on right) and a bus stop (on right).
Parking options include:
- On-street parking spaces.
- A parking garage just beyond Applebee's Restaurant on the left.
Please note: this garage is undergoing renovation and may be
unavailable for use.
- A metered parking lot halfway around the rotary (over the Mass
Pike) on the right.
| Copyright © 1999 Innovative Systems Techniques, Inc.
| Updated October 31, 1999
|
| Home
| About Insyte |
| Vision On-line
| Vision Technology
| Investment Managers
| Client Spotlight
| Euro | Find Us
| E-Mail Insyte |
| Table of Contents |


public static enum WireMessage.WireSubjects extends java.lang.Enum<WireMessage.WireSubjects>
| Modifier and Type | Method and Description |
|---|---|
static WireMessage.WireSubjects |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static WireMessage.WireSubjects[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WireMessage.WireSubjects ClusterFile
public static final WireMessage.WireSubjects DeleteSubscription
public static final WireMessage.WireSubjects DeleteTopic
public static final WireMessage.WireSubjects DeleteUser
public static final WireMessage.WireSubjects ExpiredSessions
public static final WireMessage.WireSubjects GetClusterFile
public static final WireMessage.WireSubjects GetFile
public static final WireMessage.WireSubjects GetFileResponse
public static final WireMessage.WireSubjects GetMessages
public static final WireMessage.WireSubjects GetDeliveries
public static final WireMessage.WireSubjects GetSubscriptionsFile
public static final WireMessage.WireSubjects GetTopicsFile
public static final WireMessage.WireSubjects GetUsersFile
public static final WireMessage.WireSubjects GetVersions
public static final WireMessage.WireSubjects Join
public static final WireMessage.WireSubjects JoinResponse
public static final WireMessage.WireSubjects Misc
public static final WireMessage.WireSubjects NewEvent
public static final WireMessage.WireSubjects NewEventResponse
public static final WireMessage.WireSubjects NewSession
public static final WireMessage.WireSubjects NewSubscription
public static final WireMessage.WireSubjects NewTopic
public static final WireMessage.WireSubjects NewUser
public static final WireMessage.WireSubjects ShuttingDown
public static final WireMessage.WireSubjects Stop
public static final WireMessage.WireSubjects Stopping
public static final WireMessage.WireSubjects StopResponse
public static final WireMessage.WireSubjects UpdateSubscription
public static final WireMessage.WireSubjects UpdateTopic
public static final WireMessage.WireSubjects UpdateUser
public static final WireMessage.WireSubjects Versions
public static final WireMessage.WireSubjects Version
public static WireMessage.WireSubjects[] values()
for (WireMessage.WireSubjects c : WireMessage.WireSubjects.values()) System.out.println(c);
public static WireMessage.WireSubjects valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null


convlab.agent.net package¶
Submodules¶
convlab.agent.net.base module¶
convlab.agent.net.conv module¶
-
class
convlab.agent.net.conv.
ConvNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.base.Net
,torch.nn.modules.module.Module
Class for generating arbitrary sized convolutional neural network, with optional batch normalization
Assumes that a single input example is organized into a 3D tensor. The entire model consists of three parts:
- self.conv_model
- self.fc_model
- self.model_tails
e.g. net_spec “net”: {
“type”: “ConvNet”, “shared”: true, “conv_hid_layers”: [
[32, 8, 4, 0, 1], [64, 4, 2, 0, 1], [64, 3, 1, 0, 1]], “fc_hid_layers”: [512], “hid_layers_activation”: “relu”, “out_layer_activation”: “tanh”, “init_fn”: null, “normalize”: false, “batch_norm”: false, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “SmoothL1Loss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.02}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 10000, “polyak_coef”: 0.9, “gpu”: true
}
-
build_conv_layers
(conv_hid_layers)[source]¶ Builds all of the convolutional layers in the network and store in a Sequential model
-
class
convlab.agent.net.conv.
DuelingConvNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.conv.ConvNet
Class for generating arbitrary sized convolutional neural network, with optional batch normalization, and with dueling heads. Intended for Q-Learning algorithms only. Implementation based on “Dueling Network Architectures for Deep Reinforcement Learning” http://proceedings.mlr.press/v48/wangf16.pdf
Assumes that a single input example is organized into a 3D tensor. The entire model consists of three parts:
- self.conv_model
- self.fc_model
- self.model_tails
e.g. net_spec “net”: {
“type”: “DuelingConvNet”, “shared”: true, “conv_hid_layers”: [
[32, 8, 4, 0, 1], [64, 4, 2, 0, 1], [64, 3, 1, 0, 1]], “fc_hid_layers”: [512], “hid_layers_activation”: “relu”, “init_fn”: “xavier_uniform_”, “normalize”: false, “batch_norm”: false, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “SmoothL1Loss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.02}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 10000, “polyak_coef”: 0.9, “gpu”: true
}
convlab.agent.net.mlp module¶
-
class
convlab.agent.net.mlp.
DuelingMLPNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.mlp.MLPNet
Class for generating arbitrary sized feedforward neural network, with dueling heads. Intended for Q-Learning algorithms only. Implementation based on “Dueling Network Architectures for Deep Reinforcement Learning” http://proceedings.mlr.press/v48/wangf16.pdf
e.g. net_spec “net”: {
“type”: “DuelingMLPNet”, “shared”: true, “hid_layers”: [32], “hid_layers_activation”: “relu”, “init_fn”: “xavier_uniform_”, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “MSELoss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.02}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 1, “polyak_coef”: 0.9, “gpu”: true
}
-
class
convlab.agent.net.mlp.
HydraMLPNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.base.Net
,torch.nn.modules.module.Module
Class for generating arbitrary sized feedforward neural network with multiple state and action heads, and a single shared body.
e.g. net_spec “net”: {
“type”: “HydraMLPNet”, “shared”: true, “hid_layers”: [
[[32],[32]], # 2 heads with hidden layers [64], # body [] # tail, no hidden layers], “hid_layers_activation”: “relu”, “out_layer_activation”: null, “init_fn”: “xavier_uniform_”, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “MSELoss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.02}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 1, “polyak_coef”: 0.9, “gpu”: true
}
-
build_model_heads
(in_dim)[source]¶ Build each model_head. These are stored as Sequential models in model_heads
-
-
class
convlab.agent.net.mlp.
MLPNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.base.Net
,torch.nn.modules.module.Module
Class for generating arbitrary sized feedforward neural network If more than 1 output tensors, will create a self.model_tails instead of making last layer part of self.model
e.g. net_spec “net”: {
“type”: “MLPNet”, “shared”: true, “hid_layers”: [32], “hid_layers_activation”: “relu”, “out_layer_activation”: null, “init_fn”: “xavier_uniform_”, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “MSELoss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.02}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 1, “polyak_coef”: 0.9, “gpu”: true
}
convlab.agent.net.net_util module¶
-
class
convlab.agent.net.net_util.
NoOpLRScheduler
(optim)[source]¶ Bases:
object
Symbolic LRScheduler class for API consistency
-
convlab.agent.net.net_util.
build_fc_model
(dims, activation=None)[source]¶ Build a full-connected model by interleaving nn.Linear and activation_fn
-
convlab.agent.net.net_util.
dev_check_train_step
(fn)[source]¶ Decorator to check if net.train_step actually updates the network weights properly Triggers only if to_check_train_step is True (dev/test mode) @example
@net_util.dev_check_train_step def train_step(self, …):
…
-
convlab.agent.net.net_util.
get_activation_fn
(activation)[source]¶ Helper to generate activation function layers for net
-
convlab.agent.net.net_util.
get_grad_norms
(algorithm)[source]¶ Gather all the net’s grad norms of an algorithm for debugging
-
convlab.agent.net.net_util.
get_loss_fn
(cls, loss_spec)[source]¶ Helper to parse loss param and construct loss_fn for net
-
convlab.agent.net.net_util.
get_lr_scheduler
(optim, lr_scheduler_spec)[source]¶ Helper to parse lr_scheduler param and construct Pytorch optim.lr_scheduler
-
convlab.agent.net.net_util.
get_nn_name
(uncased_name)[source]¶ Helper to get the proper name in PyTorch nn given a case-insensitive name
-
convlab.agent.net.net_util.
get_optim
(net, optim_spec)[source]¶ Helper to parse optim param and construct optim for net
-
convlab.agent.net.net_util.
get_out_dim
(body, add_critic=False)[source]¶ Construct the NetClass out_dim for a body according to is_discrete, action_type, and whether to add a critic unit
-
convlab.agent.net.net_util.
get_policy_out_dim
(body)[source]¶ Helper method to construct the policy network out_dim for a body according to is_discrete, action_type
-
convlab.agent.net.net_util.
init_global_nets
(algorithm)[source]¶ Initialize global_nets for Hogwild using an identical instance of an algorithm from an isolated Session in spec.meta.distributed, specify either: - ‘shared’: global network parameter is shared all the time. In this mode, algorithm local network will be replaced directly by global_net via overriding by identify attribute name - ‘synced’: global network parameter is periodically synced to local network after each gradient push. In this mode, algorithm will keep a separate reference to global_{net} for each of its network
-
convlab.agent.net.net_util.
init_layers
(net, init_fn_name)[source]¶ Primary method to initialize the weights of the layers of a network
-
convlab.agent.net.net_util.
init_params
(module, init_fn)[source]¶ Initialize module’s weights using init_fn, and biases to 0.0
-
convlab.agent.net.net_util.
load
(net, model_path)[source]¶ Save model weights from a path into a net module
-
convlab.agent.net.net_util.
polyak_update
(src_net, tar_net, old_ratio=0.5)[source]¶ Polyak weight update to update a target tar_net, retain old weights by its ratio, i.e. target <- old_ratio * source + (1 - old_ratio) * target
-
convlab.agent.net.net_util.
push_global_grads
(net, global_net)[source]¶ Push gradients to global_net, call inside train_step between loss.backward() and optim.step()
-
convlab.agent.net.net_util.
save_algorithm
(algorithm, ckpt=None)[source]¶ Save all the nets for an algorithm
convlab.agent.net.recurrent module¶
-
class
convlab.agent.net.recurrent.
RecurrentNet
(net_spec, in_dim, out_dim)[source]¶ Bases:
convlab.agent.net.base.Net
,torch.nn.modules.module.Module
Class for generating arbitrary sized recurrent neural networks which take a sequence of states as input.
Assumes that a single input example is organized into a 3D tensor batch_size x seq_len x state_dim The entire model consists of three parts:
- self.fc_model (state processing)
- self.rnn_model
- self.model_tails
e.g. net_spec “net”: {
“type”: “RecurrentNet”, “shared”: true, “cell_type”: “GRU”, “fc_hid_layers”: [], “hid_layers_activation”: “relu”, “out_layer_activation”: null, “rnn_hidden_size”: 32, “rnn_num_layers”: 1, “bidirectional”: False, “seq_len”: 4, “init_fn”: “xavier_uniform_”, “clip_grad_val”: 1.0, “loss_spec”: {
“name”: “MSELoss”}, “optim_spec”: {
“name”: “Adam”, “lr”: 0.01}, “lr_scheduler_spec”: {
“name”: “StepLR”, “step_size”: 30, “gamma”: 0.1}, “update_type”: “replace”, “update_frequency”: 1, “polyak_coef”: 0.9, “gpu”: true
}
Module contents¶
The nets module Contains classes of neural network architectures


DOM and Website Interactivity Review
User Name:
Stock:
Microsoft (MSFT)
Google (GOOGL)
Tesla (TSLA)
Go!
Selected Stock:
TODO


ProjectA07
Dashboard
Register
Back
Next
{{user.username}}
Profile
Settings
Logout
Select Course List
Name : Rusheel Koushik
Roll Number : 201601074
Year : 3
Semester : 1
Audit Course
Check Availability
Add Course
Drop Course
Select Courses
{% csrf_token %} {{ form.data }}
Course Id
Course Name
{% for set in querysets %}
{{ set.academic_course_id }}
{{ set.academic_course_name }}
Details
{% endfor %}
Previous
1
2
3
Next
Courses To be Completed
#
Course Type
Number of Courses
IT Electives
3
Details
Save Courselist
Submit


🎵
M
o
o
d
y
🎵
M
u
s
i
c
🎵
Home 🏡
About 📋
Music History 📜
🎵 Select an Emotion for a Song! 🎵
😁 Super Elated 😁
😢 Not Having the Best Day 😢
🥳 Ready to Party! 🥳
🧘 Study/Meditation 🧘
🤔 Nostalgic 🤔
🎄 Feeling Festive 🎄


Mental Health Hacks was a hackathon that transformed creative media into real, concrete outputs to tell mental health stories, build resources and concepts, and more. Online and transformative, over 100 participants signed up to be a part of building a mental health story.
In the Mental Health Hacks showcase, anyone is free to view the collection of works and stories behind the event. Let these works last and touch; a reminder of the stories that we had all convened to tell.
To ensure that all participants work within the same 72 hour time frame, which took place from June 16 to June 18, participants were garnered until a certain time, where we then closed applications. An hour prior to the beginning of the 72 hour cycle, a randomized mental health topic was sent to each participant — ranging from narcissism, teenagers, PTSD, to family issues. Works done during the duration are to relate to or be about the given topic.
Prior to and during the event, we gave the participants access to several resources given by our partners, that could help them understand and express topics concerning mental health in a well-informed and positive manner, as well as serve as reading materials for people to better understand mental health as a whole.


DBUtils User's Guide
- Version:
- 3.0.3
- Translations:
English | German
Synopsis
DBUtils is a suite of Python modules allowing to connect in a safe and efficient way between a threaded Python application and a database.
DBUtils has been originally written particularly for Webware for Python as the application and PyGreSQL as the adapter to a PostgreSQL database, but it can meanwhile be used for any other Python application and DB-API 2 conformant database adapter.
Modules
The DBUtils suite is realized as a Python package containing two subsets of modules, one for use with arbitrary DB-API 2 modules, the other one for use with the classic PyGreSQL module.
Universal DB-API 2 variant |
|
|---|---|
steady_db |
Hardened DB-API 2 connections |
pooled_db |
Pooling for DB-API 2 connections |
persistent_db |
Persistent DB-API 2 connections |
simple_pooled_db |
Simple pooling for DB-API 2 |
Classic PyGreSQL variant |
|
|---|---|
steady_pg |
Hardened classic PyGreSQL connections |
pooled_pg |
Pooling for classic PyGreSQL connections |
persistent_pg |
Persistent classic PyGreSQL connections |
simple_pooled_pg |
Simple pooling for classic PyGreSQL |
The dependencies of the modules in the universal DB-API 2 variant are as indicated in the following diagram:
The dependencies of the modules in the classic PyGreSQL variant are similar:
Download
You can download the actual version of DBUtils from the Python Package Index at:
https://pypi.python.org/pypi/DBUtils
The source code repository can be found here on GitHub:
https://github.com/WebwareForPython/DBUtils
Installation
Installation
The package can be installed in the usual way:
python setup.py install
It is even easier to download and install the package in one go using pip:
pip install DBUtils
Requirements
DBUtils supports Python versions 3.6 to 3.11.
The modules in the classic PyGreSQL variant need PyGreSQL version 4.0 or above, while the modules in the universal DB-API 2 variant run with any Python DB-API 2 compliant database interface module.
Functionality
This section will refer to the names in the DB-API 2 variant only, but the same applies to the classic PyGreSQL variant.
DBUtils installs itself as a package dbutils containing all the modules that are described in this guide. Each of these modules contains essentially one class with an analogous name that provides the corresponding functionality. For instance, the module dbutils.pooled_db contains the class PooledDB.
SimplePooledDB (simple_pooled_db)
The class SimplePooledDB in dbutils.simple_pooled_db is a very basic reference implementation of a pooled database connection. It is much less sophisticated than the regular pooled_db module and is particularly lacking the failover functionality. dbutils.simple_pooled_db is essentially the same as the MiscUtils.DBPool module that is part of Webware for Python. You should consider it a demonstration of concept rather than something that should go into production.
SteadyDBConnection (steady_db)
The class SteadyDBConnection in the module dbutils.steady_db implements "hardened" connections to a database, based on ordinary connections made by any DB-API 2 database module. A "hardened" connection will transparently reopen upon access when it has been closed or the database connection has been lost or when it is used more often than an optional usage limit.
A typical example where this is needed is when the database has been restarted while your application is still running and has open connections to the database, or when your application accesses a remote database in a network that is separated by a firewall and the firewall has been restarted and lost its state.
Usually, you will not use the steady_db module directly; it merely serves as a basis for the next two modules, persistent_db and Pooled_db.
PersistentDB (persistent_db)
The class PersistentDB in the module dbutils.persistent_db implements steady, thread-affine, persistent connections to a database, using any DB-API 2 database module. "Thread-affine" and "persistent" means that the individual database connections stay assigned to the respective threads and will not be closed during the lifetime of the threads.
The following diagram shows the connection layers involved when you are using persistent_db connections:
Whenever a thread opens a database connection for the first time, a new connection to the database will be opened that will be used from now on for this specific thread. When the thread closes the database connection, it will still be kept open so that the next time when a connection is requested by the same thread, this already opened connection can be used. The connection will be closed automatically when the thread dies.
In short: persistent_db tries to recycle database connections to increase the overall database access performance of your threaded application, but it makes sure that connections are never shared between threads.
Therefore, persistent_db will work perfectly even if the underlying DB-API module is not thread-safe at the connection level, and it will avoid problems when other threads change the database session or perform transactions spreading over more than one SQL command.
PooledDB (pooled_db)
The class PooledDB in the module dbutils.pooled_db implements a pool of steady, thread-safe cached connections to a database which are transparently reused, using any DB-API 2 database module.
The following diagram shows the connection layers involved when you are using pooled_db connections:
As the diagram indicates, pooled_db can share opened database connections between different threads. This will happen by default if you set up the connection pool with a positive value of maxshared and the underlying DB-API 2 is thread-safe at the connection level, but you can also request dedicated database connections that will not be shared between threads. Besides the pool of shared connections, you can also set up a pool of at least mincached and at the most maxcached idle connections that will be used whenever a thread is requesting a dedicated database connection or the pool of shared connections is not yet full. When a thread closes a connection that is not shared anymore, it is returned back to the pool of idle connections so that it can be recycled again.
If the underlying DB-API module is not thread-safe, thread locks will be used to ensure that the pooled_db connections are thread-safe. So you don't need to worry about that, but you should be careful to use dedicated connections whenever you change the database session or perform transactions spreading over more than one SQL command.
Which one to use?
Both persistent_db and pooled_db serve the same purpose to improve the database access performance by recycling database connections, while preserving stability even if database connection will be disrupted.
So which of these two modules should you use? From the above explanations it is clear that persistent_db will make more sense if your application keeps a constant number of threads which frequently use the database. In this case, you will always have the same amount of open database connections. However, if your application frequently starts and ends threads, then it will be better to use pooled_db. The latter will also allow more fine-tuning, particularly if you are using a thread-safe DB-API 2 module.
Since the interface of both modules is similar, you can easily switch from one to the other and check which one will suit better.
Usage
The usage of all the modules is similar, but there are also some differences in the initialization between the "Pooled" and "Persistent" variants and also between the universal DB-API 2 and the classic PyGreSQL variants.
We will cover here only the persistent_db module and the more complex pooled_db module. For the details of the other modules, have a look at their module docstrings. Using the Python interpreter console, you can display the documentation of the pooled_db module as follows (this works analogously for the other modules):
help(pooled_db)
PersistentDB (persistent_db)
In order to make use of the persistent_db module, you first need to set up a generator for your kind of database connections by creating an instance of persistent_db, passing the following parameters:
creator: either an arbitrary function returning new DB-API 2 connection objects or a DB-API 2 compliant database module
maxusage: the maximum number of reuses of a single connection (the default of 0 or None means unlimited reuse)
Whenever the limit is reached, the connection will be reset.
setsession: an optional list of SQL commands that may serve to prepare the session, e.g. ["set datestyle to german", ...]
failures: an optional exception class or a tuple of exception classes for which the connection failover mechanism shall be applied, if the default (OperationalError, InterfaceError, InternalError) is not adequate for the used database module
ping: an optional flag controlling when connections are checked with the ping() method if such a method is available (0 = None = never, 1 = default = whenever it is requested, 2 = when a cursor is created, 4 = when a query is executed, 7 = always, and all other bit combinations of these values)
closeable: if this is set to true, then closing connections will be allowed, but by default this will be silently ignored
threadlocal: an optional class for representing thread-local data that will be used instead of our Python implementation (threading.local is faster, but cannot be used in all cases)
The creator function or the connect function of the DB-API 2 compliant database module specified as the creator will receive any additional parameters such as the host, database, user, password etc. You may choose some or all of these parameters in your own creator function, allowing for sophisticated failover and load-balancing mechanisms.
For instance, if you are using pgdb as your DB-API 2 database module and want every connection to your local database mydb to be reused 1000 times:
import pgdb # import used DB-API 2 module from dbutils.persistent_db import PersistentDB persist = PersistentDB(pgdb, 1000, database='mydb')
Once you have set up the generator with these parameters, you can request database connections of that kind:
db = persist.connection()
You can use these connections just as if they were ordinary DB-API 2 connections. Actually what you get is the hardened steady_db version of the underlying DB-API 2 connection.
Closing a persistent connection with db.close() will be silently ignored since it would be reopened at the next usage anyway and contrary to the intent of having persistent connections. Instead, the connection will be automatically closed when the thread dies. You can change this behavior by setting the closeable parameter.
Note that you need to explicitly start transactions by calling the begin() method. This ensures that the transparent reopening will be suspended until the end of the transaction, and that the connection will be rolled back before being reused by the same thread.
By setting the threadlocal parameter to threading.local, getting connections may become a bit faster, but this may not work in all environments (for instance, mod_wsgi is known to cause problems since it clears the threading.local data between requests).
PooledDB (pooled_db)
In order to make use of the pooled_db module, you first need to set up the database connection pool by creating an instance of pooled_db, passing the following parameters:
creator: either an arbitrary function returning new DB-API 2 connection objects or a DB-API 2 compliant database module
mincached : the initial number of idle connections in the pool (the default of 0 means no connections are made at startup)
maxcached: the maximum number of idle connections in the pool (the default value of 0 or None means unlimited pool size)
maxshared: maximum number of shared connections allowed (the default value of 0 or None means all connections are dedicated)
When this maximum number is reached, connections are shared if they have been requested as shareable.
maxconnections: maximum number of connections generally allowed (the default value of 0 or None means any number of connections)
blocking: determines behavior when exceeding the maximum
If this is set to true, block and wait until the number of connections decreases, but by default an error will be reported.
maxusage: maximum number of reuses of a single connection (the default of 0 or None means unlimited reuse)
When this maximum usage number of the connection is reached, the connection is automatically reset (closed and reopened).
setsession: an optional list of SQL commands that may serve to prepare the session, e.g. ["set datestyle to german", ...]
reset: how connections should be reset when returned to the pool (False or None to rollback transactions started with begin(), the default value True always issues a rollback for safety's sake)
failures: an optional exception class or a tuple of exception classes for which the connection failover mechanism shall be applied, if the default (OperationalError, InterfaceError, InternalError) is not adequate for the used database module
ping: an optional flag controlling when connections are checked with the ping() method if such a method is available (0 = None = never, 1 = default = whenever fetched from the pool, 2 = when a cursor is created, 4 = when a query is executed, 7 = always, and all other bit combinations of these values)
The creator function or the connect function of the DB-API 2 compliant database module specified as the creator will receive any additional parameters such as the host, database, user, password etc. You may choose some or all of these parameters in your own creator function, allowing for sophisticated failover and load-balancing mechanisms.
For instance, if you are using pgdb as your DB-API 2 database module and want a pool of at least five connections to your local database mydb:
import pgdb # import used DB-API 2 module from dbutils.pooled_db import PooledDB pool = PooledDB(pgdb, 5, database='mydb')
Once you have set up the connection pool you can request database connections from that pool:
db = pool.connection()
You can use these connections just as if they were ordinary DB-API 2 connections. Actually what you get is the hardened steady_db version of the underlying DB-API 2 connection.
Please note that the connection may be shared with other threads by default if you set a non-zero maxshared parameter and the DB-API 2 module allows this. If you want to have a dedicated connection, use:
db = pool.connection(shareable=False)
Instead of this, you can also get a dedicated connection as follows:
db = pool.dedicated_connection()
If you don't need it anymore, you should immediately return it to the pool with db.close(). You can get another connection in the same way.
Warning: In a threaded environment, never do the following:
pool.connection().cursor().execute(...)
This would release the connection too early for reuse which may be fatal if the connections are not thread-safe. Make sure that the connection object stays alive as long as you are using it, like that:
db = pool.connection() cur = db.cursor() cur.execute(...) res = cur.fetchone() cur.close() # or del cur db.close() # or del db
You can also use context managers for simpler code:
with pool.connection() as db: with db.cursor() as cur: cur.execute(...) res = cur.fetchone()
Note that you need to explicitly start transactions by calling the begin() method. This ensures that the connection will not be shared with other threads, that the transparent reopening will be suspended until the end of the transaction, and that the connection will be rolled back before being given back to the connection pool.
Advanced Usage
Sometimes you may want to prepare connections before they are used by DBUtils, in ways that are not possible by just using the right parameters. For instance, pyodbc may require to configure connections by calling the setencoding() method of the connection. You can do this by passing a modified connect() function to PersistentDB or PooledDB as creator (the first argument), like this:
from pyodbc import connect from dbutils.pooled_db import PooledDB def creator(): con = connect(...) con.setdecoding(...) return con creator.dbapi = pyodbc db_pool = PooledDB(creator, mincached=5)
Notes
If you are using one of the popular object-relational mappers SQLObject or SQLAlchemy, you won't need DBUtils, since they come with their own connection pools. SQLObject 2 (SQL-API) is actually borrowing some code from DBUtils to split the pooling out into a separate layer.
Also note that when you are using a solution like the Apache webserver with mod_python or mod_wsgi, then your Python code will be usually run in the context of the webserver's child processes. So if you are using the pooled_db module, and several of these child processes are running, you will have as much database connection pools. If these processes are running many threads, this may still be a reasonable approach, but if these processes don't spawn more than one worker thread, as in the case of Apache's "prefork" multi-processing module, this approach does not make sense. If you're running such a configuration, you should resort to a middleware for connection pooling that supports multi-processing, such as pgpool or pgbouncer for the PostgreSQL database.
Future
Some ideas for future improvements:
Alternatively to the maximum number of uses of a connection, implement a maximum time to live for connections.
Create modules monitor_db and monitor_pg that will run in a separate thread, monitoring the pool of the idle connections and maybe also the shared connections respectively the thread-affine connections. If a disrupted connection is detected, then it will be reestablished automatically by the monitoring thread. This will be useful in a scenario where a database powering a website is restarted during the night. Without the monitoring thread, the users would experience a slight delay in the next morning, because only then, the disrupted database connections will be detected and the pool will be rebuilt. With the monitoring thread, this will already happen during the night, shortly after the disruption. The monitoring thread could also be configured to generally recreate the connection pool every day shortly before the users arrive.
Optionally log usage, bad connections and exceeding of limits.
Bug reports and feedback
You can transmit bug reports, patches and feedback by creating issues or pull requests on the GitHub project page for DBUtils.
Links
Some links to related and alternative software:
Webware for Python framework
Python DB-API 2
PostgreSQL database
PyGreSQL Python adapter for PostgreSQL
pgpool middleware for PostgreSQL connection pooling
pgbouncer lightweight PostgreSQL connection pooling
SQLObject object-relational mapper
SQLAlchemy object-relational mapper
Credits
- Author:
- Contributions:
DBUtils uses code, input and suggestions made by Ian Bicking, Chuck Esterbrook (Webware for Python), Dan Green (DBTools), Jay Love, Michael Palmer, Tom Schwaller, Geoffrey Talvola, Warren Smith (DbConnectionPool), Ezio Vernacotola, Jehiah Czebotar, Matthew Harriger, Gregory Piñero and Josef van Eenbergen.
Copyright and License
Copyright © 2005-2023 by Christoph Zwerschke. All Rights Reserved.
DBUtils is free and open source software, licensed under the MIT license.


| |
| S.No |
Title / Authors |
Download |
| 1 |
Effect Of Yogic Practices On Inspiratory Reserve Volume And Anxiety Among Middle Aged Men
Elumalai & Dr. K. Venkatachalapathy |
|
| 2 |
Effect of yogic packages on selected bio-chemical variables among volleyball players
Jelastin d.


click here
fish shope
sign in
Contact
About
locations
we located in seattle, dubai, paris, lima and tokyo
hours
we open from 7am - 7pm


Cookbook/Callbacks
(contributed by Morgan Stanley)
Contents |
Callbacks in q
The construct of an asynchronous remote call with callback is not built into interprocess communication (IPC) syntax in q, but it is not difficult to implement. We explain here how to do this with simple examples that are easily generalized.
To begin, we establish the following environment and terminology. A client process wishes to make an async call to a q function proc on a separate q process, the server, listening on some port, say 5042. In our examples, we assume that the following utility functions are on both the client and the server:
q)echo:{0N!x;} q)add:{echo x+y}
The echo utility uses 0N! to force its operand to the console (i.e., stdout) and then sinks its result to avoid duplicate display in some circumstances.
Overview
Callback implementation is straightforward if you understand basic IPC in q (See Q for Mortals - IPC). Here are some points to keep in mind.
First, be sure to employ async calls on both the client and the server; otherwise, a deadlock can ensue. For example, due to the single-threaded nature of q, if the client makes a synch call, the attempt to call back to the client from the server function blocks because the original synch call is still being processed and will consequently wait forever. Recall that an async call uses (neg h) where h is an open connection handle.
Second, it is safest to make remote calls with the IPC form that calls a function by name. One such approach is,
q)(neg h) (`proc; arg1;..;argn ; `callback)
Here `proc is a symbol representing the name of the "remote" function to be called, arg1 , ... , argn are the data arguments to be passed to the remote calculation and `callback is a symbol containing the name of the client function for proc to call back. If the remote function is niladic, pass :: as its argument.
Next, ensure that the "remote" function on the server is expecting the name of the callback routine as one of its arguments. For example, a call of the form given in the previous paragraph assumes that proc has the signature,
q)proc:{[arg1; ;argn ; callname] }
Finally, in the remote function obtain the open handle of the calling process from the system variable .z.w . Use this link back to the caller to invoke the callback function.
Example 1
In the simplest case, the client makes an asynchronous call to a monadic "remote" function on the server, passing the name of a monadic function in its workspace for the remote function to call once it completes. For those who know about such things, the callback represents a continuation for the remote function.
Define proc on the server as,
q)proc:{echo x; h:.z.w; (neg h) (y; 43)}
In this case, the data for proc is passed in the implicit parameter x and the callback function name is passed in the implicit parameter y . Here the expression echo x stands for the actual calculations performed on the server.
Now execute the following on the client. (Note that the sample communication handle assumes that the server process is listening on port 5042 on the same machine as the client. Substitute your actual values.)
q)h:hopen `::5042 q)(neg h) (`proc; 42; `echo) ... q)hclose h
This says make an async call to the remote function proc , passing it the argument 42 and the symbol `echo representing the name of the callback function.
The result is that 42 is displayed on the server and then 43 is displayed on the client.
Example 2
If you need to call a remote function that has more than two data parameters, you cannot use implicit parameters on the server as above. You can either define explicit parameters or encapsulate the arguments in a list. We show the latter here.
Define the following on the server,
q)add3:{x+y+z} q)proc3:{ echo r:add3 . x; (neg .z.w) (y; r)}
Here the data for proc3 is passed as a list in the implicit parameter x , while the callback function name is passed as y . Note the use of . to evaluate a multi-valent function on a list of arguments.
Now execute the following on the client.
q)(neg h) (`proc3; 1 2 3; `echo)
This expression makes an async call to the remote function proc3 , passing it the list argument 1 2 3 and the symbol `echo representing the name of the callback function.
The result is that 6 is displayed on the server and then 6 is displayed on the client.
Example 3
An arbitrary function on the server will not have the appropriate signature to accept a callback. We show here a simple wrapper function that permits any reasonable multivalent function to be called asynchronously with its result returned to the caller.
Define the following on the server,
q)add3:{x+y+z} q)marshal:{(neg .z.w) (z; (value x) . y)}
Here the function marshal expects the name of a multivalent function in the first parameter, an argument list for the wrapped function in the second argument and the name of the callback function used to pass back the result in the third argument.
Now execute the following on the client,
q)(neg h) (`marshal; `add3; 1 2 3; `echo)
This expression makes an async call to the remote function marshal , asking it to invoke the remote function add3 with list argument 1 2 3 and to pass the result back to echo .
The result is that the list is summed on the server and then 6 is displayed on the client.
Example 4
It is also possible to send a function to be executed remotely on the server using an alternate form of IPC. In this case, nothing needs to be defined on the server in advance. Here we show an example sending an anonymous function that returns its value to the client. Note: give careful consideration before allowing this style IPC in a production environment as a client can bring down an unprotected server.
Execute the following on the client,
q)(neg h) ({(neg .z.w) (z; x*y)}; 6; 7; `echo)
This expression makes an async call sending: a function that multiplies two arguments and returns the result with a callback; the arguments 6 and 7; and the name of echo for the callback.
The result is that 6 and 7 are multiplied on the server and then 42 is displayed on the client.


Success!
You've set it up. Give /done a try from anywhere in Slack.
Would you please help us spread the love?