Skip to content

Instantly share code, notes, and snippets.

@quettabit
quettabit / svd_memory.py
Created April 23, 2020 15:03 — forked from fabianp/svd_memory.py
Timings and memory consumption for the singular value decomposition implemented in scipy. The script svd_memory.py generates a plot about the memory consumption (requires the package `memory_profiler`) and the second one will plot the timings. The scripts will perform several iterations for matrices of different sizes and will take about 30 minu…
# .. Memory benchmarks for SciPy's Singular Value Decomposition ..
# .. Author: Fabian Pedregosa <fabian@fseoane.net>
import numpy as np
from scipy.sparse import linalg as splinalg
from scipy import sparse, linalg
import pylab as pl
from memory_profiler import memory_usage
dims = np.arange(500, 1500, 20)
def hello_decorator(func):
# inner1 is a Wrapper function in
# which the argument is called
# inner function can access the outer local
# functions like in this case "func"
print("wooow")
def inner1(a):
print("Hello, this is before function execution")
@quettabit
quettabit / channa_rice_recipe.md
Last active July 13, 2019 03:31
Channa Rice Recipe

For a 1.5:1 (measured in cup) ratio of Rice and Channa,

Ingredients

  • Green Chillies (4) finely chopped
  • Medium sized onion (1) cut into thin strips
  • Ginger Garlic paste (thick) (0.5 tablespoon)
  • Green Cardamom (3)
  • Cloves (2)
  • Cumin seeds (1.5 teaspoon)
  • Red Chilli powder (0.5 teaspoon)
  • Coriander powder (1 teaspoon)

Nvidia P100 vs V100

  • Volta is successor to Pascal
  • V100 is 3x faster than P100

In Compute Canada,

  • Beluga has V100 GPUs
  • Others have P100 GPUs