Skip to content

Instantly share code, notes, and snippets.

@dichen-cd
dichen-cd / zhihu-image-resizer.user.js
Created September 8, 2025 06:56
Change Zhihu images to small size for faster loading 缩小知乎图片的尺寸
// ==UserScript==
// @name Zhihu Image Smaller
// @namespace http://tampermonkey.net/
// @version 0.2
// @description Change Zhihu images to small size for faster loading.
// @author Gemini
// @match https://*.zhihu.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@dichen-cd
dichen-cd / zhihu-hide-sidebar.user.js
Created September 1, 2025 03:08
Zhihu Right Sidebar Remover 知乎侧边栏去除
// ==UserScript==
// @name Zhihu Right Sidebar Remover
// @namespace http://tampermonkey.net/
// @version 0.5
// @description Robustly finds the sidebar by its data-attribute and removes it, watching for all DOM changes.
// @author Gemini
// @match https://www.zhihu.com/*
// @grant GM_addStyle
// ==/UserScript==
@dichen-cd
dichen-cd / draw_net.py
Last active March 31, 2016 04:53 — forked from ebenolson/draw_net.py
Functions to draw Lasagne networks with graphviz, like Caffe's draw_net.py
"""
Functions to create network diagrams from a list of Layers.
Examples:
Draw a minimal diagram to a pdf file:
layers = lasagne.layers.get_all_layers(output_layer)
draw_to_file(layers, 'network.pdf', output_shape=False)
Draw a verbose diagram in an IPython notebook: