The win/loss values from the NHL data feed reset in the playoffs, but
don't reflect the current series. Instead, they reflect the current
win/loss total since the beginning of the playoffs.
This commit checks for a key in the API return data indicating that the
game is a playoff game, and if the game is a playoff game the team's
wins will be set to the remainder of the total wins divided by 4 (a team
with 6 overall wins will be assumed to have 2 wins in the current
playoff series).
The team's losses during a playoff series will be set to the amount of
wins for the opposing team.
On timer start timezone is provided to `datetime.now()` call, but on refresh is not.
That cause a bug with wrong time difference (it include timezone diff). Didn't
dig deep enough to figure out why there is inconsistency with timezones so just
pin timezone info as it's not useful anyway.
This module will display the current open file handles and the kernel
setting for max open file handles. This is particularly useful when
running applications that like to grab a lot of file handles to help
monitor if/when your system may run out of available file handles.
This properly colorizes when there is a thunderstorm and the weather.com
API response defines the current weather condition as "T-Storm". No idea
why they decide to do this, it's definitely not for brevity as they have
a "Thunderstorms in the Vicinity" weather condition as well. Just a
weird quirk of their API, I guess.
* Fix improper usage of time.tzset()
time.tzname is a tuple containing the non-daylight-savings and
daylight-savings timezone abbreviations. However, when the TZ
environment variable is set to just the daylight-savings timezone (as
the clock module was changed to do in e31c58f), time.tzset() will break
time.tzname by setting both elements of the tuple to that timezone,
causing the effective timezone to fallback to UTC:
>>> time.tzname
('CST', 'CDT')
>>> time.localtime().tm_hour
1
>>> os.environ.putenv('TZ', 'CST')
>>> time.tzset()
>>> time.tzname
('CST', 'CST')
>>> # ^^^ This is broken
...
>>> time.localtime().tm_hour
6
>>> os.environ.putenv('TZ', 'CST+06:00CDT')
>>> time.tzset()
>>> time.tzname
('CST', 'CDT')
>>> time.localtime().tm_hour
1
This fixes this incorrect behavior by building a proper TZ environment
variable to set localtime.
* Use time.timezone instead of time.altzone
* Make _get_local_tz a static method
* mod bitcoin: add 'volume_percent'
* mod bitcoin: Fix exception on url opening (#304)
Calling user_open as a 'Python callback' raises an exception because
this function doesn't expects 'self'.
Wrote a wrapper function as a 'Member callback' to filter it out.
* mod bitcoin: add specific exchange support
* mod bitcoin: add request age attribute
* mod bitcoin: refactor
* mod bitcoin: btc volume divisor
* bitcoin: Deal with diffrent locales
* Fixing PEP8
* mod bitcoin: Updated docs
* Catch "Showers" as "Rainy" weather condition
Weather.com has a "Showers in the Vicinity" weather condition that I
just happened to see this morning. This commit assigns this condition as
"Rainy" so it is properly colorized.
* Make "Clear / Windy" map to "Fair" weather condition
Another odd weather condition from the weather.com API
* Reverse icons for Fair and Sunny
"Sunny" should have a filled-in sun icon as it implies a brighter weather
condition than "Fair" does.
* Properly detect "Sunny / Windy" as "Sunny" weather condition
Also, do not check for similarly-named conditions if an exact match is
found.
* Properly detect "Fair / Windy" as "Fair"