Skip to content

Instantly share code, notes, and snippets.

View shubham0704's full-sized avatar

Shubham Bhardwaj shubham0704

View GitHub Profile
@shubham0704
shubham0704 / .cursorrules
Created June 1, 2025 01:56 — forked from boxabirds/.cursorrules
Rock solid: turn Cursor into a rock-solid software engineering companion
# Project Policy
This policy provides a single, authoritative, and machine-readable source of truth for AI coding agents and humans, ensuring that all work is governed by clear, unambiguous rules and workflows. It aims to eliminate ambiguity, reduce supervision needs, and facilitate automation while maintaining accountability and compliance with best practices.
# 1. Introduction
> Rationale: Sets the context, actors, and compliance requirements for the policy, ensuring all participants understand their roles and responsibilities.
## 1.1 Actors
@shubham0704
shubham0704 / temp-server.py
Created July 8, 2016 04:44 — forked from joewashear007/temp-server.py
A Simple Web Socket Demo that displays current temperature from a Raspberry pi's GPIO pins using a temperature sensor. Needs: Rashberry Pi, temperature probe, python 2.7, Tornado Webserver 1) Read This: http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/temperature/ 2) Install tornado Webserver 3) Change the ws address in html file to the lo…
import time
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
from tornado.ioloop import PeriodicCallback
import tornado.web
class WSHandler(tornado.websocket.WebSocketHandler):
def open(self):
self.callback = PeriodicCallback(self.send_temp, 120)