Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
list
start_point
list
end_point
list
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
_msvc14_get_vc_env
(plat_spec)
Python 3.8 "distutils/_msvccompiler.py" backport
Python 3.8 "distutils/_msvccompiler.py" backport
def _msvc14_get_vc_env(plat_spec): """Python 3.8 "distutils/_msvccompiler.py" backport""" if "DISTUTILS_USE_SDK" in environ: return { key.lower(): value for key, value in environ.items() } vcvarsall, vcruntime = _msvc14_find_vcvarsall(plat_spec) if not vcvarsall:...
[ "def", "_msvc14_get_vc_env", "(", "plat_spec", ")", ":", "if", "\"DISTUTILS_USE_SDK\"", "in", "environ", ":", "return", "{", "key", ".", "lower", "(", ")", ":", "value", "for", "key", ",", "value", "in", "environ", ".", "items", "(", ")", "}", "vcvarsall...
[ 255, 0 ]
[ 288, 14 ]
python
ceb
['fi', 'ceb', 'en']
False
msvc14_get_vc_env
(plat_spec)
Patched "distutils._msvccompiler._get_vc_env" for support extra Microsoft Visual C++ 14.X compilers. Set environment without use of "vcvarsall.bat". Parameters ---------- plat_spec: str Target architecture. Return ------ dict environment
Patched "distutils._msvccompiler._get_vc_env" for support extra Microsoft Visual C++ 14.X compilers.
def msvc14_get_vc_env(plat_spec): """ Patched "distutils._msvccompiler._get_vc_env" for support extra Microsoft Visual C++ 14.X compilers. Set environment without use of "vcvarsall.bat". Parameters ---------- plat_spec: str Target architecture. Return ------ dict ...
[ "def", "msvc14_get_vc_env", "(", "plat_spec", ")", ":", "# Always use backport from CPython 3.8", "try", ":", "return", "_msvc14_get_vc_env", "(", "plat_spec", ")", "except", "distutils", ".", "errors", ".", "DistutilsPlatformError", "as", "exc", ":", "_augment_exceptio...
[ 291, 0 ]
[ 314, 13 ]
python
en
['en', 'error', 'th']
False
msvc14_gen_lib_options
(*args, **kwargs)
Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2)
Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2)
def msvc14_gen_lib_options(*args, **kwargs): """ Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ if "numpy.distutils" in sys.modules: import numpy as np if LegacyVersion(np.__...
[ "def", "msvc14_gen_lib_options", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "\"numpy.distutils\"", "in", "sys", ".", "modules", ":", "import", "numpy", "as", "np", "if", "LegacyVersion", "(", "np", ".", "__version__", ")", "<", "LegacyVersi...
[ 317, 0 ]
[ 327, 65 ]
python
en
['en', 'error', 'th']
False
_augment_exception
(exc, version, arch='')
Add details to the exception message to help guide the user as to what action will resolve it.
Add details to the exception message to help guide the user as to what action will resolve it.
def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user as to what action will resolve it. """ # Error if MSVC++ directory not found or environment not set message = exc.args[0] if "vcvarsall" in message.lower() or "visual c" in message...
[ "def", "_augment_exception", "(", "exc", ",", "version", ",", "arch", "=", "''", ")", ":", "# Error if MSVC++ directory not found or environment not set", "message", "=", "exc", ".", "args", "[", "0", "]", "if", "\"vcvarsall\"", "in", "message", ".", "lower", "(...
[ 330, 0 ]
[ 364, 26 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.target_cpu
(self)
Return Target CPU architecture. Return ------ str Target CPU
Return Target CPU architecture.
def target_cpu(self): """ Return Target CPU architecture. Return ------ str Target CPU """ return self.arch[self.arch.find('_') + 1:]
[ "def", "target_cpu", "(", "self", ")", ":", "return", "self", ".", "arch", "[", "self", ".", "arch", ".", "find", "(", "'_'", ")", "+", "1", ":", "]" ]
[ 382, 4 ]
[ 391, 50 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.target_is_x86
(self)
Return True if target CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits
Return True if target CPU is x86 32 bits..
def target_is_x86(self): """ Return True if target CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits """ return self.target_cpu == 'x86'
[ "def", "target_is_x86", "(", "self", ")", ":", "return", "self", ".", "target_cpu", "==", "'x86'" ]
[ 393, 4 ]
[ 402, 39 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.current_is_x86
(self)
Return True if current CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits
Return True if current CPU is x86 32 bits..
def current_is_x86(self): """ Return True if current CPU is x86 32 bits.. Return ------ bool CPU is x86 32 bits """ return self.current_cpu == 'x86'
[ "def", "current_is_x86", "(", "self", ")", ":", "return", "self", ".", "current_cpu", "==", "'x86'" ]
[ 404, 4 ]
[ 413, 40 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.current_dir
(self, hidex86=False, x64=False)
Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfolder:...
Current platform specific subfolder.
def current_dir(self, hidex86=False, x64=False): """ Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. ...
[ "def", "current_dir", "(", "self", ",", "hidex86", "=", "False", ",", "x64", "=", "False", ")", ":", "return", "(", "''", "if", "(", "self", ".", "current_cpu", "==", "'x86'", "and", "hidex86", ")", "else", "r'\\x64'", "if", "(", "self", ".", "curren...
[ 415, 4 ]
[ 435, 9 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.target_dir
(self, hidex86=False, x64=False)
r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ str subfold...
r""" Target platform specific subfolder.
def target_dir(self, hidex86=False, x64=False): r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. ...
[ "def", "target_dir", "(", "self", ",", "hidex86", "=", "False", ",", "x64", "=", "False", ")", ":", "return", "(", "''", "if", "(", "self", ".", "target_cpu", "==", "'x86'", "and", "hidex86", ")", "else", "r'\\x64'", "if", "(", "self", ".", "target_c...
[ 437, 4 ]
[ 457, 9 ]
python
cy
['en', 'cy', 'hi']
False
PlatformInfo.cross_dir
(self, forcex86=False)
r""" Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current architecture is not x86. Return ------ str subfolder: '' if target architecture is current architec...
r""" Cross platform specific subfolder.
def cross_dir(self, forcex86=False): r""" Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current architecture is not x86. Return ------ str subfolder: ...
[ "def", "cross_dir", "(", "self", ",", "forcex86", "=", "False", ")", ":", "current", "=", "'x86'", "if", "forcex86", "else", "self", ".", "current_cpu", "return", "(", "''", "if", "self", ".", "target_cpu", "==", "current", "else", "self", ".", "target_d...
[ 459, 4 ]
[ 479, 9 ]
python
cy
['en', 'cy', 'hi']
False
RegistryInfo.visualstudio
(self)
Microsoft Visual Studio root registry key. Return ------ str Registry key
Microsoft Visual Studio root registry key.
def visualstudio(self): """ Microsoft Visual Studio root registry key. Return ------ str Registry key """ return 'VisualStudio'
[ "def", "visualstudio", "(", "self", ")", ":", "return", "'VisualStudio'" ]
[ 500, 4 ]
[ 509, 29 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.sxs
(self)
Microsoft Visual Studio SxS registry key. Return ------ str Registry key
Microsoft Visual Studio SxS registry key.
def sxs(self): """ Microsoft Visual Studio SxS registry key. Return ------ str Registry key """ return join(self.visualstudio, 'SxS')
[ "def", "sxs", "(", "self", ")", ":", "return", "join", "(", "self", ".", "visualstudio", ",", "'SxS'", ")" ]
[ 512, 4 ]
[ 521, 45 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vc
(self)
Microsoft Visual C++ VC7 registry key. Return ------ str Registry key
Microsoft Visual C++ VC7 registry key.
def vc(self): """ Microsoft Visual C++ VC7 registry key. Return ------ str Registry key """ return join(self.sxs, 'VC7')
[ "def", "vc", "(", "self", ")", ":", "return", "join", "(", "self", ".", "sxs", ",", "'VC7'", ")" ]
[ 524, 4 ]
[ 533, 36 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vs
(self)
Microsoft Visual Studio VS7 registry key. Return ------ str Registry key
Microsoft Visual Studio VS7 registry key.
def vs(self): """ Microsoft Visual Studio VS7 registry key. Return ------ str Registry key """ return join(self.sxs, 'VS7')
[ "def", "vs", "(", "self", ")", ":", "return", "join", "(", "self", ".", "sxs", ",", "'VS7'", ")" ]
[ 536, 4 ]
[ 545, 36 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vc_for_python
(self)
Microsoft Visual C++ for Python registry key. Return ------ str Registry key
Microsoft Visual C++ for Python registry key.
def vc_for_python(self): """ Microsoft Visual C++ for Python registry key. Return ------ str Registry key """ return r'DevDiv\VCForPython'
[ "def", "vc_for_python", "(", "self", ")", ":", "return", "r'DevDiv\\VCForPython'" ]
[ 548, 4 ]
[ 557, 36 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.microsoft_sdk
(self)
Microsoft SDK registry key. Return ------ str Registry key
Microsoft SDK registry key.
def microsoft_sdk(self): """ Microsoft SDK registry key. Return ------ str Registry key """ return 'Microsoft SDKs'
[ "def", "microsoft_sdk", "(", "self", ")", ":", "return", "'Microsoft SDKs'" ]
[ 560, 4 ]
[ 569, 31 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.windows_sdk
(self)
Microsoft Windows/Platform SDK registry key. Return ------ str Registry key
Microsoft Windows/Platform SDK registry key.
def windows_sdk(self): """ Microsoft Windows/Platform SDK registry key. Return ------ str Registry key """ return join(self.microsoft_sdk, 'Windows')
[ "def", "windows_sdk", "(", "self", ")", ":", "return", "join", "(", "self", ".", "microsoft_sdk", ",", "'Windows'", ")" ]
[ 572, 4 ]
[ 581, 50 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.netfx_sdk
(self)
Microsoft .NET Framework SDK registry key. Return ------ str Registry key
Microsoft .NET Framework SDK registry key.
def netfx_sdk(self): """ Microsoft .NET Framework SDK registry key. Return ------ str Registry key """ return join(self.microsoft_sdk, 'NETFXSDK')
[ "def", "netfx_sdk", "(", "self", ")", ":", "return", "join", "(", "self", ".", "microsoft_sdk", ",", "'NETFXSDK'", ")" ]
[ 584, 4 ]
[ 593, 51 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.windows_kits_roots
(self)
Microsoft Windows Kits Roots registry key. Return ------ str Registry key
Microsoft Windows Kits Roots registry key.
def windows_kits_roots(self): """ Microsoft Windows Kits Roots registry key. Return ------ str Registry key """ return r'Windows Kits\Installed Roots'
[ "def", "windows_kits_roots", "(", "self", ")", ":", "return", "r'Windows Kits\\Installed Roots'" ]
[ 596, 4 ]
[ 605, 46 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.microsoft
(self, key, x86=False)
Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str Registry key
Return key in Microsoft software registry.
def microsoft(self, key, x86=False): """ Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str Registry ...
[ "def", "microsoft", "(", "self", ",", "key", ",", "x86", "=", "False", ")", ":", "node64", "=", "''", "if", "self", ".", "pi", ".", "current_is_x86", "(", ")", "or", "x86", "else", "'Wow6432Node'", "return", "join", "(", "'Software'", ",", "node64", ...
[ 607, 4 ]
[ 624, 57 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.lookup
(self, key, name)
Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str value
Look for values in registry in Microsoft software registry.
def lookup(self, key, name): """ Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str value ...
[ "def", "lookup", "(", "self", ",", "key", ",", "name", ")", ":", "key_read", "=", "winreg", ".", "KEY_READ", "openkey", "=", "winreg", ".", "OpenKey", "closekey", "=", "winreg", ".", "CloseKey", "ms", "=", "self", ".", "microsoft", "for", "hkey", "in",...
[ 626, 4 ]
[ 664, 34 ]
python
en
['en', 'error', 'th']
False
SystemInfo._find_latest_available_vs_ver
(self)
Find the latest VC version Return ------ float version
Find the latest VC version
def _find_latest_available_vs_ver(self): """ Find the latest VC version Return ------ float version """ reg_vc_vers = self.find_reg_vs_vers() if not (reg_vc_vers or self.known_vs_paths): raise distutils.errors.DistutilsPlatformErr...
[ "def", "_find_latest_available_vs_ver", "(", "self", ")", ":", "reg_vc_vers", "=", "self", ".", "find_reg_vs_vers", "(", ")", "if", "not", "(", "reg_vc_vers", "or", "self", ".", "known_vs_paths", ")", ":", "raise", "distutils", ".", "errors", ".", "DistutilsPl...
[ 695, 4 ]
[ 712, 34 ]
python
en
['en', 'error', 'th']
False
SystemInfo.find_reg_vs_vers
(self)
Find Microsoft Visual Studio versions available in registry. Return ------ list of float Versions
Find Microsoft Visual Studio versions available in registry.
def find_reg_vs_vers(self): """ Find Microsoft Visual Studio versions available in registry. Return ------ list of float Versions """ ms = self.ri.microsoft vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vs_vers = [] ...
[ "def", "find_reg_vs_vers", "(", "self", ")", ":", "ms", "=", "self", ".", "ri", ".", "microsoft", "vckeys", "=", "(", "self", ".", "ri", ".", "vc", ",", "self", ".", "ri", ".", "vc_for_python", ",", "self", ".", "ri", ".", "vs", ")", "vs_vers", "...
[ 714, 4 ]
[ 748, 30 ]
python
en
['en', 'error', 'th']
False
SystemInfo.find_programdata_vs_vers
(self)
r""" Find Visual studio 2017+ versions from information in "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances". Return ------ dict float version as key, path as value.
r""" Find Visual studio 2017+ versions from information in "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances".
def find_programdata_vs_vers(self): r""" Find Visual studio 2017+ versions from information in "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances". Return ------ dict float version as key, path as value. """ vs_versions = {} in...
[ "def", "find_programdata_vs_vers", "(", "self", ")", ":", "vs_versions", "=", "{", "}", "instances_dir", "=", "r'C:\\ProgramData\\Microsoft\\VisualStudio\\Packages\\_Instances'", "try", ":", "hashed_names", "=", "listdir", "(", "instances_dir", ")", "except", "(", "OSEr...
[ 750, 4 ]
[ 790, 26 ]
python
cy
['en', 'cy', 'hi']
False
SystemInfo._as_float_version
(version)
Return a string version as a simplified float version (major.minor) Parameters ---------- version: str Version. Return ------ float version
Return a string version as a simplified float version (major.minor)
def _as_float_version(version): """ Return a string version as a simplified float version (major.minor) Parameters ---------- version: str Version. Return ------ float version """ return float('.'.join(version.spli...
[ "def", "_as_float_version", "(", "version", ")", ":", "return", "float", "(", "'.'", ".", "join", "(", "version", ".", "split", "(", "'.'", ")", "[", ":", "2", "]", ")", ")" ]
[ 793, 4 ]
[ 807, 54 ]
python
en
['en', 'error', 'th']
False
SystemInfo.VSInstallDir
(self)
Microsoft Visual Studio directory. Return ------ str path
Microsoft Visual Studio directory.
def VSInstallDir(self): """ Microsoft Visual Studio directory. Return ------ str path """ # Default path default = join(self.ProgramFilesx86, 'Microsoft Visual Studio %0.1f' % self.vs_ver) # Try to get path from...
[ "def", "VSInstallDir", "(", "self", ")", ":", "# Default path", "default", "=", "join", "(", "self", ".", "ProgramFilesx86", ",", "'Microsoft Visual Studio %0.1f'", "%", "self", ".", "vs_ver", ")", "# Try to get path from registry, if fail use default path", "return", "...
[ 810, 4 ]
[ 824, 75 ]
python
en
['en', 'error', 'th']
False
SystemInfo.VCInstallDir
(self)
Microsoft Visual C++ directory. Return ------ str path
Microsoft Visual C++ directory.
def VCInstallDir(self): """ Microsoft Visual C++ directory. Return ------ str path """ path = self._guess_vc() or self._guess_vc_legacy() if not isdir(path): msg = 'Microsoft Visual C++ directory not found' raise distu...
[ "def", "VCInstallDir", "(", "self", ")", ":", "path", "=", "self", ".", "_guess_vc", "(", ")", "or", "self", ".", "_guess_vc_legacy", "(", ")", "if", "not", "isdir", "(", "path", ")", ":", "msg", "=", "'Microsoft Visual C++ directory not found'", "raise", ...
[ 827, 4 ]
[ 842, 19 ]
python
en
['en', 'error', 'th']
False
SystemInfo._guess_vc
(self)
Locate Visual C++ for VS2017+. Return ------ str path
Locate Visual C++ for VS2017+.
def _guess_vc(self): """ Locate Visual C++ for VS2017+. Return ------ str path """ if self.vs_ver <= 14.0: return '' try: # First search in known VS paths vs_dir = self.known_vs_paths[self.vs_ver] e...
[ "def", "_guess_vc", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<=", "14.0", ":", "return", "''", "try", ":", "# First search in known VS paths", "vs_dir", "=", "self", ".", "known_vs_paths", "[", "self", ".", "vs_ver", "]", "except", "KeyError", ...
[ 844, 4 ]
[ 872, 21 ]
python
en
['en', 'error', 'th']
False
SystemInfo._guess_vc_legacy
(self)
Locate Visual C++ for versions prior to 2017. Return ------ str path
Locate Visual C++ for versions prior to 2017.
def _guess_vc_legacy(self): """ Locate Visual C++ for versions prior to 2017. Return ------ str path """ default = join(self.ProgramFilesx86, r'Microsoft Visual Studio %0.1f\VC' % self.vs_ver) # Try to get "VC++ for Pyt...
[ "def", "_guess_vc_legacy", "(", "self", ")", ":", "default", "=", "join", "(", "self", ".", "ProgramFilesx86", ",", "r'Microsoft Visual Studio %0.1f\\VC'", "%", "self", ".", "vs_ver", ")", "# Try to get \"VC++ for Python\" path from registry as default path", "reg_path", ...
[ 874, 4 ]
[ 892, 78 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkVersion
(self)
Microsoft Windows SDK versions for specified MSVC++ version. Return ------ tuple of str versions
Microsoft Windows SDK versions for specified MSVC++ version.
def WindowsSdkVersion(self): """ Microsoft Windows SDK versions for specified MSVC++ version. Return ------ tuple of str versions """ if self.vs_ver <= 9.0: return '7.0', '6.1', '6.0a' elif self.vs_ver == 10.0: return '...
[ "def", "WindowsSdkVersion", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<=", "9.0", ":", "return", "'7.0'", ",", "'6.1'", ",", "'6.0a'", "elif", "self", ".", "vs_ver", "==", "10.0", ":", "return", "'7.1'", ",", "'7.0a'", "elif", "self", ".", ...
[ 895, 4 ]
[ 913, 32 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkLastVersion
(self)
Microsoft Windows SDK last version. Return ------ str version
Microsoft Windows SDK last version.
def WindowsSdkLastVersion(self): """ Microsoft Windows SDK last version. Return ------ str version """ return self._use_last_dir_name(join(self.WindowsSdkDir, 'lib'))
[ "def", "WindowsSdkLastVersion", "(", "self", ")", ":", "return", "self", ".", "_use_last_dir_name", "(", "join", "(", "self", ".", "WindowsSdkDir", ",", "'lib'", ")", ")" ]
[ 916, 4 ]
[ 925, 71 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkDir
(self)
Microsoft Windows SDK directory. Return ------ str path
Microsoft Windows SDK directory.
def WindowsSdkDir(self): """ Microsoft Windows SDK directory. Return ------ str path """ sdkdir = '' for ver in self.WindowsSdkVersion: # Try to get it from registry loc = join(self.ri.windows_sdk, 'v%s' % ver) ...
[ "def", "WindowsSdkDir", "(", "self", ")", ":", "sdkdir", "=", "''", "for", "ver", "in", "self", ".", "WindowsSdkVersion", ":", "# Try to get it from registry", "loc", "=", "join", "(", "self", ".", "ri", ".", "windows_sdk", ",", "'v%s'", "%", "ver", ")", ...
[ 928, 4 ]
[ 968, 21 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSDKExecutablePath
(self)
Microsoft Windows SDK executable directory. Return ------ str path
Microsoft Windows SDK executable directory.
def WindowsSDKExecutablePath(self): """ Microsoft Windows SDK executable directory. Return ------ str path """ # Find WinSDK NetFx Tools registry dir name if self.vs_ver <= 11.0: netfxver = 35 arch = '' else: ...
[ "def", "WindowsSDKExecutablePath", "(", "self", ")", ":", "# Find WinSDK NetFx Tools registry dir name", "if", "self", ".", "vs_ver", "<=", "11.0", ":", "netfxver", "=", "35", "arch", "=", "''", "else", ":", "netfxver", "=", "40", "hidex86", "=", "True", "if",...
[ 971, 4 ]
[ 1003, 31 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FSharpInstallDir
(self)
Microsoft Visual F# directory. Return ------ str path
Microsoft Visual F# directory.
def FSharpInstallDir(self): """ Microsoft Visual F# directory. Return ------ str path """ path = join(self.ri.visualstudio, r'%0.1f\Setup\F#' % self.vs_ver) return self.ri.lookup(path, 'productdir') or ''
[ "def", "FSharpInstallDir", "(", "self", ")", ":", "path", "=", "join", "(", "self", ".", "ri", ".", "visualstudio", ",", "r'%0.1f\\Setup\\F#'", "%", "self", ".", "vs_ver", ")", "return", "self", ".", "ri", ".", "lookup", "(", "path", ",", "'productdir'",...
[ 1006, 4 ]
[ 1016, 55 ]
python
en
['en', 'error', 'th']
False
SystemInfo.UniversalCRTSdkDir
(self)
Microsoft Universal CRT SDK directory. Return ------ str path
Microsoft Universal CRT SDK directory.
def UniversalCRTSdkDir(self): """ Microsoft Universal CRT SDK directory. Return ------ str path """ # Set Kit Roots versions for specified MSVC++ version vers = ('10', '81') if self.vs_ver >= 14.0 else () # Find path of the more recen...
[ "def", "UniversalCRTSdkDir", "(", "self", ")", ":", "# Set Kit Roots versions for specified MSVC++ version", "vers", "=", "(", "'10'", ",", "'81'", ")", "if", "self", ".", "vs_ver", ">=", "14.0", "else", "(", ")", "# Find path of the more recent Kit", "for", "ver", ...
[ 1019, 4 ]
[ 1036, 35 ]
python
en
['en', 'error', 'th']
False
SystemInfo.UniversalCRTSdkLastVersion
(self)
Microsoft Universal C Runtime SDK last version. Return ------ str version
Microsoft Universal C Runtime SDK last version.
def UniversalCRTSdkLastVersion(self): """ Microsoft Universal C Runtime SDK last version. Return ------ str version """ return self._use_last_dir_name(join(self.UniversalCRTSdkDir, 'lib'))
[ "def", "UniversalCRTSdkLastVersion", "(", "self", ")", ":", "return", "self", ".", "_use_last_dir_name", "(", "join", "(", "self", ".", "UniversalCRTSdkDir", ",", "'lib'", ")", ")" ]
[ 1039, 4 ]
[ 1048, 76 ]
python
en
['en', 'error', 'th']
False
SystemInfo.NetFxSdkVersion
(self)
Microsoft .NET Framework SDK versions. Return ------ tuple of str versions
Microsoft .NET Framework SDK versions.
def NetFxSdkVersion(self): """ Microsoft .NET Framework SDK versions. Return ------ tuple of str versions """ # Set FxSdk versions for specified VS version return (('4.7.2', '4.7.1', '4.7', '4.6.2', '4.6.1', '4.6', ...
[ "def", "NetFxSdkVersion", "(", "self", ")", ":", "# Set FxSdk versions for specified VS version", "return", "(", "(", "'4.7.2'", ",", "'4.7.1'", ",", "'4.7'", ",", "'4.6.2'", ",", "'4.6.1'", ",", "'4.6'", ",", "'4.5.2'", ",", "'4.5.1'", ",", "'4.5'", ")", "if"...
[ 1051, 4 ]
[ 1064, 47 ]
python
en
['en', 'error', 'th']
False
SystemInfo.NetFxSdkDir
(self)
Microsoft .NET Framework SDK directory. Return ------ str path
Microsoft .NET Framework SDK directory.
def NetFxSdkDir(self): """ Microsoft .NET Framework SDK directory. Return ------ str path """ sdkdir = '' for ver in self.NetFxSdkVersion: loc = join(self.ri.netfx_sdk, ver) sdkdir = self.ri.lookup(loc, 'kitsinstallatio...
[ "def", "NetFxSdkDir", "(", "self", ")", ":", "sdkdir", "=", "''", "for", "ver", "in", "self", ".", "NetFxSdkVersion", ":", "loc", "=", "join", "(", "self", ".", "ri", ".", "netfx_sdk", ",", "ver", ")", "sdkdir", "=", "self", ".", "ri", ".", "lookup...
[ 1067, 4 ]
[ 1082, 21 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkDir32
(self)
Microsoft .NET Framework 32bit directory. Return ------ str path
Microsoft .NET Framework 32bit directory.
def FrameworkDir32(self): """ Microsoft .NET Framework 32bit directory. Return ------ str path """ # Default path guess_fw = join(self.WinDir, r'Microsoft.NET\Framework') # Try to get path from registry, if fail use default path ...
[ "def", "FrameworkDir32", "(", "self", ")", ":", "# Default path", "guess_fw", "=", "join", "(", "self", ".", "WinDir", ",", "r'Microsoft.NET\\Framework'", ")", "# Try to get path from registry, if fail use default path", "return", "self", ".", "ri", ".", "lookup", "("...
[ 1085, 4 ]
[ 1098, 71 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkDir64
(self)
Microsoft .NET Framework 64bit directory. Return ------ str path
Microsoft .NET Framework 64bit directory.
def FrameworkDir64(self): """ Microsoft .NET Framework 64bit directory. Return ------ str path """ # Default path guess_fw = join(self.WinDir, r'Microsoft.NET\Framework64') # Try to get path from registry, if fail use default path ...
[ "def", "FrameworkDir64", "(", "self", ")", ":", "# Default path", "guess_fw", "=", "join", "(", "self", ".", "WinDir", ",", "r'Microsoft.NET\\Framework64'", ")", "# Try to get path from registry, if fail use default path", "return", "self", ".", "ri", ".", "lookup", "...
[ 1101, 4 ]
[ 1114, 71 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkVersion32
(self)
Microsoft .NET Framework 32bit versions. Return ------ tuple of str versions
Microsoft .NET Framework 32bit versions.
def FrameworkVersion32(self): """ Microsoft .NET Framework 32bit versions. Return ------ tuple of str versions """ return self._find_dot_net_versions(32)
[ "def", "FrameworkVersion32", "(", "self", ")", ":", "return", "self", ".", "_find_dot_net_versions", "(", "32", ")" ]
[ 1117, 4 ]
[ 1126, 46 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkVersion64
(self)
Microsoft .NET Framework 64bit versions. Return ------ tuple of str versions
Microsoft .NET Framework 64bit versions.
def FrameworkVersion64(self): """ Microsoft .NET Framework 64bit versions. Return ------ tuple of str versions """ return self._find_dot_net_versions(64)
[ "def", "FrameworkVersion64", "(", "self", ")", ":", "return", "self", ".", "_find_dot_net_versions", "(", "64", ")" ]
[ 1129, 4 ]
[ 1138, 46 ]
python
en
['en', 'error', 'th']
False
SystemInfo._find_dot_net_versions
(self, bits)
Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. Return ------ tuple of str versions
Find Microsoft .NET Framework versions.
def _find_dot_net_versions(self, bits): """ Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. Return ------ tuple of str versions """ # Find actual .NET vers...
[ "def", "_find_dot_net_versions", "(", "self", ",", "bits", ")", ":", "# Find actual .NET version in registry", "reg_ver", "=", "self", ".", "ri", ".", "lookup", "(", "self", ".", "ri", ".", "vc", ",", "'frameworkver%d'", "%", "bits", ")", "dot_net_dir", "=", ...
[ 1140, 4 ]
[ 1167, 39 ]
python
en
['en', 'error', 'th']
False
SystemInfo._use_last_dir_name
(path, prefix='')
Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs starting by this prefix Return ------ str name
Return name of the last dir in path or '' if no dir found.
def _use_last_dir_name(path, prefix=''): """ Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs starting by this prefix Return ------ ...
[ "def", "_use_last_dir_name", "(", "path", ",", "prefix", "=", "''", ")", ":", "matching_dirs", "=", "(", "dir_name", "for", "dir_name", "in", "reversed", "(", "listdir", "(", "path", ")", ")", "if", "isdir", "(", "join", "(", "path", ",", "dir_name", "...
[ 1170, 4 ]
[ 1192, 46 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.vs_ver
(self)
Microsoft Visual Studio. Return ------ float version
Microsoft Visual Studio.
def vs_ver(self): """ Microsoft Visual Studio. Return ------ float version """ return self.si.vs_ver
[ "def", "vs_ver", "(", "self", ")", ":", "return", "self", ".", "si", ".", "vs_ver" ]
[ 1229, 4 ]
[ 1238, 29 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.vc_ver
(self)
Microsoft Visual C++ version. Return ------ float version
Microsoft Visual C++ version.
def vc_ver(self): """ Microsoft Visual C++ version. Return ------ float version """ return self.si.vc_ver
[ "def", "vc_ver", "(", "self", ")", ":", "return", "self", ".", "si", ".", "vc_ver" ]
[ 1241, 4 ]
[ 1250, 29 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VSTools
(self)
Microsoft Visual Studio Tools. Return ------ list of str paths
Microsoft Visual Studio Tools.
def VSTools(self): """ Microsoft Visual Studio Tools. Return ------ list of str paths """ paths = [r'Common7\IDE', r'Common7\Tools'] if self.vs_ver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) pat...
[ "def", "VSTools", "(", "self", ")", ":", "paths", "=", "[", "r'Common7\\IDE'", ",", "r'Common7\\Tools'", "]", "if", "self", ".", "vs_ver", ">=", "14.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "current_dir", "(", "hidex86", "=", "True", ",", "...
[ 1253, 4 ]
[ 1270, 67 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCIncludes
(self)
Microsoft Visual C++ & Microsoft Foundation Class Includes. Return ------ list of str paths
Microsoft Visual C++ & Microsoft Foundation Class Includes.
def VCIncludes(self): """ Microsoft Visual C++ & Microsoft Foundation Class Includes. Return ------ list of str paths """ return [join(self.si.VCInstallDir, 'Include'), join(self.si.VCInstallDir, r'ATLMFC\Include')]
[ "def", "VCIncludes", "(", "self", ")", ":", "return", "[", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", "'Include'", ")", ",", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", "r'ATLMFC\\Include'", ")", "]" ]
[ 1273, 4 ]
[ 1283, 62 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCLibraries
(self)
Microsoft Visual C++ & Microsoft Foundation Class Libraries. Return ------ list of str paths
Microsoft Visual C++ & Microsoft Foundation Class Libraries.
def VCLibraries(self): """ Microsoft Visual C++ & Microsoft Foundation Class Libraries. Return ------ list of str paths """ if self.vs_ver >= 15.0: arch_subdir = self.pi.target_dir(x64=True) else: arch_subdir = self.pi....
[ "def", "VCLibraries", "(", "self", ")", ":", "if", "self", ".", "vs_ver", ">=", "15.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "x64", "=", "True", ")", "else", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir"...
[ 1286, 4 ]
[ 1304, 67 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCStoreRefs
(self)
Microsoft Visual C++ store references Libraries. Return ------ list of str paths
Microsoft Visual C++ store references Libraries.
def VCStoreRefs(self): """ Microsoft Visual C++ store references Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] return [join(self.si.VCInstallDir, r'Lib\store\references')]
[ "def", "VCStoreRefs", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", ":", "return", "[", "]", "return", "[", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", "r'Lib\\store\\references'", ")", "]" ]
[ 1307, 4 ]
[ 1318, 68 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCTools
(self)
Microsoft Visual C++ Tools. Return ------ list of str paths
Microsoft Visual C++ Tools.
def VCTools(self): """ Microsoft Visual C++ Tools. Return ------ list of str paths """ si = self.si tools = [join(si.VCInstallDir, 'VCPackages')] forcex86 = True if self.vs_ver <= 10.0 else False arch_subdir = self.pi.cross_di...
[ "def", "VCTools", "(", "self", ")", ":", "si", "=", "self", ".", "si", "tools", "=", "[", "join", "(", "si", ".", "VCInstallDir", ",", "'VCPackages'", ")", "]", "forcex86", "=", "True", "if", "self", ".", "vs_ver", "<=", "10.0", "else", "False", "a...
[ 1321, 4 ]
[ 1355, 20 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSLibraries
(self)
Microsoft Windows SDK Libraries. Return ------ list of str paths
Microsoft Windows SDK Libraries.
def OSLibraries(self): """ Microsoft Windows SDK Libraries. Return ------ list of str paths """ if self.vs_ver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) return [join(self.si.WindowsSdkDir, 'Lib%s' % arch...
[ "def", "OSLibraries", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<=", "10.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "hidex86", "=", "True", ",", "x64", "=", "True", ")", "return", "[", "join", "(", "self", "....
[ 1358, 4 ]
[ 1375, 64 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSIncludes
(self)
Microsoft Windows SDK Include. Return ------ list of str paths
Microsoft Windows SDK Include.
def OSIncludes(self): """ Microsoft Windows SDK Include. Return ------ list of str paths """ include = join(self.si.WindowsSdkDir, 'include') if self.vs_ver <= 10.0: return [include, join(include, 'gl')] else: ...
[ "def", "OSIncludes", "(", "self", ")", ":", "include", "=", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'include'", ")", "if", "self", ".", "vs_ver", "<=", "10.0", ":", "return", "[", "include", ",", "join", "(", "include", ",", "'gl'...
[ 1378, 4 ]
[ 1399, 54 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSLibpath
(self)
Microsoft Windows SDK Libraries Paths. Return ------ list of str paths
Microsoft Windows SDK Libraries Paths.
def OSLibpath(self): """ Microsoft Windows SDK Libraries Paths. Return ------ list of str paths """ ref = join(self.si.WindowsSdkDir, 'References') libpath = [] if self.vs_ver <= 9.0: libpath += self.OSLibraries i...
[ "def", "OSLibpath", "(", "self", ")", ":", "ref", "=", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'References'", ")", "libpath", "=", "[", "]", "if", "self", ".", "vs_ver", "<=", "9.0", ":", "libpath", "+=", "self", ".", "OSLibraries...
[ 1402, 4 ]
[ 1435, 22 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.SdkTools
(self)
Microsoft Windows SDK Tools. Return ------ list of str paths
Microsoft Windows SDK Tools.
def SdkTools(self): """ Microsoft Windows SDK Tools. Return ------ list of str paths """ return list(self._sdk_tools())
[ "def", "SdkTools", "(", "self", ")", ":", "return", "list", "(", "self", ".", "_sdk_tools", "(", ")", ")" ]
[ 1438, 4 ]
[ 1447, 38 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._sdk_tools
(self)
Microsoft Windows SDK Tools paths generator. Return ------ generator of str paths
Microsoft Windows SDK Tools paths generator.
def _sdk_tools(self): """ Microsoft Windows SDK Tools paths generator. Return ------ generator of str paths """ if self.vs_ver < 15.0: bin_dir = 'Bin' if self.vs_ver <= 11.0 else r'Bin\x86' yield join(self.si.WindowsSdkDir, bin...
[ "def", "_sdk_tools", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "15.0", ":", "bin_dir", "=", "'Bin'", "if", "self", ".", "vs_ver", "<=", "11.0", "else", "r'Bin\\x86'", "yield", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", ...
[ 1449, 4 ]
[ 1482, 50 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._sdk_subdir
(self)
Microsoft Windows SDK version subdir. Return ------ str subdir
Microsoft Windows SDK version subdir.
def _sdk_subdir(self): """ Microsoft Windows SDK version subdir. Return ------ str subdir """ ucrtver = self.si.WindowsSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else ''
[ "def", "_sdk_subdir", "(", "self", ")", ":", "ucrtver", "=", "self", ".", "si", ".", "WindowsSdkLastVersion", "return", "(", "'%s\\\\'", "%", "ucrtver", ")", "if", "ucrtver", "else", "''" ]
[ 1485, 4 ]
[ 1495, 52 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.SdkSetup
(self)
Microsoft Windows SDK Setup. Return ------ list of str paths
Microsoft Windows SDK Setup.
def SdkSetup(self): """ Microsoft Windows SDK Setup. Return ------ list of str paths """ if self.vs_ver > 9.0: return [] return [join(self.si.WindowsSdkDir, 'Setup')]
[ "def", "SdkSetup", "(", "self", ")", ":", "if", "self", ".", "vs_ver", ">", "9.0", ":", "return", "[", "]", "return", "[", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'Setup'", ")", "]" ]
[ 1498, 4 ]
[ 1510, 53 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.FxTools
(self)
Microsoft .NET Framework Tools. Return ------ list of str paths
Microsoft .NET Framework Tools.
def FxTools(self): """ Microsoft .NET Framework Tools. Return ------ list of str paths """ pi = self.pi si = self.si if self.vs_ver <= 10.0: include32 = True include64 = not pi.target_is_x86() and not pi.curren...
[ "def", "FxTools", "(", "self", ")", ":", "pi", "=", "self", ".", "pi", "si", "=", "self", ".", "si", "if", "self", ".", "vs_ver", "<=", "10.0", ":", "include32", "=", "True", "include64", "=", "not", "pi", ".", "target_is_x86", "(", ")", "and", "...
[ 1513, 4 ]
[ 1539, 20 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.NetFxSDKLibraries
(self)
Microsoft .Net Framework SDK Libraries. Return ------ list of str paths
Microsoft .Net Framework SDK Libraries.
def NetFxSDKLibraries(self): """ Microsoft .Net Framework SDK Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] arch_subdir = self.pi.target_dir(x64=True) return [jo...
[ "def", "NetFxSDKLibraries", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", "or", "not", "self", ".", "si", ".", "NetFxSdkDir", ":", "return", "[", "]", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "x64", "=", "True...
[ 1542, 4 ]
[ 1555, 69 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.NetFxSDKIncludes
(self)
Microsoft .Net Framework SDK Includes. Return ------ list of str paths
Microsoft .Net Framework SDK Includes.
def NetFxSDKIncludes(self): """ Microsoft .Net Framework SDK Includes. Return ------ list of str paths """ if self.vs_ver < 14.0 or not self.si.NetFxSdkDir: return [] return [join(self.si.NetFxSdkDir, r'include\um')]
[ "def", "NetFxSDKIncludes", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", "or", "not", "self", ".", "si", ".", "NetFxSdkDir", ":", "return", "[", "]", "return", "[", "join", "(", "self", ".", "si", ".", "NetFxSdkDir", ",", "r'includ...
[ 1558, 4 ]
[ 1570, 57 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VsTDb
(self)
Microsoft Visual Studio Team System Database. Return ------ list of str paths
Microsoft Visual Studio Team System Database.
def VsTDb(self): """ Microsoft Visual Studio Team System Database. Return ------ list of str paths """ return [join(self.si.VSInstallDir, r'VSTSDB\Deploy')]
[ "def", "VsTDb", "(", "self", ")", ":", "return", "[", "join", "(", "self", ".", "si", ".", "VSInstallDir", ",", "r'VSTSDB\\Deploy'", ")", "]" ]
[ 1573, 4 ]
[ 1582, 61 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.MSBuild
(self)
Microsoft Build Engine. Return ------ list of str paths
Microsoft Build Engine.
def MSBuild(self): """ Microsoft Build Engine. Return ------ list of str paths """ if self.vs_ver < 12.0: return [] elif self.vs_ver < 15.0: base_path = self.si.ProgramFilesx86 arch_subdir = self.pi.current_...
[ "def", "MSBuild", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "12.0", ":", "return", "[", "]", "elif", "self", ".", "vs_ver", "<", "15.0", ":", "base_path", "=", "self", ".", "si", ".", "ProgramFilesx86", "arch_subdir", "=", "self", ".",...
[ 1585, 4 ]
[ 1610, 20 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.HTMLHelpWorkshop
(self)
Microsoft HTML Help Workshop. Return ------ list of str paths
Microsoft HTML Help Workshop.
def HTMLHelpWorkshop(self): """ Microsoft HTML Help Workshop. Return ------ list of str paths """ if self.vs_ver < 11.0: return [] return [join(self.si.ProgramFilesx86, 'HTML Help Workshop')]
[ "def", "HTMLHelpWorkshop", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "11.0", ":", "return", "[", "]", "return", "[", "join", "(", "self", ".", "si", ".", "ProgramFilesx86", ",", "'HTML Help Workshop'", ")", "]" ]
[ 1613, 4 ]
[ 1625, 68 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.UCRTLibraries
(self)
Microsoft Universal C Runtime SDK Libraries. Return ------ list of str paths
Microsoft Universal C Runtime SDK Libraries.
def UCRTLibraries(self): """ Microsoft Universal C Runtime SDK Libraries. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] arch_subdir = self.pi.target_dir(x64=True) lib = join(self.si.UniversalCRTSdkDi...
[ "def", "UCRTLibraries", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", ":", "return", "[", "]", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "x64", "=", "True", ")", "lib", "=", "join", "(", "self", ".", "si", ...
[ 1628, 4 ]
[ 1643, 63 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.UCRTIncludes
(self)
Microsoft Universal C Runtime SDK Include. Return ------ list of str paths
Microsoft Universal C Runtime SDK Include.
def UCRTIncludes(self): """ Microsoft Universal C Runtime SDK Include. Return ------ list of str paths """ if self.vs_ver < 14.0: return [] include = join(self.si.UniversalCRTSdkDir, 'include') return [join(include, '%sucr...
[ "def", "UCRTIncludes", "(", "self", ")", ":", "if", "self", ".", "vs_ver", "<", "14.0", ":", "return", "[", "]", "include", "=", "join", "(", "self", ".", "si", ".", "UniversalCRTSdkDir", ",", "'include'", ")", "return", "[", "join", "(", "include", ...
[ 1646, 4 ]
[ 1659, 60 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._ucrt_subdir
(self)
Microsoft Universal C Runtime SDK version subdir. Return ------ str subdir
Microsoft Universal C Runtime SDK version subdir.
def _ucrt_subdir(self): """ Microsoft Universal C Runtime SDK version subdir. Return ------ str subdir """ ucrtver = self.si.UniversalCRTSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else ''
[ "def", "_ucrt_subdir", "(", "self", ")", ":", "ucrtver", "=", "self", ".", "si", ".", "UniversalCRTSdkLastVersion", "return", "(", "'%s\\\\'", "%", "ucrtver", ")", "if", "ucrtver", "else", "''" ]
[ 1662, 4 ]
[ 1672, 52 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.FSharp
(self)
Microsoft Visual F#. Return ------ list of str paths
Microsoft Visual F#.
def FSharp(self): """ Microsoft Visual F#. Return ------ list of str paths """ if 11.0 > self.vs_ver > 12.0: return [] return [self.si.FSharpInstallDir]
[ "def", "FSharp", "(", "self", ")", ":", "if", "11.0", ">", "self", ".", "vs_ver", ">", "12.0", ":", "return", "[", "]", "return", "[", "self", ".", "si", ".", "FSharpInstallDir", "]" ]
[ 1675, 4 ]
[ 1687, 41 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCRuntimeRedist
(self)
Microsoft Visual C++ runtime redistributable dll. Return ------ str path
Microsoft Visual C++ runtime redistributable dll.
def VCRuntimeRedist(self): """ Microsoft Visual C++ runtime redistributable dll. Return ------ str path """ vcruntime = 'vcruntime%d0.dll' % self.vc_ver arch_subdir = self.pi.target_dir(x64=True).strip('\\') # Installation prefixes ca...
[ "def", "VCRuntimeRedist", "(", "self", ")", ":", "vcruntime", "=", "'vcruntime%d0.dll'", "%", "self", ".", "vc_ver", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "x64", "=", "True", ")", ".", "strip", "(", "'\\\\'", ")", "# Installation p...
[ 1690, 4 ]
[ 1722, 27 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.return_env
(self, exists=True)
Return environment dict. Parameters ---------- exists: bool It True, only return existing paths. Return ------ dict environment
Return environment dict.
def return_env(self, exists=True): """ Return environment dict. Parameters ---------- exists: bool It True, only return existing paths. Return ------ dict environment """ env = dict( include=self._build...
[ "def", "return_env", "(", "self", ",", "exists", "=", "True", ")", ":", "env", "=", "dict", "(", "include", "=", "self", ".", "_build_paths", "(", "'include'", ",", "[", "self", ".", "VCIncludes", ",", "self", ".", "OSIncludes", ",", "self", ".", "UC...
[ 1724, 4 ]
[ 1772, 18 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._build_paths
(self, name, spec_path_lists, exists)
Given an environment variable name and specified paths, return a pathsep-separated string of paths containing unique, extant, directories from those paths and from the environment variable. Raise an error if no paths are resolved. Parameters ---------- n...
Given an environment variable name and specified paths, return a pathsep-separated string of paths containing unique, extant, directories from those paths and from the environment variable. Raise an error if no paths are resolved.
def _build_paths(self, name, spec_path_lists, exists): """ Given an environment variable name and specified paths, return a pathsep-separated string of paths containing unique, extant, directories from those paths and from the environment variable. Raise an error if no paths ...
[ "def", "_build_paths", "(", "self", ",", "name", ",", "spec_path_lists", ",", "exists", ")", ":", "# flatten spec_path_lists", "spec_paths", "=", "itertools", ".", "chain", ".", "from_iterable", "(", "spec_path_lists", ")", "env_paths", "=", "environ", ".", "get...
[ 1774, 4 ]
[ 1805, 41 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._unique_everseen
(iterable, key=None)
List unique elements, preserving order. Remember all elements ever seen. _unique_everseen('AAAABBBCCDAABBB') --> A B C D _unique_everseen('ABBCcAD', str.lower) --> A B C D
List unique elements, preserving order. Remember all elements ever seen.
def _unique_everseen(iterable, key=None): """ List unique elements, preserving order. Remember all elements ever seen. _unique_everseen('AAAABBBCCDAABBB') --> A B C D _unique_everseen('ABBCcAD', str.lower) --> A B C D """ seen = set() seen_add = seen.add...
[ "def", "_unique_everseen", "(", "iterable", ",", "key", "=", "None", ")", ":", "seen", "=", "set", "(", ")", "seen_add", "=", "seen", ".", "add", "if", "key", "is", "None", ":", "for", "element", "in", "itertools", ".", "filterfalse", "(", "seen", "....
[ 1809, 4 ]
[ 1829, 33 ]
python
en
['en', 'error', 'th']
False
parse_options
()
Define and parse `optparse` options for command-line usage.
Define and parse `optparse` options for command-line usage.
def parse_options(): """ Define and parse `optparse` options for command-line usage. """ try: optparse = __import__("optparse") except: if len(sys.argv) == 2: return {'input': sys.argv[1], 'output': None, 'safe': False, ...
[ "def", "parse_options", "(", ")", ":", "try", ":", "optparse", "=", "__import__", "(", "\"optparse\"", ")", "except", ":", "if", "len", "(", "sys", ".", "argv", ")", "==", "2", ":", "return", "{", "'input'", ":", "sys", ".", "argv", "[", "1", "]", ...
[ 26, 0 ]
[ 84, 68 ]
python
en
['en', 'error', 'th']
False
run
()
Run Markdown from the command line.
Run Markdown from the command line.
def run(): """Run Markdown from the command line.""" # Parse options and adjust logging level if necessary options, logging_level = parse_options() if not options: sys.exit(0) if logging_level: logging.getLogger('MARKDOWN').setLevel(logging_level) # Run markdown.markdownFromFile(**options)
[ "def", "run", "(", ")", ":", "# Parse options and adjust logging level if necessary", "options", ",", "logging_level", "=", "parse_options", "(", ")", "if", "not", "options", ":", "sys", ".", "exit", "(", "0", ")", "if", "logging_level", ":", "logging", ".", "...
[ 86, 0 ]
[ 95, 40 ]
python
en
['en', 'en', 'en']
True
DirectedGraph.copy
(self)
Return a shallow copy of this graph.
Return a shallow copy of this graph.
def copy(self): """Return a shallow copy of this graph. """ other = DirectedGraph() other._vertices = set(self._vertices) other._forwards = {k: set(v) for k, v in self._forwards.items()} other._backwards = {k: set(v) for k, v in self._backwards.items()} return oth...
[ "def", "copy", "(", "self", ")", ":", "other", "=", "DirectedGraph", "(", ")", "other", ".", "_vertices", "=", "set", "(", "self", ".", "_vertices", ")", "other", ".", "_forwards", "=", "{", "k", ":", "set", "(", "v", ")", "for", "k", ",", "v", ...
[ 18, 4 ]
[ 25, 20 ]
python
en
['en', 'en', 'en']
True
DirectedGraph.add
(self, key)
Add a new vertex to the graph.
Add a new vertex to the graph.
def add(self, key): """Add a new vertex to the graph. """ if key in self._vertices: raise ValueError("vertex exists") self._vertices.add(key) self._forwards[key] = set() self._backwards[key] = set()
[ "def", "add", "(", "self", ",", "key", ")", ":", "if", "key", "in", "self", ".", "_vertices", ":", "raise", "ValueError", "(", "\"vertex exists\"", ")", "self", ".", "_vertices", ".", "add", "(", "key", ")", "self", ".", "_forwards", "[", "key", "]",...
[ 27, 4 ]
[ 34, 36 ]
python
en
['en', 'en', 'en']
True
DirectedGraph.remove
(self, key)
Remove a vertex from the graph, disconnecting all edges from/to it.
Remove a vertex from the graph, disconnecting all edges from/to it.
def remove(self, key): """Remove a vertex from the graph, disconnecting all edges from/to it. """ self._vertices.remove(key) for f in self._forwards.pop(key): self._backwards[f].remove(key) for t in self._backwards.pop(key): self._forwards[t].remove(key)
[ "def", "remove", "(", "self", ",", "key", ")", ":", "self", ".", "_vertices", ".", "remove", "(", "key", ")", "for", "f", "in", "self", ".", "_forwards", ".", "pop", "(", "key", ")", ":", "self", ".", "_backwards", "[", "f", "]", ".", "remove", ...
[ 36, 4 ]
[ 43, 41 ]
python
en
['en', 'en', 'en']
True
DirectedGraph.connect
(self, f, t)
Connect two existing vertices. Nothing happens if the vertices are already connected.
Connect two existing vertices.
def connect(self, f, t): """Connect two existing vertices. Nothing happens if the vertices are already connected. """ if t not in self._vertices: raise KeyError(t) self._forwards[f].add(t) self._backwards[t].add(f)
[ "def", "connect", "(", "self", ",", "f", ",", "t", ")", ":", "if", "t", "not", "in", "self", ".", "_vertices", ":", "raise", "KeyError", "(", "t", ")", "self", ".", "_forwards", "[", "f", "]", ".", "add", "(", "t", ")", "self", ".", "_backwards...
[ 48, 4 ]
[ 56, 33 ]
python
en
['nl', 'en', 'en']
True
items
(sobject)
Extract the I{items} from a suds object much like the items() method works on I{dict}. @param sobject: A suds object @type sobject: L{Object} @return: A list of items contained in I{sobject}. @rtype: [(key, value),...]
Extract the I{items} from a suds object much like the items() method works on I{dict}.
def items(sobject): """ Extract the I{items} from a suds object much like the items() method works on I{dict}. @param sobject: A suds object @type sobject: L{Object} @return: A list of items contained in I{sobject}. @rtype: [(key, value),...] """ for item in sobject: yield it...
[ "def", "items", "(", "sobject", ")", ":", "for", "item", "in", "sobject", ":", "yield", "item" ]
[ 29, 0 ]
[ 39, 18 ]
python
en
['en', 'error', 'th']
False
asdict
(sobject)
Convert a sudsobject into a dictionary. @param sobject: A suds object @type sobject: L{Object} @return: A python dictionary containing the items contained in I{sobject}. @rtype: dict
Convert a sudsobject into a dictionary.
def asdict(sobject): """ Convert a sudsobject into a dictionary. @param sobject: A suds object @type sobject: L{Object} @return: A python dictionary containing the items contained in I{sobject}. @rtype: dict """ return dict(items(sobject))
[ "def", "asdict", "(", "sobject", ")", ":", "return", "dict", "(", "items", "(", "sobject", ")", ")" ]
[ 42, 0 ]
[ 51, 31 ]
python
en
['en', 'error', 'th']
False
merge
(a, b)
Merge all attributes and metadata from I{a} to I{b}. @param a: A I{source} object @type a: L{Object} @param b: A I{destination} object @type b: L{Object}
Merge all attributes and metadata from I{a} to I{b}.
def merge(a, b): """ Merge all attributes and metadata from I{a} to I{b}. @param a: A I{source} object @type a: L{Object} @param b: A I{destination} object @type b: L{Object} """ for item in a: setattr(b, item[0], item[1]) b.__metadata__ = b.__metadata__ return b
[ "def", "merge", "(", "a", ",", "b", ")", ":", "for", "item", "in", "a", ":", "setattr", "(", "b", ",", "item", "[", "0", "]", ",", "item", "[", "1", "]", ")", "b", ".", "__metadata__", "=", "b", ".", "__metadata__", "return", "b" ]
[ 53, 0 ]
[ 64, 12 ]
python
en
['en', 'error', 'th']
False
footprint
(sobject)
Get the I{virtual footprint} of the object. This is really a count of the attributes in the branch with a significant value. @param sobject: A suds object. @type sobject: L{Object} @return: The branch footprint. @rtype: int
Get the I{virtual footprint} of the object. This is really a count of the attributes in the branch with a significant value.
def footprint(sobject): """ Get the I{virtual footprint} of the object. This is really a count of the attributes in the branch with a significant value. @param sobject: A suds object. @type sobject: L{Object} @return: The branch footprint. @rtype: int """ n = 0 for a in sobject._...
[ "def", "footprint", "(", "sobject", ")", ":", "n", "=", "0", "for", "a", "in", "sobject", ".", "__keylist__", ":", "v", "=", "getattr", "(", "sobject", ",", "a", ")", "if", "v", "is", "None", ":", "continue", "if", "isinstance", "(", "v", ",", "O...
[ 66, 0 ]
[ 86, 12 ]
python
en
['en', 'error', 'th']
False
Printer.tostr
(self, object, indent=-2)
get s string representation of object
get s string representation of object
def tostr(self, object, indent=-2): """ get s string representation of object """ history = [] return self.process(object, history, indent)
[ "def", "tostr", "(", "self", ",", "object", ",", "indent", "=", "-", "2", ")", ":", "history", "=", "[", "]", "return", "self", ".", "process", "(", "object", ",", "history", ",", "indent", ")" ]
[ 255, 4 ]
[ 258, 52 ]
python
en
['en', 'en', 'en']
True
Printer.process
(self, object, h, n=0, nl=False)
print object using the specified indent (n) and newline (nl).
print object using the specified indent (n) and newline (nl).
def process(self, object, h, n=0, nl=False): """ print object using the specified indent (n) and newline (nl). """ if object is None: return 'None' if isinstance(object, Object): if len(object) == 0: return '<empty>' else: retur...
[ "def", "process", "(", "self", ",", "object", ",", "h", ",", "n", "=", "0", ",", "nl", "=", "False", ")", ":", "if", "object", "is", "None", ":", "return", "'None'", "if", "isinstance", "(", "object", ",", "Object", ")", ":", "if", "len", "(", ...
[ 260, 4 ]
[ 281, 35 ]
python
en
['en', 'en', 'en']
True
Printer.print_object
(self, d, h, n, nl=False)
print complex using the specified indent (n) and newline (nl).
print complex using the specified indent (n) and newline (nl).
def print_object(self, d, h, n, nl=False): """ print complex using the specified indent (n) and newline (nl). """ s = [] cls = d.__class__ md = d.__metadata__ if d in h: s.append('(') s.append(cls.__name__) s.append(')') s.append('....
[ "def", "print_object", "(", "self", ",", "d", ",", "h", ",", "n", ",", "nl", "=", "False", ")", ":", "s", "=", "[", "]", "cls", "=", "d", ".", "__class__", "md", "=", "d", ".", "__metadata__", "if", "d", "in", "h", ":", "s", ".", "append", ...
[ 283, 4 ]
[ 323, 25 ]
python
en
['en', 'en', 'en']
True
Printer.print_dictionary
(self, d, h, n, nl=False)
print complex using the specified indent (n) and newline (nl).
print complex using the specified indent (n) and newline (nl).
def print_dictionary(self, d, h, n, nl=False): """ print complex using the specified indent (n) and newline (nl). """ if d in h: return '{}...' h.append(d) s = [] if nl: s.append('\n') s.append(self.indent(n)) s.append('{') for item in d.it...
[ "def", "print_dictionary", "(", "self", ",", "d", ",", "h", ",", "n", ",", "nl", "=", "False", ")", ":", "if", "d", "in", "h", ":", "return", "'{}...'", "h", ".", "append", "(", "d", ")", "s", "=", "[", "]", "if", "nl", ":", "s", ".", "appe...
[ 325, 4 ]
[ 348, 25 ]
python
en
['en', 'en', 'en']
True
Printer.print_collection
(self, c, h, n)
print collection using the specified indent (n) and newline (nl).
print collection using the specified indent (n) and newline (nl).
def print_collection(self, c, h, n): """ print collection using the specified indent (n) and newline (nl). """ if c in h: return '[]...' h.append(c) s = [] for item in c: s.append('\n') s.append(self.indent(n)) s.append(self.process(item, h, n-...
[ "def", "print_collection", "(", "self", ",", "c", ",", "h", ",", "n", ")", ":", "if", "c", "in", "h", ":", "return", "'[]...'", "h", ".", "append", "(", "c", ")", "s", "=", "[", "]", "for", "item", "in", "c", ":", "s", ".", "append", "(", "...
[ 350, 4 ]
[ 361, 25 ]
python
en
['en', 'en', 'en']
True
Printer.unwrap
(self, d, item)
translate (unwrap) using an optional wrapper function
translate (unwrap) using an optional wrapper function
def unwrap(self, d, item): """ translate (unwrap) using an optional wrapper function """ nopt = ( lambda x: x ) try: md = d.__metadata__ pmd = getattr(md, '__print__', None) if pmd is None: return item wrappers = getattr(pmd, 'wrapp...
[ "def", "unwrap", "(", "self", ",", "d", ",", "item", ")", ":", "nopt", "=", "(", "lambda", "x", ":", "x", ")", "try", ":", "md", "=", "d", ".", "__metadata__", "pmd", "=", "getattr", "(", "md", ",", "'__print__'", ",", "None", ")", "if", "pmd",...
[ 363, 4 ]
[ 376, 19 ]
python
en
['en', 'en', 'en']
True
Printer.exclude
(self, d, item)
check metadata for excluded items
check metadata for excluded items
def exclude(self, d, item): """ check metadata for excluded items """ try: md = d.__metadata__ pmd = getattr(md, '__print__', None) if pmd is None: return False excludes = getattr(pmd, 'excludes', []) return ( item[0] in exclude...
[ "def", "exclude", "(", "self", ",", "d", ",", "item", ")", ":", "try", ":", "md", "=", "d", ".", "__metadata__", "pmd", "=", "getattr", "(", "md", ",", "'__print__'", ",", "None", ")", "if", "pmd", "is", "None", ":", "return", "False", "excludes", ...
[ 378, 4 ]
[ 389, 20 ]
python
en
['en', 'en', 'en']
True
ImplementationStrategyStorage.implementation_strategy_map
(self)
Возвращает карту соответствия зарегистрированных стратегий реализации функций
Возвращает карту соответствия зарегистрированных стратегий реализации функций
def implementation_strategy_map(self) -> Dict[str, Type[FunctionImplementationStrategy]]: """ Возвращает карту соответствия зарегистрированных стратегий реализации функций """ return self._implementation_strategy_map
[ "def", "implementation_strategy_map", "(", "self", ")", "->", "Dict", "[", "str", ",", "Type", "[", "FunctionImplementationStrategy", "]", "]", ":", "return", "self", ".", "_implementation_strategy_map" ]
[ 39, 4 ]
[ 43, 48 ]
python
en
['en', 'error', 'th']
False
ImplementationStrategyStorage.get_strategy_implementation
( self, strategy_key: str, )
Возвращает стратегию реализации функции по значению перечисления
Возвращает стратегию реализации функции по значению перечисления
def get_strategy_implementation( self, strategy_key: str, ): """ Возвращает стратегию реализации функции по значению перечисления """ return self._implementation_strategy_map[strategy_key]
[ "def", "get_strategy_implementation", "(", "self", ",", "strategy_key", ":", "str", ",", ")", ":", "return", "self", ".", "_implementation_strategy_map", "[", "strategy_key", "]" ]
[ 45, 4 ]
[ 52, 62 ]
python
en
['en', 'error', 'th']
False
ImplementationStrategyStorage._find_strategies_modules
(self)
Поиск модулей содержащих стратегии создания функций
Поиск модулей содержащих стратегии создания функций
def _find_strategies_modules(self) -> List[Tuple[str, str]]: """ Поиск модулей содержащих стратегии создания функций """ strategies_modules = [] checked_packed_paths = [] for app_name in settings.INSTALLED_APPS: app_module = import_module(app_name) ...
[ "def", "_find_strategies_modules", "(", "self", ")", "->", "List", "[", "Tuple", "[", "str", ",", "str", "]", "]", ":", "strategies_modules", "=", "[", "]", "checked_packed_paths", "=", "[", "]", "for", "app_name", "in", "settings", ".", "INSTALLED_APPS", ...
[ 54, 4 ]
[ 108, 33 ]
python
en
['en', 'error', 'th']
False
ImplementationStrategyStorage._prepare_implementation_strategy_map
(self)
Поиск фабрик во всех подключенных приложениях
Поиск фабрик во всех подключенных приложениях
def _prepare_implementation_strategy_map(self) -> Dict[str, FunctionImplementationStrategy]: """ Поиск фабрик во всех подключенных приложениях """ strategy_map = {} strategies_modules = self._find_strategies_modules() for strategies_module, module_path in strategies_modu...
[ "def", "_prepare_implementation_strategy_map", "(", "self", ")", "->", "Dict", "[", "str", ",", "FunctionImplementationStrategy", "]", ":", "strategy_map", "=", "{", "}", "strategies_modules", "=", "self", ".", "_find_strategies_modules", "(", ")", "for", "strategie...
[ 110, 4 ]
[ 146, 27 ]
python
en
['en', 'error', 'th']
False
powerset
(iterable)
powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)
powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)
def powerset(iterable): """powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3) """ as_list = list(iterable) return itertools.chain.from_iterable( itertools.combinations(as_list, r) for r in range(len(as_list)+1))
[ "def", "powerset", "(", "iterable", ")", ":", "as_list", "=", "list", "(", "iterable", ")", "return", "itertools", ".", "chain", ".", "from_iterable", "(", "itertools", ".", "combinations", "(", "as_list", ",", "r", ")", "for", "r", "in", "range", "(", ...
[ 12, 0 ]
[ 17, 74 ]
python
en
['en', 'sr', 'ur']
False
get_random_jeeves_id
()
Returns a random Jeeves ID.
Returns a random Jeeves ID.
def get_random_jeeves_id(): """Returns a random Jeeves ID. """ return "".join(ALPHANUM[SYSRAND.randint(0, len(ALPHANUM)-1)] for i in xrange(JEEVES_ID_LEN))
[ "def", "get_random_jeeves_id", "(", ")", ":", "return", "\"\"", ".", "join", "(", "ALPHANUM", "[", "SYSRAND", ".", "randint", "(", "0", ",", "len", "(", "ALPHANUM", ")", "-", "1", ")", "]", "for", "i", "in", "xrange", "(", "JEEVES_ID_LEN", ")", ")" ]
[ 22, 0 ]
[ 26, 51 ]
python
en
['en', 'et', 'en']
True
serialize_vars
(expr)
Serializing Jeeves-related variables.
Serializing Jeeves-related variables.
def serialize_vars(expr): """Serializing Jeeves-related variables. """ return ';' + ''.join('%s=%d;' % (var_name, var_value) for var_name, var_value in expr.iteritems())
[ "def", "serialize_vars", "(", "expr", ")", ":", "return", "';'", "+", "''", ".", "join", "(", "'%s=%d;'", "%", "(", "var_name", ",", "var_value", ")", "for", "var_name", ",", "var_value", "in", "expr", ".", "iteritems", "(", ")", ")" ]
[ 28, 0 ]
[ 32, 72 ]
python
en
['en', 'en', 'en']
True
unserialize_vars
(sexpr)
Unserializing Jeeves-related variables.
Unserializing Jeeves-related variables.
def unserialize_vars(sexpr): """Unserializing Jeeves-related variables. """ var_strs = sexpr[1:].split(';') evars = {} for var_str in var_strs: if var_str != "": var_val = var_str.split('=') evars[var_val[0]] = bool(int(var_val[1])) return evars
[ "def", "unserialize_vars", "(", "sexpr", ")", ":", "var_strs", "=", "sexpr", "[", "1", ":", "]", ".", "split", "(", "';'", ")", "evars", "=", "{", "}", "for", "var_str", "in", "var_strs", ":", "if", "var_str", "!=", "\"\"", ":", "var_val", "=", "va...
[ 34, 0 ]
[ 43, 16 ]
python
en
['en', 'en', 'en']
True
NTLMConnectionPool.__init__
(self, user, pw, authurl, *args, **kwargs)
authurl is a random URL on the server that is protected by NTLM. user is the Windows user, probably in the DOMAIN\\username format. pw is the password for the user.
authurl is a random URL on the server that is protected by NTLM. user is the Windows user, probably in the DOMAIN\\username format. pw is the password for the user.
def __init__(self, user, pw, authurl, *args, **kwargs): """ authurl is a random URL on the server that is protected by NTLM. user is the Windows user, probably in the DOMAIN\\username format. pw is the password for the user. """ super(NTLMConnectionPool, self).__init__(*a...
[ "def", "__init__", "(", "self", ",", "user", ",", "pw", ",", "authurl", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "super", "(", "NTLMConnectionPool", ",", "self", ")", ".", "__init__", "(", "*", "args", ",", "*", "*", "kwargs", ")", "s...
[ 24, 4 ]
[ 36, 20 ]
python
en
['en', 'error', 'th']
False
DQN.init_subset
(self, indices, actor_queues)
Initialize a subset of actor workers (rollout workers) and wait until the first reset() is completed for all envs on these workers. This function will retry if the worker process crashes during the initial reset. :param indices: indices of actor workers to initialize :param ac...
Initialize a subset of actor workers (rollout workers) and wait until the first reset() is completed for all envs on these workers.
def init_subset(self, indices, actor_queues): """ Initialize a subset of actor workers (rollout workers) and wait until the first reset() is completed for all envs on these workers. This function will retry if the worker process crashes during the initial reset. :param indices:...
[ "def", "init_subset", "(", "self", ",", "indices", ",", "actor_queues", ")", ":", "reset_timelimit_seconds", "=", "self", ".", "cfg", ".", "reset_timeout_seconds", "# fail worker if not a single env was reset in that time", "workers", "=", "dict", "(", ")", "last_env_in...
[ 287, 4 ]
[ 359, 31 ]
python
en
['en', 'error', 'th']
False
DQN.init_workers
(self)
Initialize all types of workers and start their worker processes.
Initialize all types of workers and start their worker processes.
def init_workers(self): """ Initialize all types of workers and start their worker processes. """ actor_queues = [MpQueue() for _ in range(self.cfg.num_workers)] policy_worker_queues = dict() for policy_id in range(self.cfg.num_policies): policy_worker_queue...
[ "def", "init_workers", "(", "self", ")", ":", "actor_queues", "=", "[", "MpQueue", "(", ")", "for", "_", "in", "range", "(", "self", ".", "cfg", ".", "num_workers", ")", "]", "policy_worker_queues", "=", "dict", "(", ")", "for", "policy_id", "in", "ran...
[ 362, 4 ]
[ 421, 46 ]
python
en
['en', 'error', 'th']
False