Skip to content

Instantly share code, notes, and snippets.

View runningzyp's full-sized avatar
💭
we say ~~~

YunpengZhan runningzyp

💭
we say ~~~
  • Shanghai
View GitHub Profile
@runningzyp
runningzyp / index.html
Created April 17, 2020 01:49
Modal Interaction with Genie Effect
<div class="main-ctr">
<svg xmlns="http://www.w3.org/2000/svg" width="540" height="620" viewBox="0 0 540 620">
<g id="Page-1" fill="none" fill-rule="evenodd">
<g id="modal-with-genie-effect">
<path id="step-3" stroke="#979797" d="M186 561.005c0-2.764 2.234-5.005 4.998-5.005h157.004c2.76 0 4.998 2.242 4.998 5.005v33.99c0 2.764-2.234 5.005-4.998 5.005H190.998c-2.76 0-4.998-2.242-4.998-5.005v-33.99z" opacity=".504" />
<path id="step-2" stroke="#979797" d="M270.136 122h237.356c2.758 0 4.36 2.15 3.577 4.8 0 0-23.333 86.246-92.842 174.822-69.51 88.575-66.458 185.37-66.458 185.37-.033 2.776-2.25 5.008-5.01 5.008H193.51c-2.76 0-4.977-2.232-5.01-5.008 0 0 3.05-96.795-66.458-185.37C52.534 213.046 29.202 126.8 29.202 126.8c-.783-2.65.82-4.8 3.578-4.8h237.356z" opacity=".5" />
<path id="step-0" stroke="#979797" d="M20 26.003C20 23.24 22.23 21 25.01 21h489.98c2.767 0 5.01 2.242 5.01 5.003v289.994c0 2.763-2.23 5.003-5.01 5.003H25.01c-2.767 0-5.01-2.242-5.01-5.003V26.003z" />
<pat
@runningzyp
runningzyp / ipdb.py
Created October 11, 2021 06:35
python 断点调试
from ipdb import set_trace;set_trace(context=30)
@runningzyp
runningzyp / memery profile.py
Created November 10, 2021 03:42
内存占用
import psutil
import os
print(
"当前进程的内存使用:%.4f GB"
% (psutil.Process(os.getpid()).memory_info().rss / 1024 / 1024 / 1024)
)
@runningzyp
runningzyp / 📊Code-Life
Last active October 7, 2024 00:24
📊Code-Life : 30 September - 06 October
Python 2h,36m ██████████████████████ 100.00%
@runningzyp
runningzyp / gzipWriter.go
Created December 22, 2021 06:08 — forked from mchirico/gzipWriter.go
Example of writing a gzip file in go (golang). This appends data to the same file every time it is run. It is important to Flush() the data before closing the file.
/*
This is an example of a golang gzip writer program,
which appends data to a file.
*/
package main
@runningzyp
runningzyp / write gzip file 2.go
Last active February 9, 2022 09:49
类似 python io.BytesIO
func WriteGZ(path string, Inbytes []byte) []byte {
buf := &bytes.Buffer{}
gzWriter := gzip.NewWriter(buf)
fiWriter := bufio.NewWriter(gzWriter)
fiWriter.Write(Inbytes)
fiWriter.Flush()
gzWriter.Close()
S3.put(outBytes) // useage
}
@runningzyp
runningzyp / __wrapped__.py
Created March 10, 2022 01:55
decorator wrap order && decorator execution order
from functools import wraps
def decorator1(func):
print("start wrap1")
@wraps(func)
def wrapper(*args, **kwargs):
print("in decorator1")
result = func(*args, **kwargs)
print("return decorator1")
return result
@runningzyp
runningzyp / MRO.py
Last active March 10, 2022 02:17
order of python class inheritance
class A(object):
def test(self):
print('from A')
class B(A):
def test(self):
print('from B')
class C(A):
def test(self):
@runningzyp
runningzyp / weibo_unfollow.py
Created May 24, 2022 12:11
取关微博最近关注的博主
import requests
import json
# from tqdm import tqdm
filter_choice = {
"1": "7天内新增",
"2": "30天内新增",
"3": "半年内新增",
}
COOKIE = '' # 替换为自己的
@runningzyp
runningzyp / git.sh
Last active March 17, 2023 04:53
Git stash
# Description: Git aliases and functions
git stash push -S