Skip to content

Instantly share code, notes, and snippets.

@tanpinsiang
tanpinsiang / json_server.py
Last active April 26, 2022 15:10
Sample python foxglove websocket server for sending GeoJSON.
import asyncio
import json
import time
from foxglove_websocket import run_cancellable
from foxglove_websocket.server import FoxgloveServer, FoxgloveServerListener
from foxglove_websocket.types import ChannelId
async def main():
class Listener(FoxgloveServerListener):
def on_subscribe(self, server: FoxgloveServer, channel_id: ChannelId):
#!/bin/bash
# Define the directory where your driver's source code is located
DRIVER_DIR="/home/admin/LINUX/driver"
# Navigate to the driver directory
cd $DRIVER_DIR
# Compile the driver
apt update
@tanpinsiang
tanpinsiang / dlmodel.md
Created November 2, 2023 09:57
How to download model from huggingface

How to download model from huggingface

install The HuggingFace Model Downloader

the script will download the correct version based on os/arch and save the binary as "hfdownloader" in the same folder

bash <(curl -sSL https://g.bodaay.io/hfd) -h

download vicuna-7b-v1.5

./hfdownloader -m lmsys/vicuna-7b-v1.5
This file has been truncated, but you can view the full file.
{
"openapi": "3.1.0",
"info": {
"title": "FastAPI",
"license": {
"name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "0.1.0",
"x-logo": {