Docker FIle
FROM |
Create a new build stage from a base image. |
RUN |
Execute build commands. |
COPY |
Copy files and directories. |
COPY |
Specify default commands. |
MySQL
SELECT |
Extracts data from database |
UPDATE |
Updates data in a database |
DELETE |
deletes data from a database |
INSERT INTO |
inserts new data into a database |
CREATE DATABASE |
Creates a new database |
ALTER DATABASE |
Modifies a database |
CREATE TABLE |
Creates a new Table |
*DROP TABLE |
Deletes a table |
CREATE INDEX |
Creates a search key |
DROP INDEX |
Deletes search key |
ORDER BY |
List by a certain column, DESC or ASC, etc. |
DISTINCT |
Filter only unique inputs |
WHERE |
Filter function (SELECT * FROM Customers WHERE Country='Mexico') |
|
|
HTTP
GET |
Fetch the resource from web |
PUT |
Update the resource |
POST |
Create a resource to send to web |
DELETE |
Delete resource from web |
|
|
Memory Resources
Caching Heiarchy |
CPU Registers, L1, L2, L3, RAM, SSD/HDD, Cloud |
FIFO |
First In First Out, Evict Oldest Entry |
LRU |
Least Recently Used, Evict the entry that has been used longest ago. Move hits to front |
Transposing |
Column by Column, faster than row by row for long arrays. |
FS(File System) |
Caches data in the RAM. Uses memory and avoids storage reads. |
Stale Data |
Old files are deleted from the cache. SSD is large, so freshness more important than space there. |
PyArrow |
Cache Friendly table layout. Saves time when handling large datasets by turning each value into Pyarrow Types. |
|
|
Compute Resources
Locks |
Making a code execute on only one thread. Avoids discrepancies from other threads changing vals. |
Threading.lock() |
class threading.Lock The class implementing primitive lock objects. Once a thread has acquired a lock, subsequent attempts to acquire it block, until it is released; any thread may release it. Changed in version 3.13: Lock is now a class. In earlier Pythons, Lock was a factory function which returned an instance of the underlying private lock type. |
lock.acquire() |
Acquire a lock, blocking or non-blocking. Locks code under lock to one thread. |
lock.release() |
Release a lock. This can be called from any thread, not only the thread which has acquired the lock. |
GIL |
Global Interpreter Lock. |
|