Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from nilmtk.plots import latexify, format_axes | |
import matplotlib.pyplot as plt | |
latexify(columns=1) | |
from mpltools import style | |
style.use('ggplot') | |
x = ["India", "USA", "China", "Korea", "Australia"] | |
y = [47, 29, 34, 26, 20] | |
fig, ax = plt.subplots() | |
ax.bar(range(len(y)), y) | |
format_axes(ax) |
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
OS: Linux-3.5.0-36-generic-x86_64-with-Ubuntu-12.10-quantal | |
System version: 2.7.3 (default, Apr 10 2013, 05:13:16) | |
[GCC 4.7.2] | |
Numpy version: 1.6.2 | |
Matplotlib version: 1.1.1 | |
Pandas version: 0.11.1.dev-58642a6 | |
Scikit-learn version: 0.12.1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from __future__ import print_function | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.basemap import Basemap as Basemap | |
from matplotlib.colors import rgb2hex | |
from matplotlib.patches import Polygon | |
import pandas as pd | |
m = Basemap(projection='merc') | |
shp_info = m.readshapefile( |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import pandas as pd | |
import pandas.io.sql as psql | |
import sqlite3 as lite | |
import json | |
con = lite.connect("/home/nipun/Desktop/funf/first_floor_small.db") | |
sql = "select timestamp, probe, value from data" | |
df = psql.frame_query(sql, con) | |
#Filter bluetooth content |
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
python dbdecrypt.py *.db | |
python dbmerge.py *.db |
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
In [100]: mac_to_name.values() | |
Out[100]: | |
[u'Mukund', | |
u'Wave Y', | |
u'BlackBerry 9220', | |
u'LP-DELHI-NEHA-A', | |
u'Father', | |
u'ubuntu-0', | |
u'Mother', | |
u'aaron', |
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
In [57]: con = lite.connect("/home/nipun/Desktop/funf/first_floor_small.db") | |
In [58]: sql = "select distinct probe from data" | |
In [59]: df = psql.frame_query(sql, con) | |
In [60]: df.probe.values | |
Out[60]: | |
array([u'edu.mit.media.funf.probe.builtin.AccelerometerSensorProbe', | |
u'edu.mit.media.funf.probe.builtin.CellTowerProbe', | |
u'edu.mit.media.funf.probe.builtin.LocationProbe', | |
u'edu.mit.media.funf.probe.builtin.BatteryProbe', | |
u'edu.mit.media.funf.probe.builtin.ProximitySensorProbe', |
OlderNewer