parameters: ()
return_statement: return blob
docstring: Returns system information as a list
docstring_summary: Returns system information as a list
docstring_tokens: Returns system information as a list
function: def get_sys_info() -> List[Tuple[str, Optional[Union[str, int]]]]:
      """
      Returns system information as a list
      """
      blob: List[Tuple[str, Optional[Union[str, int]]]] = []
  
      # get full commit hash
      commit = None
      if os.path.isdir(".git") and os.path.isdir("pandas"):
          try:
              pipe = subprocess.Popen(
                  'git log --format="%H" -n 1'.split(" "),
                  stdout=subprocess.PIPE,
                  stderr=subprocess.PIPE,
              )
              so, serr = pipe.communicate()
          except (OSError, ValueError):
              pass
          else:
              if pipe.returncode == 0:
                  commit = so.decode("utf-8").strip().strip('"')
  
      blob.append(("commit", commit))
  
      try:
          (sysname, nodename, release, version, machine, processor) = platform.uname()
          blob.extend(
              [
                  ("python", ".".join(map(str, sys.version_info))),
                  ("python-bits", struct.calcsize("P") * 8),
                  ("OS", f"{sysname}"),
                  ("OS-release", f"{release}"),
                  # ("Version", "{version}".format(version=version)),
                  ("machine", f"{machine}"),
                  ("processor", f"{processor}"),
                  ("byteorder", f"{sys.byteorder}"),
                  ("LC_ALL", f"{os.environ.get('LC_ALL', 'None')}"),
                  ("LANG", f"{os.environ.get('LANG', 'None')}"),
                  ("LOCALE", ".".join(map(str, locale.getlocale()))),
              ]
          )
      except (KeyError, ValueError):
          pass
  
      return blob
function_tokens: def get_sys_info ( ) -> List [ Tuple [ str , Optional [ Union [ str , int ] ] ] ] : blob : List [ Tuple [ str , Optional [ Union [ str , int ] ] ] ] = [ ] # get full commit hash commit = None if os . path . isdir ( ".git" ) and os . path . isdir ( "pandas" ) : try : pipe = subprocess . Popen ( 'git log --format="%H" -n 1' . split ( " " ) , stdout = subprocess . PIPE , stderr = subprocess . PIPE , ) so , serr = pipe . communicate ( ) except ( OSError , ValueError ) : pass else : if pipe . returncode == 0 : commit = so . decode ( "utf-8" ) . strip ( ) . strip ( '"' ) blob . append ( ( "commit" , commit ) ) try : ( sysname , nodename , release , version , machine , processor ) = platform . uname ( ) blob . extend ( [ ( "python" , "." . join ( map ( str , sys . version_info ) ) ) , ( "python-bits" , struct . calcsize ( "P" ) * 8 ) , ( "OS" , f"{sysname}" ) , ( "OS-release" , f"{release}" ) , # ("Version", "{version}".format(version=version)), ( "machine" , f"{machine}" ) , ( "processor" , f"{processor}" ) , ( "byteorder" , f"{sys.byteorder}" ) , ( "LC_ALL" , f"{os.environ.get('LC_ALL', 'None')}" ) , ( "LANG" , f"{os.environ.get('LANG', 'None')}" ) , ( "LOCALE" , "." . join ( map ( str , locale . getlocale ( ) ) ) ) , ] ) except ( KeyError , ValueError ) : pass return blob