Skip to content

Instantly share code, notes, and snippets.

View oeway's full-sized avatar

Wei Ouyang oeway

  • Science For Life Laboratory
  • Stockholm
View GitHub Profile
numpy
pandas
scipy
matplotlib
ipywidgets>=7.0.0
imageio
scikit-image
imjoy>=0.10.0
tifffile
fsspec
<docs lang="markdown">
[TODO: write documentation for this plugin.]
</docs>
<config lang="json">
{
"name": "Viv-demo",
"type": "native-python",
"version": "0.1.0",
"description": "[TODO: describe this plugin with one sentence.]",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<docs lang="markdown">
[TODO: write documentation for this plugin.]
</docs>
<config lang="json">
{
"name": "ITK-VTK-Viewer",
"type": "native-python",
"version": "0.1.0",
"description": "[TODO: describe this plugin with one sentence.]",
from imjoy import api
import imageio
class ImJoyPlugin():
async def setup(self):
api.log('initialized')
async def run(self, ctx):
# run `pip install imjoy-elfinder` and start it by running `imjoy-elfinder` before the following command
fileDialog = await api.showDialog(type="ImJoy elFinder")
import asyncio
import numpy as np
class ImJoyPlugin():
async def setup(self):
bridge = Bridge()
self._core = bridge.get_core()
self._core.set_exposure(float(100))
exposure = self._core.get_exposure()
api.showMessage('MMcore loaded, exposure: ' + str(exposure))
<docs lang="markdown">
## Porting Arbitrary Style Transfer to the Browser
https://magenta.tensorflow.org/blog/2018/12/20/style-transfer-js/
```
/**
* Copyright 2018 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import asyncio
import numpy as np
import imageio
from imjoy_rpc import api
class ImJoyPlugin():
def setup(self):
api.log('initialized')
async def run(self, ctx):
(function($) {
$.getStylesheet = function (href) {
var $d = $.Deferred();
var $link = $('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: href
}).appendTo('head');
$d.resolve($link);
return $d.promise();