Skip to content

Instantly share code, notes, and snippets.

View veb-101's full-sized avatar
:octocat:
There's no try

Vaibhav Singh veb-101

:octocat:
There's no try
View GitHub Profile
import os
# This guide can only be run with the jax backend.
os.environ["KERAS_BACKEND"] = "jax"
from typing import Union
import keras
import keras.ops as kops
from keras import Model, Input, Layer
@veb-101
veb-101 / Wandb_delete_file.ipynb
Created June 16, 2023 08:07
Delete WandB run saved (uploaded) files
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import os
import gc
import cv2
import glob
import shutil
import random
import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm

An example of a diff code block:

  Unchanged Line
- Removed Line
+ Added Line
@veb-101
veb-101 / stablediffusionwalk.py
Created September 1, 2022 20:43 — forked from karpathy/stablediffusionwalk.py
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@veb-101
veb-101 / generate_tfrecords_tf1.py
Last active May 9, 2021 17:31
TFRECORD_generation TF 1&2
"""
Usage:
# Create train data:
python generate_tfrecord.py - --csv_input = <PATH_TO_ANNOTATIONS_FOLDER > /train_labels.csv - -output_path = <PATH_TO_ANNOTATIONS_FOLDER > /train.record
# Create test data:
python generate_tfrecord.py - --csv_input = <PATH_TO_ANNOTATIONS_FOLDER > /test_labels.csv - -output_path = <PATH_TO_ANNOTATIONS_FOLDER > /test.record
"""
@veb-101
veb-101 / scrambled_image.ipynb
Last active May 16, 2020 17:47
Scrambled_image.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.