This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; standard imports | |
(import random) | |
; 3rd-party imports | |
(import [cherrypy [config quickstart expose]]) | |
(def choices [ | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import [collections [defaultdict]] | |
[itertools [starmap]] | |
[codecs [open]] | |
[sys [argv]] | |
[pprint [pprint]] | |
[functools [partial :as Fn]]) | |
(def DELIMITERS u",.;:!?") | |
(defn parse-words [line] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
merge as one commit | |
# update develop | |
git fetch origin | |
git co develop | |
git rebase origin/develop | |
# be sure that you don't have conflicts | |
git co <feature-branch> | |
git merge develop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
# std | |
from collections import defaultdict | |
import random | |
import time | |
# 3rd-party | |
from blessed import Terminal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# It is very important to test negative test-cases also. | |
# If required to raise exception - strive to raise original type of the exception as | |
# they are not always initialized in the appropriate manner. | |
def test_failed_with_retryable_error(self): | |
"""Ensure that retry error raised in some predefined case""" | |
# given | |
sharing_violation_error_code = 0xC0000043 | |
side_effects = [ | |
# this kind of errors - do not initialize `message` field =( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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` | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key (kbd "C-c m g") | |
(lambda () (interactive) | |
(setq current-prefix-arg '("def[[:space:]]\|class[[:space:]]")) | |
(helm-call-interactively 'helm-occur ))) |
OlderNewer