Python 2 and 3 compatible pickle save and load
Python's pickle is great and convenient to use, however python 2 and python 3 differing in unicode handling is making pickled files quite incompatible to load.
Python's pickle is great and convenient to use, however python 2 and python 3 differing in unicode handling is making pickled files quite incompatible to load.
h t m l >
If you do not have a usb here available, or usb not bootable for some reason (i.e. motherboard issue, usb issue, or whatever), you might need to boot your windows from local hard drive.
It just needs to hold the installation files, so make it 8G will suffice.
GDB is a user process that attaches on to another user process.
That's all.
gcc -g
gcc -O2
For Ubuntu 16.04 Users:
sudo apt-get -y install nvidia-361-updates-dev nvidia-prime nvidia-profiler \
nvidia-settings nvidia-visual-profiler \
nvidia-cuda-dev nvidia-cuda-toolkit nvidia-opencl-dev
And, that's it!
The method is for systemd users.
In order to show the error messages printed from your NetworkManager, you need to manually start it from your command line.
Here's the instructions:
systemctl mask NetworkManager.service
systemctl stop NetworkManager.service
NM_PPP_DEBUG=1 /usr/sbin/NetworkManager --no-daemon
systemctl unmask NetworkManager.service
systemctl restart NetworkManager.service
Sometimes wasting a partition for Linux Swap is quite annoying, so let's use a file instead.
Steps are simple:
cd /whatever-dir/
dd if=/dev/zero of=./swapfile bs=1024 count=<num in KB>
mkswap ./swapfile
swapon ./swapfile
# That's it, you just enabled your swapfile
If you'd hope that it'll start at boot, add it to your /etc/fstab
:
echo "/whatever-dir/swapfile none swap sw 0 0" >> /etc/fstab
The man page of xmodmap
is showing us a way of exchanging/swaping Caps_Lock
and Control_L
:
! file: ~/.xmodmap
!
! Swap Caps_Lock and Control_L
!
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
How to run the script:
~/.xmodmap
.xmodmap ~/.xmodmap
Caps Lock
and Left Control
to see the effect.However, the script will really swap
it. Because if you rerun the script again, it'll swap it back.