(Shortest import: frombrian2importSpikeMonitor)
Coderunner Extension
CodeRunner 4.0.2 Cracked for macOS Lingki - Apps Updated: November 16, 2020 0 CodeRunner, an advanced, highly flexible, and easy-to-use programming editor, supports a large number of languages and delivers big IDE features while remaining lightweight. Try using the blocks to help me remove all the piles and fill in all the holes on the ground. Try to use loops instead of using too many blocks. Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor. @@ -67,7 +67,7 @@ to see if the problem has already been reported. If it does exist, add a: thumbsup: to the issue to indicate this is also an issue for you, and add a comment to the existing issue if there is extra information you can contribute.
brian2.monitors.spikemonitor.SpikeMonitor(*args, **kw)[source]¶Bases: brian2.monitors.spikemonitor.EventMonitor
Record spikes from a NeuronGroup or other spike source.
The recorded spikes can be accessed in various ways (see Examples below):the attributes i and t store all the indicesand spike times, respectively. Alternatively, you can get a dictionarymapping neuron indices to spike trains, by calling the spike_trainsmethod. If you record additional variables with the variables argument,these variables can be accessed by their name (see Examples).

source : (NeuronGroup, SpikeSource)
variables : str or sequence of str, optional
Which variables to record at the time of the spike (in addition to theindex of the neuron). Can be the name of a variable or a list of names.
record : bool, optional
Whether or not to record each spike in i and t (the count willalways be recorded). Defaults to True.
when : str, optional
When to record the events, by default records events in the same slotwhere the event is emitted.
order : int, optional
The priority of of this group for operations occurring at the same timestep and in the same scheduling slot. Defaults to the order where theevent is emitted + 1, i.e. it will be recorded directly afterwards.
name : str, optional
A unique name for the object, otherwise will usesource.name+'_spikemonitor_0', etc.
codeobj_class : class, optional
Examples
Attributes
The array of spike counts (length = size of target group) |
Returns the total number of recorded spikes. |
Methods
| Return a dictionary mapping recorded variable names (including |
| Return a dictionary mapping spike indices to arrays of spike times. |
| Return a dictionary mapping neuron indices to arrays of variable values at the time of the spikes (sorted by time). |
Details
count¶The array of spike counts (length = size of target group)
num_spikes¶Returns the total number of recorded spikes.
all_values()[source]¶Return a dictionary mapping recorded variable names (including t)to a dictionary mapping neuron indices to arrays of variable values atthe time of the spikes (sorted by time). This is equivalent to (but moreefficient than) calling values for each variable and storing theresult in a dictionary.
all_values : dict
Dictionary mapping variable names to dictionaries which themselvesare mapping neuron indicies to arrays of variable values at thetime of the spikes.
Examples
spike_trains()[source]¶Return a dictionary mapping spike indices to arrays of spike times.
spike_trains : dict
Dictionary that stores an array with the spike times for eachneuron index.
Examples
values(var)[source]¶Return a dictionary mapping neuron indices to arrays of variable valuesat the time of the spikes (sorted by time).
var : str
The name of the variable.
values : dict
Dictionary mapping each neuron index to an array of variablevalues at the time of the spikes.
Examples
Tutorials and examples using this¶
Tutorial 3-intro-to-brian-simulations
Tutorial 1-intro-to-brian-neurons
Example phase_locking
Example IF_curve_LIF
Example non_reliability
Example CUBA
Example adaptive_threshold
Example IF_curve_Hodgkin_Huxley
Example reliability
Example frompapers/Platkiewicz_Brette_2011
Example frompapers/Brunel_Wang_2001
Example frompapers/Brette_Gerstner_2005
Example frompapers/Vogels_et_al_2011
Example frompapers/Diesmann_et_al_1999
Example frompapers/Touboul_Brette_2008
Example frompapers/Brette_Guigon_2003
Example frompapers/Rossant_et_al_2011bis
Example frompapers/Brette_2004
Example frompapers/Brunel_Hakim_1999
Example frompapers/Izhikevich_2007
Example frompapers/Sturzl_et_al_2000
Example frompapers/Stimberg_et_al_2018/example_6_COBA_with_astro
Example frompapers/Stimberg_et_al_2018/example_1_COBA
Example frompapers/Brette_2012/Fig5A
Example synapses/jeffress
Example synapses/STDP
Example synapses/licklider
Example standalone/STDP_standalone
Example standalone/cuba_openmp
Example advanced/opencv_movie
Example advanced/custom_events
Example compartmental/hh_with_spikes
さて前回に続いて、今度はコマンドラインで Kotlin のHelloWorldをやってみたいと思います。
公式ドキュメントのチュートリアルを見ながら進めていきます.

まずは念のため既にインストールされていないか確認します。
IntelliJ IDEA で自動でインストールされてはいないようですね。
SDKMAN! のインストール
brewでインストールするのが手っ取り早いかと思ったのですが、SDKMAN!という複数バージョンを共存させられるrbenvと似たようなツールがあるようです。
しかもKotlin以外の言語にも対応しているとのことで今後も使えそうなので、これを使ってインストールしてみます。
以下のコマンドを実行して有効にします。
Coderunner 3
sdk helpと試しに打ってみると。
sdk listというコマンドを使うとインストール可能なツールや言語の一覧が表示できるっぽいです。

Coderunner Download
Kotlin のインストール
SDKMAN!を使ってインストールをします。
sdk list kotlinコマンドで、一応インストール可能なバージョン一覧を見てみます。
なるほど今日時点の最新は1.1.2-2なのですね。
sdk install kotlinで最新版をインストールします。
もう一度sdk list kotlinしてみる、最新版がインストールされて有効になっているのが分かります。
下の方に書いてありますが、
*がインストール済み>が現在有効になっているバージョン
ということみたいですね。
+はまだ表示されていないので断言できませんが、特定のディレクトリに適用されたバージョンが表示されるのでしょう。
ソース作成
さてまずはhello.ktを作成します。
コンパイル
つぎはコンパイルですね。
kotlincというコマンドを使ってコンパイルするようです。(ちょっと長いのでktcとかエイリアスを貼ってもいいかもですね)
-dが出力を指定するもの、-include-runtimeが.jarの中にKotlinのランタイムを同梱するオプションのようです。
ちなみに最初に拡張子を.ktではなく.tkとしてしまっていたのですが、そうした場合は以下のようなエラーが出てコンパイルできませんでした。
なるほど拡張子は.ktでないとKotlinのソースとしては認識されないのですね。
実行
さてディレクトリの中身を見ると、hello.jarがちゃんと出来ていますね。
javaコマンドを使ってjava -jar hello.jarで実行できるようです。
ちゃんと実行できましたね。
kotlinc -helpでヘルプが見られるようなので確認しておきます。
もっと大量のオプションを予想していたのですが、思ったよりは少ないですね。(swiftc --helpの量が多すぎるのかも分かりませんが)
今後必要な時に見ていくことにします。
さて無事にコマンドラインでKotlinのHelloWorldを試すことが出来ました。最近の言語は試すのが導入から試すまでが簡単で良いですね。
ちなみにチュートリアルのページには、ライブラリの作成方法やREPL、スクリプトとしての実行などが含まれているのですが、続きは別の記事にしたいと思います。