/bin/cat *.data | ffplay -f rawvideo -pix_fmt rgb24 -s 640x480 -framerate 1 -i -
find *.mp4 | xargs -I '{}' ffmpeg -i '{}' -c copy -an ns_'{}'
/* All code goes to .text (flash) */ | |
/* This goes into .rodata (flash) */ | |
const uint8_t weights[10] = {0xFA, 0xB0, 0x32, 0x1C, 0x12, 0xDA, 0x7B, 0x01, 0x42, 0xCA}; | |
/* This goes into .data (stored in flash and copied to ram at startup) */ | |
float values[3] = {0.15, 0.20, 0.55}; | |
/* This goes to .bss (will be 0-init in ram) */ | |
int buffer[100]; |
STM32_Programmer_CLI --extload \ | |
"<C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader\MT25TL01G_STM32H747I-DISCO.stldr>" \ | |
-c port=swd mode=UR reset=HWrst -d build/Project.elf -s |
import numpy as np | |
#https://stackoverflow.com/questions/6811183/rolling-window-for-1d-arrays-in-numpy/6811241#6811241 | |
def rolling_window(a, window): | |
shape = a.shape[:-1] + (a.shape[-1] - window + 1, window) | |
strides = a.strides + (a.strides[-1],) | |
return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides) | |
a = np.array(range(20)) |
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",") | |
data = dataset[:,0:8] | |
label = dataset[:,8] | |
X = Input(shape=(8,)) | |
Y = Input(shape=(1,)) | |
x = Dense(12, input_dim=8, activation='relu')(X) | |
x = Dense(8, activation='relu')(x) | |
predictions = Dense(1, activation='sigmoid')(x) |
https://github.com/opencv/opencv/blob/a66f61748fc4861374b8dc458866a9614925350a/modules/calib3d/src/ptsetreg.cpp#L1018 | |
// From dlib | |
template <typename T> | |
point_transform_affine find_similarity_transform ( | |
const std::vector<dlib::vector<T,2> >& from_points, | |
const std::vector<dlib::vector<T,2> >& to_points | |
) | |
{ | |
// make sure requires clause is not broken |
# https://www.tensorflow.org/lite/guide/inference#load_and_run_a_model_in_python | |
#Simple version | |
interpreter = tf.lite.Interpreter(model_path='./upsampling_float.tflite') | |
interpreter.allocate_tensors() | |
interpreter.set_tensor(interpreter.get_input_details()[0]['index'], sample_input ) | |
interpreter.invoke() | |
output_tflite_float = interpreter.get_tensor(output_details[0]['index'])[0] |
vi /etc/xdg/weston/weston.ini
[output]
name=HDMI-A-1
mode=1280x720
+ transform=180
find . -type f -iname "*.[chS]" | xargs ctags
#!/bin/bash -e | |
SW="stm32ai-linux-5.1.2.zip" | |
URL="aHR0cHM6Ly9zdy1jZW50ZXIuc3QuY29tL3BhY2tzL3gtY3ViZS1haS9zdG0zMmFpLWxpbnV4LTUuMS4yLnppcAo=" | |
LIC_URL="https://www.st.com/content/ccc/resource/legal/legal_agreement/license_agreement/group0/eb/8e/f9/c1/9e/64/49/95/SLA0048/files/SLA0048.txt/jcr:content/translations/en.SLA0048.txt" | |
LIC_FILE="en.SLA0048.txt" | |
echo "===============================" | |
echo " Welcome to stm32ai_downloader " | |
echo "===============================" |