Skip to content

Instantly share code, notes, and snippets.

View SLAPaper's full-sized avatar
🤣
lmao

SLAPaper Pang SLAPaper

🤣
lmao
View GitHub Profile
@SLAPaper
SLAPaper / angularjs_commit_guidelines.md
Created January 7, 2016 12:48
Angularjs Commit Guidelines

Git Commit Guidelines

We have very precise rules over how our git commit messages can be formatted. This leads to more readable messages that are easy to follow when looking through the project history. But also, we use the git commit messages to generate the AngularJS change log.

The commit message formatting can be added using a typical git workflow or through the use of a CLI wizard (Commitizen). To use the wizard, run npm run commit in your terminal after staging your changes in git.

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special

// ==UserScript==
// @name Qidian score autoclick
// @name:ZH-CN 起点中文经验值自动签到
// @namespace http://tampermonkey.net/
// @version 1.9
// @description Open the score site and let the script do all the click!
// @description:ZH-CN 打开领取经验值的页面,然后让脚本在后台自动处理所有工作!
// @author SLAPaper
// @include /^https?://my\.qidian\.com/level/
// @license MIT
@SLAPaper
SLAPaper / BundleStar.js
Created April 1, 2017 15:28
Bundle Star auto get key
// ==UserScript==
// @name BundleStar_GetKey&Gift
// @Namespace http://tampermonkey.net/
// @version 1.03
// @description shows how to use babel compiler
// @icon https://cdn.bundlestars.com/production/brand/logo.png
// @author KamiXuan
// @match https://www.bundlestars.com/en/orders*
// ==/UserScript==
@SLAPaper
SLAPaper / SteamCartSorter.js
Last active June 26, 2020 14:53
sort steam cart items by price
// ==UserScript==
// @name Steam cart sorter
// @name:ZH-CN Steam 购物车自动排序
// @namespace http://tampermonkey.net/
// @version 0.8
// @description sort the Steam cart by price
// @description:ZH-CN 对 Steam 购物车中的物品按照价格排序
// @author SLAPaper
// @match http://store.steampowered.com/cart/*
// @match https://store.steampowered.com/cart/*
@SLAPaper
SLAPaper / reuters_mlp_comparison (relu, elu, selu, swish).py
Last active October 26, 2021 19:41
Compare RELU, ELU, SELU, Swish and Scaled Swish in Reuters MLP (based on Keras' example)
'''Compares self-normalizing MLPs with regular MLPs.
Compares the performance of a simple MLP using two
different activation functions: RELU and SELU
on the Reuters newswire topic classification task.
# Reference:
Klambauer, G., Unterthiner, T., Mayr, A., & Hochreiter, S. (2017).
Self-Normalizing Neural Networks. arXiv preprint arXiv:1706.02515.
https://arxiv.org/abs/1706.02515
@SLAPaper
SLAPaper / JuejinMaxWidthSetter.js
Created June 19, 2018 10:08
Juejin Max-Width Setter.js
// ==UserScript==
// @name Juejin max-width setter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description make the sidebar no longer overlaps the article
// @author You
// @match https://juejin.im/post/*
// @grant none
// @license MIT
// ==/UserScript==
@SLAPaper
SLAPaper / save_to_zotero.js
Created November 2, 2018 03:02
Save to Zotero
// ==UserScript==
// @name Save to Zotero
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Make Zotero's boorkmarklet a user script (click the button 'Zotero!' on bottom right)
// @author SLAPaper
// @match *://*/*
// @grant none
// ==/UserScript==
@SLAPaper
SLAPaper / Update-pip.ps1
Created February 4, 2019 05:18
Pip-Upgrade-All for (Powershell, cmd, bash)
Param(
[Parameter(Position = 0)]
[string[]]$python_name = ('python'),
[string[]]$Exclude = (''),
[bool]$NoDeps = $false
)
foreach ($python in $python_name) {
@SLAPaper
SLAPaper / throttle.py
Last active April 9, 2019 18:22 — forked from ChrisTM/throttle.py
Python decorator for throttling function calls.
# https://gist.github.com/SLAPaper/9ef3699e5f76dc80c00bd2d405eef995
from datetime import datetime, timedelta
from functools import wraps
class throttle:
"""
Decorator that prevents a function from being called more than once every
time period.
@SLAPaper
SLAPaper / chinese-gb7714-2005-numeric-auto-lang.csl
Last active June 7, 2019 16:45
Chinese GB/T 7714-2005 CSL-M that correctly deal with English citation with more than 3 authors.
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only" default-locale="zh-CN">
<info>
<title>Chinese Std GB/T 7714-2005 (numeric, auto languange)</title>
<id>chinese-gb7714-2005-autolang</id>
<link href="https://gist.github.com/SLAPaper/19497b1cf37bc7c8bb4af9969fe69e9a" rel="self"/>
<link href="http://gradschool.ustc.edu.cn/ylb/material/xw/wdxz/19.pdf" rel="documentation"/>
<author>
<name>SLAPaper</name>
<email>slapaper@pku.edu.cn</email>