I did an XBPS upgrade on my Void Linux system and my touchpad stopped working (ThinkPad X1 Carbon Gen6). The TrackPoint (little red nub thingy in the keyboard) still worked just fine.
# Setup Ubuntu | |
sudo apt update --yes | |
sudo apt upgrade --yes | |
# Get Miniconda and make it the main Python interpreter | |
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh | |
bash ~/miniconda.sh -b -p ~/miniconda | |
rm ~/miniconda.sh | |
export PATH=~/miniconda/bin:$PATH |
diff --git config.h config.h | |
index 8eee66b..5ee7805 100644 | |
--- config.h | |
+++ config.h | |
@@ -4,6 +4,7 @@ | |
/* appearance */ | |
static const unsigned int borderpx = 2; /* border pixel of windows */ | |
+static const unsigned int gappx = 10; /* gap pixel between windows */ | |
static const unsigned int snap = 32; /* snap pixel */ |
Recently, I tried to rewrite a MATLAB program in Julia. The program solves a PDE derived from a continuous-time economic model. I got the same result as the MATLAB program, but it was much slower. Then, I reviewed the Performance Tips of Julia and realized that the problem lied in using global variables. Typically, there are a lot of parameters in an economic model and they are typically directly defined as global variables. Then, for convenience, I wrote several functions to calculate some formulae which use these parameters. Since those functions were frequently called in a long loop, the performance is low.
To guide future programming practice, here I experiment several ways to avoid this problem.
Before digging into various ways to avoid this problem, let's first check how slow using global variables can be. To compare the computational time of di
# Add NVIDIA package repositories | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin | |
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub | |
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" | |
sudo apt-get update | |
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb | |
sudo apt install ./nvidia-machine-learning-repo-ubuntu2004_1.0.0-1_amd64.deb |