Skip to content

Instantly share code, notes, and snippets.

View afiaka87's full-sized avatar
🤪

Clay Mullis afiaka87

🤪
View GitHub Profile
@crowsonkb
crowsonkb / ema_biased.py
Created February 26, 2021 19:09
Biased EMA for PyTorch
"""Exponential moving average for PyTorch. Adapted from
https://www.zijianhu.com/post/pytorch/ema/.
"""
from copy import deepcopy
import torch
from torch import nn
@crowsonkb
crowsonkb / ema.py
Last active February 28, 2021 22:45
Parameter averaging for PyTorch
"""Exponential moving average for PyTorch. Adapted from
https://www.zijianhu.com/post/pytorch/ema/.
"""
from copy import deepcopy
import torch
from torch import nn
@riobard
riobard / tcpdump.txt
Last active August 12, 2022 08:19
Poem lines broadcast by my ISP-provided fiber optical modem
# My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem.
# The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen.
$ tcpdump -i vlan10 ether proto 0x8300
15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da
0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very
0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,...
0x0030: 0000 0000 0000 0000 0000 ..........
15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Livestreaming via PS4 to a local RTMP server

Live stream from your PS4 to a local computer running an RTMP server by intercepting the twitch.tv stream.

Requirements

  • DD-WRT enabled Router (or router with iptables compatibility)
  • nix Envirment
  • nginx with the nginx-rtmp-module
@afiaka87
afiaka87 / finetune_clip_wds.py
Last active September 29, 2023 09:35
Finetune CLIP on a 'webdataset' formatted dataset
from torchvision.transforms.transforms import GaussianBlur
import webdataset as wds
import io
from PIL import Image
from clip.loader import TextImageDataset
from clip.clip import load, tokenize
from torchvision import transforms as T
from torch.utils.data import DataLoader
from torch.optim import Adam
import torch.nn.functional as F
@afiaka87
afiaka87 / zeta_quantize.ipynb
Last active November 27, 2023 04:43
zeta_quantize.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dominiklohmann
dominiklohmann / banner.png
Last active December 20, 2023 19:22
yabai autoupdate
banner.png
@nathzi1505
nathzi1505 / install-docker.sh
Last active February 28, 2024 15:52
Docker and Nvidia Docker installation in Ubuntu 20.04 LTS
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned.
# Docker
sudo apt-get update
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io
sudo systemctl start docker
sudo systemctl enable docker
docker --version
@afiaka87
afiaka87 / dalle_blog_semantic_search.ipynb
Last active April 10, 2024 19:57
dalle_blog_semantic_search.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.