这个gist可以用来订阅某个页面, 当该页面全文的md5 hash改变时, 输出的Atom feed会相应地更新. 例如订阅萝莉盟: http://rss.moe/api/source/f742582061a9b028987e?uri=http://www.loli.com/
你可以使用torabot的feed模块或者你喜欢的阅读器订阅上述链接.
FROM dmlc/mxnet:cuda | |
MAINTAINER answeror <[email protected]> | |
ENV LD_LIBRARY_PATH /usr/local/cuda/lib64:/usr/local/nvidia/lib:/usr/local/nvidia/lib64 | |
RUN cd /mxnet && git pull origin master && git submodule update | |
ADD src/io/image_aug_default.cc /mxnet/src/io/image_aug_default.cc | |
RUN cd /mxnet && make -j8 ADD_LDFLAGS=-L/usr/local/cuda/lib64/stubs | |
ADD example/image-classification/symbol_resnet.py /mxnet/example/image-classification/symbol_resnet.py | |
ADD example/image-classification/train_cifar10_resnet.py /mxnet/example/image-classification/train_cifar10_resnet.py |
from __future__ import absolute_import | |
import numpy as np | |
class Accumulators(object): | |
_accumulator_library = {} | |
def __init__(self): | |
self.accumulator_library = {} |
{ | |
"string": "{{ string }}", | |
"int": {{ int }} | |
} |
<?xml version='1.0' encoding='UTF-8'?> | |
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> | |
<xsl:output method='xml' encoding='UTF-8'/> | |
<xsl:template match='/'> | |
<feed xml:lang='en-US' xmlns='http://www.w3.org/2005/Atom'> | |
<id>v2ex.com/member/{{ id }}</id> | |
<link rel='alternate' type='text/html' href='http://v2ex.com/member/{{ id }}'/> | |
<title>V2EX user replies of {{ id }}</title> | |
<xsl:for-each select='.//div[@class="dock_area"]'> | |
<entry> |
<?xml version='1.0' encoding='UTF-8'?> | |
<xsl:stylesheet | |
version='1.0' | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
> | |
<xsl:output method='xml' encoding='UTF-8'/> | |
<xsl:template match='/'> | |
<feed xml:lang='en-US' xmlns='http://www.w3.org/2005/Atom'> | |
<id>nyc</id> | |
<link rel='alternate' type='text/html' href='http://www.nyc.gov/html/dot/html/home/home.shtml'/> |
这个gist可以用来订阅某个页面, 当该页面全文的md5 hash改变时, 输出的Atom feed会相应地更新. 例如订阅萝莉盟: http://rss.moe/api/source/f742582061a9b028987e?uri=http://www.loli.com/
你可以使用torabot的feed模块或者你喜欢的阅读器订阅上述链接.
<feed xml:lang='zh-CN' xmlns='http://www.w3.org/2005/Atom'> | |
<id>v2ex.com/t/{{ id }}</id> | |
<link rel='alternate' type='text/html' href='http://v2ex.com/t/{{ id }}'/> | |
<title>{{ id }}</title> | |
{% for r in replies %} | |
{% if r.member.username != 'answeror' %} | |
<entry> | |
<id>{{ r.id }}</id> | |
<published>{{ datetime.fromtimestamp(r.created).strftime('%Y-%m-%dT%H:%M:%SZ') }}</published> | |
<updated>{{ datetime.fromtimestamp(r.last_modified).strftime('%Y-%m-%dT%H:%M:%SZ') }}</updated> |
{ | |
"@jinja2": { | |
"template": {"text<": "replies.xml"}, | |
"kargs": { | |
"id": "{{ id }}", | |
"replies": { | |
"@json_decode": { | |
"@base64_decode": [{ | |
"[body]": {"@request": "http://www.v2ex.com/api/replies/show.json?topic_id={{ id }}"} | |
}] |
例子: http://torabot.com/api/source/f4b337c06bf746969244.atom?path=/group/topic/32268
把/group/topic/32268
换成你想要订阅的地址, 例如/subject/topic/4369
.