Skip to content

Instantly share code, notes, and snippets.

View tristan2077's full-sized avatar

TristanHou tristan2077

  • Shanghai
View GitHub Profile
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active September 11, 2024 11:40
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@darklow
darklow / celery_tasks_error_handling.py
Last active September 10, 2024 19:47
Celery tasks error handling example
from celery import Task
from celery.task import task
from my_app.models import FailedTask
from django.db import models
@task(base=LogErrorsTask)
def some task():
return result
class LogErrorsTask(Task):