Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
biu~biu~biu~

帝归 unionx

🦄
biu~biu~biu~
View GitHub Profile
View refresh.html
<!-- 随机名人名言代码开始 -->
<h3 style="margin-top:10px;">
<button id="click-me">Click Me!</button>
<left id="people-quote">
<!-- 可以把这里的 jquery 依赖放在本地 -->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript">
var butong_net = new Array(
'物理教授走过校园,遇到数学教授。物理教授在进行一项实验,他总结出一个经验方程,似乎与实验数据吻合,他请数学教授看一看这个方程。<br>一周后他们碰头,数学教授说这个方程不成立。可那时物理教授已经用他的方程预言出进一步的实验结果,而且效果颇佳,所以他请数学教授再审查一下这个方程。 <br> 又是一周过去,他们再次碰头。数学教授告诉物理教授说这个方程的确成立,但仅仅对于正实数的简单情形成立。',
@unionx
unionx / cron.py
Last active Aug 29, 2015
Sample script for using plan to write cron files
View cron.py
#!/usr/bin/env python3
from plan import Plan
import argparse
cron = Plan()
# write the cron jobs here:
cron.command("/usr/bin/pganalyze-collector --cron", every="5.minute")
@unionx
unionx / RecursionMax.java
Created Dec 15, 2014
Use recursion in Java is not right
View RecursionMax.java
import java.util.*;
public class RecursionMax {
public static Integer max(LinkedList<Integer> numberList, Integer maxNumber) {
if (numberList.size() == 0) {
return maxNumber;
} else {
Integer firstNumber = numberList.get(0);
if (maxNumber < firstNumber) {
@unionx
unionx / leancloud
Created Jan 16, 2015
Leancloud Python REST script
View leancloud
#!/usr/bin/env python3
import time
import json
import hashlib
import requests
appId = 'xxx'
appKey = 'xxx'
masterKey = 'xxx'
@unionx
unionx / makeup
Created Jan 19, 2015
化妆品整理
View makeup
#!/usr/bin/env python
makeupItem = {
'name': '香奈儿8号',
'category': '香水',
'price': 780,
'description': '一些评价blablabla'
}
View run.py
#!/usr/bin/env python3
from numba import jit
from numpy import arange
import cProfile
##@jit
def sum2d(arr):
M, N = arr.shape
result = 0.0
@unionx
unionx / about.md
Created Nov 9, 2011 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
View about.md
@unionx
unionx / about.org
Created Nov 22, 2011
My Programming Language
View about.org

My Programming Language

The language is a lisp dialect.

@unionx
unionx / calc.py
Created Mar 31, 2012
admaster_2012_3_30_count_rectangles
View calc.py
#!/usr/bin/env python
#coding:utf-8
# 题目:下图中一共有多少个矩形?星号表示挖空不计的部分
# # # # # # # # # # #
# # # # # # # # # # #
# # # * * * * # # # #
# # # * * * * # # # #
# # # * * * * # # # #
@unionx
unionx / test.el
Created Jul 30, 2012
read and split file in emacs lisp
View test.el
#!/usr/local/bin/emacs --script
(defun read-lines (filename)
(with-temp-buffer
(insert-file-contents filename)
(split-string (buffer-string) "\n" t)))
;; test.log
;; 111111,22222222222,3333333333333