Skip to content

Instantly share code, notes, and snippets.

View aatishnn's full-sized avatar

Aatish Neupane aatishnn

View GitHub Profile
@aatishnn
aatishnn / binarymaxheap.c
Last active June 3, 2021 07:24
Priority Queue and Max-heap implementation in C (Inspired from https://gist.github.com/martinkunev/1365481)
// Array representation according to Wikipedia article but starts from 0 index.
#include <stdio.h>
#include <stdlib.h>
struct heap {
int size;
int count;
int *heaparr;
};
@darklow
darklow / celery_tasks_error_handling.py
Last active July 24, 2024 16:05
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):