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 itertools | |
import wandb | |
import PIL | |
import matplotlib.pyplot as plt | |
import torch | |
from diffusers import StableDiffusionPipeline | |
from diffusers import DDIMScheduler | |
from diffusers import PNDMScheduler |
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 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 |
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
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 |
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
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: |
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
{'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', | |
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
/* shadowing | |
왜 shadowing 이라고 하나? | |
- 그림자로 가리우듯, 앞서 등장한 변수의 값을, 동일한 이름을 가진 지역적 변수가 가려버린다. | |
- 그래서 앞서 등장한 변수를 전혀 접근할 수 없게 되어버린다. | |
- 심지어 패키지 이름으로 장난치는것도 가능하다. 그러면, shadowing 된 영역에서는 해당 패키지 접근 자체가 불가능하다. | |
*/ | |
func main() { | |
x := 10 | |
if x > 5 { | |
fmt.Println(x) |
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
package main | |
import ( | |
"encoding/json" | |
"net/http" | |
"sort" | |
"github.com/gorilla/mux" | |
) | |
type Student struct { |
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 '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 |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strings" | |
) |
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 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) |
NewerOlder