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
function filtered = gaussianFilter(img, sigma, varargin) | |
% GAUSSIANFILTER Simplified open-source version of IMGAUSSFILT | |
% The IMGAUSSFILT function is part of the Image Processing Toolbox, | |
% but if you don't want to install that, then use this | |
% instead. I haven't actually tested this to ensure it gives the same result. | |
% Inspired by https://stackoverflow.com/questions/13193248/how-to-make-a-gaussian-filter-in-matlab | |
% | |
% Hardcodes in the default arguments of IMGAUSSFILT | |
% (per https://www.mathworks.com/help/images/ref/imgaussfilt.html) |
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/python | |
# https://gist.github.com/NickCrews/52ab07c8519b56c0ec671d3338760516 | |
import os, glob | |
def test(bytes): | |
fname = glob.glob("/dev/wilco_telem*")[0] | |
fd = None |
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/python │ CC firmware/2lib/2secdatak.o | |
│ CC firmware/2lib/2sha1.o | |
import select, os, glob │ CC firmware/2lib/2sha256.o | |
│ CC firmware/2lib/2sha512.o | |
fname = glob.glob("/dev/wilco_event*")[0] │ CC firmware/2lib/2sha_utility.o | |
│ CC firmware/2lib/2tpm_boot |
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/python | |
import select, array, os | |
fname = "/dev/wilco_event" | |
with open(fname, "r+") as fd: | |
p = select.poll() | |
p.register(fd.fileno(), select.POLLIN) | |
events = p.poll(100) |
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/python | |
import select, array, fcntl | |
fname = '/dev/wilco_ec' | |
with open(fname, "r+") as file: | |
p = select.poll() | |
p.register(file.fileno(), select.POLLIN) | |
events = p.poll(100) | |
print "result of poll: ", events |
NewerOlder