Skip to content

Instantly share code, notes, and snippets.

Vladimir Chub vartagg

  • Krasnoyarsk
Block or report user

Report or block vartagg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
vartagg / !Profiler.hx
Created Aug 29, 2017 — forked from hamaluik/!Profiler.hx
Simple Haxe Profiler
View !Profiler.hx
package ;
import haxe.ds.StringMap;
import haxe.macro.Context;
import haxe.macro.Expr;
import haxe.macro.Printer;
import haxe.macro.Type.ClassType;
import neko.Lib;
using haxe.macro.ExprTools;
vartagg / gist:b8e477e34ff8ff7385bf
Created Nov 13, 2014
Updating edx-platform error
View gist:b8e477e34ff8ff7385bf
root@EVBYMINSD4C73:/# sudo /edx/bin/update edx-platform master
/edx/app/edx_ansible/venvs/edx_ansible/bin/python: /usr/local/lib/ no version information available (required by /edx/app/edx_ansible/venvs/edx_ansible/bin/python)
/edx/app/edx_ansible/venvs/edx_ansible/bin/python: /usr/local/lib/ no version information available (required by /edx/app/edx_ansible/venvs/edx_ansible/bin/python)
[WARNING]: It is unneccessary to use '{{' in loops, leave variables in loop
expressions bare.
PLAY [Deploy edxapp] **********************************************************
GATHERING FACTS ***************************************************************
from copy import copy
class LazyDict(dict):
A dict class with default value for unfound keys
>>> ldict = LazyDict(0)
>>> ldict
vartagg /
Created Mar 22, 2014
Различные утилиты
def deep_dict_merge(a, b):
Объединение словарей, которые могут содержать внутри
себя другие словари. При совпадении ключей приоритет
имеет словарь b (предполагается, что он содержит более актуальные данные).
:param a: dict
:param b: dict
>>> a = {1: {'a': 'A'}, 2:{'b': 'B'}}
>>> b = {2:{'c': 'C'}, 3: {'d': 'D'}}
You can’t perform that action at this time.