Skip to content

Instantly share code, notes, and snippets.

View WuSiYu's full-sized avatar

Wu SiYu WuSiYu

View GitHub Profile
@WuSiYu
WuSiYu / Dockerfile
Created August 16, 2021 16:03
A "full" ubuntu-server development environment docker image
FROM ubuntu:latest
LABEL maintainer="SiYu Wu <wu.siyu@hotmail.com>"
ENV DEV_USER=user
ENV UID=1000
ENV GID=1000
ENV DEF_PASSWD=password
ENV TZ=Asia/Shanghai
ENV LANG=en_US.UTF-8
@WuSiYu
WuSiYu / matrix.py
Created April 29, 2019 12:37
Simple matrix store and process module (test only)
#!/usr/bin/env python3
"""Simple matrix store and process module.
This module using array or list + Fraction to store each row, and list for
these rows. It support the add, sub, mul, inverse and transpose of a matrix
and do plu_factorization/plu_solve. It may not very efficiency for large scale
matrix calculation, but can help you to do your linear algebra homework.
Example:
@WuSiYu
WuSiYu / bjut-autologin.sh
Created April 24, 2019 13:12
北京工业大学校园网自动登录SHELL脚本
#!/bin/sh
# Copyright (c) 2019 SiYu Wu <wu.siyu@hotmail.com>
# BJUT gateway auto login script v0.1
# Usage: bjut-autologin.sh <user> <password>
# set LOGIN_IPV6=1 to enable ipv6 login, it will use one extra session on WiFi.
LOGIN_IPV6=${LOGIN_IPV6:-0}
if [ $# -ne 2 ] && !([ $# -eq 1 ] && ([[ $1 == '-l' ]] || [[ $1 == '--logout' ]]) ); then
@WuSiYu
WuSiYu / bilibiliVideoCount.py
Last active October 5, 2018 13:07
Bilibili 各分区视频数量综合查询脚本
#!/usr/bin/env python3
'''
Bilibili 各分区视频数量查询脚本
作者: WuSiYu(wu.siyu@hotmail.com)
日期: 2018-07-26 00:54
本脚本参考了uupers团队的研究: https://github.com/uupers/BiliSpider/wiki
'''
from urllib import request
import json