This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from pylab import * | |
''' | |
用于验证百分百胜利的赌博博弈模型 | |
缺点是需要准备大量资金 | |
数学模型由于不会化简一个基于迭代的公式 | |
还没能成功后建立 | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
helpDoc = ''' | |
Add Page Number to PDF file with Python | |
Python 给 PDF 添加 页码 | |
usage: | |
python addPageNumberToPDF.py [PDF path] | |
require: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue May 8 20:40:30 2018 | |
@author: yanglei | |
""" | |
''' | |
# Detection Python Environment, Especially distinguish Spyder, Jupyter notebook, Qtconsole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name removeZhihuHot | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over your time line! | |
// @author leiYang | |
// @match https://www.zhihu.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Merge multi GIF pictures into one GIF. | |
requirement: | |
pip install boxx>=0.9.1 | |
@author: DIYer22@github | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Download all DIYer22's weekly review and save to one markdown file | |
Created on Mon Jun 25 20:41:22 2018 | |
@author: Lei Yang | |
""" | |
from boxx import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
code for self-attention | |
see self-attention GAN | |
none-local | |
@author: yl | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boxx import * | |
import numpy as np | |
def zzy(M): | |
# M = np.array([[1,1],[2,2],[3,3]]) | |
a2 = np.sum(M*M, axis = 1).reshape(1,-1) | |
b2 = a2.T | |
ab = M.dot(M.T) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name html_table_auto_sort | |
// @namespace Diyer22 | |
// @description Tempermonkey version of [html-table-sort](https://github.com/jchamet/html-table-sort), and support sorting table in asynchronous content(like gitlab) | |
// @include * | |
// @version 1.7 | |
// @grant none | |
// ==/UserScript== | |
/* |
OlderNewer