Skip to content

Instantly share code, notes, and snippets.

View signalpillar's full-sized avatar

Volodymyr Vitvitskyi signalpillar

View GitHub Profile
def call_on_full_list_buffer(fn, buffer_size):
buffer = _call_on_full_list_buffer(fn, buffer_size)
next(buffer)
return buffer
def _call_on_full_list_buffer(fn, buffer_size):
buffer = []
values = []
while True:

Benjamin Peterson - Python Packaging Progress

Presentation just enumerates all tools related to the packaging and their development timeline. It is about pain and

  1. Find out that there is a PyPi replacement project in development Warehouse

    1. Clean code base and developed in Python 3.x

    2. Engineering design, non-attractive

@signalpillar
signalpillar / patch-cxx11-compat.patch
Last active September 14, 2015 12:50
Thrift 0.9.0 patches
diff --git a/compiler/cpp/src/thrifty.yy b/compiler/cpp/src/thrifty.yy
--- a/compiler/cpp/src/thrifty.yy
+++ b/compiler/cpp/src/thrifty.yy
@@ -653,7 +653,7 @@
$$ = new t_const_value();
$$->set_integer($1);
if (!g_allow_64bit_consts && ($1 < INT32_MIN || $1 > INT32_MAX)) {
- pwarning(1, "64-bit constant \"%"PRIi64"\" may not work in all languages.\n", $1);
+ pwarning(1, "64-bit constant \"%" PRIi64"\" may not work in all languages.\n", $1);
}

When unsing docker compose you can have a problem with the order of dependent linked containers

The solution is to start a script which tries to access a service and waits until it gets ready before loading your program

--- ~/Temp ‹master* ?› » brew search mlton
No formula found for "mlton".
Searching pull requests...
Closed pull requests:
Fix MLton URL (https://github.com/Homebrew/homebrew/pull/12579)
Make MLton formula install statically-linked-gmp version (https://github.com/Homebrew/homebrew/pull/9530)
Add MLton, an optimising Standard ML compiler (https://github.com/Homebrew/homebrew/pull/3817)
mlton: corrected homepage (https://github.com/Homebrew/homebrew/pull/5649)
(defun rebuild-python-tags ()
"Rebuild TAGS for the current projectile project and chosen venv.
Dependencies: projectile, elpy, etags (shell command)."
(interactive)
(call-interactively 'pyvenv-workon)
(let ((python-files-locations (list (projectile-project-root) pyvenv-virtual-env))
(output-file-path (concat (projectile-project-root) "TAGS")))
(message (format "Remove initial TAGS file: %s" output-file-path))
(shell-command (format "rm %s| true" output-file-path))
(global-set-key (kbd "C-c m g")
(lambda () (interactive)
(setq current-prefix-arg '("def[[:space:]]\|class[[:space:]]"))
(helm-call-interactively 'helm-occur )))
"""
Script with :func:`build_hierarchy` function as an entry point.
Specify the class and get its inheritance hierarchy.
See also :mod:`inspect.getclasstree` as an alternative implementation.
There is also a way to convert hierarchy to the dot-language graph - :func:`node_to_dot_graph`
"""
def test_empty_recipients_result(datastore):
"""Ensure empty document returned when there is nothing in the storage"""
assert_json_response(
do_get(handler.RECIPIENTS_URL),
(
200,
{
"next_results_url": None,
"results": []
}
# initialize project (run when requirements.txt is changed)
# NOTE: doesn't work with SVN requirements ...
ifndef VIRTUAL_ENV
$(error Run this command in the virtualenvironment)
endif
init: deps run-gaenv mapreduce-deps rest-deps
mapreduce-deps:
mkdir $$VIRTUAL_ENV/ext || true