Nvim recognizes the following events. Names are case-insensitive.
BufAdd
Just after creating a new buffer which is
added to the buffer list, or adding a buffer
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| Celery worker blocks on rate limited task | |
| ========================================= | |
| by github.com/miraculixx | |
| Problem: | |
| If a worker has a rate_limit active on some task, and that task | |
| arrives (is received) more often than the rate limit interval, all | |
| worker processes will block on these task instances and stop | |
| consuming other tasks as soon as the prefetch count has maxed out |
| """ | |
| Json Schema to Django Model | |
| """ | |
| import json | |
| import argparse | |
| import logging | |
| import os | |
| def determine_model_name(model_id=None, filename=None): |
| import pickle | |
| import threading | |
| from Queue import Queue | |
| import time | |
| from bson import InvalidDocument | |
| from celery.utils.log import get_task_logger | |
| logger = get_task_logger(__name__) |
| # coding: utf-8 | |
| """Cause git to detect a merge conflict when two branches have migrations.""" | |
| # myapp/management/commands/makemigrations.py | |
| # you'll need myapp/management/commands/__init__.py and myapp/management/__init__.py in PY2, see Django docs | |
| from __future__ import absolute_import, unicode_literals | |
| import io | |
| import os | |
| import six |
| public static void postNewComment(Context context,final UserAccount userAccount,final String comment,final int blogId,final int postId){ | |
| mPostCommentResponse.requestStarted(); | |
| RequestQueue queue = Volley.newRequestQueue(context); | |
| StringRequest sr = new StringRequest(Request.Method.POST,"http://api.someservice.com/post/comment", new Response.Listener<String>() { | |
| @Override | |
| public void onResponse(String response) { | |
| mPostCommentResponse.requestCompleted(); | |
| } | |
| }, new Response.ErrorListener() { | |
| @Override |
Picking the right architecture = Picking the right battles + Managing trade-offs
| /* Useful celery config. | |
| app = Celery('tasks', | |
| broker='redis://localhost:6379', | |
| backend='redis://localhost:6379') | |
| app.conf.update( | |
| CELERY_TASK_RESULT_EXPIRES=3600, | |
| CELERY_QUEUES=( | |
| Queue('default', routing_key='tasks.#'), |