Skip to content

Instantly share code, notes, and snippets.

View exp0nge's full-sized avatar
👨‍💻
selective compiling...

MD Islam exp0nge

👨‍💻
selective compiling...
View GitHub Profile
defaultCountTicker
.group(defaultDim.group())
.formatNumber(d3.format('')); //show the whole number
$(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'];
<span class='reset' style='visibility: hidden;'>
Filter: <span class='filter'></span>
</span>
<a class='reset' href="#" style='visibility: hidden;'>reset</a>
@exp0nge
exp0nge / hcsr04_ultrasonic.py
Created February 19, 2017 03:05
hcsr04 with a fix for the stupid signal being frozen
# 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)
@exp0nge
exp0nge / python3_mraa_upm
Last active April 18, 2017 03:54 — forked from gaiar/python3_mraa_upm
How to install Python 3 with libmraa and upm
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
@exp0nge
exp0nge / nginx.conf
Created November 7, 2017 05:36 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
#!/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."
@exp0nge
exp0nge / intent-schema.json
Created January 17, 2018 02:45
Doorman Custom Skill Intent Schema
{
"intents": [
{
"slots": [
{
"name": "CheckDoorQuery",
"type": "LITERAL"
}
],
"intent": "CheckDoorIntent"
@exp0nge
exp0nge / utterances.txt
Last active March 4, 2019 14:35
Doorman Custom Skill Utterances
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}
"""
Execute in Intel Edison
"""
import time
def does_module_exists(module_name):
try:
__import__(module_name)
except ImportError:
return False