|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
"Extract, Transform, Load" (ETL) and " Extract, Load, Transform" (ELT) processes |
Introduction |
Tungsten in Spark |
Introduction |
Building an effective machine learning team |
Introduction |
Trade-offs between fairness and performance |
Introduction |
Decision threshold in ML |
Introduction |
Text summarization for ML |
Introduction |
FastText for ML |
Introduction |
Timeseries prediction in ML |
Introduction |
Analytics and Technology Automation (ATA) |
Introduction |
Transformer in ML |
Introduction |
Pre-training in ML |
Introduction |
GPT (Generative Pre-trained Transformer) |
Introduction |
Google Translate |
Introduction |
TensorFlow Playground |
Introduction |
Python Tutor |
Introduction |
Trade-off between minimizing loss and minimizing complexity |
Introduction |
Evaluation (Precision and Recall) in Text classification with Naive Bayes |
Introduction |
Precision and Recall Tradeoff |
Introduction |
Text classification with Naive Bayes |
Introduction |
Search patterns in a text file |
Introduction |
Theorem Proving |
Introduction |
Goal State and Goal Test in ML |
Introduction |
Transition model |
Introduction |
Stationary and Non-Stationary State Transitions in Markov Decision Process (MDP) |
Introduction |
Trade-off between exploration and exploitation, and epsilon(ε-) greedy exploration |
Introduction |
State transition function (probability) in reinforcement learning |
Introduction |
Open datasets, and open-source tools and libraries for ML practice |
Introduction |
Time of training a ML algorithm |
Introduction |
Hyperbolic tangent (Tanh) function |
Introduction |
Comparison among sigmoid, hyperbolic tangent (tanh) and rectified linear unit (ReLU) functions |
Introduction |
Holidays/Festivals/Vocations (Thanksgiving/Christmas) |
Introduction |
Regular decision trees and decision trees with bagging |
Introduction |
Data parallelism in distributed training |
Introduction |
Misclassification loss in decision trees |
Introduction |
Hyperparameter tuning (model tuning) |
Introduction |
Linear correlation between two variables with Pearson Correlation Coefficient, Spearman Rank Correlation Coefficient, Kendall's Tau, Linear Regression, Coefficient of Determination, and Correlation Ratio
|
Introduction |
True Function |
Introduction |
True Distribution |
Introduction |
No Free Lunch Theorems |
Introduction |
Margin Theory |
Introduction |
Learning theory |
Introduction |
Tricks for learning three dimensional geometry |
Introduction |
Splitting a training dataset into different subsets |
Introduction |
Choice of parameters for training models |
Introduction |
Training score/training error |
Introduction |
Training error versus model complexity |
Introduction |
Kernel tricks and kernel function |
Introduction |
L2 regularization/Ridge/ridge regularization/Tikhonov regularization |
Introduction |
Representer theorem and its derivation
|
Introduction |
Training set |
Introduction |
Transpose of vector and matrix and their equations |
Introduction |
Trace of a square matrix |
Introduction |
Binary trees |
Introduction |
Kendall Tau Rank Correlation Coefficient |
Introduction |
Threading |
Introduction |
Generalization Error/Generalization Loss/Test Error/Expected Error of Hypothesis/Risk |
Introduction |
True Mean in ML |
Introduction |
Deviation Threshold in ML |
Introduction |
True risk in ML |
Introduction |
Two-sample t-test |
Introduction |
t-SNE (t-distributed stochastic neighbor embedding, from sklearn.manifold import TSNE) |
Introduction |
try and except |
Introduction |
Save the text in clipboard to a txt file |
Introduction |
Color in table obtained by matplotlib.pyplot/change background color of cells in table/colored with threshold |
Introduction |
Try a number of times before exception or fail |
Introduction |
Diversity prediction theorem |
Introduction |
Mirror/reflect image from left to right/from top to bottom |
Introduction |
Three dimensional shapes/structures |
Introduction |
Modify/replace the line in a text file if a line contains specific string |
Introduction |
except TypeError |
Introduction |
Hide/turn on/off axes/axis on matplotlib |
Introduction |
Common values in two pandas series |
Introduction |
Crop/snip (without opening the image) part of a image with definition by a pixel line (with transparent added portion) |
Introduction |
Convert a number type to another |
Introduction |
.norm() (Taxicab Norm, Manhattan Norm, Euclidian Norm and Vector Max Norm) |
Introduction |
Script execution limited by retry time |
Introduction |
Predictive/predict model (with "best"-option table) |
Introduction |
Microsoft Teams |
Introduction |
Clean clipboard and/or check if clipboard is empty, text or image |
Introduction |
Tracking process in ML |
Introduction |
Tensors and vectors |
Introduction |
Output (target variable, y, Y) |
Introduction |
|
|
Training process in ML (with "best"-option table) |
Introduction |
◆ |
Trained model and automatic model selection |
Introduction |
◆ |
Metrics to monitor during training and testing |
Introduction |
◆ |
Train-dev-test split (training-validation-testing split: Ratio for splitting dataset into training, validation and test sets |
Introduction |
◆ |
Typical training setup in AI and comparisons of different training libraries |
Introduction |
◆ |
Text/keyword classification/sort/prediction, training/test e.g. Youtube spam |
Introduction |
◆ |
Empirical loss/training loss |
Introduction |
◆ |
Train/Test versus Model Accuracy |
Introduction |
◆ |
Training Exmaple (x, y) |
Introduction |
|
|
TensorFlow |
Introduction |
◆ |
3 ways to create a Keras model with TensorFlow |
|
|
✔ |
Sequential API to create a Keras model with TensorFlow |
Introduction |
|
✔ |
Functional API to create a Keras model with TensorFlow |
Introduction |
|
✔ |
TensorFlow Data Validation (TFDV) |
Introduction |
|
✔ |
Model Subclassing to create a Keras model with TensorFlow |
Introduction |
◆ |
Supervised learning with tensorFlow |
Introduction |
◆ |
Comparison between scikit-learn and tensorflow |
Introduction |
◆ |
Comparison between TensorFlow, PyTorch, Theano and OpenCV |
Introduction |
◆ |
Comparison between steps and epochs in TensorFlow |
Introduction |
◆ |
Commands |
|
|
✔ |
train_and_evaluate |
Introduction |
|
✔ |
RunConfig |
Introduction |
|
✔ |
save_checkpoints_steps |
Introduction |
|
✔ |
model_fn |
Introduction |
|
✔ |
train_op |
Introduction |
|
✔ |
end( ) |
Introduction |
|
✔ |
get_shape() |
Introduction |
|
✔ |
export_savedmodel |
Introduction |
|
✔ |
tf.saved_model.save() |
Introduction |
|
✔ |
serving_input_fn |
Introduction |
|
✔ |
checkpoint_path |
Introduction |
|
✔ |
input_fn |
Introduction |
|
✔ |
tf.keras.optimizers.Adam |
Introduction |
|
✔ |
tf.Variable |
Introduction |
|
✔ |
tf.distribute.Strategy |
Introduction |
|
✔ |
tf.Graph() |
Introduction |
|
✔ |
.as_default() |
Introduction |
|
✔ |
tf.constant() |
Introduction |
|
✔ |
tf.Session |
Introduction |
|
✔ |
tf.function |
Introduction |
|
✔ |
tf.data |
|
|
|
X |
tf.data API |
Introduction |
|
|
X |
tf.data.Dataset |
Introduction |
|
|
|
• |
tf.data.TextLineDataset() |
(Code) |
|
|
|
• |
tf.data.TFRecordDataset() |
(Code) |
|
|
|
• |
tf.data.Dataset.from_tensor_slices |
(Code) |
|
|
|
• |
tf.data.FixedLengthRecordDataset |
(Code) |
|
✔ |
tf.feature_column.categorical_column_with_identity |
Introduction |
|
✔ |
tf.feature_column.bucketized_column |
Introduction |
◆ |
Basics of tensors |
|
|
✔ |
Rank/ranking tensors |
Introduction |
|
✔ |
Shape of tensor |
Introduction |
|
✔ |
Flow of tensor |
Introduction |
|
✔ |
Size in tensor |
Introduction |
|
✔ |
Axis/dimension of tensor |
Introduction |
◆ |
Neural networks with TensorFlow |
Introduction |
◆ |
TensorBoard |
Introduction |
◆ |
Variables in TensorFlow |
Introduction |
◆ |
Hook |
Introduction |
◆ |
after_run function |
Introduction |
◆ |
stop_if_no_decrease_hook |
Introduction |
◆ |
early_stopping.stop_if_no_decrease_hook |
Introduction |
◆ |
Comparison between Keras and Estimators (tf.estimators) |
Introduction |
|
✔ |
Keras |
Introduction |
|
|
X |
Stateful preprocessing layers (adapt() method) |
|
|
|
|
• |
TextVectorization |
|
|
|
|
• |
StringLookup |
|
|
|
|
• |
IntegerLookup |
|
|
|
|
• |
Normalization |
|
|
|
|
• |
Discretization |
|
|
|
X |
Categorical features preprocessing layers |
Introduction |
|
|
|
• |
tf.keras.layers.CategoryEncoding (categoryEncoding layer) |
Introduction |
|
|
|
• |
tf.keras.layers.Hashing (hashing layer) |
Introduction |
|
|
|
• |
tf.keras.layers.StringLookup (stringLookup layer) |
Introduction |
|
|
|
• |
tf.keras.layers.IntegerLookup (IntegerLookup layer) |
Introduction |
|
|
X |
Trainable layers |
Introduction |
|
|
|
• |
tf.keras.layers.Discretization |
Introduction |
|
|
|
• |
tf.keras.layers.normalization |
Introduction |
|
|
|
• |
tf.keras.layers.StringLookup (stringLookup layer) |
Introduction |
|
|
X |
Non-trainable layers |
Introduction |
|
|
|
• |
tf.keras.layers.Hashing (hashing layer) |
Introduction |
|
|
X |
tf.keras.layers.TextVectorization |
Introduction |
|
|
X |
tf.keras API |
Introduction |
|
|
X |
tf.keras.datasets (e.g. MNIST, CIFAR-10, CIFAR-100, Fashion MNIST) |
Introduction |
|
✔ |
tf.estimator |
Introduction |
|
|
X |
tf.estimator.evaluate() |
(code) |
|
|
X |
tf.estimator.EstimatorSpec |
(code) |
|
|
X |
tf.estimator.ModeKeys.TRAIN |
(code) |
|
|
X |
tf.estimator.Estimator |
(code) |
|
|
X |
tf.estimator.Estimator.get_variable_value |
(code) |
|
|
X |
tf.estimator.experimental.stop_if_no_decrease_hook |
(code) |
|
|
X |
tf.estimator.Estimator.get_variable_names() |
(code) |
|
|
X |
tf.estimator.Estimator.get_variable_value(name) |
(code) |
|
|
X |
tf.estimator.Estimator.evaluate |
(code) |
|
|
X |
tf.estimator.Estimator.predict |
(code) |
◆ |
Training in TensorFlow |
Introduction |
◆ |
tensorflow_ranking (TensorFlow Ranking) |
Introduction |
◆ |
Typical training setup in AI and comparisons of different training libraries |
Introduction |
◆ |
TensorFlow APIs |
Introduction |
|
|
|
|
History/hot topics of machine learning |
Introduction |
|
|
Transform process in ML |
Introduction |
◆ |
Feature extraction using radon transform |
Introduction |
|
|
Save the webpages obtained by Google search into a text file |
Introduction |
Troubleshooting/debugging and problem solving in Python programming |
page4806 |
Thresholding with Match Template:
Match on images to find and to highlight unsimilar (threshold=0) to identical (threshold=1) regions of an image that match a template with a cross-correlation method |
Introduction |
Open a new tab in an application window |
Introduction |
Open task manager window |
Introduction |
Table of powerPoint shortcut hotkeys |
Introduction |
Table of PC/computer/Windows shortcut hotkeys |
Introduction |
Table of Word shortcut hotkeys |
Introduction |
Table of Excel shortcut hotkeys |
Introduction |
Table of Chrome shortcut hotkeys |
Introduction |
Loops (e.g. for loop) for 2D (two-dimensional) plot (or map) |
Introduction |
Table of digital micrograph (DM) shortcut hotkeys |
Introduction |
Go to the pointed tab on an app |
Introduction |
Type capital letters |
Introduction |
Check to see if or get a window with a name containing specific titles or texts |
Introduction |
stopwatch and timing/countering
a process |
Introduction |
Turn on and off with mouse press or a process/button switch, button state |
Introduction |
Copy text to clipboard |
Introduction |
Tricks in Python Programming and principles and practices in good programming |
Introduction |
Term Frequency-Inverse Document Frequency (TF-IDF) |
Introduction |
Print colored text in Python IDLE's terminal |
Introduction |
Find the best word/text similarity |
Introduction |
Copy text into clipboard and then use it immediately (one time clipboard) |
Introduction |
API (Application Programming Interface), e.g. weather, temperature |
Introduction |
Detection of tables from an image |
Introduction |
type() |
Introduction |
Send emails in HTML and text formats |
Introduction |
matplotlib.pyplot axis/text color |
Introduction |
Template matching: a technique for finding areas of an image that are similar to a patch (template).
Patch are small images with a certain feature. The goal of template matching is to find and/or highlight the patch/template in an image. |
Image matching with cross correlation and overlap of template edge. In this matching process, Normalized cross-correlation with those edge images is performed. |
code |
Cross correlation between two images |
code |
Cross correlation between two images in any sizes. Multiscaling is used to avoid the issue caused by the different sizes of the template and original image, in order to find match in a original image, namely, the size of template is larger than the original image. |
code |
Copy text into clipboard and then you can paste it anywhere |
Introduction |
Merge/combine two text files (and add a new line to the beginning of a text file) |
Introduction |
Highlight texts or make selection |
Introduction |
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 |
Data structures (Data science, and comparison between list, tuple, set, dictionary) |
Introduction |
Set default programs by file extensions and by file types and programs on Windows |
Introduction |
Numpy: Access the element at the second row, the third entry, access a specific row or a column, access some elements (submatrix), or replace/modify an element in the array, print a transfer of an array, access array under conditions or filtering |
Introduction |
.T (Transfer of array in Python) |
Introduction |
Copy text into clipboard and then you can paste it a webpage, text/txt, word or powerpoint file automatically |
(code) |
Count the times of repeated excutions |
code |
Open any files, e.g. text (.txt), image files, and so on. .txt file will be opened in Python program, e.g. IDLE shell. |
code |
Swap two numbers |
code |
Extract three blue, green, red images from a color image or grey image, or convert RGB (color) image into three blue, green, red images |
code |
Count the number of lines (rows) and columns in a txt (and a csv) file, count different numbers in each region in a column, count missing or not available values |
CSV: Introduction. code. |
Compute the difference between two images by using Structural Similarity Index
with "pip install --upgrade imutils" |
code. code |
Subtract (minus) two images after resizing them |
code, code. |
Sum two images after resizing them |
code |
Create images with global, adaptive mean, adaptive Gaussian, binary, trunc, Tozero, and tozero thresholds. |
code |
Bail out/terminate of a loop |
code |
Find the greatest of three numbers |
code1, code2, code3. |
Create slides with text only |
Introduction |
Text Format in pptx |
Introduction |
Find and convert the file time/date |
Introduction |
Read its nth character in a text file |
Introduction |
Transparency of marker (e.g. for plots) |
Introduction |
matplotlib.pyplot axis/text color (xticks, rotation, xlabel, ylabel, title, fontsize, grid(), legend(), show()) |
Introduction |
Find files with a specific file extension/type or with file names ending with specific characters |
Introduction |
Simple watchdog to monitor file/folder changes (monitor file creation and then write the file paths into the text file) |
Introduction |
Convert a CSV file to a TXT file |
Introduction |
Execute scheduled jobs (time-schedule) |
Introduction |
Find common elements/items between two lists |
Introduction |
top and left for pptx |
Introduction |
Time and date used as a file/folder name stamp (e.g. duplicate a file in the same folder) |
Introduction |
matplotlib.pyplot axis/text color (title, xticks, rotation, xlabel, ylabel, title, fontsize, grid(), legend(), show()) |
Introduction |
Sort a text file |
Introduction |
Search text on an image |
Introduction |
Search/extract/find text on an image |
Introduction |
Extract text/check specific text from multiple powerpoint files |
Introduction |
Take a screenshot using a mouse click and drag method. For instance, take a screenshot, and then insert the image and/or a text into a ppt file. |
Introduction |
Top (ranking) Python libraries/modules |
Introduction |
Resize and then sum/mix/overlap two images |
Introduction |
Shift/translate image along x-axis/y-axis |
Introduction |
Resize and then sum/mix/overlap two images (w/o transparency) |
Introduction |
Break/exit/skip a function/code line after a certain time |
Introduction |
Decision tree learning |
Introduction |
Textrank |
Introduction |
DataFrame workflow: Drop/delete rows with empty cells in a column, Sort DataFrame by time/date order |
Count occurrence/nubmer of words/phrase in a text file |
Introduction |
Convert a text file to a string |
Introduction |
Ranking/most popular programming languages/tools for data analysts |
Introduction |
Convert PDF file to text file |
Introduction |
Write/save content to a text file |
Introduction |
Generate text file with the bank of collecting all words, characters and strings from news |
Introduction |
Remove \n in string or new line in txt/text file |
Introduction |
Critical thinking in data science |
Introduction |
Remove duplicate/same lines in a text file |
Introduction |
Ranking/most popular automation testing tools |
Introduction |
Ranking/most popular IT automation software tools |
Introduction |
Extract a mask from an image with a threshold |
Introduction |
Mask an image with a threshold or with a color as a threshold |
Introduction |
Add/insert text to an image |
Introduction |
Fault analysis/PFA (Physical Failure Analysis) time and efficiency |
Introduction |
Plot table |
Introduction |
Read/print a text/txt file |
Introduction |
Extract a table from a webpage or text file |
Introduction |
Convert DataFrame to a HTML Table and save as a HTML webpage |
Introduction |
Write contents of DataFrame/memory into text file |
Introduction |
Various names or terms that describe similar concepts or techniques in ML |
Introduction |
Taylor expansion |
Introduction |
"True label" ("observed label") in machine learning |
Introduction |
BERTScore/BERT (Bidirectional Encoder Representations from Transformer) |
Introduction |
Natural Language Processing (NLP) versus Text |
Introduction |
Tokenization |
Introduction |
Two-dimensional neural network |
Introduction |
Classification of groups of texts |
Introduction |
Common Words for Classification of Groups of Texts |
Introduction |
Bayes' theorem (Bayes rule or Bayes law) in machine learning |
Introduction |
Test process in machine learning |
Introduction |
NLTK (Natural Language Toolkit) |
Introduction |
Regression tree/decision tree for regression |
Introduction |
Classification tree/decision tree for classification |
Introduction |
Various names or terms that describe similar concepts or techniques in ML |
Introduction |
|
|
Good research topics in the field of semiconductor manufacturing and computer vision |
Introduction |
AI/machine learning algorism for text analysis |
Introduction |
|
|
Trick: return True and return False |
Introduction |
Clustering versus Classification of texts and documents |
Introduction |
Clustering of texts |
Introduction |
Classification of texts |
Introduction |
|
|
Multimodal text and image similarity |
Introduction |
Get the latest/newest/most recent file in a folder within certain time/days |
Introduction |
Multimodal text and image search |
Introduction |
Create table on pptx with certain rows and columns of strings |
Introduction |
Create table on pptx with certain rows and columns in DataFrame |
Introduction |
Text search |
Introduction |
Sentence, text and document embeddings |
Introduction |
(Text and image) contrastive learning |
Introduction |
Overfitting and underfitting |
Introduction |
Bias and variance, and bias-variance trade-off in ML |
Introduction |
Compare/check if two text files have the same contents |
Introduction |
Count number of lines in a text file |
Introduction |
Check existence of phrase on text file line-by-line |
Introduction |
Modify HTML webpage (e.g. with graph network by adding/inserting text/hyperlink in) |
Introduction |
Insert paragraphs of texts into Python script |
Introduction |
igraph for clustering, network and tree |
Introduction |
String template class for formating strings (F-strings (for calculation) (f"{}"), format() method ({}), %s, %d, Template ($)) |
Introduction |
Check if all the (and how many, length of a string) characters in the text are digits/numbers |
Introduction |
Summary/templates of plotting graphs/figures |
Introduction |
Continue script execution no matter whether some try fails or not (finally)
|
Introduction |
Remove duplicate cell values from a csv file/dataframe (keeping the first/top one) |
Introduction |
Trick: pd.concat() for merging/adding (two) columns |
Introduction |
|
|
Get the last line in a text file |
Introduction |
Read line-by-line from a text file |
Introduction |
Plot multiple images on the same figure by hiding x- and y-(tick) labels on axis |
Introduction |
Find the same elements in columns in two separate dataframes and then merge them |
Introduction |
Trick: generic code/script templates for complex automation |
Introduction |
|
|
Compare (pattern/ratio of) two different columns, check whether column values match in DataFrame |
Introduction |
◆ |
Check whether one column contains number only and another column contains letters only or mixture of numbers and letters in DataFrame |
Introduction |
◆ |
Check the difference between two columns in DataFrame |
Introduction |
◆ |
|
|
|
|
Avoid duplicates when creating text file |
Introduction |
matplotlib.pyplot to plot/generate images (with axis/colored text or annotation) |
Introduction |
Check if two lists have the same elements |
Introduction |
Compute the similarity between two text documents/files (with heatmap) |
Introduction |
BERTScore (Bidirectional Encoder Representations from Transformer) for text |
Introduction |
Nearest/most similar lyrics of a sentence/text to a CSV file |
Introduction |
SentenceTransformers |
Introduction |
Transfer data from Python module to a YAML file |
Introduction |
Automatically restart script execution, for xyz times, after it breaks/fails/error |
Introduction |
Avoid two or multiple plots being wrongly/incorrectly/unnecessarily mixed/overlap |
Introduction |
Summary/templates/examples of pptx and PowerPoint format |
Introduction |
Create a temporary file or directory/folder |
Introduction |
RegEx (Regular Expression) (characters to check if a string contains a specified search pattern, remove double spaces, and clean texts) |
Introduction |
Recall (Sensitivity or True Positive Rate) in machine learning |
Introduction |
CSV column transposer (rows/columns) |
Introduction |
Filters the rows based on the condition of being within n days of today's date |
Introduction |
Plot a figure with a colored arrow between text lines/steps |
Introduction |
Truth (True) and False Table |
Introduction |
Check if all/any values are true or false in a range of data |
Introduction |
Tableau integration with Python |
Introduction |
tableauhyperapi module |
Introduction |
Convert a sentence/text to a list |
Introduction |
Replace the lines between two lines “xx” and “yy” in a text file with new lines |
Introduction |
Color the Tables in pptx (PowerPoint) |
Introduction |
Color and rotate/vertical text in pptx |
Introduction |
Selecting only numeric/number columns, and then select two specific columns for plot |
Introduction |
Hide x-axis tick labels (only show some labels) where x values are under certain conditions |
Introduction |
Create table with merged cells on pptx |
Introduction |
Font size of tick labels in plot |
Introduction |
Font size of a (single/multiple) cell in table in PowerPoint |
Introduction |
Only use the first 4 characters in the headers of the table for pptx/dataframe |
Introduction |
Populate the table with logarithmic format in pptx |
Introduction |
Perform transpose operations (x-axis to y-axis, and vice versa) on a given dataframe |
Introduction |
Cheatsheet of .txt file manipulation |
Introduction |
.apply(tuple, axis=1) |
Introduction |
Cheatsheet of tuples |
Introduction |
HTTP(Hypertext Transfer Protocol)/URL (Uniform Resource Locator) |
Introduction |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
true_values |
CSV: list of strings to recognize as True |
thousands |
CSV: specifies the thousands separator. If not None, this character will be stripped from numeric
dtypes. However, if it is the first character in a field, that column will be imported as a string. In the PythonParser,
if not None, then parser will try to look for it in the output and parse relevant data to numeric dtypes. Because it
has to essentially scan through the data again, this causes a significant performance hit so only use if necessary. |
pandas.DataFrame.to_csv() |
CSV: DataFrame.to_csv(path_or_buf=None, sep=',', na_rep='', float_format=None, columns=None, header=True, index=True, index_label=None, mode='w', encoding=None, compression='infer', quoting=None, quotechar='"', line_terminator=None, chunksize=None, date_format=None, doublequote=True, escapechar=None, decimal='.', errors='strict', storage_options=None). Write the contents of the Frame into a CSV file: code. |
.T (Transfer of array in Python) |
Introduction |
tupleize_cols |
CSV: boolean, default False, if False, convert a list of tuples to a multi-index of columns, otherwise, leave the column index as a list of tuples |
tupleize_cols |
CSV: If False (default), write as a list of tuples, otherwise write in an expanded line format
suitable for read_csv |
Series.to_csv() |
CSV: Is a 1-D ndarray with axis labels and writes the given series object to a comma-separated values (csv) file/format. code. |
train_test_split |
(code) |
transform() |
(code) |
Open tast manager |
(code) |
.tripleClick() |
.tripleClick(x=moveToX, y=moveToY) (Code) |
.typewrite() |
E.g. .typewrite('Hello world!\n', interval=secs_between_keys); .typewrite(['a', 'b', 'c', 'left', 'backspace', 'enter', 'f1'], interval=secs_between_keys).
(Code) |
Tuples |
Introduction, and data structures. Are very similar to lists. A tuple contains elements which can be treated individually or as a group. The difference from lists is that tuples are immutable, meaning that after they’re defined, you
code can’t change anything about them. E.g. can neither set value nor sort tuples. A tuple may also contain heterogeneous elements (e.g. a string and an integer): Example code. Declaration: tup = tuple(); tup = (); tup = (2, 5, 10); tup = (2004, "Python", 3) and tup = (8,). Tuples are useful in operations like swapping etc.: swap two numbers, Example code2. |
threading.Thread() |
Convenience class for creating stoppable threads. The Thread() accepts many parameters. The main ones are: target: specifies a function (fn) to run in the new thread. args: specifies the arguments of the function (fn). The args argument is a tuple. Introduction. |
Thread(target=fn,args=args_tuple) |
ternary |
The ternary operator performs the same task as the if-else construct.
Syntax:
<Output variable> = <The result when the condition is true>
if <condition> else <The result when the condition is not
true>
code |
textwrap.fill |
code. |
tkinter |
tkinter popup windows |
Introduction |
import tkinter as tk |
code |
import tkinter.messagebox |
Import messagebox from tkinter module. code. |
from tkinter.filedialog import askopenfilename |
code. code. |
.Label() |
(code) |
.iconbitmap() |
(code) |
.destroy() |
(code) |
.config() |
(code) |
justify='center', justify='right', justify='left' |
(code) |
global |
(code) |
PhotoImage() |
(code) |
Frame() |
(code) |
pady= |
(code) |
borderwidth= |
(code) |
Toplevel() |
(code) |
fill=tk.X |
(code) |
padx= |
(code) |
ipadx= |
(code) |
FLAT, RAISED, SUNKEN, GROOVE and RIDGE in Tkinter button relief styles |
Introduction |
Widget in Tkinter |
Introduction |
entry.delete(0, tk.END) |
Use the special constant tk.END for the second argument of .delete() to remove all text in an Entry |
relwidth |
The relative width of the background. (code) |
|
try |
This block lets you test a block of code for errors. Introduction. code. |
shapes.title |
(code) |
.text_frame() |
(code) |
__truediv__ |
|
__trunc__ |
|
timeout |
Blocking timeout for reading events. |
timeout |
Event queue block timeout. |
threading.Thread() |
Convenience class for creating stoppable threads. The Thread() accepts many parameters. The main ones are: target: specifies a function (fn) to run in the new thread. args: specifies the arguments of the function (fn). The args argument is a tuple. Introduction. |
Thread(target=fn,args=args_tuple) |
Text (txt) files in Python (Two types of files can be handled in python, normal text (.txt) files and binary files) |
.read() |
.read([number of characters = optional]). Read the entire .txt file in Python. read([n]): Returns the read bytes in form of a string. Reads n bytes, if no n specified, reads the entire file. Introduction. .txt to read the entire file. .txt to read a specific number of characters. code. code |
.readline() |
Read the first line and the first lines in a .txt file in Python. Introduction. txt. |
.readlines() |
Read all the lines in a .txt file in Python. txt. |
Sort txt files |
Introduction |
import fileinput |
(code) |
rstrip() |
(code) |
os.path.splitext() |
Introduction. |
replace() |
(code) (code) |
Remove lines |
Remove all the lines before the starting text. Introduction. |
Replace contents/letter |
Replace contents and change letter cases in text files. Introduction |
Insert/add text or line |
Insert text or new text lines to a specific position, at the end of a line, in a file. Introduction |
Codes |
Details |
Count the number of lines (rows) and columns in a txt (and a csv) file, count different numbers in each region in a column, count missing or not available values |
CSV: Introduction. code. |
'r'
|
Introduction. Read Only: Open text file for reading. The handle is positioned at the beginning of the file. code |
'r+' |
Introduction. Read and Write: Open the file for reading and writing. The handle is positioned at the beginning of the file. code |
'w' |
Introduction. Write Only: Open the file for writing. For existing file, the data is truncated and over-written. |
'w+' |
Introduction. Write and Read: Open the file for reading and writing. For existing file, data is truncated and over-written. |
'a' |
Introduction. Append Only () : Open the file for writing. The file is created if it does not exist. The handle is positioned at the end of the file. The data being written will be inserted at the end, after the existing data. |
'a+' |
Introduction. Open the file in append & read mode, e.g. append and Read: Open the file for reading and writing. The file is created if it does not exist. The handle is positioned at the end of the file. The data being written will be inserted at the end, after the existing data. (code) |
|
math.tan(x) |
Returns the tangent of x radians. |
math.tau() |
Returns the mathematical constant tau (6.283185 . . .). |
title |
code. code. code. |
to_bytes |
|
text |
code. code. code. |
mss.tools.to_png |
(code) |
datetime.time |
An idealized time, independent of any particular day, assuming that every day has exactly 24*60*60 seconds. (code) |
datetime.timedelta |
A duration expressing the difference between two date, time, or datetime instances to microsecond resolution. (code) |
datetime.tzinfo |
An abstract base class for time zone information objects. (code) |
datetime.timezone |
A class that implements the tzinfo abstract base class as a fixed offset from the UTC. (code) |
.date.today() |
Get current date: code (in different formats) and code. (code) |
time.time() |
Introduction. code |
title() |
Make the first letter in each word upper case. code. code. |
scipy.linalg.toeplitz |
Create a Toeplitz matrix. |
tensordot(a, b[, axes]) |
Compute tensor dot product along specified axes. |
trace(a[, offset, axis1, axis2, dtype, out]) |
Return the sum along diagonals of the array. |
linalg.tensorsolve(a, b[, axes]) |
Solve the tensor equation a x = b for x. |
linalg.tensorinv(a[, ind]) |
Compute the ‘inverse’ of an N-dimensional array. |
__closure__/tuple |
name/type: the function closure, i.e. bindings for free variables (often is None) |
__defaults__/tuple |
name/type: default values for the formal parameters |
Text I/O |
f = open("myfile.txt", "r", encoding="utf-8"), f = io.StringIO("some initial text data"). |
Python Twisted |
Is an event-driven networking engine, Twisted is written in Python, and licensed under the open-source MIT license. |
cv2.TM_SQDIFF() |
![method=CV_TM_SQDIFF](images/4853a.png) |
cv2.TM_SQDIFF_NORMED |
![method=CV_TM_SQDIFF_NORMED](images/4853b.png) |
cv2.TM_CCORR |
![method=CV_TM_CCORR](images/4853c.png) |
cv2.TM_CCORR_NORMED |
![method=CV_TM_CCORR_NORMED](images/4853d.png) |
cv2.TM_CCOEFF_NORMED() |
![method=CV_TM_CCOEFF_NORMED](images/4853f.png)
The third parameter here is the method used for matching. code, code. code. |
cv2.TM_CCOEFF |
![method=CV_TM_CCOEFF](images/4853e.png) |
cv2.THRESH_BINARY |
If pixel intensity is greater than the set threshold, value set to 255, else set to 0 (black). code. code |
cv2.THRESH_BINARY_INV |
Inverted or Opposite case of cv2.THRESH_BINARY. code. code |
to_clipboard([excel, sep]) |
Attempt to write text representation of object to the system clipboard. This can be pasted into Excel, for example. |
to_dict(*args, **kwargs) |
Convert DataFrame to dictionary. |
to_html([buf, columns, col_space, colSpace, ...]) |
Render a DataFrame as an HTML (www, webpage) table. |
to_sql(name, con[, flavor, schema, ...]) |
Write records stored in a DataFrame to a SQL database. |
to_timestamp([freq, how, axis, copy]) |
Cast to DatetimeIndex of timestamps, at beginning of period |
to_records([index, convert_datetime64]) |
Convert DataFrame to record array. |
to_string([buf, columns, col_space, ...]) |
Render a DataFrame to a console-friendly tabular output. |
to_dense() |
Return dense representation of NDFrame (as opposed to sparse) |
to_excel(excel_writer[, sheet_name, na_rep, ...]) |
Write DataFrame to a excel sheet |
to_gbq(destination_table[, project_id, ...]) |
Write a DataFrame to a Google BigQuery table. |
to_hdf(path_or_buf, key, **kwargs) |
activate the HDFStore |
to_json([path_or_buf, orient, date_format, ...]) |
Convert the object to a JSON string. |
to_latex([buf, columns, col_space, ...]) |
Render a DataFrame to a tabular environment table. |
to_msgpack([path_or_buf]) msgpack (serialize) |
object to input file path |
to_panel() |
Transform long (stacked) format (DataFrame) into wide (3D, Panel) format. |
to_period([freq, axis, copy]) |
Convert DataFrame from DatetimeIndex to PeriodIndex with desired |
to_pickle(path) |
Pickle (serialize) object to input file path |
to_sparse([fill_value, kind]) |
Convert to SparseDataFrame |
to_stata(fname[, convert_dates, ...]) |
A class for writing Stata binary dta files from array-like objects |
title |
Plot title as string |
numpy.transpose() |
Reverse or permute the axes of an array; returns the modified array. For an array a with two axes, transpose(a) gives the matrix transpose of swapping. code. |
.title() |
(code) |
.text() |
Introduction |
Merge two csv files |
CSV: Introduction |
Theano |
Introduction |
top and left for locateOnScreen() |
Introduction |
|
t.shape() |
“classic”, “arrow”, “turtle”, “circle”, “square” and “triangle”. (code) |
t.speed() |
Is used to change the speed of the turtle by the value of the argument that it takes. E.g. .speed(speed=None). The turtle’s speed lies in the range 0-10. If input is a number greater than 10 or smaller than 0.5, speed is set to 0. ‘fastest’ : 0;
‘fast’ : 10;
‘normal’ : 6;
‘slow’ : 3;
‘slowest’ : 1. (code) |
t.Screen() |
Is used to set the size and position of the main window. (code) |
t.getscreen() |
Return the TurtleScreen object the turtle is drawing on. (code) |
t.getcanvas() |
Return the Canvas of this TurtleScreen. (code) |
winfo_height() |
Contain the dimensions of the current turtle graphics window. (code) |
t.screensize() |
turtle.screensize(canvwidth=None, canvheight=None, bg=None). If there is no parameter, then it is getting the actual screen size. (code) |
.right() |
(code) |
random.choice() |
Randomly select from options. (code) |
randint(start, end) |
randint() is an inbuilt function of the random module in Python3. (code) |
t.penup()/t.pu()/t.up() |
Pull the pen up – no drawing when moving. (code) |
t.pendown()/t.pd()/t.down() |
Pull the pen down – drawing when moving. (code) |
t.circle() |
turtle.circle(radius, extent=None, steps=None).
radius – a number; extent – a number (or None); steps – an integer (or None). (code) |
.color() |
(code) |
Collections of geometric shape |
(code) |
.goto() |
.goto(x, y=None) x – a number or a pair/vector of numbers; y – a number or None. (code) |
.getcanvas().postscript(file="") |
Picture saved in current working directory. (code) |
.forward() |
(code) |
.fillcolor() |
“fillcolor”: color-string or color-tuple. (code) |
.backward() |
(code) |
t.begin_fill() |
To be called just before drawing a shape to be filled. (code) |
t.end_fill() |
turtle.end_fill().
Fill the shape drawn after the last call to begin_fill(). (code) |
.left() |
(code) |
t.hideturtle()/t.ht() |
Make the turtle invisible while you’re in the middle of doing some complex drawing, because hiding the turtle speeds up the drawing observably. (code) |
|
hotkey('t') |
Introduction |
hotkey('tab') |
Introduction |
.getAllTitles() |
Get all the Python program windows, *IDLE Shell window, e.g. *IDLE Shell 3.9.5, the most front window on Dreamweaver, the most front webpage on each Chrome window, the name of each opened applications, e.g. DigitalMicrograph. Introduction |
.getWindowsWithTitle() |
Introduction |
.topleft |
(code) |
.activate() |
Activate a window: with the active cursor in the window and the window is brought to the most front on the monitor. (code) |
.GetWindowText() |
(code) |
highlightthickness= |
(code) |
textvariable= |
(code) |
.tags= |
(code) |
.top/.bottom/.left/.right |
Introduction |
feature_extraction.text |
(code) |
TfidfVectorizer() |
(code) |
.get_feature_names_out() |
(code) |
.toarray() |
(code) |
TfidfTransformer |
(code). |
.query() |
(code). |
|
(code). |
skipgram model (for training) |
(code) |
CBW model (for training) |
(code) |
text_color= |
(code). |
.terminate() |
(code). |
driver.navigate().to(“http://globalsino.com”)
|
Navigate to URL |
.DataFrame() |
Introduction. .drop(),
index,
columns,
axes,
dtypes,
size,
shape,
ndim,
empty,
T (swap between column and row),
values |
.set_xticks() |
(code) |
.set_xticklabels() |
(code) |
|
|
|
|