This file contains hidden or 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 python2 | |
import curses | |
import random | |
stdscr = curses.initscr() | |
curses.noecho() | |
curses.cbreak() | |
stdscr.keypad(1) | |
curses.halfdelay(1) |
This file contains hidden or 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 requests | |
import re | |
DOMAINS = ['bit.ly'] | |
PATTERN = 'https?://{}/\w+' | |
def expand_short_url(short_url): | |
resp = requests.get(short_url, allow_redirects=False) | |
return resp.headers['location'] | |
This file contains hidden or 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
struct Attribute { | |
name: &str | |
required: bool | |
} | |
let attr: Attr = Default::default(); | |
let nested: Nested = Default::default(); | |
let baseColor = OOXMLObjectBuilder::base() | |
.def(Attr {name: "auto", ..attr} | |
.def(Attr {name: "indexed", ..attr} |
This file contains hidden or 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 itertools import permutations | |
for p in permutations(range(10)): | |
(s,e,n,d,m,o,r,y,*_) = p | |
send = (10*(10*(10*s+e)+n)+d) | |
more = (10*(10*(10*m+o)+r)+e) | |
money = (10*(10*(10*(m+o)+n)+e)+y) | |
if send + more == money: | |
print('send=%d', send) | |
print('more=%d', more) |
This file contains hidden or 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
mondrian.rolap.queryTimeout - we set it typically to 60 seconds to cancel too long running ad-hoc queries which generate too much load on the server | |
mondrian.rolap.maxQueryThreads - increase it to higher number to allow more parallel Mondrian query threads if you have many concurrent users | |
mondrian.rolap.cellBatchSize - we have been experimenting with this value but typically set it to 100000 (which is now the default value for Mondrian), by changing it you can modify batch size when retrieving large set of result cells | |
mondrian.native.ExpandNonNative - set to true to expand more MDX expressions to SQL | |
mondrian.rolap.evaluate.MaxEvalDepth - we set it to 20 as otherwise sometimes more complex MDX calculated members were failing | |
mondrian.rolap.EnableInMemoryRollup - we set it to false as we have some multi-valued dimensions which cannot be rolled up by making sum of measure values for detailed members therefore we always want rollup to be calculated using SQL | |
mondrian.util.memoryMon |
OlderNewer