# conda env export > environment. yml
code --list-extensions > requirements.txt
# conda env create --file environment.yml
./install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "env_test" | |
version = "0.1.0" | |
description = "" | |
authors = ["Your Name <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "3.8.13" | |
[tool.poetry.dev-dependencies] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
def naive_way_of_sorting(arr): | |
for i in range(len(arr)): | |
for j in range(i+1, len(arr)): | |
if arr[i] > arr[j]: | |
arr[i], arr[j] = arr[j], arr[i] | |
return arr | |
def test_sorting(size): |
When I read from an article, PDF, or any text-based resource, I follow the following rules:
- Use two highlightning colors (orange and green) and alternate between them to separate ideas.
- After reading for sometime or feel that I have lost or might lose track of what I have read before, I come back and write marginal notes (in red) to describe the general idea for each highlighted section.
- After completing reading the content, I revisit my notes and try to have a solid understanding of the content and add more marginal notes with a different color (blue).
- Re-write my notes and general ideas into a piece of paper to understand the flow of ideas (just focus on important things and ignore details that aren't important)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: https://twitter.com/PrasoonPratham/status/1461267623266635778/photo/1 (@PrasoonPratham on Twitter) | |
import datetime | |
import hashlib | |
class Block: | |
def __init__(self, data): | |
self.data = data | |
self.blockNo = 0 | |
self.next = None | |
self.nonce = 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
It wasn't obvious on PyTorch's documentation of how to use PyTorch Profiler (as of today, 8/12/2021), so I have spent some time to understand how to use it and this gist contains a simple example to use.
- Install the required packages:
python>=1.9.0
torchvision>=0.10.0
numpy
matplotlib