Skip to content

Instantly share code, notes, and snippets.

View signalpillar's full-sized avatar

Volodymyr Vitvitskyi signalpillar

View GitHub Profile
# encoding: utf-8
"""
Used resources
- https://wiki.python.org/moin/PyPIXmlRpc
"""
# Python: >= 3.5
# std
import collections
Apple Inc.
Xcode and Apple SDKs Agreement
PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND CONDITIONS CAREFULLY BEFORE USING THE APPLE SOFTWARE OR APPLE SERVICES. THIS IS A LEGAL AGREEMENT BETWEEN YOU AND APPLE. IF YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS, CLICK THE “AGREE” BUTTON. BY CLICKING “AGREE” OR BY DOWNLOADING, USING OR COPYING ANY PART OF THIS APPLE SOFTWARE OR USING ANY PART OF THE APPLE SERVICES, YOU ARE AGREEING ON YOUR OWN BEHALF AND/OR ON BEHALF OF YOUR COMPANY OR ORGANIZATION TO THE TERMS AND CONDITIONS STATED BELOW. IF YOU DO NOT OR CANNOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU CANNOT USE THIS APPLE SOFTWARE OR THE APPLE SERVICES. DO NOT DOWNLOAD OR USE THIS APPLE SOFTWARE OR APPLE SERVICES IN THAT CASE.
1. Definitions
Whenever capitalized in this Agreement:
“Agreement” means this Xcode and Apple SDKs Agreement.
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`
"""