Skip to content

Instantly share code, notes, and snippets.

View iydon's full-sized avatar
📚
Focusing

Iydon Liang iydon

📚
Focusing
View GitHub Profile
@iydon
iydon / tis.py
Last active September 16, 2023 18:08
查询 SUSTech 2021 级研究生 GPA
__import__('warnings').filterwarnings('ignore')
import functools as f
import re
import typing as t
import bs4
import pandas as pd
import requests
@iydon
iydon / 期末考试方案修改意见及矛盾总结.md
Last active May 14, 2020 02:01
2019-2020 学年春季学期期末考试方案修改意见及矛盾总结

前言

  • 简要介绍:因为疫情影响,2019-2020 学年春季学期期末考试方案在学期末发布,且在未征求老师及学生意见的情况下有重大改变,因此很多学生和老师都对此有很大意见,并专门建立了 QQ 群讨论。本文由众多本科生于在线文档上共同协作,较全面地总结了大家提出来的意见和建议。
  • 核心问题:考核方式(是否记录 GPA)以及考核时间。

定义规范

在讨论时,大家理解的定义不同,产生的结论也不尽相同,因此将定义进行规范化,避免无意义的争执。

  • 所有的课程都是有考核的,分别是“考查”(为避免同音歧义,不设置“考察”的定义)和“考试”,教务系统的执行计划中的分类无法得出共有属性,因此重新定义这两个概念,以是否有必须线下监考的考试或者必须线下进行的活动为区分点(考查没有,考试有),以考查为考核方式的课程线下与线上差别不大,因此不应过多干预,我们关心的应该是以考试为考核方式的课程的策略指定。
  • 成绩记录方式有两种,不计入 GPA 的是二级制(P/F 制),记入 GPA 的是十三级制。
  • 无W退课:因为疫情原因新设置的临时制度,即退课之后成绩单上没有 W。
CUTTER = python3 jumpcutter/jumpcutter.py
%_0.3.mp4: %.mkv
ffmpeg -i $< -c:v copy $(basename $<).mp4
if [ -d ./TEMP ]; then rm -r ./TEMP; fi
${CUTTER} --silent_threshold 0.3 --input_file $(basename $<).mp4 --output_file $(basename $<)_0.3.mp4
%_wechat.mp4: %_0.3.mp4
ffmpeg -i $< -c copy -t 00:05:00.00 $@
%_0.1.mp4 %_0.2.mp4 %_0.3.mp4: %.mp4
if [ -d ./TEMP ]; then rm -r ./TEMP; fi
@jimmychu0807
jimmychu0807 / string-conversion.rs
Created November 21, 2019 10:20
Conversion between String, str, Vec<u8>, Vec<char> in Rust
use std::str;
fn main() {
// -- FROM: vec of chars --
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}'];
// to String
let string1: String = src1.iter().collect::<String>();
// to str
let str1: &str = &src1.iter().collect::<String>();
// to vec of byte
from sklearn.pipeline import Pipeline
pl_train_x, pl_test_x, pl_train_y, pl_test_y = train_test_split(df_x, df_y)
pl_model = Pipeline([('scaler', StandardScaler()),
('pca', PCA(0.95)),
('regr', ElasticNetCV(cv=5, alphas=[0.1, 0.3, 0.5, 0.7, 1.0]))])
pl_model.fit(pl_train_x, pl_train_y)
@rumansaleem
rumansaleem / clean-up-arch-linux.md
Created May 28, 2019 08:51
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
@Julian-Nash
Julian-Nash / flask_sitemap_generator.py
Last active May 4, 2024 13:03
Flask dynamic sitemap generator
@app.route("/sitemap")
@app.route("/sitemap/")
@app.route("/sitemap.xml")
def sitemap():
"""
Route to dynamically generate a sitemap of your website/application.
lastmod and priority tags omitted on static pages.
lastmod included on dynamic content such as blog posts.
"""
from flask import make_response, request, render_template
@HermannBjorgvin
HermannBjorgvin / Dockerfile
Last active February 5, 2021 16:46
Docker pipenv+pyenv configuration
FROM ubuntu:18.04
# set environmental variables
ENV PYENV_ROOT="/root/.pyenv" \
PATH="/root/.pyenv/shims:/root/.pyenv/bin:${PATH}" \
PIPENV_YES=1 \
PIPENV_DONT_LOAD_ENV=1 \
LC_ALL="C.UTF-8" \
LANG="en_US.UTF-8"
@BrinkerVII
BrinkerVII / ARCH_INSTALLATION_GUIDE.md
Last active March 12, 2024 23:11
Arch Linux Installation Guide

Note

This guide is out of date! Following this guide will leave you with a non-functioning system. You can still use this guide for inspiration, but please still do use the Official installation guide

Arch Linux installation guide

Hi there, this is a guide to install Arch Linux on your computer. I decided to write a guide because I find most other guides to be either too minimalistic or they have you set up some parts of the system in strange ways.

This guide is reference material for myself, as well as for other people who would like to install Arch for the first time.

General notes

We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 28 columns, instead of 24. in line 6.
AtomicNumber,Element,Symbol,AtomicMass,NumberofNeutrons,NumberofProtons,NumberofElectrons,Period,Group,Phase,Radioactive,Natural,Metal,Nonmetal,Metalloid,Type,AtomicRadius,Electronegativity,FirstIonization,Density,MeltingPoint,BoilingPoint,NumberOfIsotopes,Discoverer,Year,SpecificHeat,NumberofShells,NumberofValence
1,Hydrogen,H,1.007,0,1,1,1,1,gas,,yes,,yes,,Nonmetal,0.79,2.2,13.5984,8.99E-05,14.175,20.28,3,Cavendish,1766,14.304,1,1
2,Helium,He,4.002,2,2,2,1,18,gas,,yes,,yes,,Noble Gas,0.49,,24.5874,1.79E-04,,4.22,5,Janssen,1868,5.193,1,
3,Lithium,Li,6.941,4,3,3,2,1,solid,,yes,yes,,,Alkali Metal,2.1,0.98,5.3917,5.34E-01,453.85,1615,5,Arfvedson,1817,3.582,2,1
4,Beryllium,Be,9.012,5,4,4,2,2,solid,,yes,yes,,,Alkaline Earth Metal,1.4,1.57,9.3227,1.85E+00,1560.15,2742,6,Vaulquelin,1798,1.825,2,2
5,Boron,B,10.811,6,5,5,2,13,solid,,yes,,,yes,Metalloid,1.2,2.04,8.298,2.34E+00,2573.15,4200,6,Gay-Lussac,1808,1.026,2,3
6,Carbon,C,12.011,6,6,6,2,14,solid,,yes,,yes,,Nonmetal,0.91,2.55,11.2603,2.27E+00,3948.15,4300,7,Prehi