Skip to content

Instantly share code, notes, and snippets.

View iydon's full-sized avatar
📚
Focusing

Iydon Liang iydon

📚
Focusing
View GitHub Profile
import collections
import os
import pathlib
import typing as t
import pygame
import pygame.gfxdraw
import numpy as np
@iydon
iydon / score_adjustment.py
Last active December 14, 2021 03:27
指数型分数调整
import typing as t
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import streamlit as st
class get:
@iydon
iydon / top50.md
Created December 29, 2021 12:23
2018 年爬虫光顾 Top 50 公司排行榜
序号 公司 域名 流量占比
1 中国铁路客户服务中心 12306.cn 18.65%
2 微博 weibo.cn 18.05%
3 淘宝 taobao.com 12.16%
4 百度 baidu.com 6.22%
5 大众点评 dianping.com 6.14%
6 联通 10010.com 4.82%
7 微信搜索 weixin.sogou.com 2.85%
8 最高人民法院公告查询 court.gov.cn 2.78%
@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 / dfyl.py
Created February 15, 2022 05:43
年代已久的电费余量查询
import datetime
import requests
from bs4 import BeautifulSoup
class SUSTech:
_url_login = 'https://cas.sustech.edu.cn/cas/login'
def __init__(self, username, password):
'''
🔵⬜🟦⬜🟦
⬜⬜🟦⬜🟦
🟦⬜🟦🟦🟦
🟦⬜⬜⬜🟦
🟦⬜🟦🟦🟦
'''
import random
@iydon
iydon / texfind.py
Last active April 18, 2022 08:45
查找 TeX 发行版中各宏包与文类的命令、环境等信息
__all__ = ['TeXParser', 'TeXDistribution']
__version__ = '0.1.0'
import collections as c
import json
import pathlib as p
import re
import textwrap
import typing as t
\documentclass{article}
\usepackage{physics}
\begin{document}
\def\cache{
\exp\qty[
- \frac{\xi^2}{4t\nu}
- \frac{u_0\xi}{2\nu}
+ \frac{x\xi}{2t\nu}
- \frac{Lu_0\sin^2{\left(\frac{\pi\xi}{L} \right)}}{2\pi\nu}
]
% Extracted from http://ylbook.com/cms/web/chuantongsecai/chuantongsecai.htm
% by LianTze Lim ([email protected]), 27 December 2015
% v1.1 Updated 7 May 2018: 端憲 @heangfat 新增三正色並加傳統字色名
\ProvidesPackage{cncolours}[2018/07/05 v1.1 Chinese colour names]
\RequirePackage{xcolor}
\definecolor{粉红}{RGB}{255,179,167}
\definecolor{粉紅}{RGB}{255,179,167}
\definecolor{妃色}{RGB}{237,87,54}
\definecolor{品红}{RGB}{240,0,86}
\definecolor{品紅}{RGB}{240,0,86}
@iydon
iydon / Dockerfile
Created June 1, 2022 09:48
OpenFOAM
# docker build -t of:orig .
# docker run -dit of:orig
# docker exec -it `docker container ls --format "{{.ID}}"` bash
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive \
DIRECTORY=/root/OpenFOAM \
ALIASES=/root/.bash_aliases