Skip to content

Instantly share code, notes, and snippets.

https://docs.arduino.cc/built-in-examples/digital/Button
https://diyprojectslab.com/mcp2515-spi-can-bus-module-with-arduino/#Required_Material
Sensor Data over CAN BUS - Arduino with CAN2515
https://www.youtube.com/watch?v=2gnXKMoFwkc
arduino mcp2515 CAN bus Demo with Push botton and LED
https://www.youtube.com/watch?v=pD22AUjkDAw
@bshambaugh
bshambaugh / gist:af01e7366ac7f43abd8295533703d990
Created March 2, 2023 17:13
likely shape for ONNX for RNN
def main():
torch_model = Circuit()
# Input to the model
shape = [3, 2, 2] /// change to [batch_size, seq_len, input_size]
x = 0.1*torch.rand(1,*shape, requires_grad=True)
y = 0.1*torch.rand(1,*shape, requires_grad=True)
torch_out = torch_model(x, y)
# Export the model
torch.onnx.export(torch_model, # model being run
(x,y), # model input (or a tuple for multiple inputs)
translation of: https://github.com/AXERA-TECH/ax-pipeline/blob/0ba37a0f08346dd80215aa46ac16f199c1f167b9/docs/how_to_deploy_custom_model.md
How to deploy your own other models
Read the documentation
Read through the AXera Pulsar toolchain guide to learn how to convert a custom onnx model into the Joint model used in AX620.
Inserting Post-Processing Code
The model inference in ax-pipeline is basically a standard operation, and pre-processing is not something that needs to be configured in the code.
translation of: https://github.com/AXERA-TECH/ax-pipeline
Update Log
2023-01-16 Added YoloV8, please refer to ModelZoo for details.
2022-12-29 Added sample_v4l2_user_ivps_joint_vo for direct input of NV12 data, if the user has access to NV12 data. Modified the value of enum class SAMPLE_RUN_JOINT_MODEL_TYPE to meet the growing list of model support.
2022-12-26 Added sample code for rtsp input sample_rtsp_ivps_joint_vo
@bshambaugh
bshambaugh / gist:72ee200fb152c0e1e8e1ca9edd4791e3
Created February 18, 2023 21:24
How do I set gasPerPubdata??
:~/Downloads/l2-intro-pre-ethdenver$ yarn hardhat deploy-zksync --script deploy-greeter.ts
yarn run v1.22.19
warning ../package.json: No license field
warning ../../package.json: No license field
$ /home/ubuntu/Downloads/l2-intro-pre-ethdenver/node_modules/.bin/hardhat deploy-zksync --script deploy-greeter.ts
Running deploy script for the Greeter contract
(node:5033) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
An unexpected error occurred:
@bshambaugh
bshambaugh / gist:1dd9b69688e01c295631e7dd230c4c51
Created January 26, 2023 15:12
Ultimate Ethereum Hackathon Survival Guide
https://consensys.net/developers/ultimate-hackathon-survival-guide/
https://swissintech.medium.com/ultimate-ethereum-hackathon-survival-guide-for-2023-94b2b72e17c0
https://medium.com/textileio/whats-really-happening-when-you-add-a-file-to-ipfs-ae3b8b5e4b0f
https://github.com/ipvm-wg/spec/discussions/9 (IPLD Transformations)
Ask on IPLD / IPFS Discord?
How do you cluster IPFS hashes that are most used/relevant?
It looks like with IPLD you can hash any RDF document regardless of serialization and have them point to other RDF documents.
IPLD can also hash individual pieces of data, so it looks like you could build a triplestore using the unhashed data.
https://www.youtube.com/watch?v=brTI93f73KM
Error Detection with CRC Modulo
Cyclic Redundancy Check (CRC) - Part 1
https://www.youtube.com/watch?v=A9g6rTMblz4
Cyclic Redundancy Check (CRC) - Part 2
https://www.youtube.com/watch?v=wQGwfBS3gpk
How do CRCs work?
bshambaugh
11/22/2022 7:34 PM
fwiw, I've kind of grown skeptical of how UCANs might fit into my project. I common argument I have is the chain would get to long and be too heavy for the little devices. (why not sign a chain of hashes...hash sign...hash..sign...gossip...idk my mind is tired now... if I want an adventure game if I visit one station then the next (of course I need to decide on my use case..there is more than one I give for Blinky). I did a demo at IIW and am in progress of gathering my thoughts though. Some even asked that a put together a post-demo video.
expede
11/22/2022 7:40 PM
That's too bad! I'd love to learn more about your use case!
I common argument I have is the chain would get to long and be too heavy for the little devices.
@bshambaugh
bshambaugh / gist:8d4a49b94c5255437825da02f65036cd
Created December 20, 2022 03:08
resetting apache2 and php and root password
Oh good it is done:
https://www.maketecheasier.com/reset-root-password-linux/
https://www.tomshardware.com/how-to/change-passwords-in-linux
From Synaptic:
reinstall apache2
reinstall php7
https://askubuntu.com/questions/760907/upgrade-to-16-04-php7-not-working-in-browser