Skip to content

Instantly share code, notes, and snippets.


Leo Tytakoff tytakoff

View GitHub Profile
tytakoff /
Created Nov 2, 2020 — forked from harshityadav95/
Initialise CUDA environment on Google Colab
!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 -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/
!apt-get update
View 1192-critical-connections
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()
tytakoff /
Created Feb 16, 2020 — forked from marcospgp/
Experimenting with a new way of reading long form text with Paul Graham's Ideas For Startups

Ideas For Startups

Written by Paul Graham and copied from

October 2005

(This essay is derived from a talk at the 2005 Startup School.)

People think it's hard to come up with good ideas for startups because they don't actually try to do it.
tytakoff / countries.js
Last active Jul 17, 2017
Countries list formatted for JavaScript (with country codes)
View countries.js
let countries = [
'name': 'Afghanistan',
'code': 'AF'
'name': 'Åland Islands',
'code': 'AX'
tytakoff / 0_reuse_code.js
Created May 12, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View gist:6dcb85cee711033ade4f
Windows Manager: Spectacle
Terminal: iTerm 2
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"} }
tytakoff / .bashrc
Created Jul 30, 2014
Useful bash commands
View .bashrc
# 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'
You can’t perform that action at this time.