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
#Open Terminal & move to where you want to install | |
#Install git: sudo apt-get install git-core | |
#git clone https://gist.github.com/6214690.git | |
#cd 6214690/ | |
#sh energyplus.sh | |
#Download EnergyPlus | |
sudo wget http://developer.nrel.gov/downloads/buildings/energyplus/builds/EnergyPlus-7.2.0.006-Linux-64.tar.gz | |
sudo tar xzf EnergyPlus-7.2.0.006-Linux-64.tar.gz | |
find EnergyPlus-7-2-0-006/bin/ -type f -perm -o+rx; |
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
# code to solve https://stackoverflow.com/q/47932589/2237916 | |
import numpy as np | |
import tflearn | |
from random import shuffle | |
# parameters | |
n_input=100 | |
n_train=2000 | |
n_test = 500 | |
# generate data |
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
""" | |
NMF by coordinate descent, designed for sparse data (without missing values) | |
""" | |
# Author: Mathieu Blondel <mathieu@mblondel.org> | |
# License: BSD 3 clause | |
import numpy as np | |
import scipy.sparse as sp | |
import numba |
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
# Copyright (C) 2013 Istituto per l'Interscambio Scientifico I.S.I. | |
# You can contact us by email (isi@isi.it) or write to: | |
# ISI Foundation, Via Alassio 11/c, 10126 Torino, Italy. | |
# | |
# This work is licensed under a Creative Commons 4.0 | |
# Attribution-NonCommercial-ShareAlike License | |
# You may obtain a copy of the License at | |
# http://creativecommons.org/licenses/by-nc-sa/4.0/ | |
# | |
# This program was written by Andre Panisson <panisson@gmail.com> at |
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 math import log | |
log2= lambda x:log(x,2) | |
from scipy import histogram, digitize, stats, mean, std | |
from collections import defaultdict | |
def mutual_information(x,y): | |
return entropy(y) - conditional_entropy(x,y) | |
def conditional_entropy(x, y): | |
""" |
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 numpy as np | |
import pymc | |
import pdb | |
def unconditionalProbability(Ptrans): | |
"""Compute the unconditional probability for the states of a | |
Markov chain.""" | |
m = Ptrans.shape[0] |
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
ipython nbconvert --to markdown <notebook>.ipynb --config jekyll.py |
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 torch | |
import torch.nn as nn | |
from torch.nn import functional as F | |
from torch.autograd import Variable | |
from torch import optim | |
import numpy as np | |
import math, random | |
# Generating a noisy multi-sin wave |
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
# code from http://danieljlewis.org/files/2010/06/Jenks.pdf | |
# described at http://danieljlewis.org/2010/06/07/jenks-natural-breaks-algorithm-in-python/ | |
def getJenksBreaks( dataList, numClass ): | |
dataList.sort() | |
mat1 = [] | |
for i in range(0,len(dataList)+1): | |
temp = [] | |
for j in range(0,numClass+1): | |
temp.append(0) |
OlderNewer