Electron microscopy
 
PythonML
Cheatsheet of .TXT File Manipulation
- Python Automation and Machine Learning for ICs -
- An Online Book: Python Automation and Machine Learning for ICs by Yougui Liao -
Python Automation and Machine Learning for ICs                                                           http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

Table 3409. Cheatsheet of .txt file manipulation.

Application Details
Remove duplicate/same lines in a text file   
Search patterns in a text file  
Save the text in clipboard to a txt file  
Modify/replace the line in a text file if a line contains specific string  
Save the webpages obtained by Google search into a text file  
Merge/combine two text files (and add a new line to the beginning of a text file)  
File name, folder name. {}{}....format. Manipulation of file and folder names (rename file name and folder name): i) Create a new folder and then copy all files from a folder to the new folder and rename the file, and then open the file. If the folder exists, then no file will be copied, but the file will still be opened. ii) Print and export the folder names and file names (with or without extensions) from a folder into a text file. iii) csv2image filename. Introduction  
RegEx (Regular Expression) (characters to check if a string contains a specified search pattern, remove double spaces, and clean texts)  
Nearest/most similar lyrics of a sentence/text to a CSV file  
Compute the similarity between two text documents/files (with heatmap)  
Get the last line in a text file  
Read line-by-line from a text file  
Avoid duplicates when creating text file  
Insert paragraphs of texts into Python script  
Check existence of phrase on text file line-by-line  
Convert a sentence/text to a list  
Replace the lines between two lines “xx” and “yy” in a text file with new lines  
Count number of lines in a text file  
Write contents of DataFrame/memory into text file  
Sentence, text and document embeddings  
Text search  
Read/print a text/txt file  
Remove \n in string or new line in txt/text file  
Read its nth character in a text file   
Close() and close opened file  
Avoid duplicates when creating text file   

 

===========================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================