global text
With Peasy, you write the parser by hand, just like to write any other kind of program.
You need not play many balls like that any more:
You just play one ball like so:
,
You can embeded other features in the grammar rules seamless, such as lexer, rewriter, semantic action, error
process( error reporting, error recovering) or any other tasks; you can dynamicly modify the grammar rules, even
the parsed object, if you wish.
Instead of a tool or a library, Peasy is rather a new method to write parser. As a demonstration, Peasy presents
itself as a module of single file, which includes some global variables used while parsing, some functions to
process left recursives symbols, some matchers which parse the text, and some cominators of matchers.
With the method provided by Peasy, you can parse any object which is not only text, but also array, embedded list,
binary stream, or other data structures, like tree, graph, and so on.
memorize
).Peasy provided two method to tell which symbols are left recursive.
This module presents the semiautomatic method:
At first you write grammar rules in this manner: replace one and only one of
grmmar.symbol in the grammar rule with memo(symbol) for every left recursive circles. Before parsing, you first call
intialize(), and tell which symbol are left call or left recursive by calling addParentChildrens(grammar, parentChildren)
and/or addRecursiveCircles(grammar, recursiveCircles...), and: call computeLeftRecursives(grammar), now
everything about left recursive symbols is computed and you can call parse(data, grammar, root) to do the work.
The notation @name in the comment below means a global variable, and $name means a parameter.
It is for the performace reason that I use global variables, and at some time I will provide another version which have the class Parser for people who prefer modularization to speed. Of course you can modify the code to have the class Parser yourself if you like. It's just a snap to do that.
some global variable used while parsing
the text which is being parsed
Don't be confused by the variable name, it could be not only text strings but also array, sequence, tree, graph,etc.
global text
the length of @text
global textLength
the current position of parsing, use text[cursor] to get current character in parsed stream
global cursor
the grammar object which contains all of rules defined for the symbol in grammar.
global grammar
saved the original rules of the grammar.
global originalRules
store the wrapped function to rule of the left recursive symbol with recursive
, and before entering them, store it in grammar too.
when entering them, grammar[symbol]
is unwrapped to originalRules[symbol]
or memorizeRecursives[symbol]
global recursiveRules
global symbolDescedentsMap
if you would like to use just symbol itself as the hash head, remove these four lines below and other correlative stuffs.
{symbol: tag}, from rule symbol map to a shorter memo tag, for memory efficeny
global symbolToTagMap
{tag: True}, record tags that has been used to avoid conflict
global tags
global parseCache # {tag+start: [result, cursor]}, memorized parser result
global functionCache # memorized normal function result
intialize: clear global varialbes. you should call intialize()
at first.
def initialize(aGrammar):
global grammar, parseCache, functionCache, originalRules, recursiveRules, symbolDescedentsMap,\
symbolToTagMap, tags
grammar = aGrammar
grammar.parentToChildren = {}
parseCache = {}
functionCache = {}
originalRules = {}
recursiveRules = {}
symbolDescedentsMap = {}
symbolToTagMap = {}
tags = {}
_parse: parse $data from $root with $aGrammar.
before parsing, you should tell the informations about left recursion in grammar.
def parse(data, aGrammar, root=None):
global text, textLength, cursor
text = data
textLength = len(text)
cursor = 0
root = root or aGrammar.rootSymbol
return getattr(grammar, root)(0)
parse: this is a sample parse function to demonstrate on how to write your own grammar rules yourself.
notice that there exists indirect left recursion in the grammar.
def parseSample(text):
generate the matchers by the combinators in advance for better performance.
if you don't mind performance, you can write them in the rule directly.
a = char('a'); b = char('b'); x = char('x')
memoA = memo('A')
the grammar rules object.
class rules:
rootSymbol = 'A'
def A(self,start):
add or memoResult
to prevent executing nonrecursive part more than once.
memoResult = m = rules.B(start)
return (m and x(p.cur()) and m+'x' or memoResult) or a(start)
def B(self,start): return rules.C(start)
def C(self,start): return memoA(start) or b(start)
initialize()
addRecursiveCircles(rules, ['A', 'B', 'C'])
computeLeftRecursives(rules)
parse(text, rules)
use addParentChildren(grammar, parentChildrens)
or addRecursiveCircles(grammar, recursiveCircles...)
to tell
the left calling relations between symbols in the grammar
addParentChildrens: add direct left call parent->children relation for $parentChildrens to @symbolToParentsMap
e.g. addRecursiveCircles(grammar, {A:['B'], B:['A', 'B']})
def addParentChildrens(grammar, parentChildren):
map = grammar.parentToChildren
for parent, children in parentChildren:
list = map.setdefault(parent, [])
for name in children:
if name not in list: list.append(name)
addRecursiveCircles: add left recursive parent->children relation to grammar.parentToChildren
for symbols in @recursiveCircles
e.g. addRecursiveCircles(grammar, ['A', 'B'], ['B'])
tell the same left recursive relations as above sample.
def addRecursiveCircles(grammar, *recursiveCircles):
map = grammar.parentToChildren
for circle in recursiveCircles:
length = len(circle)
for i in range(length):
if i==length-1: j = 0
else: j = i+1
name = circle[i]
parent = circle[j]
list = map.setdefault(parent, [])
if name not in list: list.append(name)
computeLeftRecursives: after telling left recursive relations, compute the left recsives group and wrap symbol in
them with recursive
function
def computeLeftRecursives(grammar):
global symbolDescedentsMap, originalRules
parentToChildren = grammar.parentToChildren
def addDescendents(symbol, meetTable, descedents):
children = parentToChildren[symbol]
for child in children:
if child not in descedents: descedents.append(child)
if child not in meetTable: addDescendents(child, meetTable, descedents)
symbolDescedentsMap = {}
for symbol in parentToChildren:
meetTable = {}; meetTable[symbol] = True
descendents = symbolDescedentsMap[symbol] = []
addDescendents(symbol, meetTable, descendents)
if symbol in descendents:
originalRules[symbol] = getattr(grammar, symbol)
setattr(grammar, symbol, recursive(symbol))
symbolDescedentsMap
recursive: this is the key function to left recursive.
Make $symbol a left recursive symbol, which means to wrap originalRules[symbol]
with recursive.
when recursiv(symbol)(start) is executed, first let rule = grammar[symbol]
, grammar[symbol] = originalRules[child]
for
all symbols in left recursive circles and loop computing rule(start) until no changes happened, and
restore all symbols in left recursive cirle to recursiveRules[symbol]
at last.,
def recursive(symbol):
rule = originalRules[symbol]
def matcher(start):
global cursor
for child in symbolDescedentsMap[symbol]:
setattr(grammar, child, originalRules[child])
hash = symbol+str(start)
m = parseCache.setdefault(hash, [None, -1])
if m[1]>=0: cursor = m[1]; return m[0]
while 1:
result = rule(start)
if m[1]<0:
m[0] = result
if result: m[1] = cursor
else: m[1] = start
else:
if m[1]==cursor: m[0] = result; return result
elif cursor<m[1]: m[0] = result; cursor = m[1]; return result
else: m[0] = result; m[1] = cursor
for child in symbolDescedentsMap[symbol]:
grammar[child] = recursiveRules[child]
return result
return matcher
memo: lookup the memorized result and reached cursor for $symbol at the position of $start
It is set up automaticly by computeLeftRecursives(grammar)
for the symbols which is left recursive.
For other symbol, you should be able to call this in rule mannually.
def memo(symbol):
def matcher(start):
global parseCache, cursor
hash = symbol+str(start)
try:
m = parseCache[hash]
if m: cursor = m[1]; return m[0]
except: return
return matcher
setMemorizeRules: set the symbols in grammar which memorize their rule's result.
this function should be used only for the symbols which is not left recursives.
you can do this after initialize()
and before parse(...)
.
def setMemorizeRules(grammar, symbols):
for symbol in symbols:
originalRules[symbol] = grammar[symbol]
grammar[symbol] = memorize(symbol)
memorize: memorize result and cursor for $symbol which is not left recursive.
The symbols which is left recursive should be wrapped by recursive(symbol)
, not memorize(symbol)
!!!
def memorize(symbol):
tag = symbolToTagMap[symbol]
rule = originalRules[symbol]
def matcher(start):
hash = tag+start
m = parseCache[hash]
if m: cursor = m[1]; return m[0]
else:
result = rule(start)
parseCache[hash] = [result, cursor]
return result
return matcher
setMemoTag: find a shorter part of symbol as the head of hash tag to index @parseCache
It exists just for performance reason. If you don't like this idea, you can remove the stuffs about memo tag yourself and
just use symbol itself as the head of hash tag.
def setMemoTag(symbol):
for i in range(len(symbol)):
if symbol[0:i] not in tags: break
tag = symbol[0:i]
symbolToTagMap[symbol] = tag
tags[tag] = True
A matcher is a function which read the text being parsed and move cursor directly.
All matcher should return truth value on succeed, and return falsic value on fail.
A combinator is a function which receive zero or more matchers as parameter(maybe plus some other parameters
which are not matchers), and generate a new matchers.
there are other matcher generator besides the standard combinators described as above, like recursive
, memo
, memorize
,
which we have met above.
def isMatcher(item): return hasattr(obj, '__call__')
combinator andp
execute item(cursor) in sequence, return the result of the last one.
when andp
is used to combined of the matchers, the effect is the same as by using the Short-circuit evaluation, like below:
item1(start) and item2(cursor] ... and itemn(cursor).
In fact, you maybe would rather like to use item1(start) and item2(cursor) ..
when you write the grammar rule in the
manner of Peasy. That would be simpler, faster and more elegant.
And in that manner, you would have more control on your grammar rule, say like below:
if (x=item1(start) and (x>100) and item2(cursor) and not item3(cursor) and (y = item(cursor)): doSomething()
def andp(items):
items1 = []
for item in items:
if not isMatcher(item): items1.append(literal(item))
else: items1.append(item)
def matcher(start):
global cursor
cursor = start
for item in items1:
result = item(cursor)
if not(result): return
return result
combinator orp
execute item(start)
one by one, until the first item which is evaluated to truth value and return the value.
when orp is used to combined of the matchers, the effect is the same as by using the Short-circuit evaluation, like below:
item1(start) or item2(cursor] ... or itemn(cursor)
In fact, you maybe would rather like to use item1(start) or item2(cursor) ..
when you write the grammar rule in the
manner of Peasy. That would be simpler, faster and more elegant.
And in that manner, you would have more control on your grammar rule, say like below:
if ((x=item1(start) and (x>100)) or (item2(cursor) and not item3(cursor)) or (y = item(cursor)): doSomething()
def orp(*items):
items1 = []
for item in items:
if not isMatcher(item): items1.append(literal(item))
else: items1.append(item)
def matcher(start):
for item in items1:
result = item(start)
if result: return result
return result
combinator notp
notp
is not useful except being used in other combinators, just like this: andp(item1, notp(item2))
.
It's unnessary, low effecient and ugly to write notp(item)(start)
, just write not item(start)
.
def notp(item):
if not isMatcher(item): item = literal(item)
def matcher(start): return not item(start)
return matcher
combinator any: zero or more times of item(cursor)
def any(item):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
result = []; cursor = start
while 1:
x = item(cursor)
if x: result.append(x)
else: break
return result
return matcher
combinator some: one or more times of item(cursor)
def some(item):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
result = []; cursor = start
x = item(cursor)
if not x: return x
while 1:
result.append(x)
x = item(cursor)
if not x: break
return result
return matcher
combinator may: a.k.a optional
try to match item(cursor)
, wether item(cursor)
succeed or not, maybe(item)(start)
succeed.
def optional(item):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
cursor = start
x = item(cursor)
if x: return x
else: cursor = start; return True
return matcher
combinator follow
try to match item(start)
, if succeed, reset cursor and return the value of item(start)
whether succeed or not, cursor is reset to start
def follow(item):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
cursor = start
x = item(cursor)
if x: cursor = start; return x
return matcher
combinator times: match $n times item(cursor), n>=1
def times(item, n):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
cursor = start
for i in range(n):
x = item(cursor)
if x: result.append(x)
else: return
return result
return matcher
combinator seperatedList: some times item(cursor), separated by @separator
def seperatedList(item, separator=None):
if separator is None: separator = spaces
if not isMatcher(item): item = literal(item)
if not isMatcher(separator): separator = literal(separator)
def matcher(start):
global cursor
cursor = start
result = []
x = item(cursor)
if not x: return
while 1:
result.append(x)
x = item(cursor)
if not(x): break
return result
return matcher
combinator timesSeperatedList: given @n times $item separated by @separator, n>=1
def timesSeperatedList(item, n, separator=None):
if separator is None: separator = spaces
if not isMatcher(item): item = literal(item)
if not isMatcher(separator): separator = literal(separator)
def matcher(start):
global cursor
cursor = start
result = []
x = item(cursor)
if not x: return
for i in ranges(n-1):
result.append(x)
x = item(cursor)
if not x: break
return result
return matcher
As the same as andp, orp, in the manner of Peasy, you would rather to write youself a loop to do the things, instead
of useing the combinators like any, some, times, seperatedList,etc. and that would be simpler, faster and more elegant.
And in that manner, you would have more control on your grammar rule so that we can do other things include lexer,
error report, errer recovery, semantic operatons, and any other things you would like to do.
It is for three motives to put all of the stuffs abve here:
1. to demonstrate how to write matcher and grammar rules in the method brought by Peasy
2. to demonstrate that Peasy can implement any component that other combinational parser libaries like pyparsing,
parsec too, but in a simpler, faster manner.
* 3. to show that it is how easy to write the matchers in the manner of Peasy.
As you have seen above, all of these utilities is so simple that you can write them at home by hand easily. In fact, you can write yourself all of the grammar rules in the same manner as above.
If you like, you can add a faster version for every matcher, which do not pass $start as parameter around.
Some of the matchers below have two version, to demonstrate how to do that.
Don't use the faster version in orp, any, some, times, separatedList, timesSeparatedList.
A predicate is a function which return True or False, usually according to its parameter, but not look at parsed object.
below is some little utilities may be useful. Three version of some of them is provided.
just remove them if you don't need them, except literal, which is depended by the matchers above.
matcher literal, normal version
match a text string.
`notice: some combinators like andp, orp, notp, any, some, etc. use literal to wrap a object which is not a matcher.
def literal(string):
def matcher(start):
global cursor
len = string.length
stop = start+len
if text[start:stop]==string: cursor = stop; return True
matcher literal_, faster version
match a text string.
def iteral_(string):
def matcher(start):
global cursor
len = string.length
if text.slice(cursor, stop = cursor+len)==string:
cursor = stop; return True
return matcher
matcher char, normal version
match one character
def char(c):
def matcher(start):
global cursor
if start>=textLength: return
if text[start]==c: cursor = start+1; return c
return matcher
matcher char_, normal version
match one character
def char_(c):
def matcher():
global cursor
if text[cursor]==c: cursor += 1; return c
return matcher
In spaces, spaces, spaces1, spaces1, a tat('\t') is seen as tabWidth spaces,
which is used in indent style language, such as coffeescript, python, haskell, etc.
If you don't need this feature, you can easily rewrite these utilities to remove the code about tab width yourself.
matcher spaces, normal version
zero or more whitespaces, ie. space or tab.
def spaces(start):
global cursor
len = 0
cursor = start
text = text
while 1:
c = text[cursor]
cursor += 1
if c==' ': len += 1
elif c=='\t': len += tabWidth
else: break
return len
matcher spaces_, faster version
zero or more whitespaces, ie. space or tab.
def spaces_():
global cursor
len = 0
text = text
while 1:
c = text[cursor]
cursor += 1
if c==' ': len += 1
elif c=='\t': len += tabWidth
else: break
return len
matcher spaces1, normal version
one or more whitespaces, ie. space or tab.
def spaces1(start):
global cursor
len = 0
cursor = start
text = text
while 1:
c = text[cursor]
cursor += 1
if c==' ': len += 1
elif c=='\t': len += tabWidth
else: break
if len: return len
matcher spaces1_, faster version
one or more whitespaces, ie. space or tab.
def spaces1_():
global cursor
len = 0
while 1:
c = text[cursor]
cursor += 1
if c==' ': len += 1
elif c=='\t': len += tabWidth
else: break
if len: return len
matcher wrap, normal version
match left,: match item, match right at last
def wrap(item, left=spaces, right=spaces):
if not isMatcher(item): item = literal(item)
def matcher(start):
global cursor
if not left(start): return
result = item(cursor)
if result and right(cursor): return result
return matcher
matcher identifierLetter: normal version
is a letter than can be used in identifer?
javascript style, '$' is a identifierLetter_
def identifierLetter(start):
global cursor
cursor = start
c = text[cursor]
if c is '$' or c is '_' or 'a'<=c<'z' or 'A'<=c<='Z' or '0'<=c<='9':
cursor += 1;
return True
matcher identifierLetter_, version
is a letter that can be used in identifer?
javascript style, '$' is a identifierLetter_
def identifierLetter_():
global cursor
c = text[cursor]
if c is '$' or c is '_' or 'a'<=c<'z' or 'A'<=c<='Z' or '0'<=c<='9':
cursor += 1;
return True
matcher followIdentifierLetter_, faster version
lookahead whether the following character is a letter used in identifer. don't change cursor.
javascript style, '$' is a identifierLetter_
def followIdentifierLetter_():
c = text[cursor]
return c is '$' or c is '_' or 'a'<=c<'z' or 'A'<=c<='Z' or '0'<=c<='9'
def isIdentifierLetter(c): return 'a'<=c<='z' or 'A'<=c<='Z' or '0'<=c<='9' or 'c'=='$' or 'c'=='_'
predicate isdigit
def isdigit(c): return '0'<=c<='9'
matcher digit, normal version
def digit(start):
global cursor
c = text[start];
if '0'<=c<='9': cursor = start+1; return True
matcher digit_, faster version
def digit_():
global cursor
c = text[cursor];
if '0'<=c<='9': cursor += 1; return True
predicate isletter
def isalpha(c): return 'a'<=c<='z' or 'A'<=c<='Z'
isletter = isalpha
matcher letter, normal version
def alpha(start):
global cursor
c = text[start];
if 'a'<=c<='z' or 'A'<=c<='Z': cursor = start+1; return True
letter = alpha
matcher letter, faster version
def alpha_():
global cursor
c = text[cursor];
if 'a'<=c<='z' or 'A'<=c<='Z': cursor += 1; return True
letter_ = alpha_
predicate: islower
def islower(c): return 'a'<=c<='z'
matcher lower, normal version
def lower(start):
global cursor
c = text[start];
if 'a'<=c<='z': cursor = start+1; return True
matcher lower_, faster version
def lower_():
global cursor
c = text[cursor];
if 'a'<=c<='z': cursor += 1; return True
def isupper(c): return 'A'<=c<='Z'
matcher upper, normal version
def upper(start):
global cursor
c = text[start];
if 'A'<=c<='Z': cursor = start+1
matcher upper_, faster version
def upper_(start):
global cursor
c = text[cursor];
if 'A'<=c<='Z': cursor += 1
matcher identifier, normal version
def identifier(start):
global cursor
cursor = start
c = text[cursor]
if 'a'<=c<='z' or 'A'<=c<='Z' or 'c'=='$' or 'c'=='_': cursor += 1
else: return
while 1:
c = text[cursor]
if 'a'<=c<='z' or 'A'<=c<='Z' or '0'<=c<='9' or 'c'=='$' or 'c'=='_': cursor += 1
else: break
True
matcher identifier_, faster version
def identifier_(start):
global cursor
c = text[cursor]
if 'a'<=c<='z' or 'A'<=c<='Z' or 'c'=='$' or 'c'=='_': cursor += 1
else: return
while 1:
c = text[cursor]
if 'a'<=c<='z' or 'A'<=c<='Z' or '0'<=c<='9' or 'c'=='$' or 'c'=='_': cursor += 1
else: break
True
The utilites above is just for providing some examples on how to write matchers for Peasy.
In fact, It's realy easy peasy to write the matchers for your grammar rule yourself.
see easy peasy
These utilities below exists for people who want to use these file a independent module, and put the grammar rule in
another separated file.
gettext: get the being pased text
If you use this file to contain the grammar rules, just directly use text
and use text[cursor]
to get current character, text.slice(cursor, cursor+n)
to get substring of the text, if
text is a string object.
def gettext(): return text
If you use this file to contain the grammar rules, just directly use cursor
or cursor = n
or cursor += 1
or cursor--
def cur(): return cursor
def setcur(pos):
global cursor
cursor = pos
return cursor
It's a pity that assign in python is a statement and can not occur in expression.
So We can not write x = Additive(start) and op = Op(cursor) and y = Multiply(cursor) and op(x, y)
As a workaround, we assign some Var beforehand, e.g. x, y, op = vars(3)
and then we can write like this:
x.set(Additive(start)) and op << Op(cursor) and y << Multiply(cursor) and op(x, y)
we can also wrtie like below:
x << Additive(start) and op << Op(cursor) and y << Multiply(cursor) and op.v(x.v, y.v)
If you do not need them, you may remove any overload definitions below except left shift.
And you can use var.v at every place and remove all of the overload definitions, and that will make program faster.
def vars(n): [Var() for i in range(n)]
class Var:
def __init__(self, name=''):
name is unnecessary attribute. remove it if you like.
self.name = name
self.v = None
faked assignment, let we can write in rules like so: x << memo('Add')(start) and op << Op(cursor)
def __lshift__(self, y): selv.v = y; y
had best reserve the overloading to nonzero. and then you can write like below:
class Rules
def Add(self, start):
x, op, y = vars(3)
return x << memo('Add')(start) and op << Op(cursor) and y << Mul(cursor) and op.v(x.v, y.v) \
or x\
or Mul(start)
def __nonzero__(self): return self.v
def __repr__(self): self.name+':'+repr(self.v)
You can overload the attribute of Var on demand.
Or overload none of them.
def __lt__(self, y):
if isinstance(y, Var): y = y.y
return self.v<y
def __le__(self, y):
if isinstance(y, Var): y = y.y
return self.v<=y
def __eq__(self, y):
if isinstance(y, Var): y = y.y
return self.v==y
def __ne__(self, y):
if isinstance(y, Var): y = y.y
return self.v!=y
def __gt__(self, y):
if isinstance(y, Var): y = y.y
return self.v>y
def __ge__(self, y):
if isinstance(y, Var): y = y.y
return self.v>=y
def __setattr__(self, attr, value):
if attr=='set': self.v = value; return self
return getattr(self.v, attr, value)
def __getattr__(self, attr):
return getattr(self.v, attr)
def __call__(self, *args, **kwargs):
args = [(arg.v if isinstance(arg, Var) else arg) for arg in args]
kwargs = {k:(v.v if isinstance(v, Value) else v) for k, v in kwargs}
return self.v(*args, **kwargs);
def __getitem__(self, key):
if isinstance(y, Var): y = y.y
return self.v[key]
def __add__(self, y):
if isinstance(y, Var): y = y.y
return self.v+y
def __sub__(self, y):
if isinstance(y, Var): y = y.y
return self.v-y
def __mul__(self, y):
if isinstance(y, Var): y = y.y
return self.v*y
def __floordiv__(self, y):
if isinstance(y, Var): y = y.y
return self.v//y
def __div__(self, y):
if isinstance(y, Var): y = y.y
return self.v/y
def __truediv__(self, y):
if isinstance(y, Var): y = y.y
return self.v//y
def __mod__(self, y):
if isinstance(y, Var): y = y.y
return self.v%y
def __pow__(self, y):
if isinstance(y, Var): y = y.y
return self.v**y
def __rshift__(self, y):
if isinstance(y, Var): y = y.y
return self.v>>y
def __and__(self, y):
if isinstance(y, Var): y = y.y
return self.v&y
def __xor__(self, y):
if isinstance(y, Var): y = y.y
return self.v^y
def __or__(self, y):
if isinstance(y, Var): y = y.y
return self.v|y
def __radd__(self, y):
if isinstance(y, Var): y = y.y
return y+self.v
def __rsub__(self, y):
if isinstance(y, Var): y = y.y
return y-self.v
def __rmul__(self, y):
if isinstance(y, Var): y = y.y
return y*self.v
def __rfloordiv__(self, y):
if isinstance(y, Var): y = y.y
return y//self.v
def __rdiv__(self, y):
if isinstance(y, Var): y = y.y
return y/self.v
def __rtruediv__(self, y):
if isinstance(y, Var): y = y.y
return y/self.v
def __rmod__(self, y):
if isinstance(y, Var): y = y.y
return y&self.v
def __rpow__(self, y):
if isinstance(y, Var): y = y.y
return y**self.v
def __rlshift__(self, y):
return y<<self.vr
def __rshift__(self, y):
if isinstance(y, Var): y = y.y
return y>>self.v
def __rand__(self, y):
return y&self.v
def __rxor__(self, y):
if isinstance(y, Var): y = y.y
return y^self.v
def __ror__(self, y):
return y|self.v;
def __iadd__(self, y):
self.v += y; return self
def __isub__(self, y):
self.v -= y; return self
def __imul__(self, y):
if isinstance(y, Var): y = y.y
self.v *= y; return self
def __ifloordiv__(self, y):
if isinstance(y, Var): y = y.y
self.v//=y; return self
def __idiv__(self, y):
if isinstance(y, Var): y = y.y
self.v/=y; return self
def __itruediv__(self, y):
if isinstance(y, Var): y = y.y
self.v/=y; return self
def __imod__(self, y):
if isinstance(y, Var): y = y.y
self.v%=y; return self
def __ipow__(self, y):
if isinstance(y, Var): y = y.y
self.v**=y; return self
def __ilshift__(self, y):
if isinstance(y, Var): y = y.y
self.v<<=y; return self
def __irshift__(self, y):
if isinstance(y, Var): y = y.y
self.v>>=y; return self
def __iand__(self, y):
if isinstance(y, Var): y = y.y
self.v&=y; return self
def __ixor__(self, y):
if isinstance(y, Var): y = y.y
self.v^=y; return self
def __ior__(self, y):
if isinstance(y, Var): y = y.y
self.v|=y; return self
def __iter__(self): return iter(self.v)
def __neg__(self): return -self.v>=y
def __pos__(self): return +self.v
def __abs__(self): return abs(self.v)
def __invert__(self): return ~self.v


| Total net profit | -55.55 | Gross profit | 48.43 | Gross loss | -103.98 |
| Profit factor | 0.47 | Expected payoff | -0.51 | ||
| Absolute drawdown | -60.31 | Maximal drawdown (%) | 63.46 (2014.6%) | ||
| Total trades | 108 | Profit trades (% of total) | 45 (41.67%) | Loss trades (% of total) | 63 (58.33%) |
| Long positions (won %) | 61 (44.26%) | Short positions (won %) | 47 (38.3%) | ||
| Largest | profit trade | 3.24 | loss trade | -2.97 | |
| Average | profit trade | 1.08 | loss trade | -1.65 | |
| Minimum | profit trade | 0.0 | loss trade | -0.01 | |
| Maximum | take profit in pips | 47.0 | stop loss in pips | -45.4 | |
| Average | take profit in pips | 15.0 | stop loss in pips | -28.1 | |
| Minimum | take profit in pips | -3.5 | stop loss in pips | -5.6 | |
| Maximum | Reward-Risk | 6.5 | Duration in minutes | 1225 | |
| Average | Reward-Risk | 0.7 | Duration in minutes | 115.3 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0 | |
| Maximum | consecutive wins (profit in money) | 5.0 (5.24) | consecutive losses (loss in money) | 5.0 (-8.66) | |
| Average | consecutive wins | 1.0 | consecutive losses | 2.0 |
| Total net profit | -29.61 | Gross profit | 24.66 | Gross loss | -54.27 |
| Profit factor | 0.45 | Expected payoff | -0.49 | ||
| Absolute drawdown | -29.79 | Maximal drawdown (%) | 33.73 (856.09%) | ||
| Total trades | 61 | Profit trades (% of total) | 27 (44.26%) | Loss trades (% of total) | 34 (55.74%) |
| Largest | profit trade | 3.15 | loss trade | -2.97 | |
| Average | profit trade | 0.91 | loss trade | -1.6 | |
| Minimum | profit trade | 0.05 | loss trade | -0.01 | |
| Maximum | take profit in pips | 43.4 | stop loss in pips | -45.4 | |
| Average | take profit in pips | 9.7 | stop loss in pips | -29.9 | |
| Minimum | take profit in pips | -3.5 | stop loss in pips | -7.0 | |
| Maximum | Reward-Risk | 1.5 | Duration in minutes | 1140.0 | |
| Average | Reward-Risk | 0.4 | Duration in minutes | 117.8 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 0.0 | |
| Maximum | consecutive wins (profit in money) | 3.0 (3.39) | consecutive losses (loss in money) | 4.0 (-6.73) | |
| Average | consecutive wins | 1.0 | consecutive losses | 2.0 |
| Total net profit | -25.94 | Gross profit | 23.77 | Gross loss | -49.71 |
| Profit factor | 0.48 | Expected payoff | -0.55 | ||
| Absolute drawdown | -30.7 | Maximal drawdown (%) | 29.0 (-1705.88%) | ||
| Total trades | 47 | Profit trades (% of total) | 18 (38.3%) | Loss trades (% of total) | 29 (61.7%) |
| Largest | profit trade | 3.24 | loss trade | -2.52 | |
| Average | profit trade | 1.32 | loss trade | -1.71 | |
| Minimum | profit trade | 0.0 | loss trade | -0.08 | |
| Maximum | take profit in pips | 47.0 | stop loss in pips | -39.8 | |
| Average | take profit in pips | 21.9 | stop loss in pips | -25.8 | |
| Minimum | take profit in pips | -1.1 | stop loss in pips | -5.6 | |
| Maximum | Reward-Risk | 6.5 | Duration in minutes | 1225.0 | |
| Average | Reward-Risk | 1.0 | Duration in minutes | 112.0 | |
| Minimum | Reward-Risk | Duration in minutes | 0.0 | ||
| Maximum | consecutive wins (profit in money) | 3.0 (1.21) | consecutive losses (loss in money) | 5.0 (-9.43) | |
| Average | consecutive wins | 1.0 | consecutive losses | 2.0 |


Event Location:
Duthie Center for Engineering
222 Eastern Pkwy
Louisville, Kentucky
Abstract:
Do you feel that you are overworked and always fighting fires and never can get ahead? In this session, I will help you identify what is important to your job and how to find the time to address those critical tasks. I will share scripts to automate those tasks that are central to all DBAs and discuss how to establish a methodology to quickly automate daily database chores. The flip side of automation is auditing. Routine auditing your server is essential to avoid nasty surprises that can lead to a loss of control. We will create an auditing system using features within SQL Server, including Policy Based Management and scripts that will provide you peace of mind to enjoy your work and maybe even life beyond the office.
Speaker(s): Sarah Barela,
Abstract:
Taking the periodic table of elements into consideration I've created The Periodic Table of Dynamic Management Objects as a reference tool for these functions and views that have become so critical for today's SQL Server DBA to performance tune and gain metadata insights into their various SQL instances. In navigating the table we will examine key DMVs and DMFs of interest: requests, sessions, wait stats, indexes, system information will all be covered. We will also delve into how these DMOs - just like their elemental counterparts - can be combined to yeild interesting insights into your servers. We will also look at how things can go awry as well! Like mixing vinegar and baking soda, sometimes combining DMOs can cause a big mess too!
Speaker(s): Tim Ford,
Abstract:
Almost every SQL Developer is familiar with Table Variables and Temporary Tables. While each of these objects represent temporary storage, there are also substantial differences between them. Understanding the differences between Table Variables and Temporary Tables, and the ramifications that those differences cause, is essential to being able to properly select the appropriate object for use in your development tasks. In this code filled session, we’ll discover the differences and similarities of Temporary Tables and Table Variables, dispel some widespread myths about each, and answer the most important questions of them all, "When do I use one or the other and what are the various impacts of doing so?"
Speaker(s): Wayne Sheffield,
Abstract:
SSRS 2008 R2 provides powerful capabilities to help us develop sophisticated reports from Microsoft SQL Server Analysis Services. Unfortunately, many of these features, such as the server aggregation function, are commonly ignored by report developers. The result: redundant work in the reporting layer. In this session, BI Architect and MVP Bill Pearson exposes ways to optimize reporting from SSAS by writing MDX that leverages, rather than replicates, what the cube is designed to do best.
Speaker(s): William E Pearson III,
Abstract:
The Policy-Based Management feature in SQL Server 2008 provides a great way to ensure your systems are configured consistently and correctly, but it can be tedious to implement on each server in your environment. PowerShell scripts allow you to automate the implementation of your policies so you can focus on more important problems. This session will walk you through how PBM works, how to define your policies in PowerShell, and how to set up Agent jobs to evaluate those policies regularly to let you know when you need to take action.
Speaker(s): Allen White,
Abstract:
Cloud computing is one of the hot topic issues of the day and Microsoft is pushing hard to show that they are in the game to win. As such, SQL Azure is your data storage in the cloud solution. However, the platform is much different from simply a SQL Server that sits in the cloud and needs to be approached in an intelligent manner. In this fast paced session, we will be going well beyond the simple “hello world” scenario to show you how to leverage the cloud architecture for data storage as well as educate you in how the cloud works differently than your local database instance. This session is going to be an eye opener for sure and will have many of you dreaming of your data sitting in the cloud.
Speaker(s): Arie Jones,
Abstract:
With the next release of SQL Server right around the corner, BI developers and database professionals need to know what's coming and how to take advantage of new features and capabilities. During this session, we'll drilldown on the next release of SSIS and discuss development improvements, the new deployment model, and better managability options. Along the way, we'll look at new SSIS features including project parameters, shared connection managers, a new Data Quality Services component, and team-based development improvements. Come see some of the exciting changes coming in your favorite data integration tool!
Speaker(s): Dave Fackler,
Abstract:
Whether we inherit our Analysis Services environments from predecessors or create them - learning as we go - ourselves, we often conclude that performance (processing and / or querying) and functionality can be enhanced. In this session, Microsoft BI Architect and SQL Server MVP Bill Pearson overviews ways to launch new capabilities, and to propel performance beyond its current plateau, using design best practices to better meet consumer performance and functional needs. This is the initial session of a set of detailed Best Practices presentations.
Speaker(s): William E Pearson III,
Abstract:
Introduced in SQL 2005, Common Table Expressions, or CTEs, are temporary result sets that offer increased flexibility in your T-SQL coding and provide a simple syntax for recusive queries. In this session for intermediate T-SQL coders, learn how to use CTEs to improve the readability and maintainability of your most complex queries.
Speaker(s): Vicky Harp,
Abstract:
Poor database performance is the Achilles' heel of any system. Better and faster hardware can improve systems to a certain point. However, for truly great performing systems, there is no substitute for properly written queries and designed indexes. In this all-demo session we'll take a look at some common query performance killers, along with some no so obvious things that we can do to our queries to make them as fast as possible.
Speaker(s): Tim Chapman,
Abstract:
Are you looking for the best way to secure the data in your cube? There are several approaches to applying data security, each with its own pros and cons. Learn about the basic built-in security, and then see approaches for extending this through dynamic security, using security dimensions, and SSAS stored procedures. You'll see examples of each as well as a discussion of when to use which approach.
Speaker(s): Craig Utley,
Abstract:
Many casual users of SSIS (including database professionals using the SSMS Import/Export Wizard) don't necessarily understand the inner workings of SSIS and what factors impact performance. During this session, we'll look at different aspects of SSIS and discuss their impact on package performance. We'll take a deep dive into the Data Flow component, looking at how SSIS manages data as it moves from sources, through transformations, and then to destinations. Finally, we'll talk about several of the top performance killers casual SSIS users experience and discuss strategies for overcoming these common issues.
Speaker(s): Dave Fackler,
Abstract:
Most DBAs at one time or another have been taught the importance of master data management(MDM), which is just comprised of a set of processes and tools in order to keep your non-transactional data in a consistent state. However, with today’s fast paced environment and tightening budgets most DBAs lack the resources to properly implement it. With the upcoming release of Denali, Microsoft has taken their second swipe at providing a tool known as Master Data Services(MDS) to aid the DBA in this endeavor. In this session, you will learn the basics of MDS in Denali This session will definitely be an eye opener for some that ar
Speaker(s): Arie Jones,
Abstract:
Are you looking to maximize the performance of your Analysis Services queries? This session explains what aggregations are and how they work. You’ll learn how to create aggregations, tune the aggregations based on actual usage, and design custom aggregations when necessary. You’ll discover the benefits and pitfalls of flexible aggregations, when to use rigid aggregations, and the meaning of lazy aggregation processing. You’ll dive into queries to see if aggregations are being used and learn when aggregations aren’t useful. If you thought aggregation design began and ended with the aggregation wizard, you owe it to yourself (and your cubes) to attend this session.
Speaker(s): Craig Utley,
Abstract:
Everyone knows perfmon is a great tool, but knowing which counters to collect and their optimal values is less well known. I will discuss the counters most helpful in diagnosing performance issues with SQL Server.
Speaker(s): Joe Ferry,
Abstract:
Somewhere out there someone is storing data about you. What defines sensitive and personally identifiable data? What should you, as a consumer, expect in regard to the protection of this data? What should you as a database professional do to ensure that your customer's data is protected? In this session we will explore these and other dimensions of the increasingly critical topic of data privacy.
Speaker(s): John Magnabosco,
Abstract:
Okay, you’ve run the Wizard and have Replication up and running; but how does it really work? Learn the behind the scenes for Transactional Replication as we follow the data from Publisher to Subscriber. We’ll look at both design and troubleshooting techniques to ensure your data is moving at near-real-time through your topology.
Speaker(s): Chris Skorlinski,
Abstract:
Are you still ramping up on SSRS? In this session Chris will show you how to create your first SSRS report. In this session we will cover all of the basics including some best practices to get you up to speed when creating reports. This session was designed for someone with little to no experience with SSRS.
Speaker(s): Chris Albrektson,
Abstract:
We are going to examine a variety of oopsies MANY developers fall prey too, some obvious, some pretty subtle and some down right sneaky! Lots of code examples with the bad AND good code presented. I have given this talk nearly a dozen times now and it is always very highly rated!
Speaker(s): Kevin Boles,
Abstract:
This sessions provides insight into the high availability features planned for the next release of SQL Server, code named Denali. I’ll provide a brief look at current HA options, Clustering, Replication, Mirroring, and Log Shipping. Then we’ll explore how these were all combined into new AlwaysOn HA feature for Denali.
Speaker(s): Chris Skorlinski,
Abstract:
When moving databases to a virtual environment the performance metrics DBAs typically use to troubleshoot performance issues such as O/S metrics, storage configurations, CPU allocation and more become unreliable. DBAs no longer have a clear, reliable view of the factors impacting database performance. Understanding the difference between the physical and virtual server environment adds a new dimension to the DBA tasks. This presentation describes the changes that DBAs need to make in their performance and monitoring practices.
Speaker(s): Thomas LaRock,
Abstract:
Life is all about choices, and when it comes to SQL Server it is no different. If you don't have a methodology for researching questions and resolving issues then you need to get one, and soon. Join Microsoft's Tim Chapman and Thomas LaRock from Confio Software as they help guide you while YOU make the choices in this interactive performance tuning adventure.
Speaker(s): Tim Chapman,
Abstract:
The next version of SQL Server has something for everyone! Attend this session to learn about the new features and functions to make T-SQL coding easier and more efficient. Those attending will have a chance to win my Denali T-SQL book.
Speaker(s): Kathi Kellenberger,
Abstract:
Like the title says, be prepared to get really down and dirty with memory allocations and usage in SQL Server. RAM is one of the three pillars of server performance and understanding how it is used, how you can analyze what is going on with it and how to properly adjust the the few knobs you have at your disposal are very important topics for both your server's health and performance.
Speaker(s): Kevin Boles,
Abstract:
How your business applications interact with the corporate database directly can have a dramatic impact on how successful you are, and one of the biggest issues is performance with large databases. By designing the application to use asynchronous messaging for non-critical updates you can focus performance concerns to where the timeliness is critical. SQL Server Service Broker handles the asynchronous requests quickly and efficiently, and minimizes the conflicts with your critical updates. This session will walk you through the steps to get Service Broker up and running and providing a consistent delivery of your business data.
Speaker(s): Allen White,
Abstract:
Every SQL Server instance relies on the tempdb database. Whether through explicit use with #temp tables or @table variables, or implicit use through working space for many other operations, most tempdb databases get quite a workout. This session will dig into many of the otherwise-hidden issues that can kill server performance. After this session, you will be able to spot tempdb performance issues, drill into the causes, and take the steps necessary to solve them.
Speaker(s): Eddie Wuerch,
Abstract:
The world of a DBA can be daunting for a person, either as a new or old, because not only do they need to keep up with new and emerging technologies, but also with the code and designs of their coworkers. In this highly participation driven session, we will employ a random topic chooser to pick several of these traits for discussion as a group. Possible topics include past blog topics such as Logic, Curiosity, Failure, Humility, Skill and Passion, as well as any other topics that might be added for that day. So come prepared to participate and voice your opinion about what counts for a DBA.
 This session will show 26 unique quries using T-SQL keywords that start with every letter of the alphabet.
Speaker(s): Rodney Landrum,
Abstract:
As a developer there are a few things you'll want to know about database design. How can you build tables optimized for high transaction volume? How can referential integrity checks save you from building extra validation code into your applications? We'll cover how and when to add indexing to your tables for performance gains. Finally we'll briefly cover views, functions, and triggers, and when you should avoid them.
Speaker(s): Shannon Lowder,
Abstract:
Latching is a necessary function of the database engine. Although latching is a topic is normally presented only in expert-level sessions, a good grasp of the problems excessive latching exposes is important even for novice tuners. This session focuses on the PAGELATCH_* and PAGEIOLATCH_* wait types, explaining what is happening, why it is happening, and how to use the exposed information to tune queries and solve performance problems. If you've seen these wait types in Activity Monitor and wonder what they meant, then this session is for you!
Speaker(s): Eddie Wuerch,
This is a list of speakers from the XML Guidebook records. The details and URLs were valid at the time of the event.
Contact: http://www.learnmicrosoftbi.com
Craig Utley is a Senior Architect with CTS and a former Program Manager with the SQL Server Customer Advisory Team (SQLCAT), where he focused on business intelligence. Craig has been involved in the Microsoft BI space since the betas of SQL Server 7.0 and has consulted on over 50 BI implementations worldwide, including the largest Microsoft data warehouse in the world. He is a former MVP in both SQL Server and C# and has written three books and more than 35 articles.
LinkedIn: http://www.linkedin.com/in/louisdavidson
Contact: https://www.red-gate.com/simple-talk/author/louis-davidson/
Louis Davidson has worked in the IT industry for over 25 years as a corporate database developer and architect. He has been a Microsoft SQL Server MVP for 15 years and has written five books on database design, and contributed to many other SQL Server books as an author and tech editor. He has a bachelor's degree in Computer Science from the University of Tennessee at Chattanooga. You can read more about Louis at http://drsql.org.
Contact: https://www.simple-talk.com/blogs/author/2133-rodney-landrum/
Rodney Landrum has been architecting solutions for SQL Server for over 12 years. He has worked with and written about many SQL Server technologies, including DTS, Integration Services, Analysis Services, and Reporting Services. He has co-authored 4 books on Reporting Services. He is been a regular contributor to SQL Server magazine, sqlservercentral.com and Simple-talk.com. Rodney is also SQL Server MVP
Contact: http://vickyharp.com
Vicky Harp is the Group PM Manager for the SQL Server Tools Team, which is responsible for the full set of experiences from drivers and scripting libraries, to GUI tools, to the Azure Portal. She has been building tools for SQL Server for 15 years.
Chris Skorlinski has been with Microsoft for 17 years. He is a Support Escalation Engineer at the Microsoft Charlotte NC office specializing in performance tuning and troubleshooting Replication. His is a contributor to SQLShare.com training as well as his own BLOGs on Replication Performance at http://blogs.msdn.com/ReplTalk/. #160;
LinkedIn: http://www.linkedin.com/in/sqlrockstar/
Contact: http://thomaslarock.com
Thomas LaRock is a Head Geek at SolarWinds and a Microsoft Certified Master, Data Platform MVP, VMware vExpert, and a Microsoft Certified Trainer. He has over 15 years’ experience in the IT industry in roles including programmer, developer, analyst, and database administrator.
LinkedIn: https://www.linkedin.com/e/fpf/252170891
Contact: https://mvp.support.microsoft.com/profile=02C5CD07-7511-4151-A678-3A4A3451F85E
Bill Pearson created Island Technologies Inc. in 1997, and has developed a large and diverse customer base since. Bill#39;s background as a CPA, Internal Auditor, Management Accountant, and SQL Server MVP (BI) enables him to provide value to clients as a liaison between Accounting / Finance and Information Services. Bill has implemented enterprise business intelligence systems over the years for many Fortune 500 companies and focuses his practice upon the integrated Microsoft Business Intelligence
LinkedIn: http://www.linkedin.com/pub/allen-white-sql-server-mvp/5/784/b08/
Contact: http://dataperfpro.com/blog/
Allen White is a Data Platform consultant. He has been both a developer and an administrator, so he understands both perspectives towards database technology. He loves sharing his experiences and helping people learn how to use SQL Server. Allen has spent over 40 years in IT, using SQL Server since 1992, and has been awarded Microsoft’s MVP Award for the last 13 years. Allen was a PASS Director from 2016 - 2018.
Chris Skorlinski has been with Microsoft for 17 years. He is a Support Escalation Engineer at the Microsoft Charlotte NC office specializing in performance tuning and troubleshooting Replication. His is a contributor to SQLShare.com training as well as his own BLOGs on Replication Performance at http://blogs.msdn.com/ReplTalk/. #160;
LinkedIn: http://www.linkedin.com/in/WayneSheffield
Contact: http://blog.waynesheffield.com/wayne
Wayne Sheffield, a Microsoft Certified Master in SQL Server and Microsoft Most Valuable Professional, started working with xBase databases in the late 80’s. With over 25 years in IT, he has worked with SQL Server (since 6.5 in the late 90’s) in various dev/admin roles, with an emphasis in performance tuning. He is the author of several articles at www.sqlservercentral.com, a co-author of “SQL Server T-SQL Recipes”, and enjoys sharing his knowledge by presenting at SQL events worldwide and blogging at http://blog.waynesheffield.com/wayne
Contact: http://www.bidn.com/blogs/ChrisAlbrektson
Chris Albrektson is a Business Intelligence consultant for Pragmatic Works and is experienced in Reporting Services, Crystal Reports and Integration Services. Chris is an active member of the Jacksonville SQL Server User Group (JSSUG), and also volunteers/speaks at SQLSaturday and Code Camp events. He’s also a regular blogger on BIDN.com and recently a technical editor on SQL Server books.
LinkedIn: https://www.linkedin.com/in/davefackler
Contact: http://davefackler.blogspot.com/
Dave Fackler is a business intelligence architect, focusing on enterprise data warehouse and business intelligence solutions using Microsoft technologies. Dave has helped organizations design and implement large-scale data warehouses, exploiting SQL Server enterprise database features using dimensional modeling design principles and best practices. He has also architected and developed several enterprise ETL processes using SSIS and its robust set of high-performance tasks and transformations. Dave has delivered various end-user reporting solutions using SSAS and SSRS, often coupled with SharePoint and Office components. Dave speaks about business intelligence at numerous technical conferences, user groups and professional groups each year.
LinkedIn: http://www.linkedin.com/in/eddiewuerch
Contact: http://www.indydba.com
Eddie Wuerch has 20 years of experience as a SQL Server specialist in a much-longer IT career. A Microsoft Certified Master, Eddie spends his days in the Salesforce Marketing Cloud, focusing on performance, scale, and uptime for the massive SQL Server backend. These SQL Servers churn billions of transactions daily against trillions of rows of data in a 24x7 continuously-available online system accessed by millions worldwide every day.
LinkedIn: http://www.linkedin.com/in/ariejones
Contact: http://www.programmersedge.com
Arie Jones (quot;AJquot;) is one of the owners and Vice President of Emerging Technologies for Indy Data Partners, Inc. in Indianapolis, IN. AJ is a frequent speaker at national conferences and local user groups. With over 15 years of experience in application development and database administration on various platforms, he specializes in developing cross-platform solutions with an emphasis on .NET and SQL Server technologies. He blogs extensively at http://www.programmersedge.com.
Contact: http://www.learnmicrosoftbi.com
Craig Utley is a Senior Architect with CTS and a former Program Manager with the SQL Server Customer Advisory Team (SQLCAT), where he focused on business intelligence. Craig has been involved in the Microsoft BI space since the betas of SQL Server 7.0 and has consulted on over 50 BI implementations worldwide, including the largest Microsoft data warehouse in the world. He is a former MVP in both SQL Server and C# and has written three books and more than 35 articles.
LinkedIn: http://www.linkedin.com/in/eddiewuerch
Contact: http://www.indydba.com
Eddie Wuerch has 20 years of experience as a SQL Server specialist in a much-longer IT career. A Microsoft Certified Master, Eddie spends his days in the Salesforce Marketing Cloud, focusing on performance, scale, and uptime for the massive SQL Server backend. These SQL Servers churn billions of transactions daily against trillions of rows of data in a 24x7 continuously-available online system accessed by millions worldwide every day.
LinkedIn: https://www.linkedin.com/e/fpf/252170891
Contact: https://mvp.support.microsoft.com/profile=02C5CD07-7511-4151-A678-3A4A3451F85E
Bill Pearson created Island Technologies Inc. in 1997, and has developed a large and diverse customer base since. Bill#39;s background as a CPA, Internal Auditor, Management Accountant, and SQL Server MVP (BI) enables him to provide value to clients as a liaison between Accounting / Finance and Information Services. Bill has implemented enterprise business intelligence systems over the years for many Fortune 500 companies and focuses his practice upon the integrated Microsoft Business Intelligence
LinkedIn: http://www.linkedin.com/pub/allen-white-sql-server-mvp/5/784/b08/
Contact: http://dataperfpro.com/blog/
Allen White is a Data Platform consultant. He has been both a developer and an administrator, so he understands both perspectives towards database technology. He loves sharing his experiences and helping people learn how to use SQL Server. Allen has spent over 40 years in IT, using SQL Server since 1992, and has been awarded Microsoft’s MVP Award for the last 13 years. Allen was a PASS Director from 2016 - 2018.
Contact: http://www.sqlsarah.net
Sarah Barela is a Senior Manager at CBeyond Cloud Services, formerly MaximumASP. She has a Master’s degree in Information Science from the University of Texas, where she specialized in Database Management Systems. Sarah has spent over 15 years focusing on the administration of enterprise environments with large numbers of SQL Servers. Sarah is currently responsible for a rapidly growing environment with more than 2000 SQL Server instances. Her latest interests are in applying cloud technologies to SQL Server environments. Sarah has been a guest speaker at a number of PASS Chapter meetings, SSWUG Virtual Conferences, SQL Connections, SQLSaturday events, and the 2007, 2009, and 2010 PASS Summits.
Contact: http://blogs.msdn.com/b/sql_pfe_blog/
Tim Chapman is a Microsoft Certified Master (MCM) and works as a dedicated field engineer (PFE) at Microsoft specializing in performance tuning and high availability. Originally from Louisville, KY Tim now resides in Columbus, OH Tim has over 12 years of database architecture, programming, and administration experience.
LinkedIn: http://www.linkedin.com/in/thesqlguru
Kevin Boles is a SQL Server expert, working exclusively with the product since v6.5. With over 25 years of database experience and over 45,000 man hours of SQL Server engine experience, he holds many related certifications, is an MCT and was a SQL Server MVP from 2007 to 2012. Kevin has been a very successful independent consultant for over 20 years. His passion is the relational engine, especially designing, building, analyzing and tuning high-performance database applications.
LinkedIn: https://www.linkedin.com/in/davefackler
Contact: http://davefackler.blogspot.com/
Dave Fackler is a business intelligence architect, focusing on enterprise data warehouse and business intelligence solutions using Microsoft technologies. Dave has helped organizations design and implement large-scale data warehouses, exploiting SQL Server enterprise database features using dimensional modeling design principles and best practices. He has also architected and developed several enterprise ETL processes using SSIS and its robust set of high-performance tasks and transformations. Dave has delivered various end-user reporting solutions using SSAS and SSRS, often coupled with SharePoint and Office components. Dave speaks about business intelligence at numerous technical conferences, user groups and professional groups each year.
Contact: http://blogs.msdn.com/b/sql_pfe_blog/
Tim Chapman is a Microsoft Certified Master (MCM) and works as a dedicated field engineer (PFE) at Microsoft specializing in performance tuning and high availability. Originally from Louisville, KY Tim now resides in Columbus, OH Tim has over 12 years of database architecture, programming, and administration experience.
LinkedIn: http://www.linkedin.com/in/thesqlguru
Kevin Boles is a SQL Server expert, working exclusively with the product since v6.5. With over 25 years of database experience and over 45,000 man hours of SQL Server engine experience, he holds many related certifications, is an MCT and was a SQL Server MVP from 2007 to 2012. Kevin has been a very successful independent consultant for over 20 years. His passion is the relational engine, especially designing, building, analyzing and tuning high-performance database applications.
Contact: http://www.sqlservercentral.com/blogs/kathi_kellenberger/default.aspx
Kathi Kellenberger is a Data Technology Specialist with Microsoft in St. Louis, MO. Before joining Microsoft in 2010, she was a DBA and a SQL Server MVP. Kathi is author of "Beginning T-SQL 2008" and co-author of "Professional SQL Server 2005 Integration Services" and "SQL Server MVP Deep Dives." In her spare time, Kathi enjoys singing (she is the original #sqlkaroke), cycling, playing with her 5 year old grandson, and climbing the stairs in very tall buildings.
I have been a Microsoft Premier Field Engineer for four years, assisting customers with SQL Server Analysis Services, SQL Server Integration Services and the SQL Server Relational Engine. I don’t have to find myself to be the smartest guy in the room to be helpful because I have seen more environments and issues than most dbas and can share my experiences that help others to focus in on what is important rather than what is more likely to be of academic interest.
LinkedIn: http://linkedin.com/in/slowder
Contact: http://shannonlowder.com
For over 15 years Shannon Lowder has been spotting patterns and learning ways to work smarter instead of harder. He started with development and moved into database administration. Using TSQL, Database Jobs and PowerShell, he automated himself out of contracts quickly. As Business Intelligence became a greater demand, he moved into SSIS, SSRS, and SSAS development. Early on, he tried using PowerShell and .Net to automate BI Development. Later those efforts turned to Biml. After founding a startup six years ago, he finds himself a data platform consultant, designing and guiding other professionals to build highly automated enterprise solutions. Today, he is a Biml Hero candidate and is awaiting the final approval for the award.
LinkedIn: https://www.linkedin.com/in/timothyford
Contact: http://thesqlagentman.com
Tim Ford is a Data Professional, Author and Community Leader whose technical passions lie in creative solutions for managing and presenting data. He#39;s been a healthcare DBA since 2000 and leads SQL Agent Man Consultancy and SQL Cruise. He takes 25 students and leaders in the SQL Community and places them on cruise ships for technical and professional development training without the distractions of the office and internet twice a year on SQL Cruises (www.sqlcruise.com). Currently Tim serves on the Board of Directors for PASS and is passionate about taking fellow Data Professionals to the next level in their careers. He enjoys telling stories with data.
Contact: http://www.simple-talk.com/community/blogs/johnm/default.aspx
John Magnabosco is the Data Services Manager at Defender Direct; although he prefers the title "Data Coach". He also is a co-founder of IndyPASS and IndyTechFest. He is also the author of the book "Protecting SQL Server Data" and contributing author of the soon to be released "SQL Server MVP Deep Dives, Vol. 2".
LinkedIn: http://www.linkedin.com/in/ariejones
Contact: http://www.programmersedge.com
Arie Jones (quot;AJquot;) is one of the owners and Vice President of Emerging Technologies for Indy Data Partners, Inc. in Indianapolis, IN. AJ is a frequent speaker at national conferences and local user groups. With over 15 years of experience in application development and database administration on various platforms, he specializes in developing cross-platform solutions with an emphasis on .NET and SQL Server technologies. He blogs extensively at http://www.programmersedge.com.
The following is a list of sponsors that helped fund the event.


If you open the console and reload the page you will see that the first worker is always finished before the second one


$def with (org_name, members)
Org Members is the list of users that are members of the organization. They have access to all sensor data and config.


Tests that distributed nodes are correctly reported in the protocol as long as their updates.
youngest distributed text
oldest distributed text
oldest distributed text
oldest distributed text


Update repos to disk
In the following example we download initialize with the username and download the counts from Pypi for the repos.
# Import library
from pypiplot import Pypiplot
# Download all data for github user.
pp = Pypiplot(username='erdogant')
# Update all repos
pp.update()
# Update specific repos
pp.update(repo=['bnlearn','hnet'])
Download Statistics
Download the statistics from pypi and store on disk.
# Import library
from pypiplot import Pypiplot
# Download all data for github user.
pp = Pypiplot(username='erdogant')
# Get total stats across all repos
results = pp.stats()
# [pypiplot] >Retrieve files from disk..
# [pypiplot] >Computing heatmap across the last 360 days.
# Get some stats
results = pp.stats(repo=['distfit','pca','bnlearn'])
print(results.keys())
# ['data', 'heatmap', 'n_libraries', 'repos']
# Print data
print(results['data'])
# bnlearn distfit pca
# date
# 2020-05-01 100.0 18.0 281.0
# 2020-05-02 6.0 4.0 260.0
# 2020-05-03 50.0 16.0 126.0
# 2020-05-04 82.0 64.0 86.0
# 2020-05-05 64.0 157.0 50.0
# ... ... ...
# 2020-09-11 148.0 213.0 78.0
# 2020-09-12 96.0 102.0 144.0
# 2020-09-13 12.0 42.0 197.0
# 2020-09-14 156.0 92.0 244.0
# 2020-09-15 40.0 76.0 225.0
Calender plot
Make calender plot with counts.
# Get stats for all repos
pp.stats()
# Plot calender
pp.plot_cal()
Interactive Heatmap
Make heatmap with counts for the last year.
# Get stats for all repos
pp.stats()
# Plot calender
pp.plot_year()
Line plot
Make lineplot with counts.
# Get stats for all repos
pp.stats()
# Make line plot
pp.plot()
Top 10 performing repos
Gather the top 10 top performing repos.
# Initialize with username
pp = Pypiplot(username='erdogant')
# Get download statistics
pp.stats()
# Get top 10
repo=pp.results['data'].sum().sort_values()[-10:].index.values
# Get stats for the top10
pp.stats(repo=repo)
# Plot
pp.plot()
Analyze Specific repo
Here U will demonstrate how to gather stats and make plot for a specific repo.
# Initialize with username
pp = Pypiplot(username='erdogant')
# Get download statistics
results = pp.stats(repo='bnlearn')
# Plot
pp.plot()
pp.plot_cal()
pp.plot_year()
Interactive plot with all repos
Here U will demonstrate how to gather stats for all repos.
# Initialize with username
pp = Pypiplot(username='erdogant')
# Get total stats across all repos
results = pp.stats()
# Make plot
pp.plot_heatmap(vmin=10, vmax=2000, cmap='interpolateOranges', title='Total downloads across all repos')
Run pypiplot from terminal
* "-u", "--username" : username github
* "-l", "--library" : library name(s)
* "-p", "--path" : path name to store plot.
* "-v", "--vmin" : minimun value of the figure.
python pypiplot/pypiplot.py -u 'erdogant' -p 'C://pypi_heatmap.html' -v '700'


Wizard Notes
Home
(current)
Search
Welcome to Wizard Notes
Add title
Add a note
Add a note
Your Notes
Note
Delete note


To get useful information open the JavaScript console.
To get timing information in Chrome enable console log timestamps. (In JavaScript console settings).
Blob size {{blob.size}}
Float data {{floatArray}}


PickerField
public class PickerField : Field
Material version of the UIPickerView (single column only, supports manual entry)
-
Picker data source.
Declaration
Swift
public var data: [String] { get set }
-
Declaration
Swift
public override var placeholder: String? { get set }
-
Declaration
Swift
override public var text: String? { get set }
-
Declaration
Swift
public override var isOptional: Bool { get set }
-
Setter for showing a clear button to eliminate the contents of the field.
Declaration
Swift
public var isClearable: Bool { get set }
-
Specifies if the PickerField supports manual entry which will show up as the last option in the picker.
Declaration
Swift
public var isManualEntryCapable: Bool { get set }
-
Changes index in PickerField. If value is below the lower bound (0), it defualts to 0. If the value is over the upper bound, it defaults to to the upper bound.
Declaration
Swift
public var setIndexTo: Int { get set }
-
Specifies the manual entry option name if isManualEntryCapable is set to true
Note
Defaults toManual Entry
.Declaration
Swift
public var manualEntryOptionName: String { get set }
-
Read-only integer value for the current index the picker is on
Declaration
Swift
private(set) public var indexSelected: Int { get set }
-
Setter function to set the PickerField to its manaul entry row
Declaration
Swift
public func setIndexToManual()
-
Declaration
Swift
public override var keyboardType: UIKeyboardType { get set }
-
Declaration
Swift
public override var autocapitalizationType: UITextAutocapitalizationType { get set }
-
Declaration
Swift
public override var autocorrectionType: UITextAutocorrectionType { get set }
-
Declaration
Swift
public override var isSecureTextEntry: Bool { get set }
-
Declaration
Swift
public override var borderColor: UIColor { get set }
-
Declaration
Swift
public override var borderHighlightColor: UIColor { get set }
-
Declaration
Swift
public override var borderErrorColor: UIColor { get set }
-
Declaration
Swift
public override var textColor: UIColor { get set }
-
Declaration
Swift
public override var errorTextColor: UIColor { get set }
-
Declaration
Swift
public override var placeholderDownColor: UIColor { get set }
-
Declaration
Swift
public override var placeholderUpColor: UIColor { get set }
-
Declaration
Swift
public override var cursorColor: UIColor { get set }
-
Undocumented
Declaration
Swift
public var clearButtonColor: UIColor { get set }
-
Undocumented
Declaration
Swift
public var doneButtonColor: UIColor { get set }
-
The reciever’s delegate
Declaration
Swift
weak public var delegate: PickerFieldDelegate?
-
Declaration
Swift
public override var shakes: Bool { get set }
-
Required initializer if doing programtically. You can manually set the frame after initialization. Otherwise it relies on auto layout and its intrinsic content size.
Warning
Refer to the Field Guide in the online documentation if you want to define height constraints.Declaration
Swift
public required init()
-
Declaration
Swift
public override func setError(withText text: String?)
-
Declaration
Swift
public override func removeErrorUI()
-
Notifies the field that it has been asked to relinquish its status as first responder in its window. This triggers the end callback from the field, closes the picker, and removes the editing state.
Note
If it’s in an error state it will keep its error UI.Declaration
Swift
override public func resignFirstResponder() -> Bool
Return Value
true
-
Opens the picker or the PickerField is on manual entry it will open the keyboard.
Declaration
Swift
override public func becomeFirstResponder() -> Bool
Return Value
true
-
Asks to see if the field is the first responder. If it is on manual entry it asks the entryField if it is the responder otherwise it returns its isActive flag
Declaration
Swift
override public var isFirstResponder: Bool { get }
-
Returns a boolean indicating wether the field can become the first responder by asking the entryField if it can become the first responder
Note
Only use this if your PickerField is manualEntryCapableDeclaration
Swift
public override var canBecomeFirstResponder: Bool { get }
-
Returns 1 since single column picker only
Declaration
Swift
public func numberOfComponents(in pickerView: UIPickerView) -> Int
-
Returns data.count of string array passed in
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
-
Returns value in data[row] of string array passed in
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, titleForRow row: Int, forComponent component: Int) -> String?
-
Forwards didSelectRow, handles state UI
Declaration
Swift
public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)
-
Opens picker or keyboard depending on picker index
Declaration
Swift
public func entryFieldShouldBeginEditing(_ view: EntryField) -> Bool
-
Ends editing of entryField if isManualEntryCapable and is on manual entry
Declaration
Swift
public func entryFieldShouldReturn(_ view: EntryField) -> Bool
-
closes picker if is on manual entry
Declaration
Swift
public func entryFieldDidEndEditing(_ view: EntryField)


{% macro render_Service Car Booking(Service Car Booking) %} {% if Service Car Booking %}
No meetings listed


EVO HTML to PDF Converter allows you to select when you want to start conversion of the HTML page to PDF. You can start conversion immediately after the page was loaded,
delayed after the page was loaded with a constant time interval or manually by calling the evoConverter.startConversion() method from the HTML page JavaScript code.
At the top of the demo you can choose the HTML document to convert which can be:
-
HTML Page URL or Local File to Convert. The URL must be accessible from the computer where the converter runs. If the page requires authentication or if you are using a proxy server to access Internet
then you have to set the converter properties accordingly as described in documentation
-
HTML String with Manual Triggering. When you convert a HTML string you also have the option to specify a base URL that will be used
by converter to resolve the relative URLs found in the HTML string to fully qualified URLs. If your HTML string uses only fully qualified URLs then this parameter is not necessary
Select Triggering Mode
-
Auto. The rendering to PDF will start immediately after the page was loaded
-
Delayed. The rendering to PDF will start delayed after the page was loaded with a constant time interval. In this case you can also set the delay in seconds to wait before starting the rendering to PDF
-
Manual. The rendering to PDF will start when the evoConverter.startConversion() method is called from the HTML page JavaScript code


ARIS - STORE
Receipt
NO.
Thammasat university
777-7777777
Customer
Name:
Address:
Tel:
Email:
Code
Produce Name
Quantity
Unit price
Amount
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
Total
VAT 7%
NET
Collector
Date
Authorized by
Date
Thank You


@FunctionalInterface public interface JSONAble
JSONUtil.toJSON(Object, JSONConfig)
encounters one of these objects
as one of its property values, it will call this method in those objects to
convert them to JSON.
This interface includes some default methods, which were introduced in Java 8. If you want to make this library work with Java 7, then change those to regular public interface signatures and comment out the rest of the code for the default methods.
Given the default methods and the fact that you only have to implement one method, this interface can be used to create JSONAble's with Lambda expressions if you find that convenient.
| Modifier and Type | Method and Description |
|---|---|
default String |
toJSON()
Convert this object to a string of JSON data.
|
default String |
toJSON(JSONConfig jsonConfig)
Convert this object to a string of JSON data.
|
void |
toJSON(JSONConfig jsonConfig,
Writer json)
Write this object to the given writer as JSON data.
|
default void |
toJSON(Writer json)
Write to the given writer as JSON data using all defaults for the
configuration.
|
default String toJSON()
This version does not use a JSONConfig
and so can break loop
detection. In many common cases, that's not a problem and this is just
more convenient.
The default implementation calls toJSON(JSONConfig, Writer)
to
actually do the work.
default String toJSON(JSONConfig jsonConfig)
Implementations which use JSONUtil
to generate their JSON should
pass the supplied JSONConfig
to
JSONUtil.toJSON(Object, JSONConfig)
or
JSONUtil.toJSON(Object, JSONConfig, Writer)
in order to preserve
data structure loop detection. If this is not done, then loops may not be
detected properly.
The default implementation calls toJSON(JSONConfig, Writer)
to
actually do the work.
jsonConfig
- A configuration object to use to optionally set encoding options.default void toJSON(Writer json) throws IOException
The default implementation calls toJSON(JSONConfig, Writer)
to
actually do the work.
json
- json A writer for the output.IOException
- If there is an error on output.void toJSON(JSONConfig jsonConfig, Writer json) throws IOException
Implementations which use JSONUtil
to generate their JSON should
pass the supplied JSONConfig
to
JSONUtil.toJSON(Object, JSONConfig)
or
JSONUtil.toJSON(Object, JSONConfig, Writer)
in order to preserve
data structure loop detection. If this is not done, then loops may not be
detected properly.
jsonConfig
- A configuration object to use to optionally set encoding options.json
- A writer for the output.IOException
- If there is an error on output.Copyright © 2016. All rights reserved.


Time, Habits and Techniques Blog
Which timebox and habits techniques did you try?
Pormodoro sounded quiet promising because I wanted to see what I could achieve without the distractions or interuptions from family members. So I decided to treat the next 30 mins like a experiment to find out if my mind would drift or lose focus engaged with the amount of reading and information put before us in the this sprint.
What did you find interesting?
What I found interesting is one, I should always study on a Monday to Friday while the children are at school. Two that my mind didn't feel as inundated with code or all the stresses and I could quiet my mind and focus at the one task at hand. I felt a little more clearer and restful and not so stressed about completing this sprint. I knew that I would complete it.
What worked for you?
Locking the bedroom door defintely worked to minimise some distration. While Reading through the various pieces of information I found the articles on the habits of successful the idea of starting small. Luckily, having started this cohort with 8 extra weeks up my sleeve this allowed me plenty of time to really focus and concentrate unhurriedly on the tasks before me. I have found personally steping back from study for a few days has helped me alot. Moving forward on the following Monday I quickly formulated my future approach on Phase zero.
Which will you experiment further with?
I would defintely like to attempt meditation, reading through the information I also had never knew about the benefits. It taught me alot about myself my strengths and weaknesses, I like the idea having a mind of clarity in todays world and as a mother of three is easy to forget the importance of sanity, unplugging and taking time for yourself. I also liked the youtube video about forget big change, start with a tiny habit. Ten different ways to celebrate, the energy and the ideolgy of the presenter and the message he was trying to convey.


<< Previous Session | Next Session >>
Syllabus
Professor
Robert J. Shiller, Arthur M. Okun Professor of Economics
Description
An overview of the ideas, methods, and institutions that permit human society to manage risks and foster enterprise. Description of practices today and analysis of prospects for the future. Introduction to risk management and behavioral finance principles to understand the functioning of securities, insurance, and banking industries.
Texts
Main texts
Fabozzi, Frank J., Franco Modigliani, Frank J. Jones, and Michael G. Ferri. Foundations of Financial Markets and Institutions, 4th ed. Prentice Hall, 2010.
Shiller, Robert J. Finance and the Good Society. Princeton University Press, 2012.
Course Packet
Brandeis, Louis D. Other People's Money and How the Bankers Use It. Augustus M. Kelley Publishers, Reprints of Economic Classics, 1971.
Brealey, Richard. Stuart C. Myers, and Franklin Allen. Principles of Corporate Finance, 8th edition. McGraw-Hill/Irwin, 2005.
Bagehot, Walter. Lombard Street: A Description of the Money Market. Scribner, Armstrong & Co, 1873. (freely available as a Google eBook)
Carnegie, Andrew. The Gospel of Wealth and Other Timely Essays. The Century Company, 1901. (freely available as a Google eBook)
Commodity Futures Trading Commission and Securities Exchange Commission. Findings Regarding the Market Events of May 6, 2010. Report to the Joint Advisory Committee on Emerging Regulatory Issues, Washington DC: U.S. Commodity Futures Trading Commission, September 30, 2010
Conant, Charles A. Wall Street and the Country: A Study of Recent Financial Tendencies. G.P. Putnam's Sons, 1904. (freely available as a Google eBook)
Douglas, William O. Democracy and Finance. Yale University Press, 1940.
Ellis, Charles. The Partnership: The Making of Goldman Sachs. Penguin, 2008.
Fraser, Steve. Wall Street: America's Dream Palace. Yale University Press, 2009.
Gorton, Gary. "Slapped in the Face by the Invisible Hand: Banking and the Panic of 2007." Federal Reserve Bank of Atlanta Financial Markets Conference, 2009.
Hawtrey, R. G. The Art of Central Banking. Longmans, Green and Co., 1932.
Johnson, Simon, Rafael La Porta, Florencio Lopez-di-Silanos, and Andrei Shleifer. "Tunneling." American Economic Review, 2000, 90(2).
Lehrer, Jonah. "The Truth Wears Off: Is there Something Wrong with the Scientific Method?" The New Yorker, December 13, 2010.
O'Barr, William M. and John M. Conley. Fortune & Folly: The Wealth & Power of Institutional Investing. Business-One Irwin, 1992.
Seligman, Edwin R. A. The Income Tax: A Study of the History, Theory, and Practice of Income Taxation at Home and Abroad. 2nd edition, MacMillan, 1914. (freely available as a Google eBook)
Shiller, Robert J. Irrational Exuberance, 2nd edition. Doubleday, 2006.
Shiller, Robert J. The New Financial Order: Risk in the 21st Century. Princeton University Press, 2003.
Siegel, Jeremy J. Stocks for the Long Run: the definitive guide to financial market returns and long-term investment strategies, 4th edition. McGraw-Hill, 2008.
Sullivan, Teresa, Elizabeth Warren and Jay Lawrence Westbrook. The Fragile Middle Class: Americans in Debt. Yale University Press, 2000.
Sumner, William Graham. What the Social Classes Owe Each Other. Harper Brothers, 1883. (freely available as a Google eBook)
Swensen, David. Pioneering Portfolio Management. Free Press, 2000.
Thaler, Richard H. and Cass R. Sunstein. Nudge: Improving Decisions about Health, Wealth and Happiness. Yale University Press, 2008.
"The Gospel of Wealth" (Review) San Francisco Chronicle, February 9, 1890.
Unger, Peter. Living High and Letting Die: Our Illusion of Innocence. Oxford University Press, 1996.
Working, Holbrook, "Futures Trading and Hedging," American Economic Review, June 1953.
World Economic Forum. Partnering to Strengthen Public Governance. Geneva, 2008.
Requirements
Some facility with elementary algebra and calculus required. Course exams consist of roughly 50% math and theory problems and 50% facts and general understanding questions about financial markets.
Grading
Midterm exam 1: 20%
Midterm exam 2: 30%
Problem sets: 10%
Final exam: 40%


{% extends 'weblab-master.html' %} {% block body %}
{{ gettext("The following users has been successfully added and added to the group %(group_name)s:", group_name=group_name) }}
{% else %}{{ gettext("The following users has been successfully added:") }}
{% endif %}| {{ gettext("Login") }} | {{ gettext("Full name") }} | {{ gettext("E-mail address") }} |
|---|---|---|
| {{ user.login }} | {{ user.full_name }} | {{ user.email }} |


Decoding Cancer Immunology: Hunting Hidden Tumors
The immune system is constantly on the lookout for threats, but cancer isn’t always easy to spot. Some cancer cells can fly under the radar. Now, advanced sequencing technologies are enabling scientists to investigate the unique genetics of both cancers and immune responses in individual patients. This means researchers can develop treatments that boost the immune system and help the body win its battle against cancer.


ambient.Profile.extend_profile_deeper¶
-
Profile.
extend_profile_deeper
(self, z_new, nc_name=None, h_N=1.0, h=0.01, N=None)[source]¶ Extend the CTD profile to the depth z_new using a fixed buoyancy frequency
Extends the depth of a CTD profile to the new depth z_new using a fixed buoyancy frequency to adjust the salinity and keeping all other variables constant below the original depth. This should only be used when no ambient data are available and when the bottom of the original profile is deep enough that it is acceptable to assume all variables remain constant in the extention except for salinity, which is increased to maintain the desired buoyancy frequency.
The fixed buoyancy frequency used to extend the profile can be specified in one of two ways:
Specify h_N and h and let the method buoyancy_frequency evaluate the buoyancy frequency. The evaluation depth is taken at the fraction h_N of the original CTD depth range, with h_N = 1.0 yielding the lowest depth in the original CTD profile. h is passed to ‘buoyancy_frequency unchanged and sets the length-scale of the finite difference approximation.
Specify N directly as a constant. In this case, the method buoyancy_frequency is not called, and any values passed to h_N or h are ignored.
- Parameters
- z_newfloat
New depth for the valid_max of the CTD profile
- nc_namestring or path, default=None
Name to use when creating the new netCDF dataset with the deeper data generated by this method call.
- h_Nfloat, default 1.0
Fraction of the water depth (–) at which to compute the buoyancy frequency used to extend the profile
- hfloat, default 0.01
Passed to the buoyancy_frequency() method. Fraction of the water depth (–) to use as the length-scale in a finite- difference approximation to the density gradient.
- Nfloat, default is None
Optional replacement of h_N and h, forcing the extension method to use N as the buoyancy frequency.
See also
Notes
This method does not explicitely return a value; however, it does create a Profile object with a deeper depth. If this object is based on an open netCDF dataset, then this method closes the original netCDF dataset in the object, and rebuilds the necessary object attributes to be consistent with the new netCDF dataset. The new netCDF dataset filename is provided by nc_name.
One may extend a profile any number of ways; this method merely provides easy access to one rational method. If other methods are desired, it is recommended to create a new netCDF dataset with the desired deeper profile data and then use that dataset to initialize a new Profile object.


Register
Email in use
This email is already in use, choose another one or login to your existing account.


|
DESERT
3.0
|
#include <uwmphy_modem.h>
Public Member Functions | |
| DropTimer (UWMPhy_modem *pModem_) | |
Protected Member Functions | |
| virtual void | expire (Event *e) |
Protected Attributes | |
| UWMPhy_modem * | pModem |
Definition at line 411 of file uwmphy_modem.h.
|
inline |
Definition at line 414 of file uwmphy_modem.h.
|
protectedvirtual |
Definition at line 269 of file uwmphy_modem.cpp.
|
protected |
Definition at line 422 of file uwmphy_modem.h.


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 1
You will need a medium solid-based frying pan with a base diameter of 7 inches (18 cm).
Preheat the grill to its highest setting forminutes and have a warm plate ready.
First separate the eggs - yolks into a small bowl and whites into a squeaky-clean large bowl; it helps if you separate the whites singly into a cup first before adding them to the bowl, then if one breaks, it won't ruin the rest. Now beat the egg yolks with a fork, seasoning well with salt and pepper. Next put the pan on to a low heat to warm through.
While that's happening, whisk the egg whites with either an electric hand whisk or a balloon whisk, until they form soft peaks. Next add the butter to the pan and turn the heat up. Then, using a large metal spoon, quickly fold the egg yolks into the egg whites, adding the cheddar, half the parmesan and the chives at the same time.
Then, when the butter is foaming, pile the whole lot into the pan and give it a good hefty shake to even it out. Now let the omelette cook for 1 minute exactly. Then slide a palette knife round the edges to loosen it, sprinkle the grated gruyhre all over the surface and whack the omelette under the grill, about 4 inches (10 cm) from the heat. Let it cook for 1 more minute, until the cheese is melted and tinged golden. Next, remove the pan from the heat, then slide the palette knife round the edge again. Take the pan to the warmed plate, then ease one half of the omelette over the other and tilt the whole lot out on to the plate. Scatter the rest of the parmesan all over and serve immediately.


Sign Up
Login
Create Account
I have an Account
Login
I Forgot my Username / Password
I dont have an Account


Steem Developer Portal
PY: Witness Listing And Voting
How to vote for or remove a vote for a witness user using Python.
Full, runnable src of Witness Listing And Voting can be downloaded as part of the PY tutorials repository.
In this tutorial we show you how to create a list of active witnesses from the Steem blockchain and then vote or unvote for a witness using the commit
class found within the steem-python library.
Intro
The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the approve_witness
and disapprove_witness
method found within the commit
class in the library. We also use the get_active_witnesses
function to query the blockchain for a list of available witnesses. Before we vote, we use the get_account
function to check for all the witnesses that the user has currently voted for. This is not strictly necessary but adds to the useability of the process. The approve_witness
method has 3 parameters:
- witness - The witness to approve
- account - The source user account for the voting
- approve - This value is set to
True
when approving a witness
The disapprove_witness
has the same parameters except for _approve_
which is not required.
Steps
- App setup - Library install and import. Connection to testnet
- User information and steem node - Input user information and connection to Steem node
- Active witness list - Create a list of active as well as already voted for witnesses
- Vote / Unvote - Input witness name and commite vote/unvote to blockchain
1. App setup
In this tutorial we use 3 packages:
steem
- steem-python library and interaction with Blockchainpick
- helps select the query type interactivelypprint
- print results in better format
We import the libraries and connect to the testnet
.
import steembase
import steem
from pick import pick
import pprint
steembase.chains.known_chains['STEEM'] = {
'chain_id': '79276aea5d4877d9a25892eaa01b0adf019d3e5cb12a97478df3298ccdd01673',
'prefix': 'STX', 'steem_symbol': 'STEEM', 'sbd_symbol': 'SBD', 'vests_symbol': 'VESTS'
}
Because this tutorial alters the blockchain we connect to a testnet so we don’t create spam on the production server.
2. User information and steem node
We require the private active key
of the user in order for the transaction to be committed to the blockchain. This is why we are using a testnet. The values are supplied via the terminal/console before we initialise the steem class. We also check if the user name provided is active on the chain. There are some demo accounts available but we encourage you to create your own accounts on this testnet.
#capture user information
username = input('Enter username: ') #demo account: cdemo
wif = input('Enter private ACTIVE key: ') #demo account: 5KaNM84WWSqzwKzY82fXPaUW43idbLnPqf5SfjGxLfw6eV2kAP3
#connect node and private active key
client = steem.Steem(nodes=['https://testnet.steem.vc'], keys=[wif])
#check valid user
userinfo = client.get_account(username)
if(userinfo is None) :
print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
exit()
3. Active witness list
We create a list of active witnesses so the user knows which witnesses are available to vote for. We do this by sending a query to the blockchain using the get_active_witnesses
function. The result of this query is displayed on the UI.
#print list of active witnesses
print('ACTIVE WITNESSES')
witness_list = client.get_active_witnesses()
pprint.pprint(witness_list)
We also provide the user with a list of witnesses that has already been voted for by their account. From this the user will know which witnesses can be removed, and which can be added to their set of approved witnesses. We generate this list using the get_account
function and display it on the UI.
#print list of currently voted for witnesses
print('\n' + 'WITNESSES CURRENTLY VOTED FOR')
vote_list = userinfo['witness_votes']
pprint.pprint(vote_list)
input('Press enter to continue')
4. Vote / Unvote
The user is given the option to VOTE
, UNVOTE
or CANCEL
the process. Depending on the choice the relevant function is executed. Both the VOTE
and UNVOTE
methods use the same input - the witness being added or removed. The different method executions are shown below.
#choice of action
title = ('Please choose action')
options = ['VOTE', 'UNVOTE', 'CANCEL']
option, index = pick(options, title)
if (option == 'CANCEL') :
print('\n' + 'operation cancelled')
exit()
VOTE :
if (option == 'VOTE') :
# vote process
witness_vote = input('Please enter the witness name you wish to vote for: ')
if witness_vote not in witness_list :
print('\n' + witness_vote + ' does not appear on the available witness list')
exit()
if witness_vote in vote_list :
print('\n' + witness_vote + ' cannot be voted for more than once')
exit()
client.approve_witness(witness=witness_vote, account=username, approve=True)
print('\n' + witness_vote + ' has been successfully voted for')
UNVOTE :
else :
# unvote process
witness_unvote = input('Please enter the witness name you wish to remove the vote from: ')
if witness_unvote not in vote_list :
print('\n' + witness_unvote + ' is not in your voted for list')
exit()
client.disapprove_witness(witness=witness_unvote, account=username)
print('\n' + witness_unvote + ' has been removed from your voted for list')
A confirmation of the transaction to the blockchain is displayed on the UI.
We encourage users to play around with different values and data types to fully understand how this process works. You can also check the balances and transaction history on the testnet portal.
To Run the tutorial
- review dev requirements
- clone this repo
cd tutorials/22_witness_listing_and_voting
pip install -r requirements.txt
python index.py
- After a few moments, you should see a prompt for input in terminal screen.