when there's an HTTP request for the camera stream:
serve an MJPEG-over-HTTP stream (multi-part), by:
as long as the request is open, repeatedly do:
get the latest frame from the camera by calling esp_camera_fb_get
send it over HTTP as part of the multi-part response
when there's an HTTP request to upload the latest frame from the camera to Github:
get the latest frame from the camera by calling esp_camera_fb_get
This file contains 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 os | |
import re | |
import tifffile | |
# adjust to dataset: | |
input_dir = "PATH_TO_TIFFS" | |
pixel_size = 0.225 | |
maximum_shift_microns = 50 |
This file contains 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
"""KiCad plugin to generate linear stepper track traces in KiCad""" | |
import pcbnew | |
import numpy as np | |
WIDTH=13.2 | |
PITCH=1.0 | |
WIDTH_MARGIN = 1.2 | |
LINE_WIDTH = 0.3 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# (c) Matthew Wardrop 2019; Licensed under the MIT license | |
# | |
# This script provides the ability to run a notebook in the same Python | |
# process as this script, allowing it to access to variables created | |
# by the notebook for other purposes. In most cases, this is of limited | |
# utility and not a best-practice, but there are some limited cases in | |
# which this capability is valuable, and this script was created for | |
# such cases. For all other cases, you are better off using the | |
# `nbconvert` execution API found @: | |
# https://nbconvert.readthedocs.io/en/latest/execute_api.html |
I've switched to using slightly triangular holes in my printed parts, because they "self tap" quite nicely using machine screws (the points of the triangles provide enough space that the swarf doesn't jam the thread). My hope is that this extends the tolerance on hole size, meaning I don't have to worry quite so much about getting diameters exactly right. This means the print should work first-time on a greater range of printers. If you could print the test piece below (trylinder_selftap_holes_test.stl
) and then fill out the form that would be really helpful.
The easiest way to get the test piece is to right click the raw download link and choose "save link as..." to save to an STL file - gists don't give the files the correct mimetype,
This file contains 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 __future__ import print_function | |
from __future__ import absolute_import | |
from __future__ import division | |
import os | |
import h5py | |
import numpy as np | |
import tensorflow as tf | |
# Get path to data |
This file contains 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 __future__ import print_function | |
import PIL.Image | |
import PIL.ExifTags | |
import sys | |
import os | |
def formatted_exif_data(image): | |
"""Retrieve an image's EXIF data and return as a dictionary with string keys""" | |
# with thanks to https://stackoverflow.com/questions/4764932/in-python-how-do-i-read-the-exif-data-for-an-image | |
exif_data = {} |
This file contains 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
# Copyright 2015 The TensorFlow Authors. 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. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
This file contains 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
# Create a simple TF Graph | |
# By Omid Alemi - Jan 2017 | |
# Works with TF <r1.0 | |
import tensorflow as tf | |
I = tf.placeholder(tf.float32, shape=[None,3], name='I') # input | |
W = tf.Variable(tf.zeros_initializer(shape=[3,2]), dtype=tf.float32, name='W') # weights | |
b = tf.Variable(tf.zeros_initializer(shape=[2]), dtype=tf.float32, name='b') # biases | |
O = tf.nn.relu(tf.matmul(I, W) + b, name='O') # activation / output |
NewerOlder