MainProcess in logging’s format %process

I configure my logging as

import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s-%(levelname)s-%(process)d-%(processName)s-  %(message)s') logging.debug("Start of program")  def factorial(n):     logging.debug('Start of factorial(%s)' %(n))     total = 1     for i in range(n+1):         total *= i          logging.debug('i is ' + str(i) + ', toal is ' + str(total))     logging.debug('End of factorial(%s)' %(n))     return total  print(factorial(10)) logging.debug("End of program") 

Plan to trace the processName and processID,
Unfortunately, It provide few helpful info

$   python py_logging.py  2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  Start of program 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  Start of factorial(10) 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 0, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 1, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 2, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 3, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 4, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 5, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 6, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 7, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 8, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 9, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  i is 10, toal is 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  End of factorial(10) 0 2019-03-20 23:11:15,014-DEBUG-12876-MainProcess-  End of program 

What does the MainProcess mean ?which does not expose any info

I assume such a structure might be helpful

2019-03-20 23:18:47,447-DEBUG-16076-MainProcess-  Start of program systemd,1 splash   `-systemd,2122 --user       `-code,3521           `-code,3539               `-code,3691                   `-bash,16025                       `-python,16076 py_logging.py                           `-sh,16077 -c pstree -asp 16076                               `-pstree,16078 -asp 16076  2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  Start of factorial(10) 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 0, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 1, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 2, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 3, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 4, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 5, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 6, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 7, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 8, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 9, toal is 0 2019-03-20 23:18:47,493-DEBUG-16076-MainProcess-  i is 10, toal is 0 2019-03-20 23:18:47,494-DEBUG-16076-MainProcess-  End of factorial(10) 0 2019-03-20 23:18:47,494-DEBUG-16076-MainProcess-  End of program 

How could I understand the MainProcess, main to what?

converting CSV format data to graph sample format for implementing BFS

import collections   def breadth_first_search(graph, root):      visited, queue = set(), collections.deque([root])     while queue:          vertex = queue.popleft()         for neighbour in graph[vertex]:              if neighbour not in visited:                  visited.add(neighbour)                  queue.append(neighbour)    if __name__ == '__main__':     graph = {0: [1, 2], 1: [2], 2: []}      breadth_first_search(graph, 0) 

I am implementing BFS with the help of given sample data. But here I intend to use my own data. I am extracting graph from Neo4j into CSV format but how do I transform that extracted data into the sample format. Here is some of the sample data from CSV file.

"[{name:Keanu Reeves,born:1964},{roles:[Julian Mercer]},{title:Something's Gotta Give,released:2003}]" "[{name:Keanu Reeves,born:1964},{roles:[Shane Falco]},{title:The Replacements,tagline:Pain heals, Chicks dig scars... Glory lasts forever,released:2000}]" "[{name:Keanu Reeves,born:1964},{roles:[Johnny Mnemonic]},{title:Johnny Mnemonic,tagline:The hottest data on earth. In the coolest head in town,released:1995}]" "[{name:Keanu Reeves,born:1964},{roles:[Kevin Lomax]},{title:The Devil's Advocate,tagline:Evil has its winning ways,released:1997}]" 

Appimage, Exec format error

Moved an “Appimage” from one laptop to another, and get “Exec format error”.

file:

ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=[...], stripped 

uname -m on first machine:

x86_64 

and on second machine:

x86_64 

Cannot remember ever doing anything special with these files. Is there some package I need?

using printenv in script sh in recovery TWRP return error execv failed : Exec format error

for example just try this script

#!/sbin/sh  printenv | grep sdcard >> /tmp/tong.txt 

in recovery.log i’ve

run_program: execv failed: Exec format error run_program: child exited with status 1 

I think it’s about printenv but i don’t understand what is wrong. Using printenv in a terminal emulator works but not in my script sh

Google Sheets Custom Number Format – Unchanging #

I am well aware of the excellent Custom Number Formula:

[<999950]0.0,"K";[<999950000]0.0,,"M";0.0,,,"B" 

Which abbreviates #,000 numbers to #K, #,000,000 to #M etc…

However, I am looking for a formula that will leave numbers below 1000 unchanged.

For example, the number 999 will remain 999 but the number 1,001 will abbreviate to 1K.