Aka how I stop worry and love fundamentals of software design
This is an example of code that don't work, but somewhat correct(I reach home at 11, and i need to wake up to reach here on time)
| import boto3 | |
| class ApplicationSpecificError(Exception): | |
| pass | |
| # You probably want to wrap this in a function, or put in a main() function | |
| sqs = boto3.client('sqs') |
| import argparse | |
| import subprocess | |
| from langchain.prompts import PromptTemplate | |
| from langchain.llms import OpenAI | |
| from langchain.chains import LLMChain | |
| from dotenv import load_dotenv | |
| load_dotenv() |
This is meant for the Wio Terminal. Based on this project, https://wiki.seeedstudio.com/Wio-Terminal-TinyML-EI-3/
The edge impulse project is here. Download the arduino, and copy to the Arduino Library directory. https://studio.edgeimpulse.com/public/55503/latest/deployment
Then copy the ino file and run. Yes arduino not really nice for deployment.
| #include "Keyboard.h" | |
| #include"TFT_eSPI.h" | |
| #define NOOP 0 | |
| #define PRESS 1 | |
| #define UP 2 | |
| #define DOWN 3 | |
| #define LEFT 4 | |
| #define RIGHT 5 | |
| #define MODE_NOOP 0 |
I use M5Stack_Avatar library https://github.com/meganetaaan/m5stack-avatar, on my M5Stack-Fire with wifi. Then it crashed
| #include <Arduino.h> | |
| #include <Arduino_LSM9DS1.h> | |
| // I am copying from arduino gesture to emoji to try understand how data collection work. | |
| const float accThreshold = 2.5; | |
| const int numSamples = 119; | |
| int sampleRead = numSamples; | |
| void setup() { |
| from transformers import pipeline | |
| import requests | |
| import pprint | |
| def load_hn(): | |
| hn_feed = requests.get("https://hacker-news.firebaseio.com/v0/topstories.json?print=pretty") | |
| data = hn_feed.json() | |
| return data |
| const puppeteer = require('puppeteer') | |
| const fs = require('fs') | |
| const extractor = async url => { | |
| const browser = await puppeteer.launch({ | |
| headless: true, | |
| slowMo: 1500 | |
| }) | |
| const scrapeTime = Date.now() | |
| const page = await browser.newPage() |