Skip to content

Instantly share code, notes, and snippets.

View xatier's full-sized avatar
🍰
吃點心

xatier xatier

🍰
吃點心
  • ド田舎
View GitHub Profile
$ python -c "import llvm; llvm.test()"
llvmpy is installed in: /usr/local/lib/python2.7/dist-packages/llvm
llvmpy version: 0.11.2-12-gdb73237
2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3]
.............................('disable mattrs', '-sse3,-sse41,-sse42,-avx')
.('disable mattrs', '-sse41,-sse42,-avx')
.('disable mattrs', '-sse42,-avx')
.('disable mattrs', '-avx')
.Skipping: no AVX
$ python -c "import numba; numba.test()"Running tests in /usr/local/lib/python2.7/dist-packages/numba/numba
ran test files: failed: (2/148)
ld: cannot open output file /usr/local/lib/python2.7/dist-packages/numba/tests/compile_with_pycc.so:
Permission denied
Traceback (most recent call last):
@xatier
xatier / program.md
Last active December 17, 2015 17:09
PyCON.tw 2013

Day one

  • R0 Opening
  • R0 Keynoye: Making with Python 3 by David Beazley

break

  • R0 Python + NoSQL in the Animations by 官順暉
  • R0 懶人と Python と Animation Studio by 郭學聰

您好,昨晚半夜開賣的 hitcon2013 第一階段售票,我於 00:00 準時進入網頁,第一階段的資料填寫並無任何問題,但是送出訂票資訊後,網頁即呈現 loading 狀態,如圖:

等到正確 load 到網頁時,彈出時效已過期的問題 如圖:

但是按下確定後,頁面顯示為我仍有足夠的時間可以選擇付款方式 。如圖:

選擇付款方式後,整個網頁變爛掉了如圖:

重新登入後,購票信息顯示已過期。如圖

$ history | awk '{CMD[$2]++;count++;} END { for (a in CMD )print CMD[ a ]" " CMD[ a ]/count*100 "% " a}' | grep -v "./" | column -c 3 -s " " -t | sort -nr | nl | head -n 10
1 229 15.0956% vim
2 208 13.7113% sudo
3 178 11.7337% ls
4 158 10.4153% cd
5 84 5.53724% lua
6 51 3.3619% pacman
7 49 3.23006% git
8 36 2.3731% htop
9 28 1.84575% startx
@xatier
xatier / gol.py
Created June 13, 2013 08:12
A simple game of life in Python, idea from Allen Downey's Think Complexity Book http://www.greenteapress.com/compmod/
#!/usr/bin/python
import random
import time
class gol:
def __init__(self):
self._w = 30 # map width
self._prob = 0.5 # probability
self._map = []
@xatier
xatier / db proj 3 ans
Last active December 19, 2015 01:09
彭文志 db 2013 porject 3 demo 題目
# 1
彭文志老師在101學年度總共開了幾門課?
SELECT COUNT(C.id) FROM Course C, Professor P WHERE P.name = "彭文志" AND P.id = C.pro_id
# 2
資訊工程學系在上學期有幾門不同的課? (課名相同而老師不同視為相同)
SELECT COUNT(DISTINCT C.name) FROM Course C, Department D WHERE D.name = "資訊工程學系" AND D.id = C.department AND C.year = '1'
@xatier
xatier / npnt.me.pl
Created August 16, 2013 07:45
請用心眼填上適當的網址 ;-)
#!/usr/bin/env perl
use 5.014;
use WWW::Mechanize;
use List::MoreUtils qw(uniq);
# iframe printer
sub iframe_p {
my ($title, $id, $url) = @_;
@xatier
xatier / panda.pl
Created August 31, 2013 05:42
再度填上心眼吧!
#!/usr/bin/env perl
use 5.014;
use WWW::Mechanize;
use List::MoreUtils qw(uniq);
# XXX: change me!
my $url = "625301/282f4c93aa/";