about summary refs log tree commit diff stats
path: root/src/plugins/python_plugins.h
Commit message (Expand)AuthorAgeFilesLines
* Apply coding styleMichael Vetter2020-07-071-42/+42
* Revert "Apply coding style"Michael Vetter2020-07-071-42/+42
* Apply coding styleMichael Vetter2020-07-071-42/+42
* Add vim modelineMichael Vetter2019-11-131-0/+1
* Update copyright to include 2019Michael Vetter2019-01-221-1/+1
* Update copyrightJames Booth2018-01-211-1/+1
* Show Python version on --versionJames Booth2017-08-101-1/+2
* Update CopyrightJames Booth2017-01-281-1/+1
* Add pre chat and room message blockingJames Booth2017-01-221-0/+3
* Add resource to chat message plugin hooksJames Booth2016-08-101-14/+14
* Make header defines consistentJames Booth2016-07-241-2/+2
* Add /plugins python_version commandJames Booth2016-07-241-0/+2
* Update GPL link in headersJames Booth2016-07-241-1/+1
* Add plugins on_unload hookJames Booth2016-07-051-0/+1
* Plugins: Added account_name and fulljid to prof_init hookJames Booth2016-04-131-1/+2
* Plugins: Added on_room_history_messageJames Booth2016-04-081-0/+2
* Plugins: Added on_room_win_focusJames Booth2016-04-071-0/+1
* Plugins: Added on_chat_win_focusJames Booth2016-04-071-0/+2
* Added plugins presence hooksJames Booth2016-03-301-16/+27
* Added basic stanza receive eooksJames Booth2016-03-271-0/+3
* Added stanza send hooks for pluginsJames Booth2016-03-261-0/+3
* Added python plugins codeJames Booth2016-02-241-0/+68
/span> h: h ) proc newIdentityMatrix*(n: int): Matrix = var me = newSeq[float64](n * n) for i in 0 ..< n: me[n * i + i] = 1 return Matrix( me: me, w: n, h: n ) proc newMatrixUninitialized*(w, h: int): Matrix = return Matrix( me: newSeqUninitialized[float64](w * h), w: w, h: h ) #TODO this is extremely inefficient proc `*`*(a: Matrix, b: Matrix): Matrix = assert a.w == b.h let h = a.h let w = b.w let n = a.w var c = newMatrixUninitialized(w, h) for x in 0 ..< w: for y in 0 ..< h: var val: float64 = 0 for i in 0 ..< n: val += a.me[y * a.w + i] * b.me[i * b.w + x] c.me[y * c.w + x] = val return c proc `*=`*(a: var Matrix, b: Matrix) = a = a * b