|
Download sys/sys-0021.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/sys/sys-0021.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@034ba678829a1c436b19d43dd3adab33b5170a80/sys/sys-0021.jsonl
-
curl -L -o sys-0021.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/sys/sys-0021.jsonl
1.57 kB
| {"type": "session", "harness": "deepseek-harness", "id": "sys-0021", "name": "Raspberry Pi GPIO with Python"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}} | |
| {"type": "message", "message": {"role": "user", "content": "How do I control GPIO on Raspberry Pi?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "```python\nimport RPi.GPIO as GPIO\nimport time\n\nGPIO.setmode(GPIO.BCM)\n\n# LED blink\nGPIO.setup(18, GPIO.OUT)\nwhile True:\n GPIO.output(18, GPIO.HIGH)\n time.sleep(1)\n GPIO.output(18, GPIO.LOW)\n time.sleep(1)\n\n# Button input with interrupt\ndef button_callback(channel):\n print(\"Button pressed!\")\n\nGPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)\nGPIO.add_event_detect(23, GPIO.FALLING, callback=button_callback, bouncetime=300)\n\n# PWM (servo motor)\npwm = GPIO.PWM(18, 50) # 50Hz\npwm.start(0)\npwm.ChangeDutyCycle(7.5) # 90 degrees\n\n# I2C with smbus\nimport smbus\nbus = smbus.SMBus(1)\ndata = bus.read_byte_data(0x68, 0x75) # Read WHO_AM_I from MPU6050\n\n# SPI\nimport spidev\nspi = spidev.SpiDev()\nspi.open(0, 0)\nspi.max_speed_hz = 1000000\nresponse = spi.xfer2([0x01, 0x00])\n\n# Cleanup\nGPIO.cleanup()\n```"}} | |