Skip to content

Instantly share code, notes, and snippets.

View kdplus's full-sized avatar
🌴
On vacation

Yusn kdplus

🌴
On vacation
View GitHub Profile
@tdcosta100
tdcosta100 / WSL2GUIWSLg-XWayland-en.md
Last active May 21, 2026 07:52
A tutorial to use GUI in WSL2/WSLg replacing original Xorg by Xwayland, allowing WSL to work like native Linux, including login screen

Full desktop shell in WSL2 using WSLg (XWayland)

Note

If you want to use Wayland in WSLg in a simpler setup, you can try the WSLg (Wayland) tutorial.

In this tutorial, we will setup GUI in WSL2. No additional software outside WSL (like VcXsrv or GWSL) is required. You will find this tutorial very similar to the one that replaces Xorg with Xvnc. Indeed, it's pretty much the same tutorial, with some few changes.

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc), and after that, replace the default Xorg by a script that calls Xwayland instead.

For this setup, I will use Ubuntu 24.04, and install GNOME Desktop. Unfortunately older versions of Ubuntu lack some fundamental things, so we cannot reproduce it in older versions (at least not fully). Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the [Sample screenshot

@recolic
recolic / README.md
Last active January 20, 2023 11:14
android qq 聊天记录导出

android qq聊天记录导出大致流程

tested on android 6 tencent qq

  1. 设法将/data/data/com.tencent.*/databases目录拷贝出来,我假设你了解如何做到这一点。

  2. 运行以下命令。我假设你了解如何安装/使用sqlite,我假设你了解linux基本知识。

$ sqlite3 872222222-IndexQQMsg.db

Papers from Super SloMo references

  • Super SloMo: High Quality Estimation of Multiple Intermediate Frames for Video Interpolation [Paper]
    • Huaizu Jiang, Deqing Sun, Varun Jampani, Ming-Hsuan Yang, Erik Learned-Miller, Jan Kautz
    • CVPR 2018 (splotlight)
  • Video frame synthesis using deep voxel flow [Paper] [Code]
    • Z. Liu, R. Yeh, X. Tang, Y. Liu, and A. Agarwala.
    • ICCV 2017
  • Video frame interpolation via adaptive separable convolution. [Paper] [Code]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
require 'torch'
require 'xlua'
require 'image'
require 'cunn'
require 'cudnn'
require 'nn'
require 'torch'
require 'optim'
require 'paths'
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active May 19, 2026 07:37 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@toshi-k
toshi-k / LagrangeDualDict.r
Last active December 28, 2017 08:45
Learning bases using the Lagrange dual (R)
# = = = = = include = = = = = #
library(MASS)
# = = = = = function = = = = = #
Obj_func <- function(Y,B,A,Lambda){
MAT <- t(Y) %*% Y - Y %*% t(A) %*% solve(A%*%t(A)+Lambda) %*% t(Y%*%t(A)) - Lambda
return <- sum(diag(MAT))
@szagoruyko
szagoruyko / vgg.lua
Last active September 11, 2017 08:32
require 'nn'
local vgg = nn.Sequential()
-- building block
local function ConvBNReLU(nInputPlane, nOutputPlane)
vgg:add(nn.SpatialConvolution(nInputPlane, nOutputPlane, 3,3, 1,1, 1,1))
vgg:add(nn.SpatialBatchNormalization(nOutputPlane,1e-3))
vgg:add(nn.ReLU(true))
return vgg
end
@paidi
paidi / gist:310d2d869ef74794b239
Last active February 14, 2017 10:29
Batch SparseLinear
m = nn.ParallelTable()
layer = nn.SparseLinear(inputSize,outputSize)
m:add(nn.Sequential():add(layer):add(nn.Reshape(1,outputSize)))
for i=2,batchSize do
local repLayer = layer:clone('weight', 'bias', 'gradWeight', 'gradBias')
m:add(nn.Sequential():add(repLayer):add(nn.Reshape(1,outputSize)))
end
batchLayer = nn.Sequential():add(m):add(nn.JoinTable(1))
@gcr
gcr / alexnet-BETTER.lua
Last active October 12, 2016 08:16
AlexNet in Torch.
------- AlexNet: Using my own weight initialization
model = nn.Sequential()
model:add(cudnn.SpatialConvolution(3,96,11,11,4,4,2,2))
model.modules[#model.modules].weight:normal(0, 0.01)
model.modules[#model.modules].bias:fill(0)
model:add(cudnn.ReLU())
model:add(inn.SpatialCrossResponseNormalization(5, 0.0001, 0.75, 1))
model:add(nn.SpatialMaxPooling(3,3,2,2))
model:add(cudnn.SpatialConvolution(96,256,5,5,1,1,2,2))
model.modules[#model.modules].weight:normal(0, 0.01)