Skip to content

Instantly share code, notes, and snippets.

View manupatel007's full-sized avatar
🎯
Focusing

Vishwas Patel manupatel007

🎯
Focusing
  • Jaipur
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active June 14, 2024 07:51
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@wshayes
wshayes / websocket.py
Created January 19, 2020 17:06
[Websockets with fastapi] #fastapi #websockets
# https://github.com/tiangolo/fastapi/issues/883#issuecomment-575913215
# You can probably use an async queue so your MQTT client will push messages to the queue and the WS server will get from the queue and send them to the WS client.
from asyncio import Queue
queue: Queue = None
@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
await websocket.accept()
@rluts
rluts / token_auth.py
Last active October 13, 2023 20:56
Token authorization middleware for Django Channels 2
from channels.auth import AuthMiddlewareStack
from rest_framework.authtoken.models import Token
from django.contrib.auth.models import AnonymousUser
from django.db import close_old_connections
class TokenAuthMiddleware:
"""
Token authorization middleware for Django Channels 2
"""