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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ninja-build/ninja | configure.py | Bootstrap._expand | def _expand(self, str, local_vars={}):
"""Expand $vars in a string."""
return ninja_syntax.expand(str, self.vars, local_vars) | python | def _expand(self, str, local_vars={}):
"""Expand $vars in a string."""
return ninja_syntax.expand(str, self.vars, local_vars) | [
"def",
"_expand",
"(",
"self",
",",
"str",
",",
"local_vars",
"=",
"{",
"}",
")",
":",
"return",
"ninja_syntax",
".",
"expand",
"(",
"str",
",",
"self",
".",
"vars",
",",
"local_vars",
")"
] | Expand $vars in a string. | [
"Expand",
"$vars",
"in",
"a",
"string",
"."
] | 2e64645749ff91eff2f999f03f55da360ae5913d | https://github.com/ninja-build/ninja/blob/2e64645749ff91eff2f999f03f55da360ae5913d/configure.py#L176-L178 | train | Expand the given string with the given variables. | 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... |
ninja-build/ninja | configure.py | Bootstrap._run_command | def _run_command(self, cmdline):
"""Run a subcommand, quietly. Prints the full command on error."""
try:
if self.verbose:
print(cmdline)
subprocess.check_call(cmdline, shell=True)
except subprocess.CalledProcessError:
print('when running: ', c... | python | def _run_command(self, cmdline):
"""Run a subcommand, quietly. Prints the full command on error."""
try:
if self.verbose:
print(cmdline)
subprocess.check_call(cmdline, shell=True)
except subprocess.CalledProcessError:
print('when running: ', c... | [
"def",
"_run_command",
"(",
"self",
",",
"cmdline",
")",
":",
"try",
":",
"if",
"self",
".",
"verbose",
":",
"print",
"(",
"cmdline",
")",
"subprocess",
".",
"check_call",
"(",
"cmdline",
",",
"shell",
"=",
"True",
")",
"except",
"subprocess",
".",
"Ca... | Run a subcommand, quietly. Prints the full command on error. | [
"Run",
"a",
"subcommand",
"quietly",
".",
"Prints",
"the",
"full",
"command",
"on",
"error",
"."
] | 2e64645749ff91eff2f999f03f55da360ae5913d | https://github.com/ninja-build/ninja/blob/2e64645749ff91eff2f999f03f55da360ae5913d/configure.py#L184-L192 | train | Run a subcommand quietly. Prints the full command on error. | 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... |
ninja-build/ninja | misc/write_fake_manifests.py | paretoint | def paretoint(avg, alpha):
"""Returns a random integer that's avg on average, following a power law.
alpha determines the shape of the power curve. alpha has to be larger
than 1. The closer alpha is to 1, the higher the variation of the returned
numbers."""
return int(random.paretovariate(alpha) * a... | python | def paretoint(avg, alpha):
"""Returns a random integer that's avg on average, following a power law.
alpha determines the shape of the power curve. alpha has to be larger
than 1. The closer alpha is to 1, the higher the variation of the returned
numbers."""
return int(random.paretovariate(alpha) * a... | [
"def",
"paretoint",
"(",
"avg",
",",
"alpha",
")",
":",
"return",
"int",
"(",
"random",
".",
"paretovariate",
"(",
"alpha",
")",
"*",
"avg",
"/",
"(",
"alpha",
"/",
"(",
"alpha",
"-",
"1",
")",
")",
")"
] | Returns a random integer that's avg on average, following a power law.
alpha determines the shape of the power curve. alpha has to be larger
than 1. The closer alpha is to 1, the higher the variation of the returned
numbers. | [
"Returns",
"a",
"random",
"integer",
"that",
"s",
"avg",
"on",
"average",
"following",
"a",
"power",
"law",
".",
"alpha",
"determines",
"the",
"shape",
"of",
"the",
"power",
"curve",
".",
"alpha",
"has",
"to",
"be",
"larger",
"than",
"1",
".",
"The",
"... | 2e64645749ff91eff2f999f03f55da360ae5913d | https://github.com/ninja-build/ninja/blob/2e64645749ff91eff2f999f03f55da360ae5913d/misc/write_fake_manifests.py#L25-L30 | train | Returns a random integer that s avg on average following a power law. | 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... |
ninja-build/ninja | misc/write_fake_manifests.py | write_master_ninja | def write_master_ninja(master_ninja, targets):
"""Writes master build.ninja file, referencing all given subninjas."""
master_ninja.variable('cxx', 'c++')
master_ninja.variable('ld', '$cxx')
if sys.platform == 'darwin':
master_ninja.variable('alink', 'libtool -static')
else:
master_ni... | python | def write_master_ninja(master_ninja, targets):
"""Writes master build.ninja file, referencing all given subninjas."""
master_ninja.variable('cxx', 'c++')
master_ninja.variable('ld', '$cxx')
if sys.platform == 'darwin':
master_ninja.variable('alink', 'libtool -static')
else:
master_ni... | [
"def",
"write_master_ninja",
"(",
"master_ninja",
",",
"targets",
")",
":",
"master_ninja",
".",
"variable",
"(",
"'cxx'",
",",
"'c++'",
")",
"master_ninja",
".",
"variable",
"(",
"'ld'",
",",
"'$cxx'",
")",
"if",
"sys",
".",
"platform",
"==",
"'darwin'",
... | Writes master build.ninja file, referencing all given subninjas. | [
"Writes",
"master",
"build",
".",
"ninja",
"file",
"referencing",
"all",
"given",
"subninjas",
"."
] | 2e64645749ff91eff2f999f03f55da360ae5913d | https://github.com/ninja-build/ninja/blob/2e64645749ff91eff2f999f03f55da360ae5913d/misc/write_fake_manifests.py#L177-L211 | train | Writes master build. ninja file referencing all given subninjas. | 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... |
ninja-build/ninja | misc/write_fake_manifests.py | FileWriter | def FileWriter(path):
"""Context manager for a ninja_syntax object writing to a file."""
try:
os.makedirs(os.path.dirname(path))
except OSError:
pass
f = open(path, 'w')
yield ninja_syntax.Writer(f)
f.close() | python | def FileWriter(path):
"""Context manager for a ninja_syntax object writing to a file."""
try:
os.makedirs(os.path.dirname(path))
except OSError:
pass
f = open(path, 'w')
yield ninja_syntax.Writer(f)
f.close() | [
"def",
"FileWriter",
"(",
"path",
")",
":",
"try",
":",
"os",
".",
"makedirs",
"(",
"os",
".",
"path",
".",
"dirname",
"(",
"path",
")",
")",
"except",
"OSError",
":",
"pass",
"f",
"=",
"open",
"(",
"path",
",",
"'w'",
")",
"yield",
"ninja_syntax",... | Context manager for a ninja_syntax object writing to a file. | [
"Context",
"manager",
"for",
"a",
"ninja_syntax",
"object",
"writing",
"to",
"a",
"file",
"."
] | 2e64645749ff91eff2f999f03f55da360ae5913d | https://github.com/ninja-build/ninja/blob/2e64645749ff91eff2f999f03f55da360ae5913d/misc/write_fake_manifests.py#L215-L223 | train | Context manager for a ninja_syntax object writing to a 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... |
nteract/nteract | applications/jupyter-extension/nteract_on_jupyter/extension.py | load_jupyter_server_extension | def load_jupyter_server_extension(nbapp):
"""Load the server extension.
"""
here = PACKAGE_DIR
nbapp.log.info('nteract extension loaded from %s' % here)
app_dir = here # bundle is part of the python package
web_app = nbapp.web_app
config = NteractConfig(parent=nbapp)
# original
#... | python | def load_jupyter_server_extension(nbapp):
"""Load the server extension.
"""
here = PACKAGE_DIR
nbapp.log.info('nteract extension loaded from %s' % here)
app_dir = here # bundle is part of the python package
web_app = nbapp.web_app
config = NteractConfig(parent=nbapp)
# original
#... | [
"def",
"load_jupyter_server_extension",
"(",
"nbapp",
")",
":",
"here",
"=",
"PACKAGE_DIR",
"nbapp",
".",
"log",
".",
"info",
"(",
"'nteract extension loaded from %s'",
"%",
"here",
")",
"app_dir",
"=",
"here",
"# bundle is part of the python package",
"web_app",
"=",... | Load the server extension. | [
"Load",
"the",
"server",
"extension",
"."
] | f63a01c4067b05541ebddd3932345d7102ea3e5b | https://github.com/nteract/nteract/blob/f63a01c4067b05541ebddd3932345d7102ea3e5b/applications/jupyter-extension/nteract_on_jupyter/extension.py#L18-L53 | train | Load the server extension. | 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... |
nteract/nteract | applications/jupyter-extension/nteract_on_jupyter/handlers.py | add_handlers | def add_handlers(web_app, config):
"""Add the appropriate handlers to the web app.
"""
base_url = web_app.settings['base_url']
url = ujoin(base_url, config.page_url)
assets_dir = config.assets_dir
package_file = os.path.join(assets_dir, 'package.json')
with open(package_file) as fid:
... | python | def add_handlers(web_app, config):
"""Add the appropriate handlers to the web app.
"""
base_url = web_app.settings['base_url']
url = ujoin(base_url, config.page_url)
assets_dir = config.assets_dir
package_file = os.path.join(assets_dir, 'package.json')
with open(package_file) as fid:
... | [
"def",
"add_handlers",
"(",
"web_app",
",",
"config",
")",
":",
"base_url",
"=",
"web_app",
".",
"settings",
"[",
"'base_url'",
"]",
"url",
"=",
"ujoin",
"(",
"base_url",
",",
"config",
".",
"page_url",
")",
"assets_dir",
"=",
"config",
".",
"assets_dir",
... | Add the appropriate handlers to the web app. | [
"Add",
"the",
"appropriate",
"handlers",
"to",
"the",
"web",
"app",
"."
] | f63a01c4067b05541ebddd3932345d7102ea3e5b | https://github.com/nteract/nteract/blob/f63a01c4067b05541ebddd3932345d7102ea3e5b/applications/jupyter-extension/nteract_on_jupyter/handlers.py#L83-L106 | train | Add the appropriate handlers to the web app. | 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... |
nteract/nteract | applications/jupyter-extension/nteract_on_jupyter/semver.py | semver | def semver(version, loose):
if isinstance(version, SemVer):
if version.loose == loose:
return version
else:
version = version.version
elif not isinstance(version, string_type): # xxx:
raise ValueError("Invalid Version: {}".format(version))
"""
if (!(this... | python | def semver(version, loose):
if isinstance(version, SemVer):
if version.loose == loose:
return version
else:
version = version.version
elif not isinstance(version, string_type): # xxx:
raise ValueError("Invalid Version: {}".format(version))
"""
if (!(this... | [
"def",
"semver",
"(",
"version",
",",
"loose",
")",
":",
"if",
"isinstance",
"(",
"version",
",",
"SemVer",
")",
":",
"if",
"version",
".",
"loose",
"==",
"loose",
":",
"return",
"version",
"else",
":",
"version",
"=",
"version",
".",
"version",
"elif"... | if (!(this instanceof SemVer))
return new SemVer(version, loose); | [
"if",
"(",
"!",
"(",
"this",
"instanceof",
"SemVer",
"))",
"return",
"new",
"SemVer",
"(",
"version",
"loose",
")",
";"
] | f63a01c4067b05541ebddd3932345d7102ea3e5b | https://github.com/nteract/nteract/blob/f63a01c4067b05541ebddd3932345d7102ea3e5b/applications/jupyter-extension/nteract_on_jupyter/semver.py#L357-L370 | train | Returns a new version object for the given version. | 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... |
cjhutto/vaderSentiment | additional_resources/build_emoji_lexicon.py | get_list_from_file | def get_list_from_file(file_name):
"""read the lines from a file into a list"""
with open(file_name, mode='r', encoding='utf-8') as f1:
lst = f1.readlines()
return lst | python | def get_list_from_file(file_name):
"""read the lines from a file into a list"""
with open(file_name, mode='r', encoding='utf-8') as f1:
lst = f1.readlines()
return lst | [
"def",
"get_list_from_file",
"(",
"file_name",
")",
":",
"with",
"open",
"(",
"file_name",
",",
"mode",
"=",
"'r'",
",",
"encoding",
"=",
"'utf-8'",
")",
"as",
"f1",
":",
"lst",
"=",
"f1",
".",
"readlines",
"(",
")",
"return",
"lst"
] | read the lines from a file into a list | [
"read",
"the",
"lines",
"from",
"a",
"file",
"into",
"a",
"list"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/additional_resources/build_emoji_lexicon.py#L7-L11 | train | read the lines from a file into a 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... |
cjhutto/vaderSentiment | additional_resources/build_emoji_lexicon.py | append_to_file | def append_to_file(file_name, line_data):
"""append a line of text to a file"""
with open(file_name, mode='a', encoding='utf-8') as f1:
f1.write(line_data)
f1.write("\n") | python | def append_to_file(file_name, line_data):
"""append a line of text to a file"""
with open(file_name, mode='a', encoding='utf-8') as f1:
f1.write(line_data)
f1.write("\n") | [
"def",
"append_to_file",
"(",
"file_name",
",",
"line_data",
")",
":",
"with",
"open",
"(",
"file_name",
",",
"mode",
"=",
"'a'",
",",
"encoding",
"=",
"'utf-8'",
")",
"as",
"f1",
":",
"f1",
".",
"write",
"(",
"line_data",
")",
"f1",
".",
"write",
"(... | append a line of text to a file | [
"append",
"a",
"line",
"of",
"text",
"to",
"a",
"file"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/additional_resources/build_emoji_lexicon.py#L14-L18 | train | append a line of text to a 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | negated | def negated(input_words, include_nt=True):
"""
Determine if input contains negation words
"""
input_words = [str(w).lower() for w in input_words]
neg_words = []
neg_words.extend(NEGATE)
for word in neg_words:
if word in input_words:
return True
if include_nt:
... | python | def negated(input_words, include_nt=True):
"""
Determine if input contains negation words
"""
input_words = [str(w).lower() for w in input_words]
neg_words = []
neg_words.extend(NEGATE)
for word in neg_words:
if word in input_words:
return True
if include_nt:
... | [
"def",
"negated",
"(",
"input_words",
",",
"include_nt",
"=",
"True",
")",
":",
"input_words",
"=",
"[",
"str",
"(",
"w",
")",
".",
"lower",
"(",
")",
"for",
"w",
"in",
"input_words",
"]",
"neg_words",
"=",
"[",
"]",
"neg_words",
".",
"extend",
"(",
... | Determine if input contains negation words | [
"Determine",
"if",
"input",
"contains",
"negation",
"words"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L84-L102 | train | Determines if input contains negation words
| 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | allcap_differential | def allcap_differential(words):
"""
Check whether just some words in the input are ALL CAPS
:param list words: The words to inspect
:returns: `True` if some but not all items in `words` are ALL CAPS
"""
is_different = False
allcap_words = 0
for word in words:
if word.isupper():
... | python | def allcap_differential(words):
"""
Check whether just some words in the input are ALL CAPS
:param list words: The words to inspect
:returns: `True` if some but not all items in `words` are ALL CAPS
"""
is_different = False
allcap_words = 0
for word in words:
if word.isupper():
... | [
"def",
"allcap_differential",
"(",
"words",
")",
":",
"is_different",
"=",
"False",
"allcap_words",
"=",
"0",
"for",
"word",
"in",
"words",
":",
"if",
"word",
".",
"isupper",
"(",
")",
":",
"allcap_words",
"+=",
"1",
"cap_differential",
"=",
"len",
"(",
... | Check whether just some words in the input are ALL CAPS
:param list words: The words to inspect
:returns: `True` if some but not all items in `words` are ALL CAPS | [
"Check",
"whether",
"just",
"some",
"words",
"in",
"the",
"input",
"are",
"ALL",
"CAPS",
":",
"param",
"list",
"words",
":",
"The",
"words",
"to",
"inspect",
":",
"returns",
":",
"True",
"if",
"some",
"but",
"not",
"all",
"items",
"in",
"words",
"are",... | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L119-L133 | train | Checks whether all items in words are ALL CAPS
| 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | scalar_inc_dec | def scalar_inc_dec(word, valence, is_cap_diff):
"""
Check if the preceding words increase, decrease, or negate/nullify the
valence
"""
scalar = 0.0
word_lower = word.lower()
if word_lower in BOOSTER_DICT:
scalar = BOOSTER_DICT[word_lower]
if valence < 0:
scalar *=... | python | def scalar_inc_dec(word, valence, is_cap_diff):
"""
Check if the preceding words increase, decrease, or negate/nullify the
valence
"""
scalar = 0.0
word_lower = word.lower()
if word_lower in BOOSTER_DICT:
scalar = BOOSTER_DICT[word_lower]
if valence < 0:
scalar *=... | [
"def",
"scalar_inc_dec",
"(",
"word",
",",
"valence",
",",
"is_cap_diff",
")",
":",
"scalar",
"=",
"0.0",
"word_lower",
"=",
"word",
".",
"lower",
"(",
")",
"if",
"word_lower",
"in",
"BOOSTER_DICT",
":",
"scalar",
"=",
"BOOSTER_DICT",
"[",
"word_lower",
"]... | Check if the preceding words increase, decrease, or negate/nullify the
valence | [
"Check",
"if",
"the",
"preceding",
"words",
"increase",
"decrease",
"or",
"negate",
"/",
"nullify",
"the",
"valence"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L136-L153 | train | Calculate the scalar value for a given word. | 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | SentiText._words_plus_punc | def _words_plus_punc(self):
"""
Returns mapping of form:
{
'cat,': 'cat',
',cat': 'cat',
}
"""
no_punc_text = REGEX_REMOVE_PUNCTUATION.sub('', self.text)
# removes punctuation (but loses emoticons & contractions)
words_only = no_pun... | python | def _words_plus_punc(self):
"""
Returns mapping of form:
{
'cat,': 'cat',
',cat': 'cat',
}
"""
no_punc_text = REGEX_REMOVE_PUNCTUATION.sub('', self.text)
# removes punctuation (but loses emoticons & contractions)
words_only = no_pun... | [
"def",
"_words_plus_punc",
"(",
"self",
")",
":",
"no_punc_text",
"=",
"REGEX_REMOVE_PUNCTUATION",
".",
"sub",
"(",
"''",
",",
"self",
".",
"text",
")",
"# removes punctuation (but loses emoticons & contractions)",
"words_only",
"=",
"no_punc_text",
".",
"split",
"(",... | Returns mapping of form:
{
'cat,': 'cat',
',cat': 'cat',
} | [
"Returns",
"mapping",
"of",
"form",
":",
"{",
"cat",
":",
"cat",
"cat",
":",
"cat",
"}"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L170-L188 | train | Returns a dictionary of words with punctuation added to the log entry. | 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | SentiText._words_and_emoticons | def _words_and_emoticons(self):
"""
Removes leading and trailing puncutation
Leaves contractions and most emoticons
Does not preserve punc-plus-letter emoticons (e.g. :D)
"""
wes = self.text.split()
words_punc_dict = self._words_plus_punc()
wes = [we f... | python | def _words_and_emoticons(self):
"""
Removes leading and trailing puncutation
Leaves contractions and most emoticons
Does not preserve punc-plus-letter emoticons (e.g. :D)
"""
wes = self.text.split()
words_punc_dict = self._words_plus_punc()
wes = [we f... | [
"def",
"_words_and_emoticons",
"(",
"self",
")",
":",
"wes",
"=",
"self",
".",
"text",
".",
"split",
"(",
")",
"words_punc_dict",
"=",
"self",
".",
"_words_plus_punc",
"(",
")",
"wes",
"=",
"[",
"we",
"for",
"we",
"in",
"wes",
"if",
"len",
"(",
"we",... | Removes leading and trailing puncutation
Leaves contractions and most emoticons
Does not preserve punc-plus-letter emoticons (e.g. :D) | [
"Removes",
"leading",
"and",
"trailing",
"puncutation",
"Leaves",
"contractions",
"and",
"most",
"emoticons",
"Does",
"not",
"preserve",
"punc",
"-",
"plus",
"-",
"letter",
"emoticons",
"(",
"e",
".",
"g",
".",
":",
"D",
")"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L190-L202 | train | Returns a list of words and emoticons from the text. | 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | SentimentIntensityAnalyzer.make_lex_dict | def make_lex_dict(self):
"""
Convert lexicon file to a dictionary
"""
lex_dict = {}
for line in self.lexicon_full_filepath.split('\n'):
(word, measure) = line.strip().split('\t')[0:2]
lex_dict[word] = float(measure)
return lex_dict | python | def make_lex_dict(self):
"""
Convert lexicon file to a dictionary
"""
lex_dict = {}
for line in self.lexicon_full_filepath.split('\n'):
(word, measure) = line.strip().split('\t')[0:2]
lex_dict[word] = float(measure)
return lex_dict | [
"def",
"make_lex_dict",
"(",
"self",
")",
":",
"lex_dict",
"=",
"{",
"}",
"for",
"line",
"in",
"self",
".",
"lexicon_full_filepath",
".",
"split",
"(",
"'\\n'",
")",
":",
"(",
"word",
",",
"measure",
")",
"=",
"line",
".",
"strip",
"(",
")",
".",
"... | Convert lexicon file to a dictionary | [
"Convert",
"lexicon",
"file",
"to",
"a",
"dictionary"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L222-L230 | train | Convert lexicon file to 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | SentimentIntensityAnalyzer.make_emoji_dict | def make_emoji_dict(self):
"""
Convert emoji lexicon file to a dictionary
"""
emoji_dict = {}
for line in self.emoji_full_filepath.split('\n'):
(emoji, description) = line.strip().split('\t')[0:2]
emoji_dict[emoji] = description
return emoji_dict | python | def make_emoji_dict(self):
"""
Convert emoji lexicon file to a dictionary
"""
emoji_dict = {}
for line in self.emoji_full_filepath.split('\n'):
(emoji, description) = line.strip().split('\t')[0:2]
emoji_dict[emoji] = description
return emoji_dict | [
"def",
"make_emoji_dict",
"(",
"self",
")",
":",
"emoji_dict",
"=",
"{",
"}",
"for",
"line",
"in",
"self",
".",
"emoji_full_filepath",
".",
"split",
"(",
"'\\n'",
")",
":",
"(",
"emoji",
",",
"description",
")",
"=",
"line",
".",
"strip",
"(",
")",
"... | Convert emoji lexicon file to a dictionary | [
"Convert",
"emoji",
"lexicon",
"file",
"to",
"a",
"dictionary"
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L232-L240 | train | Convert the emoji lexicon file to 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... |
cjhutto/vaderSentiment | vaderSentiment/vaderSentiment.py | SentimentIntensityAnalyzer.polarity_scores | def polarity_scores(self, text):
"""
Return a float for sentiment strength based on the input text.
Positive values are positive valence, negative value are negative
valence.
"""
# convert emojis to their textual descriptions
text_token_list = text.split()
... | python | def polarity_scores(self, text):
"""
Return a float for sentiment strength based on the input text.
Positive values are positive valence, negative value are negative
valence.
"""
# convert emojis to their textual descriptions
text_token_list = text.split()
... | [
"def",
"polarity_scores",
"(",
"self",
",",
"text",
")",
":",
"# convert emojis to their textual descriptions",
"text_token_list",
"=",
"text",
".",
"split",
"(",
")",
"text_no_emoji_lst",
"=",
"[",
"]",
"for",
"token",
"in",
"text_token_list",
":",
"if",
"token",... | Return a float for sentiment strength based on the input text.
Positive values are positive valence, negative value are negative
valence. | [
"Return",
"a",
"float",
"for",
"sentiment",
"strength",
"based",
"on",
"the",
"input",
"text",
".",
"Positive",
"values",
"are",
"positive",
"valence",
"negative",
"value",
"are",
"negative",
"valence",
"."
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/vaderSentiment/vaderSentiment.py#L242-L282 | train | Return a dict of sentiment strength based on the input text. | 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... |
cjhutto/vaderSentiment | setup.py | read | def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
return f.read() | python | def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
return f.read() | [
"def",
"read",
"(",
"*",
"parts",
")",
":",
"with",
"codecs",
".",
"open",
"(",
"os",
".",
"path",
".",
"join",
"(",
"HERE",
",",
"*",
"parts",
")",
",",
"\"rb\"",
",",
"\"utf-8\"",
")",
"as",
"f",
":",
"return",
"f",
".",
"read",
"(",
")"
] | Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding. | [
"Build",
"an",
"absolute",
"path",
"from",
"*",
"parts",
"*",
"and",
"and",
"return",
"the",
"contents",
"of",
"the",
"resulting",
"file",
".",
"Assume",
"UTF",
"-",
"8",
"encoding",
"."
] | cfc2bce747afb2c49799c1de1dcf517358948d71 | https://github.com/cjhutto/vaderSentiment/blob/cfc2bce747afb2c49799c1de1dcf517358948d71/setup.py#L6-L12 | train | Read the contents of the
from the given path and return the contents of the
. | 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... |
buildbot/buildbot | master/buildbot/changes/mail.py | CVSMaildirSource.parse | def parse(self, m, prefix=None):
"""Parse messages sent by the 'buildbot-cvs-mail' program.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a one-server
# cvs-over-rsh environment rather than the ... | python | def parse(self, m, prefix=None):
"""Parse messages sent by the 'buildbot-cvs-mail' program.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a one-server
# cvs-over-rsh environment rather than the ... | [
"def",
"parse",
"(",
"self",
",",
"m",
",",
"prefix",
"=",
"None",
")",
":",
"# The mail is sent from the person doing the checkin. Assume that the",
"# local username is enough to identify them (this assumes a one-server",
"# cvs-over-rsh environment rather than the server-dirs-shared-o... | Parse messages sent by the 'buildbot-cvs-mail' program. | [
"Parse",
"messages",
"sent",
"by",
"the",
"buildbot",
"-",
"cvs",
"-",
"mail",
"program",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/mail.py#L96-L263 | train | Parse a buildbot - cvs - mail message and return a dict of buildbot - cvs - mail attributes. | 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... |
buildbot/buildbot | master/buildbot/changes/mail.py | SVNCommitEmailMaildirSource.parse | def parse(self, m, prefix=None):
"""Parse messages sent by the svn 'commit-email.pl' trigger.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a one-server
# cvs-over-rsh environment rather than t... | python | def parse(self, m, prefix=None):
"""Parse messages sent by the svn 'commit-email.pl' trigger.
"""
# The mail is sent from the person doing the checkin. Assume that the
# local username is enough to identify them (this assumes a one-server
# cvs-over-rsh environment rather than t... | [
"def",
"parse",
"(",
"self",
",",
"m",
",",
"prefix",
"=",
"None",
")",
":",
"# The mail is sent from the person doing the checkin. Assume that the",
"# local username is enough to identify them (this assumes a one-server",
"# cvs-over-rsh environment rather than the server-dirs-shared-o... | Parse messages sent by the svn 'commit-email.pl' trigger. | [
"Parse",
"messages",
"sent",
"by",
"the",
"svn",
"commit",
"-",
"email",
".",
"pl",
"trigger",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/mail.py#L294-L389 | train | Parse the message body from the svn commit - email. pl trigger. | 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... |
buildbot/buildbot | master/buildbot/changes/mail.py | BzrLaunchpadEmailMaildirSource.parse | def parse(self, m, prefix=None):
"""Parse branch notification messages sent by Launchpad.
"""
subject = m["subject"]
match = re.search(r"^\s*\[Branch\s+([^]]+)\]", subject)
if match:
repository = match.group(1)
else:
repository = None
# P... | python | def parse(self, m, prefix=None):
"""Parse branch notification messages sent by Launchpad.
"""
subject = m["subject"]
match = re.search(r"^\s*\[Branch\s+([^]]+)\]", subject)
if match:
repository = match.group(1)
else:
repository = None
# P... | [
"def",
"parse",
"(",
"self",
",",
"m",
",",
"prefix",
"=",
"None",
")",
":",
"subject",
"=",
"m",
"[",
"\"subject\"",
"]",
"match",
"=",
"re",
".",
"search",
"(",
"r\"^\\s*\\[Branch\\s+([^]]+)\\]\"",
",",
"subject",
")",
"if",
"match",
":",
"repository",... | Parse branch notification messages sent by Launchpad. | [
"Parse",
"branch",
"notification",
"messages",
"sent",
"by",
"Launchpad",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/mail.py#L430-L531 | train | Parse the branch notification message. | 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... |
buildbot/buildbot | master/buildbot/process/remotetransfer.py | FileWriter.remote_write | def remote_write(self, data):
"""
Called from remote worker to write L{data} to L{fp} within boundaries
of L{maxsize}
@type data: C{string}
@param data: String of data to write
"""
data = unicode2bytes(data)
if self.remaining is not None:
if ... | python | def remote_write(self, data):
"""
Called from remote worker to write L{data} to L{fp} within boundaries
of L{maxsize}
@type data: C{string}
@param data: String of data to write
"""
data = unicode2bytes(data)
if self.remaining is not None:
if ... | [
"def",
"remote_write",
"(",
"self",
",",
"data",
")",
":",
"data",
"=",
"unicode2bytes",
"(",
"data",
")",
"if",
"self",
".",
"remaining",
"is",
"not",
"None",
":",
"if",
"len",
"(",
"data",
")",
">",
"self",
".",
"remaining",
":",
"data",
"=",
"da... | Called from remote worker to write L{data} to L{fp} within boundaries
of L{maxsize}
@type data: C{string}
@param data: String of data to write | [
"Called",
"from",
"remote",
"worker",
"to",
"write",
"L",
"{",
"data",
"}",
"to",
"L",
"{",
"fp",
"}",
"within",
"boundaries",
"of",
"L",
"{",
"maxsize",
"}"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotetransfer.py#L51-L66 | train | Called from remote worker to write data to the local 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... |
buildbot/buildbot | master/buildbot/process/remotetransfer.py | FileWriter.remote_close | def remote_close(self):
"""
Called by remote worker to state that no more data will be transferred
"""
self.fp.close()
self.fp = None
# on windows, os.rename does not automatically unlink, so do it
# manually
if os.path.exists(self.destfile):
o... | python | def remote_close(self):
"""
Called by remote worker to state that no more data will be transferred
"""
self.fp.close()
self.fp = None
# on windows, os.rename does not automatically unlink, so do it
# manually
if os.path.exists(self.destfile):
o... | [
"def",
"remote_close",
"(",
"self",
")",
":",
"self",
".",
"fp",
".",
"close",
"(",
")",
"self",
".",
"fp",
"=",
"None",
"# on windows, os.rename does not automatically unlink, so do it",
"# manually",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
... | Called by remote worker to state that no more data will be transferred | [
"Called",
"by",
"remote",
"worker",
"to",
"state",
"that",
"no",
"more",
"data",
"will",
"be",
"transferred"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotetransfer.py#L71-L84 | train | Called by remote worker to state that no more data will be transferred | 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... |
buildbot/buildbot | master/buildbot/process/remotetransfer.py | DirectoryWriter.remote_unpack | def remote_unpack(self):
"""
Called by remote worker to state that no more data will be transferred
"""
# Make sure remote_close is called, otherwise atomic rename won't happen
self.remote_close()
# Map configured compression to a TarFile setting
if self.compress... | python | def remote_unpack(self):
"""
Called by remote worker to state that no more data will be transferred
"""
# Make sure remote_close is called, otherwise atomic rename won't happen
self.remote_close()
# Map configured compression to a TarFile setting
if self.compress... | [
"def",
"remote_unpack",
"(",
"self",
")",
":",
"# Make sure remote_close is called, otherwise atomic rename won't happen",
"self",
".",
"remote_close",
"(",
")",
"# Map configured compression to a TarFile setting",
"if",
"self",
".",
"compress",
"==",
"'bz2'",
":",
"mode",
... | Called by remote worker to state that no more data will be transferred | [
"Called",
"by",
"remote",
"worker",
"to",
"state",
"that",
"no",
"more",
"data",
"will",
"be",
"transferred"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotetransfer.py#L114-L133 | train | Unpack the archive and clean up after self. | 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... |
buildbot/buildbot | master/buildbot/process/remotetransfer.py | FileReader.remote_read | def remote_read(self, maxlength):
"""
Called from remote worker to read at most L{maxlength} bytes of data
@type maxlength: C{integer}
@param maxlength: Maximum number of data bytes that can be returned
@return: Data read from L{fp}
@rtype: C{string} of bytes read from... | python | def remote_read(self, maxlength):
"""
Called from remote worker to read at most L{maxlength} bytes of data
@type maxlength: C{integer}
@param maxlength: Maximum number of data bytes that can be returned
@return: Data read from L{fp}
@rtype: C{string} of bytes read from... | [
"def",
"remote_read",
"(",
"self",
",",
"maxlength",
")",
":",
"if",
"self",
".",
"fp",
"is",
"None",
":",
"return",
"''",
"data",
"=",
"self",
".",
"fp",
".",
"read",
"(",
"maxlength",
")",
"return",
"data"
] | Called from remote worker to read at most L{maxlength} bytes of data
@type maxlength: C{integer}
@param maxlength: Maximum number of data bytes that can be returned
@return: Data read from L{fp}
@rtype: C{string} of bytes read from file | [
"Called",
"from",
"remote",
"worker",
"to",
"read",
"at",
"most",
"L",
"{",
"maxlength",
"}",
"bytes",
"of",
"data"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotetransfer.py#L145-L159 | train | Called from remote worker to read at most L{maxlength} bytes of data from 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... |
buildbot/buildbot | master/buildbot/steps/cmake.py | CMake.run | def run(self):
"""
run CMake
"""
command = [self.cmake]
if self.generator:
command.extend([
'-G', self.generator
])
if self.path:
command.append(self.path)
if self.definitions is not None:
for item... | python | def run(self):
"""
run CMake
"""
command = [self.cmake]
if self.generator:
command.extend([
'-G', self.generator
])
if self.path:
command.append(self.path)
if self.definitions is not None:
for item... | [
"def",
"run",
"(",
"self",
")",
":",
"command",
"=",
"[",
"self",
".",
"cmake",
"]",
"if",
"self",
".",
"generator",
":",
"command",
".",
"extend",
"(",
"[",
"'-G'",
",",
"self",
".",
"generator",
"]",
")",
"if",
"self",
".",
"path",
":",
"comman... | run CMake | [
"run",
"CMake"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/cmake.py#L62-L87 | train | run CMake
| 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... |
buildbot/buildbot | master/buildbot/process/remotecommand.py | RemoteCommand.remote_update | def remote_update(self, updates):
"""
I am called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.sendUpdate} so
I can receive updates from the running remote command.
@type updates: list of [object, int]
@param updates: list of updates from the remote comma... | python | def remote_update(self, updates):
"""
I am called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.sendUpdate} so
I can receive updates from the running remote command.
@type updates: list of [object, int]
@param updates: list of updates from the remote comma... | [
"def",
"remote_update",
"(",
"self",
",",
"updates",
")",
":",
"updates",
"=",
"decode",
"(",
"updates",
")",
"self",
".",
"worker",
".",
"messageReceivedFromWorker",
"(",
")",
"max_updatenum",
"=",
"0",
"for",
"(",
"update",
",",
"num",
")",
"in",
"upda... | I am called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.sendUpdate} so
I can receive updates from the running remote command.
@type updates: list of [object, int]
@param updates: list of updates from the remote command | [
"I",
"am",
"called",
"by",
"the",
"worker",
"s",
"L",
"{",
"buildbot_worker",
".",
"base",
".",
"WorkerForBuilderBase",
".",
"sendUpdate",
"}",
"so",
"I",
"can",
"receive",
"updates",
"from",
"the",
"running",
"remote",
"command",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotecommand.py#L178-L202 | train | This method is called by the worker s sendUpdate method so that the worker can receive updates from the running remote command. | 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... |
buildbot/buildbot | master/buildbot/process/remotecommand.py | RemoteCommand.remote_complete | def remote_complete(self, failure=None):
"""
Called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.commandComplete} to
notify me the remote command has finished.
@type failure: L{twisted.python.failure.Failure} or None
@rtype: None
"""
self... | python | def remote_complete(self, failure=None):
"""
Called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.commandComplete} to
notify me the remote command has finished.
@type failure: L{twisted.python.failure.Failure} or None
@rtype: None
"""
self... | [
"def",
"remote_complete",
"(",
"self",
",",
"failure",
"=",
"None",
")",
":",
"self",
".",
"worker",
".",
"messageReceivedFromWorker",
"(",
")",
"# call the real remoteComplete a moment later, but first return an",
"# acknowledgement so the worker can retire the completion messag... | Called by the worker's
L{buildbot_worker.base.WorkerForBuilderBase.commandComplete} to
notify me the remote command has finished.
@type failure: L{twisted.python.failure.Failure} or None
@rtype: None | [
"Called",
"by",
"the",
"worker",
"s",
"L",
"{",
"buildbot_worker",
".",
"base",
".",
"WorkerForBuilderBase",
".",
"commandComplete",
"}",
"to",
"notify",
"me",
"the",
"remote",
"command",
"has",
"finished",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/remotecommand.py#L204-L219 | train | Called by the worker to notify me that the remote command has finished. | 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... |
buildbot/buildbot | master/buildbot/steps/source/base.py | Source._hasAttrGroupMember | def _hasAttrGroupMember(self, attrGroup, attr):
"""
The hasattr equivalent for attribute groups: returns whether the given
member is in the attribute group.
"""
method_name = '%s_%s' % (attrGroup, attr)
return hasattr(self, method_name) | python | def _hasAttrGroupMember(self, attrGroup, attr):
"""
The hasattr equivalent for attribute groups: returns whether the given
member is in the attribute group.
"""
method_name = '%s_%s' % (attrGroup, attr)
return hasattr(self, method_name) | [
"def",
"_hasAttrGroupMember",
"(",
"self",
",",
"attrGroup",
",",
"attr",
")",
":",
"method_name",
"=",
"'%s_%s'",
"%",
"(",
"attrGroup",
",",
"attr",
")",
"return",
"hasattr",
"(",
"self",
",",
"method_name",
")"
] | The hasattr equivalent for attribute groups: returns whether the given
member is in the attribute group. | [
"The",
"hasattr",
"equivalent",
"for",
"attribute",
"groups",
":",
"returns",
"whether",
"the",
"given",
"member",
"is",
"in",
"the",
"attribute",
"group",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/base.py#L135-L141 | train | Returns True if the given attrGroup has a member of the given attr. | 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... |
buildbot/buildbot | master/buildbot/steps/source/base.py | Source._getAttrGroupMember | def _getAttrGroupMember(self, attrGroup, attr):
"""
The getattr equivalent for attribute groups: gets and returns the
attribute group member.
"""
method_name = '%s_%s' % (attrGroup, attr)
return getattr(self, method_name) | python | def _getAttrGroupMember(self, attrGroup, attr):
"""
The getattr equivalent for attribute groups: gets and returns the
attribute group member.
"""
method_name = '%s_%s' % (attrGroup, attr)
return getattr(self, method_name) | [
"def",
"_getAttrGroupMember",
"(",
"self",
",",
"attrGroup",
",",
"attr",
")",
":",
"method_name",
"=",
"'%s_%s'",
"%",
"(",
"attrGroup",
",",
"attr",
")",
"return",
"getattr",
"(",
"self",
",",
"method_name",
")"
] | The getattr equivalent for attribute groups: gets and returns the
attribute group member. | [
"The",
"getattr",
"equivalent",
"for",
"attribute",
"groups",
":",
"gets",
"and",
"returns",
"the",
"attribute",
"group",
"member",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/base.py#L143-L149 | train | The getattr equivalent for attribute groups. Gets and returns the
attribute group member. | 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... |
buildbot/buildbot | master/buildbot/steps/source/base.py | Source._listAttrGroupMembers | def _listAttrGroupMembers(self, attrGroup):
"""
Returns a list of all members in the attribute group.
"""
from inspect import getmembers, ismethod
methods = getmembers(self, ismethod)
group_prefix = attrGroup + '_'
group_len = len(group_prefix)
group_membe... | python | def _listAttrGroupMembers(self, attrGroup):
"""
Returns a list of all members in the attribute group.
"""
from inspect import getmembers, ismethod
methods = getmembers(self, ismethod)
group_prefix = attrGroup + '_'
group_len = len(group_prefix)
group_membe... | [
"def",
"_listAttrGroupMembers",
"(",
"self",
",",
"attrGroup",
")",
":",
"from",
"inspect",
"import",
"getmembers",
",",
"ismethod",
"methods",
"=",
"getmembers",
"(",
"self",
",",
"ismethod",
")",
"group_prefix",
"=",
"attrGroup",
"+",
"'_'",
"group_len",
"="... | Returns a list of all members in the attribute group. | [
"Returns",
"a",
"list",
"of",
"all",
"members",
"in",
"the",
"attribute",
"group",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/base.py#L151-L162 | train | Returns a list of all members in the attribute group. | 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... |
buildbot/buildbot | master/buildbot/steps/source/base.py | Source.updateSourceProperty | def updateSourceProperty(self, name, value, source=''):
"""
Update a property, indexing the property by codebase if codebase is not
''. Source steps should generally use this instead of setProperty.
"""
# pick a decent source name
if source == '':
source = se... | python | def updateSourceProperty(self, name, value, source=''):
"""
Update a property, indexing the property by codebase if codebase is not
''. Source steps should generally use this instead of setProperty.
"""
# pick a decent source name
if source == '':
source = se... | [
"def",
"updateSourceProperty",
"(",
"self",
",",
"name",
",",
"value",
",",
"source",
"=",
"''",
")",
":",
"# pick a decent source name",
"if",
"source",
"==",
"''",
":",
"source",
"=",
"self",
".",
"__class__",
".",
"__name__",
"if",
"self",
".",
"codebas... | Update a property, indexing the property by codebase if codebase is not
''. Source steps should generally use this instead of setProperty. | [
"Update",
"a",
"property",
"indexing",
"the",
"property",
"by",
"codebase",
"if",
"codebase",
"is",
"not",
".",
"Source",
"steps",
"should",
"generally",
"use",
"this",
"instead",
"of",
"setProperty",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/source/base.py#L164-L184 | train | Update a property in a source by codebase. | 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... |
buildbot/buildbot | master/buildbot/changes/gerritchangesource.py | _gerrit_user_to_author | def _gerrit_user_to_author(props, username="unknown"):
"""
Convert Gerrit account properties to Buildbot format
Take into account missing values
"""
username = props.get("username", username)
username = props.get("name", username)
if "email" in props:
username += " <%(email)s>" % pr... | python | def _gerrit_user_to_author(props, username="unknown"):
"""
Convert Gerrit account properties to Buildbot format
Take into account missing values
"""
username = props.get("username", username)
username = props.get("name", username)
if "email" in props:
username += " <%(email)s>" % pr... | [
"def",
"_gerrit_user_to_author",
"(",
"props",
",",
"username",
"=",
"\"unknown\"",
")",
":",
"username",
"=",
"props",
".",
"get",
"(",
"\"username\"",
",",
"username",
")",
"username",
"=",
"props",
".",
"get",
"(",
"\"name\"",
",",
"username",
")",
"if"... | Convert Gerrit account properties to Buildbot format
Take into account missing values | [
"Convert",
"Gerrit",
"account",
"properties",
"to",
"Buildbot",
"format"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/gerritchangesource.py#L51-L61 | train | Convert Gerrit account properties to Buildbot author format | 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... |
buildbot/buildbot | master/buildbot/buildbot_net_usage_data.py | getName | def getName(obj):
"""This method finds the first parent class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclassed
"""
# elastic search does not like '.' in dict keys, so we replace by /
def sanitize(name):
return name.replace(".", "/")
... | python | def getName(obj):
"""This method finds the first parent class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclassed
"""
# elastic search does not like '.' in dict keys, so we replace by /
def sanitize(name):
return name.replace(".", "/")
... | [
"def",
"getName",
"(",
"obj",
")",
":",
"# elastic search does not like '.' in dict keys, so we replace by /",
"def",
"sanitize",
"(",
"name",
")",
":",
"return",
"name",
".",
"replace",
"(",
"\".\"",
",",
"\"/\"",
")",
"if",
"isinstance",
"(",
"obj",
",",
"_Bui... | This method finds the first parent class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclassed | [
"This",
"method",
"finds",
"the",
"first",
"parent",
"class",
"which",
"is",
"within",
"the",
"buildbot",
"namespace",
"it",
"prepends",
"the",
"name",
"with",
"as",
"many",
">",
"as",
"the",
"class",
"is",
"subclassed"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/buildbot_net_usage_data.py#L75-L93 | train | This method returns the name of the class which is within the buildbot namespace
it prepends the name with as many ">" as the class is subclassed
| 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... |
buildbot/buildbot | master/buildbot/buildbot_net_usage_data.py | fullData | def fullData(master):
"""
Send the actual configuration of the builders, how the steps are agenced.
Note that full data will never send actual detail of what command is run, name of servers, etc.
"""
builders = []
for b in master.config.builders:
steps = []
for step in b... | python | def fullData(master):
"""
Send the actual configuration of the builders, how the steps are agenced.
Note that full data will never send actual detail of what command is run, name of servers, etc.
"""
builders = []
for b in master.config.builders:
steps = []
for step in b... | [
"def",
"fullData",
"(",
"master",
")",
":",
"builders",
"=",
"[",
"]",
"for",
"b",
"in",
"master",
".",
"config",
".",
"builders",
":",
"steps",
"=",
"[",
"]",
"for",
"step",
"in",
"b",
".",
"factory",
".",
"steps",
":",
"steps",
".",
"append",
"... | Send the actual configuration of the builders, how the steps are agenced.
Note that full data will never send actual detail of what command is run, name of servers, etc. | [
"Send",
"the",
"actual",
"configuration",
"of",
"the",
"builders",
"how",
"the",
"steps",
"are",
"agenced",
".",
"Note",
"that",
"full",
"data",
"will",
"never",
"send",
"actual",
"detail",
"of",
"what",
"command",
"is",
"run",
"name",
"of",
"servers",
"et... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/buildbot_net_usage_data.py#L147-L159 | train | Return the full data for the builders and steps. | 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... |
buildbot/buildbot | master/setup.py | include | def include(d, e):
"""Generate a pair of (directory, file-list) for installation.
'd' -- A directory
'e' -- A glob pattern"""
return (d, [f for f in glob.glob('%s/%s' % (d, e)) if os.path.isfile(f)]) | python | def include(d, e):
"""Generate a pair of (directory, file-list) for installation.
'd' -- A directory
'e' -- A glob pattern"""
return (d, [f for f in glob.glob('%s/%s' % (d, e)) if os.path.isfile(f)]) | [
"def",
"include",
"(",
"d",
",",
"e",
")",
":",
"return",
"(",
"d",
",",
"[",
"f",
"for",
"f",
"in",
"glob",
".",
"glob",
"(",
"'%s/%s'",
"%",
"(",
"d",
",",
"e",
")",
")",
"if",
"os",
".",
"path",
".",
"isfile",
"(",
"f",
")",
"]",
")"
] | Generate a pair of (directory, file-list) for installation.
'd' -- A directory
'e' -- A glob pattern | [
"Generate",
"a",
"pair",
"of",
"(",
"directory",
"file",
"-",
"list",
")",
"for",
"installation",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/setup.py#L42-L48 | train | Generate a pair of directory and file - list for installation. | 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... |
buildbot/buildbot | master/setup.py | define_plugin_entry | def define_plugin_entry(name, module_name):
"""
helper to produce lines suitable for setup.py's entry_points
"""
if isinstance(name, tuple):
entry, name = name
else:
entry = name
return '%s = %s:%s' % (entry, module_name, name) | python | def define_plugin_entry(name, module_name):
"""
helper to produce lines suitable for setup.py's entry_points
"""
if isinstance(name, tuple):
entry, name = name
else:
entry = name
return '%s = %s:%s' % (entry, module_name, name) | [
"def",
"define_plugin_entry",
"(",
"name",
",",
"module_name",
")",
":",
"if",
"isinstance",
"(",
"name",
",",
"tuple",
")",
":",
"entry",
",",
"name",
"=",
"name",
"else",
":",
"entry",
"=",
"name",
"return",
"'%s = %s:%s'",
"%",
"(",
"entry",
",",
"m... | helper to produce lines suitable for setup.py's entry_points | [
"helper",
"to",
"produce",
"lines",
"suitable",
"for",
"setup",
".",
"py",
"s",
"entry_points"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/setup.py#L99-L107 | train | helper to produce lines suitable for setup. py s entry_points
| 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... |
buildbot/buildbot | master/setup.py | define_plugin_entries | def define_plugin_entries(groups):
"""
helper to all groups for plugins
"""
result = dict()
for group, modules in groups:
tempo = []
for module_name, names in modules:
tempo.extend([define_plugin_entry(name, module_name)
for name in names])
... | python | def define_plugin_entries(groups):
"""
helper to all groups for plugins
"""
result = dict()
for group, modules in groups:
tempo = []
for module_name, names in modules:
tempo.extend([define_plugin_entry(name, module_name)
for name in names])
... | [
"def",
"define_plugin_entries",
"(",
"groups",
")",
":",
"result",
"=",
"dict",
"(",
")",
"for",
"group",
",",
"modules",
"in",
"groups",
":",
"tempo",
"=",
"[",
"]",
"for",
"module_name",
",",
"names",
"in",
"modules",
":",
"tempo",
".",
"extend",
"("... | helper to all groups for plugins | [
"helper",
"to",
"all",
"groups",
"for",
"plugins"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/setup.py#L117-L130 | train | helper to all groups for plugins
| 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... |
buildbot/buildbot | master/buildbot/changes/filter.py | ChangeFilter.fromSchedulerConstructorArgs | def fromSchedulerConstructorArgs(change_filter=None,
branch=NotABranch, categories=None):
"""
Static method to create a filter based on constructor args
change_filter, branch, and categories; use default values @code{None},
@code{NotABranch}, and @cod... | python | def fromSchedulerConstructorArgs(change_filter=None,
branch=NotABranch, categories=None):
"""
Static method to create a filter based on constructor args
change_filter, branch, and categories; use default values @code{None},
@code{NotABranch}, and @cod... | [
"def",
"fromSchedulerConstructorArgs",
"(",
"change_filter",
"=",
"None",
",",
"branch",
"=",
"NotABranch",
",",
"categories",
"=",
"None",
")",
":",
"# use a change_filter, if given one",
"if",
"change_filter",
":",
"if",
"(",
"branch",
"is",
"not",
"NotABranch",
... | Static method to create a filter based on constructor args
change_filter, branch, and categories; use default values @code{None},
@code{NotABranch}, and @code{None}, respectively. These arguments are
interpreted as documented for the
L{buildbot.schedulers.basic.Scheduler} class.
... | [
"Static",
"method",
"to",
"create",
"a",
"filter",
"based",
"on",
"constructor",
"args",
"change_filter",
"branch",
"and",
"categories",
";",
"use",
"default",
"values",
"@code",
"{",
"None",
"}",
"@code",
"{",
"NotABranch",
"}",
"and",
"@code",
"{",
"None",... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/filter.py#L111-L139 | train | Static method to create a change filter based on constructor args
alid branch and categories ; use default values for NotABranch and None for filtering
alid. | 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... |
buildbot/buildbot | master/buildbot/changes/gitpoller.py | GitPoller._process_changes | def _process_changes(self, newRev, branch):
"""
Read changes since last change.
- Read list of commit hashes.
- Extract details from each commit.
- Add changes to database.
"""
# initial run, don't parse all history
if not self.lastRev:
retur... | python | def _process_changes(self, newRev, branch):
"""
Read changes since last change.
- Read list of commit hashes.
- Extract details from each commit.
- Add changes to database.
"""
# initial run, don't parse all history
if not self.lastRev:
retur... | [
"def",
"_process_changes",
"(",
"self",
",",
"newRev",
",",
"branch",
")",
":",
"# initial run, don't parse all history",
"if",
"not",
"self",
".",
"lastRev",
":",
"return",
"rebuild",
"=",
"False",
"if",
"newRev",
"in",
"self",
".",
"lastRev",
".",
"values",
... | Read changes since last change.
- Read list of commit hashes.
- Extract details from each commit.
- Add changes to database. | [
"Read",
"changes",
"since",
"last",
"change",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/gitpoller.py#L289-L367 | train | Process changes from the current revision to the new revision. | 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... |
buildbot/buildbot | master/buildbot/process/botmaster.py | BotMaster.cleanShutdown | def cleanShutdown(self, quickMode=False, stopReactor=True, _reactor=reactor):
"""Shut down the entire process, once all currently-running builds are
complete.
quickMode will mark all builds as retry (except the ones that were triggered)
"""
if self.shuttingDown:
retur... | python | def cleanShutdown(self, quickMode=False, stopReactor=True, _reactor=reactor):
"""Shut down the entire process, once all currently-running builds are
complete.
quickMode will mark all builds as retry (except the ones that were triggered)
"""
if self.shuttingDown:
retur... | [
"def",
"cleanShutdown",
"(",
"self",
",",
"quickMode",
"=",
"False",
",",
"stopReactor",
"=",
"True",
",",
"_reactor",
"=",
"reactor",
")",
":",
"if",
"self",
".",
"shuttingDown",
":",
"return",
"log",
".",
"msg",
"(",
"\"Initiating clean shutdown\"",
")",
... | Shut down the entire process, once all currently-running builds are
complete.
quickMode will mark all builds as retry (except the ones that were triggered) | [
"Shut",
"down",
"the",
"entire",
"process",
"once",
"all",
"currently",
"-",
"running",
"builds",
"are",
"complete",
".",
"quickMode",
"will",
"mark",
"all",
"builds",
"as",
"retry",
"(",
"except",
"the",
"ones",
"that",
"were",
"triggered",
")"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/botmaster.py#L63-L132 | train | Clean up the entire process. | 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... |
buildbot/buildbot | master/buildbot/process/botmaster.py | BotMaster.getLockByID | def getLockByID(self, lockid):
"""Convert a Lock identifier into an actual Lock instance.
@param lockid: a locks.MasterLock or locks.WorkerLock instance
@return: a locks.RealMasterLock or locks.RealWorkerLock instance
"""
assert isinstance(lockid, (locks.MasterLock, locks.WorkerL... | python | def getLockByID(self, lockid):
"""Convert a Lock identifier into an actual Lock instance.
@param lockid: a locks.MasterLock or locks.WorkerLock instance
@return: a locks.RealMasterLock or locks.RealWorkerLock instance
"""
assert isinstance(lockid, (locks.MasterLock, locks.WorkerL... | [
"def",
"getLockByID",
"(",
"self",
",",
"lockid",
")",
":",
"assert",
"isinstance",
"(",
"lockid",
",",
"(",
"locks",
".",
"MasterLock",
",",
"locks",
".",
"WorkerLock",
")",
")",
"if",
"lockid",
"not",
"in",
"self",
".",
"locks",
":",
"self",
".",
"... | Convert a Lock identifier into an actual Lock instance.
@param lockid: a locks.MasterLock or locks.WorkerLock instance
@return: a locks.RealMasterLock or locks.RealWorkerLock instance | [
"Convert",
"a",
"Lock",
"identifier",
"into",
"an",
"actual",
"Lock",
"instance",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/botmaster.py#L259-L271 | train | Convert a Lock identifier into an actual Lock 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... |
buildbot/buildbot | master/buildbot/process/botmaster.py | BotMaster.maybeStartBuildsForWorker | def maybeStartBuildsForWorker(self, worker_name):
"""
Call this when something suggests that a particular worker may now be
available to start a build.
@param worker_name: the name of the worker
"""
builders = self.getBuildersForWorker(worker_name)
self.brd.maybe... | python | def maybeStartBuildsForWorker(self, worker_name):
"""
Call this when something suggests that a particular worker may now be
available to start a build.
@param worker_name: the name of the worker
"""
builders = self.getBuildersForWorker(worker_name)
self.brd.maybe... | [
"def",
"maybeStartBuildsForWorker",
"(",
"self",
",",
"worker_name",
")",
":",
"builders",
"=",
"self",
".",
"getBuildersForWorker",
"(",
"worker_name",
")",
"self",
".",
"brd",
".",
"maybeStartBuildsOn",
"(",
"[",
"b",
".",
"name",
"for",
"b",
"in",
"builde... | Call this when something suggests that a particular worker may now be
available to start a build.
@param worker_name: the name of the worker | [
"Call",
"this",
"when",
"something",
"suggests",
"that",
"a",
"particular",
"worker",
"may",
"now",
"be",
"available",
"to",
"start",
"a",
"build",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/botmaster.py#L290-L298 | train | Call this when something suggests that a particular worker may now be
available to start a build. | 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... |
buildbot/buildbot | worker/buildbot_worker/util/__init__.py | rewrap | def rewrap(text, width=None):
"""
Rewrap text for output to the console.
Removes common indentation and rewraps paragraphs according to the console
width.
Line feeds between paragraphs preserved.
Formatting of paragraphs that starts with additional indentation
preserved.
"""
if wi... | python | def rewrap(text, width=None):
"""
Rewrap text for output to the console.
Removes common indentation and rewraps paragraphs according to the console
width.
Line feeds between paragraphs preserved.
Formatting of paragraphs that starts with additional indentation
preserved.
"""
if wi... | [
"def",
"rewrap",
"(",
"text",
",",
"width",
"=",
"None",
")",
":",
"if",
"width",
"is",
"None",
":",
"width",
"=",
"80",
"# Remove common indentation.",
"text",
"=",
"textwrap",
".",
"dedent",
"(",
"text",
")",
"def",
"needs_wrapping",
"(",
"line",
")",
... | Rewrap text for output to the console.
Removes common indentation and rewraps paragraphs according to the console
width.
Line feeds between paragraphs preserved.
Formatting of paragraphs that starts with additional indentation
preserved. | [
"Rewrap",
"text",
"for",
"output",
"to",
"the",
"console",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/util/__init__.py#L102-L135 | train | Rewrap text to width | 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... |
buildbot/buildbot | master/buildbot/www/hooks/base.py | BaseHookHandler.getChanges | def getChanges(self, request):
"""
Consumes a naive build notification (the default for now)
basically, set POST variables to match commit object parameters:
revision, revlink, comments, branch, who, files, links
files, links and properties will be de-json'd, the rest are interp... | python | def getChanges(self, request):
"""
Consumes a naive build notification (the default for now)
basically, set POST variables to match commit object parameters:
revision, revlink, comments, branch, who, files, links
files, links and properties will be de-json'd, the rest are interp... | [
"def",
"getChanges",
"(",
"self",
",",
"request",
")",
":",
"def",
"firstOrNothing",
"(",
"value",
")",
":",
"\"\"\"\n Small helper function to return the first value (if value is a list)\n or return the whole thing otherwise.\n\n Make sure to properly de... | Consumes a naive build notification (the default for now)
basically, set POST variables to match commit object parameters:
revision, revlink, comments, branch, who, files, links
files, links and properties will be de-json'd, the rest are interpreted as strings | [
"Consumes",
"a",
"naive",
"build",
"notification",
"(",
"the",
"default",
"for",
"now",
")",
"basically",
"set",
"POST",
"variables",
"to",
"match",
"commit",
"object",
"parameters",
":",
"revision",
"revlink",
"comments",
"branch",
"who",
"files",
"links"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/www/hooks/base.py#L32-L88 | train | Returns a list of all changes that have occurred in the current build. | 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... |
buildbot/buildbot | master/docs/bbdocs/ext.py | make_ref_target_directive | def make_ref_target_directive(ref_type, indextemplates=None, **kwargs):
"""
Create and return a L{BBRefTargetDirective} subclass.
"""
class_vars = dict(ref_type=ref_type, indextemplates=indextemplates)
class_vars.update(kwargs)
return type("BB%sRefTargetDirective" % (ref_type.capitalize(),),
... | python | def make_ref_target_directive(ref_type, indextemplates=None, **kwargs):
"""
Create and return a L{BBRefTargetDirective} subclass.
"""
class_vars = dict(ref_type=ref_type, indextemplates=indextemplates)
class_vars.update(kwargs)
return type("BB%sRefTargetDirective" % (ref_type.capitalize(),),
... | [
"def",
"make_ref_target_directive",
"(",
"ref_type",
",",
"indextemplates",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"class_vars",
"=",
"dict",
"(",
"ref_type",
"=",
"ref_type",
",",
"indextemplates",
"=",
"indextemplates",
")",
"class_vars",
".",
"upda... | Create and return a L{BBRefTargetDirective} subclass. | [
"Create",
"and",
"return",
"a",
"L",
"{",
"BBRefTargetDirective",
"}",
"subclass",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/docs/bbdocs/ext.py#L123-L130 | train | Create and return a L{BBRefTargetDirective subclass. | 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... |
buildbot/buildbot | master/docs/bbdocs/ext.py | make_index | def make_index(name, localname):
"""
Create and return a L{BBIndex} subclass, for use in the domain's C{indices}
"""
return type("BB%sIndex" % (name.capitalize(),),
(BBIndex,),
dict(name=name, localname=localname)) | python | def make_index(name, localname):
"""
Create and return a L{BBIndex} subclass, for use in the domain's C{indices}
"""
return type("BB%sIndex" % (name.capitalize(),),
(BBIndex,),
dict(name=name, localname=localname)) | [
"def",
"make_index",
"(",
"name",
",",
"localname",
")",
":",
"return",
"type",
"(",
"\"BB%sIndex\"",
"%",
"(",
"name",
".",
"capitalize",
"(",
")",
",",
")",
",",
"(",
"BBIndex",
",",
")",
",",
"dict",
"(",
"name",
"=",
"name",
",",
"localname",
"... | Create and return a L{BBIndex} subclass, for use in the domain's C{indices} | [
"Create",
"and",
"return",
"a",
"L",
"{",
"BBIndex",
"}",
"subclass",
"for",
"use",
"in",
"the",
"domain",
"s",
"C",
"{",
"indices",
"}"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/docs/bbdocs/ext.py#L170-L176 | train | Create and return a L{BBIndex subclass for use in the domain s C { indices } | 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... |
buildbot/buildbot | master/docs/bbdocs/ext.py | BBRefTargetDirective.resolve_ref | def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to a directive of this class
"""
targets = domain.data['targets'].get(cls.ref_type, {})
try:
todocname, targetname = targets[target]
... | python | def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to a directive of this class
"""
targets = domain.data['targets'].get(cls.ref_type, {})
try:
todocname, targetname = targets[target]
... | [
"def",
"resolve_ref",
"(",
"cls",
",",
"domain",
",",
"env",
",",
"fromdocname",
",",
"builder",
",",
"typ",
",",
"target",
",",
"node",
",",
"contnode",
")",
":",
"targets",
"=",
"domain",
".",
"data",
"[",
"'targets'",
"]",
".",
"get",
"(",
"cls",
... | Resolve a reference to a directive of this class | [
"Resolve",
"a",
"reference",
"to",
"a",
"directive",
"of",
"this",
"class"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/docs/bbdocs/ext.py#L105-L120 | train | Resolve a reference to a directive of this class | 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... |
buildbot/buildbot | master/docs/bbdocs/ext.py | BBIndex.resolve_ref | def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to an index to the document containing the index,
using the index's C{localname} as the content of the link.
"""
# indexes appear to be automatically ... | python | def resolve_ref(cls, domain, env, fromdocname, builder, typ, target, node,
contnode):
"""
Resolve a reference to an index to the document containing the index,
using the index's C{localname} as the content of the link.
"""
# indexes appear to be automatically ... | [
"def",
"resolve_ref",
"(",
"cls",
",",
"domain",
",",
"env",
",",
"fromdocname",
",",
"builder",
",",
"typ",
",",
"target",
",",
"node",
",",
"contnode",
")",
":",
"# indexes appear to be automatically generated at doc DOMAIN-NAME",
"todocname",
"=",
"\"bb-%s\"",
... | Resolve a reference to an index to the document containing the index,
using the index's C{localname} as the content of the link. | [
"Resolve",
"a",
"reference",
"to",
"an",
"index",
"to",
"the",
"document",
"containing",
"the",
"index",
"using",
"the",
"index",
"s",
"C",
"{",
"localname",
"}",
"as",
"the",
"content",
"of",
"the",
"link",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/docs/bbdocs/ext.py#L154-L167 | train | Resolve a reference to an index to the document containing the 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... |
buildbot/buildbot | master/buildbot/steps/package/rpm/rpmspec.py | RpmSpec.load | def load(self):
"""
call this function after the file exists to populate properties
"""
# If we are given a string, open it up else assume it's something we
# can call read on.
if isinstance(self.specfile, str):
f = open(self.specfile, 'r')
else:
... | python | def load(self):
"""
call this function after the file exists to populate properties
"""
# If we are given a string, open it up else assume it's something we
# can call read on.
if isinstance(self.specfile, str):
f = open(self.specfile, 'r')
else:
... | [
"def",
"load",
"(",
"self",
")",
":",
"# If we are given a string, open it up else assume it's something we",
"# can call read on.",
"if",
"isinstance",
"(",
"self",
".",
"specfile",
",",
"str",
")",
":",
"f",
"=",
"open",
"(",
"self",
".",
"specfile",
",",
"'r'",... | call this function after the file exists to populate properties | [
"call",
"this",
"function",
"after",
"the",
"file",
"exists",
"to",
"populate",
"properties"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/package/rpm/rpmspec.py#L54-L71 | train | load the properties from the 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... |
buildbot/buildbot | master/buildbot/statistics/capture.py | CapturePropertyBase.consume | def consume(self, routingKey, msg):
"""
Consumer for this (CaptureProperty) class. Gets the properties from data api and
send them to the storage backends.
"""
builder_info = yield self.master.data.get(("builders", msg['builderid']))
if self._builder_name_matches(builder... | python | def consume(self, routingKey, msg):
"""
Consumer for this (CaptureProperty) class. Gets the properties from data api and
send them to the storage backends.
"""
builder_info = yield self.master.data.get(("builders", msg['builderid']))
if self._builder_name_matches(builder... | [
"def",
"consume",
"(",
"self",
",",
"routingKey",
",",
"msg",
")",
":",
"builder_info",
"=",
"yield",
"self",
".",
"master",
".",
"data",
".",
"get",
"(",
"(",
"\"builders\"",
",",
"msg",
"[",
"'builderid'",
"]",
")",
")",
"if",
"self",
".",
"_builde... | Consumer for this (CaptureProperty) class. Gets the properties from data api and
send them to the storage backends. | [
"Consumer",
"for",
"this",
"(",
"CaptureProperty",
")",
"class",
".",
"Gets",
"the",
"properties",
"from",
"data",
"api",
"and",
"send",
"them",
"to",
"the",
"storage",
"backends",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/statistics/capture.py#L80-L113 | train | This method is called by the capture service when a capture message is received. | 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... |
buildbot/buildbot | master/buildbot/statistics/capture.py | CaptureBuildTimes.consume | def consume(self, routingKey, msg):
"""
Consumer for CaptureBuildStartTime. Gets the build start time.
"""
builder_info = yield self.master.data.get(("builders", msg['builderid']))
if self._builder_name_matches(builder_info):
try:
ret_val = self._callb... | python | def consume(self, routingKey, msg):
"""
Consumer for CaptureBuildStartTime. Gets the build start time.
"""
builder_info = yield self.master.data.get(("builders", msg['builderid']))
if self._builder_name_matches(builder_info):
try:
ret_val = self._callb... | [
"def",
"consume",
"(",
"self",
",",
"routingKey",
",",
"msg",
")",
":",
"builder_info",
"=",
"yield",
"self",
".",
"master",
".",
"data",
".",
"get",
"(",
"(",
"\"builders\"",
",",
"msg",
"[",
"'builderid'",
"]",
")",
")",
"if",
"self",
".",
"_builde... | Consumer for CaptureBuildStartTime. Gets the build start time. | [
"Consumer",
"for",
"CaptureBuildStartTime",
".",
"Gets",
"the",
"build",
"start",
"time",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/statistics/capture.py#L160-L183 | train | Consumes a capture build start time. | 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... |
buildbot/buildbot | master/buildbot/statistics/capture.py | CaptureDataBase.consume | def consume(self, routingKey, msg):
"""
Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
sends it to the storage backends.
"""
build_data = msg['build_data']
builder_info = yield self.master.data.get(("builders", build_data['builderid']... | python | def consume(self, routingKey, msg):
"""
Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
sends it to the storage backends.
"""
build_data = msg['build_data']
builder_info = yield self.master.data.get(("builders", build_data['builderid']... | [
"def",
"consume",
"(",
"self",
",",
"routingKey",
",",
"msg",
")",
":",
"build_data",
"=",
"msg",
"[",
"'build_data'",
"]",
"builder_info",
"=",
"yield",
"self",
".",
"master",
".",
"data",
".",
"get",
"(",
"(",
"\"builders\"",
",",
"build_data",
"[",
... | Consumer for this (CaptureData) class. Gets the data sent from yieldMetricsValue and
sends it to the storage backends. | [
"Consumer",
"for",
"this",
"(",
"CaptureData",
")",
"class",
".",
"Gets",
"the",
"data",
"sent",
"from",
"yieldMetricsValue",
"and",
"sends",
"it",
"to",
"the",
"storage",
"backends",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/statistics/capture.py#L339-L358 | train | Consumes the data sent from yieldMetricsValue and sends it to the storage backends. | 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... |
buildbot/buildbot | master/buildbot/reporters/github.py | GitHubStatusPush.createStatus | def createStatus(self,
repo_user, repo_name, sha, state, target_url=None,
context=None, issue=None, description=None):
"""
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param sha: Full sha to create the s... | python | def createStatus(self,
repo_user, repo_name, sha, state, target_url=None,
context=None, issue=None, description=None):
"""
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param sha: Full sha to create the s... | [
"def",
"createStatus",
"(",
"self",
",",
"repo_user",
",",
"repo_name",
",",
"sha",
",",
"state",
",",
"target_url",
"=",
"None",
",",
"context",
"=",
"None",
",",
"issue",
"=",
"None",
",",
"description",
"=",
"None",
")",
":",
"payload",
"=",
"{",
... | :param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param sha: Full sha to create the status for.
:param state: one of the following 'pending', 'success', 'error'
or 'failure'.
:param target_url: Target url to associate with this ... | [
":",
"param",
"repo_user",
":",
"GitHub",
"user",
"or",
"organization",
":",
"param",
"repo_name",
":",
"Name",
"of",
"the",
"repository",
":",
"param",
"sha",
":",
"Full",
"sha",
"to",
"create",
"the",
"status",
"for",
".",
":",
"param",
"state",
":",
... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/github.py#L68-L99 | train | Creates a status for the given sha. | 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... |
buildbot/buildbot | master/buildbot/reporters/github.py | GitHubCommentPush.createStatus | def createStatus(self,
repo_user, repo_name, sha, state, target_url=None,
context=None, issue=None, description=None):
"""
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param issue: Pull request number
... | python | def createStatus(self,
repo_user, repo_name, sha, state, target_url=None,
context=None, issue=None, description=None):
"""
:param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param issue: Pull request number
... | [
"def",
"createStatus",
"(",
"self",
",",
"repo_user",
",",
"repo_name",
",",
"sha",
",",
"state",
",",
"target_url",
"=",
"None",
",",
"context",
"=",
"None",
",",
"issue",
"=",
"None",
",",
"description",
"=",
"None",
")",
":",
"payload",
"=",
"{",
... | :param repo_user: GitHub user or organization
:param repo_name: Name of the repository
:param issue: Pull request number
:param state: one of the following 'pending', 'success', 'error'
or 'failure'.
:param description: Short description of the status.
:retu... | [
":",
"param",
"repo_user",
":",
"GitHub",
"user",
"or",
"organization",
":",
"param",
"repo_name",
":",
"Name",
"of",
"the",
"repository",
":",
"param",
"issue",
":",
"Pull",
"request",
"number",
":",
"param",
"state",
":",
"one",
"of",
"the",
"following",... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/reporters/github.py#L197-L217 | train | Creates a status for a specific branch. | 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... |
buildbot/buildbot | worker/buildbot_worker/scripts/stop.py | stopWorker | def stopWorker(basedir, quiet, signame="TERM"):
"""
Stop worker process by sending it a signal.
Using the specified basedir path, read worker process's pid file and
try to terminate that process with specified signal.
@param basedir: worker's basedir path
@param quite: if False, don't print ... | python | def stopWorker(basedir, quiet, signame="TERM"):
"""
Stop worker process by sending it a signal.
Using the specified basedir path, read worker process's pid file and
try to terminate that process with specified signal.
@param basedir: worker's basedir path
@param quite: if False, don't print ... | [
"def",
"stopWorker",
"(",
"basedir",
",",
"quiet",
",",
"signame",
"=",
"\"TERM\"",
")",
":",
"import",
"signal",
"os",
".",
"chdir",
"(",
"basedir",
")",
"try",
":",
"f",
"=",
"open",
"(",
"\"twistd.pid\"",
",",
"\"rt\"",
")",
"except",
"IOError",
":"... | Stop worker process by sending it a signal.
Using the specified basedir path, read worker process's pid file and
try to terminate that process with specified signal.
@param basedir: worker's basedir path
@param quite: if False, don't print any messages to stdout
@param signame: signal to send to... | [
"Stop",
"worker",
"process",
"by",
"sending",
"it",
"a",
"signal",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/stop.py#L33-L76 | train | Stop a worker process by sending it a signal. | 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... |
buildbot/buildbot | master/buildbot/process/factory.py | BuildFactory.newBuild | def newBuild(self, requests):
"""Create a new Build instance.
@param requests: a list of buildrequest dictionaries describing what is
to be built
"""
b = self.buildClass(requests)
b.useProgress = self.useProgress
b.workdir = self.workdir
b.setStepFactorie... | python | def newBuild(self, requests):
"""Create a new Build instance.
@param requests: a list of buildrequest dictionaries describing what is
to be built
"""
b = self.buildClass(requests)
b.useProgress = self.useProgress
b.workdir = self.workdir
b.setStepFactorie... | [
"def",
"newBuild",
"(",
"self",
",",
"requests",
")",
":",
"b",
"=",
"self",
".",
"buildClass",
"(",
"requests",
")",
"b",
".",
"useProgress",
"=",
"self",
".",
"useProgress",
"b",
".",
"workdir",
"=",
"self",
".",
"workdir",
"b",
".",
"setStepFactorie... | Create a new Build instance.
@param requests: a list of buildrequest dictionaries describing what is
to be built | [
"Create",
"a",
"new",
"Build",
"instance",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/factory.py#L62-L72 | train | Create a new Build 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... |
buildbot/buildbot | master/buildbot/steps/shell.py | WarningCountingShellCommand.addSuppression | def addSuppression(self, suppressionList):
"""
This method can be used to add patters of warnings that should
not be counted.
It takes a single argument, a list of patterns.
Each pattern is a 4-tuple (FILE-RE, WARN-RE, START, END).
FILE-RE is a regular expression (stri... | python | def addSuppression(self, suppressionList):
"""
This method can be used to add patters of warnings that should
not be counted.
It takes a single argument, a list of patterns.
Each pattern is a 4-tuple (FILE-RE, WARN-RE, START, END).
FILE-RE is a regular expression (stri... | [
"def",
"addSuppression",
"(",
"self",
",",
"suppressionList",
")",
":",
"for",
"fileRe",
",",
"warnRe",
",",
"start",
",",
"end",
"in",
"suppressionList",
":",
"if",
"fileRe",
"is",
"not",
"None",
"and",
"isinstance",
"(",
"fileRe",
",",
"str",
")",
":",... | This method can be used to add patters of warnings that should
not be counted.
It takes a single argument, a list of patterns.
Each pattern is a 4-tuple (FILE-RE, WARN-RE, START, END).
FILE-RE is a regular expression (string or compiled regexp), or None.
If None, the pattern m... | [
"This",
"method",
"can",
"be",
"used",
"to",
"add",
"patters",
"of",
"warnings",
"that",
"should",
"not",
"be",
"counted",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/shell.py#L446-L472 | train | This method adds a suppression to the internal list of suppressions that should be counted. | 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... |
buildbot/buildbot | master/buildbot/steps/shell.py | WarningCountingShellCommand.warnExtractFromRegexpGroups | def warnExtractFromRegexpGroups(self, line, match):
"""
Extract file name, line number, and warning text as groups (1,2,3)
of warningPattern match."""
file = match.group(1)
lineNo = match.group(2)
if lineNo is not None:
lineNo = int(lineNo)
text = matc... | python | def warnExtractFromRegexpGroups(self, line, match):
"""
Extract file name, line number, and warning text as groups (1,2,3)
of warningPattern match."""
file = match.group(1)
lineNo = match.group(2)
if lineNo is not None:
lineNo = int(lineNo)
text = matc... | [
"def",
"warnExtractFromRegexpGroups",
"(",
"self",
",",
"line",
",",
"match",
")",
":",
"file",
"=",
"match",
".",
"group",
"(",
"1",
")",
"lineNo",
"=",
"match",
".",
"group",
"(",
"2",
")",
"if",
"lineNo",
"is",
"not",
"None",
":",
"lineNo",
"=",
... | Extract file name, line number, and warning text as groups (1,2,3)
of warningPattern match. | [
"Extract",
"file",
"name",
"line",
"number",
"and",
"warning",
"text",
"as",
"groups",
"(",
"1",
"2",
"3",
")",
"of",
"warningPattern",
"match",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/shell.py#L480-L489 | train | Extract file name line number and warning text from a regular expression match. | 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... |
buildbot/buildbot | master/buildbot/steps/shell.py | WarningCountingShellCommand.createSummary | def createSummary(self, log):
"""
Match log lines against warningPattern.
Warnings are collected into another log for this step, and the
build-wide 'warnings-count' is updated."""
# If there were any warnings, make the log if lines with warnings
# available
if s... | python | def createSummary(self, log):
"""
Match log lines against warningPattern.
Warnings are collected into another log for this step, and the
build-wide 'warnings-count' is updated."""
# If there were any warnings, make the log if lines with warnings
# available
if s... | [
"def",
"createSummary",
"(",
"self",
",",
"log",
")",
":",
"# If there were any warnings, make the log if lines with warnings",
"# available",
"if",
"self",
".",
"warnCount",
":",
"self",
".",
"addCompleteLog",
"(",
"\"warnings (%d)\"",
"%",
"self",
".",
"warnCount",
... | Match log lines against warningPattern.
Warnings are collected into another log for this step, and the
build-wide 'warnings-count' is updated. | [
"Match",
"log",
"lines",
"against",
"warningPattern",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/shell.py#L584-L602 | train | Create a summary of the log for this step. | 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... |
buildbot/buildbot | master/buildbot/steps/cppcheck.py | Cppcheck.evaluateCommand | def evaluateCommand(self, cmd):
""" cppcheck always return 0, unless a special parameter is given """
for msg in self.flunkingIssues:
if self.counts[msg] != 0:
return FAILURE
if self.getProperty('cppcheck-total') != 0:
return WARNINGS
return SUCCES... | python | def evaluateCommand(self, cmd):
""" cppcheck always return 0, unless a special parameter is given """
for msg in self.flunkingIssues:
if self.counts[msg] != 0:
return FAILURE
if self.getProperty('cppcheck-total') != 0:
return WARNINGS
return SUCCES... | [
"def",
"evaluateCommand",
"(",
"self",
",",
"cmd",
")",
":",
"for",
"msg",
"in",
"self",
".",
"flunkingIssues",
":",
"if",
"self",
".",
"counts",
"[",
"msg",
"]",
"!=",
"0",
":",
"return",
"FAILURE",
"if",
"self",
".",
"getProperty",
"(",
"'cppcheck-to... | cppcheck always return 0, unless a special parameter is given | [
"cppcheck",
"always",
"return",
"0",
"unless",
"a",
"special",
"parameter",
"is",
"given"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/cppcheck.py#L88-L95 | train | Evaluate the cppcheck command. | 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... |
buildbot/buildbot | master/buildbot/secrets/providers/passwordstore.py | SecretInPass.get | def get(self, entry):
"""
get the value from pass identified by 'entry'
"""
try:
output = yield utils.getProcessOutput(
"pass",
args=[entry],
env=self._env
)
return output.decode("utf-8", "ignore").splitl... | python | def get(self, entry):
"""
get the value from pass identified by 'entry'
"""
try:
output = yield utils.getProcessOutput(
"pass",
args=[entry],
env=self._env
)
return output.decode("utf-8", "ignore").splitl... | [
"def",
"get",
"(",
"self",
",",
"entry",
")",
":",
"try",
":",
"output",
"=",
"yield",
"utils",
".",
"getProcessOutput",
"(",
"\"pass\"",
",",
"args",
"=",
"[",
"entry",
"]",
",",
"env",
"=",
"self",
".",
"_env",
")",
"return",
"output",
".",
"deco... | get the value from pass identified by 'entry' | [
"get",
"the",
"value",
"from",
"pass",
"identified",
"by",
"entry"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/secrets/providers/passwordstore.py#L56-L68 | train | get the value from pass identified by entry | 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... |
buildbot/buildbot | master/buildbot/monkeypatches/servicechecks.py | patch | def patch():
"""
Patch startService and stopService so that they check the previous state
first.
(used for debugging only)
"""
from twisted.application.service import Service
old_startService = Service.startService
old_stopService = Service.stopService
def startService(self):
... | python | def patch():
"""
Patch startService and stopService so that they check the previous state
first.
(used for debugging only)
"""
from twisted.application.service import Service
old_startService = Service.startService
old_stopService = Service.stopService
def startService(self):
... | [
"def",
"patch",
"(",
")",
":",
"from",
"twisted",
".",
"application",
".",
"service",
"import",
"Service",
"old_startService",
"=",
"Service",
".",
"startService",
"old_stopService",
"=",
"Service",
".",
"stopService",
"def",
"startService",
"(",
"self",
")",
... | Patch startService and stopService so that they check the previous state
first.
(used for debugging only) | [
"Patch",
"startService",
"and",
"stopService",
"so",
"that",
"they",
"check",
"the",
"previous",
"state",
"first",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/monkeypatches/servicechecks.py#L17-L36 | train | Patch startService and stopService so that they check the previous state
first. | 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... |
buildbot/buildbot | master/buildbot/db/connector.py | DBConnector._doCleanup | def _doCleanup(self):
"""
Perform any periodic database cleanup tasks.
@returns: Deferred
"""
# pass on this if we're not configured yet
if not self.configured_url:
return
d = self.changes.pruneChanges(self.master.config.changeHorizon)
d.addE... | python | def _doCleanup(self):
"""
Perform any periodic database cleanup tasks.
@returns: Deferred
"""
# pass on this if we're not configured yet
if not self.configured_url:
return
d = self.changes.pruneChanges(self.master.config.changeHorizon)
d.addE... | [
"def",
"_doCleanup",
"(",
"self",
")",
":",
"# pass on this if we're not configured yet",
"if",
"not",
"self",
".",
"configured_url",
":",
"return",
"d",
"=",
"self",
".",
"changes",
".",
"pruneChanges",
"(",
"self",
".",
"master",
".",
"config",
".",
"changeH... | Perform any periodic database cleanup tasks.
@returns: Deferred | [
"Perform",
"any",
"periodic",
"database",
"cleanup",
"tasks",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/connector.py#L142-L154 | train | Perform any periodic database cleanup tasks. | 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... |
buildbot/buildbot | master/buildbot/db/enginestrategy.py | SqlLiteStrategy.set_up | def set_up(self, u, engine):
"""Special setup for sqlite engines"""
def connect_listener_enable_fk(connection, record):
# fk must be enabled for all connections
if not getattr(engine, "fk_disabled", False):
return # http://trac.buildbot.net/ticket/3490#ticket
... | python | def set_up(self, u, engine):
"""Special setup for sqlite engines"""
def connect_listener_enable_fk(connection, record):
# fk must be enabled for all connections
if not getattr(engine, "fk_disabled", False):
return # http://trac.buildbot.net/ticket/3490#ticket
... | [
"def",
"set_up",
"(",
"self",
",",
"u",
",",
"engine",
")",
":",
"def",
"connect_listener_enable_fk",
"(",
"connection",
",",
"record",
")",
":",
"# fk must be enabled for all connections",
"if",
"not",
"getattr",
"(",
"engine",
",",
"\"fk_disabled\"",
",",
"Fal... | Special setup for sqlite engines | [
"Special",
"setup",
"for",
"sqlite",
"engines"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/enginestrategy.py#L64-L84 | train | Set up the database for this user. | 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... |
buildbot/buildbot | master/buildbot/db/enginestrategy.py | MySQLStrategy.set_up | def set_up(self, u, engine):
"""Special setup for mysql engines"""
# add the reconnecting PoolListener that will detect a
# disconnected connection and automatically start a new
# one. This provides a measure of additional safety over
# the pool_recycle parameter, and is useful ... | python | def set_up(self, u, engine):
"""Special setup for mysql engines"""
# add the reconnecting PoolListener that will detect a
# disconnected connection and automatically start a new
# one. This provides a measure of additional safety over
# the pool_recycle parameter, and is useful ... | [
"def",
"set_up",
"(",
"self",
",",
"u",
",",
"engine",
")",
":",
"# add the reconnecting PoolListener that will detect a",
"# disconnected connection and automatically start a new",
"# one. This provides a measure of additional safety over",
"# the pool_recycle parameter, and is useful wh... | Special setup for mysql engines | [
"Special",
"setup",
"for",
"mysql",
"engines"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/enginestrategy.py#L102-L130 | train | Set up the connection to the database. | 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... |
buildbot/buildbot | master/buildbot/db/enginestrategy.py | BuildbotEngineStrategy.special_case_sqlite | def special_case_sqlite(self, u, kwargs):
"""For sqlite, percent-substitute %(basedir)s and use a full
path to the basedir. If using a memory database, force the
pool size to be 1."""
max_conns = 1
# when given a database path, stick the basedir in there
if u.database:
... | python | def special_case_sqlite(self, u, kwargs):
"""For sqlite, percent-substitute %(basedir)s and use a full
path to the basedir. If using a memory database, force the
pool size to be 1."""
max_conns = 1
# when given a database path, stick the basedir in there
if u.database:
... | [
"def",
"special_case_sqlite",
"(",
"self",
",",
"u",
",",
"kwargs",
")",
":",
"max_conns",
"=",
"1",
"# when given a database path, stick the basedir in there",
"if",
"u",
".",
"database",
":",
"# Use NullPool instead of the sqlalchemy-0.6.8-default",
"# SingletonThreadPool f... | For sqlite, percent-substitute %(basedir)s and use a full
path to the basedir. If using a memory database, force the
pool size to be 1. | [
"For",
"sqlite",
"percent",
"-",
"substitute",
"%",
"(",
"basedir",
")",
"s",
"and",
"use",
"a",
"full",
"path",
"to",
"the",
"basedir",
".",
"If",
"using",
"a",
"memory",
"database",
"force",
"the",
"pool",
"size",
"to",
"be",
"1",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/enginestrategy.py#L164-L198 | train | Special case for SQLite. | 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... |
buildbot/buildbot | master/buildbot/db/enginestrategy.py | BuildbotEngineStrategy.special_case_mysql | def special_case_mysql(self, u, kwargs):
"""For mysql, take max_idle out of the query arguments, and
use its value for pool_recycle. Also, force use_unicode and
charset to be True and 'utf8', failing if they were set to
anything else."""
kwargs['pool_recycle'] = int(u.query.pop... | python | def special_case_mysql(self, u, kwargs):
"""For mysql, take max_idle out of the query arguments, and
use its value for pool_recycle. Also, force use_unicode and
charset to be True and 'utf8', failing if they were set to
anything else."""
kwargs['pool_recycle'] = int(u.query.pop... | [
"def",
"special_case_mysql",
"(",
"self",
",",
"u",
",",
"kwargs",
")",
":",
"kwargs",
"[",
"'pool_recycle'",
"]",
"=",
"int",
"(",
"u",
".",
"query",
".",
"pop",
"(",
"'max_idle'",
",",
"3600",
")",
")",
"# default to the MyISAM storage engine",
"storage_en... | For mysql, take max_idle out of the query arguments, and
use its value for pool_recycle. Also, force use_unicode and
charset to be True and 'utf8', failing if they were set to
anything else. | [
"For",
"mysql",
"take",
"max_idle",
"out",
"of",
"the",
"query",
"arguments",
"and",
"use",
"its",
"value",
"for",
"pool_recycle",
".",
"Also",
"force",
"use_unicode",
"and",
"charset",
"to",
"be",
"True",
"and",
"utf8",
"failing",
"if",
"they",
"were",
"s... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/enginestrategy.py#L200-L228 | train | For mysql we need to set max_idle and storage_engine to MyISAM storage engine and use it to set use_unicode and charset to be True and utf8. | 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... |
buildbot/buildbot | master/buildbot/worker/openstack.py | OpenStackLatentWorker._constructClient | def _constructClient(client_version, username, user_domain, password, project_name, project_domain,
auth_url):
"""Return a novaclient from the given args."""
loader = loading.get_plugin_loader('password')
# These only work with v3
if user_domain is not None or p... | python | def _constructClient(client_version, username, user_domain, password, project_name, project_domain,
auth_url):
"""Return a novaclient from the given args."""
loader = loading.get_plugin_loader('password')
# These only work with v3
if user_domain is not None or p... | [
"def",
"_constructClient",
"(",
"client_version",
",",
"username",
",",
"user_domain",
",",
"password",
",",
"project_name",
",",
"project_domain",
",",
"auth_url",
")",
":",
"loader",
"=",
"loading",
".",
"get_plugin_loader",
"(",
"'password'",
")",
"# These only... | Return a novaclient from the given args. | [
"Return",
"a",
"novaclient",
"from",
"the",
"given",
"args",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/openstack.py#L106-L120 | train | Construct a novaclient from the given args. | 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... |
buildbot/buildbot | master/buildbot/worker/openstack.py | OpenStackLatentWorker._parseBlockDevice | def _parseBlockDevice(self, block_device):
"""
Parse a higher-level view of the block device mapping into something
novaclient wants. This should be similar to how Horizon presents it.
Required keys:
device_name: The name of the device; e.g. vda or xda.
source_typ... | python | def _parseBlockDevice(self, block_device):
"""
Parse a higher-level view of the block device mapping into something
novaclient wants. This should be similar to how Horizon presents it.
Required keys:
device_name: The name of the device; e.g. vda or xda.
source_typ... | [
"def",
"_parseBlockDevice",
"(",
"self",
",",
"block_device",
")",
":",
"client_block_device",
"=",
"{",
"}",
"client_block_device",
"[",
"'device_name'",
"]",
"=",
"block_device",
".",
"get",
"(",
"'device_name'",
",",
"'vda'",
")",
"client_block_device",
"[",
... | Parse a higher-level view of the block device mapping into something
novaclient wants. This should be similar to how Horizon presents it.
Required keys:
device_name: The name of the device; e.g. vda or xda.
source_type: image, snapshot, volume, or blank/None.
destinat... | [
"Parse",
"a",
"higher",
"-",
"level",
"view",
"of",
"the",
"block",
"device",
"mapping",
"into",
"something",
"novaclient",
"wants",
".",
"This",
"should",
"be",
"similar",
"to",
"how",
"Horizon",
"presents",
"it",
".",
"Required",
"keys",
":",
"device_name"... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/openstack.py#L122-L149 | train | Parse a higher - level view of the block device mapping into something we can use to create a new novaclient. | 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... |
buildbot/buildbot | master/buildbot/worker/openstack.py | OpenStackLatentWorker._renderBlockDevice | def _renderBlockDevice(self, block_device, build):
"""Render all of the block device's values."""
rendered_block_device = yield build.render(block_device)
if rendered_block_device['volume_size'] is None:
source_type = rendered_block_device['source_type']
source_uuid = ren... | python | def _renderBlockDevice(self, block_device, build):
"""Render all of the block device's values."""
rendered_block_device = yield build.render(block_device)
if rendered_block_device['volume_size'] is None:
source_type = rendered_block_device['source_type']
source_uuid = ren... | [
"def",
"_renderBlockDevice",
"(",
"self",
",",
"block_device",
",",
"build",
")",
":",
"rendered_block_device",
"=",
"yield",
"build",
".",
"render",
"(",
"block_device",
")",
"if",
"rendered_block_device",
"[",
"'volume_size'",
"]",
"is",
"None",
":",
"source_t... | Render all of the block device's values. | [
"Render",
"all",
"of",
"the",
"block",
"device",
"s",
"values",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/openstack.py#L152-L160 | train | Render all of the block device s values. | 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... |
buildbot/buildbot | master/buildbot/worker/openstack.py | OpenStackLatentWorker._determineVolumeSize | def _determineVolumeSize(self, source_type, source_uuid):
"""
Determine the minimum size the volume needs to be for the source.
Returns the size in GiB.
"""
nova = self.novaclient
if source_type == 'image':
# The size returned for an image is in bytes. Round u... | python | def _determineVolumeSize(self, source_type, source_uuid):
"""
Determine the minimum size the volume needs to be for the source.
Returns the size in GiB.
"""
nova = self.novaclient
if source_type == 'image':
# The size returned for an image is in bytes. Round u... | [
"def",
"_determineVolumeSize",
"(",
"self",
",",
"source_type",
",",
"source_uuid",
")",
":",
"nova",
"=",
"self",
".",
"novaclient",
"if",
"source_type",
"==",
"'image'",
":",
"# The size returned for an image is in bytes. Round up to the next",
"# integer GiB.",
"image"... | Determine the minimum size the volume needs to be for the source.
Returns the size in GiB. | [
"Determine",
"the",
"minimum",
"size",
"the",
"volume",
"needs",
"to",
"be",
"for",
"the",
"source",
".",
"Returns",
"the",
"size",
"in",
"GiB",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/openstack.py#L162-L186 | train | Determine the minimum size of the volume for the source. | 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... |
buildbot/buildbot | master/buildbot/steps/mtrlogobserver.py | MTR.runInteractionWithRetry | def runInteractionWithRetry(self, actionFn, *args, **kw):
"""
Run a database transaction with dbpool.runInteraction, but retry the
transaction in case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts.
... | python | def runInteractionWithRetry(self, actionFn, *args, **kw):
"""
Run a database transaction with dbpool.runInteraction, but retry the
transaction in case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts.
... | [
"def",
"runInteractionWithRetry",
"(",
"self",
",",
"actionFn",
",",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"def",
"runWithRetry",
"(",
"txn",
",",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"retryCount",
"=",
"0",
"while",
"(",
"True",
")",
... | Run a database transaction with dbpool.runInteraction, but retry the
transaction in case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts.
The passed callable that implements the transaction must be retryable... | [
"Run",
"a",
"database",
"transaction",
"with",
"dbpool",
".",
"runInteraction",
"but",
"retry",
"the",
"transaction",
"in",
"case",
"of",
"a",
"temporary",
"error",
"(",
"like",
"connection",
"lost",
")",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/mtrlogobserver.py#L339-L368 | train | Run a database transaction with dbpool. runInteraction but retry the transaction if an exception is raised. | 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... |
buildbot/buildbot | master/buildbot/steps/mtrlogobserver.py | MTR.runQueryWithRetry | def runQueryWithRetry(self, *args, **kw):
"""
Run a database query, like with dbpool.runQuery, but retry the query in
case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts."""
def runQuery(txn... | python | def runQueryWithRetry(self, *args, **kw):
"""
Run a database query, like with dbpool.runQuery, but retry the query in
case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts."""
def runQuery(txn... | [
"def",
"runQueryWithRetry",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"def",
"runQuery",
"(",
"txn",
",",
"*",
"args",
",",
"*",
"*",
"kw",
")",
":",
"txn",
".",
"execute",
"(",
"*",
"args",
",",
"*",
"*",
"kw",
")",
"retu... | Run a database query, like with dbpool.runQuery, but retry the query in
case of a temporary error (like connection lost).
This is needed to be robust against things like database connection
idle timeouts. | [
"Run",
"a",
"database",
"query",
"like",
"with",
"dbpool",
".",
"runQuery",
"but",
"retry",
"the",
"query",
"in",
"case",
"of",
"a",
"temporary",
"error",
"(",
"like",
"connection",
"lost",
")",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/steps/mtrlogobserver.py#L370-L382 | train | Run a database query but retry the query if it fails. | 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... |
buildbot/buildbot | master/buildbot/db/pool.py | timed_do_fn | def timed_do_fn(f):
"""Decorate a do function to log before, after, and elapsed time,
with the name of the calling function. This is not speedy!"""
def wrap(callable, *args, **kwargs):
global _debug_id
# get a description of the function that called us
st = traceback.extract_stack(... | python | def timed_do_fn(f):
"""Decorate a do function to log before, after, and elapsed time,
with the name of the calling function. This is not speedy!"""
def wrap(callable, *args, **kwargs):
global _debug_id
# get a description of the function that called us
st = traceback.extract_stack(... | [
"def",
"timed_do_fn",
"(",
"f",
")",
":",
"def",
"wrap",
"(",
"callable",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"global",
"_debug_id",
"# get a description of the function that called us",
"st",
"=",
"traceback",
".",
"extract_stack",
"(",
"limi... | Decorate a do function to log before, after, and elapsed time,
with the name of the calling function. This is not speedy! | [
"Decorate",
"a",
"do",
"function",
"to",
"log",
"before",
"after",
"and",
"elapsed",
"time",
"with",
"the",
"name",
"of",
"the",
"calling",
"function",
".",
"This",
"is",
"not",
"speedy!"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/pool.py#L42-L87 | train | Decorate a function to log before after and elapsed time | 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... |
buildbot/buildbot | master/buildbot/db/pool.py | DBThreadPool.shutdown | def shutdown(self):
"""Manually stop the pool. This is only necessary from tests, as the
pool will stop itself when the reactor stops under normal
circumstances."""
if not self._stop_evt:
return # pool is already stopped
self.reactor.removeSystemEventTrigger(self._s... | python | def shutdown(self):
"""Manually stop the pool. This is only necessary from tests, as the
pool will stop itself when the reactor stops under normal
circumstances."""
if not self._stop_evt:
return # pool is already stopped
self.reactor.removeSystemEventTrigger(self._s... | [
"def",
"shutdown",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"_stop_evt",
":",
"return",
"# pool is already stopped",
"self",
".",
"reactor",
".",
"removeSystemEventTrigger",
"(",
"self",
".",
"_stop_evt",
")",
"self",
".",
"_stop",
"(",
")"
] | Manually stop the pool. This is only necessary from tests, as the
pool will stop itself when the reactor stops under normal
circumstances. | [
"Manually",
"stop",
"the",
"pool",
".",
"This",
"is",
"only",
"necessary",
"from",
"tests",
"as",
"the",
"pool",
"will",
"stop",
"itself",
"when",
"the",
"reactor",
"stops",
"under",
"normal",
"circumstances",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/db/pool.py#L152-L159 | train | Manually stop the pool. | 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... |
buildbot/buildbot | master/buildbot/manhole.py | show | def show(x):
"""Display the data attributes of an object in a readable format"""
print("data attributes of %r" % (x,))
names = dir(x)
maxlen = max([0] + [len(n) for n in names])
for k in names:
v = getattr(x, k)
if isinstance(v, types.MethodType):
continue
if k[:2... | python | def show(x):
"""Display the data attributes of an object in a readable format"""
print("data attributes of %r" % (x,))
names = dir(x)
maxlen = max([0] + [len(n) for n in names])
for k in names:
v = getattr(x, k)
if isinstance(v, types.MethodType):
continue
if k[:2... | [
"def",
"show",
"(",
"x",
")",
":",
"print",
"(",
"\"data attributes of %r\"",
"%",
"(",
"x",
",",
")",
")",
"names",
"=",
"dir",
"(",
"x",
")",
"maxlen",
"=",
"max",
"(",
"[",
"0",
"]",
"+",
"[",
"len",
"(",
"n",
")",
"for",
"n",
"in",
"names... | Display the data attributes of an object in a readable format | [
"Display",
"the",
"data",
"attributes",
"of",
"an",
"object",
"in",
"a",
"readable",
"format"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/manhole.py#L340-L361 | train | Display the data attributes of an object in a readable format | 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | Connection.lookupByName | def lookupByName(self, name):
""" I lookup an existing predefined domain """
res = yield queue.executeInThread(self.connection.lookupByName, name)
return self.DomainClass(self, res) | python | def lookupByName(self, name):
""" I lookup an existing predefined domain """
res = yield queue.executeInThread(self.connection.lookupByName, name)
return self.DomainClass(self, res) | [
"def",
"lookupByName",
"(",
"self",
",",
"name",
")",
":",
"res",
"=",
"yield",
"queue",
".",
"executeInThread",
"(",
"self",
".",
"connection",
".",
"lookupByName",
",",
"name",
")",
"return",
"self",
".",
"DomainClass",
"(",
"self",
",",
"res",
")"
] | I lookup an existing predefined domain | [
"I",
"lookup",
"an",
"existing",
"predefined",
"domain"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L133-L136 | train | I lookup an existing predefined domain by 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | Connection.create | def create(self, xml):
""" I take libvirt XML and start a new VM """
res = yield queue.executeInThread(self.connection.createXML, xml, 0)
return self.DomainClass(self, res) | python | def create(self, xml):
""" I take libvirt XML and start a new VM """
res = yield queue.executeInThread(self.connection.createXML, xml, 0)
return self.DomainClass(self, res) | [
"def",
"create",
"(",
"self",
",",
"xml",
")",
":",
"res",
"=",
"yield",
"queue",
".",
"executeInThread",
"(",
"self",
".",
"connection",
".",
"createXML",
",",
"xml",
",",
"0",
")",
"return",
"self",
".",
"DomainClass",
"(",
"self",
",",
"res",
")"
... | I take libvirt XML and start a new VM | [
"I",
"take",
"libvirt",
"XML",
"and",
"start",
"a",
"new",
"VM"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L139-L142 | train | I take libvirt XML and start a new VM | 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | LibVirtWorker._find_existing_instance | def _find_existing_instance(self):
"""
I find existing VMs that are already running that might be orphaned instances of this worker.
"""
if not self.connection:
return None
domains = yield self.connection.all()
for d in domains:
name = yield d.nam... | python | def _find_existing_instance(self):
"""
I find existing VMs that are already running that might be orphaned instances of this worker.
"""
if not self.connection:
return None
domains = yield self.connection.all()
for d in domains:
name = yield d.nam... | [
"def",
"_find_existing_instance",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"connection",
":",
"return",
"None",
"domains",
"=",
"yield",
"self",
".",
"connection",
".",
"all",
"(",
")",
"for",
"d",
"in",
"domains",
":",
"name",
"=",
"yield",
"d... | I find existing VMs that are already running that might be orphaned instances of this worker. | [
"I",
"find",
"existing",
"VMs",
"that",
"are",
"already",
"running",
"that",
"might",
"be",
"orphaned",
"instances",
"of",
"this",
"worker",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L179-L193 | train | I find existing VMs that are already running and that are not orphaned. | 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | LibVirtWorker._prepare_base_image | def _prepare_base_image(self):
"""
I am a private method for creating (possibly cheap) copies of a
base_image for start_instance to boot.
"""
if not self.base_image:
return defer.succeed(True)
if self.cheap_copy:
clone_cmd = "qemu-img"
... | python | def _prepare_base_image(self):
"""
I am a private method for creating (possibly cheap) copies of a
base_image for start_instance to boot.
"""
if not self.base_image:
return defer.succeed(True)
if self.cheap_copy:
clone_cmd = "qemu-img"
... | [
"def",
"_prepare_base_image",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"base_image",
":",
"return",
"defer",
".",
"succeed",
"(",
"True",
")",
"if",
"self",
".",
"cheap_copy",
":",
"clone_cmd",
"=",
"\"qemu-img\"",
"clone_args",
"=",
"\"create -b %(b... | I am a private method for creating (possibly cheap) copies of a
base_image for start_instance to boot. | [
"I",
"am",
"a",
"private",
"method",
"for",
"creating",
"(",
"possibly",
"cheap",
")",
"copies",
"of",
"a",
"base_image",
"for",
"start_instance",
"to",
"boot",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L207-L241 | train | Prepare base image for start 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | LibVirtWorker.start_instance | def start_instance(self, build):
"""
I start a new instance of a VM.
If a base_image is specified, I will make a clone of that otherwise i will
use image directly.
If i'm not given libvirt domain definition XML, I will look for my name
in the list of defined virtual mac... | python | def start_instance(self, build):
"""
I start a new instance of a VM.
If a base_image is specified, I will make a clone of that otherwise i will
use image directly.
If i'm not given libvirt domain definition XML, I will look for my name
in the list of defined virtual mac... | [
"def",
"start_instance",
"(",
"self",
",",
"build",
")",
":",
"if",
"self",
".",
"domain",
"is",
"not",
"None",
":",
"log",
".",
"msg",
"(",
"\"Cannot start_instance '%s' as already active\"",
"%",
"self",
".",
"workername",
")",
"return",
"False",
"yield",
... | I start a new instance of a VM.
If a base_image is specified, I will make a clone of that otherwise i will
use image directly.
If i'm not given libvirt domain definition XML, I will look for my name
in the list of defined virtual machines and start that. | [
"I",
"start",
"a",
"new",
"instance",
"of",
"a",
"VM",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L244-L274 | train | I start a new instance of a VM. | 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... |
buildbot/buildbot | master/buildbot/worker/libvirt.py | LibVirtWorker.stop_instance | def stop_instance(self, fast=False):
"""
I attempt to stop a running VM.
I make sure any connection to the worker is removed.
If the VM was using a cloned image, I remove the clone
When everything is tidied up, I ask that bbot looks for work to do
"""
log.msg("Att... | python | def stop_instance(self, fast=False):
"""
I attempt to stop a running VM.
I make sure any connection to the worker is removed.
If the VM was using a cloned image, I remove the clone
When everything is tidied up, I ask that bbot looks for work to do
"""
log.msg("Att... | [
"def",
"stop_instance",
"(",
"self",
",",
"fast",
"=",
"False",
")",
":",
"log",
".",
"msg",
"(",
"\"Attempting to stop '%s'\"",
"%",
"self",
".",
"workername",
")",
"if",
"self",
".",
"domain",
"is",
"None",
":",
"log",
".",
"msg",
"(",
"\"I don't think... | I attempt to stop a running VM.
I make sure any connection to the worker is removed.
If the VM was using a cloned image, I remove the clone
When everything is tidied up, I ask that bbot looks for work to do | [
"I",
"attempt",
"to",
"stop",
"a",
"running",
"VM",
".",
"I",
"make",
"sure",
"any",
"connection",
"to",
"the",
"worker",
"is",
"removed",
".",
"If",
"the",
"VM",
"was",
"using",
"a",
"cloned",
"image",
"I",
"remove",
"the",
"clone",
"When",
"everythin... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/worker/libvirt.py#L276-L312 | train | Stop a running VM. | 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... |
buildbot/buildbot | master/buildbot/changes/p4poller.py | get_simple_split | def get_simple_split(branchfile):
"""Splits the branchfile argument and assuming branch is
the first path component in branchfile, will return
branch and file else None."""
index = branchfile.find('/')
if index == -1:
return None, None
branch, file = branchfile.split('/', 1)
r... | python | def get_simple_split(branchfile):
"""Splits the branchfile argument and assuming branch is
the first path component in branchfile, will return
branch and file else None."""
index = branchfile.find('/')
if index == -1:
return None, None
branch, file = branchfile.split('/', 1)
r... | [
"def",
"get_simple_split",
"(",
"branchfile",
")",
":",
"index",
"=",
"branchfile",
".",
"find",
"(",
"'/'",
")",
"if",
"index",
"==",
"-",
"1",
":",
"return",
"None",
",",
"None",
"branch",
",",
"file",
"=",
"branchfile",
".",
"split",
"(",
"'/'",
"... | Splits the branchfile argument and assuming branch is
the first path component in branchfile, will return
branch and file else None. | [
"Splits",
"the",
"branchfile",
"argument",
"and",
"assuming",
"branch",
"is",
"the",
"first",
"path",
"component",
"in",
"branchfile",
"will",
"return",
"branch",
"and",
"file",
"else",
"None",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/changes/p4poller.py#L83-L92 | train | Splits the branchfile argument and assuming branch is
the first path component in branchfile will return
branch and file else None. | 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... |
buildbot/buildbot | master/buildbot/schedulers/trysched.py | TryBase.filterBuilderList | def filterBuilderList(self, builderNames):
"""
Make sure that C{builderNames} is a subset of the configured
C{self.builderNames}, returning an empty list if not. If
C{builderNames} is empty, use C{self.builderNames}.
@returns: list of builder names to build on
"""
... | python | def filterBuilderList(self, builderNames):
"""
Make sure that C{builderNames} is a subset of the configured
C{self.builderNames}, returning an empty list if not. If
C{builderNames} is empty, use C{self.builderNames}.
@returns: list of builder names to build on
"""
... | [
"def",
"filterBuilderList",
"(",
"self",
",",
"builderNames",
")",
":",
"# self.builderNames is the configured list of builders",
"# available for try. If the user supplies a list of builders,",
"# it must be restricted to the configured list. If not, build",
"# on all of the configured buil... | Make sure that C{builderNames} is a subset of the configured
C{self.builderNames}, returning an empty list if not. If
C{builderNames} is empty, use C{self.builderNames}.
@returns: list of builder names to build on | [
"Make",
"sure",
"that",
"C",
"{",
"builderNames",
"}",
"is",
"a",
"subset",
"of",
"the",
"configured",
"C",
"{",
"self",
".",
"builderNames",
"}",
"returning",
"an",
"empty",
"list",
"if",
"not",
".",
"If",
"C",
"{",
"builderNames",
"}",
"is",
"empty",... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/schedulers/trysched.py#L34-L56 | train | Filter out the builder names that are not in the list of builders. | 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... |
buildbot/buildbot | master/buildbot/util/lru.py | LRUCache._ref_key | def _ref_key(self, key):
"""Record a reference to the argument key."""
queue = self.queue
refcount = self.refcount
queue.append(key)
refcount[key] = refcount[key] + 1
# periodically compact the queue by eliminating duplicate keys
# while preserving order of most... | python | def _ref_key(self, key):
"""Record a reference to the argument key."""
queue = self.queue
refcount = self.refcount
queue.append(key)
refcount[key] = refcount[key] + 1
# periodically compact the queue by eliminating duplicate keys
# while preserving order of most... | [
"def",
"_ref_key",
"(",
"self",
",",
"key",
")",
":",
"queue",
"=",
"self",
".",
"queue",
"refcount",
"=",
"self",
".",
"refcount",
"queue",
".",
"append",
"(",
"key",
")",
"refcount",
"[",
"key",
"]",
"=",
"refcount",
"[",
"key",
"]",
"+",
"1",
... | Record a reference to the argument key. | [
"Record",
"a",
"reference",
"to",
"the",
"argument",
"key",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/lru.py#L108-L127 | train | Record a reference to the argument 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... |
buildbot/buildbot | master/buildbot/util/lru.py | LRUCache._get_hit | def _get_hit(self, key):
"""Try to do a value lookup from the existing cache entries."""
try:
result = self.cache[key]
self.hits += 1
self._ref_key(key)
return result
except KeyError:
pass
result = self.weakrefs[key]
se... | python | def _get_hit(self, key):
"""Try to do a value lookup from the existing cache entries."""
try:
result = self.cache[key]
self.hits += 1
self._ref_key(key)
return result
except KeyError:
pass
result = self.weakrefs[key]
se... | [
"def",
"_get_hit",
"(",
"self",
",",
"key",
")",
":",
"try",
":",
"result",
"=",
"self",
".",
"cache",
"[",
"key",
"]",
"self",
".",
"hits",
"+=",
"1",
"self",
".",
"_ref_key",
"(",
"key",
")",
"return",
"result",
"except",
"KeyError",
":",
"pass",... | Try to do a value lookup from the existing cache entries. | [
"Try",
"to",
"do",
"a",
"value",
"lookup",
"from",
"the",
"existing",
"cache",
"entries",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/lru.py#L129-L143 | train | Try to do a value lookup from the existing cache entries. | 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... |
buildbot/buildbot | master/buildbot/util/lru.py | LRUCache._purge | def _purge(self):
"""
Trim the cache down to max_size by evicting the
least-recently-used entries.
"""
if len(self.cache) <= self.max_size:
return
cache = self.cache
refcount = self.refcount
queue = self.queue
max_size = self.max_size
... | python | def _purge(self):
"""
Trim the cache down to max_size by evicting the
least-recently-used entries.
"""
if len(self.cache) <= self.max_size:
return
cache = self.cache
refcount = self.refcount
queue = self.queue
max_size = self.max_size
... | [
"def",
"_purge",
"(",
"self",
")",
":",
"if",
"len",
"(",
"self",
".",
"cache",
")",
"<=",
"self",
".",
"max_size",
":",
"return",
"cache",
"=",
"self",
".",
"cache",
"refcount",
"=",
"self",
".",
"refcount",
"queue",
"=",
"self",
".",
"queue",
"ma... | Trim the cache down to max_size by evicting the
least-recently-used entries. | [
"Trim",
"the",
"cache",
"down",
"to",
"max_size",
"by",
"evicting",
"the",
"least",
"-",
"recently",
"-",
"used",
"entries",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/util/lru.py#L145-L166 | train | Remove the least recently used entries from the cache. | 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... |
buildbot/buildbot | worker/buildbot_worker/scripts/start.py | startWorker | def startWorker(basedir, quiet, nodaemon):
"""
Start worker process.
Fork and start twisted application described in basedir buildbot.tac file.
Print it's log messages to stdout for a while and try to figure out if
start was successful.
If quiet or nodaemon parameters are True, or we are runni... | python | def startWorker(basedir, quiet, nodaemon):
"""
Start worker process.
Fork and start twisted application described in basedir buildbot.tac file.
Print it's log messages to stdout for a while and try to figure out if
start was successful.
If quiet or nodaemon parameters are True, or we are runni... | [
"def",
"startWorker",
"(",
"basedir",
",",
"quiet",
",",
"nodaemon",
")",
":",
"os",
".",
"chdir",
"(",
"basedir",
")",
"if",
"quiet",
"or",
"nodaemon",
":",
"return",
"launch",
"(",
"nodaemon",
")",
"# we probably can't do this os.fork under windows",
"from",
... | Start worker process.
Fork and start twisted application described in basedir buildbot.tac file.
Print it's log messages to stdout for a while and try to figure out if
start was successful.
If quiet or nodaemon parameters are True, or we are running on a win32
system, will not fork and log will no... | [
"Start",
"worker",
"process",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/worker/buildbot_worker/scripts/start.py#L83-L119 | train | Start a worker process. | 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... |
buildbot/buildbot | www/badges/buildbot_badges/__init__.py | Api.textwidth | def textwidth(self, text, config):
"""Calculates the width of the specified text.
"""
surface = cairo.SVGSurface(None, 1280, 200)
ctx = cairo.Context(surface)
ctx.select_font_face(config['font_face'],
cairo.FONT_SLANT_NORMAL,
... | python | def textwidth(self, text, config):
"""Calculates the width of the specified text.
"""
surface = cairo.SVGSurface(None, 1280, 200)
ctx = cairo.Context(surface)
ctx.select_font_face(config['font_face'],
cairo.FONT_SLANT_NORMAL,
... | [
"def",
"textwidth",
"(",
"self",
",",
"text",
",",
"config",
")",
":",
"surface",
"=",
"cairo",
".",
"SVGSurface",
"(",
"None",
",",
"1280",
",",
"200",
")",
"ctx",
"=",
"cairo",
".",
"Context",
"(",
"surface",
")",
"ctx",
".",
"select_font_face",
"(... | Calculates the width of the specified text. | [
"Calculates",
"the",
"width",
"of",
"the",
"specified",
"text",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/www/badges/buildbot_badges/__init__.py#L109-L118 | train | Calculates the width of the specified text. | 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... |
buildbot/buildbot | www/badges/buildbot_badges/__init__.py | Api.makesvg | def makesvg(self, right_text, status=None, left_text=None,
left_color=None, config=None):
"""Renders an SVG from the template, using the specified data
"""
right_color = config['color_scheme'].get(status, "#9f9f9f") # Grey
left_text = left_text or config['left_text']
... | python | def makesvg(self, right_text, status=None, left_text=None,
left_color=None, config=None):
"""Renders an SVG from the template, using the specified data
"""
right_color = config['color_scheme'].get(status, "#9f9f9f") # Grey
left_text = left_text or config['left_text']
... | [
"def",
"makesvg",
"(",
"self",
",",
"right_text",
",",
"status",
"=",
"None",
",",
"left_text",
"=",
"None",
",",
"left_color",
"=",
"None",
",",
"config",
"=",
"None",
")",
":",
"right_color",
"=",
"config",
"[",
"'color_scheme'",
"]",
".",
"get",
"("... | Renders an SVG from the template, using the specified data | [
"Renders",
"an",
"SVG",
"from",
"the",
"template",
"using",
"the",
"specified",
"data"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/www/badges/buildbot_badges/__init__.py#L120-L141 | train | Renders an SVG from the template | 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... |
buildbot/buildbot | master/buildbot/process/users/manual.py | CommandlineUserManagerPerspective.formatResults | def formatResults(self, op, results):
"""
This formats the results of the database operations for printing
back to the caller
@param op: operation to perform (add, remove, update, get)
@type op: string
@param results: results from db queries in perspective_commandline
... | python | def formatResults(self, op, results):
"""
This formats the results of the database operations for printing
back to the caller
@param op: operation to perform (add, remove, update, get)
@type op: string
@param results: results from db queries in perspective_commandline
... | [
"def",
"formatResults",
"(",
"self",
",",
"op",
",",
"results",
")",
":",
"formatted_results",
"=",
"\"\"",
"if",
"op",
"==",
"'add'",
":",
"# list, alternating ident, uid",
"formatted_results",
"+=",
"\"user(s) added:\\n\"",
"for",
"user",
"in",
"results",
":",
... | This formats the results of the database operations for printing
back to the caller
@param op: operation to perform (add, remove, update, get)
@type op: string
@param results: results from db queries in perspective_commandline
@type results: list
@returns: string conta... | [
"This",
"formats",
"the",
"results",
"of",
"the",
"database",
"operations",
"for",
"printing",
"back",
"to",
"the",
"caller"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/manual.py#L37-L83 | train | This function formats the results of the database operations for printing
to the caller. | 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... |
buildbot/buildbot | master/buildbot/process/users/manual.py | CommandlineUserManagerPerspective.perspective_commandline | def perspective_commandline(self, op, bb_username, bb_password, ids, info):
"""
This performs the requested operations from the `buildbot user`
call by calling the proper buildbot.db.users methods based on
the operation. It yields a deferred instance with the results
from the dat... | python | def perspective_commandline(self, op, bb_username, bb_password, ids, info):
"""
This performs the requested operations from the `buildbot user`
call by calling the proper buildbot.db.users methods based on
the operation. It yields a deferred instance with the results
from the dat... | [
"def",
"perspective_commandline",
"(",
"self",
",",
"op",
",",
"bb_username",
",",
"bb_password",
",",
"ids",
",",
"info",
")",
":",
"log",
".",
"msg",
"(",
"\"perspective_commandline called\"",
")",
"results",
"=",
"[",
"]",
"# pylint: disable=too-many-nested-blo... | This performs the requested operations from the `buildbot user`
call by calling the proper buildbot.db.users methods based on
the operation. It yields a deferred instance with the results
from the database methods.
@param op: operation to perform (add, remove, update, get)
@type... | [
"This",
"performs",
"the",
"requested",
"operations",
"from",
"the",
"buildbot",
"user",
"call",
"by",
"calling",
"the",
"proper",
"buildbot",
".",
"db",
".",
"users",
"methods",
"based",
"on",
"the",
"operation",
".",
"It",
"yields",
"a",
"deferred",
"insta... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/process/users/manual.py#L86-L187 | train | This method is used to perform the perspective of the command line. It returns a deferred instance with the result of the deferred call. | 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... |
buildbot/buildbot | master/buildbot/statistics/stats_service.py | StatsService.yieldMetricsValue | def yieldMetricsValue(self, data_name, post_data, buildid):
"""
A method to allow posting data that is not generated and stored as build-data in
the database. This method generates the `stats-yield-data` event to the mq layer
which is then consumed in self.postData.
@params
... | python | def yieldMetricsValue(self, data_name, post_data, buildid):
"""
A method to allow posting data that is not generated and stored as build-data in
the database. This method generates the `stats-yield-data` event to the mq layer
which is then consumed in self.postData.
@params
... | [
"def",
"yieldMetricsValue",
"(",
"self",
",",
"data_name",
",",
"post_data",
",",
"buildid",
")",
":",
"build_data",
"=",
"yield",
"self",
".",
"master",
".",
"data",
".",
"get",
"(",
"(",
"'builds'",
",",
"buildid",
")",
")",
"routingKey",
"=",
"(",
"... | A method to allow posting data that is not generated and stored as build-data in
the database. This method generates the `stats-yield-data` event to the mq layer
which is then consumed in self.postData.
@params
data_name: (str) The unique name for identifying this data.
post_dat... | [
"A",
"method",
"to",
"allow",
"posting",
"data",
"that",
"is",
"not",
"generated",
"and",
"stored",
"as",
"build",
"-",
"data",
"in",
"the",
"database",
".",
"This",
"method",
"generates",
"the",
"stats",
"-",
"yield",
"-",
"data",
"event",
"to",
"the",
... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/statistics/stats_service.py#L73-L93 | train | This method is used to send a stats - yield - data event to the mq layer that is then consumed in self. postData. | 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... |
buildbot/buildbot | master/buildbot/plugins/db.py | get_plugins | def get_plugins(namespace, interface=None, check_extras=True, load_now=False):
"""
helper to get a direct interface to _Plugins
"""
return _DB.add_namespace(namespace, interface, check_extras, load_now) | python | def get_plugins(namespace, interface=None, check_extras=True, load_now=False):
"""
helper to get a direct interface to _Plugins
"""
return _DB.add_namespace(namespace, interface, check_extras, load_now) | [
"def",
"get_plugins",
"(",
"namespace",
",",
"interface",
"=",
"None",
",",
"check_extras",
"=",
"True",
",",
"load_now",
"=",
"False",
")",
":",
"return",
"_DB",
".",
"add_namespace",
"(",
"namespace",
",",
"interface",
",",
"check_extras",
",",
"load_now",... | helper to get a direct interface to _Plugins | [
"helper",
"to",
"get",
"a",
"direct",
"interface",
"to",
"_Plugins"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/plugins/db.py#L347-L351 | train | helper to get a direct interface to _Plugins
| 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... |
buildbot/buildbot | master/buildbot/plugins/db.py | _PluginDB.add_namespace | def add_namespace(self, namespace, interface=None, check_extras=True,
load_now=False):
"""
register given namespace in global database of plugins
in case it's already registered, return the registration
"""
tempo = self._namespaces.get(namespace)
i... | python | def add_namespace(self, namespace, interface=None, check_extras=True,
load_now=False):
"""
register given namespace in global database of plugins
in case it's already registered, return the registration
"""
tempo = self._namespaces.get(namespace)
i... | [
"def",
"add_namespace",
"(",
"self",
",",
"namespace",
",",
"interface",
"=",
"None",
",",
"check_extras",
"=",
"True",
",",
"load_now",
"=",
"False",
")",
":",
"tempo",
"=",
"self",
".",
"_namespaces",
".",
"get",
"(",
"namespace",
")",
"if",
"tempo",
... | register given namespace in global database of plugins
in case it's already registered, return the registration | [
"register",
"given",
"namespace",
"in",
"global",
"database",
"of",
"plugins"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/plugins/db.py#L287-L303 | train | Add a namespace to the global database of plugins. | 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... |
buildbot/buildbot | master/buildbot/plugins/db.py | _PluginDB.info | def info(self):
"""
get information about all plugins in registered namespaces
"""
result = dict()
for name, namespace in self._namespaces.items():
result[name] = namespace.info_all()
return result | python | def info(self):
"""
get information about all plugins in registered namespaces
"""
result = dict()
for name, namespace in self._namespaces.items():
result[name] = namespace.info_all()
return result | [
"def",
"info",
"(",
"self",
")",
":",
"result",
"=",
"dict",
"(",
")",
"for",
"name",
",",
"namespace",
"in",
"self",
".",
"_namespaces",
".",
"items",
"(",
")",
":",
"result",
"[",
"name",
"]",
"=",
"namespace",
".",
"info_all",
"(",
")",
"return"... | get information about all plugins in registered namespaces | [
"get",
"information",
"about",
"all",
"plugins",
"in",
"registered",
"namespaces"
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/plugins/db.py#L312-L319 | train | get information about all plugins in registered namespaces | 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... |
buildbot/buildbot | master/buildbot/pbmanager.py | PBManager.register | def register(self, portstr, username, password, pfactory):
"""
Register a perspective factory PFACTORY to be executed when a PB
connection arrives on PORTSTR with USERNAME/PASSWORD. Returns a
Registration object which can be used to unregister later.
"""
# do some basic ... | python | def register(self, portstr, username, password, pfactory):
"""
Register a perspective factory PFACTORY to be executed when a PB
connection arrives on PORTSTR with USERNAME/PASSWORD. Returns a
Registration object which can be used to unregister later.
"""
# do some basic ... | [
"def",
"register",
"(",
"self",
",",
"portstr",
",",
"username",
",",
"password",
",",
"pfactory",
")",
":",
"# do some basic normalization of portstrs",
"if",
"isinstance",
"(",
"portstr",
",",
"type",
"(",
"0",
")",
")",
"or",
"':'",
"not",
"in",
"portstr"... | Register a perspective factory PFACTORY to be executed when a PB
connection arrives on PORTSTR with USERNAME/PASSWORD. Returns a
Registration object which can be used to unregister later. | [
"Register",
"a",
"perspective",
"factory",
"PFACTORY",
"to",
"be",
"executed",
"when",
"a",
"PB",
"connection",
"arrives",
"on",
"PORTSTR",
"with",
"USERNAME",
"/",
"PASSWORD",
".",
"Returns",
"a",
"Registration",
"object",
"which",
"can",
"be",
"used",
"to",
... | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/pbmanager.py#L50-L70 | train | Registers a new PB
connection. | 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... |
buildbot/buildbot | master/buildbot/pbmanager.py | Registration.getPort | def getPort(self):
"""
Helper method for testing; returns the TCP port used for this
registration, even if it was specified as 0 and thus allocated by the
OS.
"""
disp = self.pbmanager.dispatchers[self.portstr]
return disp.port.getHost().port | python | def getPort(self):
"""
Helper method for testing; returns the TCP port used for this
registration, even if it was specified as 0 and thus allocated by the
OS.
"""
disp = self.pbmanager.dispatchers[self.portstr]
return disp.port.getHost().port | [
"def",
"getPort",
"(",
"self",
")",
":",
"disp",
"=",
"self",
".",
"pbmanager",
".",
"dispatchers",
"[",
"self",
".",
"portstr",
"]",
"return",
"disp",
".",
"port",
".",
"getHost",
"(",
")",
".",
"port"
] | Helper method for testing; returns the TCP port used for this
registration, even if it was specified as 0 and thus allocated by the
OS. | [
"Helper",
"method",
"for",
"testing",
";",
"returns",
"the",
"TCP",
"port",
"used",
"for",
"this",
"registration",
"even",
"if",
"it",
"was",
"specified",
"as",
"0",
"and",
"thus",
"allocated",
"by",
"the",
"OS",
"."
] | 5df3cfae6d760557d99156633c32b1822a1e130c | https://github.com/buildbot/buildbot/blob/5df3cfae6d760557d99156633c32b1822a1e130c/master/buildbot/pbmanager.py#L104-L111 | train | Returns the TCP port used for this 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.