Skip to content

Instantly share code, notes, and snippets.

View Brainor's full-sized avatar

Brainor Brainor

  • Peking University
  • Beijing
  • 10:14 (UTC +08:00)
View GitHub Profile
@Brainor
Brainor / bilibili_video_merge.sh
Created September 12, 2023 10:50
合并哔哩哔哩缓存视频
#!/usr/bin/env bash
# @Filename: bilibili_video_merge.sh
# @Author: wjsaya(http://www.wjsaya.top)
# @Date: 2019-06-25 10:18:36
# @Last Modified by: Li Zheng (flyskywhy@gmail.com)
# @Last Modified time: 2022-07-06
function do_merge() {
# do_merge args1
@Brainor
Brainor / github.md
Created November 24, 2022 13:01
GitHub小技巧
@Brainor
Brainor / python_benchmark.py
Last active April 25, 2021 03:53 — forked from Coldsp33d/conditional_col_creation_benchmark.py
比较代码所需时间
import pandas as pd
import perfplot
def numpy_where(df):
return df.assign(is_rich=np.where(df['salary'] >= 50, 'yes', 'no'))
def list_comp(df):
return df.assign(is_rich=['yes' if x >= 50 else 'no' for x in df['salary']])
def loc(df):