diff --git a/README.md b/README.md
index 950bb89..f23927f 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
[](https://twitter.com/FechinLi)
-Reference is a collection of cheatsheets contributed by open source angels. It shares a quick reference cheat sheet for developers in a nice layout. \[ [中文版](https://github.com/jaywcjlove/reference) | ... \]
+Reference is a collection of cheat sheets contributed by open source angels. It shares a quick reference cheat sheet for developers in a nice layout. \[ [中文版](https://github.com/jaywcjlove/reference) | ... \]
We encourage you to share your own cheat sheets with the community and make Reference even better. If you notice a cheat sheet that could be improved, feel free to submit a [pull request](#-contributing).
@@ -14,9 +14,9 @@ We encourage you to share your own cheat sheets with the community and make Refe
## 👀 Live Demonstration
-You can view the cheat sheets live at https://quickref.me
+You can view the cheat sheets live at [https://reference-ashy.vercel.app](https://reference-ashy.vercel.app/)
-[](https://quickref.me/)
+[](https://reference-ashy.vercel.app)
## 📚 Cheat Sheets List
@@ -28,7 +28,7 @@ Reference provides cheat sheets for the following:
Programming
- [Kubernetes](https://quickref.me/kubernetes.html): This page contains a list of commonly used kubectl commands and flags.
-- [ES6](https://quickref.me/es6.html): A quick reference cheatsheet of what's new in JavaScript for ES2015, ES2016, ES2017, ES2018 and beyond
+- [ES6](https://quickref.me/es6.html): A quick reference cheat sheet of what's new in JavaScript for ES2015, ES2016, ES2017, ES2018 and beyond
- [MATLAB](https://quickref.me/matlab.html): This quick reference cheat sheet provides an example introduction to using the [MATLAB](https://mathworks.cn/) scientific computing language to get started quickly
- [C](https://quickref.me/c.html): C quick reference cheat sheet that provides basic syntax and methods.
- [INI](https://quickref.me/ini.html): This is a quick reference cheat sheet for understanding and writing INI-format configuration files.
@@ -85,7 +85,7 @@ This reference was made for Emacs 27.
- [Netstat](https://quickref.me/netstat.html): This quick reference cheat sheet provides various for using netstat command.
- [Screen](https://quickref.me/screen.html): This is a quick reference guide cheat sheet for the screen command.
- [Awk](https://quickref.me/awk.html): This is a one page quick reference cheat sheet to the [GNU awk](https://www.gnu.org/software/gawk/manual/gawk.html), which covers commonly used awk expressions and commands.
-- [Find](https://quickref.me/find.html): This is a quick reference list of cheatsheet for linux find command, contains common options and examples.
+- [Find](https://quickref.me/find.html): This is a quick reference list of cheat sheet for linux find command, contains common options and examples.
- [Sed](https://quickref.me/sed.html): [Sed](https://www.gnu.org/software/sed/manual/sed.html) is a stream editor, this sed cheat sheet contains sed commands and some common sed tricks.
- [Cron](https://quickref.me/cron.html): [Cron](https://en.wikipedia.org/wiki/Cron) is most suitable for scheduling repetitive tasks. Scheduling one-time tasks can be accomplished using the associated at utility.
- [Git](https://quickref.me/git.html): This cheat sheet summarizes commonly used Git command line instructions for quick reference.
@@ -197,9 +197,9 @@ This reference was made for Emacs 27.
Other
- [Google Search](https://quickref.me/google-search.html): This quick reference cheat sheet lists of Google advanced search operators.
-- [ASCII Code](https://quickref.me/ascii-code.html): This cheatsheet is a complete list of ASCII Code Table with their numbers and names.
+- [ASCII Code](https://quickref.me/ascii-code.html): This cheat sheet is a complete list of ASCII Code Table with their numbers and names.
- [Aspect Ratio](https://quickref.me/aspect-ratio.html): This cheat sheet lists some common aspect ratios and their pixel resolutions. Always confirm your final delivery ratio when shooting.
-- [HTML Characters Entities](https://quickref.me/html-char.html): This cheatsheet is a complete list of HTML entities with their numbers and names. Also included is a full list of ASCII characters that can be represented in HTML.
+- [HTML Characters Entities](https://quickref.me/html-char.html): This cheat sheet is a complete list of HTML entities with their numbers and names. Also included is a full list of ASCII characters that can be represented in HTML.
- [ISO 639-1 Language Code](https://quickref.me/iso-639-1.html): This is a list of the ISO language codes that conform to the ISO 639-1 standard, it provide reference for multi-language website.
- [Resolutions](https://quickref.me/resolutions.html): This cheat sheet lists screen sizes, viewport size and CSS media queries for popular Phones, Tablets, Laptops and Watches
- [HTTP Status Code](https://quickref.me/http-status-code.html): The http status codes cheat sheet. a quick reference to every HTTP status code.
@@ -215,7 +215,7 @@ This reference was made for Emacs 27.
```
.
├── source
-│ ├── _posts # Cheatsheet source files
+│ ├── _posts # Cheat sheet source files
│ │ ├── awk.md
│ │ ├── vim.md # => https://quickref.me/vim
│ │ ├── php.md
@@ -240,7 +240,7 @@ This reference was made for Emacs 27.
We would like to extend our gratitude to you for considering a contribution to Reference. Your support is what makes CheatSheets.zip a truly amazing resource. Please feel free to [submit issues](https://github.com/Fechin/reference/issues/new?assignee=Fechin) and enhancement requests.
-For consistency, we encourage you to refer to the [https://quickref.me/quickref](https://quickref.me/quickref) when creating or editing cheatsheets. To get started with development, follow these steps:
+For consistency, we encourage you to refer to the [https://quickref.me/quickref](https://quickref.me/quickref) when creating or editing cheat sheets. To get started with development, follow these steps:
1. Clone Github repo `git clone https://github.com/Fechin/reference.git`
2. Install `npm` package manager (Read [installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm))
@@ -262,7 +262,7 @@ background: bg-emerald-600
tags:
categories:
- Other
- intro: This is a reference of styles that you can use on quickref cheatsheets!
+ intro: This is a reference of styles that you can use on quickref cheat sheets!
---
```
Only the `title` and `intro` fields are required, and the other options can be left blank.
diff --git a/source/_posts/1password.md b/source/_posts/1password.md
index 77f3ba9..a5cfce3 100644
--- a/source/_posts/1password.md
+++ b/source/_posts/1password.md
@@ -77,7 +77,7 @@ intro: |
| `Shortcut ` | Action |
|-----------------------------|-------------------------------------------------------------------------------------------|
-| `Shift` `cmd` `X ` | Open or close the 1Password pop` `up in Chrome, Edge, Brave, or Safari. |
+| `Shift` `cmd` `X ` | Open or close the 1Password pop-up in Chrome, Edge, Brave, or Safari. |
| `cmd` `.` | Open or close the 1Password pop-up in Firefox. |
| `cmd` `F ` | Search for items. |
| `Esc ` | Clear the search field. |
@@ -100,7 +100,7 @@ intro: |
| `cmd` `G ` | Show the password generator. |
| `cmd` `C ` | Copy a password from the password generator. |
| `Shift` `cmd` `L ` | Lock 1Password. |
-| `Esc ` | Close the 1Password pop` `up. |
+| `Esc ` | Close the 1Password pop-up. |
{.shortcuts}
@@ -234,7 +234,7 @@ intro: |
| `Shortcut ` | Action |
|---------------------------------------|-------------------------------------------------------------------------------------------|
-| `Ctrl` `Shift` `X ` | Open or close the 1Password pop` `up in Chrome, Edge, or Brave. |
+| `Ctrl` `Shift` `X ` | Open or close the 1Password pop-up in Chrome, Edge, or Brave. |
| `Ctrl` `.` | Open or close the 1Password pop-up in Firefox. |
| `Ctrl` `F ` | Search for items. |
| `Esc ` | Clear the search field. |
@@ -257,7 +257,7 @@ intro: |
| `Ctrl` `G ` | Show the password generator. |
| `Ctrl` `C ` | Copy a password from the password generator. |
| `Ctrl` `Shift` `L ` | Lock 1Password. |
-| `Esc ` | Close the 1Password pop` `up. |
+| `Esc ` | Close the 1Password pop-up. |
{.shortcuts}
@@ -343,7 +343,7 @@ intro: |
| `Shortcut ` | Action |
|--------------------------------|-------------------------------------------------------------------------------------------|
-| `Ctrl` `Shift` `X ` | Open or close the 1Password pop` `up in Chrome, Edge, or Brave. |
+| `Ctrl` `Shift` `X ` | Open or close the 1Password pop-up in Chrome, Edge, or Brave. |
| `Ctrl` `.` | Open or close the 1Password pop-up in Firefox. |
| `Ctrl` `F ` | Search for items. |
| `Esc ` | Clear the search field. |
@@ -366,7 +366,7 @@ intro: |
| `Ctrl` `G ` | Show the password generator. |
| `Ctrl` `C ` | Copy a password from the password generator. |
| `Ctrl` `Shift` `L ` | Lock 1Password. |
-| `Esc ` | Close the 1Password pop` `up. |
+| `Esc ` | Close the 1Password pop-up. |
{.shortcuts}
diff --git a/source/_posts/adobe-lightroom.md b/source/_posts/adobe-lightroom.md
index f9fcfc4..05406f5 100644
--- a/source/_posts/adobe-lightroom.md
+++ b/source/_posts/adobe-lightroom.md
@@ -97,7 +97,7 @@ Shortcut | Action
`Ctrl` `Alt` `Shift` `M` | Match total exposures
`W` | Select White Balance tool (from any module)
`R` | Select the Crop tool (from any module)
-`A` | Contrain aspect ratio when Crop tool is selected
+`A` | Constrain aspect ratio when Crop tool is selected
`Shift` `A` | Crop to same aspect ratio as previous crop
`Alt` `(drag)` | Crop from center of photo
`O` | Cycle Crop grid overlay
@@ -105,7 +105,7 @@ Shortcut | Action
`X` | Switch crop between portrait and landscape orientation
`Ctrl` `Alt` `R` | Reset crop
`Shift` `T` | Select the Guided Upright tool
-`Q` | Select the Sopt Removal tool
+`Q` | Select the Spot Removal tool
`Shift` `T` | Toggle Brush between Clone and Heal modes when Spot Removal tool is selected
`K` | Select the Adjustment Brush tool (from any module)
`M` | Select the Graduated Filter tool
@@ -119,7 +119,7 @@ Shortcut | Action
`O` | Show/hide local adjustment mask overlay
`Shift` `O` | Cycle local adjustment mask overlay colors
`Ctrl` `Alt` `Shift` `T` | Select Targeted Adjustment tool to apply a Tone Curve adjustment
-`Ctrl` `Alt` `Shift` `H` | Select Targeted Adjustment tool to applay a Hue adjustment
+`Ctrl` `Alt` `Shift` `H` | Select Targeted Adjustment tool to apply a Hue adjustment
`Ctrl` `Alt` `Shift` `S` | Select Targeted Adjustment tool to apply a Saturation adjustment
`Ctrl` `Alt` `Shift` `L` | Select Targeted Adjustment tool to apply a Luminance adjustment
`Ctrl` `Alt` `Shift` `G` | Select Targeted Adjustment tool to apply a Grayscale Mix adjustment
@@ -154,7 +154,7 @@ Shortcut | Action
`Shift` `L` | Cycle backward through Lights Out modes
`Ctrl` `Shift` `L` | Toggle Lights Dim mode
`F` | Cycle screen modes
-`Ctrl` `Shift` `F` | Switich between Normal and full-screen, hide panels
+`Ctrl` `Shift` `F` | Switch between Normal and full-screen, hide panels
`Ctrl` `Alt` `F` | Go to Normal screen mode
`I` | Cycle info overlay
`Ctrl` `I` | Show/hide info overlay
@@ -210,7 +210,7 @@ Shortcut | Action
`Ctrl` `Enter` | Play impromptu slide show
`Ctrl` `]` | Rotate photo right (clockwise)
`Ctrl` `[` | Rotate photo left (counterclockwise)
-`=/-` | Increase/decreate Grid thumbnail size
+`=/-` | Increase/decrease Grid thumbnail size
`PgUp/PgDown` | Scroll up/down Grid thumbnails
`Ctrl` `Shift` `H` | Toggle cell extras
`Ctrl` `Alt` `Shift` `H` | Show/hide badges
@@ -289,7 +289,7 @@ Shortcut | Action
`Ctrl` `Alt` `K` | Enable painting
`Alt` `1-9` | Add a keyword from a keyword set to selected photo
`Alt` `0` | Cycle forward through keyword sets
-`Alt` `Shift` `0` | Cycle backword through keyword sets
+`Alt` `Shift` `0` | Cycle backward through keyword sets
`Ctrl` `Alt` `Shift` `C/V` | Copy/paste metadata
`Ctrl` `S` | Save metadata to file
{.shortcuts}
diff --git a/source/_posts/ai.md b/source/_posts/ai.md
index 7c0057c..99fe531 100644
--- a/source/_posts/ai.md
+++ b/source/_posts/ai.md
@@ -949,6 +949,7 @@ Getting Started
### Education assistant
+- [ Brain Buddy](https://brain-buddy.com/)
- [ Kobra](https://kobra.dev)
- [ Boldvoice](https://boldvoice.com)
- [ Prepai](https://prepai.in/us)
diff --git a/source/_posts/alan-ai.md b/source/_posts/alan-ai.md
index f179e39..b8740a9 100644
--- a/source/_posts/alan-ai.md
+++ b/source/_posts/alan-ai.md
@@ -9,21 +9,30 @@ tags:
- Tips
categories:
- Toolkit
-intro: This cheat covers all major script concepts, client API methods, handlers and other tools to create a multimodal conversational experience with Alan AI
+intro: This cheat sheet covers all major script concepts, client API methods, handlers and other tools to create a multimodal conversational experience with Alan AI
---
+### Legend
+
+- ``pattern`` — phrase to invoke a voice/text command or a response to be played
+- ``value`` — specified value
+- ``params`` — passed parameters
+- ``action`` — action to be performed
+- ``output`` — data outcome
+- ``[...]`` — optional data or parameters
+
Dialog script
-------------
### Intents & patterns
-Define a voice command to play a response
+Define a voice/text command to play a response
``` {.wrap}
intent('pattern'[, 'patternN'], reply('pattern'))
```
-Define a voice command to play a response or perform an action
+Define a voice/text command to play a response or perform an action
``` {.wrap}
intent('pattern'[, 'patternN'], p => { action })
```
@@ -384,7 +393,7 @@ Send information about the visual state from the client app to the dialog script
setVisualState(visualStateData:object)
```
-Send data or perform actions without a voice command
+Send data or perform actions without a voice/text command
``` {.wrap}
projectAPI.method = function(p, param, callback) {
@@ -495,4 +504,4 @@ Also see
em { font-size: 0.785em; }
strong {font-weight: 400;}
ul.collapsible > li > pre { padding-left: 0; padding-right: 0; font-size: 0.925em;}
-
\ No newline at end of file
+
diff --git a/source/_posts/awk.md b/source/_posts/awk.md
index 2c4f6d1..f2d837b 100644
--- a/source/_posts/awk.md
+++ b/source/_posts/awk.md
@@ -171,14 +171,14 @@ Awk Variables
|---------------------|------------------------------------|
| `$1 == "root"` | First field equals root |
| `{print $(NF-1)}` | Second last field |
-| `NR!=1{print $0}` | From 2th record |
+| `NR!=1{print $0}` | From 2nd record |
| `NR > 3` | From 4th record |
| `NR == 1` | First record |
| `END{print NR}` | Total records |
| `BEGIN{print OFMT}` | Output format |
| `{print NR, $0}` | Line number |
| `{print NR " " $0}` | Line number (tab) |
-| `{$1 = NR; print}` | Replace 1th field with line number |
+| `{$1 = NR; print}` | Replace 1st field with line number |
| `$NF > 4` | Last field > 4 |
| `NR % 2 == 0` | Even records |
| `NR==10, NR==20` | Records 10 to 20 |
diff --git a/source/_posts/chatgpt.md b/source/_posts/chatgpt.md
index 4f49155..b233f63 100644
--- a/source/_posts/chatgpt.md
+++ b/source/_posts/chatgpt.md
@@ -88,7 +88,7 @@ Getting Started
Write a program that calculates the factorial of a given number in python?
```
``` {.wrap}
- How do I make an HTTP request in Javascript?
+ How do I make an HTTP request in JavaScript?
```
- **Generate regular expressions (regex)**
``` {.wrap}
@@ -465,7 +465,7 @@ Getting Started
```
``` {.wrap}
- How do I make an HTTP request in Javascript?
+ How do I make an HTTP request in JavaScript?
```
``` {.wrap}
diff --git a/source/_posts/cpp.md b/source/_posts/cpp.md
index e70459b..c5d73b8 100644
--- a/source/_posts/cpp.md
+++ b/source/_posts/cpp.md
@@ -213,7 +213,7 @@ std::array marks = {92, 97, 98, 99, 98, 94};
// Print first element
std::cout << marks[0];
-// Change 2th element to 99
+// Change 2nd element to 99
marks[1] = 99;
// Take input from the user
diff --git a/source/_posts/git.md b/source/_posts/git.md
index c8e8ad7..7af12a0 100644
--- a/source/_posts/git.md
+++ b/source/_posts/git.md
@@ -52,12 +52,12 @@ Stage all changed files, ready for commit
$ git add .
```
-Commit all staged files to versioned history
+Commit all staged files to version history
``` shell script
$ git commit -m "commit message"
```
-Commit all your tracked files to versioned history
+Commit all your tracked files to version history
``` shell script
$ git commit -am "commit message"
```
@@ -65,12 +65,12 @@ Discard changes in working directory which is not staged
``` shell script
$ git restore [file]
```
-Unstage a stagged file or file which is staged
+Unstage a staged file or file which is staged
``` shell script
$ git restore --staged [file]
```
-Unstages file, keeping the file changes
+Unstage a file, keeping the file changes
``` shell script
$ git reset [file]
```
@@ -85,7 +85,7 @@ Diff of what is changed but not staged
$ git diff
```
-Diff of what is staged but not yet commited
+Diff of what is staged but not yet committed
``` shell script
$ git diff --staged
```
diff --git a/source/_posts/homebrew.md b/source/_posts/homebrew.md
new file mode 100644
index 0000000..8b8dfa5
--- /dev/null
+++ b/source/_posts/homebrew.md
@@ -0,0 +1,176 @@
+---
+title: Homebrew
+date: 2023-04-12
+background: bg-[#fbb041]
+tags:
+ - packages manager
+ - macos
+categories:
+ - Toolkit
+intro: This is a quick reference cheat sheet to getting started with homebrew.
+plugins:
+ - copyCode
+---
+
+## Getting Started
+
+### Install
+
+If not installed, install Command Line Tools (CLT)
+
+```
+xcode-select --install
+```
+
+Install Homebrew :
+
+```
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+```
+
+### Commands
+
+| | |
+|----------------------------------|----------------------------------------|
+| ``` brew install git ``` | Install a package |
+| ``` brew uninstall git ``` | Uninstall a package |
+| ``` brew upgrade git ``` | Upgrade package |
+| ``` brew unlink git ``` | Unlink |
+| ``` brew link git ``` | Link |
+| ``` brew switch git 1.0.0 ``` | Switch package version |
+| ``` brew list --versions git ``` | List the installed versions of package |
+
+
+### Help
+
+Display the version of Homebrew.
+````
+brew --version
+````
+Print Help Information
+````
+brew help
+````
+Print Help Info for a brew command
+````
+brew help
+````
+Check system for potential problems.
+````
+brew doctor
+````
+
+### Updates
+
+Fetch latest version of homebrew and formula
+```
+brew update
+```
+Show formulae with an updated version available
+```
+brew outdated
+```
+Upgrade all outdated and unpinned brews
+```
+brew upgrade
+```
+Upgrade only the specified brew
+```
+brew upgrade
+```
+Prevent the specified formulae from being upgraded
+```
+brew pin
+```
+Allow the specified formulae to be upgraded.
+```
+brew unpin
+```
+
+### Repositories
+
+List all the current tapped repositories (taps)
+```
+brew tap
+```
+Tap a formula repository from Github using https for tap https://github.com/user/homebrew-repo
+```
+brew tap
+```
+Tap a formula repository from the specified URL
+```
+brew tap
+```
+Remove the given tap from the repository
+```
+brew untap
+```
+
+### Cask
+
+Tap the Cask repository from Github.
+```
+brew tap homebrew/cask
+```
+List all the installed casks .
+```
+brew cask list
+```
+Search all known casks based on the substring text.
+```
+brew search
+```
+Install the given cask.
+```
+brew cask install
+```
+Reinstalls the given Cask
+```
+brew cask reinstall
+```
+Uninstall the given cask.
+```
+brew cask uninstall
+```
+
+### Search, Install, Remove
+
+List all the installed formulae.
+```
+brew list
+```
+Display all locally available formulae for brewing.
+```
+brew search
+```
+Perform a substring search of formulae names for brewing.
+```
+brew search
+```
+Display information about the formula.
+```
+brew info
+```
+Install the formula.
+```
+brew install
+```
+Uninstall the formula.
+```
+brew uninstall
+```
+
+### Cleanup
+
+Remove older versions of installed formulae.
+```
+brew cleanup
+```
+Remove older versions of specified formula.
+```
+brew cleanup
+```
+Display all formula that will be removed (dry run)
+```
+brew cleanup -n
+```
diff --git a/source/_posts/javascript.md b/source/_posts/javascript.md
index 77857ee..9c951db 100644
--- a/source/_posts/javascript.md
+++ b/source/_posts/javascript.md
@@ -589,6 +589,92 @@ numbers.concat(newFirstNumber)
if you want to avoid mutating your original array, you can use concat.
+JavaScipt Set
+------------
+
+### Create Set
+
+```javascript
+// Empty Set Object
+const emptySet = new Set()
+
+// Set Object with values
+const setObj = new Set([1, true, "hi"])
+```
+
+
+### Add
+
+```javascript
+const emptySet = new Set()
+
+// add values
+emptySet.add('a') // 'a'
+emptySet.add(1) // 'a', 1
+emptySet.add(true) // 'a', 1, true
+emptySet.add('a') // 'a', 1, true
+```
+
+
+### Delete
+
+```javascript
+const emptySet = new Set([1, true, 'a'])
+
+// delete values
+emptySet.delete('a') // 1, true
+emptySet.delete(true) // 1
+emptySet.delete(1) //
+```
+
+
+### Has
+
+```javascript
+const setObj = new Set([1, true, 'a'])
+
+// returns true or false
+setObj.has('a') // true
+setObj.has(1) // true
+setObj.has(false) // false
+```
+
+
+### Clear
+
+```javascript
+const setObj = new Set([1, true, 'a'])
+
+// clears the set
+console.log(setObj) // 1, true, 'a'
+setObj.clear() //
+```
+
+
+### Size
+
+```javascript
+const setObj = new Set([1, true, 'a'])
+
+consoloe.log(setObj.size) // 3
+```
+
+
+### ForEach
+
+```javascript
+const setObj = new Set([1, true, 'a'])
+
+setObj.forEach(function(value){
+ console.log(value)
+})
+
+// 1
+// true
+// 'a'
+```
+
+
JavaScript Loops
------------
diff --git a/source/_posts/mysql.md b/source/_posts/mysql.md
index 339009b..45c35ca 100644
--- a/source/_posts/mysql.md
+++ b/source/_posts/mysql.md
@@ -54,7 +54,7 @@ mysql -h -u -p [db_name]
| `TRUNCATE TABLE `t`;` | Remove all data in a table |
| `DROP TABLE `t`;` | Delete table |
-#### Proccess
+#### Process
| - | - |
|---------------------|----------------|
diff --git a/source/_posts/outlook.md b/source/_posts/outlook.md
index 317884e..1115077 100644
--- a/source/_posts/outlook.md
+++ b/source/_posts/outlook.md
@@ -57,7 +57,7 @@ Shortcut | Action
`Ctrl` `.` | Switch to next open message
`Ctrl` `,` | Switch to previous open message
`Ctrl` `Shift` `Tab` | Move between Folder/Outlook/Reading/To-Do
-`Ctrl` `Tab` | Move ar ound message header lines in the Folder pane
+`Ctrl` `Tab` | Move around message header lines in the Folder pane
`Arrows` | Move around within the Folder pane
`Ctrl` `Y` | Go to a different folder
`Ctrl` `E` | Go to the Search box
@@ -124,7 +124,7 @@ Shortcut | Action
`Ctrl` `Shift` `G` | Flag for follow-up
`Ctrl` `F` | Forward
`Alt` `S` | Send or post or invite all
-`F2` | Endable editing in a field, all views except Mail/Icon
+`F2` | Enable editing in a field, all views except Mail/Icon
`Ctrl` `L` | Left align text
`Ctrl` `E` | Center text
`Ctrl` `R` | Right align text
@@ -296,7 +296,7 @@ Shortcut | Action
Shortcut | Action
---|---
`Alt` `F, P` | Open the Print tab in Backstage view
-`Alt` `F, P, F` | Print an item fron an open window
+`Alt` `F, P, F` | Print an item from an open window
`Alt` `S` | Open the Page Setup dialog box from Print view
`Alt` `F, P, I` | Select a printer from Print view
`Alt` `F, P, R` | Open the Print Options dialog box
diff --git a/source/_posts/pytorch.md b/source/_posts/pytorch.md
new file mode 100644
index 0000000..fac0124
--- /dev/null
+++ b/source/_posts/pytorch.md
@@ -0,0 +1,223 @@
+---
+title: PyTorch
+date: 2023-04-12
+background: bg-[#ee4c2c]
+tags:
+ - AI
+ - Python
+categories:
+ - Other
+intro: This is a quick reference list of cheat sheets for PyTorch. See also [PyTorch website](https://pytorch.org/)
+---
+
+## Imports { .cols-1 }
+
+### General
+
+```
+import torch # root package
+from torch.utils.data import Dataset, DataLoader # dataset representation and loading
+```
+
+### Neural Network API
+
+```
+import torch.autograd as autograd # computation graph
+from torch import Tensor # tensor node in the computation graph
+import torch.nn as nn # neural networks
+import torch.nn.functional as F # layers, activations and more
+import torch.optim as optim # optimizers e.g. gradient descent, ADAM, etc.
+from torch.jit import script, trace # hybrid frontend decorator and tracing jit
+```
+
+### Torchscript and JIT
+
+```
+torch.jit.trace() # takes your module or function and an example
+ # data input, and traces the computational steps
+ # that the data encounters as it progresses through the model
+
+@script # decorator used to indicate data-dependent
+ # control flow within the code being traced
+```
+
+### ONNX
+
+```
+torch.onnx.export(model, dummy data, xxxx.proto) # exports an ONNX formatted
+ # model using a trained model, dummy
+ # data and the desired file name
+
+model = onnx.load("alexnet.proto") # load an ONNX model
+onnx.checker.check_model(model) # check that the model
+ # IR is well formed
+
+onnx.helper.printable_graph(model.graph) # print a human readable
+ # representation of the graph
+```
+
+### Vision
+
+
+```
+from torchvision import datasets, models, transforms # vision datasets,
+ # architectures &
+ # transforms
+
+import torchvision.transforms as transforms # composable transforms
+```
+
+### Distributed Training
+
+```
+import torch.distributed as dist # distributed communication
+from torch.multiprocessing import Process # memory sharing processes
+```
+
+## Tensors { .cols-1 }
+
+### Creation
+
+```
+x = torch.randn(*size) # tensor with independent N(0,1) entries
+x = torch.[ones|zeros](*size) # tensor with all 1's [or 0's]
+x = torch.tensor(L) # create tensor from [nested] list or ndarray L
+y = x.clone() # clone of x
+with torch.no_grad(): # code wrap that stops autograd from tracking tensor history
+requires_grad=True # arg, when set to True, tracks computation
+ # history for future derivative calculations
+```
+
+### Dimensionality
+
+```
+x.size() # return tuple-like object of dimensions
+x = torch.cat(tensor_seq, dim=0) # concatenates tensors along dim
+y = x.view(a,b,...) # reshapes x into size (a,b,...)
+y = x.view(-1,a) # reshapes x into size (b,a) for some b
+y = x.transpose(a,b) # swaps dimensions a and b
+y = x.permute(*dims) # permutes dimensions
+y = x.unsqueeze(dim) # tensor with added axis
+y = x.unsqueeze(dim=2) # (a,b,c) tensor -> (a,b,1,c) tensor
+y = x.squeeze() # removes all dimensions of size 1 (a,1,b,1) -> (a,b)
+y = x.squeeze(dim=1) # removes specified dimension of size 1 (a,1,b,1) -> (a,b,1)
+```
+
+### Algebra
+
+```
+ret = A.mm(B) # matrix multiplication
+ret = A.mv(x) # matrix-vector multiplication
+x = x.t() # matrix transpose
+```
+
+### GPU Usage
+
+```
+torch.cuda.is_available # check for cuda
+x = x.cuda() # move x's data from
+ # CPU to GPU and return new object
+
+x = x.cpu() # move x's data from GPU to CPU
+ # and return new object
+
+if not args.disable_cuda and torch.cuda.is_available(): # device agnostic code
+ args.device = torch.device('cuda') # and modularity
+else: #
+ args.device = torch.device('cpu') #
+
+net.to(device) # recursively convert their
+ # parameters and buffers to
+ # device specific tensors
+
+x = x.to(device) # copy your tensors to a device
+ # (gpu, cpu)
+```
+
+### Deep Learning
+
+```
+nn.Linear(m,n) # fully connected layer from
+ # m to n units
+
+nn.ConvXd(m,n,s) # X dimensional conv layer from
+ # m to n channels where X⍷{1,2,3}
+ # and the kernel size is s
+
+nn.MaxPoolXd(s) # X dimension pooling layer
+ # (notation as above)
+
+nn.BatchNormXd # batch norm layer
+nn.RNN/LSTM/GRU # recurrent layers
+nn.Dropout(p=0.5, inplace=False) # dropout layer for any dimensional input
+nn.Dropout2d(p=0.5, inplace=False) # 2-dimensional channel-wise dropout
+nn.Embedding(num_embeddings, embedding_dim) # (tensor-wise) mapping from
+ # indices to embedding vectors
+```
+
+### Loss Functions
+
+```
+nn.X # where X is L1Loss, MSELoss, CrossEntropyLoss
+ # CTCLoss, NLLLoss, PoissonNLLLoss,
+ # KLDivLoss, BCELoss, BCEWithLogitsLoss,
+ # MarginRankingLoss, HingeEmbeddingLoss,
+ # MultiLabelMarginLoss, SmoothL1Loss,
+ # SoftMarginLoss, MultiLabelSoftMarginLoss,
+ # CosineEmbeddingLoss, MultiMarginLoss,
+ # or TripletMarginLoss
+```
+
+### Activation Functions
+
+```
+nn.X # where X is ReLU, ReLU6, ELU, SELU, PReLU, LeakyReLU,
+ # RReLu, CELU, GELU, Threshold, Hardshrink, HardTanh,
+ # Sigmoid, LogSigmoid, Softplus, SoftShrink,
+ # Softsign, Tanh, TanhShrink, Softmin, Softmax,
+ # Softmax2d, LogSoftmax or AdaptiveSoftmaxWithLoss
+```
+
+### Optimizers
+
+```
+opt = optim.x(model.parameters(), ...) # create optimizer
+opt.step() # update weights
+optim.X # where X is SGD, Adadelta, Adagrad, Adam,
+ # AdamW, SparseAdam, Adamax, ASGD,
+ # LBFGS, RMSprop or Rprop
+```
+
+### Learning rate scheduling
+
+```
+scheduler = optim.X(optimizer,...) # create lr scheduler
+scheduler.step() # update lr after optimizer updates weights
+optim.lr_scheduler.X # where X is LambdaLR, MultiplicativeLR,
+ # StepLR, MultiStepLR, ExponentialLR,
+ # CosineAnnealingLR, ReduceLROnPlateau, CyclicLR,
+ # OneCycleLR, CosineAnnealingWarmRestarts,
+```
+
+## Data Utilities { .cols-1 }
+
+### Datasets
+
+```
+Dataset # abstract class representing dataset
+TensorDataset # labelled dataset in the form of tensors
+Concat Dataset # concatenation of Datasets
+```
+
+### Dataloaders and DataSamplers
+
+```
+DataLoader(dataset, batch_size=1, ...) # loads data batches agnostic
+ # of structure of individual data points
+
+sampler.Sampler(dataset,...) # abstract class dealing with
+ # ways to sample from dataset
+
+sampler.XSampler where ... # Sequential, Random, SubsetRandom,
+ # WeightedRandom, Batch, Distributed
+```
\ No newline at end of file
diff --git a/source/_posts/tmux.md b/source/_posts/tmux.md
index d399c27..633277d 100644
--- a/source/_posts/tmux.md
+++ b/source/_posts/tmux.md
@@ -123,11 +123,11 @@ $ tmux info
| `Ctrl+b` | Navigate panes |
| `Ctrl+b` | Toggle layouts |
| `Ctrl+b` `{` _/_ `}` | Move to Left/Right |
-| `Ctrl+b` `o` | Goto next panes |
-| `Ctrl+b` `z` | toggle full-screen |
+| `Ctrl+b` `o` | Go to next panes |
+| `Ctrl+b` `z` | Toggle full-screen |
| `Ctrl+b` `;` | Toggle Last pane |
| `Ctrl+b` `q` | Show numbers |
-| `Ctrl+b` `q` `0`...`9` | Goto # pane |
+| `Ctrl+b` `q` `0`...`9` | Go to # pane |
{.shortcuts}
@@ -144,7 +144,7 @@ $ tmux info
| `Ctrl+b` `l` | Last window |
| `Ctrl+b` `.` | Move window |
| `Ctrl+b` `&` | Close window |
-| `Ctrl+b` `0`...`9` | Goto # window |
+| `Ctrl+b` `0`...`9` | Go to # window |
{.shortcuts}
diff --git a/source/assets/icon/homebrew.svg b/source/assets/icon/homebrew.svg
new file mode 100644
index 0000000..3e93075
--- /dev/null
+++ b/source/assets/icon/homebrew.svg
@@ -0,0 +1,27 @@
+
+
+
\ No newline at end of file
diff --git a/source/assets/icon/pytorch.svg b/source/assets/icon/pytorch.svg
new file mode 100644
index 0000000..a1940f0
--- /dev/null
+++ b/source/assets/icon/pytorch.svg
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/themes/coo/source/css/highlightjs/stackoverflow-light.min.css b/themes/coo/source/css/highlightjs/stackoverflow-light.min.css
index c36d63d..cc7cb13 100644
--- a/themes/coo/source/css/highlightjs/stackoverflow-light.min.css
+++ b/themes/coo/source/css/highlightjs/stackoverflow-light.min.css
@@ -10,4 +10,4 @@ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5p
Updated for @stackoverflow/stacks v0.64.0
Code Blocks: /blob/v0.64.0/lib/css/components/_stacks-code-blocks.less
Colors: /blob/v0.64.0/lib/css/exports/_stacks-constants-colors.less
-*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-subst{color:#2f3337}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
\ No newline at end of file
+*/.hljs{color:#2f3337;background:#f6f6f6}.hljs-comment{color:#656e77}.hljs-attr,.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-section,.hljs-selector-tag{color:#015692}.hljs-attribute{color:#803378}.hljs-name,.hljs-number,.hljs-quote,.hljs-selector-id,.hljs-template-tag,.hljs-type{color:#b75501}.hljs-selector-class{color:#015692}.hljs-link,.hljs-regexp,.hljs-selector-attr,.hljs-string,.hljs-symbol,.hljs-template-variable,.hljs-variable{color:#54790d}.hljs-meta,.hljs-selector-pseudo{color:#015692}.hljs-built_in,.hljs-literal,.hljs-title{color:#b75501}.hljs-bullet,.hljs-code{color:#535a60}.hljs-meta .hljs-string{color:#54790d}.hljs-deletion{color:#c02d2e}.hljs-addition{color:#2f6f44}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}
\ No newline at end of file