Skip to content

Instantly share code, notes, and snippets.

@davidefiocco
davidefiocco / dataset.jsonl
Last active July 7, 2022 17:20
Example prodigy recipe to use a zero-shot classifier to pre-classify examples when performing labeling for text classification (see https://support.prodi.gy/t/can-one-leverage-zero-shot-classifiers-for-textcat-tasks/4885)
{"text":"Spam spam lovely spam!"}
{"text":"I like scrambled eggs."}
{"text":"I prefer spam!"}
@davidefiocco
davidefiocco / text-classification-in-pytorch-to-refactor-with-pytorch-lightning.ipynb
Last active March 1, 2021 22:03
Text classification in PyTorch to refactor with PyTorch lightning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / text-classification-in-pytorch-to-refactor-with-petastorm.ipynb
Last active February 15, 2021 17:58
Text classification in PyTorch to refactor with petastorm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / copyedits.jsonl
Created November 5, 2020 17:59
Prodigy recipe to categorize differences in text
{"removed":"These results suggested that the distribution of bacterial communities was driven more by sample types than the separate caves from which samples were collected.","added":"These results suggest that the distribution of bacterial communities is driven more by sample types than the separate caves from which samples were collected.","meta":{"score":1}}
@davidefiocco
davidefiocco / azureml-logging-on-transformers.ipynb
Created October 23, 2020 16:04
AzureML logging on transformers.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / colafinetuning.ipynb
Last active November 5, 2020 17:57
CoLAfinetuning.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / batch-bert.ipynb
Created October 22, 2020 15:09
Batch BERT.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidefiocco
davidefiocco / mirror.sh
Last active July 23, 2020 16:22
Launch webcam mirror on Linux
gst-launch-1.0 v4l2src device=/dev/video0 ! xvimagesink
@davidefiocco
davidefiocco / test_transforms.py
Created May 19, 2020 12:18
Test torchvision tranforms on a bunch of images
from torchvision import datasets, models, transforms
from PIL import Image
import torch
import matplotlib.pyplot as plt
from pathlib import Path
images = list(Path('../foo').glob('**/*.*'))
example = images.pop()
img = Image.open(example).convert('RGB')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.