This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 주간 업데이트 함수 | |
weekly_update() { | |
# 마지막 실행 시간을 저장할 파일 | |
last_run_file="$HOME/.last_weekly_update" | |
# 현재 시간 | |
current_time=$(date +%s) | |
# 파일이 존재하지 않으면 생성 | |
if [ ! -f "$last_run_file" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"role": "user", | |
"content": "draw random scatterplot", | |
"type": "message" | |
}, | |
{ | |
"role": "assistant", | |
"type": "message", | |
"content": "For a random scatter plot, let's choose two different columns that might provide an interesting contrast or relationship when visualized. Given we have previously looked at financial aspects, it might be illuminating to look into how movies fare in terms of audience and critic ratings.\n\n### Plan to Visualize with Vega-Lite:\nTherefore, a compelling choice for a scatter plot could be to visualize the relationship between:\n- The **IMDB Rating** (as the x-axis) and \n- The **Rotten Tomatoes Rating** (as the y-axis).\n\nBoth are numeric ratings from different review platforms, and comparing them can highlight differences in reception between general audiences (IMDb) and critics (Rotten Tomatoes).\n\nHere are the steps for creating this visualization using Vega-Lite:\n1. Define the `$schema` for Vega-Lite.\n2. Specify the `data` as `artifacts/data.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from dataclasses import asdict, is_dataclass | |
from json import JSONDecoder, JSONEncoder | |
from typing import Type, TypeVar | |
T = TypeVar("T") | |
class VJSONEncoder(JSONEncoder): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// input prompt to text area and paste code to javascript console. | |
(function () { | |
const DOMPath = document.querySelector("#__next > div.relative.z-0.flex.h-full.w-full.overflow-hidden > div.relative.flex.h-full.max-w-full.flex-1.flex-col.overflow-hidden > main > div.flex.h-full.flex-col > div.w-full.pt-2.md\\:pt-0.dark\\:border-white\\/20.md\\:border-transparent.md\\:dark\\:border-transparent.md\\:w-\\[calc\\(100\\%-\\.5rem\\)\\] > form > div > div > div") | |
const genButton = "button[data-testid='send-button']" | |
const stopButton = "button[aria-label='Stop generating]'"; | |
const startTime = Date.now() | |
document.querySelector(genButton).click() | |
const observer = new MutationObserver(checkForTargetElement); | |
const observerConfig = { subtree: true, childList: true }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from typing import Dict | |
class ExecTimeChecker: | |
execution_times: Dict[str, float] | |
def __init__(self): | |
self.execution_times = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## First, clone your api repository to current folder. and copy Dockerfile | |
FROM pytorch/pytorch:latest | |
## Copying current folder to image | |
COPY ./ ./ | |
## install git-lfs for downloading Huggingface model and datasets. | |
RUN apt update -y && apt install git git-lfs -y | |
RUN git lfs install |