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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# https://github.com/adamhajari/spyre | |
from spyre import server | |
import numpy as np | |
import pandas as pd | |
pd.options.display.mpl_style = 'default' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Untitled1</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Notebook</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> |
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
# coding: utf-8 | |
from __future__ import unicode_literals | |
import numpy as np | |
import pandas as pd | |
import pandas.io.data as web | |
import pandas.tools.plotting as plotting | |
def get_quote_yahoojp(code, start=None, end=None, interval='d'): | |
base = 'http://info.finance.yahoo.co.jp/history/?code={0}.T&{1}&{2}&tm={3}&p={4}' |
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
#!/bin/bash | |
# -------------------------------------------------------------------------------------- | |
# Preparation | |
# To execute this script, please follow: | |
# wget https://gist.github.com/sinhrks/ba9876e7aa2a18a601f8/raw/environment_setup.sh | |
# chmod +x environment_setup.sh | |
# ./environment_setup.sh | |
# -------------------------------------------------------------------------------------- |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals, division | |
import numpy as np | |
np.random.seed(1) | |
from matplotlib import pyplot as plt | |
import matplotlib.cm as cm | |
class HopfieldNetwork(object): |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from collections import defaultdict | |
import numpy as np | |
np.random.seed(1) | |
import networkx as nx | |
class MRF(object): | |
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
# -*- coding: utf-8 -*- | |
""" | |
This code uses "dA" class defined in: | |
http://www.deeplearning.net/tutorial/dA.html | |
""" | |
import os | |
import numpy | |
import theano |
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
# -*- coding: utf-8 -*- | |
""" | |
This code uses "MLP" class defined in: | |
http://deeplearning.net/tutorial/mlp.html#tips-and-tricks-for-training-mlps | |
""" | |
import os | |
import sys | |
import time |
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
""" | |
This code is used to visualize | |
http://deeplearning.net/tutorial/mlp.html#tips-and-tricks-for-training-mlps | |
Usage: put the following on 389th line | |
title = "whatever you want" | |
plot_pca(classifier, x, train_set_x, train_set_y, index=epoch, title=title) | |
""" | |
def plot_pca(classifier, x_symbol, x_data, y_data, index=0, |