Skip to content

Instantly share code, notes, and snippets.

View chychen's full-sized avatar
🐶
Working from home

Jay Chen chychen

🐶
Working from home
View GitHub Profile
@chychen
chychen / 5-mins-to-run-earth2studio-corrdiff-inference.ipynb
Last active July 26, 2024 06:08
5-mins-to-run-earth2studio-corrdiff-inference.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
setup bootcamp dev env, see https://gist.github.com/chychen/d19652961f3ba2977b0e28fbbe815aa4?permalink_comment_id=5433786#gistcomment-5433786
launch tensorboard on twcc, see https://gist.github.com/chychen/d19652961f3ba2977b0e28fbbe815aa4?permalink_comment_id=5433797#gistcomment-5433797
@chychen
chychen / setup_nvidia_tao_jupyter_env.md
Last active July 27, 2022 08:30
Setup a lab env using JupyterLab + NVIDIA TAO + Triton on A100 MIG.

Setup NVIDIA TAO + JupyterLab on A100 MIG

Setup a lab env using JupyterLab + NVIDIA TAO + Triton on A100 MIG.

Prerequisite Libs

# https://docs.nvidia.com/datacenter/tesla/mig-user-guide/index.html
sudo nvidia-smi mig -lgip # -lgip: list gpu instance profiles
sudo nvidia-smi mig -cgi 19,19,19,19,19,19,19 -C # -cgi: create gpu instance, -C: compute instance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chychen
chychen / omniglot_tfreader.py
Last active May 24, 2021 13:07
load omniglot from tfds, then create tf.data.Dataset based on it.
import tensorflow as tf
import tensorflow_datasets as tfds
import numpy as np
import os
import matplotlib.pyplot as plt
from tensorflow.keras.utils import to_categorical
from absl import flags, logging
from tqdm.auto import tqdm
FLAGS = flags.FLAGS
"P3-2"
class MinimaxAgent(MultiAgentSearchAgent):
"""
Your minimax agent
"""
def getAction(self, gameState):
"""
Returns the minimax action from the current gameState using self.depth
and self.evaluationFunction.