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 requests | |
session = requests.Session() | |
# Start by getting supported versions from the base url... | |
r = session.get('http://localhost:4080/webgateway/api/') | |
# we get a list of versions | |
versions = r.json() | |
print 'Versions', versions |
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 requests | |
session = requests.Session() | |
BASE_URL = "https://test.openmicroscopy.org/omero/" | |
# BASE_URL = "http://localhost:4080/" | |
login_url = BASE_URL + "webclient/login/" | |
r = session.get(login_url) | |
token = r.cookies['csrftoken'] |
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
from omero.gateway import BlitzGateway | |
from PIL import Image | |
conn = BlitzGateway("user-3", "ome", host="eel.openmicroscopy.org", port=4064) | |
# Image is a 'fake' bio-formats image (grey intensity gradient) | |
imageId = 25501 | |
conn.connect() |
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
# Pearson coefficient described at https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3074624/ | |
# Start with | |
# $ omero shell --login | |
conn = omero.gateway.BlitzGateway(client_obj=client) | |
i = conn.getObject("Image", 62137) | |
p = i.getPrimaryPixels() | |
# get 2D planes and reshape to 1D array |
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
// When the BBC micro:bit runs. | |
function onStart( ) { | |
microbit.draw(Pattern("01000.01100.01110.01100.01000")); | |
wait(200); | |
} | |
function onPressA( ) { | |
/* create variables to keep track of | |
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
# query is | |
select obj , minIndex(ws), maxIndex(ws) from Plate as obj join fetch obj.wells wells left outer join fetch wells.wellSamples ws where obj.id in (:ids) | |
2017-01-23 15:54:27,130 INFO [ org.perf4j.TimingLogger] (.Server-83) start[1485186867124] time[6] tag[omero.call.exception] | |
2017-01-23 15:54:27,133 WARN [ ome.services.util.ServiceHandler] (.Server-83) InvalidDataAccessResourceUsageException thrown. | |
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select plate0_.id as col_0_0_, min(wellsample2_.well_index) as col_1_0_, max(wellsample2_.well_index) as col_2_0_, wells1_.id as id143_1_, wellsample2_.id as id146_2_, plate0_.id as id109_0_, wells1_.id as id143_1_, wellsample2_.id as id146_2_, plate0_.columnNamingConvention as columnNa2_109_0_, plate0_.columns as columns109_0_, plate0_.defaultSample as defaultS4_109_0_, plate0_.description as descript5_109_0_, plate0_.creation_id as creation17_109_0_, plate0_.external_id as external |
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
# select obj, minIndex(ws), maxIndex(ws) from Plate as obj join fetch obj.wells wells left outer join fetch wells.wellSamples ws where obj.id in (:ids) group by obj.id | |
2017-01-23 16:50:16,095 INFO [ome.services.sessions.state.SessionCache] (2-thread-5) Synchronizing session cache. Count = 4 | |
2017-01-23 16:50:16,095 INFO [ ome.services.util.ServiceHandler] (2-thread-5) Executor.doWork -- ome.services.sessions.SessionManagerImpl.reload[5e9cdf94-4184-40ee-a3da-9c5693f55812] | |
2017-01-23 16:50:16,095 INFO [ ome.services.util.ServiceHandler] (2-thread-5) Args: [null, InternalSF@33779587] | |
2017-01-23 16:50:16,108 INFO [ ome.security.basic.EventHandler] (2-thread-5) Auth: user=0,group=0,event=null(Sessions),sess=d30fd532-ae16-47a0-a3cc-5dbb3a9b3a91 | |
2017-01-23 16:50:16,116 INFO [ org.perf4j.TimingLogger] (2-thread-5) start[1485190216095] time[20] tag[omero.call.success.ome.services.sessions.SessionManagerImpl$6.doWork] | |
2017-01-23 16:50:16,116 INFO [ ome.services.u |
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
""" | |
See http://lists.openmicroscopy.org.uk/pipermail/ome-users/2017-February/006362.html | |
and | |
https://forum.image.sc/t/use-python-to-export-figures-from-omero/46520 | |
""" | |
from omero.rtypes import wrap | |
from omero.gateway import BlitzGateway | |
import omero |
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
let gameOver = false | |
let y = 0 | |
let x = 0 | |
let rowFull = false | |
let canFall = false | |
let delay = 0 | |
input.onButtonPressed(Button.A, () => { | |
led.unplot(x, y) | |
if (x > 0 && !(led.point(x - 1, y))) { | |
x = x - 1 |
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 omero | |
from omero.gateway import BlitzGateway | |
# See https://www.openmicroscopy.org/community/viewtopic.php?f=4&t=8268 | |
imageId = 72416 | |
conn = BlitzGateway("username", "password", host="localhost", port=4064) | |
conn.connect() | |
image = conn.getObject("Image", imageId) |