Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<script>
window.onload = function(){
var obj = {hoge: "nya", nya: {hoge: 123}};
var content = JSON.stringify(obj);
var uriContent = "data:application/json," + encodeURIComponent(content);
var newWindow=window.open(uriContent, 'hoge.json');
};
</script>
@domitry
domitry / hoge.md
Last active August 29, 2015 14:12

DataFrameの開発による科学用途のgem開発の促進 中間報告

助成金の期間の内、中間報告までに以下の3つのgemにそれぞれコミットした。

Mikon

データ可視化ライブラリNyaplotのモジュールだったNyaplot::DataFrameを分離し独立したgem、Mikonとして公開した。

データストレージの切り替え

Nyaplot::DataFrameではデータストレージとしてRuby標準のArrayを使っていたが、MikonではSciRubyで開発されている多次元配列ライブラリNMatrixに切り替え高速化を図った。 これによりMikonはNMatrix v0.1.0以上に依存することとなったが、NMatrixは未だ不安定でNyaplotなど他のライブラリに依存させるには不安がある。 そこで最終報告までにNMatrixへの依存をなくした軽量版のリリースを予定している。

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
const int pins[16][4] = {
{LOW,LOW,LOW,LOW},
{LOW,LOW,LOW,HIGH},
{LOW,LOW,HIGH,LOW},
{LOW,LOW,HIGH,HIGH},
{LOW,HIGH,LOW,LOW},
{LOW,HIGH,LOW,HIGH},
{LOW,HIGH,HIGH,LOW},
{LOW,HIGH,HIGH,HIGH},
{HIGH,LOW,LOW,LOW},
def integrand(t, q, f_args)
g = 9.80665
theta1, theta2 = q[0..1]
d_theta1_dt, d_theta2_dt = q[2..3]
m_mat = N[[(m1+m2)*l1*l1, m2*l1*l2*Math.cos(theta1-theta2)],
[m2*l1*l2*Math.cos(theta1-theta2), m2*l2**2]]
vec = N[[-m2*l1*l2*(d_theta2_dt**2)*Math.sin(theta1-theta2)-(m1+m2)*g*l1*Math.sin(theta1)],
[m2*l1*l2*(d_theta1_dt**2)*Math.sin(theta1-theta2)-m2*g*l2*Math.sin(theta2)]]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@domitry
domitry / Gillespie3.ipynb
Created December 12, 2014 08:08
Nyaaaaaaaaaaaaaaaaa
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@domitry
domitry / Gillespie1.ipynb
Created December 11, 2014 10:01
hogehogenya
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.