text:
Table of Contents
Chapter 1: Of four degrees of Christian men's living, and of the course of his calling that this book was made unto
Chapter 2: A short stirring to meekness, and to the work of this book
Chapter 3: How the work of this book shall be wrought and of the worthiness of it before all other works
Chapter 4: Of the shortness of this work, and how it may not be come to by the curiosity of wit, nor by imagination
Chapter 5: That in the time of this work all the creatures that ever have been, be now, or ever shall be, and all the works of those same creatures, should be hid under the cloud of forgetting
Chapter 6: A short conceit of the work of this book, treated by question
Chapter 7: How a man shall have him in this work against all thoughts, and specially against all those that arise of his own curiosity, of cunning, and of natural wit
Chapter 8: That in the time of his work all the creatures that ever have been, be now, or ever shall be, and all the works of those creatures, should be hid under the cloud of forgetting
Chapter 9: That in the time of this work the rememberance of the holiest creature that ever God made letteth more than it profiteth
Chapter 10: How a man shall know when his thought is no sin; and if it be sin, when it is deadly and when it is venial.
Chapter 11: That a man should weigh each thought and each stirring after that it is, and always eschew recklessness in venial sin.
Chapter 12: That by Virtue of this word sin is not only destroyed, but also virtues begotten.
Chapter 13: What meekness is in itself, and when it is perfect and when it is imperfect.
Chapter 14: That without imperfect meekness coming before, it is impossible for a sinner to come to the perfect Virtue of meekness in this life
Chapter 15: A short proof against their error that say, that there is no perfecter cause to be meeked under, than is the knowledge of a man's own wretchedness
Chapter 16: That by virtue of this work a sinner truly turned and called to contemplation cometh sooner to perfection than by any other work; and by it soonest may get of God forgiveness of sins
Chapter 17: That a very contemplative list not meddle him with active life, nor of anything that is done or spoken about him, nor yet to answer to his blamers in excusing of himself
Chapter 18: How that yet unto this day all actives complain of contemplatives as Martha did of Mary. Of the which complaining ignorance is the cause
Chapter 19: A short excusation of him that made this book, teaching how all contemplatives should have all actives fully excused of their complaining words and deeds
Chapter 20: How Almighty God will goodly answer for all those that for the excusing of themselves list not leave their business about the love of Him
Chapter 21: The true exposition of this gospel word, 'Mary hath chosen the best part'
Chapter 22: Of the wonderful love that Christ had to man in person of all sinners truly turned and called to the grace of contemplation
Chapter 23: How God will answer and purvey for them in spirit, that for business about His love list not answer nor purvey for themselves
Chapter 24: What charity is in itself, and how it is truly and perfectly contained in the work of this book
Chapter 25: That in the time of this work a perfect soul hath no special beholding to any one man in this life
Chapter 26: That without full special grace, or long use in common grace, the work of this book is right travailous; and in this work, which is the work of the soul helped by grace, and which is the work of only God
Chapter 27: Who should work in the gracious work of this book
Chapter 28: That a man should not presume to work in this work before the time that he be lawfully cleansed in conscience of all his special deeds of sin
Chapter 29: That a man should bidingly travail in this work, and suffer the pain thereof, and judge no man
Chapter 30: Who should blame and condemn other men's defaults
Chapter 31: How a man should have him in beginning of this work against all thoughts and stirrings of sin
Chapter 32: Of two ghostly devices that be helpful to a ghostly beginner in the work of this book
Chapter 33: That in this work a soul is cleansed both of his special sins and of the pain of them, and yet how there is no perfect rest in this life
Chapter 34: That God giveth this grace freely without any means, and that it may not be come to with means
Chapter 35: Of three means in the which a contemplative prentice should be occupied; in reading, thinking, and praying
Chapter 36: Of the meditations of them that continually travail in the work of this book
Chapter 37: Of the special prayers of them that be continual workers in the work of this book
Chapter 38: How and why that short prayer pierceth heaven
Chapter 39: How a perfect worker shall pray, and what prayer is in itself; and, if a man shall pray in words, which words accord them most to the property of prayer
Chapter 40: That in the time of this work a soul hath no special beholding to any vice in itself nor to any virtue in itself
Chapter 41: That in all other works beneath this, men should keep discretion; but in this none
Chapter 42: That by indiscretion in this, men shall keep discretion in all other things; and surely else never
Chapter 43: That all writing and feeling of a man's own being must needs be lost if the perfection of this work shall verily be felt in any soul in this life
Chapter 44: How a soul shall dispose it on its own part, for to destroy all witting and feeling of its own being
Chapter 45: A good declaring of some certain deceits that may befall in this work
Chapter 46: A good teaching how a man shall flee these deceits, and work more with a listiness of spirit than with any boisterousness of body
Chapter 47: A slight teaching of this work in purity of spirit; declaring how that on one manner a soul should shew his desire unto God, and on ye contrary, unto man
Chapter 48: How God will be served both with body and with soul, and reward men in both; and how men shall know when all those sounds and sweetness that fall into the body in time of prayer be both good and evil
Chapter 49: The substance of all perfection is nought else but a good will; and how that all sounds and comforts and sweetness that may befall in this life be to it but as it were accidents
Chapter 50: Which is chaste love; and how in some creatures such sensible comforts be but seldom, and in some right oft
Chapter 51: That men should have great wariness so that they understand not bodily a thing that is meant ghostly; and specially it is good to be wary in understanding of this word in, and of this word up
Chapter 52: How these young presumptuous disciples misunderstand this word in, and of the deceits that follow thereon
Chapter 53: Of divers unseemly practices that follow them that lack the work of this book
Chapter 54: How that by virtue of this work a man is governed full wisely, and made full seemly as well in body as in soul
Chapter 55: How they be deceived that follow the fervour of spirit in condemning of some without discretion
Chapter 56: How they be deceived that follow the fervour of spirit in condemning of some without discretion
Chapter 57: How these young presumptuous disciples misunderstand this other word up; and of the deceits that follow thereon
Chapter 58: That a man shall not take ensample of Saint Martin and of Saint Stephen, for to strain his imagination bodily upwards in the time of his prayer
Chapter 59: That a man shall not take ensample at the bodily ascension of Christ, for to strain his imagination upwards bodily in the time of prayer: and that time, place, and body, these three should be forgotten in all ghostly working
Chapter 60: That the high and the next way to heaven is run by desires, and not by paces of feet
Chapter 61: That all bodily thing is subject unto ghostly thing, and is ruled thereafter by the course of nature, and not contrariwise
Chapter 62: How a man may wit when his ghostly work is beneath him or without him and when it is even with him or within him, and when it is above him and under his God
Chapter 63: Of the powers of a soul in general, and how Memory in special is a principal power comprehending in it all the other powers and all those things in the which they work
Chapter 64: Of the other two principal powers, Reason and Will, and of the work of them before sin and after
Chapter 65: Of the first secondary power, Imagination by name; and of the works and of the obedience of it unto Reason, before sin and after
Chapter 66: Of the other secondary power, Sensuality by name; and of the works and of the obedience of it unto Will, before sin and after
Chapter 67: That whoso knoweth not the powers of a soul and the manner of her working, may lightly be deceived in understanding of ghostly words and of ghostly working; and how a soul is made a God in grace
Chapter 68: That nowhere bodily, is everywhere ghostly; and how our outer man calleth the work of this book nought
Chapter 69: How that a man's affection is marvelously changed in ghostly feeling of this nought, when it is nowhere wrought
Chapter 70: That right as by the defailing of our bodily wits we begin more readily to come to knowing of ghostly things, so by the defailing of our ghostly wits we begin most readily to come to the knowledge of God, such as is possible by grace to be had here
Chapter 71: That some may not come to feel the perfection of this work but in time of ravishing, and some may have it when they will, in the common state of man's soul
Chapter 72: That a worker in this work should not deem nor think of another worker as he feeleth in himself
Chapter 73: How that after the likeness of Moses, of Bezaleel and of Aaron meddling them about the Ark of the Testament, we profit on three manners in this grace of contemplation, for this grace is figured in that Ark
Chapter 74: How that the matter of this book is never more read or spoken, nor heard read or spoken, of a soul disposed thereto without feeling of a very accordance to the effect of the same work: and of rehearsing of the same charge that is written in the prologue
Chapter 75: Of some certain tokens by the which a man may prove whether he be called of God to work in this work


text:
Article Text
Statistics from Altmetric.com
Request Permissions
If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center's RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.
Question How effective are self help smoking cessation interventions?
Data sources
Studies were identified by searching the Tobacco Addiction Review Group Register (which includes studies identified from Medline, PsycLIT, Dissertation Abstracts Online, Applied Social Sciences Index and Abstracts, Social Citations Index, and Social Science Citations Index) using the terms self help, manual, and booklet; and bibliographies of previous reviews.
Study selection
Randomised or quasi-randomised controlled trials were selected if they had ≥6 months follow up and if ≥1 treatment arm involved a self help intervention without repeated face to face contact with a therapist. Self help interventions had to involve a structured programme for quitting. Studies of pregnant women were excluded.
Data extraction
Data were extracted on the study population, method of randomisation, type of intervention, follow up, and validation of self reported cessation.
Main results
Meta-analysis of 10 trials of self help compared with no self help found no differences for smoking cessation at longest follow up (p=0.06) (table⇓). When 3 trials in which the control group received some form of leaflet were excluded from the analysis, the self help group had slightly higher cessation rates (p<0.04) (table⇓). Adding self help to advice or to nicotine replacement therapy did not increase smoking cessation. Several studies assessed enhancements to self help interventions. Meta-analysis of 6 studies showed that personalised self help materials increased smoking cessation compared with standard materials (6.2% v 4.3%, relative benefit increase [RBI] 49%, 95% CI 12 to 98, number needed to treat [NNT] 53, CI 33 to 147). Meta-analysis of 6 studies showed that self help materials with telephone follow up increased smoking cessation (11.4% v 7.9%, RBI 55%, CI 30 to 85, NNT 29, CI 20 to 50).
Self help interventions alone minimally increase smoking cessation rates. Self help materials added to nicotine replacement therapy or to advice do not confer additional benefits. Self help interventions that are personalised to individual smokers or are supplemented with telephone follow up improve smoking cessation.
Smoking kills about 3 million adults worldwide each year.1 Although most people stop smoking on their own, various self help materials have been developed to facilitate this process. The article by Lancaster and Stead provides a summary of current research on the effectiveness of self help materials, which they define as those that provide structured approaches to smoking cessation. Their finding that self help materials alone have a minimal effect on smoking cessation is consistent with previous reviews.2
The effectiveness of self help methods is usually measured by looking at cessation rates ≥6 months after the intervention. Cessation rates are one indicator of intervention success; in "stage based" approaches to cessation, however, movement through stages may be a more accurate measure of success. Using the transtheoretical, or "stages of change" model,3 people are characterised as being in precontemplation, contemplation, or action phases of smoking cessation. Action oriented materials are unlikely to be effective for people in precontemplation or contemplation stages. Tailoring materials to an individual's readiness for change is believed to be more effective. More research is needed on the effectiveness of stage based self help materials in moving individuals through the stages of smoking cessation.
Although this review looked at a variety of self help resources (eg, written and video), research is needed to evaluate the effectiveness of self help programmes available on the internet, particularly stage based, self help programmes that provide personalised interventions for smokers. Based on the results of this review, nurses working with people who want to stop smoking might consider (1) tailoring materials for clients based on their smoking habits and motivations rather than on the perceived needs of a broadly defined group of smokers; and (2) increasing the intensity of an intervention by providing telephone counselling.
Sources of funding: National Health Service and Imperial Cancer Research Fund.
For correspondence: Mrs Lindsay Stead, ICRF General Practice Research Group, Division of Public Health and Primary Health Care, Institute of Health Sciences, Old Road, Headington, Oxford OX3 7LF, UK. Fax +44 (0)1865 227137.
A modified version of this abstract appears in ACP Journal Club and Evidence-Based Mental Health.

subset: commoncrawl


text:
We at Grill, Roast and Fry take your privacy seriously. This Privacy Policy presents how we gather, store, and use information from our Users. Please take note that we will never sell or trade your information.
Terms Defined
1. "Site" refers to Grill, Roast and Fry or GrillRoastandFry.com.
2. "User" or "Users" refers to visitors (accidental or regular) of this site.
Types of Information Collected From Our Users
There are two types of information that we collect from our users, Personal and Non-Personal information. Personal information such as e-mail address and name are totally voluntary, while non personal information such as search terms can be automatically collected through a User's web browser or from the site's Analytics.
Certain activities in the site require our Users to submit their personal information such as their email address and name. Examples of these activities include, but are not limited to the following: leaving comments, newsletter subscription, free e-books, and feed subscription. If a User wishes to participate in these activities but does not want to provide the required information, he may not be able to fully enjoy these activities.
Other than personal information, the site also automatically collects non-personal information such as web browse, IP address, and search terms through the use of web analytics programs such as Google Analytics and GetClicky.com.
Use of Collected Information
The site collects the abovementioned information or data for site improvement and to send occasional e-mails and other offers to the Users.
We will never trade, publish, or sell any information collected from our Users.
Grill, Roast and Fry may use cookies to provide Users with a great experience.
The site's third-party merchants also collect cookies for tracking purposes, device recognition, and to enable features.
The Site does not have any control of these cookies and how the third-party merchants collect information.
If you wish to disable cookies, you can always configure your web browser to achieve this purpose anytime. The process may vary depending on the browser.
Changes to the Site's Privacy Policy
Grill, Roast and Fry has the sole right to make changes to this Privacy Policy anytime. By using this site, Users are encouraged to read this policy from time to time to be aware of any changes.
User's Acceptance of this Privacy Policy
By using Grill, Roast and Fry, you acknowledge and accept this Site's Privacy Policy. If you do not agree to the terms, please do not use this Site.
Warranty Disclaimer
This site and the materials and products on this site are provided "as is" and without warranties of any kind, whether express or implied. To the fullest extent permissible pursuant to applicable law, Grill, Roast and Fry disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose and non-infringement. Grill, Roast and Fry does not represent or warrant that the functions contained in the site will be uninterrupted or error-free, that the defects will be corrected, or that this site or the server that makes the site available are free of viruses or other harmful components. Grill, Roast and Fry does not make any warranties or representations regarding the use of the materials in this site in terms of their correctness, accuracy, adequacy, usefulness, timeliness, reliability or otherwise. Some states do not permit limitations or exclusions on warranties, so the above limitations may not apply to you.
Limitation of Liability
Grill, Roast and Fry shall not be liable for any special or consequential damages that result from the use of, or the inability to use, the services and products offered on this site, or the performance of the services and products.
Affiliate Disclaimer
This site is a participant of the Amazon Associates Program, an affiliate program that provides members with a means to earn from advertising fees (or commissions) by promoting, advertising, or linking to products found on Amazon.com.
That said, assume that any link you click on is most probably an affiliate link. If you make a purchase, we can make money from the sale.


text: This feature film, fictional in presentation but based on incidents from actual case files of the Department of National Revenue, depicts an investigation into a suspected tax fraud. A cast of Canadian actors convincingly portrays the investigation of the dealings of a successful building contractor charged with income tax evasion. As in the best of detective dramas, suspense builds during the conduct of the enquiry and in the persons who become involved.


text:
itertools — Functions creating iterators for efficient looping¶
New in version 2.3.
This module implements a number of iterator building blocks inspired by constructs from APL, Haskell, and SML. Each has been recast in a form suitable for Python.
The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an "iterator algebra" making it possible to construct specialized tools succinctly and efficiently in pure Python.
For instance, SML provides a tabulation tool:
tabulate(f) which produces a
f(0), f(1), .... The same effect can be achieved in Python
by combining
imap() and
count() to form
imap(f, count()).
These tools and their built-in counterparts also work well with the high-speed
functions in the
operator module. For example, the multiplication
operator can be mapped across two vectors to form an efficient dot-product:
sum(imap(operator.mul, vector1, vector2)).
Infinite Iterators:
start, [step]
start, start+step, start+2*step, …
p0, p1, … plast, p0, p1, …
elem [,n]
elem, elem, elem, … endlessly or up to n times
Iterators terminating on the shortest input sequence:
p, q, …
p0, p1, … plast, q0, q1, …
data, selectors
(d[0] if s[0]), (d[1] if s[1]), …
pred, seq
seq[n], seq[n+1], starting when pred fails
iterable[, keyfunc]
sub-iterators grouped by value of keyfunc(v)
pred, seq
elements of seq where pred(elem) is true
pred, seq
elements of seq where pred(elem) is false
seq, [start,] stop [, step]
elements from seq[start:stop:step]
func, p, q, …
func(p0, q0), func(p1, q1), …
func, seq
func(*seq[0]), func(*seq[1]), …
it, n
it1, it2, … itn splits one iterator into n
pred, seq
seq[0], seq[1], until pred fails
p, q, …
(p[0], q[0]), (p[1], q[1]), …
p, q, …
(p[0], q[0]), (p[1], q[1]), …
Combinatoric generators:
p, q, … [repeat=1]
cartesian product, equivalent to a nested for-loop
p[, r]
r-length tuples, all possible orderings, no repeated elements
p, r
r-length tuples, in sorted order, no repeated elements
p, r
r-length tuples, in sorted order, with repeated elements
9.7.1. Itertool functions¶
The following module functions all construct and return iterators. Some provide streams of infinite length, so they should only be accessed by functions or loops that truncate the stream.
Make an iterator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. Used for treating consecutive sequences as a single sequence. Roughly equivalent to:
def chain(*iterables): # chain('ABC', 'DEF') --> A B C D E F for it in iterables: for element in it: yield element
Alternate constructor for
chain(). Gets chained inputs from a single iterable argument that is evaluated lazily. Roughly equivalent to:
def from_iterable(iterables): # chain.from_iterable(['ABC', 'DEF']) --> A B C D E F for it in iterables: for element in it: yield element
New in version 2.6.
combinations(iterable, r)¶
Return r length subsequences of elements from the input iterable.
Combinations are emitted in lexicographic sort order. So, if the input iterable is sorted, the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each combination.
Roughly equivalent to:
def combinations(iterable, r): # combinations('ABCD', 2) --> AB AC AD BC BD CD # combinations(range(4), 3) --> 012 013 023 123 pool = tuple(iterable) n = len(pool) if r > n: return indices = range(r) yield tuple(pool[i] for i in indices) while True: for i in reversed(range(r)): if indices[i] != i + n - r: break else: return indices[i] += 1 for j in range(i+1, r): indices[j] = indices[j-1] + 1 yield tuple(pool[i] for i in indices)
The code for
combinations()can be also expressed as a subsequence of
permutations()after filtering entries where the elements are not in sorted order (according to their position in the input pool):
def combinations(iterable, r): pool = tuple(iterable) n = len(pool) for indices in permutations(range(n), r): if sorted(indices) == list(indices): yield tuple(pool[i] for i in indices)
The number of items returned is
n! / r! / (n-r)!when
0 <= r <= nor zero when
r > n.
New in version 2.6.
combinations_with_replacement(iterable, r)¶
Return r length subsequences of elements from the input iterable allowing individual elements to be repeated more than once.
Combinations are emitted in lexicographic sort order. So, if the input iterable is sorted, the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, the generated combinations will also be unique.
Roughly equivalent to:
def combinations_with_replacement(iterable, r): # combinations_with_replacement('ABC', 2) --> AA AB AC BB BC CC pool = tuple(iterable) n = len(pool) if not n and r: return indices = [0] * r yield tuple(pool[i] for i in indices) while True: for i in reversed(range(r)): if indices[i] != n - 1: break else: return indices[i:] = [indices[i] + 1] * (r - i) yield tuple(pool[i] for i in indices)
The code for
combinations_with_replacement()can be also expressed as a subsequence of
product()after filtering entries where the elements are not in sorted order (according to their position in the input pool):
def combinations_with_replacement(iterable, r): pool = tuple(iterable) n = len(pool) for indices in product(range(n), repeat=r): if sorted(indices) == list(indices): yield tuple(pool[i] for i in indices)
The number of items returned is
(n+r-1)! / r! / (n-1)!when
n > 0.
New in version 2.7.
compress(data, selectors)¶
Make an iterator that filters elements from data returning only those that have a corresponding element in selectors that evaluates to
True. Stops when either the data or selectors iterables has been exhausted. Roughly equivalent to:
def compress(data, selectors): # compress('ABCDEF', [1,0,1,0,1,1]) --> A C E F return (d for d, s in izip(data, selectors) if s)
New in version 2.7.
count(start=0, step=1)¶
Make an iterator that returns evenly spaced values starting with n. Often used as an argument to
imap()to generate consecutive data points. Also, used with
izip()to add sequence numbers. Equivalent to:
def count(start=0, step=1): # count(10) --> 10 11 12 13 14 ... # count(2.5, 0.5) -> 2.5 3.0 3.5 ... n = start while True: yield n n += step
When counting with floating point numbers, better accuracy can sometimes be achieved by substituting multiplicative code such as:
(start + step * i for i in count()).
Changed in version 2.7: added step argument and allowed non-integer arguments.
Make an iterator returning elements from the iterable and saving a copy of each. When the iterable is exhausted, return elements from the saved copy. Repeats indefinitely. Roughly equivalent to:
def cycle(iterable): # cycle('ABCD') --> A B C D A B C D A B C D ... saved = [] for element in iterable: yield element saved.append(element) while saved: for element in saved: yield element
Note, this member of the toolkit may require significant auxiliary storage (depending on the length of the iterable).
dropwhile(predicate, iterable)¶
Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element. Note, the iterator does not produce any output until the predicate first becomes false, so it may have a lengthy start-up time. Roughly equivalent to:
def dropwhile(predicate, iterable): # dropwhile(lambda x: x<5, [1,4,6,4,1]) --> 6 4 1 iterable = iter(iterable) for x in iterable: if not predicate(x): yield x break for x in iterable: yield x
groupby(iterable[, key])¶
Make an iterator that returns consecutive keys and groups from the iterable. The key is a function computing a key value for each element. If not specified or is
None, key defaults to an identity function and returns the element unchanged. Generally, the iterable needs to already be sorted on the same key function.
The operation of
groupby()is similar to the
uniqfilter in Unix. It generates a break or new group every time the value of the key function changes (which is why it is usually necessary to have sorted the data using the same key function). That behavior differs from SQL's GROUP BY which aggregates common elements regardless of their input order.
The returned group is itself an iterator that shares the underlying iterable with
groupby(). Because the source is shared, when the
groupby()object is advanced, the previous group is no longer visible. So, if that data is needed later, it should be stored as a list:
groups = [] uniquekeys = [] data = sorted(data, key=keyfunc) for k, g in groupby(data, keyfunc): groups.append(list(g)) # Store group iterator as a list uniquekeys.append(k)
groupby()is roughly equivalent to:
class groupby(object): # [k for k, g in groupby('AAAABBBCCDAABBB')] --> A B C D A B # [list(g) for k, g in groupby('AAAABBBCCD')] --> AAAA BBB CC D def __init__(self, iterable, key=None): if key is None: key = lambda x: x self.keyfunc = key self.it = iter(iterable) self.tgtkey = self.currkey = self.currvalue = object() def __iter__(self): return self def next(self): while self.currkey == self.tgtkey: self.currvalue = next(self.it) # Exit on StopIteration self.currkey = self.keyfunc(self.currvalue) self.tgtkey = self.currkey return (self.currkey, self._grouper(self.tgtkey)) def _grouper(self, tgtkey): while self.currkey == tgtkey: yield self.currvalue self.currvalue = next(self.it) # Exit on StopIteration self.currkey = self.keyfunc(self.currvalue)
New in version 2.4.
ifilter(predicate, iterable)¶
Make an iterator that filters elements from iterable returning only those for which the predicate is
True. If predicate is
None, return the items that are true. Roughly equivalent to:
def ifilter(predicate, iterable): # ifilter(lambda x: x%2, range(10)) --> 1 3 5 7 9 if predicate is None: predicate = bool for x in iterable: if predicate(x): yield x
ifilterfalse(predicate, iterable)¶
Make an iterator that filters elements from iterable returning only those for which the predicate is
False. If predicate is
None, return the items that are false. Roughly equivalent to:
def ifilterfalse(predicate, iterable): # ifilterfalse(lambda x: x%2, range(10)) --> 0 2 4 6 8 if predicate is None: predicate = bool for x in iterable: if not predicate(x): yield x
imap(function, *iterables)¶
Make an iterator that computes the function using arguments from each of the iterables. If function is set to
None, then
imap()returns the arguments as a tuple. Like
map()but stops when the shortest iterable is exhausted instead of filling in
Nonefor shorter iterables. The reason for the difference is that infinite iterator arguments are typically an error for
map()(because the output is fully evaluated) but represent a common and useful way of supplying arguments to
imap(). Roughly equivalent to:
def imap(function, *iterables): # imap(pow, (2,3,10), (5,2,3)) --> 32 9 1000 iterables = map(iter, iterables) while True: args = [next(it) for it in iterables] if function is None: yield tuple(args) else: yield function(*args)
islice(iterable, stop)¶
islice(iterable, start, stop[, step])
Make an iterator that returns selected elements from the iterable. If start is non-zero, then elements from the iterable are skipped until start is reached. Afterward, elements are returned consecutively unless step is set higher than one which results in items being skipped. If stop is
None, then iteration continues until the iterator is exhausted, if at all; otherwise, it stops at the specified position. Unlike regular slicing,
islice()does not support negative values for start, stop, or step. Can be used to extract related fields from data where the internal structure has been flattened (for example, a multi-line report may list a name field on every third line). Roughly equivalent to:
def islice(iterable, *args): # islice('ABCDEFG', 2) --> A B # islice('ABCDEFG', 2, 4) --> C D # islice('ABCDEFG', 2, None) --> C D E F G # islice('ABCDEFG', 0, None, 2) --> A C E G s = slice(*args) start, stop, step = s.start or 0, s.stop or sys.maxint, s.step or 1 it = iter(xrange(start, stop, step))) try: nexti = next(it) except StopIteration: # Consume *iterable* up to the *start* position. for i, element in izip(xrange(start), iterable): pass return try: for i, element in enumerate(iterable): if i == nexti: yield element nexti = next(it) except StopIteration: # Consume to *stop*. for i, element in izip(xrange(i + 1, stop), iterable): pass
If start is
None, then iteration starts at zero. If step is
None, then the step defaults to one.
Changed in version 2.5: accept
Nonevalues for default start and step.
Make an iterator that aggregates elements from each of the iterables. Like
zip()except that it returns an iterator instead of a list. Used for lock-step iteration over several iterables at a time. Roughly equivalent to:
def izip(*iterables): # izip('ABCD', 'xy') --> Ax By iterators = map(iter, iterables) while iterators: yield tuple(map(next, iterators))
Changed in version 2.4: When no iterables are specified, returns a zero length iterator instead of raising a
The left-to-right evaluation order of the iterables is guaranteed. This makes possible an idiom for clustering a data series into n-length groups using
izip()should only be used with unequal length inputs when you don't care about trailing, unmatched values from the longer iterables. If those values are important, use
izip_longest(*iterables[, fillvalue])¶
Make an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with fillvalue. Iteration continues until the longest iterable is exhausted. Roughly equivalent to:
class ZipExhausted(Exception): pass def izip_longest(*args, **kwds): # izip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- fillvalue = kwds.get('fillvalue') counter = [len(args) - 1] def sentinel(): if not counter[0]: raise ZipExhausted counter[0] -= 1 yield fillvalue fillers = repeat(fillvalue) iterators = [chain(it, sentinel(), fillers) for it in args] try: while iterators: yield tuple(map(next, iterators)) except ZipExhausted: pass
If one of the iterables is potentially infinite, then the
izip_longest()function should be wrapped with something that limits the number of calls (for example
takewhile()). If not specified, fillvalue defaults to
New in version 2.6.
permutations(iterable[, r])¶
Return successive r length permutations of elements in the iterable.
If r is not specified or is
None, then r defaults to the length of the iterable and all possible full-length permutations are generated.
Permutations are emitted in lexicographic sort order. So, if the input iterable is sorted, the permutation tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each permutation.
Roughly equivalent to:
def permutations(iterable, r=None): # permutations('ABCD', 2) --> AB AC AD BA BC BD CA CB CD DA DB DC # permutations(range(3)) --> 012 021 102 120 201 210 pool = tuple(iterable) n = len(pool) r = n if r is None else r if r > n: return indices = range(n) cycles = range(n, n-r, -1) yield tuple(pool[i] for i in indices[:r]) while n: for i in reversed(range(r)): cycles[i] -= 1 if cycles[i] == 0: indices[i:] = indices[i+1:] + indices[i:i+1] cycles[i] = n - i else: j = cycles[i] indices[i], indices[-j] = indices[-j], indices[i] yield tuple(pool[i] for i in indices[:r]) break else: return
The code for
permutations()can be also expressed as a subsequence of
product(), filtered to exclude entries with repeated elements (those from the same position in the input pool):
def permutations(iterable, r=None): pool = tuple(iterable) n = len(pool) r = n if r is None else r for indices in product(range(n), repeat=r): if len(set(indices)) == r: yield tuple(pool[i] for i in indices)
The number of items returned is
n! / (n-r)!when
0 <= r <= nor zero when
r > n.
New in version 2.6.
product(*iterables[, repeat])¶
Cartesian product of input iterables.
Roughly equivalent to nested for-loops in a generator expression. For example,
product(A, B)returns the same as
((x,y) for x in A for y in B).
The nested loops cycle like an odometer with the rightmost element advancing on every iteration. This pattern creates a lexicographic ordering so that if the input's iterables are sorted, the product tuples are emitted in sorted order.
To compute the product of an iterable with itself, specify the number of repetitions with the optional repeat keyword argument. For example,
product(A, repeat=4)means the same as
product(A, A, A, A).
This function is roughly equivalent to the following code, except that the actual implementation does not build up intermediate results in memory:
def product(*args, **kwds): # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111 pools = map(tuple, args) * kwds.get('repeat', 1) result = [[]] for pool in pools: result = [x+[y] for x in result for y in pool] for prod in result: yield tuple(prod)
New in version 2.6.
repeat(object[, times])¶
Make an iterator that returns object over and over again. Runs indefinitely unless the times argument is specified. Used as argument to
imap()for invariant function parameters. Also used with
izip()to create constant fields in a tuple record. Roughly equivalent to:
def repeat(object, times=None): # repeat(10, 3) --> 10 10 10 if times is None: while True: yield object else: for i in xrange(times): yield object
A common use for repeat is to supply a stream of constant values to imap or zip:
>>> list(imap(pow, xrange(10), repeat(2))) [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
starmap(function, iterable)¶
Make an iterator that computes the function using arguments obtained from the iterable. Used instead of
imap()when argument parameters are already grouped in tuples from a single iterable (the data has been "pre-zipped"). The difference between
starmap()parallels the distinction between
function(*c). Roughly equivalent to:
def starmap(function, iterable): # starmap(pow, [(2,5), (3,2), (10,3)]) --> 32 9 1000 for args in iterable: yield function(*args)
Changed in version 2.6: Previously,
starmap()required the function arguments to be tuples. Now, any iterable is allowed.
takewhile(predicate, iterable)¶
Make an iterator that returns elements from the iterable as long as the predicate is true. Roughly equivalent to:
def takewhile(predicate, iterable): # takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4 for x in iterable: if predicate(x): yield x else: break
tee(iterable[, n=2])¶
Return n independent iterators from a single iterable. Roughly equivalent to:
def tee(iterable, n=2): it = iter(iterable) deques = [collections.deque() for i in range(n)] def gen(mydeque): while True: if not mydeque: # when the local deque is empty newval = next(it) # fetch a new value and for d in deques: # load it to all the deques d.append(newval) yield mydeque.popleft() return tuple(gen(d) for d in deques)
tee()has made a split, the original iterable should not be used anywhere else; otherwise, the iterable could get advanced without the tee objects being informed.
teeiterators are not threadsafe. A
RuntimeErrormay be raised when using simultaneously iterators returned by the same
tee()call, even if the original iterable is threadsafe.
This itertool may require significant auxiliary storage (depending on how much temporary data needs to be stored). In general, if one iterator uses most or all of the data before another iterator starts, it is faster to use
list()instead of
New in version 2.4.
9.7.2. Recipes¶
This section shows recipes for creating an extended toolset using the existing itertools as building blocks.
The extended tools offer the same high performance as the underlying toolset. The superior memory performance is kept by processing elements one at a time rather than bringing the whole iterable into memory all at once. Code volume is kept small by linking the tools together in a functional style which helps eliminate temporary variables. High speed is retained by preferring "vectorized" building blocks over the use of for-loops and generators which incur interpreter overhead.
def take(n, iterable):
"Return first n items of the iterable as a list"
return list(islice(iterable, n))
def tabulate(function, start=0):
"Return function(0), function(1), ..."
return imap(function, count(start))
def consume(iterator, n=None):
"Advance the iterator n-steps ahead. If n is None, consume entirely."
# Use functions that consume iterators at C speed.
if n is None:
# feed the entire iterator into a zero-length deque
collections.deque(iterator, maxlen=0)
# advance to the empty slice starting at position n
next(islice(iterator, n, n), None)
def nth(iterable, n, default=None):
"Returns the nth item or a default value"
return next(islice(iterable, n, None), default)
def all_equal(iterable):
"Returns True if all the elements are equal to each other"
g = groupby(iterable)
return next(g, True) and not next(g, False)
def quantify(iterable, pred=bool):
"Count how many times the predicate is true"
return sum(imap(pred, iterable))
def padnone(iterable):
"""Returns the sequence elements and then returns None indefinitely.
Useful for emulating the behavior of the built-in map() function.
return chain(iterable, repeat(None))
def ncycles(iterable, n):
"Returns the sequence elements n times"
return chain.from_iterable(repeat(tuple(iterable), n))
def dotproduct(vec1, vec2):
return sum(imap(operator.mul, vec1, vec2))
def flatten(listOfLists):
"Flatten one level of nesting"
return chain.from_iterable(listOfLists)
def repeatfunc(func, times=None, *args):
"""Repeat calls to func with specified arguments.
Example: repeatfunc(random.random)
if times is None:
return starmap(func, repeat(args))
return starmap(func, repeat(args, times))
def pairwise(iterable):
"s -> (s0,s1), (s1,s2), (s2, s3), ..."
a, b = tee(iterable)
next(b, None)
return izip(a, b)
def grouper(iterable, n, fillvalue=None):
"Collect data into fixed-length chunks or blocks"
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx
args = [iter(iterable)] * n
return izip_longest(fillvalue=fillvalue, *args)
def roundrobin(*iterables):
"roundrobin('ABC', 'D', 'EF') --> A D E B F C"
# Recipe credited to George Sakkis
pending = len(iterables)
nexts = cycle(iter(it).next for it in iterables)
while pending:
for next in nexts:
yield next()
except StopIteration:
pending -= 1
nexts = cycle(islice(nexts, pending))
def powerset(iterable):
"powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)"
s = list(iterable)
return chain.from_iterable(combinations(s, r) for r in range(len(s)+1))
def unique_everseen(iterable, key=None):
"List unique elements, preserving order. Remember all elements ever seen."
# unique_everseen('AAAABBBCCDAABBB') --> A B C D
# unique_everseen('ABBCcAD', str.lower) --> A B C D
seen = set()
seen_add = seen.add
if key is None:
for element in ifilterfalse(seen.__contains__, iterable):
yield element
for element in iterable:
k = key(element)
if k not in seen:
yield element
def unique_justseen(iterable, key=None):
"List unique elements, preserving order. Remember only the element just seen."
# unique_justseen('AAAABBBCCDAABBB') --> A B C D A B
# unique_justseen('ABBCcAD', str.lower) --> A B C A D
return imap(next, imap(itemgetter(1), groupby(iterable, key)))
def iter_except(func, exception, first=None):
""" Call a function repeatedly until an exception is raised.
Converts a call-until-exception interface to an iterator interface.
Like __builtin__.iter(func, sentinel) but uses an exception instead
of a sentinel to end the loop.
bsddbiter = iter_except(db.next, bsddb.error, db.first)
heapiter = iter_except(functools.partial(heappop, h), IndexError)
dictiter = iter_except(d.popitem, KeyError)
dequeiter = iter_except(d.popleft, IndexError)
queueiter = iter_except(q.get_nowait, Queue.Empty)
setiter = iter_except(s.pop, KeyError)
if first is not None:
yield first()
while 1:
yield func()
except exception:
def random_product(*args, **kwds):
"Random selection from itertools.product(*args, **kwds)"
pools = map(tuple, args) * kwds.get('repeat', 1)
return tuple(random.choice(pool) for pool in pools)
def random_permutation(iterable, r=None):
"Random selection from itertools.permutations(iterable, r)"
pool = tuple(iterable)
r = len(pool) if r is None else r
return tuple(random.sample(pool, r))
def random_combination(iterable, r):
"Random selection from itertools.combinations(iterable, r)"
pool = tuple(iterable)
n = len(pool)
indices = sorted(random.sample(xrange(n), r))
return tuple(pool[i] for i in indices)
def random_combination_with_replacement(iterable, r):
"Random selection from itertools.combinations_with_replacement(iterable, r)"
pool = tuple(iterable)
n = len(pool)
indices = sorted(random.randrange(n) for i in xrange(r))
return tuple(pool[i] for i in indices)
def tee_lookahead(t, i):
"""Inspect the i-th upcomping value from a tee object
while leaving the tee object at its current position.
Raise an IndexError if the underlying iterator doesn't
have enough values.
for value in islice(t.__copy__(), i, None):
return value
raise IndexError(i)
Note, many of the above recipes can be optimized by replacing global lookups with local variables defined as default values. For example, the dotproduct recipe can be written as:
def dotproduct(vec1, vec2, sum=sum, imap=imap, mul=operator.mul):
return sum(imap(mul, vec1, vec2))


text: Most users lock their computer screens when they temporarily step away from them. While this seems like a good security measure, it isn't good enough, a researcher demonstrated this week.Rob Fuller, principal security engineer at R5 Industries, found out that all it takes to copy an OS account password hash from a locked Windows computer is to plug in a special USB device for a few seconds. The hash can later be cracked or used directly in some network attacks.For his attack, Fuller used a flash-drive-size computer called USB Armory that costs $155, but the same attack can be pulled off with cheaper devices, like the Hak5 LAN Turtle, which costs $50.The device needs to masquerade as an USB-to-Ethernet LAN adapter in such a way that it becomes the primary network interface on the target computer. This shouldn't be difficult because: 1) operating systems automatically start installing newly connected USB devices, including Ethernet cards, even when they are in a locked state and 2) they automatically configure wired or fast Ethernet cards as the default gateways.For example, if an attacker plugs in a rogue USB-to-Gigabit-Ethernet adapter into a locked Windows laptop that normally uses a wireless connection, the adapter will get installed and will become the preferred network interface.Furthermore, when a new network card gets installed, the OS configures it to automatically detect the network settings through the Dynamic Host Configuration Protocol (DHCP). This means that an attacker can have a rogue computer at the other end of the Ethernet cable that acts as a DHCP server.\u00a0USB Armory is a computer on a stick that's powered via USB and can run Linux, so no separate machine is required.Once an attacker controls a target computer's network settings via DHCP, he also controls DNS (Domain Name System) responses, can configure a rogue internet proxy through the WPAD (Web Proxy Autodiscovery) protocol and more. He essentially gains a privileged man-in-the-middle position that can be used to intercept and tamper with the computer's network traffic.According to Fuller, computers in a locked state still generate network traffic, allowing for the account name and hashed password to be extracted. The time it takes for a rogue USB device to capture credentials from a system using this attack is around 13 seconds, he said.He tested the attack successfully on Windows and OS X. However, he's still working on confirming if OS X is vulnerable by default or if it was his Mac's particular configuration that was vulnerable."First off, this is dead simple and shouldn\u2019t work, but it does," the researcher said in a blog post. "Also, there is no possible way that I\u2019m the first one who has identified this, but here it is."Depending on the Windows version installed on the computer and its configuration, the password hashes will be in NT LAN Manager (NTLM) version 2 or NTLMv1 format. NTLMv2 hashes are harder to crack, but not impossible, especially if the password is not very complex and the attacker has access to a powerful password cracking rig.There are also some relay attacks against network services where NTLM hashes can be used directly without having to know the user's plaintext password.The lesson from all this is, as Fuller noted on Twitter: "Don't leave your workstation logged in, especially overnight, unattended, even if you lock the screen."


text:
Women, especially we mothers, can be our own harshest critics. And when we don't live up to our own very high expectations, we experience one of the most destructive feelings—guilt. We take the blame. We carry the responsibility. And we always find fault. With ourselves and with our performance as mothers.
I remember the first time [...]
Linda Brodsky, MD is a
Proud Contributor of
#1 Best Selling Book
- My Website
- Follow me on Twitter


text:
4 Trusty Tips When Investing in REITs
Over the past 10 years, real estate investment trusts, or REITs, have been stock market darlings, outperforming Standard & Poor's 500 index.
But there are signs REITs may be overheating as investors pile in, according to some experts. The average price-to-earnings ratio in the bellwether MSCI REIT Index was 41.5 at the end of July versus just 17.86 last year. And, once-hefty dividend yields have fallen.
"Most REITs in our coverage have dividend yields well below their historical norms," says Todd Lukasik, a senior equity analyst at Morningstar.
With that in mind, advisers are counseling investors to be picky when buying REITs, given their fast run-ups.
High valuations
"These valuations aren't sustainable," says Geoffrey Dancey, a portfolio manager at Cutler Capital Management LLC in Worcester, Mass. And they can lead to lower stock prices down the road, he adds, translating into losses.
Examples of unusually low REIT yields and high prices aren't hard to find. Simon Property Group, which mainly invests in malls, was trading at $145 in early August and sports a 3.2% yield.
"Persistently low (interest) rates are still driving REITs," says Lukasik. "It's hard for investors to get that."
Lukasik worries that once interest rates rise, REITs could tumble. The reason: REITs rely on borrowed money to make acquisitions. When interest rates go up, so do the borrowing costs of REITs.
In addition, investors may seek safer returns in risk-free Treasuries, which could cause a run for the exits, according to a Morgan Stanley research report.
REIT hunting
Caveats aside, REITs have a place in investors' portfolios. They pool capital to buy diversified real estate that investors normally couldn't afford. And, shareholders also benefit from their structure. REITs must distribute at least 90% of their taxable income annually.
But, the key to REIT hunting is doing your homework, says Karl Romero, a Certified Financial Planner professional with Karl Romero & Associates, a wealth management firm in Santa Ana, Calif. "Take it sector by sector," he says.
Here are some key ways to protect yourself when REIT hunting.
Avoid newly issued REITS. A host of new REITs, including single-family residential REITs, is coming to the market this year. However, these freshly minted stocks lack track records, so investors can't scrutinize their success.
"These new REITs are signs that this niche is getting pricey," says Stephen Mauzy, a principal at the Colorado-based investment analysis firm S.P. Mauzy & Associates. "Stay away from the new stuff."
Mauzy says he prefers to see how a REIT maintains its payouts and navigates market troughs over time.
Stick with publicly traded REITs. There are two types of equity REITs -- nontraded and ones that trade on a stock exchange. According to Morningstar research, publicly traded commercial equity REITs consistently outperform nontraded ones over time. They also recover faster during downturns, have lower fees than nontraded REITs and are stronger performers in bull markets.
The Financial Industry Regulatory Authority also has a warning. The independent financial watchdog says nontraded REITs have several drawbacks, including lack of transparency. They must often be held for eight years or more, since there are limited secondary markets, and front-end fees can run up to 15% of the REIT's share price.
FINRA's recommendation: Short-term investors should look elsewhere. Longer-term investors should know their capital needs if they do invest in nontraded REITs.
Don't overload your portfolio to chase REIT yields. Typically, REITs compose 5% to 10% of investors' portfolio assets. However, these days, investors are tempted to nab high yields by shifting more money into REITs rather than reaping the low yields of the bond market. Resist this urge, says Joe Davis, head of Vanguard's investment strategy group. He says REITs tend to mimic stocks rather than bonds.
"The final result is a more aggressive and more stock-heavy strategic asset allocation," Davis wrote in a commentary for Vanguard. He warns that an income-focused strategy of buying dividend-paying stocks, including REITs, is not risk-free.
Avoid REITs that use borrowed capital. REITs that use borrowed capital to spike returns can get pummeled when interest rates rise since their borrowing costs shoot up. And mortgage REITs, which mainly invest in real estate debt, are usually highly leveraged. That makes them more risky, Mauzy says. Conversely, equity REITs, which own properties, tend to be less rate sensitive.
The upshot: When interest rates go up dramatically, the mortgage-backed securities that the REIT owns plummet in value as its borrowing costs go up. This isn't a good scenario for investors and quickly can lead to dividend cuts and even bankruptcy for the REIT, Mauzy says.
Some equity REITs have significant debt, too. For example, CommonWealth REIT, which invests in office and industrial buildings, has more debt than its entire market capitalization. In June, S&P cut the REIT's rating to junk status. However, Lukasik says a lot of equity REITs that were once debt-heavy have improved their balance sheets.
That's why it pays to be picky with REITs.


text: The Mona Lisa's smile is now a little less enigmatic. A German academic claims that he has definitive proof as to the identity of the model for da Vinci's famous painting, who he believes is Lisa Gherardini, the wife of a wealthy Florentine merchant. The researcher found notes in the margins of a book, dated 1503, detailing Gheradini as the portrait-sitter. In response to this, we smile, albeit coyly. [UPI]


text:
In the 2003 book Mapping the Organizational Psyche: A Jungian Theory of Organizational Dynamics and Change, authors John G. Corlett and Carol S. Pearson model the organizational psyche in two layers: conscious and unconscious. The authors assert that the ego-driven actions and behaviors of those leading the organization manifest activity and shape organizational culture. The unconscious layer—the heart of psychologist Carl Jung's analytical psychology—provides the psychic energy necessary for conscious actions.
Conscious Organization. The conscious portion of the organization consists of the "center of consciousness" and the "public face." The "center of consciousness" is analogous to Jung's concept of the ego. It comprises all of the conscious activities performed in an organization, such as planning, managing, coordinating, developing, marketing, testing, implementing and reflecting. The center of consciousness is composed of the collective egos in the organization arranged and empowered by the structures instituted by its leadership.
The "public face" of the organizational psyche corresponds to Jung's concept of the persona. The persona is how individuals present themselves to the world and is driven by two sources: the expectations and demands of society and the social aims and aspirations of individuals. The organizational analog provides a filter through which energy flows in and out of the organizational psyche in its connection with the outside world. It is where the brand identity of the organization lives. It transmits the ideal images of itself to the outside world hiding aspects which are deemed "internal" by the organization's leadership.
Organizational Unconscious. The collective unconscious serves as the foundation for the entire psyche of the organization. It is the container for the neurology that defines us as human beings. It resides in the inherited structure of the brain. It contains two types of structures: instincts and archetypes. Instincts are the consistent modes of action common to all humans that do not require cognitive engagement. Archetypes are psychic patterns that shape human behavior. They can be understood as the controlling patterns in the mind that regulate how we experience life. Archetypes represent our basic responses to organizational life.
The organizational unconscious is the unique array of "energies, contents and truths" that operate beyond the conscious control of the organization. It is the bridge between the conscious organization and the collective unconscious. It provides the psychodynamic environment for these two forces to interplay. It is composed of the shadow, the participation mystique, the complexes and the organizational archetype.
Jung's shadow theory consists of the collection of what has been repressed because the organization does not allow it buy its rules, procedures or values. The shadow of an organization, like its individual counterpart, is its alter ego. It contains both positive and negative energies and subtly affects how the conscious organization goes about its business. The shadow contains features that are contrary to customs and group moral conventions.
The participation mystique is the part of the organizational unconscious that links individual egos to the organization. It provides the attractor that makes an individual want to be part of a given organization. It is the conduit for the organizational archetypes to be expressed by each person in the organization.
Organizational complexes are containers of memories, thoughts, and feelings experienced as work progresses through the activation of a given archetype. They are, in essence, the underlying assumptions that form at the unconscious level in the act of doing business. Over time, these complexes uniquely identify an organization and provide the basis for its culture. Values and believes are built upon complexes and change over time as the environment provide opportunities to solve new problems.
The organizational archetype roughly corresponds to the archetypal self in individuals. It serves as a significant source of energy for the organization and provides the pattern for how it operates. Individual aspects of the organizational archetype connect to the universal collective unconscious archetypes from which they draw their patterns. Corlett and Pearson define the organizational archetype as having four dimensions, or life forces. Each life force contains elemental archetypal energies aligned with a particular aspect of work life. The life forces are arranged in two pairs of complementary forces that seek balance with one another. The first pair is focused on people and results. The people-focused life force addresses how an organization relates to its employees and how employees relate to each other. The results reflect how the organization gets things done. The second pair of the life forces is learning and stabilizing. Learning is how an organization gains knowledge, takes risks and moves through the creative process. In turn, stabilizing is concerned on how an organization manages itself in terms of what it provides to its employees and the processes and controls it has in place. For a healthy organization, both life force pairs should be balanced.
Corlett and Pearson provide us with a unique and useful map of the organizational psyche. They extend the concepts delineated by Jung in his research of the human psyche in his analytical, or depth, psychology. This map orients us into the mysteries of organizational life that go beyond conscious activities. It gives us understanding and appreciation of the structures in the unconscious responsible for the psychodynamics that regulate much of the success and happiness (or the opposite) inside our organizations.
Read other posts by Jorge Taborga
Keep up with our community: Facebook | Twitter | Saybrook's Organizational Systems Program


text:
So to celebrate, let's all drink Almond Joy Smoothies! Because the only thing better than candy for breakfast is healthy candy for breakfast!
Monday, February 4, 2013
Almond Joy Smoothie!
So to celebrate, let's all drink Almond Joy Smoothies! Because the only thing better than candy for breakfast is healthy candy for breakfast!
18 comments:
Congratulations Michelle! So so exciting!ReplyDelete
Congratulations on the new house girl! I can't wait to see what you do with it. For some reason, I thought you lived up near me in Northern CA. I don't know why I thought that :) You of seen our house when we bought it 14 years ago, scary! It was this ugly blue color on the outside and it was dated back to the 50's. We did a lot of work and now it's a brown shingled cottage. More my style!ReplyDelete
Ok, this looks smoothie looks amazing and I even think my kiddos would be fans!
Congratulations again girl! Next up, BABY!
xoxo, Jackie
Congratulations! I'm so happy and excited for you! Love this smoothie too!ReplyDelete
Ahhh so exciting! Katie told me on Friday and I am so happy for you! I can't wait to see how you and Adam make it yours :)ReplyDelete
Southern (California) Belle
May joy and prosperity reign forever in your new home xoxoxoxoReplyDelete
May joy and prosperity reign forever in your new home xoxoxoxoReplyDelete
Congrats on your new house!!! That is super exciting news and such an awesome time in your life. Too bad we wont't be LBC neighbors when I move back in a few months. I am totally bummed about that.ReplyDelete
I love this smoothie recipe and am going to have to try this ASAP. I am working on an Almond Joy Raw Bar recipe for a post next week. Maybe I will eat a bar and drink the smoothie together for a double whammy of almond joy bliss.
So exciting! Congratulations :) As for this smoothie...really wishing I had a blender in my dorm room, this is getting bookmarked to make next time I'm home. Yum!ReplyDelete
Congrats on the new house! How exciting!ReplyDelete
Love this smoothie! Almond joy's are my favorite and I'd drinking this for breakfast!
congratulations! i'm sure it'll be stunning when you're finished with it (especially the kitchen - fun!)ReplyDelete
What a beautiful smoothie, Michelle. thanks for linking up with Food on friday. The latest one is on garlic. I do hope to see you again soon. CheersReplyDelete
- AnonymousJanuary 19, 2014 at 6:19 AM
HI! Do you know how many calories or WW points this is?ReplyDelete
- AnonymousSeptember 13, 2014 at 8:01 AM
Hi - This looks really good, but I was wondering if you post anywhere the nutrition facts for your recipes? Thank you!!ReplyDelete


text:
What did you build today (Pictures) ?
@mfalkvidd Didn't you play with electromagnets when you were a kid? At least try coiling the wire and maybe putting a metal core inside it. Use a lot of coils. The more the better. Then maybe your reed-type switch would have a chance of seeing enough magnetism to trigger it.
@neverdie wouldn't that choke the current passing through the coil? He said he needs 6-48V DC. 0.5-10A
@NeverDie The wires are there in case I need to upload a new bootloader. This sensor one of the first ones I have done where the Arduino isn't easily removable and I wanted to try to make it a little easier in case I had to change it.
I used an original Prusa I3 MK2 to do the printing. This is in ABS (because I didn't have any white PLA) so the print is a little rougher than if it was done with PLA.
@dbemowsk Thanks! No, my son didn't help with the case design (yet). It was from a previous project that I slightly modified. My son is 6 so he doesn't really have the attention span to do too much yet. I'm hoping that doing little parts of a project will be fun for him and eventually turn into full projects.
@mfalkvidd & @sundberg84 Thanks. I guess I need to rig something up if he is going to be helping me more often...
@gohan No, it's not battery powered. I didn't want to have to deal with changing batteries and there is a power outlet right near the location he wanted it. Here is the code:
/** The MySensors Arduino library handles the wireless radio link and protocol between your home built sensors/actuators and HA controller of choice. The sensors forms a self healing radio network with optional repeaters. Each repeater and gateway builds a routing tables in EEPROM which keeps track of the network topology allowing messages to be routed to nodes. Created by Henrik Ekblad <email@example.com> Copyright (C) 2013-2015 Sensnology AB Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors Documentation: http://www.mysensors.org Support Forum: http://forum.mysensors.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. ******************************* REVISION HISTORY Version 1.0 - PeteWill */ #define SKETCH_NAME "Controller" #define SKETCH_VERSION "1.0" //Child (sensor) name that will be sent to gateway #define CONTROLLER_CHILD_NAME "Room Control" // Enable debug prints to serial monitor #define MY_DEBUG //MySensors debug messages #define LOCAL_DEBUG //Code specific debug messages // Enable and select radio type attached #define MY_RADIO_NRF24 //#define MY_RADIO_RFM69 #define MY_RF24_PA_LEVEL RF24_PA_HIGH //Options: RF24_PA_MIN, RF24_PA_LOW, RF24_PA_HIGH, RF24_PA_MAX #define MY_RF24_CHANNEL 76 #define MY_NODE_ID 1 //Manually set the node ID here. Comment out to auto assign #include <MySensors.h> #include <Bounce2.h> #define SCENE_CHILD_ID 0 #define BAUD_RATE 57600 #ifdef LOCAL_DEBUG #define dbg(...) Serial.print(__VA_ARGS__) #define dbgln(...) Serial.println(__VA_ARGS__) #else #define dbg(x) #define dbgln(x) #endif //Button Pins -- Arduino Digital I/O pin button is connected to #define BLIND_UP_PIN 5 #define BLIND_STOP_PIN 4 #define BLIND_DOWN_PIN 3 #define LIGHT_ON_PIN 8 #define LIGHT_OFF_PIN 7 #define EXTRA_BUTTON_PIN 6 #define LED_PIN A0 //Pin for the LED transistor #define FLASH_TIME 300 //Amount of time to flash the LED (in milliseconds) #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) uint8_t ledOn = 0; uint32_t ledMillis; //Used for tracking the LED flash time //The sceneNum array corresponds with the buttonPins array so if a button pin is read, it will send the scene number to the gateway int sceneNum[] = {0, 1, 2, 3, 4, 5}; uint8_t buttonPins[] = { BLIND_UP_PIN, BLIND_STOP_PIN, BLIND_DOWN_PIN, LIGHT_ON_PIN, LIGHT_OFF_PIN, EXTRA_BUTTON_PIN }; //Debouncer is used for the buttons. Need to have the same number as the total buttons. Bounce debouncer[] = { Bounce(), Bounce(), Bounce(), Bounce(), Bounce(), Bounce() }; //used to keep track of previous values contact sensor values uint8_t buttonPrev[] = {1, 1, 1, 1, 1, 1}; MyMessage scene(SCENE_CHILD_ID, V_SCENE_ON); void before() { #ifdef LOCAL_DEBUG Serial.begin(BAUD_RATE); #endif } void presentation() { // Send the sketch version information to the gateway sendSketchInfo(SKETCH_NAME, SKETCH_VERSION); // Register all sensors to gw (they will be created as child devices) present(SCENE_CHILD_ID, S_SCENE_CONTROLLER, CONTROLLER_CHILD_NAME); } void setup() { //Set up Pins for (int i = 0; i < ARRAY_SIZE(buttonPins); i++) { // Setup the pins pinMode(buttonPins[i], INPUT_PULLUP); // After setting up the button, setup debouncer debouncer[i].attach(buttonPins[i]); debouncer[i].interval(100); dbg(F("Set up contact Pin: ")); dbgln(buttonPins[i]); } pinMode(LED_PIN, OUTPUT); } void loop() { uint32_t currentMillis = millis(); for (int i = 0; i < ARRAY_SIZE(buttonPins); i++) { debouncer[i].update(); // Get the update value uint8_t value = debouncer[i].read(); if (value != buttonPrev[i]) { dbg(F("Value is for sensor #")); dbg(buttonPins[i]); dbg(F(" is ")); dbgln(value); if (value == 0) { //Button is pressed send scene value send(scene.set(sceneNum[i])); ledOn = 1; ledMillis = currentMillis; } buttonPrev[i] = value; } } if (ledOn) { digitalWrite(LED_PIN, HIGH); if (currentMillis - ledMillis > FLASH_TIME) { ledOn = 0; digitalWrite(LED_PIN, LOW); } } }
@neverdie said in What did you build today (Pictures) ?:
@mfalkvidd Didn't you play with electromagnets when you were a kid? At least try coiling the wire and maybe putting a metal core inside it. Use a lot of coils. The more the better. Then maybe your reed-type switch would have a chance of seeing enough magnetism to trigger it.
Yes, but that would unfortunately completely defeat my purpose. The device should be easy to install (I can't expect the end-user to coil their cable) and work with cables that are designed for >10A which means they will be too thick to coil. I understand that I did not mention all aspects of the use case in my post though so thanks anyway.
@petewill said in What did you build today (Pictures) ?:
Question for you all... what are you doing (if anything) to vent the fumes from soldering? I haven't really been worried about it in the past but it makes me nervous with my son doing it with me.
I have a Hakko 493 clone, it has a carbon filter to absorb the smoke (or most of it) so it doesn't smell too much in the room when I need to solder for a long time and I can't open the windows. I don't have a link because I bought it in my local shop (it was cheaper than AliExpress + shipping), but you can easily find similar models or clones of the FA400 by searching "smoke absorber" on AliExpress.
I had a similar requirement recently, which was determining when my CNC was finished. I decided to measure the current to decide that. It's 24VDC and might have a current as high as 6amp in a theoretical worst case, but as little as 0.5a when moving just one of the stepper motors. So, what I came up with was this, which I've tested and it works:
Basically, it uses six 5-watt 3 ohm resistors in parallel to create a 1/2-ohm sense resistor, which an arduino then measures the voltage drop across by just doing an analog read from an analog GPIO pin across a voltage divider. I don't really know your use-case, but maybe you could adapt it for your application? You can ignore the LoRa module, which in my case I use to send out a signal to a remote receiver inside my house that the CNC print job (in the garage) is done.
I made a MysX template for anyone who wants to create a MysX board to any EasyPCB in KiCadd.
Found here: https://github.com/sundberg84/HomeAutomation/tree/master/MysX template EasyPCB
@nca78 thanks! I'll check that out.
Today I made and assembled a board which instantiates the schematic I posted above two days ago on this thread:
Basically, it sends a wireless signal as soon as the CNC machine finishes its work.
My old Yamaha YSP-1100 soundbar just decided to die.
After some searching I found the problematic capacitor. A 22uF 600V had dropped to 6uF....
@hek How did you find the faulty capacitor?
@NeverDie, well, I started my trouble shooting with a lucky google search. For old devices like this, you are often not the first person experiencing a problem.
I had a good laugh when examining the other board. Is this a normal solution for remote-in?
@hek said in What did you build today (Pictures) ?:
solution for remote-in
DIY optocoupler?
@hek If this is for a sound bar, I know on some older stereos they had a remote signal out that you could tie into other components in the system. Maybe it's something like that.
@neverdie could you achieve something similar with a sonoff pow measuring the whole cnc power consumption?
@gohan I don't know, as I'm not familiar with Sonoff, or how sensitive it is.
It's a WiFi power meter with a relay to turn off the load, so you could set a rule on controller that if measured power goes below a certain amount it will notify something
It's a very good suggestion. If I wasn't already done, I'd try it. If it works, the Sonoff would be simpler and less effort.
Another hour on my... whatever it is.
Anyone that can recommend a open source router (hardware) or cheap hardware for pfsense which isn't that big and draws that watt amount.
WHat do you need a PC for?
@gohan it's a pc with my intention to run pfsense (open source router) but it is old and draws to much power for my taste.
executivul last edited by executivul
How much power does that pc draw?
Asrock Q1900B-ITX + pico 12V to atx psu + PCIE Intel Nic 2/4 Gbit ports + SSD can run on 20W or less, but I believe the J1900 Celeron lacks AES for VPN if you care about it.
HP DL 380 G7 2xL5640 hex core, 144GB Ram, 4xGbit Nics, SSD, 90W at idle (99.9% of time) and pfsense is only one of the VMs I constantly run, besides OH2, Ubiquity controller, Nextcloud. The ability to snapshot a development VM, or fork (clone) it is a killer feature for me.
Another DL 380 G7 in standby is drawing 15W.
Phu*ck I have some old shitty switches that draw 30-40W, not to mention security cameras, 300-500Wh during the night for all my crazy home automation&security.
@sundberg84 not cheap but 15W (at max load): https://www.aliexpress.com/item/Pfsense-Hardware-Qotom-Barebone-Mini-PC-Nano-itx-Core-i7-4500U-Fanless-Mini-Computer-X86-Router/32799048185.html
Cheaper alternatives:
https://www.aliexpress.com/store/product/2015-new-arrival-direct-selling-bay-trail-J1800-mini-pc-windows-8-1-Qotom-linux-2G/108231_32285025655.html max 10W
https://www.netgate.com/solutions/pfsense/sg-1000.html 2.5W idle
scalz Hardware Contributor last edited by scalz
the little netgate looks cute, but wondering if it would be enough powerful (for streaming etc.)
when you already have parts laying around, like ram, hdd etc, you could also use intel J3355 or J4205 cpus, maybe better than J1800. J3355 boards are not expensive. Then add a pcie NICs or a simple usb to gigabit..
I would choose micro atx board because often cheaper, same for ram (more compatible ref vs itx boards sometimes are restrictive), and it may be more flexible for pcie slot. That is, if size is not a concern.
Or maybe a more powerful cpu, if you plan to factorize lot of things in VMs etc.
In both case it could also allow you to save power by decreasing number of rpis for example. But an interesting math would be pros&cons between features, power consumption saving, cost of a more expensive setup vs years for ROI about power savings (if that is the point)
Maybe we'll see new mini pc router in future with new sbc and mcus..
@sundberg84 you could have all the rpi's running on the pc hardware, and save a couple of pennies on the electricity bill..
I exchanged my HA rpi with an atom based machine, as it had 4Gb ram. Now I'm using docker to containerize the different parts of my setup (influxdb, grafana, domoticz, nodered, moquitto, etc.). Ok, it uses a bit more power, but not that much compared to the flexibility that I have now. So now I have a lot of "machines" for handling the different parts.. I can even spin up an experimental domoticz in seconds (I'm playing with mqtt for backbone in my HA setup, instead of mysensors serial protocol, and a lot of http calls to different parts of my system.
You take for granted everybody knows how to work with docker
I didn't know how to work with docker 2 months ago.. If I can learn it, others can do it too It's not that complicated after all
Some weeks ago I made a video with my children and i had this idea to do something with electronics... so mostly as a testproject I made a introduction video for EasyPCB. I kinda like it... but my English isnt the best in some places.
Easy/Newbie PCB for MySensors – 08:01
— Andreas Sundberg
sburlot last edited by
I built a GPIO interface for the Raspberry PI using @GertSanders PCB (link)
I ordered the PCB via OSH Park, successfully soldered 2 and my setup is now much cleaner without these jumper cables.
For the second one, I soldered the NRF directly on the PCB (just because I wanted to gain some height), and everything works flawlessly.
Big thank to @GertSanders for his PCB!
My gateway runs mysgw, Mosquitto and Node-Red.
In the back is my Raspberry Dashboard displaying the weather, info from my solar installation and the sensors MQTT messages.
@sburlot Can't help but see your weather display in the background. What platform is that?
I made this LoRa shield for an Arduino Pro Mini:
I like it because of the small form factor and because it preserves access to all of the Pro Mini pins. i.e. you can plug it in just like a Pro Mini.
I also gave it 4 header pins for an Si7021 TH sensor, which I haven't yet attached.
sburlot last edited by
It's a Raspberry 3, with a cheap 480x320 screen, and a Python+PyGame script.
Start of my script comes from this script
Temp+Humidity comes from mySensors SenseBender Micro via NodeRed/MQTT
Solar power comes from my inverter via a script (also MQTT)
Weather from WeatherUnderground
not built today, but someone mentioned fumes extractor, so this is what I built for soldering, light and fume extractor are powered by a small usb rechargeable powerbank. Fan has a active carbon filter behind it and works great for small to medium-ish projects I work on
@dakipro Very creative! Thanks for sharing. I've seen those flexible hose things before in other contexts, but I don't know the name. What is the term?
Found it: https://www.aliexpress.com/item/Round-Nozzle-Flexible-Water-Oil-Coolant-Pipe-Hose-3-8BSP-Thread-5pcs/32831878467.html?spm=2114.search0184.108.40.206c927439kjZ18O&ws_ab_test=searchweb0_0,searchweb201602_5_10152_10065_5711320_10151_10344_10068_10130_10324_10342_10547_10325_10343_10546_10340_10548_10341_10545_10084_10083_10618_10307_5711220_5722420_10313_10059_10534_100031_10103_10627_10626_10624_10623_10622_10621_10620_10810_10811,searchweb201603_25,ppcSwitch_5&algo_expid=b2667682-4b14-4802-a36d-35f0b06b6ca7-5&algo_pvid=b2667682-4b14-4802-a36d-35f0b06b6ca7&priceBeautifyAB=0
@neverdie Don't they use something like that on CNC machines for the coolant?
@dbemowsk Yup.
Thanks. About the cnc pipes, just check if they are US or EU threads, as I was initially planning to fasten them with nuts, but couldn't find any US type in scandinavia. So I had to improvise with A LOT washers and heavy screws as seen in the picture. For the base I used old laptop cooling holder (whatever the name is).
And it works surprisingly well for what I use it, I was expecting it to have a bouncing effect, but it is not that much noticeable.
Way better then that ebay crappy holder with big magnifying mirror that is just so flimsy and annoying.
I was planing to dedicate one hose as a solder feeder, but never bothered with it.
Light is a touch-to-adjust type, very very practical , something like this
I also have a switch for a fan on the side, and a volt stepup as the fan works on 12V (9 or 10 is my setting).
I have glued the magnets on the right on the last photo, they are then actually on the left of the silicone mat where the "compartments" are
@dakipro What hose diameter do you recommend? I'm guessing larger diameters will be stiffer than smaller diameters, but that's only just my uninformed guess.
@dakipro that's really nice, I have bought pipes and clips, but didn't find a suitable base yet. Good idea to use a battery too, it avoids an additional cable.
Another EasyPCB video - a complete build of a 5v node with a radiotest and cleareeprom.
Complete build! - Easy/Newbie PCB (Nrf24l01+) for MySensors – 15:44
— Andreas Sundberg
@neverdie i think i have the larger ones, but with 3-4$ pricetag one can easily order both and use what works best (or even combine them for more flexibility). I originally planned on using only 4 pipes, but then I figured why not put them all, they will just lie around anyway. Now I have two clamps orientated horizontally and two vertically for easier mounting.
Battery bank is I winner I think, it is very very practical and holds several hours.
Even if it goes flat during the project, it is just to plug everything into the wall charger, as one would have to do anyway.
zrom69 last edited by
here is photo my usb gateway with STM32 power
it's a big difference with arduino nano
zrom69 last edited by
and that's a TV box turn into a mini pc more powerful than raspberry pi 3
and I installed linux with domoticez and imperihome EMMC Flash is fluid and fast
and toutsca works well
8 x CPU: Amlogic S912 Octa core ARM Cortex-A53 CPU jusqu'à 2GHz (DVFS)
GPU: 750MHz + ARM Mali-820MP3 GPU Processeur
RAM: 3Go DDR3
ROM: 32Go EMMC Flash
Système d'exploitation: Android 6.0
Ethernet: 100M/1000M
WIFI: 2.4GHZ / 5.8GHZ 802.11a / b / g / n / Ac
Bluetooth: BT4.1
Not working on hardware at the moment, but I am still "building" things with mysensors.. Recently I have been moving all my homeautomation to docker containers, and also moving stuff towards using MQTT as a backbone transport.
Right now I have moved automation rules from domoticz to nodered, after which I have "killed" domoticz (the only reason why I had been keeping it alive, was because it handled some of my automation rules for turning tv / amplifier on when chromecast was active etc).
Together with my chromecast "surveilance python service" I get notifications on MQTT when any of my two chromecasts starts an app / pause/ play etc. The python program also has a MQTT listener, so I can send pause/play etc. to my chromecasts over mqtt. And even throw a stream to it over mqtt.
Today I made a universal control endpoint, so I can send pause/play etc. to a single mqtt topic, and then nodered directs it to the active chromecast, or to my dvd player if that is the active in the current scene.
In the end everything should play together with a dashboard that I have made in angular5 (rewriting it at the moment to use MQTT instead of various http calls)
The plan is that the dashboard is on a wallmounted tablet, acting as a simple dashboard / weather station, where one can control basic things in the livingroom (start streaming of specific Radio / TV channels among other things).
The nodered project can be found here, if anyone would like to have a look..
bjacobse last edited by
Quite cool, what is your reason behind to move away from Domoticz and go all in on node-red?
I guess because you can do pretty much everything you want instead of being bound to what Domoticz can do
I have been using influxdb/grafana for the last year or so, for logging data and presenting it, so no need to use domoticz for that. Over a year ago I injected nodered into the stream, so it sits between mysensors and domoticz, and was used to route things around (And make some fake sensors for domoticz).
For the dashboard part I have been developing my own solution. First it was running within domoticz as a customized dashboard, but I moved it to Angular instead, with a strong dependency towards domoticz, as I could query that to get sensor values. Lately I had moved on to use MQTT for the dashboard (and internal node-red data routing). There I can get persistent data (retain) that keeps the latest data on a given topic. Then my need for domoticz went away there..
The last thing I then used domoticz for, was the automation rules for turning on / off my tv when the chromecast was activated, and control a couple of LED strips according to the state of the chromecast (playing / paused etc). With that moved to nodered, then domoticz could be turned off.
The complete software stack is a bit larger, than with domoticz for everything, but it is much more flexible, than what I could achieve with domoticz.
also it brought in a couple of needed updates for my node-red mysensors nodes, so that was a "bonus" as well
sincze MySensors Evangelist last edited by
@tbowmo interesting indeed, tnx for sharing. Currently I still use Domoticz for the API Logging is done with INFLUX and Grafana. However in addition to Domoticz I use Pass2PHP. I can now control everything with PHP. PHP seems pretty common so a lot of examples I can find online ;-0. I am a complete MQTT / NODE-RED NOOB.
@sincze said in What did you build today (Pictures) ?:
I am a complete MQTT / NODE-RED NOOB.
So start playing with it to become a Node-Red/MQTT Fanboy!
It is always those last connections...
@sincze well you're half way there, already got influxdb implemented
NodeRed is pretty easy to work with, and MQTT is (almost) just start and forget with mosquito. Just a messaging channel that you can hook any listener into, like python scripts, angular5 web apps etc.
Today I built auto-detection of missing MySensors keywords. The build system will complain if someone adds a new keyword to the Doxygen documentation but forgets to add it to keywords.txt.
This is what the output looks like on the current code base (we're missing a bunch of keywords):
This is the code change:
I have also added those missing keywords to keywords.txt, so now they'll be highlighted properly in the Arduino IDE.
Thanks to Anticimex for assisting me in working with the build system.
One more build for today: building the raspberry pi gateway.
I often need to test different settings for the Raspberry Pi Gateway. Running make after just changing one parameter in the configure command (for example, turning on or off interrupts for nrf24 or changing the PA_LEVEL) results in a 1m 13s wait on my Raspberry Pi:
I installed ccache using these instructions and now a make with the same type of change is done in 31s.
Not that much of a win, but it saves a lot of time when trying many different settings.
did you cut the compile time of the gateway?
@gohan yes?
@mfalkvidd on my Pi3 it takes 40 around seconds, are you using an old Pi1 ?
@gohan no, I'm using a Pi3.
Today I finally got my thumbs out and upgraded my plant monitoring to MySensors 2.x (from 1.x).
Updated sketch is available on Github: https://github.com/mfalkvidd/arduino-plantmoisture
Result: I really need to water my plants But the 2.5 year old batteries are still going strong.
Tonight some more PCB design:
@sundberg84 I will throw my two cents in on the design. An issue that I had brought up on previous revisions had to do with capacitors. On the Rev 9 and below boards, your capacitor footprints were pretty much all for flat ceramic capacitors. While I was able to make it work for the couple can style electrolytics that I used, it wasn't quite right. Now on this revision, I see that all of your capacitors have a can electrolytic style footprint. I think it needs to be a mix. The 4.7uf and 10 uf capacitors should be can style footprint, whereas your 0.1s should be non polarized ceramic flat cap footprints. The flat pack ceramics I think have a wider hole spacing.
Again, just my two cents
@dbemowsk the positive with polarized footprint is that you can use both and it's very easy for a newbie to see which one is Gnd. You who are more experienced can determine if you want to use a flat unpolarized cap.
This evening I spent a few hours finding more MySensors keywords that exist but weren't highlighted.
I found about 20 that were documented but not highlighted, so I added them.
I also found 3 that weren't documented nor highlighted. I have created issues on github to document them. Help is welcome. Documenting the keywords is an easy way to contribute to the project.
@sundberg84 one of the 0.1uf caps that i use has short leads and wouldn't fit that hole spacing. They are higher voltage capacitors that i bought years ago for another project that i am trying to use up. I do see your point though.
maghac last edited by
@mfalkvidd said in What did you build today (Pictures) ?:
Today I finally got my thumbs out and upgraded my plant monitoring to MySensors 2.x (from 1.x).
Updated sketch is available on Github: https://github.com/mfalkvidd/arduino-plantmoisture
Result: I really need to water my plants But the 2.5 year old batteries are still going strong.
What kind of components is this running on? I am having trouble getting my batteries to run even 2.5 months (or 2.5 weeks for the outside temp sensor...)
@maghac see the link in my post for full details. But basically it is just what's recommended on the battery page. Arduino pro mini with power led and ldo removed, bod set to 1.8V, powered by 2xAA.
This post is deleted!
Thucar last edited by
dirkc last edited by dirkc
@thucar what display do you use and where did you buy it? What library did you use?
Thucar last edited by Thucar
@dirkc the display is a JLX12864-378 off a chinese "component tester" kit I had available. Using the u8g2 library to run it.
Today I built a led dimmer and motion detector for my kitchen. Running on 12v and a led list of about 2m.
Everything is built on my MysX led board and it was so easy to assemble everything and it's really small.
I have documented this project and will show you in a video when edited.
Spanners last edited by Spanners
Today I built a new Ethernet Gateway.
Using a Freetrionics Ethermega - Fixed SPI bus, so no soft SPI and I can use MY_RX_MESSAGE_BUFFER_FEATURE. PoE, improved voltage regulator design so I can run the amplified NRF24 with MY_RF24_PA_LEVEL RF24_PA_HIGH.
Under the radio is a small prototyping area with capacitor for the radio and an ATSHA204A - because one day I swear I will implement signing.
Slightly modified Gateway sketch that writes successful DHCP IP addresses to EEPROM. I assign a static address on my router. If there's a power failure, the gateway will start up with last address - router takes ages to come online.
Fired up the X-carve to cut the aluminium chassis, which has added benefit of shielding the NRF radio as well. The complicated cutout on the front was to allow air intake for the fan. Was supposed to just be a grille, but after a couple of beers I got too cute for my own good. Took 2 hours to cut that.
A video of my Ledstrip project in the kitchen:
MySensors LED Strip Dimmer - EasyPCB (Nrf24l01+) and Led Board. – 19:12
— Andreas Sundberg
kalina Hardware Contributor last edited by
Today I have finished work on control center for my smart home. The box includes a Raspberry Pi 3, gateway, ethernet switch, power supplies 5V and 9V. Audio input jack, ethernet and AC line cabels out from the box. Maybe, a GSM module should be included to the free space too (i will thinking about...). I am going to install this box in the near future.
@kalina said in What did you build today (Pictures) ?:
ione di installare questa scatola
if I can know !! The audio socket what is it for ???
kalina Hardware Contributor last edited by kalina
@sindrome73 said in What did you build today (Pictures) ?:
The audio socket what is it for ???
For connecting the audio system to the RPI3
And then once connected to the Raspy ?? What are you doing?? And a new thing for me !!
kalina Hardware Contributor last edited by
@sindrome73 said in What did you build today (Pictures) ?:
And then once connected to the Raspy ?? What are you doing?? And a new thing for me !!
Maybe this picture will explain my intentions
Ok, now it's clearer
Today's work:
- Fixed https://github.com/mysensors/MySensors/issues/1096 (PR in progress)
- Fixed 60+ spelling mistakes in the example sketches https://github.com/mfalkvidd/MySensors/commit/6e7ee6ab30d503a6f288553689fdfbe645c931e6 (will submit PR when above PR is done)
dakipro last edited by dakipro
My friend had a leakage from the water heater, luckily he was around (and renting) so not much damage was made, so inspired by the incident I made another water leakage sensor for water heater (reusing the code from my previous "ribbon cable sensor" )
Then I have an "alarm" flow in node-red (via openhab) which blinks all lights in the house, sends notification to mobile phones with high priority etc. Which brings me a lot of joy when all works fine (and annoys my wife, as usual)...
They are so easy to made that I might as well make a few of them just for convenience and "feeling rich with sensors" if you guys know what I mean
@dakipro what kind of setup do you end up with regarding bootloader / bod? What do you use to reprogram the pro minis bootloader?
@sundberg84 these run great on 1.8v BOD with some bootloader I found on the web (linked in the last post here ).
I use uno to flash the bootloader (tried with some IVRs but never got it to work, so just dedicated one uno prototyping hat for flashing) and then upload the sketch with IDE.
They are reporting battery from 2v to 3v (0-100%), and previous linked node is now reporting 51% of battery after 6 months, with sensor check every 2min and hearth beat every 4h.
Installed z-wave roller blinds (discussed on this topic) from Swedish company m.nu .
If all is great, I will order three more motors (and two knobs/switches) for living room and terrace doors (which should also automatically keep the shades open if doors er open, to prevent damage).
Made a basic node-red flow that uses xiaomi lux sensor to get them down, but ultimate goal is to have them understand when the light is very bright and when it is "cozy", perhaps even knowing to get the blinds just low enough. Found one good explanation on the internet, will check it out (perhaps use multiple lux sensors strategically placed around the room to determine sun position and strength). Any tips and tricks?
(gif of the action, cannot upload gif to the forum https://media.giphy.com/media/5aY6vSwVn1hsdYC6nd/giphy.gif )
Nca78 Hardware Contributor last edited by Nca78
I printed a small box and put my first "22" board in action on my entrance door. So far so good it's reporting the status reliably, and looking really tiny. A big difference with my first sensor 2 years ago in a big generic project box.
Just need to clean the glue left from previous sensor now
@nca78 said in What did you build today (Pictures) ?:
"22" board
Looks great, can we get more info about it/link?
I've continued my quest to get all MySensors defines documented, by creating some pull requests
The only keywords left new are ones that I don't understand good enough to document. These are tracked in
https://github.com/mysensors/MySensors/issues/1107 and https://github.com/mysensors/MySensors/issues/1090
I also added buy links for a shielded PA+LNA module and a more reliable source for regular nrf24l01+, on request by @gohan who managed to dig up good Aliexpress buying sources. Thanks gohan!
The buying links are available at https://www.mysensors.org/build/connect_radio and https://www.mysensors.org/store/radio
@dakipro said in What did you build today (Pictures) ?:
Looks great, can we get more info about it/link?
Not really, I posted about it long ago here (https://forum.mysensors.org/topic/7836/what-did-you-build-today-pictures/136) It's just made for me to play by making a sensor as small as possible, but it's pretty hard to solder and with CR1632 and nrf22 the battery life won't be that good (around 1 year) so I don't think I'll publish it.
These arrived today...
New gateway and nodes with signing is first on my list.
Thucar last edited by
Built half of my dutch bucket system. Namely the drain part. Irrigation to follow.
Working on setting up a new work bench in my back room in my basement where my HA equipment rack is. I wanted to build a case for my serial nRF24L01-PA-LNA gateway built on a rev8 Easy Newbie board. I just had the board sitting on a shelf on my rack, and now I want to mount it on my MDF board with all of my other equipment. Here is the design that I came up with for the case.
This is the inside bottom of the case:
And here is inside the top of the case:
It has a spot for 3 - 5mm LEDs for the transmit, receive and error lights. There is a hole on the right side of the case for the PA-LNA antenna connector. The oval hole on the lower right side of the case is for the DC in jack. I had one of these in my parts bin:
The hole on the bottom right is for the FTDI adapter connection. I am using one of these adapters that has a mini-USB connector:
I have the case running on the printer now. I will post pics when it is done.
@dbemowsk very impressed by your openscad designs, as always
dbemowsk last edited by dbemowsk
For anyone interested, here is an OpenSCAD rendering of the MySensors logo:
I tried posting the OpenScad code for this, but it is too long to add to a normal post. So here is a link to the OpenSCAD file.
Special thanks to @hek for giving me the .svg file that allowed me to create this. I would be curious to see peoples uses for this.
So I tried printing the cover for this with my original design using Cura as my slicer, and I couldn't get the logo to print right, plus the text under the LEDs was a bit too small. I then modified the design a bit and made the logo and text a bit bigger. I again tried printing it using Cura, but the logo still was missing some lines in the body. I then thought that part of the problem was the slicer I was using, so I tried it using Slic3r and I have to say, the logo came out MUCH better.
I ended up losing the Y in "My" Sensors and the ending "t" in "Transmit", but I am going to use the case the way I currently have it. Now I just have to assemble the new gateway. I am planning on making a whole new gateway and trying out the new 2.2.0 library. Hopefully my older 2.0.0 nodes will not have any issues with it, but that is why I plan on keeping my pro mini from my 2.0.0 gateway so I can revert back to that if I have to.
Built case for soldering tools, to easily move them out of the way.
Not really, bought it on banggood and asked wife to assemble it (she likes those type of projects, especially if the office might look a tiny bit cleaner) https://www.banggood.com/DIY-Self-assemble-RC-Model-Tools-Case-Screwdriver-Box-Gripper-Package-Plier-Stand-Retro-Style-p-1257252.html?cur_warehouse=CN
Laser cut plywood(or something), looks quite nice I think. I will order few more when they appear in stock.
GertSanders Hardware Contributor last edited by
So here is my contribution to this tread: a differential drive "brain". A work in progress:
Finally finished my 2.2.0 gateway and have it mounted in the new enclosure. It appears to be talking to my 2.0.0 sensors just fine.!
Another motion and led strip node.