Skip to content

Instantly share code, notes, and snippets.

@nikitajz
nikitajz / notes_programming_in_scala.md
Created November 19, 2016 13:28 — forked from jamesyang124/notes_programming_in_scala.md
Notes for programming in Scala 2nd edition.

#Note for Programming in Scala


##Chp.0 SBT & Scala Interpreter

  1. Call scala interpreter by sbt.

    // enter scala interpreter
@nikitajz
nikitajz / uppercase_letters_count.md
Created April 24, 2020 16:45
Compare UPPERCASE letters count using various python methods

I've done some comparisons of the methods above + RE compiled.
Python 3.7.4
I've used the book from project Gutenderg.

from urllib.request import urlopen

# Download the book Alice’s Adventures in Wonderland, by Lewis Carroll
text = urlopen('https://www.gutenberg.org/files/11/11-0.txt').read().decode('utf-8')
# Split it into the separate chapters and remove table of contents, etc

sep = 'CHAPTER'

@nikitajz
nikitajz / postgres-cheatsheet.md
Created July 4, 2020 13:37 — 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)
@nikitajz
nikitajz / tmux-cheatsheet.markdown
Created September 10, 2020 11:52 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nikitajz
nikitajz / iterm2.md
Created March 16, 2022 10:25 — forked from squarism/iterm2.md
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
[
{
"name": "Corne, default layer",
"author": "https://github.com/c0psrul3",
"plate": false,
"keyboard-layout-editor": "http://www.keyboard-layout-editor.com/#/gists/adfa7c3cd8f0c6d3a7b9155c6eab1748#file-corne-crkbd_c0psrul3-default-json",
"qmk-config": "https://config.qmk.fm/#/crkbd/rev1/LAYOUT"
},
[
{
@nikitajz
nikitajz / corne-ish-zen__main.kbd.json
Last active March 17, 2023 01:32
corne-ish zen__main
[
{
"name": "corne-ish zen__main",
"author": "nikitajz"
},
[
{
"x": 3,
"a": 6
},
@nikitajz
nikitajz / macOS_commands_reference.md
Last active May 6, 2023 15:25
macOS: commands reference
@nikitajz
nikitajz / Cheatsheet and examples
Last active July 1, 2024 15:22
polars snippets and cheatsheet
# Cheatsheet
https://franzdiebold.github.io/polars-cheat-sheet/Polars_cheat_sheet.pdf
# PyData by datenzauberai
https://github.com/datenzauberai/PyConDE-2023--Polars-make-the-switch/blob/main/Polars%20-%20make%20the%20switch%20to%20lightning-fast%20dataframes%20-%20Versand.pdf
# More examples
https://github.com/martinbel/polars-tutorial/tree/master