The Go kernel for Jupyter notebooks and nteract.

Overview

alt tag

Build Status License

gophernotes - Use Go in Jupyter notebooks and nteract

gophernotes is a Go kernel for Jupyter notebooks and nteract. It lets you use Go interactively in a browser-based notebook or desktop app. Use gophernotes to create and share documents that contain live Go code, equations, visualizations and explanatory text. These notebooks, with the live Go code, can then be shared with others via email, Dropbox, GitHub and the Jupyter Notebook Viewer. Go forth and do data science, or anything else interesting, with Go notebooks!

Acknowledgements - This project utilizes a Go interpreter called gomacro under the hood to evaluate Go code interactively. The gophernotes logo was designed by the brilliant Marcus Olsson and was inspired by Renee French's original Go Gopher design.

Examples

Jupyter Notebook:

nteract:

Example Notebooks (download and run them locally, follow the links to view in Github, or use the Jupyter Notebook Viewer):

Installation

Prerequisites

Linux or FreeBSD

The instructions below should work both on Linux and on FreeBSD.

Method 1: quick installation as module

$ env GO111MODULE=on go get github.com/gopherdata/gophernotes
$ mkdir -p ~/.local/share/jupyter/kernels/gophernotes
$ cd ~/.local/share/jupyter/kernels/gophernotes
$ cp "$(go env GOPATH)"/pkg/mod/github.com/gopherdata/[email protected]/kernel/*  "."
$ chmod +w ./kernel.json # in case copied kernel.json has no write permission
$ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json

Method 2: manual installation from GOPATH

$ env GO111MODULE=off go get -d -u github.com/gopherdata/gophernotes
$ cd "$(go env GOPATH)"/src/github.com/gopherdata/gophernotes
$ env GO111MODULE=on go install
$ mkdir -p ~/.local/share/jupyter/kernels/gophernotes
$ cp kernel/* ~/.local/share/jupyter/kernels/gophernotes
$ cd ~/.local/share/jupyter/kernels/gophernotes
$ chmod +w ./kernel.json # in case copied kernel.json has no write permission
$ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json

To confirm that the gophernotes binary is installed in GOPATH, execute it directly:

$ "$(go env GOPATH)"/bin/gophernotes

and you shoud see the following:

2017/09/20 10:33:12 Need a command line argument specifying the connection file.

Note - if you have the JUPYTER_PATH environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory. You can check which directories will be searched by executing:

$ jupyter --data-dir

Mac

Important Note - gomacro relies on the plugin package when importing third party libraries. This package works reliably on Mac OS X with Go 1.10.2+ as long as you never execute the command strip gophernotes.

Method 1: quick installation as module

$ env GO111MODULE=on go get github.com/gopherdata/gophernotes
$ mkdir -p ~/Library/Jupyter/kernels/gophernotes
$ cd ~/Library/Jupyter/kernels/gophernotes
$ cp "$(go env GOPATH)"/pkg/mod/github.com/gopherdata/[email protected]/kernel/*  "."
$ chmod +w ./kernel.json # in case copied kernel.json has no write permission
$ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json

Method 2: manual installation from GOPATH

$ env GO111MODULE=off go get -d -u github.com/gopherdata/gophernotes
$ cd "$(go env GOPATH)"/src/github.com/gopherdata/gophernotes
$ env GO111MODULE=on go install
$ mkdir -p ~/Library/Jupyter/kernels/gophernotes
$ cp kernel/* ~/Library/Jupyter/kernels/gophernotes
$ cd ~/Library/Jupyter/kernels/gophernotes
$ chmod +w ./kernel.json # in case copied kernel.json has no write permission
$ sed "s|gophernotes|$(go env GOPATH)/bin/gophernotes|" < kernel.json.in > kernel.json

To confirm that the gophernotes binary is installed in GOPATH, execute it directly:

$ "$(go env GOPATH)"/bin/gophernotes

and you shoud see the following:

2017/09/20 10:33:12 Need a command line argument specifying the connection file.

Note - if you have the JUPYTER_PATH environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory. You can check which directories will be searched by executing:

$ jupyter --data-dir

Windows

Important Note - gomacro relies on the plugin package when importing third party libraries. This package is only supported on Linux and Mac OS X currently. Thus, if you need to utilize third party packages in your Go notebooks and you are running on Windows, you should use the Docker install and run gophernotes/Jupyter in Docker.

  1. Copy the kernel config:

    mkdir %APPDATA%\jupyter\kernels\gophernotes
    xcopy %GOPATH%\src\github.com\gopherdata\gophernotes\kernel %APPDATA%\jupyter\kernels\gophernotes /s
    

    Note, if you have the JUPYTER_PATH environmental variable set or if you are using an older version of Jupyter, you may need to copy this kernel config to another directory. You can check which directories will be searched by executing:

    jupyter --data-dir
    
  2. Update %APPDATA%\jupyter\kernels\gophernotes\kernel.json with the FULL PATH to your gophernotes.exe (in %GOPATH%\bin), unless it's already on the PATH. For example:

    {
        "argv": [
          "C:\\gopath\\bin\\gophernotes.exe",
          "{connection_file}"
          ],
        "display_name": "Go",
        "language": "go",
        "name": "go"
    }
    

Docker

You can try out or run Jupyter + gophernotes without installing anything using Docker. To run a Go notebook that only needs things from the standard library, run:

$ docker run -it -p 8888:8888 gopherdata/gophernotes

Or to run a Go notebook with access to common Go data science packages (gonum, gota, golearn, etc.), run:

$ docker run -it -p 8888:8888 gopherdata/gophernotes:latest-ds

In either case, running this command should output a link that you can follow to access Jupyter in a browser. Also, to save notebooks to and/or load notebooks from a location outside of the Docker image, you should utilize a volume mount. For example:

$ docker run -it -p 8888:8888 -v /path/to/local/notebooks:/path/to/notebooks/in/docker gopherdata/gophernotes

Getting Started

Jupyter

  • If you completed one of the local installs above (i.e., not the Docker install), start the jupyter notebook server:

    jupyter notebook
    
  • Select Go from the New drop down menu.

  • Have fun!

nteract

  • Launch nteract.

  • From the nteract menu select Language -> Go.

  • Have fun!

Limitations

gophernotes uses gomacro under the hood to evaluate Go code interactively. You can evaluate most any Go code with gomacro, but there are some limitations, which are discussed in further detail here. Most notably, gophernotes does NOT support:

  • third party packages when running natively on Windows - This is a current limitation of the Go plugin package.
  • some corner cases on interpreted interfaces, as interface -> interface type switch and type assertion, are not implemented yet.
  • some corner cases on recursive types may not work correctly.
  • conversion from typed constant to interpreted interface is not implemented. Workaround: assign the constant to a variable, then convert the variable to the interpreted interface type.
  • conversions from/to unsafe.Pointer are not supported.
  • goto is only partially implemented.
  • out-of-order code in the same cell is supported, but not heavily tested. It has some known limitations for composite literals.

Also, creation of new named types is emulated, and their methods are visible only to interpreted code.

Troubleshooting

gophernotes not found

Depending on your environment, you may need to manually change the path to the gophernotes executable in kernel/kernel.json before copying it to ~/.local/share/jupyter/kernels/gophernotes. You can put the full path to the gophernotes executable here, and you shouldn't have any further issues.

"Kernel error" in a running notebook

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/notebook/base/handlers.py", line 458, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/usr/local/lib/python2.7/site-packages/tornado/gen.py", line 1008, in run
    value = future.result()
  ...
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Stop jupyter, if it's already running.

Add a symlink to /go/bin/gophernotes from your path to the gophernotes executable. If you followed the instructions above, this will be:

sudo ln -s $HOME/go/bin/gophernotes /go/bin/gophernotes

Restart jupyter, and you should now be up and running.

error "could not import C (no metadata for C)" when importing a package

At a first analysis, it seems to be a limitation of the new import mechanism that supports Go modules. You can switch the old (non module-aware) mechanism with the command %go111module off

To re-enable modules support, execute %go111module on

Look at Jupyter notebook's logs for debugging

In order to see the logs for your Jupyter notebook, use the --log-level option

jupyter notebook --log-level DEBUG
Issues
  • Need more integrated HTML support

    Need more integrated HTML support

    Currently, the only way that I see to display HTML in a notebook is to use display.HTML(obj). It would be nice if there something like an HTMLer interface that would allow the HTML representation of an object to be displayed automatically instead of the text version. Something like the following:

    type HTMLer interface {
        HTML() string
    }
    
    opened by kesmit13 23
  • Import third party packages on freebsd

    Import third party packages on freebsd

    i got flowing same error when i import any thirdpart package on jupyter notebook

    error writing file "/projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_nsf_gocode.go": open /projects/go/src/github.com/gopherdata/gophernotes/imports/thirdparty/github_com_nsf_gocode.go: no such file or directory

    enhancement 
    opened by zishucom 23
  • Support for auto-completion

    Support for auto-completion

    Is there any way to get auto-completion support (via e.g. gocode)?

    If not possible right now, I think it would be an awesome addition.

    help wanted 
    opened by samuell 19
  • Can't reach the local site

    Can't reach the local site

    $ docker run --name gophernotes --net host -it dwhitena/gophernotes:latest
    [I 09:52:12.780 NotebookApp] Copying /.ipython/kernels -> /.local/share/jupyter/kernels
    [I 09:52:12.790 NotebookApp] Writing notebook server cookie secret to /.local/share/jupyter/runtime/notebook_cookie_secret
    [I 09:52:12.860 NotebookApp] Serving notebooks from local directory: /
    [I 09:52:12.860 NotebookApp] 0 active kernels
    [I 09:52:12.860 NotebookApp] The IPython Notebook is running at: http://localhost:8888/
    [I 09:52:12.860 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
    [W 09:52:12.860 NotebookApp] No web browser found: could not locate runnable browser.
    

    and when stopping:

    ^C[I 09:53:45.030 NotebookApp] interrupted
    Serving notebooks from local directory: /
    0 active kernels
    The IPython Notebook is running at: http://localhost:8888/
    Shutdown this notebook server (y/[n])? ^C[C 09:53:46.720 NotebookApp] received signal 2, stopping
    [I 09:53:46.720 NotebookApp] Shutting down kernels
    
    $ docker version
    Client:
     Version:      1.10.0
     API version:  1.22
     Go version:   go1.5.3
     Git commit:   590d510
     Built:        Fri Feb  5 08:21:41 UTC 2016
     OS/Arch:      darwin/amd64
    
    Server:
     Version:      1.10.0
     API version:  1.22
     Go version:   go1.5.3
     Git commit:   590d5108
     Built:        Thu Feb  4 19:55:25 2016
     OS/Arch:      linux/amd64
    

    I assume it's because the NotebookApp tries to find its own server by pinging localhost, which on OS X using boot2docker or dlite does not make sense as the guest's container runs inside a VM rather the host.

    opened by djui 18
  • travis: add travis-ci

    travis: add travis-ci

    opened by sbinet 17
  • Error installing on Windows

    Error installing on Windows

    Trying to install in Windows, after this line in command prompt: ..\Go\src\github.com\gopherdata\gophernotes\zmq-win>build.bat amd64 I get : ..Go/src/github.com/gopherdata/gophernotes/zmq-win/lib-amd64/libzmq.a: error adding symbols: File in wrong format collect2.exe: error: ld returned 1 exit status

    Googled it extensively, not sure how to fix this.

    opened by hlalibe 17
  • display images, HTML... and MIME rendering

    display images, HTML... and MIME rendering

    show as image each expression result that implements Go interface image.Image

    opened by cosmos72 17
  • Return image data to Jupyter front end?

    Return image data to Jupyter front end?

    This is obviously more of a question / feature request than an issue, but being able to do inline plotting and image display would be a big win for this package!

    Maybe this issue can be a starting point for discussion (or feel free to point me to a more appropriate venue, if available).

    Here's the problem as I understand it:

    1. Jupyter implements a display_data message type that the kernel can use to communicate image data results to the front end. http://jupyter-client.readthedocs.org/en/latest/messaging.html#id3
    2. Go has a flexible standard image library, and lots of non-core plotting libraries built on top of it.
    3. The "gore-like" REPL that gophernotes uses to execute requests appears to know nothing about images (or anything at all but text produced by the Stringer interface)

    Is there any way to bridge the impedance mismatch between 2) and 3)? If we can figure out a way to get image data out of the REPL, it seems pretty straightforward to implement the appropriate display_data messages to communicate it back to the frontend.

    In the meantime the only real way to do this is to write images to files and then embed them within markdown cells. But this is suboptimal both because it's clunky and because such images do not update live when the code that generates them changes due to caching, etc.

    Anyway, making this work seemlessly would be an incredibly cool enhancement to this already very useful package. I'm pretty new to Go and Jupyter, but a very experienced developer otherwise, so I'm willing to help-out wherever I can.

    Thanks!

    help wanted 
    opened by vsivsi 13
  • license: revert to MIT

    license: revert to MIT

    now that gomacro isn't LGPL anymore, couldn't we revert to the previous LICENCE (MIT) ?

    @dwhitena @SpencerPark @cosmos72

    question 
    opened by sbinet 12
  • No such file or directory: '/go/bin/gophernotes'

    No such file or directory: '/go/bin/gophernotes'

    After installing gophernotes I've got this message:

    # github.com/gophergala2016/gophernotes/Godeps/_workspace/src/github.com/alecthomas/gozmq
    could not determine kind of name for C.ZMQ_HWM
    could not determine kind of name for C.ZMQ_MCAST_LOOP
    could not determine kind of name for C.ZMQ_RECOVERY_IVL_MSEC
    could not determine kind of name for C.ZMQ_SWAP
    

    And running notebook:

    Traceback` (most recent call last):
      File "/usr/lib/python3.5/site-packages/notebook/base/handlers.py", line 458, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
        value = future.result()
      File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
        yielded = self.gen.throw(*exc_info)
      File "/usr/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 58, in post
        sm.create_session(path=path, kernel_name=kernel_name))
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
        value = future.result()
      File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
        yielded = self.gen.throw(*exc_info)
      File "/usr/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 73, in create_session
        self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
        value = future.result()
      File "/usr/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
      File "/usr/lib/python3.5/site-packages/tornado/gen.py", line 282, in wrapper
        yielded = next(result)
      File "/usr/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
        super(MappingKernelManager, self).start_kernel(**kwargs)
      File "/usr/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 109, in start_kernel
        km.start_kernel(**kwargs)
      File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 244, in start_kernel
        **kw)
      File "/usr/lib/python3.5/site-packages/jupyter_client/manager.py", line 190, in _launch_kernel
        return launch_kernel(kernel_cmd, **kw)
      File "/usr/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
        proc = Popen(cmd, **kwargs)
      File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1544, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: '/go/bin/gophernotes
    
    opened by rkakrik 12
  • Error importing packages from docker build of gophernotes

    Error importing packages from docker build of gophernotes

    @snowzach reported the following in https://github.com/cosmos72/gomacro/issues/109

    I am not expert with docker, so I moved the issue here as it's about gophernotes + docker (I tested on a plain Linux installation of latest gophernotes without docker, and I could not reproduce this issue)

    Any suggestion / help is appreciated.

    I used go 1.16.3... Here's the Dockerfile I am using to add gophernotes to jupyter. It pulls gophernotes master (which I think is 1.0RC) which depends on github.com/cosmos72/gomacro v0.0.0-20210413180755-590dbc3d0bcd which looks very recent. I also tried forcing module mode but that didn't seem to help.

    FROM jupyter/datascience-notebook:latest
    
    # Need to be root to do all this stuff
    USER root
    
    # Base image packages
    RUN apt-get update \
        && sudo apt-get install -y \
        libpq-dev less \
        && rm -rf /var/lib/apt/lists/*
    
    # Python packages
    RUN pip install \
        psycopg2
    
    # Install Go
    RUN wget -O /tmp/go.tar.gz https://golang.org/dl/go1.16.3.linux-amd64.tar.gz \
        && tar -C /usr/local -xzf /tmp/go.tar.gz \
        && rm /tmp/go.tar.gz
    ENV PATH="${PATH}:/usr/local/go/bin:$HOME/go/bin"
    ENV GO111MODULE=on
    
    # Install gophernotes
    RUN cd /tmp && git clone https://github.com/gopherdata/gophernotes \
        && cd /tmp/gophernotes && GOPATH=/go go install \
        && mv /go/bin/gophernotes /usr/local/bin/gophernotes \
        && mkdir -p /opt/conda/share/jupyter/kernels/gophernotes \
        && cp kernel/* /opt/conda/share/jupyter/kernels/gophernotes \
        && chmod +w /opt/conda/share/jupyter/kernels/gophernotes/kernel.json \
        && chown -R jovyan:users /opt/conda/share/jupyter/kernels/gophernotes \
        && cd && rm -Rf /tmp/gophernotes && rm -Rf /go
    
    # Switch back to jupyter default user
    USER jovyan
    

    When I try using Go it just says:

    [I 14:48:07.597 NotebookApp] 302 GET / (172.17.0.1) 0.970000ms
    [I 14:48:07.642 NotebookApp] 302 GET /tree? (172.17.0.1) 0.990000ms
    [I 14:48:12.580 NotebookApp] 302 POST /login?next=%2Ftree%3F (172.17.0.1) 1.880000ms
    [I 14:48:19.120 NotebookApp] Creating new notebook in
    [I 14:48:19.208 NotebookApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
    [I 14:48:25.080 NotebookApp] Kernel started: 7e12e118-ad92-40a3-87eb-60f398cd57c2, name: gophernotes
    [I 14:48:25.209 NotebookApp] Adapting from protocol version 5.0 (kernel 7e12e118-ad92-40a3-87eb-60f398cd57c2) to 5.3 (client).
    2021/04/16 14:48:27 Unhandled shell message:  comm_info_request
    // debug: running "go get github.com/davecgh/go-spew/spew" ...
    go: downloading github.com/davecgh/go-spew v1.1.1
    go get: added github.com/davecgh/go-spew v1.1.1
    

    And then the console shows image

    I did get it to work at one point when I got it to print compiling in that log output.. I never restarted it. It literealy didn't work several times, then I did something and it printed compiling in the log output and after that it seemed to work. Not sure what I did to get that compiling stage to work though.

    opened by cosmos72 5
  • embed gophernotes in an application?

    embed gophernotes in an application?

    @cdevr asked in https://github.com/cosmos72/gomacro/issues/13

    Do you think it'd be possible to go even further and run something like gophernotes from within an app? (to get a notebook interface available inside a running application)

    question 
    opened by cosmos72 1
  • Implement generics

    Implement generics

    Now that Go generics have been approved, we should support them in gophernotes too

    More specifically, the underlying interpreter gomacro has an open issue https://github.com/cosmos72/gomacro/issues/24 to track their implementation.

    Help is welcome :)

    enhancement 
    opened by cosmos72 0
  • Error when using with vscode

    Error when using with vscode "TypeError: Cannot read property 'charAt' of undefined at in t in div in t in div in t in div in t ...."

    Hi i get this error after some time when im using gophernotes with vscode. Maybe this is a vscode issues?

    Have tried to figure when it works and when it breaks. Most of the time i can get things working again by restarting both vscode and gophernotes.

    Screen Shot 2021-01-29 at 01 51 21

    opened by wader 0
  • Broken in jupyter qtconsole

    Broken in jupyter qtconsole

    When start in qtconsole like

    jupyter-qtconsole --kernel=gophernotes
    

    Enter pressed, the terminal show following messages:

    2020/12/22 19:19:46 Unhandled shell message:  history_request
    2020/12/22 19:19:50 Unhandled shell message:  is_complete_request
    

    and statement is not executed.

    VERSIONS: jupyter core : 4.7.0 jupyter-notebook : 6.1.5 qtconsole : 4.7.7 ipython : 7.19.0 ipykernel : 5.3.4 jupyter client : 6.1.7 jupyter lab : 2.2.9 nbconvert : 6.0.7 ipywidgets : not installed nbformat : 5.0.8 traitlets : 5.0.5

    opened by mackong 2
  • Remote JupyterLab Import:

    Remote JupyterLab Import: "plugin was built with a different version of package golang.org/x/sync/errgroup "

    I'm fairly certain I just borked my environment and need help setting is straight. I'm running this as a kernel on my server in Jupyterlab. All the built-in libraries work, but other imports are throwing errors: error loading plugin "/home/XXXXX/go/src/gomacro.imports/github.com/rocketlaunchr/dataframe-go/dataframe-go.so": plugin.Open("/home/XXXXX/go/src/gomacro.imports/github.com/rocketlaunchr/dataframe-go/dataframe-go.so"): plugin was built with a different version of package golang.org/x/sync/errgroup (previous failure)

    Result of go env: GO111MODULE="" GOARCH="arm" GOBIN="" GOCACHE="/home/admin/.cache/go-build" GOENV="/home/admin/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="arm" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/admin/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/admin/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_arm" GCCGO="gccgo" GOARM="6" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build950526948=/tmp/go-build -gno-record-gcc-switches" Note that admin and XXXXX are separate users.

    limitation 
    opened by seedrick 1
  • [Question] Import a specific version of a package?

    [Question] Import a specific version of a package?

    @mattn wrote in #184

    Sorry off topic. Can I import specific version of package in notebook?

    question 
    opened by cosmos72 4
  • colab:

    colab: "not a package" when calling a struct method

    go env env: GOPATH=/root/go GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/lib/go-1.14" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/lib/go-1.14/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build227084721=/tmp/go-build -gno-record-gcc-switches"

    repro: colab

    dataset.csv file (change its format from txt to csv)

    opened by mrg0lden 2
  • can't use go module in go 1.14

    can't use go module in go 1.14

    image

    import elasticsearch7 "github.com/elastic/go-elasticsearch/v7"
    

    But in the latest version of gomacro is successful.

    gomacro> import elasticsearch7 "github.com/elastic/go-elasticsearch/v7"
    // debug: looking for package "github.com/elastic/go-elasticsearch/v7" ...
    // debug: compiling "/Users/gclove/go/src/gomacro.imports/github.com/elastic/go-elasticsearch/v7/v7.go" ...
    go: finding module for package github.com/elastic/go-elasticsearch/v7
    go: found github.com/elastic/go-elasticsearch/v7 in github.com/elastic/go-elasticsearch/v7 v7.8.0
    
    opened by gclove 1
  • HTML export code incorrect highlight

    HTML export code incorrect highlight

    I'm not sure whether it's a limitation inherently from jupyter, but exporting to an HTML file from a notebook reverts the syntax highlighting to Python highlighting (comments are not parsed correctly, keywords such as "as" are highlighted)

    opened by elamre 0
Releases(v0.7.3)
Owner
GopherData
Bringing together users and developers of Go data management, processing, analytics, and visualization tools.
GopherData
Go Machine Learning Benchmarks

Benchmarks of machine learning inference for Go

Nikolay Dubina 15 Jun 17, 2021
Prophecis is a one-stop machine learning platform developed by WeBank

Prophecis is a one-stop machine learning platform developed by WeBank. It integrates multiple open-source machine learning frameworks, has the multi tenant management capability of machine learning compute cluster, and provides full stack container deployment and management services for production environment.

WeBankFinTech 198 Jul 26, 2021
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

English ∙ 日本語 ∙ 简体中文 ∙ 繁體中文 | العَرَبِيَّة‎ ∙ বাংলা ∙ Português do Brasil ∙ Deutsch ∙ ελληνικά ∙ עברית ∙ Italiano ∙ 한국어 ∙ فارسی ∙ Polski ∙ русский язы

Donne Martin 139.2k Jul 23, 2021
A fast userspace CSPRNG

frand go get lukechampine.com/frand frand is a fast-key-erasure CSPRNG in userspace. Its output is sourced from the keystream of a ChaCha cipher, muc

Luke Champine 61 May 22, 2021
On-line Machine Learning in Go (and so much more)

goml Golang Machine Learning, On The Wire goml is a machine learning library written entirely in Golang which lets the average developer include machi

Conner DiPaolo 1.2k Jul 20, 2021
Path to a Software Architect

Contents What is a Software Architect? Levels of Architecture Typical Activities Important Skills (1) Design (2) Decide (3) Simplify (4) Code (5) Docu

Justin Miller 7.1k Jul 27, 2021
Ensembles of decision trees in go/golang.

CloudForest Google Group Fast, flexible, multi-threaded ensembles of decision trees for machine learning in pure Go (golang). CloudForest allows for a

Ryan Bressler 687 Jul 17, 2021
a cheat-sheet for mathematical notation in code form

math-as-code Chinese translation (中文版) Python version (English) This is a reference to ease developers into mathematical notation by showing compariso

Jam3 11.5k Jul 24, 2021
Go Training Class Material :

Go Training Review our different courses and material To learn about Corporate training events, options and special pricing please contact: William Ke

Ardan Labs 9.4k Jul 18, 2021
Gorgonia is a library that helps facilitate machine learning in Go.

Gorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily

Gorgonia 4.1k Jul 27, 2021
Gorgonia is a library that helps facilitate machine learning in Go.

Gorgonia is a library that helps facilitate machine learning in Go. Write and evaluate mathematical equations involving multidimensional arrays easily

Gorgonia 4.1k Jul 19, 2021
Library for multi-armed bandit selection strategies, including efficient deterministic implementations of Thompson sampling and epsilon-greedy.

Mab Multi-Armed Bandits Go Library Description Installation Usage Creating a bandit and selecting arms Numerical integration with numint Documentation

Stitch Fix Technology 18 Jun 23, 2021
A quick tour (or reminder) of Go performance tools

Basics of benchmarking, profiling and tracing with Go Introduction This documentation gives an overview of possibilities offered by go tooling to meas

Samuel GAY 220 Apr 11, 2021
A Naive Bayes SMS spam classifier written in Go.

Ham (SMS spam classifier) Summary The purpose of this project is to demonstrate a simple probabilistic SMS spam classifier in Go. This supervised lear

Dan Wolf 10 Apr 28, 2021