Spoooky.Blueprints = {
/**
* Blueprints for the game of amazons
*/
AMAZONS : {
entities : {
white_queen: {
entityType : "White Queen",
typeID : "AA",
associatedWithMetaAgent : null,
representation : { type : "image", texture : "assets/white_queen.png" },
// Moves of the entity
moves : [{
name : "north",
type : "Default",
direction : "north",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
// Implement ability to fire an arrow after executed move
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "northeast",
type : "Default",
direction : "northeast",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "east",
type : "Default",
direction : "east",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "southeast",
type : "Default",
direction : "southeast",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "south",
type : "Default",
direction : "south",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "southwest",
type : "Default",
direction : "southwest",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "west",
type : "Default",
direction : "west",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "northwest",
type : "Default",
direction : "northwest",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}]
},
black_queen: {
entityType : "Black Queen",
typeID : "BA",
associatedWithMetaAgent : null,
// Visualization of the entity
representation : { type : "image", texture : "assets/black_queen.png" },
// Moves of the entity
moves : [{
name : "north",
type : "Default",
direction : "north",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "northeast",
type : "Default",
direction : "northeast",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "east",
type : "Default",
direction : "east",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "southeast",
type : "Default",
direction : "southeast",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "south",
type : "Default",
direction : "south",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "southwest",
type : "Default",
direction : "southwest",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "west",
type : "Default",
direction : "west",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}, {
name : "northwest",
type : "Default",
direction : "northwest",
frequency : "ANY",
conditions : [{ condition : "Is Empty", state : true }],
postMove : [{
jobName: "Enable Second Move",
jobFunction: "Prevent Player Change"
}, {
jobName: "Enable Firing Of One Arrow",
jobFunction: "Change Game Mode",
jobArguments: { mode: "PLACING" }
}]
}]
},
// An arrow is a simple, non-movable entity to block fields
// and can be placed on fields which are reachable by the
// recently moved entity
white_arrow: {
entityType : "Arrow",
typeID : "AX",
associatedWithMetaAgent : null,
representation : { type : "image", texture : "assets/white_block.png" },
mode : "PLACE",
placeTo : "REACHABLE BY RECENTLY MOVED ENTITY"
},
black_arrow: {
entityType : "Arrow",
typeID : "BX",
associatedWithMetaAgent : null,
representation : { type : "image", texture : "assets/black_block.png" },
mode : "PLACE",
placeTo : "REACHABLE BY RECENTLY MOVED ENTITY"
}
}
}
};


Categorized into 7 years aging and 3 years aging after careful blending by Blend Master with carefully selected essences imported.
Using fractionally distilled ethanol at Kanbalu Sugar Mill and aging in gmelina wood barrels kept in well ventilated cellar where the temperature is regulated with electronic temperature controllers to ensure consistent flavor.
Internationally quality recognized premium alcoholic spirits awarded 1 Gold Medal and 9 Silver Medals in Monde (World) Selections based in Brussels, Belgium from 2012 to 2016.


|
Helix
|
#include <TableCol.h>
Public Member Functions | |
| TableCol () | |
| Any Child Vectors will be defined here. More... | |
| TableCol (const TableCol &c) | |
| Standard Copy Constructor. More... | |
| TableCol & | operator= (const TableCol &c) |
| Standard Assignment Operator. More... | |
| virtual | ~TableCol () |
| Standard Destructor. More... | |
| TableCol & | init () |
| Initialize this data object to have all empty or 0 values. More... | |
| TableCol & | checkSize () |
| Call check_size() on all of our twine members. More... | |
| TableCol (xmlNodePtr node) | |
| Construct from an XML Node. More... | |
| TableCol & | readXmlNode (xmlNodePtr node) |
| Read an XML Node to set our contents. More... | |
| xmlNodePtr | createXmlNode (xmlNodePtr parent) const |
| Create an XML Node as a child of the given parent. More... | |
| xmlDocPtr | createXmlDoc () const |
| Create an XML Document from this data object. More... | |
Static Public Member Functions | |
| static vector< TableCol * > * | readXmlChildren (xmlNodePtr parent) |
| Create a series of these objects by reading all children of the given parent. More... | |
| static void | createXmlChildren (xmlNodePtr parent, vector< TableCol * > *vect) |
| Create a series of xml child nodes based on the input vector. More... | |
| static void | deleteVector (vector< TableCol * > *vect) |
| Handle deleting a vector and its contents. More... | |
| static twine & | Name () |
| Static method to retrieve the name of this object. More... | |
| static void | insert (SqlDB &sqldb, TableCol &obj) |
| static void | insert (SqlDB &sqldb, twine &stmt, bool useInputs, TableCol &obj) |
| static void | insert (SqlDB &sqldb, vector< TableCol * > *v) |
| static twine | insert_prepSQL (IOConn &ioc, TableCol &obj) |
| static twine | insert_getSQL () |
| static void | update (SqlDB &sqldb, twine &ColName, twine &ColType, twine &guid) |
| static void | update (SqlDB &sqldb, twine &stmt, bool useInputs, twine &ColName, twine &ColType, twine &guid) |
| static twine | update_prepSQL (IOConn &ioc, twine &ColName, twine &ColType, twine &guid) |
| static twine | update_getSQL () |
| static void | deleteByID (SqlDB &sqldb, twine &guid) |
| static void | deleteByID (SqlDB &sqldb, twine &stmt, bool useInputs, twine &guid) |
| static twine | deleteByID_prepSQL (IOConn &ioc, twine &guid) |
| static twine | deleteByID_getSQL () |
| static void | deleteByTable (SqlDB &sqldb, twine &projtableguid) |
| static void | deleteByTable (SqlDB &sqldb, twine &stmt, bool useInputs, twine &projtableguid) |
| static twine | deleteByTable_prepSQL (IOConn &ioc, twine &projtableguid) |
| static twine | deleteByTable_getSQL () |
| static vector< TableCol * > * | selectAllForTable (SqlDB &sqldb) |
| static vector< TableCol * > * | selectAllForTable (SqlDB &sqldb, twine &stmt, bool useInputs) |
| static twine | selectAllForTable_prepSQL (IOConn &ioc) |
| static twine | selectAllForTable_getSQL () |
Public Attributes | |
| twine | ColName |
| All Data Members are public. More... | |
| twine | ColType |
| twine | guid |
| twine | projtableguid |
This is a generated data object class that is used for interfacing with a database. This class was generated based on the settings in the file: ../logic/dev/TableCol.sql.xml
| TableCol::TableCol | ( | ) |
Any Child Vectors will be defined here.
Standard Constructor
| TableCol::TableCol | ( | const TableCol & | c | ) |
Standard Copy Constructor.
|
virtual |
Standard Destructor.
| TableCol::TableCol | ( | xmlNodePtr | node | ) |
Construct from an XML Node.
| TableCol & TableCol::checkSize | ( | ) |
Call check_size() on all of our twine members.
|
static |
Create a series of xml child nodes based on the input vector.
| xmlDocPtr TableCol::createXmlDoc | ( | ) | const |
Create an XML Document from this data object.
| xmlNodePtr TableCol::createXmlNode | ( | xmlNodePtr | parent | ) | const |
Create an XML Node as a child of the given parent.
|
static |
This is an DELETE method. It is designed to run a single delete statement and return. If something goes wrong, we will throw AnException.
Developer Comments:
This removes a table column by guid
Sql Statement:
delete from projcol where guid = ?
|
static |
This one matches the above in functionality, but allows you to pass in the sql statement and a flag to indicate whether the input parameters will be used.
|
inlinestatic |
This method returns the sql statement that is used by the above functions.
|
static |
This method will do a replacement of all of the parameter markers in the sql statement with the standard parameter list that is defined. This is useful for automatically prepping a SQL statement that doesn't work with parameter markers.
|
static |
This is an DELETE method. It is designed to run a single delete statement and return. If something goes wrong, we will throw AnException.
Developer Comments:
This removes all columns for a given table
Sql Statement:
delete from projcol where projtableguid = ?
|
static |
This one matches the above in functionality, but allows you to pass in the sql statement and a flag to indicate whether the input parameters will be used.
|
inlinestatic |
This method returns the sql statement that is used by the above functions.
|
static |
This method will do a replacement of all of the parameter markers in the sql statement with the standard parameter list that is defined. This is useful for automatically prepping a SQL statement that doesn't work with parameter markers.
|
static |
Handle deleting a vector and its contents.
| TableCol & TableCol::init | ( | ) |
Initialize this data object to have all empty or 0 values.
This is an INSERT method. It is designed to run a single insert statement and return. If something goes wrong, we will throw AnException.
Developer Comments:
This adds a new table column entry to our database
Sql Statement:
insert into projcol (guid, projtableguid, ColName, ColType ) values ( ?, ?, ?, ? )
This one matches the above in functionality, but allows you to pass in the sql statement and a flag to indicate whether the input parameters will be used.
This version of the method allows you to pass in a vector of objects to be inserted, and we will ensure that all of them are inserted within a single commit block within Sqlite.
|
inlinestatic |
This method returns the sql statement that is used by the above functions.
This method will do a replacement of all of the parameter markers in the sql statement with the standard parameter list that is defined. This is useful for automatically prepping a SQL statement that doesn't work with parameter markers.
|
static |
Static method to retrieve the name of this object.
|
static |
Create a series of these objects by reading all children of the given parent.
| TableCol & TableCol::readXmlNode | ( | xmlNodePtr | node | ) |
Read an XML Node to set our contents.
This is a SELECTTODO method. It is designed to run a single select statement and create a vector of data objects that represent the result set. This method returns the resulting vector of data objects. If something goes wrong, we will throw a SQLException.
Developer Comments:
This selects all columns for a given table
Sql Statement:
select guid, projtableguid, ColName, ColType from projcol
DataObject Attributes Used:
|
static |
This one matches the above in functionality, but allows you to pass in the sql statement and a flag to indicate whether the input parameters will be used.
|
inlinestatic |
This method returns the sql statement that is used by the above functions.
|
static |
This method will do a replacement of all of the parameter markers in the sql statement with the standard parameter list that is defined. This is useful for automatically prepping a SQL statement that doesn't work with parameter markers.
|
static |
This is an UPDATE method. It is designed to run a single update statement and return. If something goes wrong, we will throw AnException.
Developer Comments:
This updates the settings for a given table column in the database
Sql Statement:
update projcol set ColName = ?, ColType= ? where guid = ?
|
static |
This one matches the above in functionality, but allows you to pass in the sql statement and a flag to indicate whether the input parameters will be used.
|
inlinestatic |
This method returns the sql statement that is used by the above functions.
|
static |
This method will do a replacement of all of the parameter markers in the sql statement with the standard parameter list that is defined. This is useful for automatically prepping a SQL statement that doesn't work with parameter markers.
| twine Helix::Logic::dev::TableCol::ColName |
All Data Members are public.
| twine Helix::Logic::dev::TableCol::ColType |
| twine Helix::Logic::dev::TableCol::guid |
| twine Helix::Logic::dev::TableCol::projtableguid |


Module dynamixel-motor
Library for Dynamixel motors.
This library allows to manipulate devices that use Dynamixel
protocol, such as AX-12 robotic servo motors.
For basic manipulation, it is enough to use the rotate_to_angle and spin functions,
and perhaps set the set.torque_enable. For more sophisticated tasks, the full
Dynamixel functionality is available trough getter and setter functions.
When available, each connected motor will be published
as a device in torobio.devices table, named
(for example) 'ax12:1', labeled as module 'ax'. Aditionally, an 'ax:all'
device will represent the broadcast wide motor. Also, 'ax:sync' motors can be used to
control several motors at the same time. Notice you can not read from broadcast nor sync
motors, only send commands to them.
Some of the setable parameters set are located on the motors EEPROM (marked "persist"),
and others are on RAM (marked "volatile"). The attributes stored in RAM are reset when the
motor is powered down.
For defaut values, check the Dynamixel documentation.
Usage:
local toribio = require 'toribio'
local motor = toribio.wait_for_device('ax12:1')
motor.set.led(true)
Functions
-
ping ()
-
Ping the motor.
Only available for single motors, not sync nor broadcast.
Returns:
a dynamixel error code
-
reset_factory_default ()
-
Reset configuration to factory default.
Use with care, as it also resets the ID number and baud rate.
For factory defaults, check Dynamixal documentation.
This command only works for single motors (not sync nor broadcast).
For defaut values, check the Dynamixel documentation.
Returns:
a dynamixel error code
-
reg_write_start ()
-
Starts a register write mode.
In reg_write mode changes in configuration to devices
are not applied until a reg_write_action call.
This command only works for single motors (not sync nor broadcast).
-
reg_write_action ()
-
Finishes a register write mode.
All changes in configuration applied after a previous
reg_write_start are commited.
This command only works for single motors (not sync nor broadcast).
-
rotate_to_angle (angle, speed)
-
Rotate to the indicated angle.
Parameters:
- angle
Position in degrees in the 0-300 range.
- speed
optional rotational speed, in deg/sec in the 1 .. 684 range.
Defaults to max unregulated speed.
-
spin (power)
-
Spin at the indicated torque.
Parameters:
- power
% of max torque, in the -100% .. 100% range.
Fields
-
filename
-
Device file of the bus.
Filename of the bus to which the motor is connected.
For example, '/dev/ttyUSB0'
-
busdevice
-
Bus device.
The dynamixel bus Device to which the motor is connected
-
motor_id
-
Dynamixel ID number.
Atribute getters
Atribute getters.
Functions used to get values from the Dynamixel control table. These functions
are not available for broadcast nor sync motors.
-
get.model_number ()
-
Get the dynamixel model number.
For an AX-12 this will return 12.
Returns:
a model number, followed by a dynamixel error code.
-
get.firmware_version ()
-
Get the version of the actuator's firmware.
For an AX-12 this will return 12.
Returns:
a version number, followed by a dynamixel error code.
-
get.id ()
-
Get the ID number of the actuator.
Returns:
a ID number, followed by a dynamixel error code.
-
get.baud_rate ()
-
Get the baud rate.
Returns:
a serial bus speed in bps, followed by a dynamixel error code.
-
get.return_delay_time ()
-
Get the response delay.
The time in secs an actuator waits before answering a call.
Returns:
the edlay time in secs, followed by a dynamixel error code.
-
get.rotation_mode ()
-
Get the rotation mode.
Wheel mode is equivalent to having limits cw=0, ccw=0, and mode joint is equivalent to cw=0, ccw=300
Returns:
Either 'wheel' or 'joint', followed by a dynamixel error code.
-
get.angle_limit ()
-
Get the angle limit.
The extreme positions possible for the Joint mode.
Returns:
the cw limit, then the ccw limit, followed by a dynamixel error code.
-
get.limit_temperature ()
-
Get the temperature limit.
Returns:
The maximum allowed temperature in degrees Celsius, followed by a dynamixel error code.
-
get.limit_voltage ()
-
Get the voltage limit.
Returns:
The minumum and maximum allowed voltage in Volts, followed by a dynamixel error code.
-
get.max_torque ()
-
Get the torque limit.
This is also the default value for
torque_limit
.
Returns:
the maximum producible torque, as percentage of maximum possible (in the 0% - 100% range),
followed by a dynamixel error code.
-
get.status_return_level ()
-
Get the Return Level.
Control what commands must generate a status response
from the actuator. Possible values are 'ONLY_PING', 'ONLY_READ' and 'ALL' (default)
Returns:
the return level, followed by a dynamixel error code.
-
get.alarm_led ()
-
Get the LED alarm setup.
A list of error conditions that cause the LED to blink.
Returns:
A double indexed set, by entry number and error code, followed by a dynamixel error code. The possible
error codes in the list are 'ERROR_INPUT_VOLTAGE', 'ERROR_ANGLE_LIMIT', 'ERROR_OVERHEATING',
'ERROR_RANGE', 'ERROR_CHECKSUM', 'ERROR_OVERLOAD' and 'ERROR_INSTRUCTION'.
-
get.alarm_shutodown ()
-
Get the alarm shutdown setup.
A list of error conditions that cause the
torque_limit
attribute to
be set to 0, halting the motor.
Returns:
A double indexed set, by entry number and error code, followed by a dynamixel error code. The possible
error codes in the list are 'ERROR_INPUT_VOLTAGE', 'ERROR_ANGLE_LIMIT', 'ERROR_OVERHEATING',
'ERROR_RANGE', 'ERROR_CHECKSUM', 'ERROR_OVERLOAD' and 'ERROR_INSTRUCTION'.
-
get.torque_enable ()
-
Get the Torque Enable status.
Control the power supply to the motor.
Returns:
Boolean
-
get.compliance_margin ()
-
Get the Compliance Margin.
See Dynamiel reference.
Returns:
cw margin, ccw margin (both in degrees), followed by a Dynamiel error code.
-
get.compliance_slope ()
-
Get the Compliance Slope.
See Dynamiel reference.
Returns:
the step value, followed by a Dynamiel error code.
-
get.punch ()
-
Get the Punch value.
See Dynamiel reference.
Returns:
punch as % of max torque (in the 0..100 range)
-
get.goal_position ()
-
Get the goal angle.
The target position for the actuator is going to. Only works in joint mode.
Returns:
the target angle in degrees, followed by a Dynamiel error code.
-
get.moving_speed ()
-
Get rotation speed.
Returns:
If motor in joint mode, speed in deg/sec (0 means max unregulated speed), if in wheel
mode, as a % of max torque, followed by a Dynamiel error code.
-
get.torque_limit ()
-
Get the torque limit.
Controls the 'ERROR_OVERLOAD' error triggering.
Returns:
The torque limit as percentage of maximum possible.
If in wheel mode, as a % of max torque (in the -100 .. 100 range)
, followed by a Dynamiel error code.
-
get.present_position ()
-
Get the axle position.
Returns:
The current position of the motor axle, in degrees (only valid in the
0 .. 300 range), followed by a Dynamiel error code.
-
get.present_speed ()
-
Get the actual rotation speed.
Only valid in the 0..300 deg position.
Returns:
If motor in joint mode, speed in deg/sec, if in wheel
mode, as a % of max torque, followed by a Dynamiel error code.
-
get.present_load ()
-
Get the motor load.
Only valid in the 0..300 deg position, and aproximate.
Returns:
Percentage of max torque (positive is clockwise, negative is
counterclockwise), followed by a Dynamiel error code.
-
get.present_voltage ()
-
Get the supplied voltage.
Returns:
The supplied voltage in Volts, followed by a Dynamiel error code.
-
get.present_temperature ()
-
Get the internal temperature.
Returns:
The Internal temperature in degrees Celsius, followed by a Dynamiel error code.
-
get.registered ()
-
Get registered commands status.
Wether there are registerd commands (see reg_write_start and reg_write_action)
Returns:
A boolean, followed by a Dynamiel error code.
-
get.present_temperature ()
-
Get the moving status.
Wether the motor has reached get.goal_position.
Returns:
A boolean, followed by a Dynamiel error code.
-
get.lock ()
-
Get the lock status.
Whether the EEPROM (persistent) attributes are blocked for writing.
Returns:
boolean, followed by a Dynamiel error code.
Atribute setters
Atribute setters.
Functions used to set values for the Dynamixel control table.
Some of the setable parameters set are located on the motors EEPROM (marked "persist"),
and others are on RAM (marked "volatile"). The attributes stored in RAM are reset when the
motor is powered down.
-
set.id (ID)
-
Set the ID number of the actuator (persist).
Parameters:
- ID
number, must be in the 0 .. 253 range.
Returns:
A dynamixel error code.
-
set.baud_rate (bps)
-
Set the baud rate (persist).
Parameters:
- bps
bus rate in bps, in the 9600 to 1000000 range. Check the Dynamixel docs for supported values.
Returns:
A dynamixel error code.
-
set.return_delay_time (sec)
-
Set the response delay (persist).
The time in secs an actuator waits before answering a call.
Parameters:
Returns:
A dynamixel error code.
-
set.rotation_mode (mode)
-
Set the rotation mode (persist).
Wheel mode is for continuous rotation, Joint is for servo. Setting this attribute resets the
angle_limit
parameter. Wheel mode is equivalent to having limits cw=0, ccw=0, and mode joint is equivalent to cw=0, ccw=300
Parameters:
- mode
Either 'wheel' or 'joint'.
Returns:
A dynamixel error code.
-
set.angle_limit (cw, ccw)
-
Set the angle limit (persist).
The extreme positions possible for the Joint mode. The angles are given in degrees, and must be in the 0<=cw<=ccw<=300 range.
Parameters:
- cw
the clockwise limit.
- ccw
the clockwise limit.
Returns:
A dynamixel error code.
-
set.limit_temperature (deg)
-
Set the temperature limit (persist).
Parameters:
- deg
the temperature in degrees Celsius.
Returns:
A dynamixel error code.
-
set.limit_voltage (min, max)
-
Set the voltage limit (persist).
Parameters:
- min
the minimum allowed voltage in Volts.
- max
the maximum allowed voltage in Volts.
Returns:
A dynamixel error code.
-
set.max_torque (torque)
-
Set the torque limit (persist).
This is also the default value for
torque_limit
.
Parameters:
- torque
the maximum producible torque, as percentage of maximum possible (in the 0% - 100% range)
Returns:
A dynamixel error code.
-
set.status_return_level (return_level)
-
Set the Return Level (persist).
Control what commands must generate a status response
from the actuator.
Parameters:
- return_level
Possible values are 'ONLY_PING', 'ONLY_READ' and 'ALL' (default)
Returns:
A dynamixel error code.
-
set.alarm_led (errors)
-
Set LED alarm (persist).
A list of error conditions that cause the LED to blink.
Parameters:
- errors
A list of error codes. The possible
error codes are 'ERROR_INPUT_VOLTAGE', 'ERROR_ANGLE_LIMIT', 'ERROR_OVERHEATING',
Returns:
A dynamixel error code.
-
set.alarm_shutodown (errors)
-
Set alarm shutdown (persist).
A list of error conditions that cause the
torque_limit
attribute to
be set to 0, halting the motor.
Parameters:
- errors
A list of error codes. The possible
error codes are 'ERROR_INPUT_VOLTAGE', 'ERROR_ANGLE_LIMIT', 'ERROR_OVERHEATING',
Returns:
A dynamixel error code.
-
set.torque_enable (status)
-
Set the Torque Enable status (volatile).
Control the power supply to the motor.
Parameters:
Returns:
A dynamixel error code.
-
set.compliance_margin (cw, ccw)
-
Set the Compliance Margin (volatile).
See Dynamiel reference.
Parameters:
- cw
clockwise margin, in deg.
- ccw
counterclockwise margin, in deg.
Returns:
A dynamixel error code.
-
set.compliance_slope (step)
-
Set the Compliance Slope (volatile).
See Dynamiel reference.
Parameters:
Returns:
A dynamixel error code.
-
set.punch (punch)
-
Set the Punch value (volatile).
See Dynamiel reference.
Parameters:
- punch
as % of max torque (in the 0..100 range)
Returns:
A dynamixel error code.
-
set.goal_position (angle)
-
Set the goal angle (volatile).
The target position for the actuator to go, in degrees. Only works in joint mode.
Parameters:
- angle
the target angle in degrees
Returns:
A dynamixel error code.
-
set.moving_speed (speed)
-
Set the rotation speed (volatile).
Parameters:
- speed
If motor in joint mode, speed in deg/sec in the 0 .. 684 range
(0 means max unregulated speed).
If in wheel mode, as a % of max torque (in the -100 .. 100 range).
Returns:
A dynamixel error code.
-
set.torque_limit (torque)
-
Set the torque limit (volatile).
Controls the 'ERROR_OVERLOAD' error triggering.
Parameters:
- torque
The torque limit as percentage of maximum possible.
If in wheel mode, as a % of max torque (in the -100 .. 100 range).
Returns:
A dynamixel error code.
-
set.lock (lock)
-
Set the lock status (volatile).
Parameters:
- lock
once set to true, can be unlocked only powering down the motor.
Returns:
A dynamixel error code.


Source code for hum.gen.sine_mix
"""
Utils to mix sine waves
"""
import matplotlib.pylab as plt
from numpy import sin, arange, pi, ones, linspace, ndarray
from functools import partial
DFLT_N_SAMPLES = 21 * 2048
DFLT_SR = 44100
[docs]def mk_sine_wf(freq=5, n_samples=DFLT_N_SAMPLES, sr=DFLT_SR, phase=0, gain=1):
"""Make a sine waveform
:param freq: Frequency (in Hz)
:param n_samples: The number of samples of waveform you want
:param sr: Sample rate
:param phase: Phase (in radians)
:param gain: (A number to multiply the base sine wave by)
:return: Waveform. A numpy array of samples of the specified sine wave
"""
return gain * sin(phase + arange(n_samples) * 2 * pi * freq / sr)
[docs]def freq_based_stationary_wf(
freqs=(200, 400, 600, 800),
weights=None,
n_samples: int = DFLT_N_SAMPLES,
sr: int = DFLT_SR,
) -> ndarray:
"""
Makes a stationary waveform by mixing a number of freqs together, possibly with different weights.
:param freqs: List(-like) of frequencies (in Hz)
:param weights: The weights these frequencies should have (all weights will be normalized
:param n_samples: The number of samples of waveform you want
:param sr: Sample rate
:return: Waveform. A numpy array of samples of the specified sine wave
"""
if weights is None:
weights = ones(len(freqs))
assert len(freqs) == len(weights)
_mk_sine_wf = partial(mk_sine_wf, n_samples=n_samples, sr=sr)
wf = sum(_mk_sine_wf(freq) * weights[i] for i, freq in enumerate(freqs))
return wf / sum(weights)


Loading
You must install the
user script
before you can use this page.
Change 2FA Server URL
Signed in as:
Refresh Confirmations
Accept All
You don't have anything to confirm right now.
Change 2FA Server URL
2FA Server Base URL:
Save


CERN
Accelerating science
Directory
Simple index
Generated on {{date}}.
{% for package in package_names %}
{{package}}
{% endfor %}


|
c-iterplus
1.0.0
Type safe, Generic, Lazy abstractions for working with c-iterator
|
Utilities to define and use a Pair type. More...
Go to the source code of this file.
Macros | |
| #define | Pair(T, U) ITPL_CONCAT(ITPL_CONCAT(Pair_, T), ITPL_CONCAT(_, U)) |
| Convenience macro to get the type of the Pair defined with certain types. More... | |
| #define | DefinePair(T, U) |
| Define a Pair<T, U> type. More... | |
| #define | PairOf(x, y, T, U) ((Pair(T, U)){.a = (x), .b = (y)}) |
| Wrap 2 values into a Pair(T, U). More... | |
| #define | fst(pair) (pair).a |
| Get the first value from given pair. | |
| #define | snd(pair) (pair).b |
| Get the second value from given pair. | |
Utilities to define and use a Pair type.
A Tuple of 2 elements.
https://hackage.haskell.org/package/base-<IP_ADDRESS>/docs/Data-Tuple.html
| #define DefinePair | ( | T, | |
| U | |||
| ) |
Define a Pair<T, U> type.
| T | The type the first value in this Pair struct. |
| T | The type the second value in this Pair struct. |
T
, or U
, is a pointer, it needs to be typedef-ed into a type that does not contain the *
. Only alphanumerics. | #define Pair | ( | T, | |
| U | |||
| ) | ITPL_CONCAT(ITPL_CONCAT(Pair_, T), ITPL_CONCAT(_, U)) |
Convenience macro to get the type of the Pair defined with certain types.
| T | The type the first value in this Pair struct. Must be the same type name passed to DefinePair(T, U) |
| T | The type the second value in this Pair struct. Must be the same type name passed to DefinePair(T, U). |
T
, or U
, is a pointer, it needs to be typedef-ed into a type that does not contain the *
. Only alphanumerics. | #define PairOf | ( | x, | |
| y, | |||
| T, | |||
| U | |||
| ) | ((Pair(T, U)){.a = (x), .b = (y)}) |
Wrap 2 values into a Pair(T, U).
| x | The value to put as the first member of the pair struct. |
| y | The value to put as the second member of the pair struct. |
| T | The type of the first value. |
| U | The type of the second value. |
T
, or U
, is a pointer, it needs to be typedef-ed into a type that does not contain the *
. Only alphanumerics. T
and U
must exist.


---
layout: null
section-type: contact
title: Contact
---
## Contact
"Ethnic Studies Rise" was conceived and brought to fruition by Raj Chetty (San Diego State University) and Katerina Gonzalez Seligmann (Emerson College), in collaboration with Alex Gil (Columbia University). To learn more or answer any question send an email to Dr. Chetty and Dr. Gonzalez Seligmann at<EMAIL_ADDRESS>We would like to thank Frances Negrón-Muntaner, Yolanda Martínez-San Miguel, Rosemary Feal, Laurent Dubois, Kaiama Glover and Massiel Torres for feedback and support on this project. Our special thanks to Roopika Risam for going the extra mile in supporting the project behind the scenes and in public. To all of our roundtable participants for helping enrich the conversation in times like these, our admiration and respect. We extend a special thank you note to Ken Wissoker, Courtney Berger, Michael McCullough and Duke University Press for launching a promotion on Borders of Dominicanidad to coincide with our project. To Centro Bono for sharing the spanish introduction to the book prior to publication. Many other collaborators will surely make this what we hope. We thank you in advance. And last, but not least, we would like to thank Lorgia García Peña herself for her tireless work.


Welcome to the odgi documentation!¶
In standard genomic approaches sequences are related to a single linear reference genome introducing reference bias. Pangenome graphs encoded in the variation graph data model describe the all versus all alignment of many sequences. Representing large pangenome graphs with minimal memory overhead requires a careful encoding of the graph entities. It is possible to build succinct, static data structures to store queryable graphs, as in xg, but dynamic data structures are more tricky to implement.
The optimized dynamic genome/graph implementation odgi
follows the dynamic
GBWT in developing
a byte-packed version of the graph, edges, and paths through it. The node’s id is stored as a uint64_t
and its
sequence is stored as a plain std::string
. Bit-compressed dynamic byte arrays, with a local alphabet encoder,
represent the local neighbourhood
of the node:
The node’s edges, and
the paths crossing the node.
To ensure minimal memory occupation, only the deltas of the neighbouring steps of a path are hold.
odgi
provides a set of tools ranging from graph building, manipulation, layouting, over graph statistics to graph
visualization and gene annotation lift overs.


The member networks in this species
The representative network of this species
The score of this species
Kill a specific percentage of networks
the kill rate
is representative always the best member?
Dividing the fitness value of each individual by the size of the species and save the adjusted fitness.
Add all adjusted network scores up and divide by the member size.
Add all adjusted network scores up and return.
Returns whether a genome is compatible with the species or not
An array of genomes to determine compatibility with (currently assumes two)
Whether a genome is compatible with the species
Puts a network to the species without checking the distance
Reset this object
The size of this species
Returns a sorted array representation of the members field
Add all network scores up and return
Returning a string representation of this species.
Update the score of this species and updating the best network.
Generated using TypeDoc
A class holding a species


This tutorial guides you to create CarbonData Tables and optimize performance. The following sections will elaborate on the below topics :
For example, the results of the analysis for table creation with dimensions ranging from 10 thousand to 10 billion rows and 100 to 300 columns have been summarized below. The following table describes some of the columns from the table used.
| Column Name | Data Type | Cardinality | Attribution |
|---|---|---|---|
| msisdn | String | 30 million | Dimension |
| BEGIN_TIME | BigInt | 10 Thousand | Dimension |
| HOST | String | 1 million | Dimension |
| Dime_1 | String | 1 Thousand | Dimension |
| counter_1 | Decimal | NA | Measure |
| counter_2 | Numeric(20,0) | NA | Measure |
| ... | ... | NA | Measure |
| counter_100 | Decimal | NA | Measure |
For example, MSISDN filter is used in most of the query then we must put the MSISDN as the first column in SORT_COLUMNS property. The create table command can be modified as suggested below :
create table carbondata_table(
msisdn String,
BEGIN_TIME bigint,
HOST String,
Dime_1 String,
counter_1, Decimal
...
)STORED AS carbondata
TBLPROPERTIES ('SORT_COLUMNS'='msisdn, Dime_1')
Now the query with MSISDN in the filter will be more efficient.
If the table in the specified query has multiple columns which are frequently used to filter the results, it is suggested to put the columns in the order of cardinality low to high in SORT_COLUMNS configuration. This ordering of frequently used columns improves the compression ratio and enhances the performance of queries with filter on these columns.
For example, if MSISDN, HOST and Dime_1 are frequently-used columns, then the column order of table is suggested as Dime_1>HOST>MSISDN, because Dime_1 has the lowest cardinality. The create table command can be modified as suggested below :
create table carbondata_table(
msisdn String,
BEGIN_TIME bigint,
HOST String,
Dime_1 String,
counter_1, Decimal
...
)STORED AS carbondata
TBLPROPERTIES ('SORT_COLUMNS'='Dime_1, HOST, MSISDN')
For columns of measure type, not requiring high accuracy, it is suggested to replace Numeric data type with Double to enhance query performance. The create table command can be modified as below :
create table carbondata_table(
Dime_1 String,
BEGIN_TIME bigint,
END_TIME bigint,
HOST String,
MSISDN String,
counter_1 decimal,
counter_2 double,
...
)STORED AS carbondata
TBLPROPERTIES ('SORT_COLUMNS'='Dime_1, HOST, MSISDN')
The result of performance analysis of test-case shows reduction in query execution time from 15 to 3 seconds, thereby improving performance by nearly 5 times.
Consider the following scenario where data is loaded each day and the begin_time is incremental for each load, it is suggested to put begin_time at the end of dimensions. Incremental values are efficient in using min/max index. The create table command can be modified as below :
create table carbondata_table(
Dime_1 String,
HOST String,
MSISDN String,
counter_1 double,
counter_2 double,
BEGIN_TIME bigint,
END_TIME bigint,
...
counter_100 double
)STORED AS carbondata
TBLPROPERTIES ('SORT_COLUMNS'='Dime_1, HOST, MSISDN')
NOTE:
CarbonData supports large data load, in this process sorting data while loading consumes a lot of memory and disk IO and this can result sometimes in "Out Of Memory" exception. If you do not have much memory to use, then you may prefer to slow the speed of data loading instead of data load failure. You can configure CarbonData by tuning following properties in carbon.properties file to get a better performance.
| Parameter | Default Value | Description/Tuning |
|---|---|---|
| carbon.number.of.cores.while.loading | Default: 2. This value should be >= 2 | Specifies the number of cores used for data processing during data loading in CarbonData. |
| carbon.sort.size | Default: 100000. The value should be >= 100. | Threshold to write local file in sort step when loading data |
| carbon.sort.file.write.buffer.size | Default: 16384. | CarbonData sorts and writes data to intermediate files to limit the memory usage. This configuration determines the buffer size to be used for reading and writing such files. |
| carbon.merge.sort.reader.thread | Default: 3 | Specifies the number of cores used for temp file merging during data loading in CarbonData. |
| carbon.merge.sort.prefetch | Default: true | You may want set this value to false if you have not enough memory |
For example, if there are 10 million records, and i have only 16 cores, 64GB memory, will be loaded to CarbonData table. Using the default configuration always fail in sort step. Modify carbon.properties as suggested below:
carbon.merge.sort.reader.thread=1
carbon.sort.size=5000
carbon.sort.file.write.buffer.size=5000
carbon.merge.sort.prefetch=false
Recently we did some performance POC on CarbonData for Finance and telecommunication Field. It involved detailed queries and aggregation scenarios. After the completion of POC, some of the configurations impacting the performance have been identified and tabulated below :
| Parameter | Location | Used For | Description | Tuning |
|---|---|---|---|---|
| carbon.sort.intermediate.files.limit | spark/carbonlib/carbon.properties | Data loading | During the loading of data, local temp is used to sort the data. This number specifies the minimum number of intermediate files after which the merge sort has to be initiated. | Increasing the parameter to a higher value will improve the load performance. For example, when we increase the value from 20 to 100, it increases the data load performance from 35MB/S to more than 50MB/S. Higher values of this parameter consumes more memory during the load. |
| carbon.number.of.cores.while.loading | spark/carbonlib/carbon.properties | Data loading | Specifies the number of cores used for data processing during data loading in CarbonData. | If you have more number of CPUs, then you can increase the number of CPUs, which will increase the performance. For example if we increase the value from 2 to 4 then the CSV reading performance can increase about 1 times |
| carbon.compaction.level.threshold | spark/carbonlib/carbon.properties | Data loading and Querying | For minor compaction, specifies the number of segments to be merged in stage 1 and number of compacted segments to be merged in stage 2. | Each CarbonData load will create one segment, if every load is small in size it will generate many small files over a period of time impacting the query performance. Configuring this parameter will merge the small segment to one big segment which will sort the data and improve the performance. For Example in one telecommunication scenario, the performance improves about 2 times after minor compaction. |
| spark.sql.shuffle.partitions | spark/conf/spark-defaults.conf | Querying | The number of task started when spark shuffle. | The value can be 1 to 2 times as much as the executor cores. In an aggregation scenario, reducing the number from 200 to 32 reduced the query time from 17 to 9 seconds. |
| spark.executor.instances/spark.executor.cores/spark.executor.memory | spark/conf/spark-defaults.conf | Querying | The number of executors, CPU cores, and memory used for CarbonData query. | In the bank scenario, we provide the 4 CPUs cores and 15 GB for each executor which can get good performance. This 2 value does not mean more the better. It needs to be configured properly in case of limited resources. For example, In the bank scenario, it has enough CPU 32 cores each node but less memory 64 GB each node. So we cannot give more CPU but less memory. For example, when 4 cores and 12GB for each executor. It sometimes happens GC during the query which impact the query performance very much from the 3 second to more than 15 seconds. In this scenario need to increase the memory or decrease the CPU cores. |
| carbon.detail.batch.size | spark/carbonlib/carbon.properties | Querying | The buffer size to store records, returned from the block scan. | In limit scenario this parameter is very important. For example your query limit is 1000. But if we set this value to 3000 that means we get 3000 records from scan but spark will only take 1000 rows. So the 2000 remaining are useless. In one Finance test case after we set it to 100, in the limit 1000 scenario the performance increase about 2 times in comparison to if we set this value to 12000. |
| carbon.use.local.dir | spark/carbonlib/carbon.properties | Data loading | Whether use YARN local directories for multi-table load disk load balance | If this is set it to true CarbonData will use YARN local directories for multi-table load disk load balance, that will improve the data load performance. |
| carbon.sort.temp.compressor | spark/carbonlib/carbon.properties | Data loading | Specify the name of compressor to compress the intermediate sort temporary files during sort procedure in data loading. | The optional values are 'SNAPPY','GZIP','BZIP2','LZ4','ZSTD', and empty. Specially, empty means that Carbondata will not compress the sort temp files. This parameter will be useful if you encounter disk bottleneck. |
| carbon.load.skewedDataOptimization.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable size based block allocation strategy for data loading. | When loading, carbondata will use file size based block allocation strategy for task distribution. It will make sure that all the executors process the same size of data -- It's useful if the size of your input data files varies widely, say 1MB to 1GB. |
| carbon.load.min.size.enabled | spark/carbonlib/carbon.properties | Data loading | Whether to enable node minumun input data size allocation strategy for data loading. | When loading, carbondata will use node minumun input data size allocation strategy for task distribution. It will make sure the nodes load the minimum amount of data -- It's useful if the size of your input data files very small, say 1MB to 256MB,Avoid generating a large number of small files. |
Note: If your CarbonData instance is provided only for query, you may specify the property 'spark.speculation=true' which is in conf directory of spark.
CarbonData provides many configurations to tune the compaction behavior so that query peformance is improved.
Based on the number of cores available in the node, it is recommended to tune the configuration carbon.number.of.cores.while.compacting appropriately.Configuring a higher value will improve the overall compaction performance.
| No | Data Loading frequency | Data Size of each load | Minor Compaction configuration | Major compaction configuration |
| 1 | Batch(Once is several Hours) | Big | Not Suggested | Configure Major Compaction size of 3-4 load size.Perform Major compaction once in a day |
| 2 | Batch(Once in few minutes) | Big |
Minor compaction (2,2). Enable Auto compaction, if high rate data loading speed is not required or the time between loads is sufficient to run the compaction |
Major compaction size of 10 load size.Perform Major compaction once in a day |
| Small |
Minor compaction (6,6). Enable Auto compaction, if high rate data loading speed is not required or the time between loads is sufficient to run the compaction |
Major compaction size of 10 load size.Perform Major compaction once in a day | ||
| 3 | History data loaded as single load,incremental loads matches (1) or (2) | Big |
Configure ALLOWED_COMPACTION_DAYS to exclude the History load. Configure Minor compaction configuration based condition (1) or (2) |
Configure Major compaction size smaller than the history load size. |
| 4 | There can be error in recent data loaded.Need reload sometimes | (1) or (2) |
Configure COMPACTION_PRESERVE_SEGMENTS to exclude the recent few segments from compacting. Configure Minor compaction configuration based condition (1) or (2) |
Same as (1) or (2) |


This is a test page for the CSS generated in source.
1/2
1/3
2/3
1/4
2/4
3/4
1/5
2/5
3/5
4/5
1/6
2/6
3/6
4/6
5/6
1/7
2/7
3/7
4/7
5/7
6/7
1/8
2/8
3/8
4/8
5/8
6/8
7/8
1/12
2/12
3/12
4/12
5/12
6/12
7/12
8/12
9/12
10/12
11/12
1/24
2/24
3/24
4/24
5/24
6/24
7/24
8/24
9/24
10/24
11/24
12/24
13/24
14/24
15/24
16/24
17/24
18/24
19/24
20/24
21/24
22/24
23/24
| # | Name | Birth | |
|---|---|---|---|
| 1 | Jose |<EMAIL_ADDRESS>| 1980 |
| 2 | Joao |<EMAIL_ADDRESS>| 1985 |
| # | Name | Birth | |
|---|---|---|---|
| 1 | Jose |<EMAIL_ADDRESS>| 1980 |
| 2 | Joao |<EMAIL_ADDRESS>| 1985 |
| # | Name | Birth | |
|---|---|---|---|
| 1 | Jose |<EMAIL_ADDRESS>| 1980 |
| 2 | Joao |<EMAIL_ADDRESS>| 1985 |
| # | Name | Birth | |
|---|---|---|---|
| 1 | Jose |<EMAIL_ADDRESS>| 1980 |
| 2 | Joao |<EMAIL_ADDRESS>| 1985 |


Command |
|
|---|---|
|
|
|
This file is part of the Clinner library. (c) José Nahuel Cuesta Luengo<EMAIL_ADDRESS>For the full copyright and license information, please view the LICENSE file that was distributed with this source code. |
namespace Clinner\Command;
use Clinner\ValueHolder;
|
|
Command class. Command abstraction class that allows running any command with a given set of arguments. Usage examples:
You can also pipe commands, just like in a command-line interface:
This class may take the following options:
@author José Nahuel Cuesta Luengo<EMAIL_ADDRESS>|
class Command implements CommandInterface, PipingCommandInterface, PipeableCommandInterface
{
const DEFAULT_DELIMITER = '=';
|
|
The name of the command. @var |
private $_name;
|
|
Arguments supplied for this command. @var |
private $_arguments;
|
|
Options supplied for this command. @var |
private $_options;
|
|
A command piped to this one, if any. @var |
private $_next;
|
|
Exit code for this command. This value will only be set after it has been run. @var |
private $_exitCode;
|
|
Output for this command. This value will only be set after it has been run. @var |
private $_output;
|
|
Error output for this command. This value will only be set after it has been run. @var |
private $_errorOutput;
|
|
Factory method for creating new Commands and allowing to take advantage of the fluent API provided by this class. @param @param @param @return |
static public function create($name, $arguments = array(), $options = array())
{
return new static($name, $arguments, $options);
}
|
|
Factory method for creating new Commands from their string representation,
as if they were being run from the command line. If no valid commands are
found, a NullCommand will be returned.
For example:
@param @return |
static public function fromString($commandString)
{
$splitCommands = array_map(
function($str) { return trim($str); },
explode(self::PIPE, $commandString)
);
$command = new NullCommand();
foreach ($splitCommands as $rawCommand) {
$command = $command->pipe(static::parse($rawCommand));
}
return $command;
}
|
|
Parse a command from a string representation and return the resulting object. If no valid command is found, a NullCommand will be returned. @param @param @return |
static protected function parse($commandString, $options = array())
{
$members = array_filter(explode(' ', $commandString));
if (!empty($members)) {
$commandName = array_shift($members);
return new Command($commandName, $members, $options);
}
return new NullCommand();
}
|
|
Constructor. @param @param @param |
public function __construct($name, $arguments = array(), $options = array())
{
$this
->setName($name)
->setArguments($arguments)
->setOptions($options);
}
|
|
Get the name of this command. @return |
public function getName()
{
return $this->_name;
}
|
|
Set the name of this command to @param @return |
public function setName($name)
{
$this->_name = $name;
return $this;
}
|
|
Get the arguments for this command as a ValueHolder. @return |
public function getArguments()
{
return $this->_arguments;
}
|
|
Set this command's arguments as a whole.
@see \Clinner\ValueHolder::create() @param @return |
public function setArguments($arguments)
{
$this->_arguments = ValueHolder::create($arguments);
return $this;
}
|
|
Get the options for this command as a ValueHolder. @return |
public function getOptions()
{
return $this->_options;
}
|
|
Set this command's options as a whole.
@see \Clinner\ValueHolder::create() @param @return |
public function setOptions($options)
{
$this->_options = ValueHolder::create($options);
return $this;
}
|
|
Get a single option value for this command, optionally providing a default value for it. @see \Clinner\ValueHolder::get() @param @param @return |
public function getOption($name, $default = null)
{
return $this->_options->get($name, $default);
}
|
|
Set a single option for this command. @param @param @return |
public function setOption($name, $value)
{
$this->_options->set($name, $value);
return $this;
}
|
|
Get the command piped to this one, if any. @return |
public function getPipedCommand()
{
return $this->_next;
}
|
|
Pipe @param @param @return |
public function pipe(PipeableCommandInterface $anotherCommand, $appendToPipe = true)
{
if (!$anotherCommand instanceof NullCommand) {
if ($this === $anotherCommand) {
|
|
Cannot pipe a command to itself, need to clone it |
$anotherCommand = clone $anotherCommand;
}
if ($appendToPipe) {
if ($this->hasPipedCommand()) {
$this->_next->pipe($anotherCommand, true);
} else {
$this->_next = $anotherCommand;
}
} else {
if ($this->hasPipedCommand()) {
|
|
Rearrange the commands pipe |
$anotherCommand->pipe($this->_next, false);
}
$this->_next = $anotherCommand;
}
}
return $this;
}
|
|
Answer whether this command has a command piped to it. @return |
public function hasPipedCommand()
{
return null !== $this->_next;
}
|
|
Get the exit code for this command. @return |
public function getExitCode()
{
return $this->_exitCode;
}
|
|
Get this command's output. @return |
public function getOutput()
{
return $this->_output;
}
|
|
Get the error output for this command. @return |
public function getErrorOutput()
{
return $this->_errorOutput;
}
|
|
Get the output of this command as an array, splitting it with a given @see explode @param @return |
public function getOutputAsArray($delimiter = ' ')
{
return array_values(
array_filter(
explode($delimiter, strval($this->_output))
)
);
}
|
|
Run this command with the given @param @return |
public function run($input = null)
{
$this->_exitCode = $this->_run($input);
return $this;
}
|
|
Actually run this command and its piped commands chain, if applicable. Return the exit code for such execution. @throws @param @return |
protected function _run($input)
{
$this->_output = '';
$this->_errorOutput = '';
$descriptors = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
$pipes = array();
$childProcess = proc_open($this->toCommandString(), $descriptors, $pipes);
if (!is_resource($childProcess)) {
throw new \RuntimeException('Unable to run command: ' . $this->toCommandString());
}
if (null !== $input) {
fwrite($pipes[0], $input);
fclose($pipes[0]);
}
$output = stream_get_contents($pipes[1]);
fclose($pipes[1]);
$errorOutput = stream_get_contents($pipes[2]);
fclose($pipes[2]);
$exitCode = proc_close($childProcess);
|
|
Run the piped command, if any |
if ($this->hasPipedCommand()) {
$pipedCommand = $this->getPipedCommand();
$pipedCommand->run($output);
$output = $pipedCommand->getOutput();
$exitCode = $pipedCommand->getExitCode();
$errorOutput = $pipedCommand->getErrorOutput();
}
$this->_output = $output;
$this->_errorOutput = $errorOutput;
return $exitCode;
}
|
|
Get a string representation of this command with its arguments, as if it would be written in a command-line interface when run. @param @return |
public function toCommandString($includePiped = false)
{
$command = $this->getName();
if (!$this->getArguments()->isEmpty()) {
$args = array();
$delimiter = $this->getOption('delimiter', self::DEFAULT_DELIMITER);
foreach ($this->getArguments()->getAll() as $key => $value) {
if (is_int($key)) {
$args[] = $value;
} else {
$args[] = $key.$delimiter.$value;
}
}
$command .= ' ' . implode(' ', $args);
}
if ($includePiped && $this->hasPipedCommand()) {
$command .= sprintf(' %s %s', self::PIPE, $this->getPipedCommand()->toCommandString($includePiped));
}
return $command;
}
|
|
Get the string representation of this command. @return |
public function __toString()
{
return $this->getName();
}
}
|


least_common_multiple(3f) - [M_factor] Least common multiple of two integers or vector m(:), matrix m(:,:) or cuboid m(:,:,:) (LICENSE:MIT)
Synopsis
Description
Example
Method
Author
License
use, intrinsic :: iso_fortran_env, only : int64 integer function least_common_multiple(i,j) integer,intent(in):: i,j or integer function(kind=int32) least_common_multiple(m) integer,intent(in):: m(:) or integer,intent(in):: m(:,:) or integer,intent(in):: m(:,:,:)
From Wikipedia, the free encyclopedia:In arithmetic and number theory, the least common multiple (also called the lowest common multiple or smallest common multiple) of two integers a and b, usually denoted by LCM(a, b), is the smallest positive integer that is divisible by both a and b. Since division of integers by zero is undefined, this definition has meaning only if a and b are both different from zero. However, some authors define lcm(a,0) as 0 for all a, which is the result of taking the LCM to be the least upper bound in the lattice of divisibility.
The LCM is familiar from grade-school arithmetic as the "lowest common denominator" (LCD) that must be determined before fractions can be added, subtracted or compared. The LCM of more than two integers is also well-defined: it is the smallest positive integer that is divisible by each of them.
Sample Program:
program demo_lcm use M_factor, only : lcm=>least_common_multiple implicit none write(*,*)SCALAR: call writeit(10,24,120) call writeit(15,30,30) call writeit(-15,-30,30) call writeit(15,-30,30) call writeit(-15,30,30)Expected results:write(*,*)VECTOR: call writeit_v([10,24],120) call writeit_v([15,30],30) call writeit_v([-15,-30],30) call writeit_v([5,-15,-40],120) call writeit_v([2,3,4,5],60) write(*,*)Special cases: call writeit_v([15,0],0) call writeit_v([-15,0],0) call writeit_v([0],0) call writeit_v([-10],10) call writeit_v([22],22) call writeit_v([0,0],0) call writeit_v([0,0,0,0,0],0) call writeit_v([0,0,0,-1,0],0) call writeit_v([0,0,0,33,0,3,11],0) contains
subroutine writeit(ii,jj,answer) integer,intent(in) :: ii,jj integer,intent(in) :: answer write(*,(" For lcm(",I0,",",I0,") the value is ",I0," which is ",L1))& & ii,jj,lcm(ii,jj),lcm(ii,jj).eq.answer end subroutine writeit
subroutine writeit_v(array,answer) integer,intent(in) :: array(:) integer,intent(in) :: answer write(*,(" For lcm([",*(i0:,1x)),advance=no)array write(*,("]) the value is ",i0," which is ",L1)) & & lcm(array),lcm(array).eq.answer end subroutine writeit_v
end program demo_lcm
> SCALAR: > For lcm(10,24) the value is 120 which is T > For lcm(15,30) the value is 30 which is T > For lcm(-15,-30) the value is 30 which is T > For lcm(15,-30) the value is 30 which is T > For lcm(-15,30) the value is 30 which is T > VECTOR: > For lcm([10 24]) the value is 120 which is T > For lcm([15 30]) the value is 30 which is T > For lcm([-15 -30]) the value is 30 which is T > For lcm([5 -15 -40]) the value is 120 which is T > For lcm([2 3 4 5]) the value is 60 which is T > Special cases: > For lcm([15 0]) the value is 0 which is T > For lcm([-15 0]) the value is 0 which is T > For lcm([0]) the value is 0 which is T > For lcm([-10]) the value is 10 which is T > For lcm([22]) the value is 22 which is T > For lcm([0 0]) the value is 0 which is T > For lcm([0 0 0 0 0]) the value is 0 which is T > For lcm([0 0 0 -1 0]) the value is 0 which is T > For lcm([0 0 0 33 0 3 11]) the value is 0 which is T
Reduction by the greatest common divisorThe following formula reduces the problem of computing the least common multiple to the problem of computing the greatest common divisor (GCD), also known as the greatest common factor:
lcm(a,b) = |a*b| / gcd(a,b)This formula is also valid when exactly one of a and b is 0, since gcd(a, 0) = |a|. (However, if both a and b are 0, this formula would cause division by zero; lcm(0, 0) = 0 is a special case.
John S. Urban
MIT License
| Nemo Release 3.1 | least_common_multiple (3) | July 22, 2023 |


type: page_en slug: home url: /en/index.html title: Python in Education ---
Master the basics, progress to the fun stuff and achieve coding greatness with lessons for learners of all ages, levels and abilities.
get startedInspire the next generation of Python programmers with fun resources, tested in the field by teachers and members of the global Python community.
fun resourcesDiscover all the technical details, designs and source code needed to build something amazing, create a cool project or make a contribution to our educational efforts.
lets go!It's very easy to learn. Python is used all over the world by all sorts of people from professional coders to complete beginners. Use Python to code cool stuff on your micro:bit, Raspberry Pi or other computer.
Start here for an introduction to Python, intermediate material that'll help you stretch your wings, and advanced features that'll have you building your world-changing project from the comfort of your own home in no time at all!
try out a tutorialThe BBC micro:bit is a small programmable device. It aims to inspire a new generation of digital creators, makers and coders. Thanks to the amazing MicroPython project, it runs a full re-implementation of Python 3.
The device has two buttons, a 5x5 LED display, I/O pins, an accelerometer, compass, radio, micro-USB port, battery connector, ARM microprocessor and a heart of gold.
code the future with micro:bitThe Raspberry Pi is a unique phenomenon. It is the most successful computing-in-education project in history with over 6 million units delivered around the world.
But it's not just about the hardware! Thanks to the amazing work of the Raspberry Pi Foundation's education team, Python is widely used on the device to do all sorts of fun stuff such as program games (like Minecraft), travel into space (to the International Space Station) and control peripherals plugged into the Pi via its GPIO pins.
enjoy a slice of raspberry piTeachers and programmers from all over the world have created fun, engaging and challenging resources for teachers to use in their classrooms. These range from simple tasks for beginners to complicated projects to challenge the most advanced students. They include lesson plans, code, books, worksheets and online interactive courses.
Most importantly, many of these resources are free for people to use, adopt and adapt.
discover compelling and creative resourcesCommunity is Python's secret weapon.
The Python community value openness, actively engage in outreach and give up their time for educational support (this site was written by volunteers). As one person put it, "I came for the programming language, but stayed for the community".
 There's a good chance there's one near you very soon.
If you're looking for support, advice or just some friendly encouragement, get involved and say "hello".
meet and make friends with your communityPython has comprehensive and excellent documentation. In fact, many in the Python community spend lots of effort to make sure Python projects have comprehensive, detailed and easy to understand technical documentation.
Need to know how to do something? Read the docs! Looking for the best way to use some code? Read the docs! Want to learn something new so you can impress your programming buddies with your knowledge? Read the docs!
read the docs!Python is free software: it is given away for free (nobody pays to use Python), you are also free to use it as you see fit and the Python community actively encourages people to contribute code, documentation and resources for the benefit of others.
For this to work you need access to the source code: the instructions for the computer that tell it how to do the stuff you want it to do.
Perhaps you already know this stuff and you're just looking for a cool educational project to which you can contribute. If so, you've come to the right place!
hack on code


View Sales Orders
Items Deliveries
View Work Orders
View Purchase Orders
Add a new sales order to the system. Then line items can be added as needed
Approve a sales order to start the processing
Ship the articles associated with the sales order
© 2014 Randy Kamradt Sr


Toggle navigation
O
pen
Wines
Open-Data, for vineyards, winegrowers and wines
Open-Data, for vineyards, winegrowers and wines
A propos
Datasets
Work in Progress
[fr] Meetings Minutes
Data formats
License choices
Recent Posts
Google Group recent announcements (live)
Le modèle par l’observation (5 chapitres)
April 2015 Press Releases
Hackgriculture 2015
EN
FR
IT
{{file.data.title}}
{{{file.contents}}}


T3A06-CSS-By-Dylan
This is not cool
This is cool
https://www.w3schools.com/cs
s/css_examples.asp
This is a span doing nothing
This span does something
This span also does something
This span does something maybe
This span double also does something
This span triple does something
This span sucks


- I walked
May 5, 2011
I walked alone through the museum
thought and said my solemn goodbyes
thought the greek and roman statues and out the front door
working there surrounded by this massive immense wealth,
just exacerbated problems and inequalities, and in no other way then by its


[gecode-users] Propagation condition and cloning
Christian Schulte
cschulte at kth.se
Mon Dec 14 11:35:45 CET 2009
Hmmm,
the first five lines in the patch look already fishy:
--- gecode/int/bool/clause.hpp 2009-10-14 12:19:49.000000000 +0200
+++ gecode/int/bool/clause.hpp 2009-12-13 23:46:53.000000000 +0100
@@ -50,6 +50,8 @@
(home,x0[x0.size()-1],y0[y0.size()-1]), x(x0), y(y0) {
assert((x.size() > 0) && (y.size() > 0));
x.size(x.size()-1); y.size(y.size()-1);
+ x0.subscribe(home,*this,PC_BOOL_SAME,false);
+ x1.subscribe(home,*this,PC_BOOL_SAME,false);
}
Here x0 in x0.subscribe refers to the argument passed to the constructor.
You assume it refers to the member, right?
Yep ;-)
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
-----Original Message-----
From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On Behalf
Of Vincent Barichard
Sent: Monday, December 14, 2009 12:33 AM
To: gecode list
Subject: [gecode-users] Propagation condition and cloning
Hi Everyone,
I would like to put another Propagation Condition in BoolVarImp. You gave me
good advice on how to process. For a first step, I just wanted to make some
test. So I first modified bool.vis and add this new Propagation Condition.
Then I tried to make existing propagators subscribe to this new propagation
condition (without scheduling propagators and sending the corresponding
events). Unfortunately, I failed to achieved this first step. Indeed, some
problems occur during cloning.
I first thought that It was a problem with the rewriting of propagator
during cloning. Indeed, I didn't update all propagators, so it can't be
possible to change a propagator by another one which doesn't subscribe to
the same propagation conditions than the original one.
I disabled the rewrite of a propagator by another propagator from a
different class during cloning. But I still have problems. I tried many
things, without success and now I have no more ideas.
For now, I just want to understand why I can't make it work. For this
purpose, I designed an example to make gecode crash. I used the "sat"
example given with Gecode, and only deal with this example (no matter if the
other examples don't work anymore).
My problem is reproducible by applying the patch attached in this mail to
Gecode 3.2.2. Then, I configured and compiled Gecode with the following
commands:
./configure --enable-debug --enable-audit make
The test problem can be launched by copying the test2.cnf file (attached in
the mail) in the gecode directory and executing the command:
./examples/sat test2.cnf
If I use a debugger I get:
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000020000001b
0x000000010146d908 in Gecode::ActorLink::prev (this=0x200000013) at
core.hpp:2328
2328 return _prev;
(gdb) bt
#0 0x000000010146d908 in Gecode::ActorLink::prev (this=0x200000013) at
core.hpp:2328
#1 0x000000010146e0be in
Gecode::VarImp<Gecode::Int::BoolVarImpConf>::update (this=0x101896350,
x=0x101877698, sub=@0x7fff5fbfece0) at core.hpp:3295
#2 0x000000010146e1d9 in
Gecode::VarImp<Gecode::Int::BoolVarImpConf>::update (home=@0x101503f80,
sub=@0x7fff5fbfece0) at core.hpp:3314
#3 0x000000010146e4b4 in Gecode::Space::update (this=0x101503f80,
sub=0x101888798) at var-imp.hpp:343
#4 0x000000010146bae7 in Gecode::Space::_clone (this=0x101503e20,
share=true) at gecode/kernel/core.cpp:481
#5 0x000000010011b58b in Gecode::Space::clone (this=0x101503e20,
share=true) at core.hpp:2465
#6 0x000000010011c2c0 in Gecode::Search::Sequential::Path::recompute
(this=0x101503798, d=@0x1015037b8, a_d=2, stat=@0x101503718) at path.hh:305
#7 0x000000010011c5be in Gecode::Search::Sequential::DFS::next
(this=0x101503718) at dfs.hh:146
#8 0x000000010011c615 in
Gecode::Search::WorkerToEngine<Gecode::Search::Sequential::DFS>::next
(this=0x101503710) at support.hh:74
#9 0x0000000100007ed2 in Gecode::DFS<Sat>::next (this=0x7fff5fbff070) at
dfs.hpp:53 #10 0x000000010000811b in
Gecode::Driver::ScriptBase<Gecode::Space>::run<Sat, Gecode::DFS, SatOptions>
(o=@0x7fff5fbff1a0) at script.hpp:198
#11 0x0000000100001a34 in main (argc=1, argv=0x7fff5fbff4f0) at
examples/sat.cpp:256
I probably made an obvious mistake, but I can not see.
Thanks for your help,
Cheers,
Vincent
Vincent Barichard Université d'Angers (LERIA)
Tel: 02 41 73 52 06 Département Informatique
Fax: 02 41 73 50 73 H203
More information about the users
mailing list


Toggle navigation
Buddy System
Notifications
New Comment
4 minutes ago
3 New Followers
12 minutes ago
Message Sent
4 minutes ago
New Task
4 minutes ago
Server Rebooted
4 minutes ago
See All Alerts
My Buddies
User's Name
My Buddies
My Buddies
Name 1
Name 2
Name 3
Name 4
Name 5
Name 6
Suggested Buddies
Name 1
Name 2
Name 3
Name 4
Task 1
Task 1
View Other Potential Buddies


For this assignment, you will work on a real data science project. The goal of the project is to go through the complete data science process to answer questions you have about some topic of your own choosing. You will acquire the data, design your visualizations, run statistical analysis, and communicate the results.
There are a few milestones for your final project.
| Date | Assignment |
|---|---|
| November 10 | Project proposal |
| December 01 | Project update |
| December 15 | Project report |
| December 16 | Slides |
| December 16 | Project presentation |
Note that:
The proposal should be received by November 10, 2020.
The update (HW4) should be received by December 01, 2020.
The final report is composed of two parts:
The most important deliverable of your project is the set of RMarkdown and compiled HTML files by December 15, 2020. They should detail your steps in developing your solution, including how you collected the data, alternative solutions you tried, describing statistical methods you used, and the insights you got. Equally important to your final results is how you got there! Your RMarkdown and HTML files are the place you describe and document the space of possibilities you explored at each step of your project. We strongly advise you to include many visualizations.
Your RMarkdown should include the following topics. Depending on your project type, the amount of discussion you devote to each of them will vary:
Overview and Motivation: Provide an overview of the project goals and the motivation for it. Consider that this will be read by people who did not see your project proposal.
Related Work: Anything that inspired you, such as a paper, a website, or something we discussed in class.
Initial Questions: What questions are you trying to answer? How did these questions evolve over the course of the project? What new questions did you consider in the course of your analysis?
Data: Source, scraping method, cleanup, etc.
Exploratory Analysis: What visualizations did you use to look at your data in different ways? Justify the decisions you made, and show any major changes to your ideas. How did you reach these conclusions?
Modeling: What are the different statistical methods you considered? Why did you choose a given model? How about competing approaches?
Final Analysis: What did you learn about the data? How did you answer the questions? How can you justify your answers?
As this will be your only chance to describe your project in detail, make sure that your RMarkdown file and compiled HTML file are standalone documents that fully describe your process and results. For instructions on how to submit, please see Submission Instructions below.
As a side note, the following scale will be used to grade projects:
We expect you to write high-quality and readable R code in your RMarkdown file. You should strive for doing things the right way and think about aspects such as reproducibility, efficiency, cleaning data, etc. We also expect you to document your code.
Each team will prepare a seven minutes presentation showing a demo of your project and/or some slides.
We will strictly enforce the time limit, so please make sure you are not running longer. Use principles of good storytelling and presentations to get your key points across. Focus the majority of your presentation on your main contributions rather than on technical details. What do you feel is the best part of your project? What insights did you gain? What is the single most important thing you would like your audience to take away? Make sure it is upfront and center rather than at the end.
We use the following criteria to evaluate oral presentations:
The project presentations will be during class on December 16, 2020, and slides should be submitted by the same day. For instructions on how to submit, please see Submission Instructions below.
Fill in this form.
TBA
TBA
TBA


An artificial intelligence (AI) is a computer program which acts - according to its developers - intelligent. That could be anything. Typical examples are route finding algorithms, chess programs, ego shooter computer opponents and classifiers. The last category of AIs (classifiers) is huge and includes programs which try to find out what you were writing (see my bachelor's thesis), try to figure out who is on an image (face recognition) or what was spoken (automatic speech recognition).
Strong and Weak AIs
Science fiction literature distinguishes two kinds of AIs: Weak AIs and strong AIs.
Currently, we only know weak AIs. They can do incredible things (see A.I. in Computer Games and Awesome Robots), but that is nothing compared to a stong AI. Strong AIs are capable of adapting to completely new tasks. They can do creative work. In other words, they can do any task any human could do. They can do research and compose the most beautiful art. As they are machines which will be build by somebody (hence the term 'artificial'), they are better understood than our biological brains. Strong AIs will be able to understand how they work themselfes and very likely be able to improve themselfes.
This is the point where a technological singularity happens. The machines start developing faster than any human can comprehend how they improve. At some point they will even develop faster than humankind together can understand.
Now that you know the context, I would like to share an answer to the following question I've recently seen:
What would change with strong AIs?
What happens when machines take all of our jobs including creative/research/artistic ones?
Something like that would not happen instantly. It is a gradual process. Many answers say something like nothing would be scarce. Well, I think that is wrong for two reasons:
- Scarcity of resources: Oil, gold and diamonds are expensive. But they are not (only) expensive because it takes a high amount of work to get them, but also because the number of diamonds on earth is limited. More or cheaper "work hours" like much better AIs combined with much better robots would not solve that problem. Oh, and please don't forget energy!
- Distribution: I think we produce enough food so that nobody on earth would have to starve. We certainly have enough clean water for everybody. Why do so many people still starve and don't have access to clean water? Because the distribution is not equal. Europe and the US make use of much more resources per person than Africa does. The richest 1% of the US make use of MUCH more resources than the bottom 30% (I guess the numbers are more extreme). Who do you think would own the robots that take the jobs? Who would profit from this much cheaper work hours? I think AIs that would in principle be able to solve any problem a human could solve (e.g. creating art and conducting research) would cause serious social problems if we don't adapt to the new situation. Such AIs would have the potential for a much worse world than we currently live in.
However, with the right politics, it could vastly improve our world. Having the insight how such AIs work, we could make them decide ultimatively unbiased for a greater good. They could be used to arbitrate a dispute as a neutral, intelligent instance. They could accelerate research. They could help us to understand ourselves.
Job market
What is the effect of technological singularity in job market?
In a ideal world, everybody would only do the job he or she wants to do. We would eventually work less, but I think we would still work. Humans are resources and as such they will always be valuable in any economy.
Another, darker, scenario is that AIs would gradually remove whole industries, starting with simple ones. Taxi and truck drivers are not necessary. They could step-by-step be replaced by AIs. However, no new jobs would be created for those people. They would have to get aid by the government. But as they would get less money, the economy would focus on the people who have money. That would be the people who own the AIs. At some point people would realize that they will never be able to get a new job. Even worse, their children will never be able to get a job. Extreme poverty would rise as the state gets less taxes (as less goods are consumed, because people have less money). The AIs would predict how every single person would most likely act. How could they do so? Well, you have a smartphone. Your conversations on WhatsApp, Twitter, Facebook, Gmail, ... get tracked and automatically analyzed. You can be predicted to a certain degree. You can be influenced by personalized advertising. A really clever AI will make itself able to act in any possible scenario, replicate itself and make itself less dependent. In this dark scenario people would eventually start at some point to try to get more money from the people controlling the AIs, but how do you force them to do so? The police might also be replaced by AIs.
My guess is that the reality would be somewhere in between. A couple of super-rich people and the rest giving them massages.
A possible solution to those social problems
I've just described that AIs might cause serious social problems. However, I think we can solve those problems by making sure that income inequality cannot get too high. This means there should be very high and effective inheritance tax as well as a taxation system that prevents people from getting too rich / people too poor. The most extrem action to prevent too poor people is an unconditional income, the most extrem action to prevent people getting too rich is an upper limit on what somebody could have.
I think an unconditional income would be a good thing, but its hard to tell how high that should be.
The easiest way to prevent people from getting too rich is adding a tax system that adjusts to income:
- Your first 0 - 2000 Euro / month don't get taxed at all
- Your next 2001 - 3000 Euro / month get taxed with 0% + (100%/2) = 50%
- Your next 3001 - 4000 Euro / month get taxed with 50% + (50%/2) = 75%
- Your next 4001 - 5000 Euro / month get taxed with 75% + (25%/2) = 87.5%
- ...
You can (and should - I think my numbers are not well-chosen!) argue about the exact numbers, but I guess you get what I mean. The tax should never be 100%, thus leaving the possibility to get more money. But the difficulty to do so should increase. This effectively prevents that some people get too rich and hence resulting in a very instable system.
It would be important to do so before anybody develops a strong AI.
Related books, movies and talks
Books (all fiction)
- "Zero" by Marc Elsberg: People get controlled by life improvement apps in a very indirect way.
- Out-Series by Andreas Eschbach: A device was developed, that lets people connect their brains. A new form of conciousness develops from that.
- Brave new world by Aldous Huxley: People get distracted from issues by consuming many goods.
Movies (all fiction)
- Transcendence: The mind of one person gets transformed in a computer.
- I, Robot: An AI gets developed and very powerful humanoid robots get controlled by it.
Talks
- The rise of the new global super-rich: Technology is advancing in leaps and bounds — and so is economic inequality, says writer Chrystia Freeland. In an impassioned talk, she charts the rise of a new class of plutocrats (those who are extremely powerful because they are extremely wealthy), and suggests that globalization and new technology are actually fueling, rather than closing, the global income gap. Freeland lays out three problems with plutocracy … and one glimmer of hope.
And a coulple of talks by people who are not active within AI / ML research themselves:
- Nick Bostrom: "Superintelligence" - Strong AI is inevitable; we should set the initial conditions up the right way
- Sam Harris and Joe Rogan talking about artificial intelligence
- Max Tegmark and Nick Bostrom speak to the UN about the threat of AI
- UNICRI
Articles


Giftly
Gifts for the special person in your life!
Bevel
Bevel is the first end to end shaving system designed to reduce and prevent razor bumps and irritation, a common problem for people of color. The Bevel razor is a single blade safety razor that promises to reduce your razor bumps and prevent irritation for those with coarse, curly hair.
Milk and BrookiesWe first heard about this young company on an episode of the Shark Tank. Milk and Brookies is the brain child of Jovon English, along with her partners, Naimah Harris and Tisa Smart-Washington. Milk and Brookies is a mash-up of a brownie and cookie, hence the name Brookie. They offer specialty flavors such as red velvet, blondie, peanut butter, snickerdoodle, and much more. Brookies can be ordered online and are the perfect dessert for a company christmas party or gift


Data Visualization I - ATC
#
ID_1
ID_2
Distance
Id:
Reg:
From:
To:
Altitude:
Latitude:
Longtitude:
Time:


SwissMemeSupply
Overview
Upload
About
My Account
Login
My Account
Username
Select Profile Picture
Save


Helpers
CSS helper classes.
Examples
Margin bottom for block level
To keep the same bottom space of block level element or layout, use .rd-block-level-margin-bottom
class.
So, you can put this class into any element you want the same bottom space as block level element.
Source
Margin bottom for content level
To keep same bottom space of content level element or paragraph, use .rd-content-level-margin-bottom
class.
div
. This element add margin bottom as content level.Source
Clear float
Use .clearfix
class to clear any float CSS.
Source
Screen reader only
Use .screen-reader-only
class to show for screen reader only.
This is normal text. This is "for screen reader only" which does not appears on screen.
Source
Fade in/out
Begins with element that contain .rd-animation
, .fade
classes.
To fade out add the .fade-out
class, to fade in just remove the .fade-out
class.
Source
Responsive visibility
This text ->was hidden<- hidden in all screen sizes using .rd-hidden
class.
The text below will be hidden and visible in different screen size. Try to resize the browser to see it in action.
| Class | Extra small <= | Small - | Medium - | Large - | Extra large >= |
|---|---|---|---|---|---|
| Hidden | |||||
.hidden-only-… |
|||||
.hidden-under-… |
(always visible) | ||||
.hidden-under-equal-… |
(always hidden) | ||||
.hidden-over-… |
(always hidden) | ||||
.hidden-over-equal-… |
(always hidden) | ||||
| Visible | |||||
.visible-only-… |
xs |
sm |
md |
lg |
xl |
.visible-under-… |
xs (always hidden) |
sm |
md |
lg |
xl |
.visible-under-equal-… |
xs |
sm |
md |
lg |
xl (always visible) |
.visible-over-… |
xs |
sm |
md |
lg |
xl (always hidden) |
.visible-over-equal-… |
xs (always visible) |
sm |
md |
lg |
xl |
| Class | Extra small <= | Small - | Medium - | Large - | Extra large >= |
I'm extra small small medium large extra large screen size.


--- layout: post title: Pram date: '2016-08-06T05:43:35+02:00' categories: - Storyboards picture_url: https://film-Storyboards.tumblr.com/post/148537706676 ---


#include <uvm_resource_t.h>
Inheritance diagram for uvm::uvm_resource< T >:
Public Member Functions | |
| uvm_resource (const std::string &name, const std::string &scope="*\\.") | |
| Constructor. | |
| ~uvm_resource () | |
| Desstructor. | |
| void | set () |
| Add the resource to the back of the pool. | |
| void | set_override () |
| Add the resource to front the pool. | |
| T | read () |
| Return the object value. | |
| void | write (T value) |
| Modified the stored value of the object. | |
| const std::type_info & | get_value_type_id () |
| Get the type id of the value field. | |
Protected Attributes | |
| T | m_value |
Definition at line 36 of file uvm_resource_t.h.
| uvm::uvm_resource< T >::uvm_resource | ( | const std::string & | name, | |
| const std::string & | scope = "*\\." | |||
| ) | [inline] |
Constructor.
| name | - Name of resource | |
| scope | - Resource scope |
Definition at line 48 of file uvm_resource_t.h.


[gecode-users] Copiling with gcc on OpenSuSE 10.0
Vladimír Dusa
neachem at volny.cz
Tue Nov 29 12:33:55 CET 2005
Hi,
Thank you very much for your help. Now I can successfully compile the
project and I would like to describe "how did I made it" for other users:
I am using OpenSuSE 10.0 with KDevelop 3.2.2 as a tool for programming in
C/C++.
0. Install the gecode library:
a) ./configure
b) make install (examples will be not installed. It is needed to use only
"make" for installing examples. But then will be the gecode library
installed in the current folder. If "make install" is used, then was at me
gecode installed in the directory /usr/local/lib/...,
/usr/local/include/...)
1. Create new C++ Project (e.g. Simple Hello World program).
2. Compile this project.
3. In Menu Project/Project Options is there a section "Configure Options".
a) For debugging:
i) in "C/C++ preprocessor flags (CPPFLAGS):" should stay:
-I/usr/local/include/gecode (maybe -I$GPREFIX/include/gecode can be used)
ii) in "Compiler flags (CXXFLAGS):" should stay:
-L/usr/local/lib -O0 -g3 -lgecodeminimodel -
lgecodeset -lgecodeint -lgecodesearch -lgecodekernel (maybe -I$GPREFIX/lib
... can be used)
iii) Select OK and then in the message box "Re-run configure for debug
now?" select Yes.
4. As an example can be used following code (SEND+MORE=MONEY) in the main
project cpp file instead of original code from the wizard:
//begin of file **************************************
#include <iostream>
#include <cstdlib>
#include "minimodel.hh"
#include "search.hh"
using namespace std;
using namespace Gecode;
class Money: public Space{
private:
static const int nl = 8;
IntVarArray le;
public:
Money();
Money(bool share, Money &s): Space(share, s){
le.update(this, share, s.le);
}
Space* copy(bool share);
void print();
};
Money::Money(): le(this, nl, 0, 9)
{
IntVar s(le[0]), e(le[1]), n(le[2]), d(le[3]), m(le[4]), o(le[5]),
r(le[6]), y(le[7]); //variables
//s and m must not be = 0
rel(this, s, IRT_NQ, 0);
rel(this, m, IRT_NQ, 0);
//main money constraint
post(this,1000*s+100*e+10*n+d+1000*m+100*o+10*r+e==10000*m+1000*o+100*n+10*e
+y);
//it must not be two variables with same value (all variables must be
distinct)
distinct(this, le, ICL_DEF);
//search the tree
branch(this, le, BVAR_SIZE_MIN, BVAL_MIN);
};
Space* Money::copy(bool share){
return new Money(share,*this);
}
void Money::print() {
cout << "Solution:" << endl;
for (int i = 0; i < nl; i++)
cout << le[i] << " ";
cout << std::endl;
}
int main(int argc, char *argv[])
{
Money* m = new Money;
DFS<Money> e(m, 1, 1);
delete(m);
Money* ex = e.next();
while(ex){
ex->print();
delete(ex);
ex = e.next();
}
return EXIT_SUCCESS;
}
//end of file **************************************
After compiling this code should be everything ok. For compiling as
"optimized" should be used some different flags in 3)a)i) and 3)a)ii). This
flags for optimisation can be found in the makefile in the gecode directory.
Now I do not need it :-). The moment I now what flags must be set for
optimized compilation, I write it here.
Thank you very much again.
Best regards from Prag
Vladimir Dusa
-----Original Message-----
From: tack at ps.uni-sb.de [mailto:tack at ps.uni-sb.de]
Sent: Saturday, November 26, 2005 3:07 PM
To: Vladimír Dusa
Cc: users at gecode.org
Subject: RE: [gecode-users] Copiling with gcc on OpenSuSE 10.0
Hi.
> Hello,
>
> Maybe I have explained my problem not good. I would like to use gecode for
> solving my problems. If I try to include some gecode header file (e.g.
> #include "minimodel.hh"), I become similar errors as in previous email. I
> used the money.cc as an example. If I make an "empty" cpp file (let's say
> test.cpp):
Sorry, I should have read your first mail more carefully. I think there
are two problems with the way you try to compile your example: you use
gcc, which doesn't like .cc as input file name, and you don't link against
the gecode library.
The easiest way to try your own examples is to copy them into the examples
folder. Assuming your example is called myexample.cc, just do
make examples/myexample
in the Gecode main directory. This will use our Makefile rules to build
your example.
If this works, you can look at the g++ invocation that built your example
and use similar options for building your stuff in other directories.
After installation, you should be able to use the options you saw when
invoking make example/myexample, but add -I<prefix>/include
-L<prefix>/lib.
Hope this helps,
Guido
More information about the gecode-users
mailing list


Learn about our project
Back-End
To be able to easily access our post classifying model we needed to put it in a web application online to create an interface with which a user can access that algorithm. You can type a potential post and get a suggestion of 5 subreddits that would be the most relevant or you can save it for later. You are also able to delete old posts after you have saved them.
-We use react to build front end :
Components
State management
Account system
Reddit posts Storing and Deletion.
-For the Back-End we built it using knex , heroku, postgres, Js and node modules :
Data Base
Tables
API End-points
User Authentication
Users can create an account and login they can send a post to our external api which will determine what the best subreddits for that post are. A user can then archive the post and will save that on our back end so that they can access it and change it any time they login
Algorithm
The first step for any data science problem is the data itself. When we started scraping reddit posts we searched about 100 of the most popular subreddits, plus a few we handpicked ourselves, and kept the ones that actually had text posts. It wouldn’t make sense for us to tell you to post your story in r/gifs would it? Once we were done we had over 31 thousand posts to work with, among 50 different subreddits.
Now that we had all these posts, we approached the problem as a document similarity one. To put it simply, our model takes a new post and decides which other posts it is most similar to. This works with any kind of classification model, so we tried many different kinds to see which would work best. The clear winner by far was a Random Forest model, our final version achieved 63% accuracy. And remember, if you randomly picked between 50 different categories you would only be correct 2% of the time! And when you consider the 3 or 5 most likely subreddits like our app does, it gets even more accurate.
Of course, this was all in a one week project. Given more time there would be tons of things we could do to improve this product, such as gathering more data, extensive cleaning, and model optimization.
Subreddits included:
- buildapc
- Jokes
- personalfinance
- nosleep
- dadjokes
- tifu
- history
- relationships
- TwoXChromosomes
- IAmA
- askscience
- Fitness
- leagueoflegends
- MachineLearning
- LifeProTips
- travel
- webdev
- nba
- books
- PS4
- atheism
- explainlikeimfive
- pcmasterrace
- Overwatch
- movies
- pokemon
- gameofthrones
- television
- malefashionadvice
- Music
- trees
- Android
- gaming
- lifehacks
- WritingPrompts
- Games
- DIY
- Showerthoughts
- space
- Futurology
- Tinder
- soccer
- politics
- listentothis
- philosophy
- GetMotivated
- europe
- gadgets
- technology
- tattoos


);>
Home
Services
AboutUs
Sign Up
Login
Dashboard
Full Details
First Names
Last Name
Contact
Gender
Position
Email
City
Area


Authorities: Family of 3 found dead was murder-suicide
NORRISTOWN, Pa. (AP) - Authorities in Pennsylvania say a woman stabbed her parents to death before turning the weapon on herself.
The Montgomery County District Attorney's Office said Thursday that the three people found dead in an Erdenheim, Springfield Township, home was a murder-suicide.
Authorities say 71-year-old Robert McIntyre and 71-year-old Sheila Dolan were found with stabs wounds and head injuries.
Their daughter, 27-year-old Julia McIntyre, died of self-inflicted stab wounds.
The bodies were discovered Monday evening during a wellness check.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4
Soft-shell crabs are surprisingly easy to cook at home because almost all the crab can be eaten saving lots of preparation time.
For the vodka and tonic soft shell crab, preheat a deep fat fryer to 190C/370F. (CAUTION: do not leave unattended. Hot oil can be dangerous.)
Mix the yeast, salt and sugar in a bowl until well combined. Pour in the tonic water and whisk in the flour, vodka and vinegar. Set aside to ferment – it is ready to use when the mixture starts to bubble.
Dip the crabs in the batter and place in the deep fat fryer for 3-4 minutes, turning two or three times, until golden-brown and crisp. Carefully remove the crabs from the hot oil using a slotted spoon, place on a plate lined with kitchen paper and season with salt.
For the saffron aioli, place the garlic and white wine in a pan and cook for a few minutes. Drain and reserve the garlic.
Place the egg yolks in a food processor, add the vinegar, Dijon mustard and salt. Blend until smooth, then with the motor running, gradually add the oil in a slow trickle until the mixture resembles mayonnaise. Add the saffron and garlic and blend to combine. Add lemon juice to taste.
For the seasonal salad, place all the leaves in a large bowl and mix. Place the oil, vinegar and lemon juice in a small bowl and whisk. Pour over the salad and mix.
To serve, place the crab on serving plates with the salad next to it and the saffron aioli in a small dish. Scatter the spring onions over the crab.