Skip to content

Instantly share code, notes, and snippets.

@aahoo
aahoo / lab3.ipynb
Created October 18, 2017 19:47
Lab 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aahoo
aahoo / Extracting building envelope elements in IFC.ipynb
Last active January 9, 2017 14:45
Extracting building envelope elements in IFC using IfcOpenShell and BIMserver
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aahoo
aahoo / A Github Flavored Theme for Ipython or Jupyter Notebook.md
Last active May 20, 2022 09:02
Github Flavored Theme for Ipython/Jupyter Notebook

Github Flavored Theme for Ipython/Jupyter Notebook

Put custom.css in .jupyter/custom/ (if you are running recent version of Jupyter).

Note: Tested only on Chrome. Let me know if something is not working.

img1 img1 img1

@aahoo
aahoo / energyplus weather file download python2.py
Last active October 26, 2023 22:36
Automatically download energyplus weather data files (epw and ddy), 2 versions python 2 and 3
import json
import re
import urllib2
path_to_save = '' # create a directory and write the name of directory here
data_file = urllib2.urlopen('https://github.com/NREL/EnergyPlus/raw/develop/weather/master.geojson')
data = json.load(data_file)
# or you can download master.geojson and run the below code instead of downloading from the net
# with open('master.geojson') as data_file:
# data = json.load(data_file)
@aahoo
aahoo / code.py
Last active April 20, 2016 06:49
Udacity deep learning course assignment 3 problem 4
# download the file @ https://www.dropbox.com/s/urqmc4jgt66hbef/notMNIST.pickle?dl=0
pickle_file = 'notMNIST.pickle'
from time import strftime
from math import sqrt
from __future__ import print_function
import numpy as np
import tensorflow as tf
from six.moves import cPickle as pickle
{
"directed": false,
"graph": [],
"nodes": [{
"id": "Simulink"
}, {
"id": "IntelliCorp (Software)"
}, {
"id": "Hope (programming language)"
}, {
@aahoo
aahoo / philosophers.json
Last active December 9, 2015 18:18
Networkx sample Adjacency Matrix converted to JSON using json_graph.adjacency_data(G)
{
"directed": false,
"graph": [],
"nodes": [{
"id": "Christian Wolff (philosopher)"
}, {
"id": "Martin Heidegger"
}, {
"id": "Lucretius"
}, {
from networkx.readwrite import json_graph
import json
# Return data in adjacency format that is suitable for
# JSON serialization and use in Javascript documents.
# more @https://goo.gl/QoRlbL
data = json_graph.adjacency_data(G)
with codecs.open('matrix.json', 'w', encoding='utf-8') as f:
json.dump(data, f)