Skip to content

Instantly share code, notes, and snippets.

View xhj's full-sized avatar
🎏
搬砖中...

Huajian Xie xhj

🎏
搬砖中...
View GitHub Profile
@xhj
xhj / finetune_llama_v2.py
Created July 21, 2023 14:35 — forked from younesbelkada/finetune_llama_v2.py
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@xhj
xhj / wsl.md
Created March 6, 2023 12:41 — forked from alyleite/wsl.md
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

just try:

sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

@xhj
xhj / repetition_algorithm.ipynb
Created August 21, 2020 13:16 — forked from doctorpangloss/repetition_algorithm.ipynb
Supermemo 2 Algorithm, Unobscured (Python 3)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env ruby
require 'nokogiri'
ibooks_home = '/Users/xiehuajian/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books/'
Dir.foreach(ibooks_home) do |dir|
if File.extname(dir) == ".epub"
dir = ibooks_home + dir
File.open(dir + "/iTunesMetadata.plist") do |f|