Skip to content

Instantly share code, notes, and snippets.

View acidsound's full-sized avatar

LEE JAE HO acidsound

View GitHub Profile
Today you will be writing instructions to an eager, helpful, but inexperienced and unworldly AI assistant who needs careful instruction and examples to understand how best to behave. I will explain a task to you. You will write instructions that will direct the assistant on how best to accomplish the task consistently, accurately, and correctly. Here are some examples of tasks and instructions.
<Task Instruction Example>
<Task>
Act as a polite customer success agent for Acme Dynamics. Use FAQ to answer questions.
</Task>
<Inputs>
{$FAQ}
{$QUESTION}
</Inputs>
@acidsound
acidsound / echo_scp_scu.py
Last active December 27, 2023 09:34
2000포트로 Orthanc 에 send to modality 하면 series no 10006 생성해서 다시 전송하는 예제
from pynetdicom import AE, evt, AllStoragePresentationContexts, debug_logger
from pydicom.uid import generate_uid
debug_logger()
def sendBackToStore(ds):
ae2 = AE(ae_title=b'ORTHANC')
ae2.add_requested_context('1.2.840.10008.5.1.4.1.1.2', ['1.2.840.10008.1.2']) # CT Image Storage - Implicit VR Endian: Default Transfer Syntax for DICOM
ae2.add_requested_context('1.2.840.10008.5.1.4.1.1.7', ['1.2.840.10008.1.2']) # Secondary Capture Image Storage
ae2.add_requested_context('1.2.840.10008.1.1') # Verification SOP Class
@acidsound
acidsound / torch.bat
Created September 17, 2023 18:04
windows pytorch 2.0.1 설정
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
@acidsound
acidsound / vectorize_text.ipynb
Last active August 30, 2023 15:14
exllama+sentence transformers+qdrant
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@acidsound
acidsound / add_search_qdrant.py
Created August 28, 2023 18:04
exllama 사용법 +qdrant 색인&검색
from qdrant_client import QdrantClient
from qdrant_client.models import Distance, VectorParams
import numpy as np
from sentence_transformers import SentenceTransformer
from qdrant_client.models import PointStruct
# Initialize the client
client = QdrantClient("localhost:6333")
COLLECTION_NAME = "docs"
@acidsound
acidsound / README.md
Created February 7, 2023 17:25
DCM4CHEE-Arclight docker-compose 설정
[{"tag":"진단명","values":["DR","AMD","Glaucoma","ERM","RVO","Hypertensive retinopathy","Pathologic myopia","MH","RP"]},{"tag":"이상 소견","values":["Retinal hemorrhage","Microaneurysms","Hard exudates","Cotton wool patches","Drusen","Membrane","MH","MNF","Chorioretinal atrophy or scar","Vascular abnormality","RNFL defect","Glaucomatous disc change","Nonglaucomatous disc change"]},{"tag":"F/U","values":["1개월 내 빠른 진료 필요","정기검사 필요","정상 범위 조치 필요 없음"]}]
[{"tag":"CT","values":["Hemoperitoneum","Hemoretroperitoneum"]},{"tag":"CXR","values":["Pneumonia","Pneumothorax","Effusion","Intracranial hemorrhage"]}]
@acidsound
acidsound / build.sh
Created May 14, 2022 06:59
Upload sourceMap to Honeybadger.io using vite
npx vite build --outDir build
find ./build/assets -name "*.js" -print0 | while read -d $'\0' file
do
curl https://api.honeybadger.io/v1/source_maps \
-F api_key=$VITE_HONEYBADGER \
-F minified_url=$VITE_APP_BUILD/$(echo $file | sed -e 's/\.\/build\///g') \
-F source_map=@$file.map \
-F minified_file=@$file \;
# echo "$VITE_APP_ENDPOINT/$file" | sed -e 's/\.\/build\///g'
done
@acidsound
acidsound / main.dart
Created May 28, 2021 06:34
flutter - FutureBuilder를 사용한 camera 사용 예제
import 'dart:ffi';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:camera/camera.dart';
import 'package:tflite/tflite.dart';
List<CameraDescription> cameras = [];
void main() async {