partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
test
CompletionHtml.eventFilter
Reimplemented to handle keyboard input and to auto-hide when the text edit loses focus.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def eventFilter(self, obj, event): """ Reimplemented to handle keyboard input and to auto-hide when the text edit loses focus. """ if obj == self._text_edit: etype = event.type() if etype == QtCore.QEvent.KeyPress: key = event.key() ...
def eventFilter(self, obj, event): """ Reimplemented to handle keyboard input and to auto-hide when the text edit loses focus. """ if obj == self._text_edit: etype = event.type() if etype == QtCore.QEvent.KeyPress: key = event.key() ...
[ "Reimplemented", "to", "handle", "keyboard", "input", "and", "to", "auto", "-", "hide", "when", "the", "text", "edit", "loses", "focus", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L148-L198
[ "def", "eventFilter", "(", "self", ",", "obj", ",", "event", ")", ":", "if", "obj", "==", "self", ".", "_text_edit", ":", "etype", "=", "event", ".", "type", "(", ")", "if", "etype", "==", "QtCore", ".", "QEvent", ".", "KeyPress", ":", "key", "=", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.cancel_completion
Cancel the completion should be called when the completer have to be dismissed This reset internal variable, clearing the temporary buffer of the console where the completion are shown.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def cancel_completion(self): """Cancel the completion should be called when the completer have to be dismissed This reset internal variable, clearing the temporary buffer of the console where the completion are shown. """ self._consecutive_tab = 0 self._slice_st...
def cancel_completion(self): """Cancel the completion should be called when the completer have to be dismissed This reset internal variable, clearing the temporary buffer of the console where the completion are shown. """ self._consecutive_tab = 0 self._slice_st...
[ "Cancel", "the", "completion" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L203-L216
[ "def", "cancel_completion", "(", "self", ")", ":", "self", ".", "_consecutive_tab", "=", "0", "self", ".", "_slice_start", "=", "0", "self", ".", "_console_widget", ".", "_clear_temporary_buffer", "(", ")", "self", ".", "_index", "=", "(", "0", ",", "0", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml._select_index
Change the selection index, and make sure it stays in the right range A little more complicated than just dooing modulo the number of row columns to be sure to cycle through all element. horizontaly, the element are maped like this : to r <-- a b c d e f --> to g to f <-- g h i...
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def _select_index(self, row, col): """Change the selection index, and make sure it stays in the right range A little more complicated than just dooing modulo the number of row columns to be sure to cycle through all element. horizontaly, the element are maped like this : to r <...
def _select_index(self, row, col): """Change the selection index, and make sure it stays in the right range A little more complicated than just dooing modulo the number of row columns to be sure to cycle through all element. horizontaly, the element are maped like this : to r <...
[ "Change", "the", "selection", "index", "and", "make", "sure", "it", "stays", "in", "the", "right", "range" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L229-L272
[ "def", "_select_index", "(", "self", ",", "row", ",", "col", ")", ":", "nr", ",", "nc", "=", "self", ".", "_size", "nr", "=", "nr", "-", "1", "nc", "=", "nc", "-", "1", "# case 1", "if", "(", "row", ">", "nr", "and", "col", ">=", "nc", ")", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.select_up
move cursor up
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def select_up(self): """move cursor up""" r, c = self._index self._select_index(r-1, c)
def select_up(self): """move cursor up""" r, c = self._index self._select_index(r-1, c)
[ "move", "cursor", "up" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L282-L285
[ "def", "select_up", "(", "self", ")", ":", "r", ",", "c", "=", "self", ".", "_index", "self", ".", "_select_index", "(", "r", "-", "1", ",", "c", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.select_down
move cursor down
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def select_down(self): """move cursor down""" r, c = self._index self._select_index(r+1, c)
def select_down(self): """move cursor down""" r, c = self._index self._select_index(r+1, c)
[ "move", "cursor", "down" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L287-L290
[ "def", "select_down", "(", "self", ")", ":", "r", ",", "c", "=", "self", ".", "_index", "self", ".", "_select_index", "(", "r", "+", "1", ",", "c", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.select_left
move cursor left
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def select_left(self): """move cursor left""" r, c = self._index self._select_index(r, c-1)
def select_left(self): """move cursor left""" r, c = self._index self._select_index(r, c-1)
[ "move", "cursor", "left" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L292-L295
[ "def", "select_left", "(", "self", ")", ":", "r", ",", "c", "=", "self", ".", "_index", "self", ".", "_select_index", "(", "r", ",", "c", "-", "1", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.select_right
move cursor right
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def select_right(self): """move cursor right""" r, c = self._index self._select_index(r, c+1)
def select_right(self): """move cursor right""" r, c = self._index self._select_index(r, c+1)
[ "move", "cursor", "right" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L297-L300
[ "def", "select_right", "(", "self", ")", ":", "r", ",", "c", "=", "self", ".", "_index", "self", ".", "_select_index", "(", "r", ",", "c", "+", "1", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml.show_items
Shows the completion widget with 'items' at the position specified by 'cursor'.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def show_items(self, cursor, items): """ Shows the completion widget with 'items' at the position specified by 'cursor'. """ if not items : return self._start_position = cursor.position() self._consecutive_tab = 1 items_m, ci = text.compute_item_ma...
def show_items(self, cursor, items): """ Shows the completion widget with 'items' at the position specified by 'cursor'. """ if not items : return self._start_position = cursor.position() self._consecutive_tab = 1 items_m, ci = text.compute_item_ma...
[ "Shows", "the", "completion", "widget", "with", "items", "at", "the", "position", "specified", "by", "cursor", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L302-L319
[ "def", "show_items", "(", "self", ",", "cursor", ",", "items", ")", ":", "if", "not", "items", ":", "return", "self", ".", "_start_position", "=", "cursor", ".", "position", "(", ")", "self", ".", "_consecutive_tab", "=", "1", "items_m", ",", "ci", "="...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml._update_list
update the list of completion and hilight the currently selected completion
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def _update_list(self, hilight=True): """ update the list of completion and hilight the currently selected completion """ self._sliding_interval.current = self._index[0] head = None foot = None if self._sliding_interval.start > 0 : head = '...' if self._slid...
def _update_list(self, hilight=True): """ update the list of completion and hilight the currently selected completion """ self._sliding_interval.current = self._index[0] head = None foot = None if self._sliding_interval.start > 0 : head = '...' if self._slid...
[ "update", "the", "list", "of", "completion", "and", "hilight", "the", "currently", "selected", "completion" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L324-L346
[ "def", "_update_list", "(", "self", ",", "hilight", "=", "True", ")", ":", "self", ".", "_sliding_interval", ".", "current", "=", "self", ".", "_index", "[", "0", "]", "head", "=", "None", "foot", "=", "None", "if", "self", ".", "_sliding_interval", "....
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionHtml._complete_current
Perform the completion with the currently selected item.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py
def _complete_current(self): """ Perform the completion with the currently selected item. """ i = self._index item = self._items[i[0]][i[1]] item = item.strip() if item : self._current_text_cursor().insertText(item) self.cancel_completion()
def _complete_current(self): """ Perform the completion with the currently selected item. """ i = self._index item = self._items[i[0]][i[1]] item = item.strip() if item : self._current_text_cursor().insertText(item) self.cancel_completion()
[ "Perform", "the", "completion", "with", "the", "currently", "selected", "item", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/completion_html.py#L352-L360
[ "def", "_complete_current", "(", "self", ")", ":", "i", "=", "self", ".", "_index", "item", "=", "self", ".", "_items", "[", "i", "[", "0", "]", "]", "[", "i", "[", "1", "]", "]", "item", "=", "item", ".", "strip", "(", ")", "if", "item", ":"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
wordfreq
Return a dictionary of words and word counts in a string.
environment/share/doc/ipython/examples/parallel/davinci/wordfreq.py
def wordfreq(text, is_filename=False): """Return a dictionary of words and word counts in a string.""" if is_filename: with open(text) as f: text = f.read() freqs = {} for word in text.split(): lword = word.lower() freqs[lword] = freqs.get(lword, 0) + 1 return fre...
def wordfreq(text, is_filename=False): """Return a dictionary of words and word counts in a string.""" if is_filename: with open(text) as f: text = f.read() freqs = {} for word in text.split(): lword = word.lower() freqs[lword] = freqs.get(lword, 0) + 1 return fre...
[ "Return", "a", "dictionary", "of", "words", "and", "word", "counts", "in", "a", "string", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/share/doc/ipython/examples/parallel/davinci/wordfreq.py#L9-L18
[ "def", "wordfreq", "(", "text", ",", "is_filename", "=", "False", ")", ":", "if", "is_filename", ":", "with", "open", "(", "text", ")", "as", "f", ":", "text", "=", "f", ".", "read", "(", ")", "freqs", "=", "{", "}", "for", "word", "in", "text", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
print_wordfreq
Print the n most common words and counts in the freqs dict.
environment/share/doc/ipython/examples/parallel/davinci/wordfreq.py
def print_wordfreq(freqs, n=10): """Print the n most common words and counts in the freqs dict.""" words, counts = freqs.keys(), freqs.values() items = zip(counts, words) items.sort(reverse=True) for (count, word) in items[:n]: print(word, count)
def print_wordfreq(freqs, n=10): """Print the n most common words and counts in the freqs dict.""" words, counts = freqs.keys(), freqs.values() items = zip(counts, words) items.sort(reverse=True) for (count, word) in items[:n]: print(word, count)
[ "Print", "the", "n", "most", "common", "words", "and", "counts", "in", "the", "freqs", "dict", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/share/doc/ipython/examples/parallel/davinci/wordfreq.py#L21-L28
[ "def", "print_wordfreq", "(", "freqs", ",", "n", "=", "10", ")", ":", "words", ",", "counts", "=", "freqs", ".", "keys", "(", ")", ",", "freqs", ".", "values", "(", ")", "items", "=", "zip", "(", "counts", ",", "words", ")", "items", ".", "sort",...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
WinHPCJob.tostring
Return the string representation of the job description XML.
environment/lib/python2.7/site-packages/IPython/parallel/apps/winhpcjob.py
def tostring(self): """Return the string representation of the job description XML.""" root = self.as_element() indent(root) txt = ET.tostring(root, encoding="utf-8") # Now remove the tokens used to order the attributes. txt = re.sub(r'_[A-Z]_','',txt) txt = '<?xm...
def tostring(self): """Return the string representation of the job description XML.""" root = self.as_element() indent(root) txt = ET.tostring(root, encoding="utf-8") # Now remove the tokens used to order the attributes. txt = re.sub(r'_[A-Z]_','',txt) txt = '<?xm...
[ "Return", "the", "string", "representation", "of", "the", "job", "description", "XML", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/winhpcjob.py#L144-L152
[ "def", "tostring", "(", "self", ")", ":", "root", "=", "self", ".", "as_element", "(", ")", "indent", "(", "root", ")", "txt", "=", "ET", ".", "tostring", "(", "root", ",", "encoding", "=", "\"utf-8\"", ")", "# Now remove the tokens used to order the attribu...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
WinHPCJob.write
Write the XML job description to a file.
environment/lib/python2.7/site-packages/IPython/parallel/apps/winhpcjob.py
def write(self, filename): """Write the XML job description to a file.""" txt = self.tostring() with open(filename, 'w') as f: f.write(txt)
def write(self, filename): """Write the XML job description to a file.""" txt = self.tostring() with open(filename, 'w') as f: f.write(txt)
[ "Write", "the", "XML", "job", "description", "to", "a", "file", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/winhpcjob.py#L154-L158
[ "def", "write", "(", "self", ",", "filename", ")", ":", "txt", "=", "self", ".", "tostring", "(", ")", "with", "open", "(", "filename", ",", "'w'", ")", "as", "f", ":", "f", ".", "write", "(", "txt", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
validate_pin
Validate the given pin against the schema. :param dict pin: The pin to validate: :raises pypebbleapi.schemas.DocumentError: If the pin is not valid.
pypebbleapi/timeline.py
def validate_pin(pin): """ Validate the given pin against the schema. :param dict pin: The pin to validate: :raises pypebbleapi.schemas.DocumentError: If the pin is not valid. """ v = _Validator(schemas.pin) if v.validate(pin): return else: raise schemas.DocumentError(errors...
def validate_pin(pin): """ Validate the given pin against the schema. :param dict pin: The pin to validate: :raises pypebbleapi.schemas.DocumentError: If the pin is not valid. """ v = _Validator(schemas.pin) if v.validate(pin): return else: raise schemas.DocumentError(errors...
[ "Validate", "the", "given", "pin", "against", "the", "schema", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L57-L67
[ "def", "validate_pin", "(", "pin", ")", ":", "v", "=", "_Validator", "(", "schemas", ".", "pin", ")", "if", "v", ".", "validate", "(", "pin", ")", ":", "return", "else", ":", "raise", "schemas", ".", "DocumentError", "(", "errors", "=", "v", ".", "...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.send_shared_pin
Send a shared pin for the given topics. :param list topics: The list of topics. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentError: If the validation process failed. :raises `requests.exceptions.HTTPEr...
pypebbleapi/timeline.py
def send_shared_pin(self, topics, pin, skip_validation=False): """ Send a shared pin for the given topics. :param list topics: The list of topics. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentE...
def send_shared_pin(self, topics, pin, skip_validation=False): """ Send a shared pin for the given topics. :param list topics: The list of topics. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentE...
[ "Send", "a", "shared", "pin", "for", "the", "given", "topics", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L95-L117
[ "def", "send_shared_pin", "(", "self", ",", "topics", ",", "pin", ",", "skip_validation", "=", "False", ")", ":", "if", "not", "self", ".", "api_key", ":", "raise", "ValueError", "(", "\"You need to specify an api_key.\"", ")", "if", "not", "skip_validation", ...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.delete_shared_pin
Delete a shared pin. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred.
pypebbleapi/timeline.py
def delete_shared_pin(self, pin_id): """ Delete a shared pin. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ if not self.api_key: raise ValueError("You need to specify an api_key.") ...
def delete_shared_pin(self, pin_id): """ Delete a shared pin. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ if not self.api_key: raise ValueError("You need to specify an api_key.") ...
[ "Delete", "a", "shared", "pin", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L119-L134
[ "def", "delete_shared_pin", "(", "self", ",", "pin_id", ")", ":", "if", "not", "self", ".", "api_key", ":", "raise", "ValueError", "(", "\"You need to specify an api_key.\"", ")", "response", "=", "_request", "(", "'DELETE'", ",", "url", "=", "self", ".", "u...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.send_user_pin
Send a user pin. :param str user_token: The token of the user. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentError: If the validation process failed. :raises `requests.exceptions.HTTPError`: If an HTTP ...
pypebbleapi/timeline.py
def send_user_pin(self, user_token, pin, skip_validation=False): """ Send a user pin. :param str user_token: The token of the user. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentError: If the va...
def send_user_pin(self, user_token, pin, skip_validation=False): """ Send a user pin. :param str user_token: The token of the user. :param dict pin: The pin. :param bool skip_validation: Whether to skip the validation. :raises pypebbleapi.schemas.DocumentError: If the va...
[ "Send", "a", "user", "pin", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L136-L155
[ "def", "send_user_pin", "(", "self", ",", "user_token", ",", "pin", ",", "skip_validation", "=", "False", ")", ":", "if", "not", "skip_validation", ":", "validate_pin", "(", "pin", ")", "response", "=", "_request", "(", "'PUT'", ",", "url", "=", "self", ...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.delete_user_pin
Delete a user pin. :param str user_token: The token of the user. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred.
pypebbleapi/timeline.py
def delete_user_pin(self, user_token, pin_id): """ Delete a user pin. :param str user_token: The token of the user. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ response = _request('DELET...
def delete_user_pin(self, user_token, pin_id): """ Delete a user pin. :param str user_token: The token of the user. :param str pin_id: The id of the pin to delete. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ response = _request('DELET...
[ "Delete", "a", "user", "pin", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L157-L171
[ "def", "delete_user_pin", "(", "self", ",", "user_token", ",", "pin_id", ")", ":", "response", "=", "_request", "(", "'DELETE'", ",", "url", "=", "self", ".", "url_v1", "(", "'/user/pins/'", "+", "pin_id", ")", ",", "user_agent", "=", "self", ".", "user_...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.subscribe
Subscribe a user to the given topic. :param str user_token: The token of the user. :param str topic: The topic. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred.
pypebbleapi/timeline.py
def subscribe(self, user_token, topic): """ Subscribe a user to the given topic. :param str user_token: The token of the user. :param str topic: The topic. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ response = _request('POST', ...
def subscribe(self, user_token, topic): """ Subscribe a user to the given topic. :param str user_token: The token of the user. :param str topic: The topic. :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. """ response = _request('POST', ...
[ "Subscribe", "a", "user", "to", "the", "given", "topic", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L173-L186
[ "def", "subscribe", "(", "self", ",", "user_token", ",", "topic", ")", ":", "response", "=", "_request", "(", "'POST'", ",", "url", "=", "self", ".", "url_v1", "(", "'/user/subscriptions/'", "+", "topic", ")", ",", "user_agent", "=", "self", ".", "user_a...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
Timeline.list_subscriptions
Get the list of the topics which a user is subscribed to. :param str user_token: The token of the user. :return: The list of the topics. :rtype: list :raises `requests.exceptions.HTTPError`: If an HTTP error occurred.
pypebbleapi/timeline.py
def list_subscriptions(self, user_token): """ Get the list of the topics which a user is subscribed to. :param str user_token: The token of the user. :return: The list of the topics. :rtype: list :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. ...
def list_subscriptions(self, user_token): """ Get the list of the topics which a user is subscribed to. :param str user_token: The token of the user. :return: The list of the topics. :rtype: list :raises `requests.exceptions.HTTPError`: If an HTTP error occurred. ...
[ "Get", "the", "list", "of", "the", "topics", "which", "a", "user", "is", "subscribed", "to", "." ]
youtux/pypebbleapi
python
https://github.com/youtux/pypebbleapi/blob/fe7b49da9c30e4a359cc6245a416862ccb3aa589/pypebbleapi/timeline.py#L203-L219
[ "def", "list_subscriptions", "(", "self", ",", "user_token", ")", ":", "response", "=", "_request", "(", "'GET'", ",", "url", "=", "self", ".", "url_v1", "(", "'/user/subscriptions'", ")", ",", "user_agent", "=", "self", ".", "user_agent", ",", "user_token",...
fe7b49da9c30e4a359cc6245a416862ccb3aa589
test
monitored
Decorate a function to automatically begin and end a task on the progressmonitor. The function must have a parameter called 'monitor'
progressmonitor/__init__.py
def monitored(total: int, name=None, message=None): """ Decorate a function to automatically begin and end a task on the progressmonitor. The function must have a parameter called 'monitor' """ def decorator(f): nonlocal name monitor_index = list(inspect.signature(f).parameters.keys(...
def monitored(total: int, name=None, message=None): """ Decorate a function to automatically begin and end a task on the progressmonitor. The function must have a parameter called 'monitor' """ def decorator(f): nonlocal name monitor_index = list(inspect.signature(f).parameters.keys(...
[ "Decorate", "a", "function", "to", "automatically", "begin", "and", "end", "a", "task", "on", "the", "progressmonitor", ".", "The", "function", "must", "have", "a", "parameter", "called", "monitor" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L10-L31
[ "def", "monitored", "(", "total", ":", "int", ",", "name", "=", "None", ",", "message", "=", "None", ")", ":", "def", "decorator", "(", "f", ")", ":", "nonlocal", "name", "monitor_index", "=", "list", "(", "inspect", ".", "signature", "(", "f", ")", ...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.begin
Call before starting work on a monitor, specifying name and amount of work
progressmonitor/__init__.py
def begin(self, total: int, name=None, message=None): """Call before starting work on a monitor, specifying name and amount of work""" self.total = total message = message or name or "Working..." self.name = name or "ProgressMonitor" self.update(0, message)
def begin(self, total: int, name=None, message=None): """Call before starting work on a monitor, specifying name and amount of work""" self.total = total message = message or name or "Working..." self.name = name or "ProgressMonitor" self.update(0, message)
[ "Call", "before", "starting", "work", "on", "a", "monitor", "specifying", "name", "and", "amount", "of", "work" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L72-L77
[ "def", "begin", "(", "self", ",", "total", ":", "int", ",", "name", "=", "None", ",", "message", "=", "None", ")", ":", "self", ".", "total", "=", "total", "message", "=", "message", "or", "name", "or", "\"Working...\"", "self", ".", "name", "=", "...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.task
Wrap code into a begin and end call on this monitor
progressmonitor/__init__.py
def task(self, total: int, name=None, message=None): """Wrap code into a begin and end call on this monitor""" self.begin(total, name, message) try: yield self finally: self.done()
def task(self, total: int, name=None, message=None): """Wrap code into a begin and end call on this monitor""" self.begin(total, name, message) try: yield self finally: self.done()
[ "Wrap", "code", "into", "a", "begin", "and", "end", "call", "on", "this", "monitor" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L80-L86
[ "def", "task", "(", "self", ",", "total", ":", "int", ",", "name", "=", "None", ",", "message", "=", "None", ")", ":", "self", ".", "begin", "(", "total", ",", "name", ",", "message", ")", "try", ":", "yield", "self", "finally", ":", "self", ".",...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.subtask
Create a submonitor with the given units
progressmonitor/__init__.py
def subtask(self, units: int): """Create a submonitor with the given units""" sm = self.submonitor(units) try: yield sm finally: if sm.total is None: # begin was never called, so the subtask cannot be closed self.update(units) ...
def subtask(self, units: int): """Create a submonitor with the given units""" sm = self.submonitor(units) try: yield sm finally: if sm.total is None: # begin was never called, so the subtask cannot be closed self.update(units) ...
[ "Create", "a", "submonitor", "with", "the", "given", "units" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L89-L99
[ "def", "subtask", "(", "self", ",", "units", ":", "int", ")", ":", "sm", "=", "self", ".", "submonitor", "(", "units", ")", "try", ":", "yield", "sm", "finally", ":", "if", "sm", ".", "total", "is", "None", ":", "# begin was never called, so the subtask ...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.progress
What percentage (range 0-1) of work is done (including submonitors)
progressmonitor/__init__.py
def progress(self)-> float: """What percentage (range 0-1) of work is done (including submonitors)""" if self.total is None: return 0 my_progress = self.worked my_progress += sum(s.progress * weight for (s, weight) in self.sub_monitors.items()) ...
def progress(self)-> float: """What percentage (range 0-1) of work is done (including submonitors)""" if self.total is None: return 0 my_progress = self.worked my_progress += sum(s.progress * weight for (s, weight) in self.sub_monitors.items()) ...
[ "What", "percentage", "(", "range", "0", "-", "1", ")", "of", "work", "is", "done", "(", "including", "submonitors", ")" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L102-L109
[ "def", "progress", "(", "self", ")", "->", "float", ":", "if", "self", ".", "total", "is", "None", ":", "return", "0", "my_progress", "=", "self", ".", "worked", "my_progress", "+=", "sum", "(", "s", ".", "progress", "*", "weight", "for", "(", "s", ...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.update
Increment the monitor with N units worked and an optional message
progressmonitor/__init__.py
def update(self, units: int=1, message: str=None): """Increment the monitor with N units worked and an optional message""" if self.total is None: raise Exception("Cannot call progressmonitor.update before calling begin") self.worked = min(self.total, self.worked+units) if mes...
def update(self, units: int=1, message: str=None): """Increment the monitor with N units worked and an optional message""" if self.total is None: raise Exception("Cannot call progressmonitor.update before calling begin") self.worked = min(self.total, self.worked+units) if mes...
[ "Increment", "the", "monitor", "with", "N", "units", "worked", "and", "an", "optional", "message" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L111-L119
[ "def", "update", "(", "self", ",", "units", ":", "int", "=", "1", ",", "message", ":", "str", "=", "None", ")", ":", "if", "self", ".", "total", "is", "None", ":", "raise", "Exception", "(", "\"Cannot call progressmonitor.update before calling begin\"", ")",...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.submonitor
Create a sub monitor that stands for N units of work in this monitor The sub task should call .begin (or use @monitored / with .task) before calling updates
progressmonitor/__init__.py
def submonitor(self, units: int, *args, **kargs) -> 'ProgressMonitor': """ Create a sub monitor that stands for N units of work in this monitor The sub task should call .begin (or use @monitored / with .task) before calling updates """ submonitor = ProgressMonitor(*args, **kargs)...
def submonitor(self, units: int, *args, **kargs) -> 'ProgressMonitor': """ Create a sub monitor that stands for N units of work in this monitor The sub task should call .begin (or use @monitored / with .task) before calling updates """ submonitor = ProgressMonitor(*args, **kargs)...
[ "Create", "a", "sub", "monitor", "that", "stands", "for", "N", "units", "of", "work", "in", "this", "monitor", "The", "sub", "task", "should", "call", ".", "begin", "(", "or", "use" ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L129-L137
[ "def", "submonitor", "(", "self", ",", "units", ":", "int", ",", "*", "args", ",", "*", "*", "kargs", ")", "->", "'ProgressMonitor'", ":", "submonitor", "=", "ProgressMonitor", "(", "*", "args", ",", "*", "*", "kargs", ")", "self", ".", "sub_monitors",...
d4cabebc95bfd1447120f601c094b20bee954285
test
ProgressMonitor.done
Signal that this task is done. This is completely optional and will just call .update with the remaining work.
progressmonitor/__init__.py
def done(self, message: str=None): """ Signal that this task is done. This is completely optional and will just call .update with the remaining work. """ if message is None: message = "{self.name} done".format(**locals()) if self.name else "Done" self.update(u...
def done(self, message: str=None): """ Signal that this task is done. This is completely optional and will just call .update with the remaining work. """ if message is None: message = "{self.name} done".format(**locals()) if self.name else "Done" self.update(u...
[ "Signal", "that", "this", "task", "is", "done", ".", "This", "is", "completely", "optional", "and", "will", "just", "call", ".", "update", "with", "the", "remaining", "work", "." ]
amcat/progressmonitor
python
https://github.com/amcat/progressmonitor/blob/d4cabebc95bfd1447120f601c094b20bee954285/progressmonitor/__init__.py#L142-L149
[ "def", "done", "(", "self", ",", "message", ":", "str", "=", "None", ")", ":", "if", "message", "is", "None", ":", "message", "=", "\"{self.name} done\"", ".", "format", "(", "*", "*", "locals", "(", ")", ")", "if", "self", ".", "name", "else", "\"...
d4cabebc95bfd1447120f601c094b20bee954285
test
page
Print a string, piping through a pager. This version ignores the screen_lines and pager_cmd arguments and uses IPython's payload system instead. Parameters ---------- strng : str Text to page. start : int Starting line at which to place the display. html : str, optional ...
environment/lib/python2.7/site-packages/IPython/core/payloadpage.py
def page(strng, start=0, screen_lines=0, pager_cmd=None, html=None, auto_html=False): """Print a string, piping through a pager. This version ignores the screen_lines and pager_cmd arguments and uses IPython's payload system instead. Parameters ---------- strng : str Text to pag...
def page(strng, start=0, screen_lines=0, pager_cmd=None, html=None, auto_html=False): """Print a string, piping through a pager. This version ignores the screen_lines and pager_cmd arguments and uses IPython's payload system instead. Parameters ---------- strng : str Text to pag...
[ "Print", "a", "string", "piping", "through", "a", "pager", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/core/payloadpage.py#L37-L90
[ "def", "page", "(", "strng", ",", "start", "=", "0", ",", "screen_lines", "=", "0", ",", "pager_cmd", "=", "None", ",", "html", "=", "None", ",", "auto_html", "=", "False", ")", ":", "# Some routines may auto-compute start offsets incorrectly and pass a", "# neg...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
InstallRequirement.from_line
Creates an InstallRequirement from a name, which might be a requirement, directory containing 'setup.py', filename, or URL.
virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py
def from_line(cls, name, comes_from=None, isolated=False): """Creates an InstallRequirement from a name, which might be a requirement, directory containing 'setup.py', filename, or URL. """ from pip.index import Link url = None if is_url(name): marker_sep = '...
def from_line(cls, name, comes_from=None, isolated=False): """Creates an InstallRequirement from a name, which might be a requirement, directory containing 'setup.py', filename, or URL. """ from pip.index import Link url = None if is_url(name): marker_sep = '...
[ "Creates", "an", "InstallRequirement", "from", "a", "name", "which", "might", "be", "a", "requirement", "directory", "containing", "setup", ".", "py", "filename", "or", "URL", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py#L112-L181
[ "def", "from_line", "(", "cls", ",", "name", ",", "comes_from", "=", "None", ",", "isolated", "=", "False", ")", ":", "from", "pip", ".", "index", "import", "Link", "url", "=", "None", "if", "is_url", "(", "name", ")", ":", "marker_sep", "=", "'; '",...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
InstallRequirement.correct_build_location
If the build location was a temporary directory, this will move it to a new more permanent location
virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py
def correct_build_location(self): """If the build location was a temporary directory, this will move it to a new more permanent location""" if self.source_dir is not None: return assert self.req is not None assert self._temp_build_dir old_location = self._temp...
def correct_build_location(self): """If the build location was a temporary directory, this will move it to a new more permanent location""" if self.source_dir is not None: return assert self.req is not None assert self._temp_build_dir old_location = self._temp...
[ "If", "the", "build", "location", "was", "a", "temporary", "directory", "this", "will", "move", "it", "to", "a", "new", "more", "permanent", "location" ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py#L235-L264
[ "def", "correct_build_location", "(", "self", ")", ":", "if", "self", ".", "source_dir", "is", "not", "None", ":", "return", "assert", "self", ".", "req", "is", "not", "None", "assert", "self", ".", "_temp_build_dir", "old_location", "=", "self", ".", "_te...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
InstallRequirement.uninstall
Uninstall the distribution currently satisfying this requirement. Prompts before removing or modifying files unless ``auto_confirm`` is True. Refuses to delete or modify files outside of ``sys.prefix`` - thus uninstallation within a virtual environment can only modify that virt...
virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py
def uninstall(self, auto_confirm=False): """ Uninstall the distribution currently satisfying this requirement. Prompts before removing or modifying files unless ``auto_confirm`` is True. Refuses to delete or modify files outside of ``sys.prefix`` - thus uninstallation w...
def uninstall(self, auto_confirm=False): """ Uninstall the distribution currently satisfying this requirement. Prompts before removing or modifying files unless ``auto_confirm`` is True. Refuses to delete or modify files outside of ``sys.prefix`` - thus uninstallation w...
[ "Uninstall", "the", "distribution", "currently", "satisfying", "this", "requirement", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/pip/req/req_install.py#L542-L668
[ "def", "uninstall", "(", "self", ",", "auto_confirm", "=", "False", ")", ":", "if", "not", "self", ".", "check_if_exists", "(", ")", ":", "raise", "UninstallationError", "(", "\"Cannot uninstall requirement %s, not installed\"", "%", "(", "self", ".", "name", ",...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
load_pyconfig_files
Load multiple Python config files, merging each of them in turn. Parameters ========== config_files : list of str List of config files names to load and merge into the config. path : unicode The full path to the location of the config files.
environment/lib/python2.7/site-packages/IPython/config/loader.py
def load_pyconfig_files(config_files, path): """Load multiple Python config files, merging each of them in turn. Parameters ========== config_files : list of str List of config files names to load and merge into the config. path : unicode The full path to the location of the config ...
def load_pyconfig_files(config_files, path): """Load multiple Python config files, merging each of them in turn. Parameters ========== config_files : list of str List of config files names to load and merge into the config. path : unicode The full path to the location of the config ...
[ "Load", "multiple", "Python", "config", "files", "merging", "each", "of", "them", "in", "turn", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L675-L696
[ "def", "load_pyconfig_files", "(", "config_files", ",", "path", ")", ":", "config", "=", "Config", "(", ")", "for", "cf", "in", "config_files", ":", "loader", "=", "PyFileConfigLoader", "(", "cf", ",", "path", "=", "path", ")", "try", ":", "next_config", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
PyFileConfigLoader.load_config
Load the config from a file and return it as a Struct.
environment/lib/python2.7/site-packages/IPython/config/loader.py
def load_config(self): """Load the config from a file and return it as a Struct.""" self.clear() try: self._find_file() except IOError as e: raise ConfigFileNotFound(str(e)) self._read_file_as_dict() self._convert_to_config() return self.co...
def load_config(self): """Load the config from a file and return it as a Struct.""" self.clear() try: self._find_file() except IOError as e: raise ConfigFileNotFound(str(e)) self._read_file_as_dict() self._convert_to_config() return self.co...
[ "Load", "the", "config", "from", "a", "file", "and", "return", "it", "as", "a", "Struct", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L262-L271
[ "def", "load_config", "(", "self", ")", ":", "self", ".", "clear", "(", ")", "try", ":", "self", ".", "_find_file", "(", ")", "except", "IOError", "as", "e", ":", "raise", "ConfigFileNotFound", "(", "str", "(", "e", ")", ")", "self", ".", "_read_file...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
PyFileConfigLoader._read_file_as_dict
Load the config file into self.config, with recursive loading.
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _read_file_as_dict(self): """Load the config file into self.config, with recursive loading.""" # This closure is made available in the namespace that is used # to exec the config file. It allows users to call # load_subconfig('myconfig.py') to load config files recursively. ...
def _read_file_as_dict(self): """Load the config file into self.config, with recursive loading.""" # This closure is made available in the namespace that is used # to exec the config file. It allows users to call # load_subconfig('myconfig.py') to load config files recursively. ...
[ "Load", "the", "config", "file", "into", "self", ".", "config", "with", "recursive", "loading", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L277-L322
[ "def", "_read_file_as_dict", "(", "self", ")", ":", "# This closure is made available in the namespace that is used", "# to exec the config file. It allows users to call", "# load_subconfig('myconfig.py') to load config files recursively.", "# It needs to be a closure because it has references to...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CommandLineConfigLoader._exec_config_str
execute self.config.<lhs> = <rhs> * expands ~ with expanduser * tries to assign with raw eval, otherwise assigns with just the string, allowing `--C.a=foobar` and `--C.a="foobar"` to be equivalent. *Not* equivalent are `--C.a=4` and `--C.a='4'`.
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _exec_config_str(self, lhs, rhs): """execute self.config.<lhs> = <rhs> * expands ~ with expanduser * tries to assign with raw eval, otherwise assigns with just the string, allowing `--C.a=foobar` and `--C.a="foobar"` to be equivalent. *Not* equivalent are `--C.a...
def _exec_config_str(self, lhs, rhs): """execute self.config.<lhs> = <rhs> * expands ~ with expanduser * tries to assign with raw eval, otherwise assigns with just the string, allowing `--C.a=foobar` and `--C.a="foobar"` to be equivalent. *Not* equivalent are `--C.a...
[ "execute", "self", ".", "config", ".", "<lhs", ">", "=", "<rhs", ">", "*", "expands", "~", "with", "expanduser", "*", "tries", "to", "assign", "with", "raw", "eval", "otherwise", "assigns", "with", "just", "the", "string", "allowing", "--", "C", ".", "...
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L336-L354
[ "def", "_exec_config_str", "(", "self", ",", "lhs", ",", "rhs", ")", ":", "rhs", "=", "os", ".", "path", ".", "expanduser", "(", "rhs", ")", "try", ":", "# Try to see if regular Python syntax will work. This", "# won't handle strings as the quote marks are removed", "...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CommandLineConfigLoader._load_flag
update self.config from a flag, which can be a dict or Config
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _load_flag(self, cfg): """update self.config from a flag, which can be a dict or Config""" if isinstance(cfg, (dict, Config)): # don't clobber whole config sections, update # each section from config: for sec,c in cfg.iteritems(): self.config[sec]....
def _load_flag(self, cfg): """update self.config from a flag, which can be a dict or Config""" if isinstance(cfg, (dict, Config)): # don't clobber whole config sections, update # each section from config: for sec,c in cfg.iteritems(): self.config[sec]....
[ "update", "self", ".", "config", "from", "a", "flag", "which", "can", "be", "a", "dict", "or", "Config" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L356-L364
[ "def", "_load_flag", "(", "self", ",", "cfg", ")", ":", "if", "isinstance", "(", "cfg", ",", "(", "dict", ",", "Config", ")", ")", ":", "# don't clobber whole config sections, update", "# each section from config:", "for", "sec", ",", "c", "in", "cfg", ".", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
KeyValueConfigLoader._decode_argv
decode argv if bytes, using stin.encoding, falling back on default enc
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _decode_argv(self, argv, enc=None): """decode argv if bytes, using stin.encoding, falling back on default enc""" uargv = [] if enc is None: enc = DEFAULT_ENCODING for arg in argv: if not isinstance(arg, unicode): # only decode if not already de...
def _decode_argv(self, argv, enc=None): """decode argv if bytes, using stin.encoding, falling back on default enc""" uargv = [] if enc is None: enc = DEFAULT_ENCODING for arg in argv: if not isinstance(arg, unicode): # only decode if not already de...
[ "decode", "argv", "if", "bytes", "using", "stin", ".", "encoding", "falling", "back", "on", "default", "enc" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L437-L447
[ "def", "_decode_argv", "(", "self", ",", "argv", ",", "enc", "=", "None", ")", ":", "uargv", "=", "[", "]", "if", "enc", "is", "None", ":", "enc", "=", "DEFAULT_ENCODING", "for", "arg", "in", "argv", ":", "if", "not", "isinstance", "(", "arg", ",",...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
KeyValueConfigLoader.load_config
Parse the configuration and generate the Config object. After loading, any arguments that are not key-value or flags will be stored in self.extra_args - a list of unparsed command-line arguments. This is used for arguments such as input files or subcommands. Parameters ...
environment/lib/python2.7/site-packages/IPython/config/loader.py
def load_config(self, argv=None, aliases=None, flags=None): """Parse the configuration and generate the Config object. After loading, any arguments that are not key-value or flags will be stored in self.extra_args - a list of unparsed command-line arguments. This is used for ar...
def load_config(self, argv=None, aliases=None, flags=None): """Parse the configuration and generate the Config object. After loading, any arguments that are not key-value or flags will be stored in self.extra_args - a list of unparsed command-line arguments. This is used for ar...
[ "Parse", "the", "configuration", "and", "generate", "the", "Config", "object", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L450-L525
[ "def", "load_config", "(", "self", ",", "argv", "=", "None", ",", "aliases", "=", "None", ",", "flags", "=", "None", ")", ":", "from", "IPython", ".", "config", ".", "configurable", "import", "Configurable", "self", ".", "clear", "(", ")", "if", "argv"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ArgParseConfigLoader.load_config
Parse command line arguments and return as a Config object. Parameters ---------- args : optional, list If given, a list with the structure of sys.argv[1:] to parse arguments from. If not given, the instance's self.argv attribute (given at construction time) is us...
environment/lib/python2.7/site-packages/IPython/config/loader.py
def load_config(self, argv=None, aliases=None, flags=None): """Parse command line arguments and return as a Config object. Parameters ---------- args : optional, list If given, a list with the structure of sys.argv[1:] to parse arguments from. If not given, the inst...
def load_config(self, argv=None, aliases=None, flags=None): """Parse command line arguments and return as a Config object. Parameters ---------- args : optional, list If given, a list with the structure of sys.argv[1:] to parse arguments from. If not given, the inst...
[ "Parse", "command", "line", "arguments", "and", "return", "as", "a", "Config", "object", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L567-L587
[ "def", "load_config", "(", "self", ",", "argv", "=", "None", ",", "aliases", "=", "None", ",", "flags", "=", "None", ")", ":", "self", ".", "clear", "(", ")", "if", "argv", "is", "None", ":", "argv", "=", "self", ".", "argv", "if", "aliases", "is...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ArgParseConfigLoader._parse_args
self.parser->self.parsed_data
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _parse_args(self, args): """self.parser->self.parsed_data""" # decode sys.argv to support unicode command-line options enc = DEFAULT_ENCODING uargs = [py3compat.cast_unicode(a, enc) for a in args] self.parsed_data, self.extra_args = self.parser.parse_known_args(uargs)
def _parse_args(self, args): """self.parser->self.parsed_data""" # decode sys.argv to support unicode command-line options enc = DEFAULT_ENCODING uargs = [py3compat.cast_unicode(a, enc) for a in args] self.parsed_data, self.extra_args = self.parser.parse_known_args(uargs)
[ "self", ".", "parser", "-", ">", "self", ".", "parsed_data" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L602-L607
[ "def", "_parse_args", "(", "self", ",", "args", ")", ":", "# decode sys.argv to support unicode command-line options", "enc", "=", "DEFAULT_ENCODING", "uargs", "=", "[", "py3compat", ".", "cast_unicode", "(", "a", ",", "enc", ")", "for", "a", "in", "args", "]", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ArgParseConfigLoader._convert_to_config
self.parsed_data->self.config
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _convert_to_config(self): """self.parsed_data->self.config""" for k, v in vars(self.parsed_data).iteritems(): exec "self.config.%s = v"%k in locals(), globals()
def _convert_to_config(self): """self.parsed_data->self.config""" for k, v in vars(self.parsed_data).iteritems(): exec "self.config.%s = v"%k in locals(), globals()
[ "self", ".", "parsed_data", "-", ">", "self", ".", "config" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L609-L612
[ "def", "_convert_to_config", "(", "self", ")", ":", "for", "k", ",", "v", "in", "vars", "(", "self", ".", "parsed_data", ")", ".", "iteritems", "(", ")", ":", "exec", "\"self.config.%s = v\"", "%", "k", "in", "locals", "(", ")", ",", "globals", "(", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
KVArgParseConfigLoader._convert_to_config
self.parsed_data->self.config, parse unrecognized extra args via KVLoader.
environment/lib/python2.7/site-packages/IPython/config/loader.py
def _convert_to_config(self): """self.parsed_data->self.config, parse unrecognized extra args via KVLoader.""" # remove subconfigs list from namespace before transforming the Namespace if '_flags' in self.parsed_data: subcs = self.parsed_data._flags del self.parsed_data._...
def _convert_to_config(self): """self.parsed_data->self.config, parse unrecognized extra args via KVLoader.""" # remove subconfigs list from namespace before transforming the Namespace if '_flags' in self.parsed_data: subcs = self.parsed_data._flags del self.parsed_data._...
[ "self", ".", "parsed_data", "-", ">", "self", ".", "config", "parse", "unrecognized", "extra", "args", "via", "KVLoader", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/config/loader.py#L648-L672
[ "def", "_convert_to_config", "(", "self", ")", ":", "# remove subconfigs list from namespace before transforming the Namespace", "if", "'_flags'", "in", "self", ".", "parsed_data", ":", "subcs", "=", "self", ".", "parsed_data", ".", "_flags", "del", "self", ".", "pars...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
find_module
imp.find_module variant that only return path of module. The `imp.find_module` returns a filehandle that we are not interested in. Also we ignore any bytecode files that `imp.find_module` finds. Parameters ---------- name : str name of module to locate path : list of str li...
environment/lib/python2.7/site-packages/IPython/utils/module_paths.py
def find_module(name, path=None): """imp.find_module variant that only return path of module. The `imp.find_module` returns a filehandle that we are not interested in. Also we ignore any bytecode files that `imp.find_module` finds. Parameters ---------- name : str name of module to...
def find_module(name, path=None): """imp.find_module variant that only return path of module. The `imp.find_module` returns a filehandle that we are not interested in. Also we ignore any bytecode files that `imp.find_module` finds. Parameters ---------- name : str name of module to...
[ "imp", ".", "find_module", "variant", "that", "only", "return", "path", "of", "module", ".", "The", "imp", ".", "find_module", "returns", "a", "filehandle", "that", "we", "are", "not", "interested", "in", ".", "Also", "we", "ignore", "any", "bytecode", "fi...
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/utils/module_paths.py#L48-L80
[ "def", "find_module", "(", "name", ",", "path", "=", "None", ")", ":", "if", "name", "is", "None", ":", "return", "None", "try", ":", "file", ",", "filename", ",", "_", "=", "imp", ".", "find_module", "(", "name", ",", "path", ")", "except", "Impor...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
get_init
Get __init__ file path for module directory Parameters ---------- dirname : str Find the __init__ file in directory `dirname` Returns ------- init_path : str Path to __init__ file
environment/lib/python2.7/site-packages/IPython/utils/module_paths.py
def get_init(dirname): """Get __init__ file path for module directory Parameters ---------- dirname : str Find the __init__ file in directory `dirname` Returns ------- init_path : str Path to __init__ file """ fbase = os.path.join(dirname, "__init__") for e...
def get_init(dirname): """Get __init__ file path for module directory Parameters ---------- dirname : str Find the __init__ file in directory `dirname` Returns ------- init_path : str Path to __init__ file """ fbase = os.path.join(dirname, "__init__") for e...
[ "Get", "__init__", "file", "path", "for", "module", "directory", "Parameters", "----------", "dirname", ":", "str", "Find", "the", "__init__", "file", "in", "directory", "dirname" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/utils/module_paths.py#L82-L99
[ "def", "get_init", "(", "dirname", ")", ":", "fbase", "=", "os", ".", "path", ".", "join", "(", "dirname", ",", "\"__init__\"", ")", "for", "ext", "in", "[", "\".py\"", ",", "\".pyw\"", "]", ":", "fname", "=", "fbase", "+", "ext", "if", "os", ".", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
find_mod
Find module `module_name` on sys.path Return the path to module `module_name`. If `module_name` refers to a module directory then return path to __init__ file. Return full path of module or None if module is missing or does not have .py or .pyw extension. We are not interested in running bytecode....
environment/lib/python2.7/site-packages/IPython/utils/module_paths.py
def find_mod(module_name): """Find module `module_name` on sys.path Return the path to module `module_name`. If `module_name` refers to a module directory then return path to __init__ file. Return full path of module or None if module is missing or does not have .py or .pyw extension. We are n...
def find_mod(module_name): """Find module `module_name` on sys.path Return the path to module `module_name`. If `module_name` refers to a module directory then return path to __init__ file. Return full path of module or None if module is missing or does not have .py or .pyw extension. We are n...
[ "Find", "module", "module_name", "on", "sys", ".", "path", "Return", "the", "path", "to", "module", "module_name", ".", "If", "module_name", "refers", "to", "a", "module", "directory", "then", "return", "path", "to", "__init__", "file", ".", "Return", "full"...
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/utils/module_paths.py#L102-L125
[ "def", "find_mod", "(", "module_name", ")", ":", "parts", "=", "module_name", ".", "split", "(", "\".\"", ")", "basepath", "=", "find_module", "(", "parts", "[", "0", "]", ")", "for", "submodname", "in", "parts", "[", "1", ":", "]", ":", "basepath", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BaseLauncher.on_stop
Register a callback to be called with this Launcher's stop_data when the process actually finishes.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def on_stop(self, f): """Register a callback to be called with this Launcher's stop_data when the process actually finishes. """ if self.state=='after': return f(self.stop_data) else: self.stop_callbacks.append(f)
def on_stop(self, f): """Register a callback to be called with this Launcher's stop_data when the process actually finishes. """ if self.state=='after': return f(self.stop_data) else: self.stop_callbacks.append(f)
[ "Register", "a", "callback", "to", "be", "called", "with", "this", "Launcher", "s", "stop_data", "when", "the", "process", "actually", "finishes", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L169-L176
[ "def", "on_stop", "(", "self", ",", "f", ")", ":", "if", "self", ".", "state", "==", "'after'", ":", "return", "f", "(", "self", ".", "stop_data", ")", "else", ":", "self", ".", "stop_callbacks", ".", "append", "(", "f", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BaseLauncher.notify_start
Call this to trigger startup actions. This logs the process startup and sets the state to 'running'. It is a pass-through so it can be used as a callback.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def notify_start(self, data): """Call this to trigger startup actions. This logs the process startup and sets the state to 'running'. It is a pass-through so it can be used as a callback. """ self.log.debug('Process %r started: %r', self.args[0], data) self.start_data ...
def notify_start(self, data): """Call this to trigger startup actions. This logs the process startup and sets the state to 'running'. It is a pass-through so it can be used as a callback. """ self.log.debug('Process %r started: %r', self.args[0], data) self.start_data ...
[ "Call", "this", "to", "trigger", "startup", "actions", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L178-L188
[ "def", "notify_start", "(", "self", ",", "data", ")", ":", "self", ".", "log", ".", "debug", "(", "'Process %r started: %r'", ",", "self", ".", "args", "[", "0", "]", ",", "data", ")", "self", ".", "start_data", "=", "data", "self", ".", "state", "="...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BaseLauncher.notify_stop
Call this to trigger process stop actions. This logs the process stopping and sets the state to 'after'. Call this to trigger callbacks registered via :meth:`on_stop`.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def notify_stop(self, data): """Call this to trigger process stop actions. This logs the process stopping and sets the state to 'after'. Call this to trigger callbacks registered via :meth:`on_stop`.""" self.log.debug('Process %r stopped: %r', self.args[0], data) self.stop_data...
def notify_stop(self, data): """Call this to trigger process stop actions. This logs the process stopping and sets the state to 'after'. Call this to trigger callbacks registered via :meth:`on_stop`.""" self.log.debug('Process %r stopped: %r', self.args[0], data) self.stop_data...
[ "Call", "this", "to", "trigger", "process", "stop", "actions", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L190-L202
[ "def", "notify_stop", "(", "self", ",", "data", ")", ":", "self", ".", "log", ".", "debug", "(", "'Process %r stopped: %r'", ",", "self", ".", "args", "[", "0", "]", ",", "data", ")", "self", ".", "stop_data", "=", "data", "self", ".", "state", "=", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
LocalProcessLauncher.interrupt_then_kill
Send INT, wait a delay and then send KILL.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def interrupt_then_kill(self, delay=2.0): """Send INT, wait a delay and then send KILL.""" try: self.signal(SIGINT) except Exception: self.log.debug("interrupt failed") pass self.killer = ioloop.DelayedCallback(lambda : self.signal(SIGKILL), delay*100...
def interrupt_then_kill(self, delay=2.0): """Send INT, wait a delay and then send KILL.""" try: self.signal(SIGINT) except Exception: self.log.debug("interrupt failed") pass self.killer = ioloop.DelayedCallback(lambda : self.signal(SIGKILL), delay*100...
[ "Send", "INT", "wait", "a", "delay", "and", "then", "send", "KILL", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L300-L308
[ "def", "interrupt_then_kill", "(", "self", ",", "delay", "=", "2.0", ")", ":", "try", ":", "self", ".", "signal", "(", "SIGINT", ")", "except", "Exception", ":", "self", ".", "log", ".", "debug", "(", "\"interrupt failed\"", ")", "pass", "self", ".", "...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
LocalEngineSetLauncher.start
Start n engines by profile or profile_dir.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n engines by profile or profile_dir.""" dlist = [] for i in range(n): if i > 0: time.sleep(self.delay) el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log, profi...
def start(self, n): """Start n engines by profile or profile_dir.""" dlist = [] for i in range(n): if i > 0: time.sleep(self.delay) el = self.launcher_class(work_dir=self.work_dir, config=self.config, log=self.log, profi...
[ "Start", "n", "engines", "by", "profile", "or", "profile_dir", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L382-L400
[ "def", "start", "(", "self", ",", "n", ")", ":", "dlist", "=", "[", "]", "for", "i", "in", "range", "(", "n", ")", ":", "if", "i", ">", "0", ":", "time", ".", "sleep", "(", "self", ".", "delay", ")", "el", "=", "self", ".", "launcher_class", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
MPILauncher.find_args
Build self.args using all the fields.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def find_args(self): """Build self.args using all the fields.""" return self.mpi_cmd + ['-n', str(self.n)] + self.mpi_args + \ self.program + self.program_args
def find_args(self): """Build self.args using all the fields.""" return self.mpi_cmd + ['-n', str(self.n)] + self.mpi_args + \ self.program + self.program_args
[ "Build", "self", ".", "args", "using", "all", "the", "fields", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L466-L469
[ "def", "find_args", "(", "self", ")", ":", "return", "self", ".", "mpi_cmd", "+", "[", "'-n'", ",", "str", "(", "self", ".", "n", ")", "]", "+", "self", ".", "mpi_args", "+", "self", ".", "program", "+", "self", ".", "program_args" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
MPILauncher.start
Start n instances of the program using mpiexec.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n instances of the program using mpiexec.""" self.n = n return super(MPILauncher, self).start()
def start(self, n): """Start n instances of the program using mpiexec.""" self.n = n return super(MPILauncher, self).start()
[ "Start", "n", "instances", "of", "the", "program", "using", "mpiexec", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L471-L474
[ "def", "start", "(", "self", ",", "n", ")", ":", "self", ".", "n", "=", "n", "return", "super", "(", "MPILauncher", ",", "self", ")", ".", "start", "(", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
MPIEngineSetLauncher.start
Start n engines by profile or profile_dir.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n engines by profile or profile_dir.""" self.n = n return super(MPIEngineSetLauncher, self).start(n)
def start(self, n): """Start n engines by profile or profile_dir.""" self.n = n return super(MPIEngineSetLauncher, self).start(n)
[ "Start", "n", "engines", "by", "profile", "or", "profile_dir", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L510-L513
[ "def", "start", "(", "self", ",", "n", ")", ":", "self", ".", "n", "=", "n", "return", "super", "(", "MPIEngineSetLauncher", ",", "self", ")", ".", "start", "(", "n", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHLauncher._send_file
send a single file
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def _send_file(self, local, remote): """send a single file""" remote = "%s:%s" % (self.location, remote) for i in range(10): if not os.path.exists(local): self.log.debug("waiting for %s" % local) time.sleep(1) else: break ...
def _send_file(self, local, remote): """send a single file""" remote = "%s:%s" % (self.location, remote) for i in range(10): if not os.path.exists(local): self.log.debug("waiting for %s" % local) time.sleep(1) else: break ...
[ "send", "a", "single", "file" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L589-L599
[ "def", "_send_file", "(", "self", ",", "local", ",", "remote", ")", ":", "remote", "=", "\"%s:%s\"", "%", "(", "self", ".", "location", ",", "remote", ")", "for", "i", "in", "range", "(", "10", ")", ":", "if", "not", "os", ".", "path", ".", "exis...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHLauncher.send_files
send our files (called before start)
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def send_files(self): """send our files (called before start)""" if not self.to_send: return for local_file, remote_file in self.to_send: self._send_file(local_file, remote_file)
def send_files(self): """send our files (called before start)""" if not self.to_send: return for local_file, remote_file in self.to_send: self._send_file(local_file, remote_file)
[ "send", "our", "files", "(", "called", "before", "start", ")" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L601-L606
[ "def", "send_files", "(", "self", ")", ":", "if", "not", "self", ".", "to_send", ":", "return", "for", "local_file", ",", "remote_file", "in", "self", ".", "to_send", ":", "self", ".", "_send_file", "(", "local_file", ",", "remote_file", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHLauncher._fetch_file
fetch a single file
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def _fetch_file(self, remote, local): """fetch a single file""" full_remote = "%s:%s" % (self.location, remote) self.log.info("fetching %s from %s", local, full_remote) for i in range(10): # wait up to 10s for remote file to exist check = check_output(self.ssh_cmd...
def _fetch_file(self, remote, local): """fetch a single file""" full_remote = "%s:%s" % (self.location, remote) self.log.info("fetching %s from %s", local, full_remote) for i in range(10): # wait up to 10s for remote file to exist check = check_output(self.ssh_cmd...
[ "fetch", "a", "single", "file" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L608-L621
[ "def", "_fetch_file", "(", "self", ",", "remote", ",", "local", ")", ":", "full_remote", "=", "\"%s:%s\"", "%", "(", "self", ".", "location", ",", "remote", ")", "self", ".", "log", ".", "info", "(", "\"fetching %s from %s\"", ",", "local", ",", "full_re...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHLauncher.fetch_files
fetch remote files (called after start)
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def fetch_files(self): """fetch remote files (called after start)""" if not self.to_fetch: return for remote_file, local_file in self.to_fetch: self._fetch_file(remote_file, local_file)
def fetch_files(self): """fetch remote files (called after start)""" if not self.to_fetch: return for remote_file, local_file in self.to_fetch: self._fetch_file(remote_file, local_file)
[ "fetch", "remote", "files", "(", "called", "after", "start", ")" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L623-L628
[ "def", "fetch_files", "(", "self", ")", ":", "if", "not", "self", ".", "to_fetch", ":", "return", "for", "remote_file", ",", "local_file", "in", "self", ".", "to_fetch", ":", "self", ".", "_fetch_file", "(", "remote_file", ",", "local_file", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHClusterLauncher._remote_profile_dir_default
turns /home/you/.ipython/profile_foo into .ipython/profile_foo
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def _remote_profile_dir_default(self): """turns /home/you/.ipython/profile_foo into .ipython/profile_foo """ home = get_home_dir() if not home.endswith('/'): home = home+'/' if self.profile_dir.startswith(home): return self.profile_dir[len(home):]...
def _remote_profile_dir_default(self): """turns /home/you/.ipython/profile_foo into .ipython/profile_foo """ home = get_home_dir() if not home.endswith('/'): home = home+'/' if self.profile_dir.startswith(home): return self.profile_dir[len(home):]...
[ "turns", "/", "home", "/", "you", "/", ".", "ipython", "/", "profile_foo", "into", ".", "ipython", "/", "profile_foo" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L654-L664
[ "def", "_remote_profile_dir_default", "(", "self", ")", ":", "home", "=", "get_home_dir", "(", ")", "if", "not", "home", ".", "endswith", "(", "'/'", ")", ":", "home", "=", "home", "+", "'/'", "if", "self", ".", "profile_dir", ".", "startswith", "(", "...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHEngineSetLauncher.engine_count
determine engine count from `engines` dict
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def engine_count(self): """determine engine count from `engines` dict""" count = 0 for n in self.engines.itervalues(): if isinstance(n, (tuple,list)): n,args = n count += n return count
def engine_count(self): """determine engine count from `engines` dict""" count = 0 for n in self.engines.itervalues(): if isinstance(n, (tuple,list)): n,args = n count += n return count
[ "determine", "engine", "count", "from", "engines", "dict" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L733-L740
[ "def", "engine_count", "(", "self", ")", ":", "count", "=", "0", "for", "n", "in", "self", ".", "engines", ".", "itervalues", "(", ")", ":", "if", "isinstance", "(", "n", ",", "(", "tuple", ",", "list", ")", ")", ":", "n", ",", "args", "=", "n"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
SSHEngineSetLauncher.start
Start engines by profile or profile_dir. `n` is ignored, and the `engines` config property is used instead.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start engines by profile or profile_dir. `n` is ignored, and the `engines` config property is used instead. """ dlist = [] for host, n in self.engines.iteritems(): if isinstance(n, (tuple, list)): n, args = n else: ...
def start(self, n): """Start engines by profile or profile_dir. `n` is ignored, and the `engines` config property is used instead. """ dlist = [] for host, n in self.engines.iteritems(): if isinstance(n, (tuple, list)): n, args = n else: ...
[ "Start", "engines", "by", "profile", "or", "profile_dir", ".", "n", "is", "ignored", "and", "the", "engines", "config", "property", "is", "used", "instead", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L742-L776
[ "def", "start", "(", "self", ",", "n", ")", ":", "dlist", "=", "[", "]", "for", "host", ",", "n", "in", "self", ".", "engines", ".", "iteritems", "(", ")", ":", "if", "isinstance", "(", "n", ",", "(", "tuple", ",", "list", ")", ")", ":", "n",...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
WindowsHPCLauncher.start
Start n copies of the process using the Win HPC job scheduler.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n copies of the process using the Win HPC job scheduler.""" self.write_job_file(n) args = [ 'submit', '/jobfile:%s' % self.job_file, '/scheduler:%s' % self.scheduler ] self.log.debug("Starting Win HPC Job: %s" % (se...
def start(self, n): """Start n copies of the process using the Win HPC job scheduler.""" self.write_job_file(n) args = [ 'submit', '/jobfile:%s' % self.job_file, '/scheduler:%s' % self.scheduler ] self.log.debug("Starting Win HPC Job: %s" % (se...
[ "Start", "n", "copies", "of", "the", "process", "using", "the", "Win", "HPC", "job", "scheduler", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L868-L885
[ "def", "start", "(", "self", ",", "n", ")", ":", "self", ".", "write_job_file", "(", "n", ")", "args", "=", "[", "'submit'", ",", "'/jobfile:%s'", "%", "self", ".", "job_file", ",", "'/scheduler:%s'", "%", "self", ".", "scheduler", "]", "self", ".", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BatchSystemLauncher._context_default
load the default context with the default values for the basic keys because the _trait_changed methods only load the context if they are set to something other than the default value.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def _context_default(self): """load the default context with the default values for the basic keys because the _trait_changed methods only load the context if they are set to something other than the default value. """ return dict(n=1, queue=u'', profile_dir=u'', cluster_id=u'')
def _context_default(self): """load the default context with the default values for the basic keys because the _trait_changed methods only load the context if they are set to something other than the default value. """ return dict(n=1, queue=u'', profile_dir=u'', cluster_id=u'')
[ "load", "the", "default", "context", "with", "the", "default", "values", "for", "the", "basic", "keys" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L1039-L1045
[ "def", "_context_default", "(", "self", ")", ":", "return", "dict", "(", "n", "=", "1", ",", "queue", "=", "u''", ",", "profile_dir", "=", "u''", ",", "cluster_id", "=", "u''", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BatchSystemLauncher.parse_job_id
Take the output of the submit command and return the job id.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def parse_job_id(self, output): """Take the output of the submit command and return the job id.""" m = self.job_id_regexp.search(output) if m is not None: job_id = m.group() else: raise LauncherError("Job id couldn't be determined: %s" % output) self.job_i...
def parse_job_id(self, output): """Take the output of the submit command and return the job id.""" m = self.job_id_regexp.search(output) if m is not None: job_id = m.group() else: raise LauncherError("Job id couldn't be determined: %s" % output) self.job_i...
[ "Take", "the", "output", "of", "the", "submit", "command", "and", "return", "the", "job", "id", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L1060-L1069
[ "def", "parse_job_id", "(", "self", ",", "output", ")", ":", "m", "=", "self", ".", "job_id_regexp", ".", "search", "(", "output", ")", "if", "m", "is", "not", "None", ":", "job_id", "=", "m", ".", "group", "(", ")", "else", ":", "raise", "Launcher...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BatchSystemLauncher.write_batch_script
Instantiate and write the batch script to the work_dir.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def write_batch_script(self, n): """Instantiate and write the batch script to the work_dir.""" self.n = n # first priority is batch_template if set if self.batch_template_file and not self.batch_template: # second priority is batch_template_file with open(self.bat...
def write_batch_script(self, n): """Instantiate and write the batch script to the work_dir.""" self.n = n # first priority is batch_template if set if self.batch_template_file and not self.batch_template: # second priority is batch_template_file with open(self.bat...
[ "Instantiate", "and", "write", "the", "batch", "script", "to", "the", "work_dir", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L1071-L1102
[ "def", "write_batch_script", "(", "self", ",", "n", ")", ":", "self", ".", "n", "=", "n", "# first priority is batch_template if set", "if", "self", ".", "batch_template_file", "and", "not", "self", ".", "batch_template", ":", "# second priority is batch_template_file...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
BatchSystemLauncher.start
Start n copies of the process using a batch system.
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n copies of the process using a batch system.""" self.log.debug("Starting %s: %r", self.__class__.__name__, self.args) # Here we save profile_dir in the context so they # can be used in the batch script template as {profile_dir} self.write_batch_scrip...
def start(self, n): """Start n copies of the process using a batch system.""" self.log.debug("Starting %s: %r", self.__class__.__name__, self.args) # Here we save profile_dir in the context so they # can be used in the batch script template as {profile_dir} self.write_batch_scrip...
[ "Start", "n", "copies", "of", "the", "process", "using", "a", "batch", "system", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L1104-L1114
[ "def", "start", "(", "self", ",", "n", ")", ":", "self", ".", "log", ".", "debug", "(", "\"Starting %s: %r\"", ",", "self", ".", "__class__", ".", "__name__", ",", "self", ".", "args", ")", "# Here we save profile_dir in the context so they", "# can be used in t...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
LSFLauncher.start
Start n copies of the process using LSF batch system. This cant inherit from the base class because bsub expects to be piped a shell script in order to honor the #BSUB directives : bsub < script
environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py
def start(self, n): """Start n copies of the process using LSF batch system. This cant inherit from the base class because bsub expects to be piped a shell script in order to honor the #BSUB directives : bsub < script """ # Here we save profile_dir in the context so they ...
def start(self, n): """Start n copies of the process using LSF batch system. This cant inherit from the base class because bsub expects to be piped a shell script in order to honor the #BSUB directives : bsub < script """ # Here we save profile_dir in the context so they ...
[ "Start", "n", "copies", "of", "the", "process", "using", "LSF", "batch", "system", ".", "This", "cant", "inherit", "from", "the", "base", "class", "because", "bsub", "expects", "to", "be", "piped", "a", "shell", "script", "in", "order", "to", "honor", "t...
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/parallel/apps/launcher.py#L1227-L1243
[ "def", "start", "(", "self", ",", "n", ")", ":", "# Here we save profile_dir in the context so they", "# can be used in the batch script template as {profile_dir}", "self", ".", "write_batch_script", "(", "n", ")", "#output = check_output(self.args, env=os.environ)", "piped_cmd", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
check_filemode
Return True if 'file' matches ('permission') which should be entered in octal.
environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/linux2/files.py
def check_filemode(filepath, mode): """Return True if 'file' matches ('permission') which should be entered in octal. """ filemode = stat.S_IMODE(os.stat(filepath).st_mode) return (oct(filemode) == mode)
def check_filemode(filepath, mode): """Return True if 'file' matches ('permission') which should be entered in octal. """ filemode = stat.S_IMODE(os.stat(filepath).st_mode) return (oct(filemode) == mode)
[ "Return", "True", "if", "file", "matches", "(", "permission", ")", "which", "should", "be", "entered", "in", "octal", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/linux2/files.py#L147-L152
[ "def", "check_filemode", "(", "filepath", ",", "mode", ")", ":", "filemode", "=", "stat", ".", "S_IMODE", "(", "os", ".", "stat", "(", "filepath", ")", ".", "st_mode", ")", "return", "(", "oct", "(", "filemode", ")", "==", "mode", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._context_menu_make
Reimplemented to return a custom context menu for images.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _context_menu_make(self, pos): """ Reimplemented to return a custom context menu for images. """ format = self._control.cursorForPosition(pos).charFormat() name = format.stringProperty(QtGui.QTextFormat.ImageName) if name: menu = QtGui.QMenu() menu.ad...
def _context_menu_make(self, pos): """ Reimplemented to return a custom context menu for images. """ format = self._control.cursorForPosition(pos).charFormat() name = format.stringProperty(QtGui.QTextFormat.ImageName) if name: menu = QtGui.QMenu() menu.ad...
[ "Reimplemented", "to", "return", "a", "custom", "context", "menu", "for", "images", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L78-L98
[ "def", "_context_menu_make", "(", "self", ",", "pos", ")", ":", "format", "=", "self", ".", "_control", ".", "cursorForPosition", "(", "pos", ")", ".", "charFormat", "(", ")", "name", "=", "format", ".", "stringProperty", "(", "QtGui", ".", "QTextFormat", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._pre_image_append
Append the Out[] prompt and make the output nicer Shared code for some the following if statement
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _pre_image_append(self, msg, prompt_number): """ Append the Out[] prompt and make the output nicer Shared code for some the following if statement """ self.log.debug("pyout: %s", msg.get('content', '')) self._append_plain_text(self.output_sep, True) self._append_htm...
def _pre_image_append(self, msg, prompt_number): """ Append the Out[] prompt and make the output nicer Shared code for some the following if statement """ self.log.debug("pyout: %s", msg.get('content', '')) self._append_plain_text(self.output_sep, True) self._append_htm...
[ "Append", "the", "Out", "[]", "prompt", "and", "make", "the", "output", "nicer" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L103-L111
[ "def", "_pre_image_append", "(", "self", ",", "msg", ",", "prompt_number", ")", ":", "self", ".", "log", ".", "debug", "(", "\"pyout: %s\"", ",", "msg", ".", "get", "(", "'content'", ",", "''", ")", ")", "self", ".", "_append_plain_text", "(", "self", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._handle_pyout
Overridden to handle rich data types, like SVG.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _handle_pyout(self, msg): """ Overridden to handle rich data types, like SVG. """ if not self._hidden and self._is_from_this_session(msg): content = msg['content'] prompt_number = content.get('execution_count', 0) data = content['data'] if data...
def _handle_pyout(self, msg): """ Overridden to handle rich data types, like SVG. """ if not self._hidden and self._is_from_this_session(msg): content = msg['content'] prompt_number = content.get('execution_count', 0) data = content['data'] if data...
[ "Overridden", "to", "handle", "rich", "data", "types", "like", "SVG", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L113-L134
[ "def", "_handle_pyout", "(", "self", ",", "msg", ")", ":", "if", "not", "self", ".", "_hidden", "and", "self", ".", "_is_from_this_session", "(", "msg", ")", ":", "content", "=", "msg", "[", "'content'", "]", "prompt_number", "=", "content", ".", "get", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._handle_display_data
Overridden to handle rich data types, like SVG.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _handle_display_data(self, msg): """ Overridden to handle rich data types, like SVG. """ if not self._hidden and self._is_from_this_session(msg): source = msg['content']['source'] data = msg['content']['data'] metadata = msg['content']['metadata'] ...
def _handle_display_data(self, msg): """ Overridden to handle rich data types, like SVG. """ if not self._hidden and self._is_from_this_session(msg): source = msg['content']['source'] data = msg['content']['data'] metadata = msg['content']['metadata'] ...
[ "Overridden", "to", "handle", "rich", "data", "types", "like", "SVG", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L136-L161
[ "def", "_handle_display_data", "(", "self", ",", "msg", ")", ":", "if", "not", "self", ".", "_hidden", "and", "self", ".", "_is_from_this_session", "(", "msg", ")", ":", "source", "=", "msg", "[", "'content'", "]", "[", "'source'", "]", "data", "=", "m...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._append_jpg
Append raw JPG data to the widget.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _append_jpg(self, jpg, before_prompt=False): """ Append raw JPG data to the widget.""" self._append_custom(self._insert_jpg, jpg, before_prompt)
def _append_jpg(self, jpg, before_prompt=False): """ Append raw JPG data to the widget.""" self._append_custom(self._insert_jpg, jpg, before_prompt)
[ "Append", "raw", "JPG", "data", "to", "the", "widget", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L167-L169
[ "def", "_append_jpg", "(", "self", ",", "jpg", ",", "before_prompt", "=", "False", ")", ":", "self", ".", "_append_custom", "(", "self", ".", "_insert_jpg", ",", "jpg", ",", "before_prompt", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._append_png
Append raw PNG data to the widget.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _append_png(self, png, before_prompt=False): """ Append raw PNG data to the widget. """ self._append_custom(self._insert_png, png, before_prompt)
def _append_png(self, png, before_prompt=False): """ Append raw PNG data to the widget. """ self._append_custom(self._insert_png, png, before_prompt)
[ "Append", "raw", "PNG", "data", "to", "the", "widget", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L171-L174
[ "def", "_append_png", "(", "self", ",", "png", ",", "before_prompt", "=", "False", ")", ":", "self", ".", "_append_custom", "(", "self", ".", "_insert_png", ",", "png", ",", "before_prompt", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._append_svg
Append raw SVG data to the widget.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _append_svg(self, svg, before_prompt=False): """ Append raw SVG data to the widget. """ self._append_custom(self._insert_svg, svg, before_prompt)
def _append_svg(self, svg, before_prompt=False): """ Append raw SVG data to the widget. """ self._append_custom(self._insert_svg, svg, before_prompt)
[ "Append", "raw", "SVG", "data", "to", "the", "widget", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L176-L179
[ "def", "_append_svg", "(", "self", ",", "svg", ",", "before_prompt", "=", "False", ")", ":", "self", ".", "_append_custom", "(", "self", ".", "_insert_svg", ",", "svg", ",", "before_prompt", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._add_image
Adds the specified QImage to the document and returns a QTextImageFormat that references it.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _add_image(self, image): """ Adds the specified QImage to the document and returns a QTextImageFormat that references it. """ document = self._control.document() name = str(image.cacheKey()) document.addResource(QtGui.QTextDocument.ImageResource, ...
def _add_image(self, image): """ Adds the specified QImage to the document and returns a QTextImageFormat that references it. """ document = self._control.document() name = str(image.cacheKey()) document.addResource(QtGui.QTextDocument.ImageResource, ...
[ "Adds", "the", "specified", "QImage", "to", "the", "document", "and", "returns", "a", "QTextImageFormat", "that", "references", "it", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L181-L191
[ "def", "_add_image", "(", "self", ",", "image", ")", ":", "document", "=", "self", ".", "_control", ".", "document", "(", ")", "name", "=", "str", "(", "image", ".", "cacheKey", "(", ")", ")", "document", ".", "addResource", "(", "QtGui", ".", "QText...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._copy_image
Copies the ImageResource with 'name' to the clipboard.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _copy_image(self, name): """ Copies the ImageResource with 'name' to the clipboard. """ image = self._get_image(name) QtGui.QApplication.clipboard().setImage(image)
def _copy_image(self, name): """ Copies the ImageResource with 'name' to the clipboard. """ image = self._get_image(name) QtGui.QApplication.clipboard().setImage(image)
[ "Copies", "the", "ImageResource", "with", "name", "to", "the", "clipboard", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L193-L197
[ "def", "_copy_image", "(", "self", ",", "name", ")", ":", "image", "=", "self", ".", "_get_image", "(", "name", ")", "QtGui", ".", "QApplication", ".", "clipboard", "(", ")", ".", "setImage", "(", "image", ")" ]
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._get_image
Returns the QImage stored as the ImageResource with 'name'.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _get_image(self, name): """ Returns the QImage stored as the ImageResource with 'name'. """ document = self._control.document() image = document.resource(QtGui.QTextDocument.ImageResource, QtCore.QUrl(name)) return image
def _get_image(self, name): """ Returns the QImage stored as the ImageResource with 'name'. """ document = self._control.document() image = document.resource(QtGui.QTextDocument.ImageResource, QtCore.QUrl(name)) return image
[ "Returns", "the", "QImage", "stored", "as", "the", "ImageResource", "with", "name", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L199-L205
[ "def", "_get_image", "(", "self", ",", "name", ")", ":", "document", "=", "self", ".", "_control", ".", "document", "(", ")", "image", "=", "document", ".", "resource", "(", "QtGui", ".", "QTextDocument", ".", "ImageResource", ",", "QtCore", ".", "QUrl",...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._get_image_tag
Return (X)HTML mark-up for the image-tag given by match. Parameters ---------- match : re.SRE_Match A match to an HTML image tag as exported by Qt, with match.group("Name") containing the matched image ID. path : string|None, optional [default None] ...
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _get_image_tag(self, match, path = None, format = "png"): """ Return (X)HTML mark-up for the image-tag given by match. Parameters ---------- match : re.SRE_Match A match to an HTML image tag as exported by Qt, with match.group("Name") containing the matched i...
def _get_image_tag(self, match, path = None, format = "png"): """ Return (X)HTML mark-up for the image-tag given by match. Parameters ---------- match : re.SRE_Match A match to an HTML image tag as exported by Qt, with match.group("Name") containing the matched i...
[ "Return", "(", "X", ")", "HTML", "mark", "-", "up", "for", "the", "image", "-", "tag", "given", "by", "match", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L207-L277
[ "def", "_get_image_tag", "(", "self", ",", "match", ",", "path", "=", "None", ",", "format", "=", "\"png\"", ")", ":", "if", "format", "in", "(", "\"png\"", ",", "\"jpg\"", ")", ":", "try", ":", "image", "=", "self", ".", "_get_image", "(", "match", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._insert_img
insert a raw image, jpg or png
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _insert_img(self, cursor, img, fmt): """ insert a raw image, jpg or png """ try: image = QtGui.QImage() image.loadFromData(img, fmt.upper()) except ValueError: self._insert_plain_text(cursor, 'Received invalid %s data.'%fmt) else: forma...
def _insert_img(self, cursor, img, fmt): """ insert a raw image, jpg or png """ try: image = QtGui.QImage() image.loadFromData(img, fmt.upper()) except ValueError: self._insert_plain_text(cursor, 'Received invalid %s data.'%fmt) else: forma...
[ "insert", "a", "raw", "image", "jpg", "or", "png" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L288-L299
[ "def", "_insert_img", "(", "self", ",", "cursor", ",", "img", ",", "fmt", ")", ":", "try", ":", "image", "=", "QtGui", ".", "QImage", "(", ")", "image", ".", "loadFromData", "(", "img", ",", "fmt", ".", "upper", "(", ")", ")", "except", "ValueError...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._insert_svg
Insert raw SVG data into the widet.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _insert_svg(self, cursor, svg): """ Insert raw SVG data into the widet. """ try: image = svg_to_image(svg) except ValueError: self._insert_plain_text(cursor, 'Received invalid SVG data.') else: format = self._add_image(image) se...
def _insert_svg(self, cursor, svg): """ Insert raw SVG data into the widet. """ try: image = svg_to_image(svg) except ValueError: self._insert_plain_text(cursor, 'Received invalid SVG data.') else: format = self._add_image(image) se...
[ "Insert", "raw", "SVG", "data", "into", "the", "widet", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L301-L313
[ "def", "_insert_svg", "(", "self", ",", "cursor", ",", "svg", ")", ":", "try", ":", "image", "=", "svg_to_image", "(", "svg", ")", "except", "ValueError", ":", "self", ".", "_insert_plain_text", "(", "cursor", ",", "'Received invalid SVG data.'", ")", "else"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
RichIPythonWidget._save_image
Shows a save dialog for the ImageResource with 'name'.
environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _save_image(self, name, format='PNG'): """ Shows a save dialog for the ImageResource with 'name'. """ dialog = QtGui.QFileDialog(self._control, 'Save Image') dialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) dialog.setDefaultSuffix(format.lower()) dialog.setNameFilte...
def _save_image(self, name, format='PNG'): """ Shows a save dialog for the ImageResource with 'name'. """ dialog = QtGui.QFileDialog(self._control, 'Save Image') dialog.setAcceptMode(QtGui.QFileDialog.AcceptSave) dialog.setDefaultSuffix(format.lower()) dialog.setNameFilte...
[ "Shows", "a", "save", "dialog", "for", "the", "ImageResource", "with", "name", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py#L315-L325
[ "def", "_save_image", "(", "self", ",", "name", ",", "format", "=", "'PNG'", ")", ":", "dialog", "=", "QtGui", ".", "QFileDialog", "(", "self", ".", "_control", ",", "'Save Image'", ")", "dialog", ".", "setAcceptMode", "(", "QtGui", ".", "QFileDialog", "...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
safe_unicode
unicode(e) with various fallbacks. Used for exceptions, which may not be safe to call unicode() on.
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def safe_unicode(e): """unicode(e) with various fallbacks. Used for exceptions, which may not be safe to call unicode() on. """ try: return unicode(e) except UnicodeError: pass try: return py3compat.str_to_unicode(str(e)) except UnicodeError: pass try: ...
def safe_unicode(e): """unicode(e) with various fallbacks. Used for exceptions, which may not be safe to call unicode() on. """ try: return unicode(e) except UnicodeError: pass try: return py3compat.str_to_unicode(str(e)) except UnicodeError: pass try: ...
[ "unicode", "(", "e", ")", "with", "various", "fallbacks", ".", "Used", "for", "exceptions", "which", "may", "not", "be", "safe", "to", "call", "unicode", "()", "on", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L440-L459
[ "def", "safe_unicode", "(", "e", ")", ":", "try", ":", "return", "unicode", "(", "e", ")", "except", "UnicodeError", ":", "pass", "try", ":", "return", "py3compat", ".", "str_to_unicode", "(", "str", "(", "e", ")", ")", "except", "UnicodeError", ":", "...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ZMQInteractiveShell._exit_now_changed
stop eventloop when exit_now fires
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def _exit_now_changed(self, name, old, new): """stop eventloop when exit_now fires""" if new: loop = ioloop.IOLoop.instance() loop.add_timeout(time.time()+0.1, loop.stop)
def _exit_now_changed(self, name, old, new): """stop eventloop when exit_now fires""" if new: loop = ioloop.IOLoop.instance() loop.add_timeout(time.time()+0.1, loop.stop)
[ "stop", "eventloop", "when", "exit_now", "fires" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L481-L485
[ "def", "_exit_now_changed", "(", "self", ",", "name", ",", "old", ",", "new", ")", ":", "if", "new", ":", "loop", "=", "ioloop", ".", "IOLoop", ".", "instance", "(", ")", "loop", ".", "add_timeout", "(", "time", ".", "time", "(", ")", "+", "0.1", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ZMQInteractiveShell.init_environment
Configure the user's environment.
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def init_environment(self): """Configure the user's environment. """ env = os.environ # These two ensure 'ls' produces nice coloring on BSD-derived systems env['TERM'] = 'xterm-color' env['CLICOLOR'] = '1' # Since normal pagers don't work at all (over pexpect we ...
def init_environment(self): """Configure the user's environment. """ env = os.environ # These two ensure 'ls' produces nice coloring on BSD-derived systems env['TERM'] = 'xterm-color' env['CLICOLOR'] = '1' # Since normal pagers don't work at all (over pexpect we ...
[ "Configure", "the", "user", "s", "environment", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L494-L509
[ "def", "init_environment", "(", "self", ")", ":", "env", "=", "os", ".", "environ", "# These two ensure 'ls' produces nice coloring on BSD-derived systems", "env", "[", "'TERM'", "]", "=", "'xterm-color'", "env", "[", "'CLICOLOR'", "]", "=", "'1'", "# Since normal pag...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ZMQInteractiveShell.auto_rewrite_input
Called to show the auto-rewritten input for autocall and friends. FIXME: this payload is currently not correctly processed by the frontend.
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def auto_rewrite_input(self, cmd): """Called to show the auto-rewritten input for autocall and friends. FIXME: this payload is currently not correctly processed by the frontend. """ new = self.prompt_manager.render('rewrite') + cmd payload = dict( source='IPy...
def auto_rewrite_input(self, cmd): """Called to show the auto-rewritten input for autocall and friends. FIXME: this payload is currently not correctly processed by the frontend. """ new = self.prompt_manager.render('rewrite') + cmd payload = dict( source='IPy...
[ "Called", "to", "show", "the", "auto", "-", "rewritten", "input", "for", "autocall", "and", "friends", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L511-L522
[ "def", "auto_rewrite_input", "(", "self", ",", "cmd", ")", ":", "new", "=", "self", ".", "prompt_manager", ".", "render", "(", "'rewrite'", ")", "+", "cmd", "payload", "=", "dict", "(", "source", "=", "'IPython.zmq.zmqshell.ZMQInteractiveShell.auto_rewrite_input'"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ZMQInteractiveShell.ask_exit
Engage the exit actions.
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def ask_exit(self): """Engage the exit actions.""" self.exit_now = True payload = dict( source='IPython.zmq.zmqshell.ZMQInteractiveShell.ask_exit', exit=True, keepkernel=self.keepkernel_on_exit, ) self.payload_manager.write_payload(payload)
def ask_exit(self): """Engage the exit actions.""" self.exit_now = True payload = dict( source='IPython.zmq.zmqshell.ZMQInteractiveShell.ask_exit', exit=True, keepkernel=self.keepkernel_on_exit, ) self.payload_manager.write_payload(payload)
[ "Engage", "the", "exit", "actions", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L524-L532
[ "def", "ask_exit", "(", "self", ")", ":", "self", ".", "exit_now", "=", "True", "payload", "=", "dict", "(", "source", "=", "'IPython.zmq.zmqshell.ZMQInteractiveShell.ask_exit'", ",", "exit", "=", "True", ",", "keepkernel", "=", "self", ".", "keepkernel_on_exit"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
ZMQInteractiveShell.set_next_input
Send the specified text to the frontend to be presented at the next input cell.
environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py
def set_next_input(self, text): """Send the specified text to the frontend to be presented at the next input cell.""" payload = dict( source='IPython.zmq.zmqshell.ZMQInteractiveShell.set_next_input', text=text ) self.payload_manager.write_payload(payload)
def set_next_input(self, text): """Send the specified text to the frontend to be presented at the next input cell.""" payload = dict( source='IPython.zmq.zmqshell.ZMQInteractiveShell.set_next_input', text=text ) self.payload_manager.write_payload(payload)
[ "Send", "the", "specified", "text", "to", "the", "frontend", "to", "be", "presented", "at", "the", "next", "input", "cell", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/zmq/zmqshell.py#L562-L569
[ "def", "set_next_input", "(", "self", ",", "text", ")", ":", "payload", "=", "dict", "(", "source", "=", "'IPython.zmq.zmqshell.ZMQInteractiveShell.set_next_input'", ",", "text", "=", "text", ")", "self", ".", "payload_manager", ".", "write_payload", "(", "payload...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
check_running
CHECK if process (default=apache2) is not running
environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/httpd.py
def check_running(process_name="apache2"): ''' CHECK if process (default=apache2) is not running ''' if not gurumate.base.get_pid_list(process_name): fail("Apache process '%s' doesn't seem to be working" % process_name) return False #unreachable return True
def check_running(process_name="apache2"): ''' CHECK if process (default=apache2) is not running ''' if not gurumate.base.get_pid_list(process_name): fail("Apache process '%s' doesn't seem to be working" % process_name) return False #unreachable return True
[ "CHECK", "if", "process", "(", "default", "=", "apache2", ")", "is", "not", "running" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/httpd.py#L8-L15
[ "def", "check_running", "(", "process_name", "=", "\"apache2\"", ")", ":", "if", "not", "gurumate", ".", "base", ".", "get_pid_list", "(", "process_name", ")", ":", "fail", "(", "\"Apache process '%s' doesn't seem to be working\"", "%", "process_name", ")", "return"...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
get_listening_ports
returns a list of listening ports for running process (default=apache2)
environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/httpd.py
def get_listening_ports(process_name="apache2"): ''' returns a list of listening ports for running process (default=apache2) ''' ports = set() for _, address_info in gurumate.base.get_listening_ports(process_name): ports.add(address_info[1]) return list(ports)
def get_listening_ports(process_name="apache2"): ''' returns a list of listening ports for running process (default=apache2) ''' ports = set() for _, address_info in gurumate.base.get_listening_ports(process_name): ports.add(address_info[1]) return list(ports)
[ "returns", "a", "list", "of", "listening", "ports", "for", "running", "process", "(", "default", "=", "apache2", ")" ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/gurumate-2.8.6-py2.7.egg/gurumate/httpd.py#L26-L33
[ "def", "get_listening_ports", "(", "process_name", "=", "\"apache2\"", ")", ":", "ports", "=", "set", "(", ")", "for", "_", ",", "address_info", "in", "gurumate", ".", "base", ".", "get_listening_ports", "(", "process_name", ")", ":", "ports", ".", "add", ...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
HandyConfigParser.read
Read a filename as UTF-8 configuration data.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def read(self, filename): """Read a filename as UTF-8 configuration data.""" kwargs = {} if sys.version_info >= (3, 2): kwargs['encoding'] = "utf-8" return configparser.RawConfigParser.read(self, filename, **kwargs)
def read(self, filename): """Read a filename as UTF-8 configuration data.""" kwargs = {} if sys.version_info >= (3, 2): kwargs['encoding'] = "utf-8" return configparser.RawConfigParser.read(self, filename, **kwargs)
[ "Read", "a", "filename", "as", "UTF", "-", "8", "configuration", "data", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L16-L21
[ "def", "read", "(", "self", ",", "filename", ")", ":", "kwargs", "=", "{", "}", "if", "sys", ".", "version_info", ">=", "(", "3", ",", "2", ")", ":", "kwargs", "[", "'encoding'", "]", "=", "\"utf-8\"", "return", "configparser", ".", "RawConfigParser", ...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
HandyConfigParser.getlist
Read a list of strings. The value of `section` and `option` is treated as a comma- and newline- separated list of strings. Each value is stripped of whitespace. Returns the list of strings.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def getlist(self, section, option): """Read a list of strings. The value of `section` and `option` is treated as a comma- and newline- separated list of strings. Each value is stripped of whitespace. Returns the list of strings. """ value_list = self.get(section, opti...
def getlist(self, section, option): """Read a list of strings. The value of `section` and `option` is treated as a comma- and newline- separated list of strings. Each value is stripped of whitespace. Returns the list of strings. """ value_list = self.get(section, opti...
[ "Read", "a", "list", "of", "strings", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L44-L60
[ "def", "getlist", "(", "self", ",", "section", ",", "option", ")", ":", "value_list", "=", "self", ".", "get", "(", "section", ",", "option", ")", "values", "=", "[", "]", "for", "value_line", "in", "value_list", ".", "split", "(", "'\\n'", ")", ":",...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
HandyConfigParser.getlinelist
Read a list of full-line strings. The value of `section` and `option` is treated as a newline-separated list of strings. Each value is stripped of whitespace. Returns the list of strings.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def getlinelist(self, section, option): """Read a list of full-line strings. The value of `section` and `option` is treated as a newline-separated list of strings. Each value is stripped of whitespace. Returns the list of strings. """ value_list = self.get(section, op...
def getlinelist(self, section, option): """Read a list of full-line strings. The value of `section` and `option` is treated as a newline-separated list of strings. Each value is stripped of whitespace. Returns the list of strings. """ value_list = self.get(section, op...
[ "Read", "a", "list", "of", "full", "-", "line", "strings", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L62-L72
[ "def", "getlinelist", "(", "self", ",", "section", ",", "option", ")", ":", "value_list", "=", "self", ".", "get", "(", "section", ",", "option", ")", "return", "list", "(", "filter", "(", "None", ",", "value_list", ".", "split", "(", "'\\n'", ")", "...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
CoverageConfig.from_environment
Read configuration from the `env_var` environment variable.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def from_environment(self, env_var): """Read configuration from the `env_var` environment variable.""" # Timidity: for nose users, read an environment variable. This is a # cheap hack, since the rest of the command line arguments aren't # recognized, but it solves some users' problems. ...
def from_environment(self, env_var): """Read configuration from the `env_var` environment variable.""" # Timidity: for nose users, read an environment variable. This is a # cheap hack, since the rest of the command line arguments aren't # recognized, but it solves some users' problems. ...
[ "Read", "configuration", "from", "the", "env_var", "environment", "variable", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L137-L144
[ "def", "from_environment", "(", "self", ",", "env_var", ")", ":", "# Timidity: for nose users, read an environment variable. This is a", "# cheap hack, since the rest of the command line arguments aren't", "# recognized, but it solves some users' problems.", "env", "=", "os", ".", "en...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
CoverageConfig.from_args
Read config values from `kwargs`.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def from_args(self, **kwargs): """Read config values from `kwargs`.""" for k, v in iitems(kwargs): if v is not None: if k in self.MUST_BE_LIST and isinstance(v, string_class): v = [v] setattr(self, k, v)
def from_args(self, **kwargs): """Read config values from `kwargs`.""" for k, v in iitems(kwargs): if v is not None: if k in self.MUST_BE_LIST and isinstance(v, string_class): v = [v] setattr(self, k, v)
[ "Read", "config", "values", "from", "kwargs", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L148-L154
[ "def", "from_args", "(", "self", ",", "*", "*", "kwargs", ")", ":", "for", "k", ",", "v", "in", "iitems", "(", "kwargs", ")", ":", "if", "v", "is", "not", "None", ":", "if", "k", "in", "self", ".", "MUST_BE_LIST", "and", "isinstance", "(", "v", ...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
CoverageConfig.from_file
Read configuration from a .rc file. `filename` is a file name to read.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def from_file(self, filename): """Read configuration from a .rc file. `filename` is a file name to read. """ self.attempted_config_files.append(filename) cp = HandyConfigParser() files_read = cp.read(filename) if files_read is not None: # return value changed ...
def from_file(self, filename): """Read configuration from a .rc file. `filename` is a file name to read. """ self.attempted_config_files.append(filename) cp = HandyConfigParser() files_read = cp.read(filename) if files_read is not None: # return value changed ...
[ "Read", "configuration", "from", "a", ".", "rc", "file", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L156-L175
[ "def", "from_file", "(", "self", ",", "filename", ")", ":", "self", ".", "attempted_config_files", ".", "append", "(", "filename", ")", "cp", "=", "HandyConfigParser", "(", ")", "files_read", "=", "cp", ".", "read", "(", "filename", ")", "if", "files_read"...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
CoverageConfig.set_attr_from_config_option
Set an attribute on self if it exists in the ConfigParser.
virtualEnvironment/lib/python2.7/site-packages/coverage/config.py
def set_attr_from_config_option(self, cp, attr, where, type_=''): """Set an attribute on self if it exists in the ConfigParser.""" section, option = where.split(":") if cp.has_option(section, option): method = getattr(cp, 'get'+type_) setattr(self, attr, method(section, o...
def set_attr_from_config_option(self, cp, attr, where, type_=''): """Set an attribute on self if it exists in the ConfigParser.""" section, option = where.split(":") if cp.has_option(section, option): method = getattr(cp, 'get'+type_) setattr(self, attr, method(section, o...
[ "Set", "an", "attribute", "on", "self", "if", "it", "exists", "in", "the", "ConfigParser", "." ]
tnkteja/myhelp
python
https://github.com/tnkteja/myhelp/blob/fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb/virtualEnvironment/lib/python2.7/site-packages/coverage/config.py#L208-L213
[ "def", "set_attr_from_config_option", "(", "self", ",", "cp", ",", "attr", ",", "where", ",", "type_", "=", "''", ")", ":", "section", ",", "option", "=", "where", ".", "split", "(", "\":\"", ")", "if", "cp", ".", "has_option", "(", "section", ",", "...
fb3a4809d448ad14d5b2e6ddf2e7e89ad52b71cb
test
expand_user
Expand '~'-style usernames in strings. This is similar to :func:`os.path.expanduser`, but it computes and returns extra information that will be useful if the input was being used in computing completions, and you wish to return the completions with the original '~' instead of its expanded value. ...
environment/lib/python2.7/site-packages/IPython/core/completer.py
def expand_user(path): """Expand '~'-style usernames in strings. This is similar to :func:`os.path.expanduser`, but it computes and returns extra information that will be useful if the input was being used in computing completions, and you wish to return the completions with the original '~' instea...
def expand_user(path): """Expand '~'-style usernames in strings. This is similar to :func:`os.path.expanduser`, but it computes and returns extra information that will be useful if the input was being used in computing completions, and you wish to return the completions with the original '~' instea...
[ "Expand", "~", "-", "style", "usernames", "in", "strings", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/core/completer.py#L132-L169
[ "def", "expand_user", "(", "path", ")", ":", "# Default values", "tilde_expand", "=", "False", "tilde_val", "=", "''", "newpath", "=", "path", "if", "path", ".", "startswith", "(", "'~'", ")", ":", "tilde_expand", "=", "True", "rest", "=", "len", "(", "p...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e
test
CompletionSplitter.delims
Set the delimiters for line splitting.
environment/lib/python2.7/site-packages/IPython/core/completer.py
def delims(self, delims): """Set the delimiters for line splitting.""" expr = '[' + ''.join('\\'+ c for c in delims) + ']' self._delim_re = re.compile(expr) self._delims = delims self._delim_expr = expr
def delims(self, delims): """Set the delimiters for line splitting.""" expr = '[' + ''.join('\\'+ c for c in delims) + ']' self._delim_re = re.compile(expr) self._delims = delims self._delim_expr = expr
[ "Set", "the", "delimiters", "for", "line", "splitting", "." ]
cloud9ers/gurumate
python
https://github.com/cloud9ers/gurumate/blob/075dc74d1ee62a8c6b7a8bf2b271364f01629d1e/environment/lib/python2.7/site-packages/IPython/core/completer.py#L225-L230
[ "def", "delims", "(", "self", ",", "delims", ")", ":", "expr", "=", "'['", "+", "''", ".", "join", "(", "'\\\\'", "+", "c", "for", "c", "in", "delims", ")", "+", "']'", "self", ".", "_delim_re", "=", "re", ".", "compile", "(", "expr", ")", "sel...
075dc74d1ee62a8c6b7a8bf2b271364f01629d1e