본문 바로가기
반응형

분류 전체보기273

Dragon Moving Banner #Dragon Moving Bannerimport matplotlib.pyplot as pltimport numpy as npfrom matplotlib.image import imread# Load two PNG imagesimage1_path = "1.png"image2_path = "2.png"x1 = imread(image1_path)x2 = imread(image2_path)'''# two images x1 is initially visible, x2 is notx1 = np.random.random((100, 100))x2 = np.random.random((150, 175))'''# Set the size of the figureplt.figure(figsize=(10, 2))# arbitr.. 2024. 5. 7.
[Errno 13] Permission denied: '/dev/ttyUSB0' serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'시리얼 포트에 대한 접근 권한이 없기 때문 `udev` 규칙을 사용하면 특정 장치에 대해 자동으로 권한을 설정할 수 있습니다. 예를 들어, `/etc/udev/rules.d/` 디렉토리에 새 규칙 파일을 생성하여 `/dev/ttyUSB0`에 대한 권한을 설정할 수 있습니다. 99-serial.rules 파일을 생성 sudo vi /etc/udev/rules.d/99-serial.rules  내용입력KERNEL="ttyUSB0", MODE="0666" udev 규칙 적용sudo udeva.. 2024. 5. 2.
[RPI] How to use Inductive Proximity Sensor with Raspberry Pi 3 Model B import timeimport RPi.GPIO as GPIO# Pin of InputGPIOpin = -1# Initial the input pindef initialInductive(pin): global GPIOpin GPIOpin = pin GPIO.setmode(GPIO.BCM) GPIO.setup(GPIOpin,GPIO.IN, pull_up_down=GPIO.PUD_DOWN) print("Finished Initiation") print(GPIOpin)# Detect Metaldef detectMetal(): if(GPIOpin != -1): state = GPIO.input(GPIOpin) if state: print("Metal Detected") e.. 2024. 4. 29.
[Python] How to Run 70B LLMs on a Single 4GB GPU https://generativeai.pub/how-to-run-70b-llms-on-a-single-4gb-gpu-d1c61ed5258c How to Run 70B LLMs on a Single 4GB GPUHave you ever dreamed of using the state-of-the-art large language models (LLMs) for your natural language processing (NLP) tasks, but felt…generativeai.pub   #https://generativeai.pub/how-to-run-70b-llms-on-a-single-4gb-gpu-d1c61ed5258cfrom airllm import AutoModelMAX_LENGTH = 128.. 2024. 4. 25.
반응형