Skip to content

Instantly share code, notes, and snippets.

View lab3.ipynb
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 Jan 9, 2017
Extracting building envelope elements in IFC using IfcOpenShell and BIMserver
View Extracting building envelope elements in IFC.ipynb
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 Aug 23, 2020
Github Flavored Theme for Ipython/Jupyter Notebook
View A Github Flavored Theme for Ipython or Jupyter Notebook.md

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 Jul 23, 2020
Automatically download energyplus weather data files (epw and ddy), 2 versions python 2 and 3
View energyplus weather file download python2.py
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)
View debug.md
@aahoo
aahoo / code.py
Last active Apr 20, 2016
Udacity deep learning course assignment 3 problem 4
View code.py
# 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
View programming languages relatedness adjacency matrix
{
"directed": false,
"graph": [],
"nodes": [{
"id": "Simulink"
}, {
"id": "IntelliCorp (Software)"
}, {
"id": "Hope (programming language)"
}, {
@aahoo
aahoo / philosophers.json
Last active Dec 9, 2015
Networkx sample Adjacency Matrix converted to JSON using json_graph.adjacency_data(G)
View philosophers.json
{
"directed": false,
"graph": [],
"nodes": [{
"id": "Christian Wolff (philosopher)"
}, {
"id": "Martin Heidegger"
}, {
"id": "Lucretius"
}, {
View networkx adjacency export.py
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)
You can’t perform that action at this time.