Written by Paul Graham and copied from http://www.paulgraham.com/ideas.html
October 2005
(This essay is derived from a talk at the 2005 Startup School.)
| ... | |
| { | |
| "type": "lldb", | |
| "request": "launch", | |
| "name": "Debug executable 'toydb'", | |
| "cargo": { | |
| "args": [ | |
| "build", | |
| "--bin=toydb", | |
| "--package=toydb" |
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "lldb", | |
| "request": "launch", | |
| "name": "Debug unit tests in library 'toydb'", |
| !apt-get --purge remove cuda nvidia* libnvidia-* | |
| !dpkg -l | grep cuda- | awk '{print $2}' | xargs -n1 dpkg --purge | |
| !apt-get remove cuda-* | |
| !apt autoremove | |
| !apt-get update | |
| !wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb | |
| !dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb | |
| !apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub | |
| !apt-get update |
| from collections import deque | |
| class Solution: | |
| def bfsNodes(n: int, adj_list: List[List[int]]) -> int: | |
| if len(adj_list[0]) == 0: | |
| return 0 | |
| visited = set() | |
| q = deque([0]) | |
| while q: | |
| curr_node = q.pop() |
Written by Paul Graham and copied from http://www.paulgraham.com/ideas.html
October 2005
(This essay is derived from a talk at the 2005 Startup School.)
| let countries = [ | |
| { | |
| 'name': 'Afghanistan', | |
| 'code': 'AF' | |
| }, | |
| { | |
| 'name': 'Åland Islands', | |
| 'code': 'AX' | |
| }, | |
| { |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| Windows Manager: Spectacle | |
| Terminal: iTerm 2 | |
| https://github.com/taydakov/dotfiles | |
| Sublime Text plugins: gitgutter, emmet, predawn theme, sublimetext-markdown-preview, sublimelinter, Web Inspector | |
| Alt+M shortcut conf: { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} } |
| # Custom initializing commands (add to the end of ~/.bashrc) | |
| sub() { | |
| /home/lev/Sublime\ Text\ 2/sublime_text $1 1>/dev/null 2>/dev/null & | |
| } | |
| echo 'sub <file> -> open file in sublime' |