Skip to content

Instantly share code, notes, and snippets.

View qin-yu's full-sized avatar
🦏
Bioimage Safari

Qin Yu qin-yu

🦏
Bioimage Safari
  • EMBL
  • Heidelberg, Germany
  • 12:32 (UTC +01:00)
  • LinkedIn in/qin-yu
View GitHub Profile
@qin-yu
qin-yu / configure-git.md
Last active March 6, 2024 02:20
Configure Git and setup GitHub on new machine

Ubuntu20.04 Wine 6.0 微信中文显示方块/方框

如果希望在Ubuntu使用Windows版微信:

  1. 安装 Wine sudo apt-get install wine
  2. 先把环境改了省事:
    $ export WINEARCH=win32
    $ export WINEPREFIX=/home/qinyu/Wine/WeChat
  3. 创建 Wine Bottle

When you are not able to embed/add an image from GitHub to your MarkDown files such as a page in Sphinx or Jupyter Book, maybe you are using blob instead of raw in the image URL.

For example, if you use https://github.com/hci-unihd/plant-seg/raw/assets/images/plantseg_overview.png then the link is to an image, but https://github.com/hci-unihd/plant-seg/blob/assets/images/plantseg_overview.png is to the GitHub page that contains the image.

Click to see the difference:

@qin-yu
qin-yu / change-creation-and-modified-dates.py
Last active November 19, 2023 15:41
How to change the date of creation and the date of modification of files on macOS, based on filename (and add an offset).
import os
import re
import subprocess
from datetime import datetime, timedelta
def set_creation_date(file_path, creation_date):
"""
Set the creation date of a file.
@qin-yu
qin-yu / jupyter-progress-bar.md
Created April 11, 2020 10:10
How to Use Progress Bar in Jupyter Notebook (light blue bar with question mark denominator explained)
@qin-yu
qin-yu / gpu-tf-ubuntu.md
Last active May 19, 2023 21:10
Use TensorFlow with GPU support on Ubuntu

If Chrome browser doesn't show correct resolution and sharp boundaries, append this parameters /high-dpi-support=1 /force-device-scale-factor=1 to the target field in Properties:

image

If you have GSettings schema undefined not found during installation of Panel World Clock (Lite) by Nei, then it might not be a problem with GSettings or gnome. If you installed gnome-clock with snap, remove it by snap remove gnome-clock and then reinstall it by apt. Now reinstall panel world clock, logout and login again.