This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: | |
# docker build -t ghcr.io/home-assistant/home-assistant:local . | |
# docker run -d --name homeassistant --restart=always \ | |
# --privileged -e TZ=America/Montreal \ | |
# -v /opt/homeassistant:/config -v /run/dbus:/run/dbus:ro \ | |
# --network=host \ | |
# ghcr.io/home-assistant/home-assistant:local | |
# Can't build opencv directly in 'core' image, it lacks Ninja and GMake. | |
# "CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles"." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with h as ( | |
select *, convert(data using utf8) as data_utf8 from tiki_history | |
where data <> convert(convert(data using utf8) using ascii) | |
), | |
h1b as ( | |
with recursive cte as ( | |
select pageName, version, data_utf8, 0 as ascii, ' ' as c, 1 as pos | |
from h | |
union all | |
select pageName, version, data_utf8, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== Your Last.fm archive == | |
This archive contains musical data you sent to Last.fm, conveniently packaged | |
as easy-to-process formats. Use them to discover your listening habits, to | |
bootstrap your own apps or to sync them with other data. | |
We're always interested to see what you're doing with your data, so make sure | |
to let us know on the forum: http://www.last.fm/forum/21717 | |
== Types of data == | |
There are 6 different types of data in this archive, some of them less obvious. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import ast, _ast, os | |
for root, dirs, files in os.walk('.'): | |
for name in files: | |
if name.endswith('.py'): | |
full = os.path.join(root, name) | |
t = ast.parse(open(full).read()) | |
for n in ast.walk(t): | |
if isinstance(n, _ast.Str) and not isinstance(n.s, unicode): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Question: "Python: | |
>>> LINE A | |
>>> LINE B | |
>>> LINE C | |
False | |
>>> LINE A; LINE B; LINE C | |
True | |
what are the lines? nothing stateful allowed & no __methods." | |
(https://twitter.com/akaptur/status/395252265117687808). |