Skip to content

Instantly share code, notes, and snippets.

@ronekko
ronekko / LDR - More about Recently Added Feeds.user.js
Last active August 29, 2015 14:11
LDR - More about Recently Added Feeds.user.js
// ==UserScript==
// @name LDR - More about Recently Added Feeds
// @namespace http://profile.livedoor.com/ronekko/
// @description Livedoor Readerで「○○の新着フィード」のフィードにより詳しい情報を追加する
// @include http://reader.livedoor.com/reader/
// @include http://reader.livedoor.com/subscribe/*
// @version 20141229
// ==/UserScript==
//20120512: Greasemonkey 0.9.19におけるwindow.setTimeoutの仕様変更に対処
//20141210: "Live Dwango Readerに登録"に変更になったことへの対処とか
@ronekko
ronekko / LDR - Expand Folders in Rate View Mode.user.js
Last active August 29, 2015 14:12
LDR - Expand Folders in Rate View Mode
// ==UserScript==
// @name LDR - Expand Folders in Rate View Mode
// @namespace http://profile.livedoor.com/ronekko/
// @description Livedoor Readerで起動/リロード時にフォルダを自動的に開く(レート表示モードのときのみ)
// @include http://reader.livedoor.com/reader/
// @version 20150102
// @grant GM_getValue
// @grant GM_setValue
// @grant unsafeWindow
// ==/UserScript==

numpy.dot について

xとWのshapeが様々なパターンのときの、a = np.dot(x, W) の結果のaのshapeを観察すると以下のようになっている。

x.shape W.shape a.shape
(D,) (D,) scalar
(D,) (D, 1) (1,)
(D,) (D, K) (K,)
(N, D) (D, K) (N, K)
(T, N, D) (D, K) (T, N, K)
import subprocess
subprocess.Popen(['proc.bat'], creationflags=subprocess.CREATE_NEW_CONSOLE)
print "Launched a process on new console"
@ronekko
ronekko / mixture_distributions.py
Last active August 29, 2015 14:27
Mixture distribusions
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 10 14:40:04 2015
@author: ryuhei
"""
import numpy as np
from basic_distributions import (
ProbabilityDistribution, Multinomial, Gaussian, Poisson
// 以下のFirefox用アドオンにタグ選択パネルを付加するuserChrome.jsスクリプトです
// Hatebu IncSearch, livedoor clip IncSearch, del.icio.us IncSearch, Google Bookmarks IncSearch
(function(){
const LIVEDOOR_URL = 'chrome://livedoorclip_incsearch/content/view.html';
const LIVEDOOR_DIR = 'livedoorclip_incsearch';
const HATEBU_URL = 'chrome://hatebu_incsearch/content/view.html';
const HATEBU_DIR = 'hatebu_incsearch';
const DELICIOUS_URL = 'chrome://delicious_incsearch/content/view.html';
// ==UserScript==
// @name LDR - More about Recently Added Feeds
// @namespace http://profile.livedoor.com/ronekko/
// @description Livedoor Readerで「○○の新着フィード」のフィードにより詳しい情報を追加する
// @include http://reader.livedoor.com/reader/
// @include http://reader.livedoor.com/subscribe/*
// @include http://reader.livedwango.com/reader/
// @include http://reader.livedwango.com/subscribe/*
// @version 20160215
// ==/UserScript==
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 12 19:35:52 2015
@author: ryuhei
"""
import numpy as np
from sklearn import datasets
import matplotlib.pyplot as plt
@ronekko
ronekko / Numerical differentiation.ipynb
Created June 21, 2016 04:55
Numerical differentiation of neural network with 1 hidden layer
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronekko
ronekko / Weight initialization by normal distribution with various scales.ipynb
Created June 21, 2016 04:56
Weight initialization by normal distribution with various scales.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.