Skip to content

Instantly share code, notes, and snippets.

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": {
@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
#!/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 / 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):
@tanpinsiang
tanpinsiang / wpa_supplicant.conf
Created September 11, 2013 07:36
wpa_supplicant smobilenet
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="sMobileNet"
proto=WPA
key_mgmt=WPA-EAP
pairwise=TKIP
group=TKIP
eap=PEAP
identity="itsc username"
import numpy as np
from math import pi, log
import pylab
from scipy import fft, ifft
from scipy.optimize import curve_fit
i = 10000
x = np.linspace(0, 3.5 * pi, i)
y = (0.3*np.sin(x) + np.sin(1.3 * x) + 0.9 * np.sin(4.2 * x) + 0.06 *
np.random.randn(i))
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
// OAuth supports 3 legged and 2 legged (aka XAuth) authentication.
// This app demonstrates how to use 2 legged authentication with CartoDB
var sys = require('sys')
, querystring = require('querystring')
, OAuth = require('oauth').OAuth
, EventEmitter = require('events').EventEmitter;
function CartoDBClient(user, password, consumer_key, consumer_secret) {