This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/[os] | |
type | |
EOutoFMemory = object of OSError | |
var gOutOfMem: ref EOutOfMemory | |
new(gOutOfMem) # need to be allocated *before* OOM really happened! | |
gOutOfMem.msg = "out of memory" | |
proc handleOOM() {.nimcall, gcsafe, locks:0.} = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "foo.h" | |
int gid = 0; | |
Foo::Foo() { | |
std::cout << "Foo()" << std::endl; | |
this->val = 0; | |
this->own = true; | |
this->id = gid; | |
gid += 1; | |
printFoo(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std/sequtils | |
import std/strformat | |
import std/tables | |
import arraymancer | |
import nimpy | |
import nimpy/raw_buffers | |
proc dtype*(t: PyObject): PyObject = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numericalnim | |
import arraymancer | |
import std/sequtils | |
import std/browsers | |
import std/random | |
import std/sugar | |
import std/os | |
randomize() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--threads:on | |
-d:release | |
-d:blas="openblas" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numericalnim | |
import plotly | |
import nimpy | |
import arraymancer | |
import arraymancer/tensor/private/p_accessors | |
import timelog | |
import nimpyTensor | |
import gridutils |