Skip to content

Instantly share code, notes, and snippets.

📚

Qin Yu qin-yu

📚
Block or report user

Report or block qin-yu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View time_machine_migrate.txt
https://posts.boy.sh/to-move-your-time-machine-backup-to-another-disk-use-disk-utility
https://apple.stackexchange.com/questions/340432/clone-time-machine-volume
!! DO NOT USE APPLE OFFICIAL APPROACH (DRAG-N-DROP), WHICH COSTS WEEKS TO FINISH WRITING 10x DISKS !!
1. Open Disk Utility (/Applications/Utilities/Disk Utility.app).
2. Check the format of your new backup drive. It needs to be a GUID partition and formatted as Mac OS Extended (Journaled).
3. Temporarily turn Time Machine off.
4. In Disk Utility select the new backup drive.
5. From the “Edit” menu item, select “Restore…”.
@qin-yu
qin-yu / pythongpu.sh
Created May 9, 2019
how to specify gpu used for python scripts
View pythongpu.sh
# If you have > 1 gpu, the first gpu is #0 and the second is therefore #1:
$ CUDA_VISIBLE_DEVICES=1 python3 ~/.../faceswap.py train -A ~/.../face1 -B ~/.../face2 -m ~/.../models -p
@qin-yu
qin-yu / fixpip3.sh
Created May 8, 2019
When pip3 gives errors on
View fixpip3.sh
$ pip3
# Traceback (most recent call last):
# File "/home/qinyu/.local/bin/pip3", line 7, in <module>
# from pip._internal import main
# ModuleNotFoundError: No module named 'pip._internal'
# This doesn't work:
$ sudo apt-get --reinstall install python3
# This works:
@qin-yu
qin-yu / installcuda.sh
Last active May 8, 2019
Install CUDA 10.1 on Ubuntu 18.04
View installcuda.sh
# How do I Install CUDA on Ubuntu 18.04?
# https://askubuntu.com/questions/1028830/how-do-i-install-cuda-on-ubuntu-18-04
# Solution:
# 1. do:
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo ubuntu-drivers autoinstall
# 2. reboot;
# 3. do:
sudo apt install nvidia-cuda-toolkit gcc-6
You can’t perform that action at this time.