Skip to content

Instantly share code, notes, and snippets.

View deep-diver's full-sized avatar
🎯
Focusing

Chansung Park deep-diver

🎯
Focusing
View GitHub Profile
import itertools
import wandb
import PIL
import matplotlib.pyplot as plt
import torch
from diffusers import StableDiffusionPipeline
from diffusers import DDIMScheduler
from diffusers import PNDMScheduler
@deep-diver
deep-diver / experiments.py
Created January 29, 2023 15:28
run a number of experiments based on different schedulers for SD
import wandb
import PIL
import matplotlib.pyplot as plt
import torch
from diffusers import StableDiffusionPipeline
from diffusers import DDIMScheduler
from diffusers import PNDMScheduler
from diffusers import LMSDiscreteScheduler
@deep-diver
deep-diver / sample_locust_config.config
Last active April 30, 2022 14:17
sample_locust_config
locustfile = locustfile.py
headless = false
users = 150
spawn-rate = 1
run-time = 5m
host = http://<<GKE Service IP>>
html = reports/8nodes-2vcpu-4gbram-1uviworker.html
csv = reports/8nodes-2vcpu-4gbram-1uviworker
@deep-diver
deep-diver / tmp_saved_model.txt
Created April 6, 2022 14:59
tmp_saved_model
MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:
signature_def['__saved_model_init_op']:
The given SavedModel SignatureDef contains the following input(s):
The given SavedModel SignatureDef contains the following output(s):
outputs['__saved_model_init_op'] tensor_info:
dtype: DT_INVALID
shape: unknown_rank
name: NoOp
Method name is:
{'ContainerOp': {'is_exit_handler': False, 'human_name': 'Model-export_model', 'display_name': None, 'name': 'model-export-model', 'node_selector': {}, 'volumes': [], 'tolerations': [], 'affinity': {}, 'pod_annotations': {}, 'pod_labels': {}, 'num_retries': 0, 'retry_policy': None, 'backoff_factor': None, 'backoff_duration': None, 'backoff_max_duration': None, 'timeout': 0, 'init_containers': [], 'sidecars': [], 'loop_args': None, '_inputs': [{{pipelineparam:op=;name=project}}, {{pipelineparam:op=automlimagetrainingjob-run;name=model}}], 'dependent_names': [], 'enable_caching': True, 'attrs_with_pipelineparams': ['node_selector', 'volumes', 'pod_annotations', 'pod_labels', 'num_retries', 'init_containers', 'sidecars', 'tolerations', '_container', 'artifact_arguments', '_parameter_arguments'], '_is_v2': False, '_container': {'args': ['--method.export_format_id',
'tflite',
'--method.artifact_destination',
'gs://output-model-gde-csp/flower-models/',
'--executor_input',
@deep-diver
deep-diver / chapter 4.go
Last active June 13, 2021 23:53
learning-go
/* shadowing
왜 shadowing 이라고 하나?
- 그림자로 가리우듯, 앞서 등장한 변수의 값을, 동일한 이름을 가진 지역적 변수가 가려버린다.
- 그래서 앞서 등장한 변수를 전혀 접근할 수 없게 되어버린다.
- 심지어 패키지 이름으로 장난치는것도 가능하다. 그러면, shadowing 된 영역에서는 해당 패키지 접근 자체가 불가능하다.
*/
func main() {
x := 10
if x > 5 {
fmt.Println(x)
@deep-diver
deep-diver / 1차.go
Last active May 24, 2021 03:26
RESTful API 서버 만들기
package main
import (
"encoding/json"
"net/http"
"sort"
"github.com/gorilla/mux"
)
type Student struct {
import 'package:flutter/material.dart';
// void main() { ... } 로 적어도 되지만, shorthand 버전으로 => 심볼을 활용 가능
void main() => runApp(MyApp());
/*
StatelessWidget 과 StatefulWidget 사이의 차이. StatelessWidget은 단 한번만 Build를 한다.
한번 그려진 화면은 계속 유지되며, 성능상 장점이 생긴다. StatefulWidget은 state를 포함하며,
setState가 발생할때마다 Build과정이 일어나고, 동적 화면을 쉽게 구현이 가능하다.
- [출처] https://security-nanglam.tistory.com/478
@deep-diver
deep-diver / 1차 완성.go
Last active May 21, 2021 00:47
단어 검색 프로그램
package main
import (
"bufio"
"fmt"
"os"
"path/filepath"
"strings"
)
@deep-diver
deep-diver / separate_half.py
Last active May 18, 2021 15:12
MNIST dataset Split
import pandas as pd
df = pd.read_csv('train.csv')
total_length = len(df)
keep_ratio = 0.5
keep_idx = (int)total_length*keep_ratio
keep_df = df[:keep_idx]
keep_df.to_csv('train.csv', index=False)