Skip to content

Instantly share code, notes, and snippets.

View ppatel26's full-sized avatar
👽
⟟ ⌇⟒⟒ ⊬⍜⎍!

Parv ppatel26

👽
⟟ ⌇⟒⟒ ⊬⍜⎍!
  • University of Southern California
  • Ad Astra
  • X @patel_parv
View GitHub Profile
@ppatel26
ppatel26 / function-calling.ipynb
Created June 18, 2023 16:10 — forked from kylemcdonald/function-calling.ipynb
Example of OpenAI function calling API to extract data from LAPD newsroom articles.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ppatel26
ppatel26 / list.md
Created September 23, 2022 20:49 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@ppatel26
ppatel26 / git-cheatsheet.md
Created January 31, 2021 00:45 — forked from Kartones/git-cheatsheet.md
Git cheatsheet

Commands

  • git checkout -b __newbranch__ : get a new branch and switch to it
  • git checkout -b __branchname__ / __branchname__ : get a local copy of a remote existing branch
  • git checkout __branchname__ : switch branch
  • git checkout --orphan __branchname__ : create branch without full history
  • git log -n X -p : show X last commits with diffs
  • git log __branchA__ ^__branchB__ : commits in branch A that aren't in branch B
  • git log --pretty=oneline --stat --all __foldername__ : modified files under a given folder
  • git fetch
@ppatel26
ppatel26 / postgres-cheatsheet.md
Created January 31, 2021 00:44 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r