Skip to content

Instantly share code, notes, and snippets.

@kyeshmz
kyeshmz / RemovePeriodPlugin.plugin.js
Created October 4, 2024 15:16
RemovePeriodPlugin.plugin.js
/**
* @name RemovePeriodPlugin
* @version 2.0.0
* @description Removes periods at the end of sentences from incoming and historical Discord messages.
* @author Kye Shimizu
*/
module.exports = class RemovePeriodPlugin {
// Called when the plugin is enabled
@kyeshmz
kyeshmz / gist:aff42744c5365b5e2a9de02fd3edb2ff
Created March 19, 2024 08:39
mp4 to hls , but the quality is not matched by other like vimeo, etc.
#https://dev.to/siumhossain/all-about-fmped-18hc
ffmpeg -i input.mp4 -c:v h264 -crf 22 -tune film -profile:v main -level:v 4.0 -maxrate 5000k -bufsize 10000k -r 25 -keyint_min 25 -g 50 -sc_threshold 0 -c:a aac -ar 44100 -b:a 128k -ac 2 -pix_fmt yuv420p -movflags +faststart 1080.mp4 -s 1280x720 -c:v h264 -crf 24 -tune film -profile:v main -level:v 4.0 -maxrate 2500k -bufsize 5000k -r 25 -keyint_min 25 -g 50 -sc_threshold 0 -c:a aac -ar 44100 -b:a 128k -ac 2 -pix_fmt yuv420p -movflags +faststart 720.mp4 -s 854x480 -c:v h264 -crf 30 -tune film -profile:v main -level:v 4.0 -maxrate 1250k -bufsize 2500k -r 25 -keyint_min 25 -g 50 -sc_threshold 0 -c:a aac -ar 44100 -b:a 96k -ac 2 -pix_fmt yuv420p -movflags +faststart 480.mp4 -s 640x360 -c:v h264 -crf 33 -tune film -profile:v main -level:v 4.0 -maxrate 900k -bufsize 1800k -r 25 -keyint_min 25 -g 50 -sc_threshold 0 -c:a aac -ar 44100 -b:a 96k -ac 2 -pix_fmt yuv420p -movflags +faststart 360.mp4 -s 320x24 -c:v h264 -crf 36 -tune film -profile:v main -level:v 4.0 -maxra
FROM nvcr.io/nvidia/pytorch:23.04-py3
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install wget unzip git ca-certificates ninja-build openssl sqlite vim nano screen libgl1-mesa-dev bzip2 iputils-ping net-tools -y
RUN pip install --user numpy dlib pynng python-osc pytz trio imutils tqdm matplotlib scipy opencv-python pillow
RUN pip install fastapi pydantic "uvicorn[standard]"
RUN pip install requests
RUN pip install "jax[cuda11_cudnn805]==0.3.10" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
RUN pip install torch==1.9.1+cu111 torchvision==0.10.1+cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
RUN pip install timm==0.4.12 ftfy==6.1.1 ninja==1.10.2 opensimplex
WORKDIR /home
@kyeshmz
kyeshmz / aaa
Created April 19, 2023 01:50
mi
FROM nvcr.io/nvidia/tensorflow:21.03-tf1-py3 as tf
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install wget unzip git ca-certificates ninja-build openssl sqlite vim nano screen libgl1-mesa-dev bzip2 -y
RUN pip install --user numpy dlib pynng python-osc pytz trio imutils tqdm matplotlib scipy opencv-python pillow torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
RUN export NVM_DIR="/usr/local/nvm" &&\
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" &&\
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" &&\
nvm install stable && nvm use stable && npm install --global yarn &&\
yarn global add pm2 &&\
@kyeshmz
kyeshmz / Unity Notes.md
Created July 1, 2020 03:29
Unity Notes
#include <ArduinoOSC.h>
// WiFi stuff
const char* ssid = "FG4023B-0D18-bg";
const char* pwd = "5826004084";
// WiFi.begin() will handle it, but if we need to make it static
const IPAddress ip(192, 168, 1, 69);
const IPAddress gateway(192, 168, 1, 1);
const IPAddress subnet(255, 255, 255, 0);
@kyeshmz
kyeshmz / new
Created April 20, 2020 10:43
new argon
#include "Particle.h"
SYSTEM_MODE(MANUAL);
// const size_t UART_TX_BUF_SIZE = 98;
void onDataReceived(const uint8_t *data, size_t len, const BlePeerDevice &peer, void *context);
void leftDataReceived(const uint8_t *data, size_t len, const BlePeerDevice &peer, void *context);
void centerDataReceived(const uint8_t *data, size_t len, const BlePeerDevice &peer, void *context);
void rightDataReceived(const uint8_t *data, size_t len, const BlePeerDevice &peer, void *context);
@kyeshmz
kyeshmz / test
Created April 20, 2020 07:46
test
#include "Particle.h"
SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);
// const size_t UART_TX_BUF_SIZE = 98;
void onDataReceived(const uint8_t* data, size_t len, const BlePeerDevice& peer, void* context);
void leftDataReceived(const uint8_t* data, size_t len, const BlePeerDevice& peer, void* context);
void centerDataReceived(const uint8_t* data, size_t len, const BlePeerDevice& peer, void* context);
@kyeshmz
kyeshmz / postinstall.sh
Created September 10, 2019 03:31
postinstall && setup install
#!/bin/bash
nvidia-smi
sudo apt-get install --no-install-recommends \
cuda-10-0 \
libcudnn7=7.4.1.5-1+cuda10.0 \
libcudnn7-dev=7.4.1.5-1+cuda10.0
nvidia-smi
sudo reboot
@kyeshmz
kyeshmz / Setup.sh
Last active September 9, 2019 07:43
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64' >> ~./bashrc
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
sudo apt-get update
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt-get update
sudo apt-get install --no-install-recommends nvidia-driver-418
sudo reboot