9. Monitoring¶
Default monitoring of the stack is based on Prometheus.
9.1. Introduction¶
This monitoring documentation has multiple aims:
Provide an overview of Prometheus and the different exporters.
Provide instructions on how to add exporters to nodes, and how you could add your own exporters.
Provide instructions on alerting configuration.
Provide an overview of Grafana and the different dashboard.
This documentation is built around those section:
Prometheus
Alerts
Grafana
Exporters
9.2. Prometheus¶
In this topic, we will see how to configure and deploy both prometheus_server and prometheus_client Ansible roles.
9.2.1. Prerequisites¶
Have ansible installed
Know how to use playbooks
Also, make sure those packages are present on your system (they should be in the bluebanquise or any other repository):
prometheus
alertmanager
karma
ipmi_exporter
snmp_exporter
grafana
9.2.2. Installation¶
<IP_ADDRESS>. Prometheus Server¶
First create file /etc/bluebanquise/inventory/group_vars/all/addons/prometheus.yml with the following content:
prometheus:
scrape_interval: 1m
evaluation_interval: 2m
alertmanager:
group_wait: 1m
group_interval: 10m
repeat_interval: 3h
Now, simply add to the playbook of your choice (which is for the Prometheus server) the prometheus_server role (change the values of enable_services and start_services accordingly):
vars:
- enable_services: true
- start_services: true
roles:
- role: prometheus_server
tags: prometheus_server
Then run:
ansible-playbook /etc/ansible/playbooks/<your server playbook> --tags prometheus_server
Now prometheus_server should be installed and configured with a minimal configuration.
The configuration file for Prometheus is located under /etc/prometheus/prometheus.yml. It contains all the exporters to scrape, and more.
It is now time to configure client side. Note that while the /etc/bluebanquise/inventory/group_vars/all/addons/prometheus.yml file is only used by the prometheus_server role, the client files seen in next section will be shared by both server and client role. Server will use it to know which exporters to scrap on who, and clients will use it to know which exporters to install locally.
<IP_ADDRESS>. Prometheus Client¶
For each equipment_profile, create a file called monitoring.yml that contains the desired exporters to be deployed, into equipment_profile folder of your target hosts groups.
For example, to set exporters to be scrapped and installed on all hosts of equipment_profile equipment_XX, create the file /etc/ansible/inventory/group_vars/equipment_XX/monitoring.yml, with the following content:
monitoring:
exporters:
node_exporter:
package: node_exporter
service: node_exporter
port: 9100
ha_cluster_exporter:
package: ha_cluster_exporter
service: ha_cluster_exporter
scrape_interval: 10m
scrape_timeout: 4m
port: 9664
This will setup here two exporters on these equipments: node_exporter and ha_cluster_exporter.
Also don’t forget to add the name of the package you want to install and the service name.
Note
As you can see, you can also add the scrape_interval (which is how often the metrics get scraped), and the scrape_timeout (which represents how long until a scrape request times out).
Note
If you want to add exporters, make sure your package contains the binary and the .service file, put preferably under /usr/local/bin and /etc/systemd/system.
Now simply add to the playbook of your choice (which is for the Prometheus clients) the prometheus_client role (change the values of enable_services and start_services accordingly):
vars:
- enable_services: true
- start_services: true
roles:
- role: prometheus_client
tags: prometheus_client
Then run:
ansible-playbook /etc/ansible/playbooks/<your client playbook> --tags prometheus_client
Now prometheus_client should be installed.
Also, re-execute the prometheus_server role on the management node hosting the Prometheus server, to ensure Prometheus is now aware of these new exporters to scrape.
ansible-playbook /etc/ansible/playbooks/<your server playbook> --tags prometheus_server
9.2.3. Prometheus.yml¶
File /etc/prometheus/prometheus.yml is where all the exporters and the scrape related variables are stored for the Prometheus server to run. It looks something like this:
global:
scrape_interval: 1m
evaluation_interval: 2m
rule_files:
- 'alerts/*.yml'
alerting:
alertmanagers:
- static_configs:
- targets:
- localhost:9093
scrape_configs:
# I watch myself
- job_name: 'prometheus_master'
scrape_interval: 30s
static_configs:
- targets: ['localhost:9090']
# GENERIC EXPORTER
# All equipment profiles and their exporters
- job_name: 'equipment_R_node_exporter'
scrape_interval:
scrape_timeout:
static_configs:
- targets: ['management1-1:9100']
- targets: ['management1-2:9100']
Few notes:
rule_files is where the alert related configurations are located
alerting is where Prometheus should send alerts (i.e. Alertmanager)
scrape_configs is where are defined all the exporters that server need to listen to, with the targets, and so on
It is now time to learn variables before using them in the Prometheus interface.
9.2.4. Variables¶
There are 4 types of variable in Prometheus:
Counters
Gauges
Histograms
Summaries
<IP_ADDRESS>. Counters¶
Counters are used for metrics that can only increase. It is an incremental counter, that is used in order to know how rapidly something grows for example.
Note
For example, it is used for the number of packets that is transmitted by a switch interface. Using the irate function of Prometheus, we can then tell how many packets were transmitted in a given interval.
It can also be used for error counts, tasks completed, and so on.
<IP_ADDRESS>. Gauges¶
Gauges are used for metrics that can go up, but can also decrease. It gives a specific value for the time set.
Note
For example, it is used for the temperature of the BMCs. This way, you have the temperature for any given time. It can also be used for memory usage, number of requests, and so on.
It can be used with function like min, max, average, and so on to get the desired result.
<IP_ADDRESS>. Histograms & Summaries¶
Histograms and summaries are more complex variable types, and are used less often, which is the reason why we won’t go too much in the details. Histograms and summaries are both used for getting the request durations, or the response sizes. Their main goal is to watch for data that fall in a certain category.
9.2.5. Queries¶
In order to query a metric with Prometheus, you have to go to the Prometheus web page. By default, it is located at http://localhost:9090 .
To query a metric, simply type in the metric name. You also have a dropdown list with all the available metrics to query.
If you want specific metrics (with one or more specific labels):
query_name{instance="instance"}
For example, ipmi_fan_speed_rpm{name=”P-FAN1”} will only return the fan_speed of the fan name “P-FAN-1”:
In the graph tab, you can also see the variation of the value over time. You can also choose from when to when.
<IP_ADDRESS>. Regex¶
You can also use the same queries, but with regex.
If you want the attribute to follow the given regex, the global syntax for is:
query{attribute=~"regex_value"}
Or if you don’t want the attribute to follow the regex:
query{attribute!~"regex_value"}
Note
The tilda here is very important.
Using this syntax, you can:
get the metrics which attribute corresponds to a list
For example:
ipmi_fan_speed_rpm{name=~"MB-FAN5|MB-FAN4|S-FAN2"}
will return:
follow a pattern
For example:
ipmi_fan_speed_rpm{name=~".*.FAN.*"}
will return all the ipmi_fan_speed_rpm metrics with the string “FAN” in its name label.
Another example:
ipmi_fan_speed_rpm{__name__=~"ipmi.*",instance=~"001-bmc"}
will return all the metrics which name starts with ipmi, and which instance is 001-bmc.
<IP_ADDRESS>. Boolean operators¶
You can also combine different metrics, using boolean operators. There are several operators in Prometheus. Some of them are the following:
== (equal)
!= (not-equal)
> (greater-than)
< (less-than)
>= (greater-or-equal)
<= (less-or-equal)
These are used in order to get the results that correspond to the condition. For example:
ipmi_up==1
will only return the instances of the query that are equal to one.
It is also possible to use logic operators:
and (intersection)
or (union)
unless (complement)
Vector1 and vector2 results in a vector consisting of the elements of vector1 for which there are elements in vector2 with exactly matching label sets. Other elements are dropped. The metric name and values are carried over from the left-hand side vector.
For example:
node_exporter_build_info and ignoring(revision, version,goversion,branch,package) node_cpu_package_throttles_total
will return:
node_exporter_build_info{branch="HEAD",goversion="go1.12.5",instance="1-2:9100",job="equipment_R_node_exporter",revision="3db77732e925c08f675d7404a8c46466b2ece83e",version="0.18.1"}
because it has the same instance name and job name as a node_cpu_package_throttles_total.
Vector1 or vector2 results in a vector that contains all original elements (label sets + values) of vector1 and additionally all elements of vector2 which do not have matching label sets in vector1.
For example:
node_exporter_build_info or node_cpu_package_throttles_total
will return:
node_exporter_build_info{branch="HEAD",goversion="go1.12.5",instance="1-2:9100",job="equipment_R_node_exporter",revision="3db77732e925c08f675d7404a8c46466b2ece83e",version="0.18.1"}
node_cpu_package_throttles_total{instance="1-2:9100",job="equipment_R_node_exporter",package="0"}
node_cpu_package_throttles_total{instance="1-2:9100",job="equipment_R_node_exporter",package="1"}
Vector1 unless vector2 results in a vector consisting of the elements of vector1 for which there are no elements in vector2 with exactly matching label sets. All matching elements in both vectors are dropped.
There are also other types of boolean operators, like group_left or group_right, in the online documentation.
<IP_ADDRESS>. Functions & aggregations¶
Prometheus comes with a variety of querying functions. We will go through some of the major ones:
delta
irate
avg
sum
min, max
<IP_ADDRESS>.1. delta¶
delta() calculates the difference of value between the value from X minutes ago and the current value.
Example:
delta(ipmi_current_amperes[5m])
<IP_ADDRESS>.2. rate & irate¶
rate() gives you the per second average rate of change over your range interval. irate() is the per second rate of change at the end of your range interval
The difference between rate and delta, is that rate automatically adjusts for resets. It means that it only works with “counter” variables, i.e. a variable that can only increase. For example, if a metric value changes like this:
0
4
6
10
and resets:
2
Rate will capture the change, and will take the value of 2 as if it were 12 to get the rate.
<IP_ADDRESS>.3. avg¶
avg() returns the average value of all query results.
By default, it returns the avg value by job:
avg(ipmi_current_amperes)
But you can also average by any other attribute, using avg(query) by(attribute):
<IP_ADDRESS>.4. avg_over_time¶
avg_over_time() is self explanatory, it gives you the average value of a metric during the given interval, for each instance.
For example if ipmi_current_amperes had the values: 2, 4, 6 in the last 5m:
avgi_over_time(ipmi_current_amperes[5m])
would return 4.
output example:
<IP_ADDRESS>.5. sum, min, max¶
Self explanatory. Works the same way as avg, and can be used with _over_time too.
9.2.6. Alerts¶
Alerts are located in the /etc/prometheus/alerts/ directory.
An example of alert:
groups:
- name: Alerts for nodes
rules:
- alert: high_RAM_ Usage
expr: (1 - (node_memory_MemAvailable_bytes{job=~".*.R.*"} / (node_memory_MemTotal_bytes{job=~".*.R.*"})))* 100 > 90
for: 1m
labels:
severity: warning
annotations:
summary: " (instance {{ $labels.instance }})"
description: "memory usage greater than 90% \n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
This alert will be seen as pending by Prometheus when the condition in expr: is verified, in this case, when the percentage of used RAM is greater than 90%. It will seen as firing when the condition is met for X minutes, hours, or days, X being in the for field. It will be fired with an extra label called severity, which is set to warning in this case. The annotations section is here to set a summary and description of the alert. You can access the variables of the metric by using de global variables {{ $value }} or {{ $labels }}.
Tip: if you need a same alert to fire a warning after a t_1 desired time, and then fire a critical after a longer t_2 time, duplicate the alert, with the exact same name and arguments, changing only for and severity. The Alertmanager configuration is made to handle these case: when same name, a critical alert will overlap a warning alert.
<IP_ADDRESS>. Alertmanager¶
Alertmanager is an additional tool for Prometheus, used to manage alerts.
Alertmanager DO NOT evaluate alerts, this is Prometheus task. Alertmanager is a tool to manage alerts already fired by Prometheus.
By default, it’s located under the management node’s ip address, port 9093. Configuration file of Alertmanager is under /etc/alertmanager/alertmanager.yml.
By default it looks like this:
global:
smtp_smarthost: 'localhost:25'
smtp_from: 'alertmanager@your_domain'
smtp_require_tls: false
route:
group_by: ['alertname', 'job']
group_wait: 1m
group_interval: 10m
repeat_interval: 3h
receiver: sys-admin-team
receivers:
- name: 'sys-admin-team'
email_configs:
- to<EMAIL_ADDRESS>inhibit_rules:
- source_match:
severity: 'critical'
target_match:
severity: 'warning'
equal: ['alertname', 'cluster', 'service']
You can find more about it here:
And here are examples of some alerts:
9.3. Grafana¶
In this topic, we will see how to install Grafana, using the provided rpms.
9.3.1. Installation¶
<IP_ADDRESS>. Manual installation¶
There should be a package for grafana under the bluebanquise repository.
By running the following command:
dnf install grafana # (RHEL8)
yum install grafana # (RHEL7)
It should install grafana-server.
9.3.2. Useful Files¶
The service is located under /usr/lib/systemd/system/grafana-server.service
The binary under /usr/sbin/grafana-server
Grafana datas (dashboards, and so on) are stored under /var/lib/grafana/grafana.db
Grafana default settings under /usr/share/grafana/conf/default.ini
Now, log into Grafana at http://localhost:3000, using default credentials admin / admin.
9.3.3. Dashboard¶
A dashboard is made of Query and Alerts.
<IP_ADDRESS>. Query¶
<IP_ADDRESS>.1. metrics field¶
This section is where you put Prometheus metric queries. See the Prometheus section of the documentation for more information about the metrics (functions, different types of variables, show only certain instances) as both tools share the same syntax.
By default, it shows you the requested metric in a graph panel.
<IP_ADDRESS>.2. legend field¶
You can choose here what the legend will look like.
syntaxe: {{ metric label }}text_you_want
By default, it will show the whole metric. Example:
By example:
{{instance}}:toto:{{device}}
Will provides:
<IP_ADDRESS>.3. min step and resolution¶
Note
It is recommended not to change the min step and Resolution.
<IP_ADDRESS>.4. format¶
Time series or table or heatmap. It is recommended to choose timeseries if you desire to make a graph.
<IP_ADDRESS>.5. instant¶
If you only want to have the latest scraped metric. Useful when using tables.
<IP_ADDRESS>. Transform¶
Note
The transform tab is new with Grafana 7, and is still in development.
Mainly useful when using graphs. Allows you to show the things you want in the table, by reducing, filtering, joining metrics, and organizing fields.
For example :
Here, we have 3 queries, but if you make no transform, it will look like this:
So we need to make the following transformations to get the desired table:
Filter by name, to only take the values that we want.
Outer Join, to join the query values into one table (query A,query B,query C) here we join on ifName because it’s the common value between the queries that we want to use.
Organize field, to put everything where we want, and to rename de fields Value B and Value C (values of the queries) to show what they represent.
With this transformation:
You get the following result:
You can find more about the different transformations here: https://grafana.com/docs/grafana/latest/panels/transformations/
<IP_ADDRESS>. Alert¶
You can create alerts in Grafana, by setting up conditions. It is pretty much self-explanatory, but if you want more info, you can check this link: https://grafana.com/docs/grafana/latest/alerting/create-alerts/
Note that alerts defined in Grafana are not related to alerts defined in Prometheus.
Note also that using plugins, it is possible to import into Grafana alerts registered into Alertmanager.
9.3.4. Types of Visualization¶
By default, there are 11 different types of visualization, but you can install more using the plugin list. You can find them here: https://grafana.com/grafana/plugins?direction=asc&orderBy=weight&type=panel
In this documentation, we will go through 2 of the most used ones, as they have approximately all the options that other types of visualization have.
<IP_ADDRESS>. Graph¶
<IP_ADDRESS>.1. Panel¶
<IP_ADDRESS>.1.1. Display¶
Here, you can choose the design of your graph. You can fidget with the options to get your desired graph. If you want more info, check https://grafana.com/docs/grafana/latest/panels/visualizations/graph-panel/
<IP_ADDRESS>.1.2. Series override¶
In this section, you have access to even more customization. It allows you to customize only certain series, using regex. Here is a detailed example on how to use it: https://community.grafana.com/t/advanced-graphing-part1-style-overrides/207
<IP_ADDRESS>.1.3. Axes¶
Choose the units of the axes, and relabel them. You can also add mins and maxs. You can have more info here:
<IP_ADDRESS>.1.4. Legend¶
Legend related options, you can show the legend as a table, add min, max, avg, current values.
<IP_ADDRESS>.1.5. Thresholds¶
The threshold lets you change the background color when the value is less than or greater than the chosen value.
<IP_ADDRESS>.1.6. Time regions¶
Allows to highlight certain time regions of the graph, not used very often.
<IP_ADDRESS>.1.7. Data links, links¶
Here, you can add links to different graphs, using the URL. For more info, check here: https://grafana.com/docs/grafana/latest/linking/data-links/
<IP_ADDRESS>. Bar gauge¶
<IP_ADDRESS>.1. Panel¶
<IP_ADDRESS>.1.1. Display¶
You can choose between two options in the show option. Calculate will show you the result of the calculation (First Value, Last Value, and so on), whereas All Values will show you all the values scraped in the last XX minutes. You can choose the max number of results in the Limit field. You can also choose the orientation and the display mode (aesthetics)
<IP_ADDRESS>.1.2. Links¶
Cf above.
<IP_ADDRESS>.1.3. Repeat options¶
If activated, will show the panel X times in the dashboard, with X being the number of results we get.
for example with the repeat option enabled:
without the repeat option enabled:
as you can see, in one case, you get the results in different panels, and in the other case you get the results in the same panel.
<IP_ADDRESS>.2. Field¶
<IP_ADDRESS>.2.1. Unit¶
Self-explanatory, choose the unit, min, max and the display name for the values.
<IP_ADDRESS>.2.2. Thresholds¶
Changes the color of the bars according to what is put in the threshold.
Example:
<IP_ADDRESS>.2.3. Value mapping¶
Transforms the values into text.
Example:
Here, we know that if the metric’s value is 1, it means that it is up, 2 down, and so on. So we map those values accordingly.
<IP_ADDRESS>.2.4. Data links¶
See above.
<IP_ADDRESS>.3. Override¶
Override lets you override some values, by filtering fields. However, it is still a beta option.
For more info check above.
9.3.5. Extra¶
<IP_ADDRESS>. Variables¶
To access get variables like these:
first, go to the top right corner of Grafana:
go to variable:
Then, enter a query to get the results you want to transform as a variable. For example:
By doing this query you get the different instances of ifOutOctets. Without the regex used like that:
you should get results like that:
However, by using the regex seen above, we get results that can be later used with some queries, like for example:
ifConnectorPresent{ifName=~"$interface"}
with $interface the name of our variable.
Note
Here, we use =~ in order to accept special regex characters, like .* for example. You can see more about that in the Prometheus part of the documentation
<IP_ADDRESS>. Main Dashboard¶
To create a main dashboard, simply create a new dashboard, and choose visualization style “Dashboard list”, you should get something like that:
Choose the Search option and then simply choose the folder that you want to list.
By clicking on the dashboard links, you get redirected to them.
9.4. Exporters¶
Multiple exporters are available for Prometheus. Most of them can be found here: https://prometheus.io/docs/instrumenting/exporters/
We will go through some of them.
9.4.1. Node_exporter¶
By default, runs under the port 9100
9.4.2. Ipmi_exporter¶
By default, runs under the port 9290
9.4.3. Snmp_exporter¶
By default, runs under the port 9116
9.4.4. Ha_cluster_exporter¶
By default, runs under the port 9664
9.4.5. Slurm_exporter¶
By default, runs under the port 9817
9.5. Node_exporter¶
The node_exporter is an official exporter from Prometheus, and can be found here: https://github.com/prometheus/node_exporter
By default, the node_exporter runs under the port 9100.
To access the metrics, either do:
curl http://localhost:9100/metrics
or access it directly in a browser. However, using curl can be handy, because you can grep the output, and do other nice things with it.
You should get something like this:
# HELP node_vmstat_pgpgin /proc/vmstat information field pgpgin.
# TYPE node_vmstat_pgpgin untyped
node_vmstat_pgpgin 2.25160698e+08
# HELP node_vmstat_pgpgout /proc/vmstat information field pgpgout.
# TYPE node_vmstat_pgpgout untyped
node_vmstat_pgpgout 1.18421998e+09
# HELP node_vmstat_pswpin /proc/vmstat information field pswpin.
# TYPE node_vmstat_pswpin untyped
node_vmstat_pswpin 47719
# HELP node_vmstat_pswpout /proc/vmstat information field pswpout.
# TYPE node_vmstat_pswpout untyped
node_vmstat_pswpout 532036
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 20272.88
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1024
There are a lot of information given by node_exporter. It is an heavy exporter, that is generally not run on compute nodes, in order to prevent any loss of computational power.
Some of the information given are the following:
Cpu core throttle
Cpu max,min,scaled frequency
Cpu time spent in each mode
Discards total time
Disk information (discard time,discarded sectors,discards completed, discards merged,disk io, disk io time, disk io time weighted seconds, disk read bytes, disk read time,…)
Filesystem (avail bytes, errors, mount points,etc…)
Temperature sensors values
Infiniband
Memory usage, etc…
Network( mtu bytes, protocols, received bytes, etc…)
Nfs requests
Scrape
Etc…
You can see more by looking at the local metrics.
9.5.1. Alerts¶
All the alerts for the node_exporter are stored under /etc/prometheus/alerts/node.yml
Some of them include :
High RAM usage
High CPU usage
High mount volume
Host out of inodes
Unusual disk write latency
etc…
9.5.2. Start service¶
To start the service, simply run:
systemctl start node_exporter
Note
all exporter services are under the /etc/systemd/system directory, and most binaries are under the /usr/local/bin directory
9.5.3. Dashboard¶
Grafana open source dashboard:
General info (structure, release, system, version,domain name)
CPU Busy
Used RAM, Used Max Mount, CPU IO wait, CPU Cores, etc..
Mounts (Available, used, etc…)
System load
CPU Basic
To access the dashboard: access the management at http://localhost:3000
You can also do some “port forwarding” to reach Grafana.
9.6. Ipmi_exporter¶
The ipmi_exporter is an official Prometheus exporter, and can be found here: https://github.com/soundcloud/ipmi_exporter
By default, the ipmi_exporter runs under the port 9290.
To access the metrics, either do:
curl 'http://localhost:9290/ipmi?target=mgmt1-1-bmc&module=equipment_R_E4m'
Note
here, the request is http://<ip address of where the exporter is located>/snmp?target=<name of the taget to get metrics from>&module=<module>
Note
you can get the list of all modules here: /etc/ipmi_exporter/ipmi_config.yml
or you can access it directly in a browser. However, using curl can be handy, because you can grep the output, and do other nice things with it.
You can get a list of all modules under /etc/ipmi_exporter/ipmi_config.yml
The ipmi_config file is automatically generated by the ansible prometheus_server role.
You should get something like this:
# HELP ipmi_bmc_info Constant metric with value '1' providing details about the BMC.
# TYPE ipmi_bmc_info gauge
ipmi_bmc_info{firmware_revision="3.70",manufacturer_id="Super Micro Computer Inc. (10876)"} 1
# HELP ipmi_chassis_power_state Current power state (1=on, 0=off).
# TYPE ipmi_chassis_power_state gauge
ipmi_chassis_power_state 1
# HELP ipmi_fan_speed_rpm Fan speed in rotations per minute.
# TYPE ipmi_fan_speed_rpm gauge
ipmi_fan_speed_rpm{id="1679",name="P-FAN1"} 7000
ipmi_fan_speed_rpm{id="1746",name="P-FAN2"} 6600
ipmi_fan_speed_rpm{id="1813",name="S-FAN1"} 7300
ipmi_fan_speed_rpm{id="1880",name="S-FAN2"} 7500
ipmi_fan_speed_rpm{id="1947",name="MB-FAN4"} 7400
ipmi_fan_speed_rpm{id="2014",name="MB-FAN5"} 7100
# HELP ipmi_fan_speed_state Reported state of a fan speed sensor (0=nominal, 1=warning, 2=critical).
# TYPE ipmi_fan_speed_state gauge
ipmi_fan_speed_state{id="1679",name="P-FAN1"} 0
Some of the information given are the following:
Fan speed
Power consumption in watts
Temperature (multiple sensors)
Voltage
Amperes
Etc…
You can see more by looking at the local metrics.
9.6.1. Alerts¶
All the alerts for the ipmi_exporter are stored under /etc/prometheus/alerts/ipmi.yml
Some of them include :
High fan speed
Fan speed too high
High power consumption
Power consumption too high
Problem with powers supply
High ipmi temperature
Ipmi temperature too high
Scraping problem
High voltage
Voltage too high
9.6.2. Start service¶
To start the service, simply type:
systemctl start ipmi_exporter
You can change the BMC options of the inventory groups (compute nodes or management nodes) under /etc/ipmi_exporter/ipmi_config.yml
By default, it should look like this:
modules:
equipment_compute_C:
user: user
pass: password
driver: "LAN_2_0"
privilege: "user"
timeout: 10000
collectors:
- bmc
- ipmi
- chassis
exclude_sensor_ids:
equipment_R_E4m:
user: ADMIN
pass: ADMIN
driver: "LAN_2_0"
privilege: "user"
timeout: 10000
collectors:
- bmc
- ipmi
- chassis
exclude_sensor_ids:
If you modify the BMC username or password, don’t forget to check the changes in this file.
9.6.3. Dashboard¶
There are several dashboards for ipmi.
They give the following:
Fan speed (min,max,avg,current) graph
Temperature ( per sensors)
Average Temperature of all sensors (min,max,avg,current)
Alerts (warnings and critical)
Power consumption (min,max,avg,current)
Voltage (per sensors)
Amperes
etc…
9.7. Ha_cluster_exporter¶
The ha_cluster_exporter is an open source exporter, and can be found here: https://github.com/ClusterLabs/ha_cluster_exporter
By default, the ha_cluster_exorter runs under the port 9664.
To access the metrics, either do:
curl http://localhost:9664/metrics
Or access it directly in a browser. However, using curl can be handy, because you can grep the output, and do other nice things with it.
You should get something like this:
# HELP ha_cluster_corosync_member_votes How many votes each member node has contributed with to the current quorum
# TYPE ha_cluster_corosync_member_votes gauge
ha_cluster_corosync_member_votes{local="true",node="mgmt1-2",node_id="1"} 1
# HELP ha_cluster_corosync_quorate Whether or not the cluster is quorate
# TYPE ha_cluster_corosync_quorate gauge
ha_cluster_corosync_quorate 1
# HELP ha_cluster_corosync_quorum_votes Cluster quorum votes; one line per type
# TYPE ha_cluster_corosync_quorum_votes gauge
ha_cluster_corosync_quorum_votes{type="expected_votes"} 2
ha_cluster_corosync_quorum_votes{type="highest_expected"} 2
ha_cluster_corosync_quorum_votes{type="quorum"} 1
ha_cluster_corosync_quorum_votes{type="total_votes"} 1
# HELP ha_cluster_corosync_ring_errors The total number of faulty corosync rings
# TYPE ha_cluster_corosync_ring_errors gauge
ha_cluster_corosync_ring_errors 0
# HELP ha_cluster_pacemaker_config_last_change The timestamp of the last change of the cluster configuration
# TYPE ha_cluster_pacemaker_config_last_change counter
ha_cluster_pacemaker_config_last_change 1.593617322e+09
# HELP ha_cluster_pacemaker_fail_count The Fail count number per node and resource id
# TYPE ha_cluster_pacemaker_fail_count gauge
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-conman"} 0
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-data-http"} 0
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-data-pgsql"} 0
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-grafana-database"} 0
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-prometheus-database"} 0
ha_cluster_pacemaker_fail_count{node="mgmt1-2",resource="fs-rsyslog"} 0
Some of the information given are the following:
Pacemaker fails
Pacemaker constraints
Pacemaker migration threshold
Pacemaker node status
Status of Pacemaker resources
Pacemaker stonith (enabled or not)
You can see more by looking at the local metrics, and by checking the github page.
9.7.1. Alerts¶
All the alerts for the node_exporter are stored under /etc/prometheus/alerts/ha.yml
Some of them include :
Not quorate
Long standby
Failed services
Failed resources
Failcount>migration threshold
Stonith not enabled
Negative location constraints
9.7.2. Start service¶
To start the service, simply run:
systemctl start ha_cluster_exporter
Note
All exporter services are under the /etc/systemd/system directory, and most binaries are under the /usr/local/bin directory.
9.7.3. Dashboards¶
there are several dashboards for the ha.
Here is what they show:
Pacemaker nodes (Total nodes, online nodes, expected up, DC)
Quorum votes (expected votes, highest expected vote, total votes)
Is quorate?
Ring errors
Last pacemaker change
Resources (names, agent,status,…)
Alerts (name, severity, instance…)
Etc…
9.8. Snmp_exporter¶
The snmp_exporter can be found here: https://github.com/prometheus/snmp_exporter
By default, the snmp_exorter runs under the port 9116.
This exporter, along with the ipmi exporter, is a little special, as it executes snmp commands on the targets. So we can get the metrics of all the targets with the exporter running locally on our management server.
To access the metrics, do:
Note
here, the request is http://<ip address of where the exporter is located>/snmp?target=<ip address of the switch that we want the metrics from>
Otherwise we can access it directly in a browser. However, using curl can be handy, because you can grep the output, and do other nice things with it.
You should get something like this:
# HELP ifAdminStatus The desired state of the interface - <IP_ADDRESS>.<IP_ADDRESS>.1.7
# TYPE ifAdminStatus gauge
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="1",ifName="Gi0/0"} 2
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="10",ifName="Gi1/0/3"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="11",ifName="Gi1/0/4"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="12",ifName="Gi1/0/5"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="13",ifName="Gi1/0/6"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="2",ifName="Nu0"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="20",ifName="Gi1/0/13"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="27",ifName="Gi1/0/20"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="29",ifName="Gi1/0/22"} 1
ifAdminStatus{ifAlias="",ifDescr="",ifIndex="3",ifName="VLAN-1"} 1
9.8.1. Snmp_exporter setup¶
The setup of this exporter is a little tricky.
By default, we provide a configuration file for this exporter only for cisco switches.
This is because snmp needs specific OIDS, in order to query the switches. These OIDS can vary depending on the switch you use.
You can have a look at all OIDS available here: https://cric.grenoble.cnrs.fr/Administrateurs/Outils/MIBS/
You can find this file under /etc/snmp_exporter/snmp.yml
It should look something like this:
.. code-block:: yaml
- if_mib:
- walk:
<IP_ADDRESS>.2.1.2
<IP_ADDRESS>.<IP_ADDRESS>.1
<IP_ADDRESS>.4.1.254<IP_ADDRESS>.<IP_ADDRESS>
- get:
<IP_ADDRESS>.<IP_ADDRESS>.0
- metrics:
name: sysUpTime oid: <IP_ADDRESS>.<IP_ADDRESS> type: gauge help: The time (in hundredths of a second) since the network management portion of the system was last re-initialized. - <IP_ADDRESS>.<IP_ADDRESS>
name: ifNumber oid: <IP_ADDRESS>.<IP_ADDRESS> type: gauge help: The number of network interfaces (regardless of their current state) present on this system. - <IP_ADDRESS>.<IP_ADDRESS>
name: ifIndex oid: <IP_ADDRESS>.<IP_ADDRESS>.1.1 type: gauge help: A unique value, greater than zero, for each interface - <IP_ADDRESS>.<IP_ADDRESS>.1.1 indexes:
If you have another switch you want to query, you can generate another file than the one we provide.
By installing snmp_exporter, you should have a generator installed under /usr/local/go/src/github.com/prometheus/snmp_exporter/generator
Here, you have a file, generator.yml that you have to change, according to what you want.
By default, it looks like this:
modules:
# Default IF-MIB interfaces table with ifIndex.
if_mib:
walk: [sysUpTime, interfaces,ifXTable]
version: 1
auth:
community: cluster
lookups:
- source_indexes: [ifIndex]
lookup: ifAlias
- source_indexes: [ifIndex]
lookup: ifDescr
- source_indexes: [ifIndex]
# Use OID to avoid conflict with Netscaler NS-ROOT-MIB.
lookup: <IP_ADDRESS>.<IP_ADDRESS>.1.1.1 # ifName
overrides:
ifAlias:
ignore: true # Lookup metric
ifDescr:
ignore: true # Lookup metric
ifName:
ignore: true # Lookup metric
ifType:
type: EnumAsInfo
Note
Notice the auth section, by default, we setup the switches with the cluster community with no password required. See the switch setup section for more info.
You can tune it as you want, as long as you follow this syntax:
modules:
module_name: # The module name. You can have as many modules as you want.
walk: # List of OIDs to walk. Can also be SNMP object names or specific instances.
- <IP_ADDRESS>.2.1.2 # Same as "interfaces"
- sysUpTime # Same as "<IP_ADDRESS>.<IP_ADDRESS>"
- <IP_ADDRESS>.<IP_ADDRESS>.<IP_ADDRESS> # Instance of "ifHCInOctets" with index "40"
version: 2 # SNMP version to use. Defaults to 2.
# 1 will use GETNEXT, 2 and 3 use GETBULK.
max_repetitions: 25 # How many objects to request with GET/GETBULK, defaults to 25.
# May need to be reduced for buggy devices.
retries: 3 # How many times to retry a failed request, defaults to 3.
timeout: 5s # Timeout for each individual SNMP request, defaults to 5s.
auth:
# Community string is used with SNMP v1 and v2. Defaults to "public".
community: public
# v3 has different and more complex settings.
# Which are required depends on the security_level.
# The equivalent options on NetSNMP commands like snmpbulkwalk
# and snmpget are also listed. See snmpcmd(1).
username: user # Required, no default. -u option to NetSNMP.
security_level: noAuthNoPriv # Defaults to noAuthNoPriv. -l option to NetSNMP.
# Can be noAuthNoPriv, authNoPriv or authPriv.
password: pass # Has no default. Also known as authKey, -A option to NetSNMP.
# Required if security_level is authNoPriv or authPriv.
auth_protocol: MD5 # MD5 or SHA, defaults to MD5. -a option to NetSNMP.
# Used if security_level is authNoPriv or authPriv.
priv_protocol: DES # DES or AES, defaults to DES. -x option to NetSNMP.
# Used if security_level is authPriv.
priv_password: otherPass # Has no default. Also known as privKey, -X option to NetSNMP.
# Required if security_level is authPriv.
context_name: context # Has no default. -n option to NetSNMP.
# Required if context is configured on the device.
lookups: # Optional list of lookups to perform.
# The default for `keep_source_indexes` is false. Indexes must be unique for this option to be used.
# If the index of a table is bsnDot11EssIndex, usually that'd be the label
# on the resulting metrics from that table. Instead, use the index to
# lookup the bsnDot11EssSsid table entry and create a bsnDot11EssSsid label
# with that value.
- source_indexes: [bsnDot11EssIndex]
lookup: bsnDot11EssSsid
drop_source_indexes: false # If true, delete source index labels for this lookup.
# This avoids label clutter when the new index is unique.
overrides: # Allows for per-module overrides of bits of MIBs
metricName:
ignore: true # Drops the metric from the output.
regex_extracts:
Temp: # A new metric will be created appending this to the metricName to become metricNameTemp.
- regex: '(.*)' # Regex to extract a value from the returned SNMP walks's value.
value: '$1' # The result will be parsed as a float64, defaults to $1.
Status:
- regex: '.*Example'
value: '1' # The first entry whose regex matches and whose value parses wins.
- regex: '.*'
value: '0'
type: DisplayString # Override the metric type, possible types are:
# gauge: An integer with type gauge.
# counter: An integer with type counter.
# OctetString: A bit string, rendered as 0xff34.
# DateAndTime: An RFC 2579 DateAndTime byte sequence. If the device has no time zone data, UTC is used.
# DisplayString: An ASCII or UTF-8 string.
# PhysAddress48: A 48 bit MAC address, rendered as 00:01:02:03:04:ff.
# Float: A 32 bit floating-point value with type gauge.
# Double: A 64 bit floating-point value with type gauge.
# InetAddressIPv4: An IPv4 address, rendered as <IP_ADDRESS>.
# InetAddressIPv6: An IPv6 address, rendered as 0102:0304:0506:0708:090A:0B0C:0D0E:0F10.
# InetAddress: An InetAddress per RFC 4001. Must be preceded by an InetAddressType.
# InetAddressMissingSize: An InetAddress that violates section 4.1 of RFC 4001 by
# not having the size in the index. Must be preceded by an InetAddressType.
# EnumAsInfo: An enum for which a single timeseries is created. Good for constant values.
# EnumAsStateSet: An enum with a time series per state. Good for variable low-cardinality enums.
# Bits: An RFC 2578 BITS construct, which produces a StateSet with a time series per bit.
Here is a list of MIBS:
You can get more info here:
And here:
Once you are done tuning the file, simply do:
$ export MIBDIRS=mibs
$ ./generator generate
>hat you will get is a snmp.yml file. Simply copy the new file:
$ cp snmp.yml /etc/snmp_exporter/
9.8.2. Setup targets¶
To setup the targets, simply add:
monitoring:
exporters:
snmp_exporter:
port: 9116
with_generator: false
to the /etc/ansible/inventory/group_vars/equipment_profile you desire.
9.8.3. Switch setup¶
To setup the community on the switch to communicate with the exporter: Go to the switch via ssh or telnet, and enter the following commands:
$ Enable
$ configure terminal
$ snmp-server community cluster RO
$ exit
$ write memory
- You can change cluster to any community name you want, that is written in the
snmp.yml file
9.8.4. Start service¶
To start the service, simply run:
systemctl start snmp_exporter
Note
all exporter services are under the /etc/systemd/system directory, and most binaries are under the /usr/local/bin directory
9.8.5. Dashboard¶
The dashboard gives the following:
Interface thoughput( in and out)
Interface in,out,total in, total out, Bandwidth
Alerts
Percentage of casts (uni,multi,etc) In and Out
Max in, Max out, number of interfaces, Total in,Uptime, Total out
Etc…
9.9. Slurm_exporter¶
The slurm_exporter is an open source exporter for Prometheus, and can be found here: https://github.com/vpenso/prometheus-slurm-exporter
By default, the slurm_exorter runs under the port 9817.
To access the metrics, either do:
curl http://localhost:9817/metrics
or access it directly in a browser. However, using curl can be handy, because you can grep the output, and do other nice things with it.
You should get something like this:
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 3029
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
# HELP slurm_cpus_alloc Allocated CPUs
# TYPE slurm_cpus_alloc gauge
slurm_cpus_alloc 65792
# HELP slurm_cpus_idle Idle CPUs
# TYPE slurm_cpus_idle gauge
slurm_cpus_idle 0
# HELP slurm_cpus_other Mix CPUs
# TYPE slurm_cpus_other gauge
slurm_cpus_other 15616
# HELP slurm_cpus_total Total CPUs
# TYPE slurm_cpus_total gauge
slurm_cpus_total 81408
# HELP slurm_nodes_alloc Allocated nodes
# TYPE slurm_nodes_alloc gauge
slurm_nodes_alloc 257
# HELP slurm_nodes_comp Completing nodes
# TYPE slurm_nodes_comp gauge
slurm_nodes_comp 0
# HELP slurm_nodes_down Down nodes
# TYPE slurm_nodes_down gauge
slurm_nodes_down 28
9.9.1. Metrics¶
Here is an extract from the github page:
## Exported Metrics
### State of the CPUs
* **Allocated**: CPUs which have been allocated to a job.
* **Idle**: CPUs not allocated to a job and thus available for use.
* **Other**: CPUs which are unavailable for use at the moment.
* **Total**: total number of CPUs.
- [Information extracted from the SLURM **sinfo** command](https://slurm.schedmd.com/sinfo.html)
- [Slurm CPU Management User and Administrator Guide](https://slurm.schedmd.com/cpu_management.html)
### State of the Nodes
* **Allocated**: nodes which has been allocated to one or more jobs.
* **Completing**: all jobs associated with these nodes are in the process of being completed.
* **Down**: nodes which are unavailable for use.
* **Drain**: with this metric two different states are accounted for:
- nodes in ``drained`` state (marked unavailable for use per system administrator request)
- nodes in ``draining`` state (currently executing jobs but which will not be allocated for new ones).
* **Fail**: these nodes are expected to fail soon and are unavailable for use per system administrator request.
* **Error**: nodes which are currently in an error state and not capable of running any jobs.
* **Idle**: nodes not allocated to any jobs and thus available for use.
* **Maint**: nodes which are currently marked with the __maintenance__ flag.
* **Mixed**: nodes which have some of their CPUs ALLOCATED while others are IDLE.
* **Resv**: these nodes are in an advanced reservation and not generally available.
[Information extracted from the SLURM **sinfo** command](https://slurm.schedmd.com/sinfo.html)
### Status of the Jobs
* **PENDING**: Jobs awaiting for resource allocation.
* **PENDING_DEPENDENCY**: Jobs awaiting because of a unexecuted job dependency.
* **RUNNING**: Jobs currently allocated.
* **SUSPENDED**: Job has an allocation but execution has been suspended and CPUs have been released for other jobs.
* **CANCELLED**: Jobs which were explicitly cancelled by the user or system administrator.
* **COMPLETING**: Jobs which are in the process of being completed.
* **COMPLETED**: Jobs have terminated all processes on all nodes with an exit code of zero.
* **CONFIGURING**: Jobs have been allocated resources, but are waiting for them to become ready for use.
* **FAILED**: Jobs terminated with a non-zero exit code or other failure condition.
* **TIMEOUT**: Jobs terminated upon reaching their time limit.
* **PREEMPTED**: Jobs terminated due to preemption.
* **NODE_FAIL**: Jobs terminated due to failure of one or more allocated nodes.
[Information extracted from the SLURM **squeue** command](https://slurm.schedmd.com/squeue.html)
### Scheduler Information
* **Server Thread count**: The number of current active ``slurmctld`` threads.
* **Queue size**: The length of the scheduler queue.
* **Last cycle**: Time in microseconds for last scheduling cycle.
* **Mean cycle**: Mean of scheduling cycles since last reset.
* **Cycles per minute**: Counter of scheduling executions per minute.
* **(Backfill) Last cycle**: Time in microseconds of last backfilling cycle.
* **(Backfill) Mean cycle**: Mean of backfilling scheduling cycles in microseconds since last reset.
* **(Backfill) Depth mean**: Mean of processed jobs during backfilling scheduling cycles since last reset.
You can see more by looking at the local metrics.
9.9.2. Start service¶
To start the service, simply run:
systemctl start slurm_exporter
Note
all exporter services are under the /etc/systemd/system directory, and most binaries are under the /usr/local/bin directory
9.9.3. Alerts¶
All the alerts for the slurm_exporter are stored under /etc/prometheus/alerts/
Some of them include :
High RAM usage
High CPU usage
High mount volume
Host out of inodes
Unusual disk write latency
etc…
9.9.4. Dashboard¶
A dashboard is provided on the exporter github page.


I've been studying computer science at Athens University of Economics and Business since October 2018.
My progress so far has been decent, having passed most of my courses and maintaining a GPA greater than 8.5 out of 10.
The next section is dedicated to some of the projects I have done, in partnership with fellow students.
Projects worth mentioning
Reversi
This was an assignment for the Artificial Intelligence course. We were asked to implement the infamous
Reversi (Othello) game in any programming language so that the user would play against the computer.
The computer would of course use AI techniques to play, to be specific we used the MiniMax algorithm.
We made, aditionally to the assignment, a GUI for the game, as shown in the images on the sides (1, 2).
My teammates for this project were: Anastasiadou Konstantina (3180009) and Georgiadi Despoina (3180026).
Machine Learning Algorithms
This was an assignment for the Artificial Intelligence course. We were asked to implement 3 different
machine learning algorithms in any programming language and test their performance on a given set of data.
In the images above (3, 4) you can see the performance curves (Accuracy) for our implementation
of the multivariate Bernoulli Naive Bayes classifier and the sklearn BernoulliNB classifier, side by side.
My teammates for this project were: Anastasiadou Konstantina (3180009) and Georgiadi Despoina (3180026).
Cambook
This was an optional (extra) project for the Information Systems Analysis and Design. We were asked to create a
web based app of our choice.
We chose to make an application for booking camping spots, using HTML, CSS for the
frontend and SpringbBoot for the backend of the project.
In the images above you can see a page showing a listing (6) and the
login (5) page of our website.
My teammates for this project were: Anastasiadou Konstantina (3180009) and Fourtouni Eleni (3180196).


{{no footnotes|date=March 2013}} Sprinkle Spangles was a short-lived breakfast cereal by General Mills. It was introduced in the early 90s, alongside Hidden Treasures. The cereal was of star-shaped pieces covered with multi-colored sprinkles. The commercials claimed that they "Spangled every angle with sprinkles." Sprinkle Spangles were no longer available in 1998.
Contents |
The Sprinkle Spangles mascot was the Sprinkle Genie (voiced by Dom DeLuise).  The Sprinkle Genie's own catchphrase was: "You wish it, I dish it!" The mascot was dropped before the cereal was retired.
Some say that the General Mills Sprinkled Cookie Crisp Cereal (Released in 2009) tastes very similar to the retired Sprinkle Spangles cereal.
However, in 2014, Quaker Oats released Sprinkled Donut Crunch, under the Cap'n Crunch line of cereals. This cereal is nearly identical to the original Sprinkle Spangles, except the cereal bits are large circular "donuts" instead of stars.


Pinoco tutorials
The simplest site that shows "Hello World".
Basic usage of Pinoco collection object API.
Basic templating with PHPTAL.
How to resolve URL for other page.
Completing your template system with URL fixing.
How to hook document.
How to hook directory structure.
Variable hook strategy.
Response of plain text, image or such as without markup language.
Switch your view to another layout.
Control cascading hook process.
Automatic local variable injection helps you to code shorter.
Default and extended include directory.
Optimize performance by avoiding template engine.
Adapt template engine to your use.
You can modify URL globally.
Create a creative error response view.
Look into Pinoco instance, you will find some useful value in it.
You can use other frameworks with Pinoco seamlessly.
... if you already have Smarty assets.


In the first week of the fab academy we were asked to create a personal website.
This was the first time I have come into contact with website coding, but I was very excited to begin development of a personal website.
I started studing tutorial of htlm5 and css. Then my first step to create an web site was modify a Bootstrap template using Sublime Text Editor and Dreamweaver to customize and change aspects within the design and the code of the site. Maybe I chose a too complex theme to start, but I through this had a clean appearance that would exhibit my work well.
GitHub is a web-based Git repository hosting service. Each week we will do the local "push" of our assignment, in this way the Fablab local tutors will be able to control the web pages and the work done during the week by students.
The tutor then will be in charge of the global push to all students in the lab.
This system, as well as being helpful to the student, allows to simplify the data traffic that otherwise could block the global system of Fab Academy.
Programs: Sublime Text, Dreamweaver.
Template: Bootstrap "Agency" theme.
In the first week of the fab academy we were also asked to propose a final project.
Everyone wants a “Ticket to Anywhere”. I know, the best part of travel is the “travel” itself, but, in some particular conditions, the possibility to visit and live in “remote” new places is the best experience of an entire life. My proposal concern the fabrication of a robot which can be remote controlled. The second step will be to equip it with a FPV system (FIRST PERSON VIEW). In my utopic vision the user will be abil to travel anywhere and live an interactive experience.
A list of references where I take some of my inspirations to make this experiment and for further research:
- Henry Evans and Chad Jenkins: meet the robots for humanity TED 2013
“All of us have disabilities in one form or another. For example, if either of us wants to go 60 miles an hour, both of us will need an assistive device called a car. Your disability doesn't make you any less of a person, and neither does mine.” H. Evans
- Materials:
Wood;
Organic Plastic;
Acrylics;
3D print board cases.
- Hardware:
Bords;
2 DC Motors;
2 Stepper Motors;
Remote controller;
3d camera system;
HMD (head-mounted display);
Other Components: Power Source, RGB Leds, Electrical wires, Electronic components
- Software: Open softwares
During Fab Academy I will do the first version of robot. hopefully this prototype will help me for further investigations about this project. I think that can be used as many proposes:
- Remote Travelling: travel and visit remote places
- Mapping tool: creation of 3dimentional Models
- Science Research: recollection data, by equiping it with sensors
- Interactive Sanitary Therapy: psychological therapy; Support to other medical therapy
- Interactive Education
- Security/Surveillance
- And much more...


|
Shaked Walker 1.0
|
#include <tinyxml.h>
Public Types | |
| enum | NodeType { DOCUMENT , ELEMENT , COMMENT , UNKNOWN , TEXT , DECLARATION , TYPECOUNT } |
| Public Types inherited from TiXmlBase | |
| enum | { TIXML_NO_ERROR = 0 , TIXML_ERROR , TIXML_ERROR_OPENING_FILE , TIXML_ERROR_OUT_OF_MEMORY , TIXML_ERROR_PARSING_ELEMENT , TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME , TIXML_ERROR_READING_ELEMENT_VALUE , TIXML_ERROR_READING_ATTRIBUTES , TIXML_ERROR_PARSING_EMPTY , TIXML_ERROR_READING_END_TAG , TIXML_ERROR_PARSING_UNKNOWN , TIXML_ERROR_PARSING_COMMENT , TIXML_ERROR_PARSING_DECLARATION , TIXML_ERROR_DOCUMENT_EMPTY , TIXML_ERROR_EMBEDDED_NULL , TIXML_ERROR_PARSING_CDATA , TIXML_ERROR_DOCUMENT_TOP_ONLY , TIXML_ERROR_STRING_COUNT } |
Public Member Functions | |
| const char * | Value () const |
| const TIXML_STRING & | ValueTStr () const |
| void | SetValue (const char *_value) |
| void | Clear () |
| Delete all the children of this node. Does not affect 'this'. | |
| TiXmlNode * | Parent () |
| One step up the DOM. | |
| const TiXmlNode * | Parent () const |
| const TiXmlNode * | FirstChild () const |
| The first child of this node. Will be null if there are no children. | |
| TiXmlNode * | FirstChild () |
| const TiXmlNode * | FirstChild (const char *value) const |
| TiXmlNode * | FirstChild (const char *_value) |
| The first child of this node with the matching 'value'. Will be null if none found. | |
| const TiXmlNode * | LastChild () const |
| TiXmlNode * | LastChild () |
| The last child of this node. Will be null if there are no children. | |
| const TiXmlNode * | LastChild (const char *value) const |
| TiXmlNode * | LastChild (const char *_value) |
| The last child of this node matching 'value'. Will be null if there are no children. | |
| const TiXmlNode * | IterateChildren (const TiXmlNode *previous) const |
| TiXmlNode * | IterateChildren (const TiXmlNode *previous) |
| const TiXmlNode * | IterateChildren (const char *value, const TiXmlNode *previous) const |
| This flavor of IterateChildren searches for children with a particular 'value'. | |
| TiXmlNode * | IterateChildren (const char *_value, const TiXmlNode *previous) |
| TiXmlNode * | InsertEndChild (const TiXmlNode &addThis) |
| TiXmlNode * | LinkEndChild (TiXmlNode *addThis) |
| TiXmlNode * | InsertBeforeChild (TiXmlNode *beforeThis, const TiXmlNode &addThis) |
| TiXmlNode * | InsertAfterChild (TiXmlNode *afterThis, const TiXmlNode &addThis) |
| TiXmlNode * | ReplaceChild (TiXmlNode *replaceThis, const TiXmlNode &withThis) |
| bool | RemoveChild (TiXmlNode *removeThis) |
| Delete a child of this node. | |
| const TiXmlNode * | PreviousSibling () const |
| Navigate to a sibling node. | |
| TiXmlNode * | PreviousSibling () |
| const TiXmlNode * | PreviousSibling (const char *) const |
| Navigate to a sibling node. | |
| TiXmlNode * | PreviousSibling (const char *_prev) |
| const TiXmlNode * | NextSibling () const |
| Navigate to a sibling node. | |
| TiXmlNode * | NextSibling () |
| const TiXmlNode * | NextSibling (const char *) const |
| Navigate to a sibling node with the given 'value'. | |
| TiXmlNode * | NextSibling (const char *_next) |
| const TiXmlElement * | NextSiblingElement () const |
| TiXmlElement * | NextSiblingElement () |
| const TiXmlElement * | NextSiblingElement (const char *) const |
| TiXmlElement * | NextSiblingElement (const char *_next) |
| const TiXmlElement * | FirstChildElement () const |
| Convenience function to get through elements. | |
| TiXmlElement * | FirstChildElement () |
| const TiXmlElement * | FirstChildElement (const char *_value) const |
| Convenience function to get through elements. | |
| TiXmlElement * | FirstChildElement (const char *_value) |
| int | Type () const |
| const TiXmlDocument * | GetDocument () const |
| TiXmlDocument * | GetDocument () |
| bool | NoChildren () const |
| Returns true if this node has no children. | |
| virtual const TiXmlDocument * | ToDocument () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual const TiXmlElement * | ToElement () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual const TiXmlComment * | ToComment () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual const TiXmlUnknown * | ToUnknown () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual const TiXmlText * | ToText () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual const TiXmlDeclaration * | ToDeclaration () const |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlDocument * | ToDocument () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlElement * | ToElement () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlComment * | ToComment () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlUnknown * | ToUnknown () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlText * | ToText () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlDeclaration * | ToDeclaration () |
| Cast to a more defined type. Will return null if not of the requested type. | |
| virtual TiXmlNode * | Clone () const =0 |
| virtual bool | Accept (TiXmlVisitor *visitor) const =0 |
| Public Member Functions inherited from TiXmlBase | |
| virtual void | Print (FILE *cfile, int depth) const =0 |
| int | Row () const |
| int | Column () const |
| See Row() | |
| void | SetUserData (void *user) |
| Set a pointer to arbitrary user data. | |
| void * | GetUserData () |
| Get a pointer to arbitrary user data. | |
| const void * | GetUserData () const |
| Get a pointer to arbitrary user data. | |
| virtual const char * | Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding)=0 |
Protected Member Functions | |
| TiXmlNode (NodeType _type) | |
| void | CopyTo (TiXmlNode *target) const |
| TiXmlNode * | Identify (const char *start, TiXmlEncoding encoding) |
Protected Attributes | |
| TiXmlNode * | parent |
| NodeType | type |
| TiXmlNode * | firstChild |
| TiXmlNode * | lastChild |
| TIXML_STRING | value |
| TiXmlNode * | prev |
| TiXmlNode * | next |
| Protected Attributes inherited from TiXmlBase | |
| TiXmlCursor | location |
| void * | userData |
| Field containing a generic user pointer. | |
Friends | |
| class | TiXmlDocument |
| class | TiXmlElement |
Additional Inherited Members | |
| Static Public Member Functions inherited from TiXmlBase | |
| static void | SetCondenseWhiteSpace (bool condense) |
| static bool | IsWhiteSpaceCondensed () |
| Return the current white space setting. | |
| static void | EncodeString (const TIXML_STRING &str, TIXML_STRING *out) |
| Static Public Attributes inherited from TiXmlBase | |
| static const int | utf8ByteTable [256] |
| Static Protected Member Functions inherited from TiXmlBase | |
| static const char * | SkipWhiteSpace (const char *, TiXmlEncoding encoding) |
| static bool | IsWhiteSpace (char c) |
| static bool | IsWhiteSpace (int c) |
| static const char * | ReadName (const char *p, TIXML_STRING *name, TiXmlEncoding encoding) |
| static const char * | ReadText (const char *in, TIXML_STRING *text, bool ignoreWhiteSpace, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) |
| static const char * | GetEntity (const char *in, char *value, int *length, TiXmlEncoding encoding) |
| static const char * | GetChar (const char *p, char *_value, int *length, TiXmlEncoding encoding) |
| static bool | StringEqual (const char *p, const char *endTag, bool ignoreCase, TiXmlEncoding encoding) |
| static int | IsAlpha (unsigned char anyByte, TiXmlEncoding encoding) |
| static int | IsAlphaNum (unsigned char anyByte, TiXmlEncoding encoding) |
| static int | ToLower (int v, TiXmlEncoding encoding) |
| static void | ConvertUTF32ToUTF8 (unsigned long input, char *output, int *length) |
| Static Protected Attributes inherited from TiXmlBase | |
| static const char * | errorString [TIXML_ERROR_STRING_COUNT] |
The parent class for everything in the Document Object Model. (Except for attributes). Nodes have siblings, a parent, and children. A node can be in a document, or stand on its own. The type of a TiXmlNode can be queried, and it can be cast to its more defined type.
| enum TiXmlNode::NodeType |
The types of XML nodes supported by TinyXml. (All the unsupported types are picked up by UNKNOWN.)
|
pure virtual |
Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the XML tree will be conditionally visited and the host will be called back via the TiXmlVisitor interface.
This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse the XML for the callbacks, so the performance of TinyXML is unchanged by using this interface versus any other.)
The interface has been based on ideas from:
Which are both good references for "visiting".
An example of using Accept():
TiXmlPrinter printer; tinyxmlDoc.Accept( &printer ); const char* xmlcstr = printer.CStr();
Implemented in TiXmlText, TiXmlUnknown, TiXmlDocument, TiXmlElement, TiXmlComment, and TiXmlDeclaration.
|
pure virtual |
Create an exact duplicate of this node and return it. The memory must be deleted by the caller.
Implemented in TiXmlElement, TiXmlComment, TiXmlText, TiXmlDeclaration, TiXmlUnknown, and TiXmlDocument.
| const TiXmlNode * TiXmlNode::FirstChild | ( | const char * | value | ) | const |
The first child of this node with the matching 'value'. Will be null if none found.
| const TiXmlDocument * TiXmlNode::GetDocument | ( | ) | const |
Return a pointer to the Document this node lives in. Returns null if not in a document.
Add a new node related to this. Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured.
Add a new node related to this. Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured.
Add a new node related to this. Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured.
An alternate way to walk the children of a node. One way to iterate over nodes is:
for( child = parent->FirstChild(); child; child = child->NextSibling() )
IterateChildren does the same thing with the syntax:
child = 0; while( child = parent->IterateChildren( child ) )
IterateChildren takes the previous child as input and finds the next one. If the previous child is null, it returns the first. IterateChildren will return null when done.
Add a new node related to this. Adds a child past the LastChild.
NOTE: the node to be added is passed by pointer, and will be henceforth owned (and deleted) by tinyXml. This method is efficient and avoids an extra copy, but should be used with care as it uses a different memory model than the other insert functions.
| const TiXmlElement * TiXmlNode::NextSiblingElement | ( | ) | const |
Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.
| const TiXmlElement * TiXmlNode::NextSiblingElement | ( | const char * | _value | ) | const |
Convenience function to get through elements. Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element.
Replace a child of this node. Returns a pointer to the new object or NULL if an error occured.
|
inline |
Changes the value of the node. Defined as:
Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlComment.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlComment.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlDeclaration.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlDeclaration.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlDocument.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlDocument.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlElement.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlElement.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlText.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlText.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlUnknown.
|
inlinevirtual |
Cast to a more defined type. Will return null if not of the requested type.
Reimplemented in TiXmlUnknown.
|
inline |
Query the type (as an enumerated value, above) of this node. The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION.
|
inline |
The meaning of 'value' changes for the specific type of TiXmlNode.
Document: filename of the xml file Element: name of the element Comment: the comment text Unknown: the tag contents Text: the text string
The subclasses will wrap this function.


Enabling/Disabling and Configuring Event Enrollment
How to enable or disable users to enroll for a paid event and configure the related settings on the Events module.
Prerequisite. Enrollment must be enabled by a Page Editor on the Edit Settings page of this module. See "Configuring the Enrollment Settings"
- Add a new event (See "Adding an Event") - OR - Go to the event details page of the required event. See "Viewing Event Details (List View)", See "Viewing Event Details (Month View)" or See "Viewing Event Details (Week View)" and then click the Edit link to edit either one time events or to edit only this instance of a recurring event, or click the Edit Series link to edit all instances of this recurring event.
- At Allow Enrollment, select from these options:
- Mark the check box to allow enrollment.
- Unmark the check box to disable enrollment. Skip to Step 7.
- At Type of Enrollment, select from these options:
- Free: Select if there is no fee associated with this event.
- Paid Fee:
Select to configure the cost of this event.
- In the Paid Fee text box, enter the fee amount. Note: The currency type is set by the Administrator.
- In the PayPal Account text box, edit the PayPal account email address if required.
- Optional. In the Max. Enrollment text box, enter the maximum number of enrollments that can be accepted for this event. If an unlimited number of enrollments can be accepted, enter 0. The default setting is 0 (unlimited enrollments).
- Optional. At Enroll List on Detail View, to display the list of enrolled users on the detailed event view - OR - to disable and display on the Edit Event page only displayed at the Enrolled Users field.
- Optional. At Enrollee Role, select one of the following:
- Select None to permit all registered users to enroll for the event. This is the default setting.
- Select a role to limit enrollment to members of that role. Note: This restriction also applies to the Admin role.
- Click the Update button for a single event - OR - Click the Update Series button for an event series.
The newly added event with enrollment enabled
Related Topics:
-
See "Enrolling for a Free Event"
-
See "Enrolling for a Paid Event"
-
See "Viewing Your Event Enrollments"
-
See "Canceling an Event Enrollment"
-
See "Viewing Enrolled Users"


You look at Susan. You can tell by her body language that she is already expecting the worst.
Susan, I want to listen very carefully...
{{userResponse}}
“Please, just tell me already.”
“According to the algorithm used in the app, there is a very high chance that you will not be passing the semester.”
“How high is very high?”
“Almost a hundred percent chance.”
You can tell what you have told her has shaken her up. She stares with a blank face.
“Listen Susan, this program is still in beta. We have only had it for 3 months now. I think if you work hard, you can still make enough progress to pass.”
“But aren’t robots super smart? If the robot said I was going to fail, it’s probably going to happen”
“It’s true that these algorithms are very advanced, but we have no idea where it’s getting that number from. For all we know it could be completely random.”
“Ok”
You can tell she isn't listening anymore.
--
Two weeks have passed since your advisor meeting with Susan.
While sitting at your desk, you decide to look her up in the database, to see if she has hopefully made some improvements.
After typing in her name, you see that she has not logged into her app since two weeks ago.
You decide to phone the schools registration office.
“Hello, I am calling in to check in on a student named Susan…”
“It seems that she hasn’t logged into her account for two weeks now. Is this some sort of bug?”
“Oh Susan? She is taking the semester off now, she said something about “what's the point and i’m going to fail anyways.” I swear, kids are getting more nihilistic these days.”
“I see, thank you.”
You begin to wonder if you had made the right choice.


|
Some of the coats of arms belonging to the 400 ancestral Celtic families.Coat of arms sources for Cook, Moody, Miller, Lyons, Patton, Henderson, Garvey, Beatty, Duff, Taylor, Ward, Nicholson, and Sears are from englishgathering.co.uk; Hay is from Scotclans.com; Campbell is from The General Armory; Jones is from Pinterest.ca; Short is from Americancoatofarms.com; Tiernan, Elwood, McCool and Rafferty are from Ireland101.com. Gamble is from thetreemarker.com; St. Clair and Warenne is from commons.wikimedia.org; Abbot is from Mikeclark.com; Edwards is from American Heraldry Society; Walsh is from Cheshire Heraldry; Gardner is from Redbubble.com; Williams is from The-red-thread.net; and Coffey is from Burk’s General Armory.
Archaeologist Claims that King Arthur Was Not a Real Person But a Fictional “Celtic Superhero” Where did King Arthur Acquire Excalibur, the Stone or the Lake?Archaeologists May Have Discovered the Birthplace of King Arthur: Legends Come to Life?This writer’s ebook, The Tribe Within found on Smashwords.com, suggests King Arthur’s story is a tribal one going back centuries when Rome was conquering northern France around 50 BC. One tribe affected were seafarers called the Veneti (pronounced Weneti). After a war with Julius Caesar which almost annihilated them, the Veneti left for Ireland. What connects them together is their tribal symbol above and DNA.
Coinciding with Geoffrey of Monmouth’s account of King Arthur is a forgotten story from early 6 th Century Brittany. This tale begins in 410 AD. While Rome’s army is retreating from Britain, an unknown Christian monk opens a university: Cor Tewdws (College of Theodosius). Cor Tewdws has seven great halls, over 400 houses, and more than 2,200 students attending annually before Vikings destroy it in 987 AD. Engraved Celtic stones placed at each great hall’s entrance mark individual tribes and still can be seen at the ruins today in LLantwit Major, Glamorgan, Wales. According to the Welsh Triad, around 500 AD Cor Tewdws’ Headmaster is St. Illtud, a “cousin” of King Arthur. The Celtic Stones from Cor Tewdws, at St Illtud, Llantwit Major, Glamorgan, Wales. ( CC BY-SA 2.0 )
This writer believes in the early 6 th Century Cor Tewdws’ mission was to re-unite seven tribes of pre-Roman Brittany [Osismi, Unelli, Curiosolitae, Armoricani, Namnetes and Redones (all suspect DNA Tribe R1b-DF41) then found in Cornwall and Devon, England] and Veneti (R1b-L513) and send them on a quest to reclaim their ancestral lands in Brittany, France.
One monk is assigned to recruit the Veneti. The Life of Saint Padarn is a collection of short stories written several hundred years after this monk’s death, found at www.maryjones.us/ctexts/padarn.html . By assessing the names recorded from the monk’s travels, doing independent research, and incorporating overlapping DNA results, a combination of Veneti sub-tribes and surnames start to emerge. The dots start to connect revealing a lost history which this writer believes is the historical background to what later became the basis for King Arthur’s mythology.
How King Arthur Became One of the Most Pervasive Legends of All Time Historians Draw Closer to the Tomb of the Legendary King ArthurThe Grail Cypher: A radical reassessment of Arthurian history
St. Padarn displays same black on white symbols found on most R1b-L513 coat of arms centuries before Bretons claim it as their own. Image: ( CC BY-SA 3.0 )
Padarn’s search takes him to seven kingdoms. Padarn’s first visit is to Brycheiniog in Wales where King Caradoc Freichfras is named in Life of St. Padarn. The Pritchard surname is first recorded in 1521 with the name David Aprycharde, in the Oxford University Register. The surname derives from “son of” (or in Welsh, “Ap”) Richard. According to Hausegenealogy.com, his ancestry can be traced to Gwenllian, daughter of Brychan whose Dáirine tribe was from Ireland.
Gwenllian’s son is Caradoc Freichfras. In Life of St. Padarn , Caradoc becomes king of Broërec, Brittany. Caradoc’s family continue in Wales while a new line starts in Brittany which would eventually become Wilson.
|


We're sorry but BostonHacks doesn't work properly without JavaScript enabled. Please enable it to continue.
Loading...


#include <WaveletMath.h>
|
| static void | Decompose (const std::vector< double > *data, const Wavelet *wavelet, std::vector< double > *approx_coeffs, std::vector< double > *details_coeffs, DyadicMode dyadic_mode, PaddingMode padding_mode) |
| |
| static void | Reconstruct (const std::vector< double > *coeffs, const std::vector< double > *reconstruction_coeffs, std::vector< double > *data, const Wavelet *wavelet, size_t data_size, DyadicMode dyadic_mode, PaddingMode padding_mode) |
| |
| static void | DyadicUpsample (const std::vector< double > *data, std::vector< double > *data_upsampled, DyadicMode dyadic_mode) |
| |
| static void | DyadicDownsample (const std::vector< double > *data, std::vector< double > *data_downsampled, DyadicMode dyadic_mode) |
| |
| static void | Convolve (const std::vector< double > *data, const std::vector< double > *coeffs, std::vector< double > *result) |
| |
| static void | Pad (const std::vector< double > *data, std::vector< double > *extended_data, size_t pad_left, size_t pad_right, PaddingMode padding_mode) |
| |
A container for static methods useful to compute wavelet math functions. This is not meant to be a complete wavelet solution, it exists to allow the narrow set of wavelet math functions required to compute wavelet packet trees.
- See also
- WaveletPacketTree
-
StationaryWaveletPacketTree
◆ Convolve()
| void panwave::WaveletMath::Convolve |
( |
const std::vector< double > * |
data, |
|
|
const std::vector< double > * |
coeffs, |
|
|
std::vector< double > * |
result |
|
) |
| |
|
static |
Perform a convolution.
- Parameters
-
| data | The input signal to convolve. |
| coeffs | The filter coefficients. |
| result | The destination for our convolved signal data. Any values in the vector will be overwritten. |
◆ Decompose()
| void panwave::WaveletMath::Decompose |
( |
const std::vector< double > * |
data, |
|
|
const Wavelet * |
wavelet, |
|
|
std::vector< double > * |
approx_coeffs, |
|
|
std::vector< double > * |
details_coeffs, |
|
|
DyadicMode |
dyadic_mode, |
|
|
PaddingMode |
padding_mode |
|
) |
| |
|
static |
Decompose a signal into approximation and details coefficients.
Uses wavelet to get the decomposition highpass and lowpass filters.
- Parameters
-
| data | The signal data we wish to decompose. |
| wavelet | Wavelet we will use to get the highpass and lowpass decomposition filters. |
| approx_coeffs | Destination approximation coefficients. Any existing contents will be overwritten. |
| details_coeffs | Destination details coefficients. Any existing contents will be overwritten. |
| dyadic_mode | Mode we should use when dyadically downsampling. (default: Odd) |
| padding_mode | Padding mode we should use when padding the signal data. (Default: Zeroes) |
◆ DyadicDownsample()
| void panwave::WaveletMath::DyadicDownsample |
( |
const std::vector< double > * |
data, |
|
|
std::vector< double > * |
data_downsampled, |
|
|
DyadicMode |
dyadic_mode |
|
) |
| |
|
static |
Dyadically downsample a data signal.
Half of the original values are included in the downsampled data. The dyadic mode controls which elements from the original data are taken into the downsampled data.
If dyadic mode is Even, every even index value in data is copied into the downsampled data. Odd index values are left out.
If dyadic mode is Odd, every odd index value in data is copied into the downsampled data. Even index values are left out.
The downsampled data has size half the original data's size. Even dyadic mode rounds up, Odd dyadic mode rounds down in case original data's size is not even.
- Parameters
-
| data | The original data signal we want to downsample. |
| data_downsampled | The downsampled data will be written to this vector. Existing contents will be erased. |
| dyadic_mode | Mode we should use to dyadically downsample. (default: Odd) |
- See also
- DyadicMode
◆ DyadicUpsample()
| void panwave::WaveletMath::DyadicUpsample |
( |
const std::vector< double > * |
data, |
|
|
std::vector< double > * |
data_upsampled, |
|
|
DyadicMode |
dyadic_mode |
|
) |
| |
|
static |
Dyadically upsample a data signal.
All of the original values from data are included in the upsampled data but there are zeroes separating each value. The dyadic mode determines which indices in the upsampled vector contain zeroes.
If dyadic mode is Even, every even index in the upsampled data will contain a zero.
If dyadic mode is Odd, every odd index in the upsampled data will contain a zero.
The upsampled data has size double the original data's size plus one in even dyadic mode or minus one in odd dyadic mode.
- Parameters
-
| data | The original data signal we want to upsample. |
| data_upsampled | The upsampled data will be written to this vector. Existing contents will be erased. |
| dyadic_mode | Mode we should use to dyadically upsample. (default: Odd) |
- See also
- DyadicMode
◆ Pad()
| void panwave::WaveletMath::Pad |
( |
const std::vector< double > * |
data, |
|
|
std::vector< double > * |
extended_data, |
|
|
size_t |
pad_left, |
|
|
size_t |
pad_right, |
|
|
PaddingMode |
padding_mode |
|
) |
| |
|
static |
Pad a vector by inserting elements on the right and left.
If padding_mode is Zeroes, the inserted elements are all zero.
If padding_mode is Symmetric, the inserted elements are the values closest to the beginning or end but flipped symmetrically around either the first or last element. If the requested pad length is longer than data size, the last or first element of data is used for all the elements which would overflow data.
For example, [1,2,3] symmetrically padded by 3 on the left and right produces [3,3,2,1,2,3,2,1,1]
- Parameters
-
| data | The original data we want to pad. |
| extended_data | The destination for our padded data. It will have length equal to pad_left + pad_right + data->size(). Any existing values will be overwritten. |
| pad_left | The number of elements to pad on the left of data. Can be zero. |
| pad_right | The number of elements to pad on the right of data. Can be zero. |
| padding_mode | Padding mode we should use to insert padding elements. |
- See also
- PaddingMode
◆ Reconstruct()
| void panwave::WaveletMath::Reconstruct |
( |
const std::vector< double > * |
coeffs, |
|
|
const std::vector< double > * |
reconstruction_coeffs, |
|
|
std::vector< double > * |
data, |
|
|
const Wavelet * |
wavelet, |
|
|
size_t |
data_size, |
|
|
DyadicMode |
dyadic_mode, |
|
|
PaddingMode |
padding_mode |
|
) |
| |
|
static |
Reconstruct a signal from approximation or details coefficients.
- Parameters
-
| coeffs | Either the approximation or details coefficients produced during a decomposition. |
| reconstruction_coeffs | Should be a lowpass or highpass reconstruction filter with size equal to the length of wavelet. |
| data | Destination vector for the reconstructed signal. Any existing contents will be erased. |
| wavelet | Wavelet we used to do the decomposition. |
| data_size | Size of the reconstructed signal. |
| dyadic_mode | Mode we should use when dyadically upsampling. (default: Odd) |
| padding_mode | Padding mode we should use when padding the coefficient data. (Default: Zeroes) |
The documentation for this class was generated from the following files:


The progressive lightmapper is a path tracing based lightmapper backend that provides baked lightmaps and light probes with progressive updates in the Editor.
The progressive lightmapper goes through a short prepare step (geometry and instance updates, G-buffer and chart mask generation) and starts producing the output very quickly. New lightmaps and light probes are shown as soon as a new intermediate result is ready. This allows for a very fast iteration workflow.
The old Enlighten-based lightmapper for baked lightmaps relied on precomputed realtime GI to generate indirect lighting. That was both an advantage, as just changing the lighting could produce new lightmaps fairly quickly, and a disadvantage, as it imposed all the UV layout limitations even for users only interested in baking. The UV requirements in the progressive lightmapper are the usual for baked lightmapping: non-overlapping UVs with small area and angle errors, and sensible padding between the charts.
The new lightmapper starts producing the output immediately and progressively refines it over time for a much improved lighting workflow - this means an interactive lighting workflow. Additionally, baking times are much more predictable.
See an in-depth video showing the interactive workflow here.
Moreover the new technique bakes global illumination at the lightmap resolution - for each texel individually - without upsampling schemes or relying on any irradiance caches or other global data structures. This makes it robust and allows you to bake selected portions of lightmaps, which means that iteration speed can be improved greatly.
Newly created scenes have the progressive lightmapper enabled by default. Existing scenes will stick to Enlighten until you choose the “Progressive (experimental)” Bake Backend.
The panel below the ‘Auto Generate’ and ‘Generate Lighting’ options shows the amount of lightmaps that were created, how many are in view (converged / not converged) and out of view (converged / not converged) and the bake performance.
In addition to the Baked GI settings in the Lighting window, there are new parameters in the Lightmap Parameters asset that can be configured. These are Anti-aliasing Samples, Pushoff and Backface Tolerance. Default lightmap parameters can be set for the scene in General GI > Default Parameters or set per renderer.
The rest is the default Unity 5 workflow. Mark your objects as static and set some light inputs (lights, environment lighting or emissive materials on static objects) as baked.
In “Auto” mode the lightmaps and light probes will be calculated automatically. If you have “Auto” disabled you will need to press the “Build” button for the bake to start.
Force stop: Allows for stopping the bake at an arbitrary point in time, before the requested amount of samples has actually been done. It works when the lighting is built manually. With the 100,000 max sample count and the ability to disable view prioritization, one can leave the machine baking and just stop whenever the results look pleasing.
Invalid texels: Texels are marked as invalid based on the Backface Tolerance parameter (LightmapParameters > General GI) and invalid texels are filled from the valid neighbours. The dilation process that takes care of that does more iterations once the lightmap has converged than when it’s still improving.
Supersampling: The lighting quality is influenced by the supersampling amount. Control it using the ‘Anti-aliasing Samples’ property (Lightmap Parameters > Baked GI, see the Lightmap Parameters section above).
This project is set up with the settings needed for the progressive lightmapper. It is a version of the Tanks! project also available on the Asset Store. It bakes in less than 5 minutes and has 11 1024x1024 lightmaps. Watch a video showing the interactive workflow in this project.
2017–07–04 Page published with no editorial review - Leave page feedback
2017–07–04 New feature in Unity 5.6 (Experimental)


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 4
Brush up your cooking skills - make a classic béarnaise sauce to adorn the perfectly cooked rib-eye steak.
For the slow-roasted tomatoes, preheat the oven to 150C/300F/Gas 1.
Place the tomatoes, cut-side up, onto a roasting tray.
Sprinkle with the thyme, salt and freshly ground black pepper, to taste, and olive oil.
Place in the oven and cook for 1-2 hours until the moisture has mainly evaporated and the tomatoes have dried out.
Remove the tomatoes from the oven and cool.
For the béarnaise sauce, place the tarragon vinegar and diced shallot into a small saucepan and bring to the boil. Turn down the heat and simmer until the liquid has reduced by half.
Strain the liquid into a heatproof bowl and add the egg yolks.
Place the bowl over a pan of simmering water and whisk together until thickened and light in colour.
Gradually add the melted butter, whisking constantly. Season with salt and black pepper and add the chopped tarragon leaves.
Turn off the heat and leave the bowl over the warm pan until ready to serve.
For the rib-eye steak, season the steaks with salt and freshly ground black pepper.
Heat a frying pan until very hot and add the butter and olive oil.
When the butter is foaming, add the steaks and fry on each side for 2-3 minutes, depending how you like your steak cooked.
Remove from the pan and rest in a warm place for 2-3 minutes before serving.
For the fat chips, heat a deep-fat fryer to 140C/285F.
Slice the potatoes into 1.5cm/½in thick long chips.
Place in the fat fryer and cook for 5-6 minutes until just tender, but without colour.
Using a slotted spoon, remove the chips from the fryer and turn up the heat to 190C/375F.
Lower the chips back into the fat and cook for 3-4 minutes until golden-brown and cooked all the way through. Remove the chips again using a slotted spoon and drain on kitchen paper. Season with salt to taste.
To serve, pile the chips on one side of each plate. Place the steak next to the chips along with a spoonful of béarnaise sauce. Place three tomato halves on each plate and serve at once.


My name is Curtis Schrum.
Many people know me as Mandatory HashTags
I am a fat guy.
April Starting Weight: 401lbs or 181.89kg or 28.64 stone
More Information
I currently work as an eCommerce Senior Web Developer at Weidenhammer. I reside in Springfield MO.
Contact me
The best way to contact is via social links.


Experimental! Create a new list by entering it's name in the 'add list' text box and press enter.
Stock Ticker for Chrome will scan the current page that is being viewed for links to ticker symbols. When links are found a small bar will be displayed near the top of the page with each ticker symbol followed by relevant information such as the stock price or other metrics. The metrics shown are user configurable, so only the desired stock information is displayed.
Unlike other ticker bars Stock Ticker for Chrome is not real time. Metrics take several hours or longer to refresh. This is done intentionally. The purpose of the bar is to provide contextual information while browsing financial websites; information that will ideally be used to quickly dismiss a potential investment, resulting in more time spent researching stocks that present statistics already meeting a personal bare minimum required for further investigation. This is an investment tool designed to match only certain personalities and investment style. That being a slow, methodical, dispassionate research combined with a set of strict financial criteria.
Comments


Jamaican judge gets death threats
Jamaican judge Paul Harrison has reported receiving death threats in relation to his presiding over the trial of former Turks and Caicos Islands ex-Premier Michael Misick and others who are on corruption charges.
Harrison told the court that he had been informed of the threats by Jamaican and TCI officials, the Turks and Caicos Weekly News reported on Monday.
“I do not regard the defendants or anyone concerned with their legal representation as being concerned with any such matters, and I will see to it that the trial continues, and that it will be a fair trial to all, based on the evidence heard in this court,” Harrison is reported as having told the court. “Nothing extraneous to such evidence will be brought to bear in my consideration of this case.”
The 82-year-old judge is the father of former Jamaican Contractor General Dirk Harrison.
Attorney-at-law Reginald Armour also revealed on Monday that his client, Misick, would no longer take the witness stand.
Misick’s party is alleged to have received US$13.5 million over seven years for “electoral purposes” and the prosecution said that he spent much of the money on himself, including US$23,000 given to his wardrobe stylist; US$110,000 for a boat charter for Misick’s then-wife, Hollywood actress LisaRaye McCoy, and nine of her friends; and a further US$150,000 apparently debited for furnishings in the newly built Misick mansion.
The allegations followed a commission of inquiry initiated by the British government in 2008 with much of the allegations involving transactions with foreign developers seeking to build resorts during a period of unprecedented investment.


Raul's Rolodex: A Celebration of Under-Represented People in Tech
Load of past alum from our db.json file to the container below
Alum and Instructors Below!
Add yourself to our Alum and Instructors!
Add a new person!
Name
Pronouns
Pronouns
she/her
he/him
they/them
he/they
she/they
ze/zher/zhim
Is this person an alum?
Alum?
yes
no
Is this person an instructor?
Instructor?
yes
no
GitHub
Profile Picture URL
Submit


Shuwar sample
This is a sample of shuwarAs you can see, it works
It's processed by the nokogiri library
Just one note
If you think that shuwar is really weird, it is!
Some weird thing you might notice
Did you noticed that the attrs part of this div is weird?
It's looks like a hack, but it feels great! No joke!


Contents
Execute a single command on the command line shell. This is the default command - you do not need to and should not use the run command itself - just call the command.
It can take the following qualifiers:
Output is echo’ed to the terminal.
Prior to BetterBatch 1.2.0 output was echoed AFTER the process finished (unless ui qualifier was used). Since 1.2.0 output is echoed as it generated. As such echo and ui qualifiers have been merged (and ui is now just an alias for echo.)
Alias for echo (since 1.2.0)
To achieve the pre-1.2.0 functionality (where ui stopped capturing of output to the log file) specify nocapture & echo instead.
Simliar to the *nix shell command, this tool allows you to find the path of which (if any) command will be executed for a specific command.
e.g. if you run:
which notepad
it will return:
C:\WINDOWS\system32\notepad.EXE
Here is the help output:
Show the full path of commands.
Usage:
which [<options>...] [<command-name>...]
Options:
-h, --help Print this help and exit.
-V, --version Print the version info and exit.
-a, --all Print *all* matching paths.
-v, --verbose Print out how matches were located and
show near misses on stderr.
-q, --quiet Just print out matches. I.e., do not print out
near misses.
-p <altpath>, --path=<altpath>
An alternative path (list of directories) may
be specified for searching.
-e <exts>, --exts=<exts>
Specify a list of extensions to consider instead
of the usual list (';'-separate list, Windows
only).
Show the full path to the program that would be run for each given
command name, if any. Which, like GNU's which, returns the number of
failed arguments, or -1 when no <command-name> was given.
Near misses include duplicates, non-regular files and (on Un*x)
files without executable access.
This tool was included from http://code.google.com/p/which/. Please refer to the betterbatch\tools\LICENSE_Which.txt file for licensing information.
Return the filename (or directory name for a directory) of the path passed in.
Return the short path name of the filename
Return true if the text is in the file. It will output the found items one per line.
Usage: $prog [-r] file text_to_find [text_to_find...]
| -h, --help | show this help message and exit |
| -r, --regex | search and replacement are regular expressions |
| -n, --noerr | do not report an error if the text is not found |
| -i, --ignorecase | |
| ignore case when searching |
Replace text in file
Usage: $prog [-rn] [–encoding enc] filepath to_find replace_with
| -h, --help | show this help message and exit |
| -r, --regex | search and replacement are regular expressions |
| -n, --noerr | do not report an error if the text is not found |
| --encoding | (auto,none,...) specify the encoding of the text. A value of ‘AUTO’ will have the script try and find out the encoding - based on any BOMs present. A value of ‘NONE’ (default) will not decode the contents. The contents will be processed as ‘binary’. Any other value should be a valid Python encoding see http://docs.python.org/library/codecs.html#standard-encodings. |
Output a list of all the files matching the supplied pattern.
Usage: ListFilesMatchingPattern [options] (path) (patern1) (pattern2) ...
| -h, --help | show this help message and exit |
| -s, --recursive | |
| scan recursively |
This is especially useful in a loop to iterate over a particular set of files.
Example:
- for file in {{{ ListFilesMatchingPattern -s <xml_folder> *.xml *.xsl }}}:
- echo <file>
Verify that the file count is as specified
check if the path (file or directory) exists or not. If the path exists - then it returns true. example:
# if there is machine specific configuration then load it
- if exists <shell.computername>.bb:
- include <shell.computername>.bb
check if the path (file or directory) exists or not. If the path does not exist - then it returns true. This can be useful if you want to raise an error becuase one or more files does not exist.
r and n characters in the input will be replaced with \r and \n respectively.
Allows you to replace text in a string
Usage:
replace text to search in {*text to find*} {*replace with*}
Example:
# get the contents of the text file
- ser serverlocation = http://code.google.com/p/betterbatch/
- set mail_contents = {{{ type email_template.txt }}}
# replace the text 'SERVERLOCATION' in the email templaet
# with 'http://code.google.com/p/betterbatch/'
- echo {{{replace <mail_contents> {*SERVERLOCATION*} {*<serverlocation>*} }}}
The compare functionality is usually used in if statements. The examples give will show them in that context.
Usage:
compare text1 OPERATOR text2
Operators can be one of:
>=
<=
>
<
=
!=
startswith
endswith
contains
matches_regex
Example:
- set answer = {{{ get answer from somewhere }}}
- if compare <answer> = no:
- Do something when it is no
It can take the following qualifiers:
Return an uppercase version of the string
Return an lowercase version of the string
Return the value of a registry key
GetRegistryValue [options] (keypath) [value_name]
keypath should begin with one of the standard registry keys HKLM, HKEY_CURRENT_USER, etc.
value_name is optional - if not provided then the value for default key will be returned.
Example:
# print out the current path
- echo {{{ GetRegistryValue "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" path }}}
SetRegistryValue [options] (keypath) (value_name) (new_value)
keypath and value_name are the same as for GetRegistryValue(). new_value is the new value to set the registry entry to.
Examples:
# Ensure that hidden files are showed
- SetRegistryValue "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" Hidden 1
# show file extensions
- SetRegistryValue "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" HideFileExt 0
# do not use the search assistant
- SetRegistryValue "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState" "Use Search Asst" no
Return language information from the database - “langinfo.csv” (included in the betterbatch/tools folder along with GetLanguage.py)
For example:
- set dotnetlang = {{{ GetLanguage <lang> dotnet }}}
The betterbatch/tools directory is added as a ‘tools’ directory by default.
You can add other directories to be used as ‘tools’ directories by using this command.
Adding a tools directory means you do not have to specify the path to the command.
This command takes a list of items and ‘splits’ them up. This is especially useful in conjunction with the for statement.
Here is a simple example:
- set names = John Mary Wilbur
- echo {{{ split <names>}}}
The output will be:
John
Mary
Wilbur
By default is splits on any whitespace character, but you can specify any text to be used to split on:
- set names = John is connected to Mary is connected to Wilbur
- echo {{{ split <names> {is connected to} }}}
The output will (still) be:
John
Mary
Wilbur
The split command is not very useful on it’s own - but it is very useful when used with for statements.


Usage
batch(batch_fn, keys, splitting_strategy = NULL, combination_strategy = batchman::combine, size = 50, trycatch = FALSE, batchman.verbose = isTRUE(interactive()), stop = FALSE, retry = 0, sleep = 0, ncores = parallel::detectCores(), parallel = FALSE)
Arguments
- batch_fn
- function. The method to batch over.
- keys
- vector. The names of the keys within the function to batch.
Can be "..." if one is batching a splat function with no keys.
- splitting_strategy
- function. The strategy used to split up inputs.
Leave NULL to use the versatile default splitting strategy.
- combination_strategy
- function. The strategy used to recombine batches.
Defaults to class-agnostic combination.
- size
- numeric. The size of the packets. Default 50.
- trycatch
- logical. Whether to wrap the function in a tryCatch block.
Can be used to store and retrieve partial progress on an error.
- batchman.verbose
- logical. Whether or not to announce progress by printing dots.
- stop
- logical. Whether trycatch should stop if an error is raised.
- retry
- integer. The number of times to retry on error. 0 for no retrying.
- sleep
- integer. Time in seconds to sleep between batches.
- ncores
- integer. Number of cores to use if parallel is set to true. Notice that it doesn't
work on windows.
- parallel
- logical. Use parallel::mclapply to execute your batches. Incompatible with retry.
Value
a batched version of the passed function.
Description
batch maps a function to a batched version of that function.
Examples
batched_identity <- batch(identity, "x", combination_strategy = c, size = 10)
batched_identity(seq(100))
[1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
[19] 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
[37] 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
[55] 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
[73] 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
[91] 91 92 93 94 95 96 97 98 99 100
# Does identity, but in batches of 10.