Links to technical datasheets of all currently used components (Older version at http://t27.github.io/tiva-docs)
This file contains 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
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Author: Ola Sitarska <ola@sitarska.com> | |
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
""" |
This file contains 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
#a script to convert a spreadsheet to a question-answer type document(where the heading of each column is the question and each row is an answer), generally useful to generate readable documents from surveys or similar spread sheets | |
import csv | |
with open('survey.csv', 'rb') as csvfile: | |
reader = csv.reader(csvfile) | |
csv_as_list = list(reader) | |
This file contains 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
var request = require('request'); | |
var citylist = require('./data/citylist').citylist; // the array of city names | |
var i; | |
var cityDataStore = {}; | |
for (i = 0; i < citylist.length; i++) { | |
if (i < citylist.length) { | |
url = 'http://maps.googleapis.com/maps/api/geocode/json?address=' + citylist[i] + '&sensor=false'; // Max 2500 free requests per IP per Day |
This file contains 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
SysTickPeriodSet(80000000); // The period should be equal to the system clock time to ensure the systick values are in clock cycle units | |
SysTickEnable(); | |
while(1) { | |
t1 = SysTickValueGet(); // clock cycles | |
a = pe -> getPosition(); | |
t2 = SysTickValueGet(); // clock cycles | |
time = (t1 - t2); // difference measured in clock cycles | |
} |
This file contains 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
EPUBSTR="EPUB document" | |
HTMLSTR="XML document text" | |
for f in */*.pdf | |
do | |
VAR1=$(file -b "$f") | |
# echo $VAR1 | |
if [[ "$VAR1" == "$EPUBSTR" ]]; | |
then | |
fnew=${f/%.pdf/.epub} | |
mv "$f" "$fnew" |
This file contains 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
v=$('input[id*=chk]'); | |
for(var i =0; i<10;i++) { v[i].click()}; | |
$('#contentAction_delete_myx > div > a > span > button').click(); | |
$('#dialogButton_ok_myx > span > button').click() |
This file contains 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
.ad_box, .ad_box + .hr { | |
display: none; | |
} | |
.article_preview,body #story { | |
color: rgba(0,0,0,0.8); | |
font-family: "FreightText"; | |
letter-spacing: 0.01rem; | |
line-height: 1.5; | |
} |
This file contains 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
#include <Wire.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_LSM303.h> | |
Adafruit_LSM303_Accel_Unified accel = Adafruit_LSM303_Accel_Unified(54321); | |
// mess with this number to adjust TWINklitude :) | |
// lower number = more sensitive | |
#define MOVE_THRESHOLD 45 |
OlderNewer