Skip to content

Instantly share code, notes, and snippets.

View pszemraj's full-sized avatar

Peter pszemraj

View GitHub Profile
@pszemraj
pszemraj / -gpt2-dailydialogue-aitextgen-text-generation-training-on-gpu.ipynb
Created November 22, 2021 05:17
[GPT2-dailydialogue] aitextgen - text generation + training on GPU.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / convert-whatsapp-export-to-gpt2-script.ipynb
Created November 22, 2021 06:47
convert whatsapp export to GPT2 script
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / eda-exported-phone-text-data.ipynb
Created November 22, 2021 06:50
EDA - exported phone text data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / lab_tables.py
Created December 22, 2021 01:45 — forked from blink1073/lab_tables.py
Create LAB LUTs for skimage.color.colorconv based on OpenCV Method
import numpy as np
from scipy.interpolate import interp1d
from skimage import img_as_ubyte
def build_spline(x, y):
"""computes cubic spline coefficients for a function: (xi=i, yi=f[i]), i=0..n
Adapted rom OpenCV project.
"""
@pszemraj
pszemraj / text2mesh.ipynb
Last active January 6, 2022 16:30
text2mesh.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / gpu-test.ipynb
Created January 27, 2022 20:21
GPU-test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / aitextgen JIBA -text-generation-and-training-on-gpu.ipynb
Last active January 29, 2022 18:14
aitextgen JIBA - text generation and training on GPU.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / repunctuate_cpu.py
Created January 31, 2022 05:34
how to use the rpunct pip package to repunctuate grammar (after CPU fix implemented)
"""
usage example:
from scratch.rpunct.rpunct import RestorePuncts
rpunct_fixer = RestorePuncts()
bot_resp = repunctuate_grammar(
original_text, rpunct_obj=rpunct_fixer, verbose=True
)
"""
@pszemraj
pszemraj / slice_video_dir.py
Created January 31, 2022 13:47
splits all video files in a directory into chunks of a given duration.
"""
slice_video_dir.py - splits all video files in a directory into chunks of a given duration.
credit to https://gist.github.com/agalera/8cd63429b06e21d1420c6030c6b45c53
"""
import argparse
import glob
import os
from moviepy.video.io.VideoFileClip import VideoFileClip
@pszemraj
pszemraj / rpunct-vid2cleantext-single-demo.ipynb
Last active February 5, 2022 15:14
rpunct + vid2cleantext-single-demo.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.