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
match($0,/([[:digit:]]+).*(\..+)/,a) { printf "%s %s%s%s\n", ENVIRON["title"], ENVIRON["EPPREFIX"], a[1], a[2] } |
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
- 44% Riichi (1h closed) | |
- 39% Yakuhai (1h open) - dragons/round wind/seat wind | |
- 22% Tanyao (1h open) - only 2-8 | |
- 20% Pinfu (1h closed) - no triples/quads/yakuhai | |
- 18% Menzen Tsumo (1h closed) | |
- 6% Honitsu/Honiisou (2h open+) - One suit + honors | |
- 4% Iipeiko (1h closed) - same sequence twice | |
- 4% Sanshoku Doujun (1h open+) - same sequence in all 3 suits | |
- 3% Toitoi (2h open) - No sequences |
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
import sys | |
import re | |
import matplotlib.pyplot as plot | |
file_name = sys.argv[1] | |
with open(file_name) as f: | |
data = f.read() | |
domain = re.search('PING (.+) 56', data) | |
seq = re.findall('icmp_seq=(\d+)', data) |
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
local gears = require 'gears'; | |
local awful = require 'awful'; | |
--- Move a client to a location within a grid | |
-- @param c the client to move | |
-- @param sx the number of columns in the grid | |
-- @param sy the number of rows in the grid | |
-- @param px the zero-indexed destination column | |
-- @param py the zero-indexed destination row | |
function client_move_to_grid(c, sx, sy, px, py) |
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
local awful = require('awful'); | |
local memory = {} | |
local function client_focus(c) | |
-- do nothing if focusing client under cursor | |
if mouse.current_client == c then | |
return | |
end |
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
local awful = require('awful'); | |
local memory = {} | |
local function client_focus(c) | |
-- do nothing if focusing client under cursor | |
if mouse.current_client == c then | |
return | |
end |
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
import random | |
import math | |
def hi(x, halfw): | |
return x >> halfw | |
def lo(x, halfw): | |
return x & (1 << halfw) - 1 | |
def get_hiS(S, halfw): |
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
def split_into(ls, k): | |
output = [] | |
for i in range(k): | |
output.append([]) | |
i = 0 | |
for item in ls: | |
output[i % k].append(item) | |
i += 1 | |
return output |
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
; x = 5; | |
; fac = fun(x){ | |
; if(x <= 1){ | |
; return x; | |
; } | |
; v = fac(x-1); | |
; print("fac of " + (x-1) + " is " + v); | |
; return x * v; | |
; }; | |
; |
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
-- Original Author: http://www.roblox.com/Crypt-item?id=40531920 | |
-- A readable mirror: http://roblox-asset.comoj.com/40531920 | |
-- | |
-- I have modified the final bxor() declaration at the bottom | |
-- for optimization (CSE via local k1, k2, k3, k4) | |
local ins=table.insert | |
local mf=math.floor | |
local bxor=function(a,b) |
NewerOlder