Skip to content

Instantly share code, notes, and snippets.

View budui's full-sized avatar
🎯
Focusing

Ray Wang budui

🎯
Focusing
View GitHub Profile

Objective

Informal (vibes-based) evaluation of the following vision-language-model captioners:

  • Florence-2-base-ft
  • CogVLM2
  • BLIP-2
  • MoonDream2
  • Share-Captioner
  • Florence-2-SD3-Captioner
@Birch-san
Birch-san / model_watch.py
Last active May 21, 2024 14:36
Watch your activation norms fly into the sunset
# Contains MIT-licensed code from wandb
# https://github.com/wandb/wandb/blob/main/LICENSE
# This gist is MIT-licensed (Copyright Alex Birch)
from torch import Tensor, FloatTensor
from torch.nn import Module
from torch.utils.hooks import RemovableHandle
import torch
from typing import List, Callable, Dict, Sequence, Optional, Tuple, Any
from wandb.wandb_torch import log_track_init, log_track_update
@Birch-san
Birch-san / slerp.py
Last active February 24, 2024 12:11
PyTorch implementation of spherical linear interpolation
from torch import FloatTensor, LongTensor, Tensor, Size, lerp, zeros_like
from torch.linalg import norm
# adapted to PyTorch from:
# https://gist.github.com/dvschultz/3af50c40df002da3b751efab1daddf2c
# most of the extra complexity is to support:
# - many-dimensional vectors
# - v0 or v1 with last dim all zeroes, or v0 ~colinear with v1
# - falls back to lerp()
# - conditional logic implemented with parallelism rather than Python loops
@sts10
sts10 / rust-command-line-utilities.markdown
Last active July 21, 2024 11:17
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@TaylanTatli
TaylanTatli / Custom CSS.css
Last active April 10, 2024 01:35
I created a repo for Miniflux Themes and added a new Catppuccin theme. If anyone interested: https://github.com/TaylanTatli/MinifluxThemes
:root {
--font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--body-color: rgba(255, 255, 255, 0.7);
--body-background: #282c34;
--header-link-color: #9b9494;
--header-active-link-color: #d19a66;
--input-border: 1px solid #2c384e;
--input-background: #2c384e;
--input-placeholder-color: #888;
--input-focus-border-color: #d19a66;
@enricofoltran
enricofoltran / main.go
Last active June 26, 2024 12:16
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@reagent
reagent / 00_README.md
Last active January 29, 2024 13:31
Custom HTTP Routing in Go

Custom HTTP Routing in Go

Basic Routing

Responding to requests via simple route matching is built in to Go's net/http standard library package. Just register the path prefixes and callbacks you want invoked and then call the ListenAndServe to have the default request handler invoked on each request. For example:

package main

import (
@jeremyjaymes
jeremyjaymes / hugo_seo.html
Last active March 21, 2021 08:39
Hugo SEO Markup
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}"/>
<meta name="robots" content="noodp"/>
<link rel="canonical" href="{{ .Permalink }}" />
<!-- Twitter Card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}" />
<meta name="twitter:title" content="{{ .Title }}{{ if .IsHome }} - {{ .Site.Params.Tagline }}{{ else }} - {{ .Site.Title }}{{ end }}" />
<meta name="twitter:site" content="{{ .Site.Params.twitter }}" />
<meta name="twitter:creator" content="{{ .Site.Params.twitter }}" />
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active July 22, 2024 19:15
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 22, 2024 02:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites