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
defaultCountTicker | |
.group(defaultDim.group()) | |
.formatNumber(d3.format('')); //show the whole number |
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
$(document).ready(function () { | |
d3.json('data.json', function (data) { | |
var genderPieChart = dc.pieChart('#genderPie'); | |
var marriagePieChart = dc.pieChart('#marriagePie'); | |
var ageDefaultersChart = dc.barChart('#ageDefaulters'); | |
var limitBalDefaultersChart = dc.lineChart('#limitBalDefaulters'); | |
var defaultCountTicker = dc.numberDisplay('.default-count'); | |
var ndx = crossfilter(data); | |
var defaultDim = ndx.dimension(function (d) { | |
return d['default payment next month']; |
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
<span class='reset' style='visibility: hidden;'> | |
Filter: <span class='filter'></span> | |
</span> | |
<a class='reset' href="#" style='visibility: hidden;'>reset</a> |
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
# http://stackoverflow.com/questions/32300000/galileo-and-ultrasonic-error-when-distance-less-than-4cm | |
import mraa | |
import time | |
trig = mraa.Gpio(3) | |
echo = mraa.Gpio(4) | |
trig.dir(mraa.DIR_OUT) | |
echo.dir(mraa.DIR_IN) |
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
GETTING FROM REPO [Broken] | |
# Adding repositories and installing required software | |
echo "src/gz all http://repo.opkg.net/edison/repo/all" >> /etc/opkg/base-feeds.conf && echo "src/gz edison http://repo.opkg.net/edison/repo/edison" >> /etc/opkg/base-feeds.conf && echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32" >> /etc/opkg/base-feeds.conf && opkg update | |
# Updating mraa and upm | |
opkg upgrade libmraa0 && opkg upgrade upm |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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
#!/bin/bash | |
( | |
dmesg -D | |
echo Scanning for wifi networks: | |
ifup wlan0 | |
wpa_cli scan | |
echo -e "\nStrongest networks found:" | |
wpa_cli scan_res | sort -grk 3 | head | awk -F '\t' '{print $NF}' | uniq | |
set -e | |
echo -e /"\nWARNING: this script will back up and remove all of your current wifi configs." |
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
{ | |
"intents": [ | |
{ | |
"slots": [ | |
{ | |
"name": "CheckDoorQuery", | |
"type": "LITERAL" | |
} | |
], | |
"intent": "CheckDoorIntent" |
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
CheckDoorIntent check my {door|CheckDoorQuery} | |
CheckDoorIntent to check my {door|CheckDoorQuery} | |
CheckDoorIntent see if someone is at my {door|CheckDoorQuery} | |
CheckDoorIntent is anyone there {anyone|CheckDoorQuery} | |
CheckDoorIntent do I have a {package|CheckDoorQuery} | |
CheckDoorIntent what is at the {door|CheckDoorQuery} | |
StatusIntent to check my camera {status|StatusQuery} | |
StatusIntent {status|StatusQuery} | |
StatusIntent is my camera {working|StatusQuery} | |
StatusIntent is my camera {functional|StatusQuery} |
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
""" | |
Execute in Intel Edison | |
""" | |
import time | |
def does_module_exists(module_name): | |
try: | |
__import__(module_name) | |
except ImportError: | |
return False |