This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2013 Alexandre Bulté <alexandre[at]bulte[dot]net> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
## Requirements |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- https://gist.github.com/abulte/5264753 --> | |
{%- macro form_field_label(field) -%} | |
<label class="control-label" for="{{ field.id }}">{{ field.label.text }} | |
{%- if field.flags.required -%} | |
<abbr title="Required"> *</abbr> | |
{%- endif %}</label> | |
{% endmacro %} | |
{%- macro form_field_help(help) -%} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2013 Alexandre Bulté <alexandre[at]bulte[dot]net> | |
# | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from geventwebsocket.handler import WebSocketHandler | |
from gevent.pywsgi import WSGIServer | |
from flask import Flask, request, render_template | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## RPI 1/2 | |
GtkPerf 0.40 - Starting testing: Thu Jan 10 11:44:55 2013 | |
GtkEntry - time: 0.75 | |
GtkComboBox - time: 10.18 | |
GtkComboBoxEntry - time: 5.72 | |
GtkSpinButton - time: 1.05 | |
GtkProgressBar - time: 0.72 | |
GtkToggleButton - time: 1.12 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## RPI 1/2 | |
Long uses 4 bytes. Allocating 2*33554432 elements = 268435456 bytes of memory. | |
Using 262144 bytes as blocks for memcpy block copy test. | |
Getting down to business... Doing 10 runs per test. | |
0 Method: MEMCPY Elapsed: 1.72793 MiB: 128.00000 Copy: 74.077 MiB/s | |
1 Method: MEMCPY Elapsed: 1.72856 MiB: 128.00000 Copy: 74.050 MiB/s | |
2 Method: MEMCPY Elapsed: 1.73830 MiB: 128.00000 Copy: 73.635 MiB/s | |
3 Method: MEMCPY Elapsed: 1.72849 MiB: 128.00000 Copy: 74.053 MiB/s | |
4 Method: MEMCPY Elapsed: 1.72736 MiB: 128.00000 Copy: 74.102 MiB/s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## RPI 1/2 | |
sysbench 0.4.12: multi-threaded system evaluation benchmark | |
Running the test with following options: | |
Number of threads: 1 | |
Doing CPU performance benchmark | |
Threads started! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## CUBIE BOARD | |
dbench version 4.00 - Copyright Andrew Tridgell 1999-2004 | |
Running for 600 seconds with load '/usr/share/dbench/client.txt' and minimum warmup 120 secs | |
0 of 1 processes prepared for launch 0 sec | |
1 of 1 processes prepared for launch 0 sec | |
releasing clients | |
1 664 21.16 MB/sec warmup 1 sec latency 557.218 ms | |
1 664 10.58 MB/sec warmup 2 sec latency 1557.416 ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@raspberrypi:/home/pi# apt-get install phoronix-test-suite | |
root@raspberrypi:/home/pi# cat /proc/cpuinfo | |
Processor : ARMv7 Processor rev 2 (v7l) | |
BogoMIPS : 1006.38 | |
Features : swp half thumb fastmult vfp edsp neon vfpv3 tls | |
CPU implementer : 0x41 | |
CPU architecture: 7 | |
CPU variant : 0x3 | |
CPU part : 0xc08 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
EXPECTED_ARGS=2 | |
NAME=$1 | |
if [ $# -ne $EXPECTED_ARGS ] | |
then | |
echo "Usage: `basename $0` <partition_name> <image_path>" | |
echo "Example: `basename $0` disk2s1 ./rpi.img" |