Skip to content

Instantly share code, notes, and snippets.

View pszemraj's full-sized avatar

Peter pszemraj

View GitHub Profile
@pszemraj
pszemraj / how-to-upgrade-heroku-postgresql.md
Created August 7, 2021 16:30 — forked from simonw/how-to-upgrade-heroku-postgresql.md
How to upgrade a Heroku PostgreSQL database to a new plan

How to upgrade a Heroku PostgreSQL database to a new plan

I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).

After assigning the new database, I had two databases attached to the application. They looked something like this:

  • HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
@pszemraj
pszemraj / semantic-search-on-text-posts-google-u-s-e.ipynb
Last active August 21, 2021 19:20
Semantic Search on Text Posts - Google U.S.E.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / boulderspot-coverage-aug30.geojson
Last active September 1, 2021 03:20
a map that shows the status of boulderspot.io coverage as of august 30, 2021
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pszemraj
pszemraj / gpt-j-6b-testing.ipynb
Last active September 27, 2021 22:09
GPT-J 6B - Testing
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 / 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 / -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 / 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 / visual-analysis-via-umap-course-text-data.ipynb
Last active January 1, 2022 03:31
Visual Analysis via UMAP - Course 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 / AutoTA-Example.md
Last active January 1, 2022 03:40
HayStack Course Info Extractor - IML s21.ipynb

AutoTA Example

  • A series of transformer models that embed your course documents, search for them when you ask it a question, and construct a reply in coherent english using a text2text generator.
  • Based on the work done by deepset.ai in their Haystack library.
  • As the notebook preview does not always load on GitHub, click here for the Colab notebook / demo. Instructions are provided on what to edit to use the notebook both in simple cases (i.e. just changing the questions) to adapting the notebook for other purposes.

Example: The model's explanation of K-Means

question to model: What is the k-means algorithm?