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 http://www.openmicroscopy.org/community/viewtopic.php?f=6&t=8407 | |
# Uses code from https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroPy/src/omero/testlib/__init__.py | |
import omero | |
import platform | |
import os | |
from omero.model import ChecksumAlgorithmI | |
from omero.model import NamedValue | |
from omero.model.enums import ChecksumAlgorithmSHA1160 |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# ----------------------------------------------------------------------------- | |
# Copyright (C) 2018 University of Dundee. All rights reserved. | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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
// Tilting the microbit to one side or the other, | |
// drives a continuous servo one direction (10) or the other (100) | |
// Editor: https://makecode.microbit.org/ | |
let angle = 0 | |
let millig = 0 | |
input.onButtonPressed(Button.A, () => { | |
for (let i = 0; i < 4; i++) { | |
pins.analogWritePin(AnalogPin.P0, 100) | |
basic.pause(100) | |
pins.analogWritePin(AnalogPin.P0, 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
// Editor https://makecode.microbit.org/ | |
// Use 1 microbit as 'master' controller. Others act as 'moles', randomly showing image to hit. | |
// If hit (shake) while showing image, master microbit increments and shows score | |
let showing = false | |
let score = 0 | |
let master = false | |
input.onButtonPressed(Button.A, () => { | |
master = true | |
radio.sendString("start") | |
}) |
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 | |
from omero.sys import ParametersI | |
from omero.rtypes import rint | |
import requests | |
USERNAME = "username" | |
PASSWORD = "secret" | |
conn = BlitzGateway(USERNAME, PASSWORD, host="localhost", port=4064) | |
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
let missile: game.LedSprite = null | |
let opponentsmissile: game.LedSprite = null | |
let score = 0 | |
let nummissles = 0 | |
let player: game.LedSprite = null | |
let switchxposition = 0 | |
input.onButtonPressed(Button.A, () => { | |
player.change(LedSpriteProperty.X, -1) | |
}) | |
radio.onDataPacketReceived( ({ receivedString: name, receivedNumber: value }) => { |
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 csv | |
import omero | |
from omero.gateway import BlitzGateway, TagAnnotationWrapper, MapAnnotationWrapper | |
conn = BlitzGateway("username", "password", host='localhost', port=4064) | |
conn.connect() | |
DATASET = 25403 | |
NAMESPACE = "map.annotation.from.csv" |
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 sys | |
import subprocess | |
from path import path | |
import omero.scripts as scripts | |
from omero.gateway import BlitzGateway | |
import omero.util.script_utils as script_utils | |
import omero | |
from omero.rtypes import rint, rlong, rstring, robject, unwrap |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import omero | |
from omero.rtypes import rdouble, rint, rstring, unwrap | |
from omero.gateway import BlitzGateway | |
USERNAME = 'username' | |
PASSWORD = 'password' | |
HOST = 'localhost' |