Skip to content

Instantly share code, notes, and snippets.

@bshambaugh
bshambaugh / gist:a1c7d66551f22c8c68cf46ad1aa31477
Created April 25, 2023 14:27
go through pospigos REA for HoloChain tutorial and try to replicate it.
https://www.youtube.com/watch?v=CHbl_tHtr3o
@bshambaugh
bshambaugh / gist:2097200d293cef6b9877c205d8da77a1
Created March 22, 2023 10:34
simple button clicker ... needs server
<!DOCTYPE html>
<head>
<meta charset="utf-8" />
<title> Script in head section </title>
<script type = "text/javascript">
function ClickMe() {
console.log("click")
}
</script>
</head>
I worked with this model during the EthDenver https://github.com/spro/char-rnn.pytorch . I did not manage to get the right shape for https://github.com/zkonduit/pyezkl/tree/main/examples/tutorial . (loading the model to convert to *.onnx)
I learned a bit about ML though. :P
You
11:48 AM
https://gist.github.com/bshambaugh/af01e7366ac7f43abd8295533703d990 (other scratch work)
....
You
11:51 AM
Here is my colab python sketches: https://colab.research.google.com/drive/1mi2Rcehz-YWOeXGBNjCe-COR5XhnfPTB
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.