黒木玄 Gen Kuroki
- いいね数 389,756/311,170
- フォロー 995 フォロワー 14,556 ツイート 293,980
- 現在地 (^-^)/
- Web https://genkuroki.github.io/documents/
- 自己紹介 私については https://twilog.org/genkuroki と https://genkuroki.github.io と https://github.com/genkuroki と https://github.com/genkuroki/public を見て下さい。
2018年02月07日(水)

【デススター銀河(3C321)】
へび座の方向12億光年の距離にある銀河であり、伴銀河とは互いに約2万光年離れており、ジェットの総延長は85万光年にも達するという。このジェットにより伴銀河が破壊的打撃を受けている。pic.twitter.com/3FuqxLviev
タグ:
posted at 00:30:17

twitter.com/whisponchan/st...
#Julia言語
github.com/jgreener64/Bio...
Bio3DView.jl provides an interface to explore macromolecular 3D structures using Julia in Jupyter notebooks. It uses PyCall.jl to call py3Dmol, a Python package that uses 3Dmol.js to render structures in the notebook. pic.twitter.com/6Qu1TrlyPE
タグ: Julia言語
posted at 00:56:36

非公開
タグ:
posted at xx:xx:xx

非公開
タグ:
posted at xx:xx:xx

Jane E. Herriman @JaneHerriman
"#intro to solving #diffeq in #julialang" with @ChrisRackauckas and @JuliaComputing starts in less than 20 minutes at www.youtube.com/watch?v=KPEqYt...! @JuliaLanguage
posted at 02:43:13

非公開
タグ:
posted at xx:xx:xx

812 double pendulums with different initial conditions jnafzig.github.io/2018/02/05/dou... pic.twitter.com/A9bZFSNFX1
タグ:
posted at 05:07:19

ポアンカレ埋め込みすげーな。謎空間上でword2vec的学習すると物事の階層関係を捉えられる、って理解。 catindog.hatenablog.com/entry/2018/01/... pic.twitter.com/ixP1Kprxw9
タグ:
posted at 06:39:20

目の錯覚に関する興味深い事例 imgur.com/L8swkHh 二枚の写真は立体視のために違う角度から撮られたものではなく、全く同一。しかし左側の写真の方が、道路に対してより平行な視線で撮られたように見える。二枚が同一であることを示すアニメーションも投稿されている。 imgur.com/Etbn4dl pic.twitter.com/SH4qUrnZfN
タグ:
posted at 07:14:54

twitter.com/yuki_cog/statu...
上のリンク先を私も試してみました。
Python 3.6.4 + numpy → 8.36s
Julia で for ループをまわすと → 約3ns
最初は早合点してしまったのですが、Julia側のcode_nativeをチェックすると答えを返すだけのコードにコンパイルされていました。続く
タグ:
posted at 07:20:27




「Pythonもnumpyなら速い」というのは真実なのでしょうが、実際にはメモリ効率を悪化させないように相当に注意深く書かないと、以上で示したようにものすごく遅くなってしまいます。
私の実力では必ずそうなりそうなので、速度が必要ならPython+numpyは使用不可能な選択肢になってしまいます。
タグ:
posted at 07:28:55

#Julia言語 でも以上で示したように計算途中で巨大配列が確保されてしまうようなコードを書くとものすごく遅くなるので、ブロードキャストを途切れさせない、in-place計算で無駄にメモリを消費しない、の2つを徹底する必要があります。
nbviewer.jupyter.org/gist/genkuroki... の1.4節に詳しい説明がある
タグ: Julia言語
posted at 07:31:06


#Julia言語 再検証用のJupyter notebooksを
gist.github.com/genkuroki/6a1a...
で公開しておきました。
タグ: Julia言語
posted at 07:36:00

実際には特に計算速度が決定的に重要なケースは少ないと思います。そういう場合には使い慣れた道具を使うことが各個人にとってベストの選択肢だと思う。
しかし、計算速度の重要性が増した場合には、普段使い慣れている道具以外の道具の使用も選択肢の中に入れておく方が合理的だと思う。
タグ:
posted at 07:38:24

実際には計算速度だけが上がっても、現代的なプログラミング言語が持っている便利な機能の一部を失ってしまうのはかなりつらい。例えば正直な話として「Cを使え」とか「C++を使え」とか言われるとつらい。自分のプログラミング能力と相談して便利なものを選択するしかない。
タグ:
posted at 07:42:29


gist.github.com/genkuroki/6a1a...
8.36s ← Python+numpy
6.04s ← Juliaで配列のsumを使う
0.8s ← Juliaで sum(i*j for i in 0:n-1 for j in 0:n-1)
3ns ← Juliaでforループ
Juliaでforループではforループを回した計算結果の答えを返すだけの函数にコンパイルされるので速い。 #Julia言語
タグ: Julia言語
posted at 08:17:35





スーパーグローバル大学トップ型は、アジア100位以内を死守!という程度のものになって来ました。予算的にもその程度が妥当。 twitter.com/akinori_ito/st...
タグ:
posted at 09:37:15


仙台駅に居たら小学生から話しかけられて「福島の果物について調べたのでご覧になってください」って手作りのパンフレットくれた。
読んでたら泣けてきた。
なんで子供がデマ払拭にこない努力しなくちゃいけないんだよ。 pic.twitter.com/YYN5BJOEQi
タグ:
posted at 09:58:20

はてなブログに投稿しました #はてなブログ
Julia入門 - Sets(集合) - St_Hakky’s blog
st-hakky.hatenablog.com/entry/2018/02/...
タグ: はてなブログ
posted at 10:00:07

須山敦志 Suyama Atsushi @sammy_suyama
こういう点に気づく若い方が増えてくれると嬉しいですね. twitter.com/TinyDrone/stat...
タグ:
posted at 10:00:15





twitter.com/genkuroki/stat...
私が知りたいのはこちらのリンク先。
@ code_native の結果も当然見ているのですが、複雑でよくわからない。
タグ:
posted at 10:23:07

twitter.com/iida_yasuyuki/...
飯田さん紹介のリンク先を見てみたら
【そもそも資本が資本を生み出すというのが資本主義の本来的な意味ですから、資本主義が続く以上はある程度の成長は自然に起きると思っています。】
と書いてあって目を疑った。
これ、本当に経済学者の発言?
タグ:
posted at 11:00:06

「技術革新(職場でのちょっとした工夫による効率改善を含む超絶広い意味での技術革新)の積み重ねによって経済は成長する。ゆえに経済成長では教育が重要な役目を果たす」ということだったと思うのだが。
【資本主義が続く以上はある程度の成長は自然に起きる】と書いてあってびっくり。ドン引き。
タグ:
posted at 11:07:07

【資本が資本を生み出すというのが資本主義の本来的な意味ですから、資本主義が続く以上はある程度の成長は自然に起きると思っています】という枠の中で物事を考えている人達が脱成長論を唱えるということなのでしょうかね。
教育は必然的に経済を成長させる、という発想とは極めて相性が悪い。
タグ:
posted at 11:14:54

例えば、私がツイートしている数学っぽいことを軽々と理解する人が仮に増えたとしたら(そうなるためにはそういう能力を持つ人達が社会的に大事にされると必要あり)、経済成長せずにすませることが可能だとは思えない。
タグ:
posted at 11:19:29

あと、私は就学前の子供達への教育は非常に大事だという立場なのですが、貧乏人の子がそれによってある程度救われるようになったときに、経済成長が実現しないことはあり得ないと考えています。
タグ:
posted at 11:21:30


あれ?【資本が資本を生み出すというのが資本主義の本来的な意味ですから、資本主義が続く以上はある程度の成長は自然に起きると思っています】にツッコミを入れているのはもしかして僕だけ?
単に脱成長論に反対するだけでは不十分だと思うのだが。
タグ:
posted at 11:30:11

【資本が資本を生み出すというのが資本主義の本来的な意味ですから、資本主義が続く以上はある程度の成長は自然に起きる】というようなものの見方の枠組みが有害な脱成長論を支えているのだと私は思う。
タグ:
posted at 11:35:57

日銀が400兆円分以上の国債を買ってもちっともインフレにもなりゃしないのに、数兆だの、ましてや億なんていうみみっちい単位でケチなことして国を衰退させる必要がどこにあるのかと。
タグ:
posted at 13:10:05

ニュートン力学が充分適用できる議論に対して「それは力学の基本法則に反していますよ」と指摘したら「ニュートン力学なんて厳密には成立しないことがとっくの昔に判明しているのに」みたいな的はずれな反応が来る……というのと同様のことが科学哲学でも起こったりするのだろうか。反証不能性とかで。
タグ:
posted at 13:11:24


言語学オリンピックは、国際科学オリンピックの中で唯一科学的な前提知識がいらなくて、発想力と論理的思考力が死ぬほど鍛えられるから中高生にぜひ挑戦してほしい。うちの弟(中2)は、1年間自宅警備員だったんだけど、過去問やり始めてからずっと机に向かっていて姉はとても嬉しい。 pic.twitter.com/zTztQYzFJZ
タグ:
posted at 13:45:09

比率が分からない大学生多過ぎ。とくに、何割増とか何%増とかってやつ。分数と結びつかないらしい。意味意味っていう割にはこんなことも理解させてないじゃん、と溜息。伸び率どころか時速も濃度も意味すら分かってないし。大学で教えることさじゃないだろうに。
タグ:
posted at 14:26:21

時々数学教える近所の女子高校生は、数3の微積とか複素平面の問題をある程度はサクサク解くのに、やはりシチュエーション変わると全く理にかなわないヘンテコな解き方をして頓挫する。本人も、いつも覚えたまま機械的に解いてるだけで、理解はしてないと自覚してる。でも学内試験ではいつも上位。
タグ:
posted at 15:16:13

Love how beautifully simple it is to make a truncated density plot in Julia. I remember doing this in #rstats; it wasn't this easy!
#julialang
using StatPlots, Distributions
plot(
Truncated(
Normal(0,1)
, -1, 1.2),
fill=(0, .5,:orange),
xlim = (-2,2)) pic.twitter.com/vWaDihs9Mf
posted at 15:35:44

以前ここで、25の48パーセントも48の25パーセントも数値は同じだから、48を4で割って12と暗算できると書いたら、そんなズルを教えたらダメだといってきた人いたなぁ。(25%は4分の1)でもそれ子どもの頃からやってた私はパーセントの意味分からずやってたわけじゃないと思うが。
タグ:
posted at 16:14:18

非公開
タグ:
posted at xx:xx:xx



Our 5th-order WENO implementation in #wombatcode made it to 2D - and it is beautiful ! Here is the x magnetic field in the 'cloud in a shock' test, 256x64 zones, compared to CT-TVD (Mendygral+18). Gif made with #julialang using Plots and the #GR backend. pic.twitter.com/SM2AwFO8Va
タグ: GR julialang wombatcode
posted at 20:04:15

小町君からの依頼で首都大でVAEの解説をしましたので、スライドを公開しました。chasen.org/~daiti-m/paper... 別に難しくないですが、論文やチュートリアルでは、やけにわかりにくい書き方がされているような気がします。
タグ:
posted at 20:14:40


#Julia言語
流れ図のアニメーションを追加しました。
streamplotはmatplotlibの機能。アニメ作成に3分弱。 pic.twitter.com/tuCtQ9LL6Q
タグ: Julia言語
posted at 20:32:08

#Julia言語 3分じゃくじゃなくて、4分強だった。
カルマン渦ソースファイル公開。
gist.github.com/genkuroki/1ec7...
nbviewer.jupyter.org/gist/genkuroki...
後者にはしばらくすれば反映するはず。
私はアニメ化しただけ。こうきょさんの作品。
twitter.com/hiding_koukyo/...
タグ: Julia言語
posted at 20:42:16


非公開
タグ:
posted at xx:xx:xx

twitter.com/ceptree/status...
昔からよくある最適化なんですが、Julia言語だと llvm と native の両方のコンパイル結果をものすごく普通にかつ気楽に閲覧できるので、「知ってはいるが、実物を見ると笑える」という場面をたびたび経験できる。
コンパイラに関する教育でJulia言語は結構使えそう。
タグ:
posted at 21:43:31

非公開
タグ:
posted at xx:xx:xx

#掛算 #超算数 小学生の保護者向け情報誌「プレジデントファミリー」の中学受験算数対策。食塩水の濃度の問題が出たら、この図を描いてマルの中に食塩水の濃度を書き込んで手順に従って計算すれば答えが出るというのだが…。(続 pic.twitter.com/87PeOLMbwG
posted at 22:18:57

続)「覚えておくべきコツ」が、水は0%の食塩水、食塩は100%の食塩水、というのがなんともスジが悪い感じ。この解法を見せられても、算数が苦手な児童はチンプンカンプンになりそう。なぜこれで答えが出るのか分からず、手順丸暗記しようとしてわけがわからなりそうだ。(続
タグ:
posted at 22:26:41

非公開
タグ:
posted at xx:xx:xx


続)なぜこれで答えが出るかというと、あらたに加える水□gを [a]水(5%) [b]水(95%)に分割する。125gの食塩水を [A]塩(3%), [B]塩(5%), [C]水(92%) に分割する。[a]と[A]がちょうど同じ重さになるようにすればいい。なぜならば、[a]と[A]を交換すると両方とも5%食塩水になるから。(続
タグ:
posted at 22:35:04

続)そういうわけで、□×5=125×3 の□にあてはまる数を探せばいいので 75g ということになる。算数苦手な児童が、あの図を見て、これが分かるとは思えず、手順丸暗記に走ってしまう可能性が高い。
タグ:
posted at 22:41:36

#掛算 #超算数 小学生の保護者向け情報誌の「プレジデントファミリー」の算数教育の記事だが、これも教育上よろしくない。 pic.twitter.com/F3Whq45FvH
posted at 22:46:11


非公開
タグ:
posted at xx:xx:xx

約数ビジュアライズ。素数の点だけを置くと素因数を表示し、自然数全部を置くと灰色で書かれた数の約数をすべて表示することができる
約数の多い数(24とか90とか)のときの大集合感というかグランドクロス感がとてもエモい pic.twitter.com/harkhViaDD
タグ:
posted at 23:33:26


すごく分かるのだけど。よくできた言語だと思うのだけど。結果的に、種類の多さが自慢のビュッフェで全部の料理を皿に盛ったみたいな言語になってるように感じる。 / なぜ僕らはJuliaを作ったか(翻訳) - 丸井綜研 marui.hatenablog.com/entry/20120221...
タグ:
posted at 23:48:29

非公開
タグ:
posted at xx:xx:xx