inspiré par le meetup organisé par F. Cerbelle
L'installation de micropython sur l'ESP8266 nécessite d'avoir une installation de Python fonctionnelle sur le PC utilisé pour connecter la carte par le câble USB.
from Lima import Core, Prosilica | |
from Qub.CTools import pixmaptools | |
# initialize Lima and connect to camera | |
prosilica = Prosilica.Camera("192.168.1.2") | |
interface = Prosilica.Interface(prosilica) | |
control = Core.CtControl(interface) | |
video = control.video() | |
video.setExposure(1.0/25.0) |
Start as many processes as wanted; then, make Channel objects - when a channel value is changed, | |
all channels with the same name receive it. | |
linguijarro:~ % python -i test_redis_nanomsg.py | |
>>> c = Channel("s1v.position") | |
>>> c.value() | |
NotInitialized | |
>>> c.set_value(14) | |
>>> c.value() |
import urllib | |
proxy = { } | |
stream = urllib.urlopen("http://d302.esrf.fr/mjpg/1/video.mjpg", proxies=proxy) | |
data = "" | |
i = 0 | |
while True: | |
data += stream.read(16*1024) | |
a = data.find('\xff\xd8') |
{ stdenv, fetchurl, pkgconfig, python, buildPythonPackage, boost, numpy, tango }: | |
let version = "9.2.0b"; in | |
buildPythonPackage rec { | |
name = "pytango-${version}"; | |
src = fetchurl { | |
url = "https://github.com/tango-cs/pytango/archive/v${version}.tar.gz"; | |
sha256 = "01wnb9bxszw2pr7jcxcbjdds4y4w7q8cx8ibj73lj6dbjl3ai116"; |
{ stdenv, fetchurl, pkgconfig, zlib, omniorb, zeromq }: | |
let version = "9.2.2"; in | |
let verName = "${version}"; in | |
stdenv.mkDerivation rec { | |
name = "tango-${verName}"; | |
src = fetchurl { | |
url = "http://downloads.sourceforge.net/project/tango-cs/${name}.tar.gz"; |
from SpecClient_gevent.SpecServer import SpecServer, BaseSpecRequestHandler | |
import time | |
class MyRequestHandler(BaseSpecRequestHandler): | |
FUNCTIONS_CONTAINER = None | |
def __getattr__(self, attr): | |
if attr.startswith("__"): | |
raise AttributeError(attr) |
import jsonpickle | |
import xmlrpclib | |
import time | |
import sys | |
import imp | |
server = xmlrpclib.ServerProxy('http://lid287:7171') | |
server.queue_set_serialisation("json") | |
## | |
BASE_DATA_DIRECTORY = '/data/id28/...' |
inspiré par le meetup organisé par F. Cerbelle
L'installation de micropython sur l'ESP8266 nécessite d'avoir une installation de Python fonctionnelle sur le PC utilisé pour connecter la carte par le câble USB.
msg = '01110011001000000110111001101111001000000010000001101001001000000111001101101110001000000110010100100000001000000110100000100000001000000110010100100000011100100010000000100000011100000110110100100000011011110010000001100011' |
jedis = [ | |
{'name': 'Ahsoka Tano', 'lightsaber_color': 'green'}, | |
{'name': 'Anakin Skywalker', 'lightsaber_color': 'blue'}, | |
{'name': 'Anakin Solo', 'lightsaber_color': 'blue'}, | |
{'name': 'Ben Skywalker', 'lightsaber_color': 'blue'}, | |
{'name': 'Count Duku', 'lightsaber_color': 'red'}, | |
{'name': 'Darth Craidus', 'lightsaber_color': 'red'}, | |
{'name': 'Darth Maul', 'lightsaber_color': 'red'}, | |
{'name': 'Darth Vader', 'lightsaber_color': 'red'}, | |
{'name': 'Jacen Solo', 'lightsaber_color': 'green'}, |