Skip to content

Instantly share code, notes, and snippets.

View DavidAce's full-sized avatar
🔬

David Aceituno Chávez DavidAce

🔬
  • KTH - Royal Institute of Technology
  • Stockholm
View GitHub Profile
@DavidAce
DavidAce / pastor.md
Last active May 17, 2024 20:43
Tacos al pastor
@DavidAce
DavidAce / pebre.md
Last active May 17, 2024 18:16
Chilean Pebre

Pebre (salsa)

This is how I make pebre, but here is another variant: https://www.youtube.com/watch?v=YP0TqSGeUiQ

  • 4 large tomatoes or the correspoding amount of cherry tomatoes. Choose the tastiest. On large tomatoes, remove the insides to reduce water.
  • 1 mild onion (red, shallot, silver etc)
  • 2 garlic cloves
  • 2 limes (or lemon)
  • 1-2 chillies (or sambal oelek), to taste.
  • 1/2 dl red wine vinegar
  • Lots (1 pot, a handful, or 100-200 grams?) of koriander/cilantro.
@DavidAce
DavidAce / guacamole.md
Last active January 20, 2024 10:11
Guacamole

Guacamole (dip for ~4 people)

  • 2 ripe avocados
  • 1 lime
  • 1 big tomato or the corresponding amount of cherry tomatoes (whatever tastes best at the moment)
  • 1 large fistful/pot of finely chopped koriander/cilantro
  • 1/2 mild onion (red, shallot, silver... avoid the regular white onion which can be too sharp)
  • optional: chipotle sauce, just a few drops, or smoked paprika powder.
  • salt and pepper to taste
@DavidAce
DavidAce / postinstall_commands.md
Last active September 16, 2017 09:16
Ubuntu post-install

Some programs

sudo apt install firefox nemo

Set nemo as default instead of nautilus and set terminix terminal as default for nemo

gsettings set org.gnome.desktop.background show-desktop-icons false
gsettings set org.nemo.desktop show-desktop-icons true
xdg-mime default nemo.desktop inode/directory
gsettings set org.cinnamon.desktop.default-applications.terminal exec terminix
Ingredienser:
1 lime (en halv lime kan räcka, det är smaksak).
1 matsked socker (rörsocker helst)
4cl mörk rom
5-10 myntablad
is
kolsyrat vatten
Pressa ur limesaften i ett (inte för stort) glas, spara några bitar limeskal.
I samma glas, lägg i några limeskal socker och mynta.
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h
index 1134d66e7..bb9944b41 100644
--- a/Eigen/src/SVD/BDCSVD.h
+++ b/Eigen/src/SVD/BDCSVD.h
@@ -921,7 +921,17 @@ void BDCSVD<MatrixType>::perturbCol0
Index i = perm(l);
if(i!=k)
{
- Index j = i<k ? i : perm(l-1);
+ //Sometimes we get i >= k and l == 0, leading to perm(l-1) being out of bounds
diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h
index a5b73f8f2..2a6b08f62 100644
--- a/Eigen/src/SVD/BDCSVD.h
+++ b/Eigen/src/SVD/BDCSVD.h
@@ -952,8 +952,18 @@ void BDCSVD<MatrixType>::perturbCol0
Index i = perm(l);
if(i!=k)
{
- Index j = i<k ? i : perm(l-1);
- prod *= ((singVals(j)+dk) / ((diag(i)+dk))) * ((mus(j)+(shifts(j)-dk)) / ((diag(i)-dk)));
@DavidAce
DavidAce / prb.mplstyle
Created October 26, 2021 08:12
Matplotlib stylesheet for prb (WIP)
# Font sizes
# xx-small 5.79
# x-small 6.94
# small 8.33
# medium 10.0
# large 12.0
# x-large 14.4
# xx-large 17.28
# larger 12.0
# smaller 8.33
@DavidAce
DavidAce / slack.mplstyle
Last active October 26, 2021 08:15
Matplotlib stylesheet for sharing on slack (wip)
# This is a modified style based on seaborn-darkgrid
# Seaborn common parameters
# .15 = dark_gray
# .8 = light_gray
figure.facecolor : white
text.color : .15
axes.labelcolor : .15
@DavidAce
DavidAce / nvidia-tdp.service
Last active July 17, 2024 14:30
Nvidia power limit at boot
[Unit]
Description=Set NVIDIA power limit above default
[Service]
Type=oneshot
ExecStartPre=/usr/bin/nvidia-smi -pm 1
ExecStart=/usr/bin/nvidia-smi -pl 275