repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1
value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1
value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
spyder-ide/spyder | spyder/widgets/calltip.py | CallTipWidget._cursor_position_changed | def _cursor_position_changed(self):
""" Updates the tip based on user cursor movement.
"""
cursor = self._text_edit.textCursor()
position = cursor.position()
document = self._text_edit.document()
char = to_text_string(document.characterAt(position - 1))
if positio... | python | def _cursor_position_changed(self):
""" Updates the tip based on user cursor movement.
"""
cursor = self._text_edit.textCursor()
position = cursor.position()
document = self._text_edit.document()
char = to_text_string(document.characterAt(position - 1))
if positio... | [
"def",
"_cursor_position_changed",
"(",
"self",
")",
":",
"cursor",
"=",
"self",
".",
"_text_edit",
".",
"textCursor",
"(",
")",
"position",
"=",
"cursor",
".",
"position",
"(",
")",
"document",
"=",
"self",
".",
"_text_edit",
".",
"document",
"(",
")",
... | Updates the tip based on user cursor movement. | [
"Updates",
"the",
"tip",
"based",
"on",
"user",
"cursor",
"movement",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/widgets/calltip.py#L394-L406 | train | Updates the tip based on user cursor position. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | has_mixed_eol_chars | def has_mixed_eol_chars(text):
"""Detect if text has mixed EOL characters"""
eol_chars = get_eol_chars(text)
if eol_chars is None:
return False
correct_text = eol_chars.join((text+eol_chars).splitlines())
return repr(correct_text) != repr(text) | python | def has_mixed_eol_chars(text):
"""Detect if text has mixed EOL characters"""
eol_chars = get_eol_chars(text)
if eol_chars is None:
return False
correct_text = eol_chars.join((text+eol_chars).splitlines())
return repr(correct_text) != repr(text) | [
"def",
"has_mixed_eol_chars",
"(",
"text",
")",
":",
"eol_chars",
"=",
"get_eol_chars",
"(",
"text",
")",
"if",
"eol_chars",
"is",
"None",
":",
"return",
"False",
"correct_text",
"=",
"eol_chars",
".",
"join",
"(",
"(",
"text",
"+",
"eol_chars",
")",
".",
... | Detect if text has mixed EOL characters | [
"Detect",
"if",
"text",
"has",
"mixed",
"EOL",
"characters"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L44-L50 | train | Detect if text has mixed EOL characters | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | normalize_eols | def normalize_eols(text, eol='\n'):
"""Use the same eol's in text"""
for eol_char, _ in EOL_CHARS:
if eol_char != eol:
text = text.replace(eol_char, eol)
return text | python | def normalize_eols(text, eol='\n'):
"""Use the same eol's in text"""
for eol_char, _ in EOL_CHARS:
if eol_char != eol:
text = text.replace(eol_char, eol)
return text | [
"def",
"normalize_eols",
"(",
"text",
",",
"eol",
"=",
"'\\n'",
")",
":",
"for",
"eol_char",
",",
"_",
"in",
"EOL_CHARS",
":",
"if",
"eol_char",
"!=",
"eol",
":",
"text",
"=",
"text",
".",
"replace",
"(",
"eol_char",
",",
"eol",
")",
"return",
"text"... | Use the same eol's in text | [
"Use",
"the",
"same",
"eol",
"s",
"in",
"text"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L53-L58 | train | Normalize the text to include the given eol. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | is_builtin | def is_builtin(text):
"""Test if passed string is the name of a Python builtin object"""
from spyder.py3compat import builtins
return text in [str(name) for name in dir(builtins)
if not name.startswith('_')] | python | def is_builtin(text):
"""Test if passed string is the name of a Python builtin object"""
from spyder.py3compat import builtins
return text in [str(name) for name in dir(builtins)
if not name.startswith('_')] | [
"def",
"is_builtin",
"(",
"text",
")",
":",
"from",
"spyder",
".",
"py3compat",
"import",
"builtins",
"return",
"text",
"in",
"[",
"str",
"(",
"name",
")",
"for",
"name",
"in",
"dir",
"(",
"builtins",
")",
"if",
"not",
"name",
".",
"startswith",
"(",
... | Test if passed string is the name of a Python builtin object | [
"Test",
"if",
"passed",
"string",
"is",
"the",
"name",
"of",
"a",
"Python",
"builtin",
"object"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L66-L70 | train | Test if passed string is the name of a Python builtin object | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | get_primary_at | def get_primary_at(source_code, offset, retry=True):
"""Return Python object in *source_code* at *offset*
Periods to the left of the cursor are carried forward
e.g. 'functools.par^tial' would yield 'functools.partial'
Retry prevents infinite recursion: retry only once
"""
obj = ''
... | python | def get_primary_at(source_code, offset, retry=True):
"""Return Python object in *source_code* at *offset*
Periods to the left of the cursor are carried forward
e.g. 'functools.par^tial' would yield 'functools.partial'
Retry prevents infinite recursion: retry only once
"""
obj = ''
... | [
"def",
"get_primary_at",
"(",
"source_code",
",",
"offset",
",",
"retry",
"=",
"True",
")",
":",
"obj",
"=",
"''",
"left",
"=",
"re",
".",
"split",
"(",
"r\"[^0-9a-zA-Z_.]\"",
",",
"source_code",
"[",
":",
"offset",
"]",
")",
"if",
"left",
"and",
"left... | Return Python object in *source_code* at *offset*
Periods to the left of the cursor are carried forward
e.g. 'functools.par^tial' would yield 'functools.partial'
Retry prevents infinite recursion: retry only once | [
"Return",
"Python",
"object",
"in",
"*",
"source_code",
"*",
"at",
"*",
"offset",
"*",
"Periods",
"to",
"the",
"left",
"of",
"the",
"cursor",
"are",
"carried",
"forward",
"e",
".",
"g",
".",
"functools",
".",
"par^tial",
"would",
"yield",
"functools",
".... | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L79-L97 | train | Return a new Python object in source_code at offset | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | split_source | def split_source(source_code):
'''Split source code into lines
'''
eol_chars = get_eol_chars(source_code)
if eol_chars:
return source_code.split(eol_chars)
else:
return [source_code] | python | def split_source(source_code):
'''Split source code into lines
'''
eol_chars = get_eol_chars(source_code)
if eol_chars:
return source_code.split(eol_chars)
else:
return [source_code] | [
"def",
"split_source",
"(",
"source_code",
")",
":",
"eol_chars",
"=",
"get_eol_chars",
"(",
"source_code",
")",
"if",
"eol_chars",
":",
"return",
"source_code",
".",
"split",
"(",
"eol_chars",
")",
"else",
":",
"return",
"[",
"source_code",
"]"
] | Split source code into lines | [
"Split",
"source",
"code",
"into",
"lines"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L100-L107 | train | Split source code into lines
| Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | get_identifiers | def get_identifiers(source_code):
'''Split source code into python identifier-like tokens'''
tokens = set(re.split(r"[^0-9a-zA-Z_.]", source_code))
valid = re.compile(r'[a-zA-Z_]')
return [token for token in tokens if re.match(valid, token)] | python | def get_identifiers(source_code):
'''Split source code into python identifier-like tokens'''
tokens = set(re.split(r"[^0-9a-zA-Z_.]", source_code))
valid = re.compile(r'[a-zA-Z_]')
return [token for token in tokens if re.match(valid, token)] | [
"def",
"get_identifiers",
"(",
"source_code",
")",
":",
"tokens",
"=",
"set",
"(",
"re",
".",
"split",
"(",
"r\"[^0-9a-zA-Z_.]\"",
",",
"source_code",
")",
")",
"valid",
"=",
"re",
".",
"compile",
"(",
"r'[a-zA-Z_]'",
")",
"return",
"[",
"token",
"for",
... | Split source code into python identifier-like tokens | [
"Split",
"source",
"code",
"into",
"python",
"identifier",
"-",
"like",
"tokens"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L110-L114 | train | Split source code into python identifier - like tokens | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | path_components | def path_components(path):
"""
Return the individual components of a given file path
string (for the local operating system).
Taken from https://stackoverflow.com/q/21498939/438386
"""
components = []
# The loop guarantees that the returned components can be
# os.path.joined wi... | python | def path_components(path):
"""
Return the individual components of a given file path
string (for the local operating system).
Taken from https://stackoverflow.com/q/21498939/438386
"""
components = []
# The loop guarantees that the returned components can be
# os.path.joined wi... | [
"def",
"path_components",
"(",
"path",
")",
":",
"components",
"=",
"[",
"]",
"# The loop guarantees that the returned components can be\r",
"# os.path.joined with the path separator and point to the same\r",
"# location: \r",
"while",
"True",
":",
"(",
"new_path",
",",
"tai... | Return the individual components of a given file path
string (for the local operating system).
Taken from https://stackoverflow.com/q/21498939/438386 | [
"Return",
"the",
"individual",
"components",
"of",
"a",
"given",
"file",
"path",
"string",
"(",
"for",
"the",
"local",
"operating",
"system",
")",
".",
"Taken",
"from",
"https",
":",
"//",
"stackoverflow",
".",
"com",
"/",
"q",
"/",
"21498939",
"/",
"438... | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L116-L135 | train | Returns the individual components of a given file path | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | differentiate_prefix | def differentiate_prefix(path_components0, path_components1):
"""
Return the differentiated prefix of the given two iterables.
Taken from https://stackoverflow.com/q/21498939/438386
"""
longest_prefix = []
root_comparison = False
common_elmt = None
for index, (elmt0, elmt... | python | def differentiate_prefix(path_components0, path_components1):
"""
Return the differentiated prefix of the given two iterables.
Taken from https://stackoverflow.com/q/21498939/438386
"""
longest_prefix = []
root_comparison = False
common_elmt = None
for index, (elmt0, elmt... | [
"def",
"differentiate_prefix",
"(",
"path_components0",
",",
"path_components1",
")",
":",
"longest_prefix",
"=",
"[",
"]",
"root_comparison",
"=",
"False",
"common_elmt",
"=",
"None",
"for",
"index",
",",
"(",
"elmt0",
",",
"elmt1",
")",
"in",
"enumerate",
"(... | Return the differentiated prefix of the given two iterables.
Taken from https://stackoverflow.com/q/21498939/438386 | [
"Return",
"the",
"differentiated",
"prefix",
"of",
"the",
"given",
"two",
"iterables",
".",
"Taken",
"from",
"https",
":",
"//",
"stackoverflow",
".",
"com",
"/",
"q",
"/",
"21498939",
"/",
"438386"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L137-L171 | train | Returns the differentiated prefix of the given two iterables. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | disambiguate_fname | def disambiguate_fname(files_path_list, filename):
"""Get tab title without ambiguation."""
fname = os.path.basename(filename)
same_name_files = get_same_name_files(files_path_list, fname)
if len(same_name_files) > 1:
compare_path = shortest_path(same_name_files)
if compare_path ==... | python | def disambiguate_fname(files_path_list, filename):
"""Get tab title without ambiguation."""
fname = os.path.basename(filename)
same_name_files = get_same_name_files(files_path_list, fname)
if len(same_name_files) > 1:
compare_path = shortest_path(same_name_files)
if compare_path ==... | [
"def",
"disambiguate_fname",
"(",
"files_path_list",
",",
"filename",
")",
":",
"fname",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"filename",
")",
"same_name_files",
"=",
"get_same_name_files",
"(",
"files_path_list",
",",
"fname",
")",
"if",
"len",
"(",
... | Get tab title without ambiguation. | [
"Get",
"tab",
"title",
"without",
"ambiguation",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L173-L195 | train | Get tab title without ambiguation. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/sourcecode.py | get_same_name_files | def get_same_name_files(files_path_list, filename):
"""Get a list of the path components of the files with the same name."""
same_name_files = []
for fname in files_path_list:
if filename == os.path.basename(fname):
same_name_files.append(path_components(fname))
return same_nam... | python | def get_same_name_files(files_path_list, filename):
"""Get a list of the path components of the files with the same name."""
same_name_files = []
for fname in files_path_list:
if filename == os.path.basename(fname):
same_name_files.append(path_components(fname))
return same_nam... | [
"def",
"get_same_name_files",
"(",
"files_path_list",
",",
"filename",
")",
":",
"same_name_files",
"=",
"[",
"]",
"for",
"fname",
"in",
"files_path_list",
":",
"if",
"filename",
"==",
"os",
".",
"path",
".",
"basename",
"(",
"fname",
")",
":",
"same_name_fi... | Get a list of the path components of the files with the same name. | [
"Get",
"a",
"list",
"of",
"the",
"path",
"components",
"of",
"the",
"files",
"with",
"the",
"same",
"name",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/sourcecode.py#L197-L203 | train | Get a list of the path components of the files with the same name. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/decoration.py | TextDecorationsManager.add | def add(self, decorations):
"""
Add text decorations on a CodeEditor instance.
Don't add duplicated decorations, and order decorations according
draw_order and the size of the selection.
Args:
decorations (sourcecode.api.TextDecoration) (could be a list)
Ret... | python | def add(self, decorations):
"""
Add text decorations on a CodeEditor instance.
Don't add duplicated decorations, and order decorations according
draw_order and the size of the selection.
Args:
decorations (sourcecode.api.TextDecoration) (could be a list)
Ret... | [
"def",
"add",
"(",
"self",
",",
"decorations",
")",
":",
"added",
"=",
"0",
"if",
"isinstance",
"(",
"decorations",
",",
"list",
")",
":",
"not_repeated",
"=",
"set",
"(",
"decorations",
")",
"-",
"set",
"(",
"self",
".",
"_decorations",
")",
"self",
... | Add text decorations on a CodeEditor instance.
Don't add duplicated decorations, and order decorations according
draw_order and the size of the selection.
Args:
decorations (sourcecode.api.TextDecoration) (could be a list)
Returns:
int: Amount of decorations add... | [
"Add",
"text",
"decorations",
"on",
"a",
"CodeEditor",
"instance",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/decoration.py#L35-L59 | train | Adds text decorations on a CodeEditor instance. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/decoration.py | TextDecorationsManager.remove | def remove(self, decoration):
"""
Removes a text decoration from the editor.
:param decoration: Text decoration to remove
:type decoration: spyder.api.TextDecoration
"""
try:
self._decorations.remove(decoration)
self.update()
return Tr... | python | def remove(self, decoration):
"""
Removes a text decoration from the editor.
:param decoration: Text decoration to remove
:type decoration: spyder.api.TextDecoration
"""
try:
self._decorations.remove(decoration)
self.update()
return Tr... | [
"def",
"remove",
"(",
"self",
",",
"decoration",
")",
":",
"try",
":",
"self",
".",
"_decorations",
".",
"remove",
"(",
"decoration",
")",
"self",
".",
"update",
"(",
")",
"return",
"True",
"except",
"ValueError",
":",
"return",
"False",
"except",
"Runti... | Removes a text decoration from the editor.
:param decoration: Text decoration to remove
:type decoration: spyder.api.TextDecoration | [
"Removes",
"a",
"text",
"decoration",
"from",
"the",
"editor",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/decoration.py#L61-L76 | train | Removes a text decoration from the editor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/decoration.py | TextDecorationsManager.update | def update(self):
"""Update editor extra selections with added decorations.
NOTE: Update TextDecorations to use editor font, using a different
font family and point size could cause unwanted behaviors.
"""
font = self.editor.font()
for decoration in self._decorations:
... | python | def update(self):
"""Update editor extra selections with added decorations.
NOTE: Update TextDecorations to use editor font, using a different
font family and point size could cause unwanted behaviors.
"""
font = self.editor.font()
for decoration in self._decorations:
... | [
"def",
"update",
"(",
"self",
")",
":",
"font",
"=",
"self",
".",
"editor",
".",
"font",
"(",
")",
"for",
"decoration",
"in",
"self",
".",
"_decorations",
":",
"try",
":",
"decoration",
".",
"format",
".",
"setFont",
"(",
"font",
",",
"QTextCharFormat"... | Update editor extra selections with added decorations.
NOTE: Update TextDecorations to use editor font, using a different
font family and point size could cause unwanted behaviors. | [
"Update",
"editor",
"extra",
"selections",
"with",
"added",
"decorations",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/decoration.py#L86-L100 | train | Update editor extra selections with added decorations. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/utils/decoration.py | TextDecorationsManager._order_decorations | def _order_decorations(self):
"""Order decorations according draw_order and size of selection.
Highest draw_order will appear on top of the lowest values.
If draw_order is equal,smaller selections are draw in top of
bigger selections.
"""
def order_function(sel):
... | python | def _order_decorations(self):
"""Order decorations according draw_order and size of selection.
Highest draw_order will appear on top of the lowest values.
If draw_order is equal,smaller selections are draw in top of
bigger selections.
"""
def order_function(sel):
... | [
"def",
"_order_decorations",
"(",
"self",
")",
":",
"def",
"order_function",
"(",
"sel",
")",
":",
"end",
"=",
"sel",
".",
"cursor",
".",
"selectionEnd",
"(",
")",
"start",
"=",
"sel",
".",
"cursor",
".",
"selectionStart",
"(",
")",
"return",
"sel",
".... | Order decorations according draw_order and size of selection.
Highest draw_order will appear on top of the lowest values.
If draw_order is equal,smaller selections are draw in top of
bigger selections. | [
"Order",
"decorations",
"according",
"draw_order",
"and",
"size",
"of",
"selection",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/utils/decoration.py#L108-L122 | train | Order decorations according to draw_order and size of selection. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/help.py | HelpWidget.get_signature | def get_signature(self, content):
"""Get signature from inspect reply content"""
data = content.get('data', {})
text = data.get('text/plain', '')
if text:
text = ANSI_OR_SPECIAL_PATTERN.sub('', text)
self._control.current_prompt_pos = self._prompt_pos
... | python | def get_signature(self, content):
"""Get signature from inspect reply content"""
data = content.get('data', {})
text = data.get('text/plain', '')
if text:
text = ANSI_OR_SPECIAL_PATTERN.sub('', text)
self._control.current_prompt_pos = self._prompt_pos
... | [
"def",
"get_signature",
"(",
"self",
",",
"content",
")",
":",
"data",
"=",
"content",
".",
"get",
"(",
"'data'",
",",
"{",
"}",
")",
"text",
"=",
"data",
".",
"get",
"(",
"'text/plain'",
",",
"''",
")",
"if",
"text",
":",
"text",
"=",
"ANSI_OR_SPE... | Get signature from inspect reply content | [
"Get",
"signature",
"from",
"inspect",
"reply",
"content"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/help.py#L40-L69 | train | Get signature from inspect reply content | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/help.py | HelpWidget.is_defined | def is_defined(self, objtxt, force_import=False):
"""Return True if object is defined"""
if self._reading:
return
wait_loop = QEventLoop()
self.sig_got_reply.connect(wait_loop.quit)
self.silent_exec_method(
"get_ipython().kernel.is_defined('%s', force_impo... | python | def is_defined(self, objtxt, force_import=False):
"""Return True if object is defined"""
if self._reading:
return
wait_loop = QEventLoop()
self.sig_got_reply.connect(wait_loop.quit)
self.silent_exec_method(
"get_ipython().kernel.is_defined('%s', force_impo... | [
"def",
"is_defined",
"(",
"self",
",",
"objtxt",
",",
"force_import",
"=",
"False",
")",
":",
"if",
"self",
".",
"_reading",
":",
"return",
"wait_loop",
"=",
"QEventLoop",
"(",
")",
"self",
".",
"sig_got_reply",
".",
"connect",
"(",
"wait_loop",
".",
"qu... | Return True if object is defined | [
"Return",
"True",
"if",
"object",
"is",
"defined"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/help.py#L71-L86 | train | Return True if object is defined | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/help.py | HelpWidget.get_doc | def get_doc(self, objtxt):
"""Get object documentation dictionary"""
if self._reading:
return
wait_loop = QEventLoop()
self.sig_got_reply.connect(wait_loop.quit)
self.silent_exec_method("get_ipython().kernel.get_doc('%s')" % objtxt)
wait_loop.exec_()
... | python | def get_doc(self, objtxt):
"""Get object documentation dictionary"""
if self._reading:
return
wait_loop = QEventLoop()
self.sig_got_reply.connect(wait_loop.quit)
self.silent_exec_method("get_ipython().kernel.get_doc('%s')" % objtxt)
wait_loop.exec_()
... | [
"def",
"get_doc",
"(",
"self",
",",
"objtxt",
")",
":",
"if",
"self",
".",
"_reading",
":",
"return",
"wait_loop",
"=",
"QEventLoop",
"(",
")",
"self",
".",
"sig_got_reply",
".",
"connect",
"(",
"wait_loop",
".",
"quit",
")",
"self",
".",
"silent_exec_me... | Get object documentation dictionary | [
"Get",
"object",
"documentation",
"dictionary"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/help.py#L88-L101 | train | Get object documentation dictionary | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/help.py | HelpWidget._handle_inspect_reply | def _handle_inspect_reply(self, rep):
"""
Reimplement call tips to only show signatures, using the same
style from our Editor and External Console too
"""
cursor = self._get_cursor()
info = self._request_info.get('call_tip')
if info and info.id == rep['parent_head... | python | def _handle_inspect_reply(self, rep):
"""
Reimplement call tips to only show signatures, using the same
style from our Editor and External Console too
"""
cursor = self._get_cursor()
info = self._request_info.get('call_tip')
if info and info.id == rep['parent_head... | [
"def",
"_handle_inspect_reply",
"(",
"self",
",",
"rep",
")",
":",
"cursor",
"=",
"self",
".",
"_get_cursor",
"(",
")",
"info",
"=",
"self",
".",
"_request_info",
".",
"get",
"(",
"'call_tip'",
")",
"if",
"info",
"and",
"info",
".",
"id",
"==",
"rep",
... | Reimplement call tips to only show signatures, using the same
style from our Editor and External Console too | [
"Reimplement",
"call",
"tips",
"to",
"only",
"show",
"signatures",
"using",
"the",
"same",
"style",
"from",
"our",
"Editor",
"and",
"External",
"Console",
"too"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/help.py#L119-L134 | train | Reimplement call tips to only show signatures using the same
style from our Editor and External Console too | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/external/github.py | _encode_params | def _encode_params(kw):
'''
Encode parameters.
'''
args = []
for k, v in kw.items():
try:
# Python 2
qv = v.encode('utf-8') if isinstance(v, unicode) else str(v)
except:
qv = v
args.append('%s=%s' % (k, urlquote(qv)))
return '&'.join(ar... | python | def _encode_params(kw):
'''
Encode parameters.
'''
args = []
for k, v in kw.items():
try:
# Python 2
qv = v.encode('utf-8') if isinstance(v, unicode) else str(v)
except:
qv = v
args.append('%s=%s' % (k, urlquote(qv)))
return '&'.join(ar... | [
"def",
"_encode_params",
"(",
"kw",
")",
":",
"args",
"=",
"[",
"]",
"for",
"k",
",",
"v",
"in",
"kw",
".",
"items",
"(",
")",
":",
"try",
":",
"# Python 2",
"qv",
"=",
"v",
".",
"encode",
"(",
"'utf-8'",
")",
"if",
"isinstance",
"(",
"v",
",",... | Encode parameters. | [
"Encode",
"parameters",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/github.py#L79-L91 | train | Encode parameters. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/external/github.py | _encode_json | def _encode_json(obj):
'''
Encode object as json str.
'''
def _dump_obj(obj):
if isinstance(obj, dict):
return obj
d = dict()
for k in dir(obj):
if not k.startswith('_'):
d[k] = getattr(obj, k)
return d
return json.dumps(obj, de... | python | def _encode_json(obj):
'''
Encode object as json str.
'''
def _dump_obj(obj):
if isinstance(obj, dict):
return obj
d = dict()
for k in dir(obj):
if not k.startswith('_'):
d[k] = getattr(obj, k)
return d
return json.dumps(obj, de... | [
"def",
"_encode_json",
"(",
"obj",
")",
":",
"def",
"_dump_obj",
"(",
"obj",
")",
":",
"if",
"isinstance",
"(",
"obj",
",",
"dict",
")",
":",
"return",
"obj",
"d",
"=",
"dict",
"(",
")",
"for",
"k",
"in",
"dir",
"(",
"obj",
")",
":",
"if",
"not... | Encode object as json str. | [
"Encode",
"object",
"as",
"json",
"str",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/github.py#L93-L105 | train | Encode object as json str. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/external/github.py | GitHub.authorize_url | def authorize_url(self, state=None):
'''
Generate authorize_url.
>>> GitHub(client_id='3ebf94c5776d565bcf75').authorize_url()
'https://github.com/login/oauth/authorize?client_id=3ebf94c5776d565bcf75'
'''
if not self._client_id:
raise ApiAuthError('No client i... | python | def authorize_url(self, state=None):
'''
Generate authorize_url.
>>> GitHub(client_id='3ebf94c5776d565bcf75').authorize_url()
'https://github.com/login/oauth/authorize?client_id=3ebf94c5776d565bcf75'
'''
if not self._client_id:
raise ApiAuthError('No client i... | [
"def",
"authorize_url",
"(",
"self",
",",
"state",
"=",
"None",
")",
":",
"if",
"not",
"self",
".",
"_client_id",
":",
"raise",
"ApiAuthError",
"(",
"'No client id.'",
")",
"kw",
"=",
"dict",
"(",
"client_id",
"=",
"self",
".",
"_client_id",
")",
"if",
... | Generate authorize_url.
>>> GitHub(client_id='3ebf94c5776d565bcf75').authorize_url()
'https://github.com/login/oauth/authorize?client_id=3ebf94c5776d565bcf75' | [
"Generate",
"authorize_url",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/github.py#L184-L200 | train | Generate authorize url. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/utils/external/github.py | GitHub.get_access_token | def get_access_token(self, code, state=None):
'''
In callback url: http://host/callback?code=123&state=xyz
use code and state to get an access token.
'''
kw = dict(client_id=self._client_id, client_secret=self._client_secret, code=code)
if self._redirect_uri:
... | python | def get_access_token(self, code, state=None):
'''
In callback url: http://host/callback?code=123&state=xyz
use code and state to get an access token.
'''
kw = dict(client_id=self._client_id, client_secret=self._client_secret, code=code)
if self._redirect_uri:
... | [
"def",
"get_access_token",
"(",
"self",
",",
"code",
",",
"state",
"=",
"None",
")",
":",
"kw",
"=",
"dict",
"(",
"client_id",
"=",
"self",
".",
"_client_id",
",",
"client_secret",
"=",
"self",
".",
"_client_secret",
",",
"code",
"=",
"code",
")",
"if"... | In callback url: http://host/callback?code=123&state=xyz
use code and state to get an access token. | [
"In",
"callback",
"url",
":",
"http",
":",
"//",
"host",
"/",
"callback?code",
"=",
"123&state",
"=",
"xyz"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/utils/external/github.py#L202-L224 | train | Get an access token. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/lsp/decorators.py | send_request | def send_request(req=None, method=None, requires_response=True):
"""Call function req and then send its results via ZMQ."""
if req is None:
return functools.partial(send_request, method=method,
requires_response=requires_response)
@functools.wraps(req)
def wrapp... | python | def send_request(req=None, method=None, requires_response=True):
"""Call function req and then send its results via ZMQ."""
if req is None:
return functools.partial(send_request, method=method,
requires_response=requires_response)
@functools.wraps(req)
def wrapp... | [
"def",
"send_request",
"(",
"req",
"=",
"None",
",",
"method",
"=",
"None",
",",
"requires_response",
"=",
"True",
")",
":",
"if",
"req",
"is",
"None",
":",
"return",
"functools",
".",
"partial",
"(",
"send_request",
",",
"method",
"=",
"method",
",",
... | Call function req and then send its results via ZMQ. | [
"Call",
"function",
"req",
"and",
"then",
"send",
"its",
"results",
"via",
"ZMQ",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/lsp/decorators.py#L12-L24 | train | Decorator that returns a function that calls req and then sends its results via ZMQ. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/editor/lsp/decorators.py | class_register | def class_register(cls):
"""Class decorator that allows to map LSP method names to class methods."""
cls.handler_registry = {}
cls.sender_registry = {}
for method_name in dir(cls):
method = getattr(cls, method_name)
if hasattr(method, '_handle'):
cls.handler_registry.update({... | python | def class_register(cls):
"""Class decorator that allows to map LSP method names to class methods."""
cls.handler_registry = {}
cls.sender_registry = {}
for method_name in dir(cls):
method = getattr(cls, method_name)
if hasattr(method, '_handle'):
cls.handler_registry.update({... | [
"def",
"class_register",
"(",
"cls",
")",
":",
"cls",
".",
"handler_registry",
"=",
"{",
"}",
"cls",
".",
"sender_registry",
"=",
"{",
"}",
"for",
"method_name",
"in",
"dir",
"(",
"cls",
")",
":",
"method",
"=",
"getattr",
"(",
"cls",
",",
"method_name... | Class decorator that allows to map LSP method names to class methods. | [
"Class",
"decorator",
"that",
"allows",
"to",
"map",
"LSP",
"method",
"names",
"to",
"class",
"methods",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/editor/lsp/decorators.py#L27-L37 | train | Class decorator that allows to map LSP method names to class methods. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.set_data | def set_data(self, data, coll_filter=None):
"""Set model data"""
self._data = data
data_type = get_type_string(data)
if coll_filter is not None and not self.remote and \
isinstance(data, (tuple, list, dict, set)):
data = coll_filter(data)
self.shown... | python | def set_data(self, data, coll_filter=None):
"""Set model data"""
self._data = data
data_type = get_type_string(data)
if coll_filter is not None and not self.remote and \
isinstance(data, (tuple, list, dict, set)):
data = coll_filter(data)
self.shown... | [
"def",
"set_data",
"(",
"self",
",",
"data",
",",
"coll_filter",
"=",
"None",
")",
":",
"self",
".",
"_data",
"=",
"data",
"data_type",
"=",
"get_type_string",
"(",
"data",
")",
"if",
"coll_filter",
"is",
"not",
"None",
"and",
"not",
"self",
".",
"remo... | Set model data | [
"Set",
"model",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L147-L194 | train | Set model data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.sort | def sort(self, column, order=Qt.AscendingOrder):
"""Overriding sort method"""
reverse = (order==Qt.DescendingOrder)
if column == 0:
self.sizes = sort_against(self.sizes, self.keys, reverse)
self.types = sort_against(self.types, self.keys, reverse)
try:
... | python | def sort(self, column, order=Qt.AscendingOrder):
"""Overriding sort method"""
reverse = (order==Qt.DescendingOrder)
if column == 0:
self.sizes = sort_against(self.sizes, self.keys, reverse)
self.types = sort_against(self.types, self.keys, reverse)
try:
... | [
"def",
"sort",
"(",
"self",
",",
"column",
",",
"order",
"=",
"Qt",
".",
"AscendingOrder",
")",
":",
"reverse",
"=",
"(",
"order",
"==",
"Qt",
".",
"DescendingOrder",
")",
"if",
"column",
"==",
"0",
":",
"self",
".",
"sizes",
"=",
"sort_against",
"("... | Overriding sort method | [
"Overriding",
"sort",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L230-L262 | train | Overriding sort method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.rowCount | def rowCount(self, index=QModelIndex()):
"""Array row number"""
if self.total_rows <= self.rows_loaded:
return self.total_rows
else:
return self.rows_loaded | python | def rowCount(self, index=QModelIndex()):
"""Array row number"""
if self.total_rows <= self.rows_loaded:
return self.total_rows
else:
return self.rows_loaded | [
"def",
"rowCount",
"(",
"self",
",",
"index",
"=",
"QModelIndex",
"(",
")",
")",
":",
"if",
"self",
".",
"total_rows",
"<=",
"self",
".",
"rows_loaded",
":",
"return",
"self",
".",
"total_rows",
"else",
":",
"return",
"self",
".",
"rows_loaded"
] | Array row number | [
"Array",
"row",
"number"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L268-L273 | train | Returns the number of rows in the table. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.get_value | def get_value(self, index):
"""Return current value"""
if index.column() == 0:
return self.keys[ index.row() ]
elif index.column() == 1:
return self.types[ index.row() ]
elif index.column() == 2:
return self.sizes[ index.row() ]
else:
... | python | def get_value(self, index):
"""Return current value"""
if index.column() == 0:
return self.keys[ index.row() ]
elif index.column() == 1:
return self.types[ index.row() ]
elif index.column() == 2:
return self.sizes[ index.row() ]
else:
... | [
"def",
"get_value",
"(",
"self",
",",
"index",
")",
":",
"if",
"index",
".",
"column",
"(",
")",
"==",
"0",
":",
"return",
"self",
".",
"keys",
"[",
"index",
".",
"row",
"(",
")",
"]",
"elif",
"index",
".",
"column",
"(",
")",
"==",
"1",
":",
... | Return current value | [
"Return",
"current",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L301-L310 | train | Return the value of the given index | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.get_bgcolor | def get_bgcolor(self, index):
"""Background color depending on value"""
if index.column() == 0:
color = QColor(Qt.lightGray)
color.setAlphaF(.05)
elif index.column() < 3:
color = QColor(Qt.lightGray)
color.setAlphaF(.2)
else:
... | python | def get_bgcolor(self, index):
"""Background color depending on value"""
if index.column() == 0:
color = QColor(Qt.lightGray)
color.setAlphaF(.05)
elif index.column() < 3:
color = QColor(Qt.lightGray)
color.setAlphaF(.2)
else:
... | [
"def",
"get_bgcolor",
"(",
"self",
",",
"index",
")",
":",
"if",
"index",
".",
"column",
"(",
")",
"==",
"0",
":",
"color",
"=",
"QColor",
"(",
"Qt",
".",
"lightGray",
")",
"color",
".",
"setAlphaF",
"(",
".05",
")",
"elif",
"index",
".",
"column",... | Background color depending on value | [
"Background",
"color",
"depending",
"on",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L312-L323 | train | Returns the background color depending on value | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.data | def data(self, index, role=Qt.DisplayRole):
"""Cell content"""
if not index.isValid():
return to_qvariant()
value = self.get_value(index)
if index.column() == 3 and self.remote:
value = value['view']
if index.column() == 3:
display = va... | python | def data(self, index, role=Qt.DisplayRole):
"""Cell content"""
if not index.isValid():
return to_qvariant()
value = self.get_value(index)
if index.column() == 3 and self.remote:
value = value['view']
if index.column() == 3:
display = va... | [
"def",
"data",
"(",
"self",
",",
"index",
",",
"role",
"=",
"Qt",
".",
"DisplayRole",
")",
":",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"to_qvariant",
"(",
")",
"value",
"=",
"self",
".",
"get_value",
"(",
"index",
")",
"if",... | Cell content | [
"Cell",
"content"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L325-L355 | train | Returns the data for the item at the given index | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.headerData | def headerData(self, section, orientation, role=Qt.DisplayRole):
"""Overriding method headerData"""
if role != Qt.DisplayRole:
return to_qvariant()
i_column = int(section)
if orientation == Qt.Horizontal:
headers = (self.header0, _("Type"), _("Size"), _("Val... | python | def headerData(self, section, orientation, role=Qt.DisplayRole):
"""Overriding method headerData"""
if role != Qt.DisplayRole:
return to_qvariant()
i_column = int(section)
if orientation == Qt.Horizontal:
headers = (self.header0, _("Type"), _("Size"), _("Val... | [
"def",
"headerData",
"(",
"self",
",",
"section",
",",
"orientation",
",",
"role",
"=",
"Qt",
".",
"DisplayRole",
")",
":",
"if",
"role",
"!=",
"Qt",
".",
"DisplayRole",
":",
"return",
"to_qvariant",
"(",
")",
"i_column",
"=",
"int",
"(",
"section",
")... | Overriding method headerData | [
"Overriding",
"method",
"headerData"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L357-L366 | train | Overriding method headerData | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | ReadOnlyCollectionsModel.flags | def flags(self, index):
"""Overriding method flags"""
# This method was implemented in CollectionsModel only, but to enable
# tuple exploration (even without editing), this method was moved here
if not index.isValid():
return Qt.ItemIsEnabled
return Qt.ItemFlags... | python | def flags(self, index):
"""Overriding method flags"""
# This method was implemented in CollectionsModel only, but to enable
# tuple exploration (even without editing), this method was moved here
if not index.isValid():
return Qt.ItemIsEnabled
return Qt.ItemFlags... | [
"def",
"flags",
"(",
"self",
",",
"index",
")",
":",
"# This method was implemented in CollectionsModel only, but to enable\r",
"# tuple exploration (even without editing), this method was moved here\r",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"Qt",
"."... | Overriding method flags | [
"Overriding",
"method",
"flags"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L368-L375 | train | Overriding method flags | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsModel.set_value | def set_value(self, index, value):
"""Set value"""
self._data[ self.keys[index.row()] ] = value
self.showndata[ self.keys[index.row()] ] = value
self.sizes[index.row()] = get_size(value)
self.types[index.row()] = get_human_readable_type(value)
self.sig_setting_data.... | python | def set_value(self, index, value):
"""Set value"""
self._data[ self.keys[index.row()] ] = value
self.showndata[ self.keys[index.row()] ] = value
self.sizes[index.row()] = get_size(value)
self.types[index.row()] = get_human_readable_type(value)
self.sig_setting_data.... | [
"def",
"set_value",
"(",
"self",
",",
"index",
",",
"value",
")",
":",
"self",
".",
"_data",
"[",
"self",
".",
"keys",
"[",
"index",
".",
"row",
"(",
")",
"]",
"]",
"=",
"value",
"self",
".",
"showndata",
"[",
"self",
".",
"keys",
"[",
"index",
... | Set value | [
"Set",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L384-L390 | train | Set value of the column at the given index | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsModel.get_bgcolor | def get_bgcolor(self, index):
"""Background color depending on value"""
value = self.get_value(index)
if index.column() < 3:
color = ReadOnlyCollectionsModel.get_bgcolor(self, index)
else:
if self.remote:
color_name = value['color']
... | python | def get_bgcolor(self, index):
"""Background color depending on value"""
value = self.get_value(index)
if index.column() < 3:
color = ReadOnlyCollectionsModel.get_bgcolor(self, index)
else:
if self.remote:
color_name = value['color']
... | [
"def",
"get_bgcolor",
"(",
"self",
",",
"index",
")",
":",
"value",
"=",
"self",
".",
"get_value",
"(",
"index",
")",
"if",
"index",
".",
"column",
"(",
")",
"<",
"3",
":",
"color",
"=",
"ReadOnlyCollectionsModel",
".",
"get_bgcolor",
"(",
"self",
",",... | Background color depending on value | [
"Background",
"color",
"depending",
"on",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L392-L404 | train | Get background color depending on value | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsModel.setData | def setData(self, index, value, role=Qt.EditRole):
"""Cell content change"""
if not index.isValid():
return False
if index.column() < 3:
return False
value = display_to_value(value, self.get_value(index),
ignore_errors=True)... | python | def setData(self, index, value, role=Qt.EditRole):
"""Cell content change"""
if not index.isValid():
return False
if index.column() < 3:
return False
value = display_to_value(value, self.get_value(index),
ignore_errors=True)... | [
"def",
"setData",
"(",
"self",
",",
"index",
",",
"value",
",",
"role",
"=",
"Qt",
".",
"EditRole",
")",
":",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"False",
"if",
"index",
".",
"column",
"(",
")",
"<",
"3",
":",
"return",... | Cell content change | [
"Cell",
"content",
"change"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L406-L416 | train | Set the value of the item at the given index. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsDelegate.show_warning | def show_warning(self, index):
"""
Decide if showing a warning when the user is trying to view
a big variable associated to a Tablemodel index
This avoids getting the variables' value to know its
size and type, using instead those already computed by
the TableMode... | python | def show_warning(self, index):
"""
Decide if showing a warning when the user is trying to view
a big variable associated to a Tablemodel index
This avoids getting the variables' value to know its
size and type, using instead those already computed by
the TableMode... | [
"def",
"show_warning",
"(",
"self",
",",
"index",
")",
":",
"try",
":",
"val_size",
"=",
"index",
".",
"model",
"(",
")",
".",
"sizes",
"[",
"index",
".",
"row",
"(",
")",
"]",
"val_type",
"=",
"index",
".",
"model",
"(",
")",
".",
"types",
"[",
... | Decide if showing a warning when the user is trying to view
a big variable associated to a Tablemodel index
This avoids getting the variables' value to know its
size and type, using instead those already computed by
the TableModel.
The problem is when a variable ... | [
"Decide",
"if",
"showing",
"a",
"warning",
"when",
"the",
"user",
"is",
"trying",
"to",
"view",
"a",
"big",
"variable",
"associated",
"to",
"a",
"Tablemodel",
"index",
"This",
"avoids",
"getting",
"the",
"variables",
"value",
"to",
"know",
"its",
"size",
"... | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L435-L456 | train | Returns True if the user is trying to view a big variable associated to a Tablemodel index False otherwise | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsDelegate.createEditor | def createEditor(self, parent, option, index):
"""Overriding method createEditor"""
if index.column() < 3:
return None
if self.show_warning(index):
answer = QMessageBox.warning(self.parent(), _("Warning"),
_("Opening this variab... | python | def createEditor(self, parent, option, index):
"""Overriding method createEditor"""
if index.column() < 3:
return None
if self.show_warning(index):
answer = QMessageBox.warning(self.parent(), _("Warning"),
_("Opening this variab... | [
"def",
"createEditor",
"(",
"self",
",",
"parent",
",",
"option",
",",
"index",
")",
":",
"if",
"index",
".",
"column",
"(",
")",
"<",
"3",
":",
"return",
"None",
"if",
"self",
".",
"show_warning",
"(",
"index",
")",
":",
"answer",
"=",
"QMessageBox"... | Overriding method createEditor | [
"Overriding",
"method",
"createEditor"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L458-L567 | train | Overriding method createEditor | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsDelegate.setEditorData | def setEditorData(self, editor, index):
"""
Overriding method setEditorData
Model --> Editor
"""
value = self.get_value(index)
if isinstance(editor, QLineEdit):
if is_binary_string(value):
try:
value = to_text_strin... | python | def setEditorData(self, editor, index):
"""
Overriding method setEditorData
Model --> Editor
"""
value = self.get_value(index)
if isinstance(editor, QLineEdit):
if is_binary_string(value):
try:
value = to_text_strin... | [
"def",
"setEditorData",
"(",
"self",
",",
"editor",
",",
"index",
")",
":",
"value",
"=",
"self",
".",
"get_value",
"(",
"index",
")",
"if",
"isinstance",
"(",
"editor",
",",
"QLineEdit",
")",
":",
"if",
"is_binary_string",
"(",
"value",
")",
":",
"try... | Overriding method setEditorData
Model --> Editor | [
"Overriding",
"method",
"setEditorData",
"Model",
"--",
">",
"Editor"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L630-L648 | train | Overriding method setEditorData
Model --> Editor | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsDelegate.setModelData | def setModelData(self, editor, model, index):
"""
Overriding method setModelData
Editor --> Model
"""
if not hasattr(model, "set_value"):
# Read-only mode
return
if isinstance(editor, QLineEdit):
value = editor.text()... | python | def setModelData(self, editor, model, index):
"""
Overriding method setModelData
Editor --> Model
"""
if not hasattr(model, "set_value"):
# Read-only mode
return
if isinstance(editor, QLineEdit):
value = editor.text()... | [
"def",
"setModelData",
"(",
"self",
",",
"editor",
",",
"model",
",",
"index",
")",
":",
"if",
"not",
"hasattr",
"(",
"model",
",",
"\"set_value\"",
")",
":",
"# Read-only mode\r",
"return",
"if",
"isinstance",
"(",
"editor",
",",
"QLineEdit",
")",
":",
... | Overriding method setModelData
Editor --> Model | [
"Overriding",
"method",
"setModelData",
"Editor",
"--",
">",
"Model"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L650-L685 | train | Override setModelData with a different editor widget and model | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.setup_table | def setup_table(self):
"""Setup table"""
self.horizontalHeader().setStretchLastSection(True)
self.adjust_columns()
# Sorting columns
self.setSortingEnabled(True)
self.sortByColumn(0, Qt.AscendingOrder) | python | def setup_table(self):
"""Setup table"""
self.horizontalHeader().setStretchLastSection(True)
self.adjust_columns()
# Sorting columns
self.setSortingEnabled(True)
self.sortByColumn(0, Qt.AscendingOrder) | [
"def",
"setup_table",
"(",
"self",
")",
":",
"self",
".",
"horizontalHeader",
"(",
")",
".",
"setStretchLastSection",
"(",
"True",
")",
"self",
".",
"adjust_columns",
"(",
")",
"# Sorting columns\r",
"self",
".",
"setSortingEnabled",
"(",
"True",
")",
"self",
... | Setup table | [
"Setup",
"table"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L745-L751 | train | Setup table for this instance | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.setup_menu | def setup_menu(self, minmax):
"""Setup context menu"""
if self.minmax_action is not None:
self.minmax_action.setChecked(minmax)
return
resize_action = create_action(self, _("Resize rows to contents"),
triggered=self.re... | python | def setup_menu(self, minmax):
"""Setup context menu"""
if self.minmax_action is not None:
self.minmax_action.setChecked(minmax)
return
resize_action = create_action(self, _("Resize rows to contents"),
triggered=self.re... | [
"def",
"setup_menu",
"(",
"self",
",",
"minmax",
")",
":",
"if",
"self",
".",
"minmax_action",
"is",
"not",
"None",
":",
"self",
".",
"minmax_action",
".",
"setChecked",
"(",
"minmax",
")",
"return",
"resize_action",
"=",
"create_action",
"(",
"self",
",",... | Setup context menu | [
"Setup",
"context",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L753-L820 | train | Setup context menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.refresh_menu | def refresh_menu(self):
"""Refresh context menu"""
index = self.currentIndex()
condition = index.isValid()
self.edit_action.setEnabled( condition )
self.remove_action.setEnabled( condition )
self.refresh_plot_entries(index) | python | def refresh_menu(self):
"""Refresh context menu"""
index = self.currentIndex()
condition = index.isValid()
self.edit_action.setEnabled( condition )
self.remove_action.setEnabled( condition )
self.refresh_plot_entries(index) | [
"def",
"refresh_menu",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"condition",
"=",
"index",
".",
"isValid",
"(",
")",
"self",
".",
"edit_action",
".",
"setEnabled",
"(",
"condition",
")",
"self",
".",
"remove_action",
".... | Refresh context menu | [
"Refresh",
"context",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L880-L886 | train | Refresh context menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.set_data | def set_data(self, data):
"""Set table data"""
if data is not None:
self.model.set_data(data, self.dictfilter)
self.sortByColumn(0, Qt.AscendingOrder) | python | def set_data(self, data):
"""Set table data"""
if data is not None:
self.model.set_data(data, self.dictfilter)
self.sortByColumn(0, Qt.AscendingOrder) | [
"def",
"set_data",
"(",
"self",
",",
"data",
")",
":",
"if",
"data",
"is",
"not",
"None",
":",
"self",
".",
"model",
".",
"set_data",
"(",
"data",
",",
"self",
".",
"dictfilter",
")",
"self",
".",
"sortByColumn",
"(",
"0",
",",
"Qt",
".",
"Ascendin... | Set table data | [
"Set",
"table",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L920-L924 | train | Set table data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.mousePressEvent | def mousePressEvent(self, event):
"""Reimplement Qt method"""
if event.button() != Qt.LeftButton:
QTableView.mousePressEvent(self, event)
return
index_clicked = self.indexAt(event.pos())
if index_clicked.isValid():
if index_clicked == self.curre... | python | def mousePressEvent(self, event):
"""Reimplement Qt method"""
if event.button() != Qt.LeftButton:
QTableView.mousePressEvent(self, event)
return
index_clicked = self.indexAt(event.pos())
if index_clicked.isValid():
if index_clicked == self.curre... | [
"def",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"button",
"(",
")",
"!=",
"Qt",
".",
"LeftButton",
":",
"QTableView",
".",
"mousePressEvent",
"(",
"self",
",",
"event",
")",
"return",
"index_clicked",
"=",
"self",
".",
... | Reimplement Qt method | [
"Reimplement",
"Qt",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L926-L940 | train | Reimplement Qt method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.mouseDoubleClickEvent | def mouseDoubleClickEvent(self, event):
"""Reimplement Qt method"""
index_clicked = self.indexAt(event.pos())
if index_clicked.isValid():
row = index_clicked.row()
# TODO: Remove hard coded "Value" column number (3 here)
index_clicked = index_clicked.chi... | python | def mouseDoubleClickEvent(self, event):
"""Reimplement Qt method"""
index_clicked = self.indexAt(event.pos())
if index_clicked.isValid():
row = index_clicked.row()
# TODO: Remove hard coded "Value" column number (3 here)
index_clicked = index_clicked.chi... | [
"def",
"mouseDoubleClickEvent",
"(",
"self",
",",
"event",
")",
":",
"index_clicked",
"=",
"self",
".",
"indexAt",
"(",
"event",
".",
"pos",
"(",
")",
")",
"if",
"index_clicked",
".",
"isValid",
"(",
")",
":",
"row",
"=",
"index_clicked",
".",
"row",
"... | Reimplement Qt method | [
"Reimplement",
"Qt",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L942-L951 | train | Reimplement Qt method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.keyPressEvent | def keyPressEvent(self, event):
"""Reimplement Qt methods"""
if event.key() == Qt.Key_Delete:
self.remove_item()
elif event.key() == Qt.Key_F2:
self.rename_item()
elif event == QKeySequence.Copy:
self.copy()
elif event == QKeySequence.P... | python | def keyPressEvent(self, event):
"""Reimplement Qt methods"""
if event.key() == Qt.Key_Delete:
self.remove_item()
elif event.key() == Qt.Key_F2:
self.rename_item()
elif event == QKeySequence.Copy:
self.copy()
elif event == QKeySequence.P... | [
"def",
"keyPressEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"event",
".",
"key",
"(",
")",
"==",
"Qt",
".",
"Key_Delete",
":",
"self",
".",
"remove_item",
"(",
")",
"elif",
"event",
".",
"key",
"(",
")",
"==",
"Qt",
".",
"Key_F2",
":",
"se... | Reimplement Qt methods | [
"Reimplement",
"Qt",
"methods"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L953-L964 | train | Reimplement Qt methods | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.contextMenuEvent | def contextMenuEvent(self, event):
"""Reimplement Qt method"""
if self.model.showndata:
self.refresh_menu()
self.menu.popup(event.globalPos())
event.accept()
else:
self.empty_ws_menu.popup(event.globalPos())
event.accept() | python | def contextMenuEvent(self, event):
"""Reimplement Qt method"""
if self.model.showndata:
self.refresh_menu()
self.menu.popup(event.globalPos())
event.accept()
else:
self.empty_ws_menu.popup(event.globalPos())
event.accept() | [
"def",
"contextMenuEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"self",
".",
"model",
".",
"showndata",
":",
"self",
".",
"refresh_menu",
"(",
")",
"self",
".",
"menu",
".",
"popup",
"(",
"event",
".",
"globalPos",
"(",
")",
")",
"event",
".",
... | Reimplement Qt method | [
"Reimplement",
"Qt",
"method"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L966-L974 | train | Reimplement Qt method | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.dragEnterEvent | def dragEnterEvent(self, event):
"""Allow user to drag files"""
if mimedata2url(event.mimeData()):
event.accept()
else:
event.ignore() | python | def dragEnterEvent(self, event):
"""Allow user to drag files"""
if mimedata2url(event.mimeData()):
event.accept()
else:
event.ignore() | [
"def",
"dragEnterEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"mimedata2url",
"(",
"event",
".",
"mimeData",
"(",
")",
")",
":",
"event",
".",
"accept",
"(",
")",
"else",
":",
"event",
".",
"ignore",
"(",
")"
] | Allow user to drag files | [
"Allow",
"user",
"to",
"drag",
"files"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L976-L981 | train | Allow user to drag files | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.dragMoveEvent | def dragMoveEvent(self, event):
"""Allow user to move files"""
if mimedata2url(event.mimeData()):
event.setDropAction(Qt.CopyAction)
event.accept()
else:
event.ignore() | python | def dragMoveEvent(self, event):
"""Allow user to move files"""
if mimedata2url(event.mimeData()):
event.setDropAction(Qt.CopyAction)
event.accept()
else:
event.ignore() | [
"def",
"dragMoveEvent",
"(",
"self",
",",
"event",
")",
":",
"if",
"mimedata2url",
"(",
"event",
".",
"mimeData",
"(",
")",
")",
":",
"event",
".",
"setDropAction",
"(",
"Qt",
".",
"CopyAction",
")",
"event",
".",
"accept",
"(",
")",
"else",
":",
"ev... | Allow user to move files | [
"Allow",
"user",
"to",
"move",
"files"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L983-L989 | train | Allow user to move files | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.dropEvent | def dropEvent(self, event):
"""Allow user to drop supported files"""
urls = mimedata2url(event.mimeData())
if urls:
event.setDropAction(Qt.CopyAction)
event.accept()
self.sig_files_dropped.emit(urls)
else:
event.ignore() | python | def dropEvent(self, event):
"""Allow user to drop supported files"""
urls = mimedata2url(event.mimeData())
if urls:
event.setDropAction(Qt.CopyAction)
event.accept()
self.sig_files_dropped.emit(urls)
else:
event.ignore() | [
"def",
"dropEvent",
"(",
"self",
",",
"event",
")",
":",
"urls",
"=",
"mimedata2url",
"(",
"event",
".",
"mimeData",
"(",
")",
")",
"if",
"urls",
":",
"event",
".",
"setDropAction",
"(",
"Qt",
".",
"CopyAction",
")",
"event",
".",
"accept",
"(",
")",... | Allow user to drop supported files | [
"Allow",
"user",
"to",
"drop",
"supported",
"files"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L991-L999 | train | Allow user to drop supported files | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.toggle_minmax | def toggle_minmax(self, state):
"""Toggle min/max display for numpy arrays"""
self.sig_option_changed.emit('minmax', state)
self.model.minmax = state | python | def toggle_minmax(self, state):
"""Toggle min/max display for numpy arrays"""
self.sig_option_changed.emit('minmax', state)
self.model.minmax = state | [
"def",
"toggle_minmax",
"(",
"self",
",",
"state",
")",
":",
"self",
".",
"sig_option_changed",
".",
"emit",
"(",
"'minmax'",
",",
"state",
")",
"self",
".",
"model",
".",
"minmax",
"=",
"state"
] | Toggle min/max display for numpy arrays | [
"Toggle",
"min",
"/",
"max",
"display",
"for",
"numpy",
"arrays"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1002-L1005 | train | Toggle min max display for numpy arrays | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.set_dataframe_format | def set_dataframe_format(self, new_format):
"""
Set format to use in DataframeEditor.
Args:
new_format (string): e.g. "%.3f"
"""
self.sig_option_changed.emit('dataframe_format', new_format)
self.model.dataframe_format = new_format | python | def set_dataframe_format(self, new_format):
"""
Set format to use in DataframeEditor.
Args:
new_format (string): e.g. "%.3f"
"""
self.sig_option_changed.emit('dataframe_format', new_format)
self.model.dataframe_format = new_format | [
"def",
"set_dataframe_format",
"(",
"self",
",",
"new_format",
")",
":",
"self",
".",
"sig_option_changed",
".",
"emit",
"(",
"'dataframe_format'",
",",
"new_format",
")",
"self",
".",
"model",
".",
"dataframe_format",
"=",
"new_format"
] | Set format to use in DataframeEditor.
Args:
new_format (string): e.g. "%.3f" | [
"Set",
"format",
"to",
"use",
"in",
"DataframeEditor",
".",
"Args",
":",
"new_format",
"(",
"string",
")",
":",
"e",
".",
"g",
".",
"%",
".",
"3f"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1008-L1016 | train | Set format of the dataframe in the current model | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.edit_item | def edit_item(self):
"""Edit item"""
index = self.currentIndex()
if not index.isValid():
return
# TODO: Remove hard coded "Value" column number (3 here)
self.edit(index.child(index.row(), 3)) | python | def edit_item(self):
"""Edit item"""
index = self.currentIndex()
if not index.isValid():
return
# TODO: Remove hard coded "Value" column number (3 here)
self.edit(index.child(index.row(), 3)) | [
"def",
"edit_item",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"# TODO: Remove hard coded \"Value\" column number (3 here)\r",
"self",
".",
"edit",
"(",
"index",
".... | Edit item | [
"Edit",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1019-L1025 | train | Edit the item in the tree. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.remove_item | def remove_item(self):
"""Remove item"""
indexes = self.selectedIndexes()
if not indexes:
return
for index in indexes:
if not index.isValid():
return
one = _("Do you want to remove the selected item?")
more = _("Do you want... | python | def remove_item(self):
"""Remove item"""
indexes = self.selectedIndexes()
if not indexes:
return
for index in indexes:
if not index.isValid():
return
one = _("Do you want to remove the selected item?")
more = _("Do you want... | [
"def",
"remove_item",
"(",
"self",
")",
":",
"indexes",
"=",
"self",
".",
"selectedIndexes",
"(",
")",
"if",
"not",
"indexes",
":",
"return",
"for",
"index",
"in",
"indexes",
":",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"return",
"one",
... | Remove item | [
"Remove",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1028-L1044 | train | Remove item from the list | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.copy_item | def copy_item(self, erase_original=False):
"""Copy item"""
indexes = self.selectedIndexes()
if not indexes:
return
idx_rows = unsorted_unique([idx.row() for idx in indexes])
if len(idx_rows) > 1 or not indexes[0].isValid():
return
orig_key ... | python | def copy_item(self, erase_original=False):
"""Copy item"""
indexes = self.selectedIndexes()
if not indexes:
return
idx_rows = unsorted_unique([idx.row() for idx in indexes])
if len(idx_rows) > 1 or not indexes[0].isValid():
return
orig_key ... | [
"def",
"copy_item",
"(",
"self",
",",
"erase_original",
"=",
"False",
")",
":",
"indexes",
"=",
"self",
".",
"selectedIndexes",
"(",
")",
"if",
"not",
"indexes",
":",
"return",
"idx_rows",
"=",
"unsorted_unique",
"(",
"[",
"idx",
".",
"row",
"(",
")",
... | Copy item | [
"Copy",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1046-L1073 | train | Copy item from selected index to selected item. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.insert_item | def insert_item(self):
"""Insert item"""
index = self.currentIndex()
if not index.isValid():
row = self.model.rowCount()
else:
row = index.row()
data = self.model.get_data()
if isinstance(data, list):
key = row
dat... | python | def insert_item(self):
"""Insert item"""
index = self.currentIndex()
if not index.isValid():
row = self.model.rowCount()
else:
row = index.row()
data = self.model.get_data()
if isinstance(data, list):
key = row
dat... | [
"def",
"insert_item",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"if",
"not",
"index",
".",
"isValid",
"(",
")",
":",
"row",
"=",
"self",
".",
"model",
".",
"rowCount",
"(",
")",
"else",
":",
"row",
"=",
"index",
... | Insert item | [
"Insert",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1086-L1109 | train | Insert item in the model | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.plot_item | def plot_item(self, funcname):
"""Plot item"""
index = self.currentIndex()
if self.__prepare_plot():
key = self.model.get_key(index)
try:
self.plot(key, funcname)
except (ValueError, TypeError) as error:
QMessageBox.crit... | python | def plot_item(self, funcname):
"""Plot item"""
index = self.currentIndex()
if self.__prepare_plot():
key = self.model.get_key(index)
try:
self.plot(key, funcname)
except (ValueError, TypeError) as error:
QMessageBox.crit... | [
"def",
"plot_item",
"(",
"self",
",",
"funcname",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"if",
"self",
".",
"__prepare_plot",
"(",
")",
":",
"key",
"=",
"self",
".",
"model",
".",
"get_key",
"(",
"index",
")",
"try",
":",
"s... | Plot item | [
"Plot",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1126-L1137 | train | Plot the item of the current item | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.imshow_item | def imshow_item(self):
"""Imshow item"""
index = self.currentIndex()
if self.__prepare_plot():
key = self.model.get_key(index)
try:
if self.is_image(key):
self.show_image(key)
else:
self.imsh... | python | def imshow_item(self):
"""Imshow item"""
index = self.currentIndex()
if self.__prepare_plot():
key = self.model.get_key(index)
try:
if self.is_image(key):
self.show_image(key)
else:
self.imsh... | [
"def",
"imshow_item",
"(",
"self",
")",
":",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"if",
"self",
".",
"__prepare_plot",
"(",
")",
":",
"key",
"=",
"self",
".",
"model",
".",
"get_key",
"(",
"index",
")",
"try",
":",
"if",
"self",
"."... | Imshow item | [
"Imshow",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1140-L1154 | train | Imshow item in the main window | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.save_array | def save_array(self):
"""Save array"""
title = _( "Save array")
if self.array_filename is None:
self.array_filename = getcwd_or_home()
self.redirect_stdio.emit(False)
filename, _selfilter = getsavefilename(self, title,
... | python | def save_array(self):
"""Save array"""
title = _( "Save array")
if self.array_filename is None:
self.array_filename = getcwd_or_home()
self.redirect_stdio.emit(False)
filename, _selfilter = getsavefilename(self, title,
... | [
"def",
"save_array",
"(",
"self",
")",
":",
"title",
"=",
"_",
"(",
"\"Save array\"",
")",
"if",
"self",
".",
"array_filename",
"is",
"None",
":",
"self",
".",
"array_filename",
"=",
"getcwd_or_home",
"(",
")",
"self",
".",
"redirect_stdio",
".",
"emit",
... | Save array | [
"Save",
"array"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1157-L1177 | train | Save array of all the related objects in the current directory. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.copy | def copy(self):
"""Copy text to clipboard"""
clipboard = QApplication.clipboard()
clipl = []
for idx in self.selectedIndexes():
if not idx.isValid():
continue
obj = self.delegate.get_value(idx)
# Check if we are trying to copy a... | python | def copy(self):
"""Copy text to clipboard"""
clipboard = QApplication.clipboard()
clipl = []
for idx in self.selectedIndexes():
if not idx.isValid():
continue
obj = self.delegate.get_value(idx)
# Check if we are trying to copy a... | [
"def",
"copy",
"(",
"self",
")",
":",
"clipboard",
"=",
"QApplication",
".",
"clipboard",
"(",
")",
"clipl",
"=",
"[",
"]",
"for",
"idx",
"in",
"self",
".",
"selectedIndexes",
"(",
")",
":",
"if",
"not",
"idx",
".",
"isValid",
"(",
")",
":",
"conti... | Copy text to clipboard | [
"Copy",
"text",
"to",
"clipboard"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1180-L1225 | train | Copy text to clipboard | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.import_from_string | def import_from_string(self, text, title=None):
"""Import data from string"""
data = self.model.get_data()
# Check if data is a dict
if not hasattr(data, "keys"):
return
editor = ImportWizard(self, text, title=title,
contents_title... | python | def import_from_string(self, text, title=None):
"""Import data from string"""
data = self.model.get_data()
# Check if data is a dict
if not hasattr(data, "keys"):
return
editor = ImportWizard(self, text, title=title,
contents_title... | [
"def",
"import_from_string",
"(",
"self",
",",
"text",
",",
"title",
"=",
"None",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"# Check if data is a dict\r",
"if",
"not",
"hasattr",
"(",
"data",
",",
"\"keys\"",
")",
":",
"retu... | Import data from string | [
"Import",
"data",
"from",
"string"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1227-L1239 | train | Import data from string | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | BaseTableView.paste | def paste(self):
"""Import text/data/code from clipboard"""
clipboard = QApplication.clipboard()
cliptext = ''
if clipboard.mimeData().hasText():
cliptext = to_text_string(clipboard.text())
if cliptext.strip():
self.import_from_string(cliptext, titl... | python | def paste(self):
"""Import text/data/code from clipboard"""
clipboard = QApplication.clipboard()
cliptext = ''
if clipboard.mimeData().hasText():
cliptext = to_text_string(clipboard.text())
if cliptext.strip():
self.import_from_string(cliptext, titl... | [
"def",
"paste",
"(",
"self",
")",
":",
"clipboard",
"=",
"QApplication",
".",
"clipboard",
"(",
")",
"cliptext",
"=",
"''",
"if",
"clipboard",
".",
"mimeData",
"(",
")",
".",
"hasText",
"(",
")",
":",
"cliptext",
"=",
"to_text_string",
"(",
"clipboard",
... | Import text/data/code from clipboard | [
"Import",
"text",
"/",
"data",
"/",
"code",
"from",
"clipboard"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1242-L1252 | train | Pastes the text from the clipboard and imports it into the current object. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.remove_values | def remove_values(self, keys):
"""Remove values from data"""
data = self.model.get_data()
for key in sorted(keys, reverse=True):
data.pop(key)
self.set_data(data) | python | def remove_values(self, keys):
"""Remove values from data"""
data = self.model.get_data()
for key in sorted(keys, reverse=True):
data.pop(key)
self.set_data(data) | [
"def",
"remove_values",
"(",
"self",
",",
"keys",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"for",
"key",
"in",
"sorted",
"(",
"keys",
",",
"reverse",
"=",
"True",
")",
":",
"data",
".",
"pop",
"(",
"key",
")",
"self... | Remove values from data | [
"Remove",
"values",
"from",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1277-L1282 | train | Remove values from data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.copy_value | def copy_value(self, orig_key, new_key):
"""Copy value"""
data = self.model.get_data()
if isinstance(data, list):
data.append(data[orig_key])
if isinstance(data, set):
data.add(data[orig_key])
else:
data[new_key] = data[orig_key]
... | python | def copy_value(self, orig_key, new_key):
"""Copy value"""
data = self.model.get_data()
if isinstance(data, list):
data.append(data[orig_key])
if isinstance(data, set):
data.add(data[orig_key])
else:
data[new_key] = data[orig_key]
... | [
"def",
"copy_value",
"(",
"self",
",",
"orig_key",
",",
"new_key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"if",
"isinstance",
"(",
"data",
",",
"list",
")",
":",
"data",
".",
"append",
"(",
"data",
"[",
"orig_key",
... | Copy value | [
"Copy",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1284-L1293 | train | Copy value from one object to another. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.new_value | def new_value(self, key, value):
"""Create new value in data"""
data = self.model.get_data()
data[key] = value
self.set_data(data) | python | def new_value(self, key, value):
"""Create new value in data"""
data = self.model.get_data()
data[key] = value
self.set_data(data) | [
"def",
"new_value",
"(",
"self",
",",
"key",
",",
"value",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"data",
"[",
"key",
"]",
"=",
"value",
"self",
".",
"set_data",
"(",
"data",
")"
] | Create new value in data | [
"Create",
"new",
"value",
"in",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1295-L1299 | train | Create a new value in the data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.is_list | def is_list(self, key):
"""Return True if variable is a list or a tuple"""
data = self.model.get_data()
return isinstance(data[key], (tuple, list)) | python | def is_list(self, key):
"""Return True if variable is a list or a tuple"""
data = self.model.get_data()
return isinstance(data[key], (tuple, list)) | [
"def",
"is_list",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"isinstance",
"(",
"data",
"[",
"key",
"]",
",",
"(",
"tuple",
",",
"list",
")",
")"
] | Return True if variable is a list or a tuple | [
"Return",
"True",
"if",
"variable",
"is",
"a",
"list",
"or",
"a",
"tuple"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1301-L1304 | train | Return True if variable is a list or a tuple | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.is_set | def is_set(self, key):
"""Return True if variable is a set"""
data = self.model.get_data()
return isinstance(data[key], set) | python | def is_set(self, key):
"""Return True if variable is a set"""
data = self.model.get_data()
return isinstance(data[key], set) | [
"def",
"is_set",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"isinstance",
"(",
"data",
"[",
"key",
"]",
",",
"set",
")"
] | Return True if variable is a set | [
"Return",
"True",
"if",
"variable",
"is",
"a",
"set"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1306-L1309 | train | Return True if variable is a set | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.get_len | def get_len(self, key):
"""Return sequence length"""
data = self.model.get_data()
return len(data[key]) | python | def get_len(self, key):
"""Return sequence length"""
data = self.model.get_data()
return len(data[key]) | [
"def",
"get_len",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"len",
"(",
"data",
"[",
"key",
"]",
")"
] | Return sequence length | [
"Return",
"sequence",
"length"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1311-L1314 | train | Return sequence length | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.is_array | def is_array(self, key):
"""Return True if variable is a numpy array"""
data = self.model.get_data()
return isinstance(data[key], (ndarray, MaskedArray)) | python | def is_array(self, key):
"""Return True if variable is a numpy array"""
data = self.model.get_data()
return isinstance(data[key], (ndarray, MaskedArray)) | [
"def",
"is_array",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"isinstance",
"(",
"data",
"[",
"key",
"]",
",",
"(",
"ndarray",
",",
"MaskedArray",
")",
")"
] | Return True if variable is a numpy array | [
"Return",
"True",
"if",
"variable",
"is",
"a",
"numpy",
"array"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1316-L1319 | train | Return True if variable is a numpy array | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.is_image | def is_image(self, key):
"""Return True if variable is a PIL.Image image"""
data = self.model.get_data()
return isinstance(data[key], Image) | python | def is_image(self, key):
"""Return True if variable is a PIL.Image image"""
data = self.model.get_data()
return isinstance(data[key], Image) | [
"def",
"is_image",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"isinstance",
"(",
"data",
"[",
"key",
"]",
",",
"Image",
")"
] | Return True if variable is a PIL.Image image | [
"Return",
"True",
"if",
"variable",
"is",
"a",
"PIL",
".",
"Image",
"image"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1321-L1324 | train | Return True if variable is a PIL. Image | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.is_dict | def is_dict(self, key):
"""Return True if variable is a dictionary"""
data = self.model.get_data()
return isinstance(data[key], dict) | python | def is_dict(self, key):
"""Return True if variable is a dictionary"""
data = self.model.get_data()
return isinstance(data[key], dict) | [
"def",
"is_dict",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"isinstance",
"(",
"data",
"[",
"key",
"]",
",",
"dict",
")"
] | Return True if variable is a dictionary | [
"Return",
"True",
"if",
"variable",
"is",
"a",
"dictionary"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1326-L1329 | train | Return True if variable is a dictionary | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.get_array_shape | def get_array_shape(self, key):
"""Return array's shape"""
data = self.model.get_data()
return data[key].shape | python | def get_array_shape(self, key):
"""Return array's shape"""
data = self.model.get_data()
return data[key].shape | [
"def",
"get_array_shape",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"data",
"[",
"key",
"]",
".",
"shape"
] | Return array's shape | [
"Return",
"array",
"s",
"shape"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1331-L1334 | train | Return array s shape | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.get_array_ndim | def get_array_ndim(self, key):
"""Return array's ndim"""
data = self.model.get_data()
return data[key].ndim | python | def get_array_ndim(self, key):
"""Return array's ndim"""
data = self.model.get_data()
return data[key].ndim | [
"def",
"get_array_ndim",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"return",
"data",
"[",
"key",
"]",
".",
"ndim"
] | Return array's ndim | [
"Return",
"array",
"s",
"ndim"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1336-L1339 | train | Return array s ndim | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.oedit | def oedit(self, key):
"""Edit item"""
data = self.model.get_data()
from spyder.plugins.variableexplorer.widgets.objecteditor import (
oedit)
oedit(data[key]) | python | def oedit(self, key):
"""Edit item"""
data = self.model.get_data()
from spyder.plugins.variableexplorer.widgets.objecteditor import (
oedit)
oedit(data[key]) | [
"def",
"oedit",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"from",
"spyder",
".",
"plugins",
".",
"variableexplorer",
".",
"widgets",
".",
"objecteditor",
"import",
"(",
"oedit",
")",
"oedit",
"(",
... | Edit item | [
"Edit",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1341-L1346 | train | Edit item with given key | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.plot | def plot(self, key, funcname):
"""Plot item"""
data = self.model.get_data()
import spyder.pyplot as plt
plt.figure()
getattr(plt, funcname)(data[key])
plt.show() | python | def plot(self, key, funcname):
"""Plot item"""
data = self.model.get_data()
import spyder.pyplot as plt
plt.figure()
getattr(plt, funcname)(data[key])
plt.show() | [
"def",
"plot",
"(",
"self",
",",
"key",
",",
"funcname",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"import",
"spyder",
".",
"pyplot",
"as",
"plt",
"plt",
".",
"figure",
"(",
")",
"getattr",
"(",
"plt",
",",
"funcname",... | Plot item | [
"Plot",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1348-L1354 | train | Plot item | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.imshow | def imshow(self, key):
"""Show item's image"""
data = self.model.get_data()
import spyder.pyplot as plt
plt.figure()
plt.imshow(data[key])
plt.show() | python | def imshow(self, key):
"""Show item's image"""
data = self.model.get_data()
import spyder.pyplot as plt
plt.figure()
plt.imshow(data[key])
plt.show() | [
"def",
"imshow",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"import",
"spyder",
".",
"pyplot",
"as",
"plt",
"plt",
".",
"figure",
"(",
")",
"plt",
".",
"imshow",
"(",
"data",
"[",
"key",
"]",
... | Show item's image | [
"Show",
"item",
"s",
"image"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1356-L1362 | train | Show item s image | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.show_image | def show_image(self, key):
"""Show image (item is a PIL image)"""
data = self.model.get_data()
data[key].show() | python | def show_image(self, key):
"""Show image (item is a PIL image)"""
data = self.model.get_data()
data[key].show() | [
"def",
"show_image",
"(",
"self",
",",
"key",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"data",
"[",
"key",
"]",
".",
"show",
"(",
")"
] | Show image (item is a PIL image) | [
"Show",
"image",
"(",
"item",
"is",
"a",
"PIL",
"image",
")"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1364-L1367 | train | Show image with key | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditorTableView.refresh_menu | def refresh_menu(self):
"""Refresh context menu"""
data = self.model.get_data()
index = self.currentIndex()
condition = (not isinstance(data, (tuple, set))) and index.isValid() \
and not self.readonly
self.edit_action.setEnabled( condition )
sel... | python | def refresh_menu(self):
"""Refresh context menu"""
data = self.model.get_data()
index = self.currentIndex()
condition = (not isinstance(data, (tuple, set))) and index.isValid() \
and not self.readonly
self.edit_action.setEnabled( condition )
sel... | [
"def",
"refresh_menu",
"(",
"self",
")",
":",
"data",
"=",
"self",
".",
"model",
".",
"get_data",
"(",
")",
"index",
"=",
"self",
".",
"currentIndex",
"(",
")",
"condition",
"=",
"(",
"not",
"isinstance",
"(",
"data",
",",
"(",
"tuple",
",",
"set",
... | Refresh context menu | [
"Refresh",
"context",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1370-L1382 | train | Refresh context menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditor.setup | def setup(self, data, title='', readonly=False, width=650, remote=False,
icon=None, parent=None):
"""Setup editor."""
if isinstance(data, (dict, set)):
# dictionnary, set
self.data_copy = data.copy()
datalen = len(data)
elif isinstance(dat... | python | def setup(self, data, title='', readonly=False, width=650, remote=False,
icon=None, parent=None):
"""Setup editor."""
if isinstance(data, (dict, set)):
# dictionnary, set
self.data_copy = data.copy()
datalen = len(data)
elif isinstance(dat... | [
"def",
"setup",
"(",
"self",
",",
"data",
",",
"title",
"=",
"''",
",",
"readonly",
"=",
"False",
",",
"width",
"=",
"650",
",",
"remote",
"=",
"False",
",",
"icon",
"=",
"None",
",",
"parent",
"=",
"None",
")",
":",
"if",
"isinstance",
"(",
"dat... | Setup editor. | [
"Setup",
"editor",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1427-L1497 | train | Setup editor. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | CollectionsEditor.save_and_close_enable | def save_and_close_enable(self):
"""Handle the data change event to enable the save and close button."""
if self.btn_save_and_close:
self.btn_save_and_close.setEnabled(True)
self.btn_save_and_close.setAutoDefault(True)
self.btn_save_and_close.setDefault(True) | python | def save_and_close_enable(self):
"""Handle the data change event to enable the save and close button."""
if self.btn_save_and_close:
self.btn_save_and_close.setEnabled(True)
self.btn_save_and_close.setAutoDefault(True)
self.btn_save_and_close.setDefault(True) | [
"def",
"save_and_close_enable",
"(",
"self",
")",
":",
"if",
"self",
".",
"btn_save_and_close",
":",
"self",
".",
"btn_save_and_close",
".",
"setEnabled",
"(",
"True",
")",
"self",
".",
"btn_save_and_close",
".",
"setAutoDefault",
"(",
"True",
")",
"self",
"."... | Handle the data change event to enable the save and close button. | [
"Handle",
"the",
"data",
"change",
"event",
"to",
"enable",
"the",
"save",
"and",
"close",
"button",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1500-L1505 | train | Handle the data change event to enable the save and close button. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.get_value | def get_value(self, name):
"""Get the value of a variable"""
value = self.shellwidget.get_value(name)
# Reset temporal variable where value is saved to
# save memory
self.shellwidget._kernel_value = None
return value | python | def get_value(self, name):
"""Get the value of a variable"""
value = self.shellwidget.get_value(name)
# Reset temporal variable where value is saved to
# save memory
self.shellwidget._kernel_value = None
return value | [
"def",
"get_value",
"(",
"self",
",",
"name",
")",
":",
"value",
"=",
"self",
".",
"shellwidget",
".",
"get_value",
"(",
"name",
")",
"# Reset temporal variable where value is saved to\r",
"# save memory\r",
"self",
".",
"shellwidget",
".",
"_kernel_value",
"=",
"... | Get the value of a variable | [
"Get",
"the",
"value",
"of",
"a",
"variable"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1560-L1566 | train | Get the value of a variable | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.new_value | def new_value(self, name, value):
"""Create new value in data"""
try:
# We need to enclose values in a list to be able to send
# them to the kernel in Python 2
svalue = [cloudpickle.dumps(value, protocol=PICKLE_PROTOCOL)]
# Needed to prevent memory... | python | def new_value(self, name, value):
"""Create new value in data"""
try:
# We need to enclose values in a list to be able to send
# them to the kernel in Python 2
svalue = [cloudpickle.dumps(value, protocol=PICKLE_PROTOCOL)]
# Needed to prevent memory... | [
"def",
"new_value",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"try",
":",
"# We need to enclose values in a list to be able to send\r",
"# them to the kernel in Python 2\r",
"svalue",
"=",
"[",
"cloudpickle",
".",
"dumps",
"(",
"value",
",",
"protocol",
"=",
... | Create new value in data | [
"Create",
"new",
"value",
"in",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1568-L1587 | train | Create a new value in data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.remove_values | def remove_values(self, names):
"""Remove values from data"""
for name in names:
self.shellwidget.remove_value(name)
self.shellwidget.refresh_namespacebrowser() | python | def remove_values(self, names):
"""Remove values from data"""
for name in names:
self.shellwidget.remove_value(name)
self.shellwidget.refresh_namespacebrowser() | [
"def",
"remove_values",
"(",
"self",
",",
"names",
")",
":",
"for",
"name",
"in",
"names",
":",
"self",
".",
"shellwidget",
".",
"remove_value",
"(",
"name",
")",
"self",
".",
"shellwidget",
".",
"refresh_namespacebrowser",
"(",
")"
] | Remove values from data | [
"Remove",
"values",
"from",
"data"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1589-L1593 | train | Remove values from data | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.copy_value | def copy_value(self, orig_name, new_name):
"""Copy value"""
self.shellwidget.copy_value(orig_name, new_name)
self.shellwidget.refresh_namespacebrowser() | python | def copy_value(self, orig_name, new_name):
"""Copy value"""
self.shellwidget.copy_value(orig_name, new_name)
self.shellwidget.refresh_namespacebrowser() | [
"def",
"copy_value",
"(",
"self",
",",
"orig_name",
",",
"new_name",
")",
":",
"self",
".",
"shellwidget",
".",
"copy_value",
"(",
"orig_name",
",",
"new_name",
")",
"self",
".",
"shellwidget",
".",
"refresh_namespacebrowser",
"(",
")"
] | Copy value | [
"Copy",
"value"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1595-L1598 | train | Copy value from the current namespace browser to the new namespace browser | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.plot | def plot(self, name, funcname):
"""Plot item"""
sw = self.shellwidget
if sw._reading:
sw.dbg_exec_magic('varexp', '--%s %s' % (funcname, name))
else:
sw.execute("%%varexp --%s %s" % (funcname, name)) | python | def plot(self, name, funcname):
"""Plot item"""
sw = self.shellwidget
if sw._reading:
sw.dbg_exec_magic('varexp', '--%s %s' % (funcname, name))
else:
sw.execute("%%varexp --%s %s" % (funcname, name)) | [
"def",
"plot",
"(",
"self",
",",
"name",
",",
"funcname",
")",
":",
"sw",
"=",
"self",
".",
"shellwidget",
"if",
"sw",
".",
"_reading",
":",
"sw",
".",
"dbg_exec_magic",
"(",
"'varexp'",
",",
"'--%s %s'",
"%",
"(",
"funcname",
",",
"name",
")",
")",
... | Plot item | [
"Plot",
"item"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1636-L1642 | train | Plot a single item | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.imshow | def imshow(self, name):
"""Show item's image"""
sw = self.shellwidget
if sw._reading:
sw.dbg_exec_magic('varexp', '--imshow %s' % name)
else:
sw.execute("%%varexp --imshow %s" % name) | python | def imshow(self, name):
"""Show item's image"""
sw = self.shellwidget
if sw._reading:
sw.dbg_exec_magic('varexp', '--imshow %s' % name)
else:
sw.execute("%%varexp --imshow %s" % name) | [
"def",
"imshow",
"(",
"self",
",",
"name",
")",
":",
"sw",
"=",
"self",
".",
"shellwidget",
"if",
"sw",
".",
"_reading",
":",
"sw",
".",
"dbg_exec_magic",
"(",
"'varexp'",
",",
"'--imshow %s'",
"%",
"name",
")",
"else",
":",
"sw",
".",
"execute",
"("... | Show item's image | [
"Show",
"item",
"s",
"image"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1644-L1650 | train | Show item s image | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/variableexplorer/widgets/collectionseditor.py | RemoteCollectionsEditorTableView.show_image | def show_image(self, name):
"""Show image (item is a PIL image)"""
command = "%s.show()" % name
sw = self.shellwidget
if sw._reading:
sw.kernel_client.input(command)
else:
sw.execute(command) | python | def show_image(self, name):
"""Show image (item is a PIL image)"""
command = "%s.show()" % name
sw = self.shellwidget
if sw._reading:
sw.kernel_client.input(command)
else:
sw.execute(command) | [
"def",
"show_image",
"(",
"self",
",",
"name",
")",
":",
"command",
"=",
"\"%s.show()\"",
"%",
"name",
"sw",
"=",
"self",
".",
"shellwidget",
"if",
"sw",
".",
"_reading",
":",
"sw",
".",
"kernel_client",
".",
"input",
"(",
"command",
")",
"else",
":",
... | Show image (item is a PIL image) | [
"Show",
"image",
"(",
"item",
"is",
"a",
"PIL",
"image",
")"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/variableexplorer/widgets/collectionseditor.py#L1652-L1659 | train | Show image in the shell widget | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.kernel_id | def kernel_id(self):
"""Get kernel id"""
if self.connection_file is not None:
json_file = osp.basename(self.connection_file)
return json_file.split('.json')[0] | python | def kernel_id(self):
"""Get kernel id"""
if self.connection_file is not None:
json_file = osp.basename(self.connection_file)
return json_file.split('.json')[0] | [
"def",
"kernel_id",
"(",
"self",
")",
":",
"if",
"self",
".",
"connection_file",
"is",
"not",
"None",
":",
"json_file",
"=",
"osp",
".",
"basename",
"(",
"self",
".",
"connection_file",
")",
"return",
"json_file",
".",
"split",
"(",
"'.json'",
")",
"[",
... | Get kernel id | [
"Get",
"kernel",
"id"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L194-L198 | train | Get kernel id from the connection file | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.stderr_file | def stderr_file(self):
"""Filename to save kernel stderr output."""
stderr_file = None
if self.connection_file is not None:
stderr_file = self.kernel_id + '.stderr'
if self.stderr_dir is not None:
stderr_file = osp.join(self.stderr_dir, stderr_file)
... | python | def stderr_file(self):
"""Filename to save kernel stderr output."""
stderr_file = None
if self.connection_file is not None:
stderr_file = self.kernel_id + '.stderr'
if self.stderr_dir is not None:
stderr_file = osp.join(self.stderr_dir, stderr_file)
... | [
"def",
"stderr_file",
"(",
"self",
")",
":",
"stderr_file",
"=",
"None",
"if",
"self",
".",
"connection_file",
"is",
"not",
"None",
":",
"stderr_file",
"=",
"self",
".",
"kernel_id",
"+",
"'.stderr'",
"if",
"self",
".",
"stderr_dir",
"is",
"not",
"None",
... | Filename to save kernel stderr output. | [
"Filename",
"to",
"save",
"kernel",
"stderr",
"output",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L201-L213 | train | Returns the filename to save kernel stderr output. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.stderr_handle | def stderr_handle(self):
"""Get handle to stderr_file."""
if self.stderr_file is not None:
# Needed to prevent any error that could appear.
# See issue 6267
try:
handle = codecs.open(self.stderr_file, 'w', encoding='utf-8')
except Ex... | python | def stderr_handle(self):
"""Get handle to stderr_file."""
if self.stderr_file is not None:
# Needed to prevent any error that could appear.
# See issue 6267
try:
handle = codecs.open(self.stderr_file, 'w', encoding='utf-8')
except Ex... | [
"def",
"stderr_handle",
"(",
"self",
")",
":",
"if",
"self",
".",
"stderr_file",
"is",
"not",
"None",
":",
"# Needed to prevent any error that could appear.\r",
"# See issue 6267\r",
"try",
":",
"handle",
"=",
"codecs",
".",
"open",
"(",
"self",
".",
"stderr_file"... | Get handle to stderr_file. | [
"Get",
"handle",
"to",
"stderr_file",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L216-L228 | train | Get handle to stderr_file. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.remove_stderr_file | def remove_stderr_file(self):
"""Remove stderr_file associated with the client."""
try:
# Defer closing the stderr_handle until the client
# is closed because jupyter_client needs it open
# while it tries to restart the kernel
self.stderr_handle.clos... | python | def remove_stderr_file(self):
"""Remove stderr_file associated with the client."""
try:
# Defer closing the stderr_handle until the client
# is closed because jupyter_client needs it open
# while it tries to restart the kernel
self.stderr_handle.clos... | [
"def",
"remove_stderr_file",
"(",
"self",
")",
":",
"try",
":",
"# Defer closing the stderr_handle until the client\r",
"# is closed because jupyter_client needs it open\r",
"# while it tries to restart the kernel\r",
"self",
".",
"stderr_handle",
".",
"close",
"(",
")",
"os",
... | Remove stderr_file associated with the client. | [
"Remove",
"stderr_file",
"associated",
"with",
"the",
"client",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L230-L239 | train | Remove stderr_file associated with the client. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.configure_shellwidget | def configure_shellwidget(self, give_focus=True):
"""Configure shellwidget after kernel is started"""
if give_focus:
self.get_control().setFocus()
# Set exit callback
self.shellwidget.set_exit_callback()
# To save history
self.shellwidget.executing.... | python | def configure_shellwidget(self, give_focus=True):
"""Configure shellwidget after kernel is started"""
if give_focus:
self.get_control().setFocus()
# Set exit callback
self.shellwidget.set_exit_callback()
# To save history
self.shellwidget.executing.... | [
"def",
"configure_shellwidget",
"(",
"self",
",",
"give_focus",
"=",
"True",
")",
":",
"if",
"give_focus",
":",
"self",
".",
"get_control",
"(",
")",
".",
"setFocus",
"(",
")",
"# Set exit callback\r",
"self",
".",
"shellwidget",
".",
"set_exit_callback",
"(",... | Configure shellwidget after kernel is started | [
"Configure",
"shellwidget",
"after",
"kernel",
"is",
"started"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L241-L292 | train | Configure the shellwidget after kernel is started | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.stop_button_click_handler | def stop_button_click_handler(self):
"""Method to handle what to do when the stop button is pressed"""
self.stop_button.setDisabled(True)
# Interrupt computations or stop debugging
if not self.shellwidget._reading:
self.interrupt_kernel()
else:
self... | python | def stop_button_click_handler(self):
"""Method to handle what to do when the stop button is pressed"""
self.stop_button.setDisabled(True)
# Interrupt computations or stop debugging
if not self.shellwidget._reading:
self.interrupt_kernel()
else:
self... | [
"def",
"stop_button_click_handler",
"(",
"self",
")",
":",
"self",
".",
"stop_button",
".",
"setDisabled",
"(",
"True",
")",
"# Interrupt computations or stop debugging\r",
"if",
"not",
"self",
".",
"shellwidget",
".",
"_reading",
":",
"self",
".",
"interrupt_kernel... | Method to handle what to do when the stop button is pressed | [
"Method",
"to",
"handle",
"what",
"to",
"do",
"when",
"the",
"stop",
"button",
"is",
"pressed"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L305-L312 | train | Method to handle the stop button click event | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.show_kernel_error | def show_kernel_error(self, error):
"""Show kernel initialization errors in infowidget."""
# Replace end of line chars with <br>
eol = sourcecode.get_eol_chars(error)
if eol:
error = error.replace(eol, '<br>')
# Don't break lines in hyphens
# From htt... | python | def show_kernel_error(self, error):
"""Show kernel initialization errors in infowidget."""
# Replace end of line chars with <br>
eol = sourcecode.get_eol_chars(error)
if eol:
error = error.replace(eol, '<br>')
# Don't break lines in hyphens
# From htt... | [
"def",
"show_kernel_error",
"(",
"self",
",",
"error",
")",
":",
"# Replace end of line chars with <br>\r",
"eol",
"=",
"sourcecode",
".",
"get_eol_chars",
"(",
"error",
")",
"if",
"eol",
":",
"error",
"=",
"error",
".",
"replace",
"(",
"eol",
",",
"'<br>'",
... | Show kernel initialization errors in infowidget. | [
"Show",
"kernel",
"initialization",
"errors",
"in",
"infowidget",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L314-L339 | train | Show kernel initialization errors in infowidget. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.get_name | def get_name(self):
"""Return client name"""
if self.given_name is None:
# Name according to host
if self.hostname is None:
name = _("Console")
else:
name = self.hostname
# Adding id to name
client_id = ... | python | def get_name(self):
"""Return client name"""
if self.given_name is None:
# Name according to host
if self.hostname is None:
name = _("Console")
else:
name = self.hostname
# Adding id to name
client_id = ... | [
"def",
"get_name",
"(",
"self",
")",
":",
"if",
"self",
".",
"given_name",
"is",
"None",
":",
"# Name according to host\r",
"if",
"self",
".",
"hostname",
"is",
"None",
":",
"name",
"=",
"_",
"(",
"\"Console\"",
")",
"else",
":",
"name",
"=",
"self",
"... | Return client name | [
"Return",
"client",
"name"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L341-L357 | train | Return the name of the client | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.get_control | def get_control(self):
"""Return the text widget (or similar) to give focus to"""
# page_control is the widget used for paging
page_control = self.shellwidget._page_control
if page_control and page_control.isVisible():
return page_control
else:
retu... | python | def get_control(self):
"""Return the text widget (or similar) to give focus to"""
# page_control is the widget used for paging
page_control = self.shellwidget._page_control
if page_control and page_control.isVisible():
return page_control
else:
retu... | [
"def",
"get_control",
"(",
"self",
")",
":",
"# page_control is the widget used for paging\r",
"page_control",
"=",
"self",
".",
"shellwidget",
".",
"_page_control",
"if",
"page_control",
"and",
"page_control",
".",
"isVisible",
"(",
")",
":",
"return",
"page_control"... | Return the text widget (or similar) to give focus to | [
"Return",
"the",
"text",
"widget",
"(",
"or",
"similar",
")",
"to",
"give",
"focus",
"to"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L359-L366 | train | Return the text widget or similar to give focus to | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.get_options_menu | def get_options_menu(self):
"""Return options menu"""
env_action = create_action(
self,
_("Show environment variables"),
icon=ima.icon('environ'),
triggered=self.shellwidget.get_env
... | python | def get_options_menu(self):
"""Return options menu"""
env_action = create_action(
self,
_("Show environment variables"),
icon=ima.icon('environ'),
triggered=self.shellwidget.get_env
... | [
"def",
"get_options_menu",
"(",
"self",
")",
":",
"env_action",
"=",
"create_action",
"(",
"self",
",",
"_",
"(",
"\"Show environment variables\"",
")",
",",
"icon",
"=",
"ima",
".",
"icon",
"(",
"'environ'",
")",
",",
"triggered",
"=",
"self",
".",
"shell... | Return options menu | [
"Return",
"options",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L372-L399 | train | Return the options menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.get_toolbar_buttons | def get_toolbar_buttons(self):
"""Return toolbar buttons list."""
buttons = []
# Code to add the stop button
if self.stop_button is None:
self.stop_button = create_toolbutton(
self,
text=_("Stop"),... | python | def get_toolbar_buttons(self):
"""Return toolbar buttons list."""
buttons = []
# Code to add the stop button
if self.stop_button is None:
self.stop_button = create_toolbutton(
self,
text=_("Stop"),... | [
"def",
"get_toolbar_buttons",
"(",
"self",
")",
":",
"buttons",
"=",
"[",
"]",
"# Code to add the stop button\r",
"if",
"self",
".",
"stop_button",
"is",
"None",
":",
"self",
".",
"stop_button",
"=",
"create_toolbutton",
"(",
"self",
",",
"text",
"=",
"_",
"... | Return toolbar buttons list. | [
"Return",
"toolbar",
"buttons",
"list",
"."
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L401-L445 | train | Returns a list of toolbar buttons. | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
spyder-ide/spyder | spyder/plugins/ipythonconsole/widgets/client.py | ClientWidget.add_actions_to_context_menu | def add_actions_to_context_menu(self, menu):
"""Add actions to IPython widget context menu"""
inspect_action = create_action(self, _("Inspect current object"),
QKeySequence(get_shortcut('console',
'inspect curren... | python | def add_actions_to_context_menu(self, menu):
"""Add actions to IPython widget context menu"""
inspect_action = create_action(self, _("Inspect current object"),
QKeySequence(get_shortcut('console',
'inspect curren... | [
"def",
"add_actions_to_context_menu",
"(",
"self",
",",
"menu",
")",
":",
"inspect_action",
"=",
"create_action",
"(",
"self",
",",
"_",
"(",
"\"Inspect current object\"",
")",
",",
"QKeySequence",
"(",
"get_shortcut",
"(",
"'console'",
",",
"'inspect current object... | Add actions to IPython widget context menu | [
"Add",
"actions",
"to",
"IPython",
"widget",
"context",
"menu"
] | f76836ce1b924bcc4efd3f74f2960d26a4e528e0 | https://github.com/spyder-ide/spyder/blob/f76836ce1b924bcc4efd3f74f2960d26a4e528e0/spyder/plugins/ipythonconsole/widgets/client.py#L447-L479 | train | Add actions to IPython context menu | Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.