V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
vnady
V2EX  ›  问与答

哥老关,翻墙也打不开 googleblog.com, why?

  •  
  •   vnady · 2017-03-03 11:30:26 +08:00 · 931 次点击
    这是一个创建于 2804 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Google 发布 Python Fire:

    https://opensource.googleblog.com/2017/03/python-fire-command-line.html?m=1

    想看,自建 ss 服务器,打不开上面链接,为啥?

    15 条回复    2017-03-04 11:06:33 +08:00
    artandlol
        1
    artandlol  
       2017-03-03 11:46:42 +08:00
    没问题啊
    openbaby
        2
    openbaby  
       2017-03-03 11:52:42 +08:00   ❤️ 1
    不用梯子的话, www.onedns.net 可打开
    翻翔打不开,肯定是你姿势不对,或者梯子太软,爬到半空梯子塌了,哈哈。
    nicevar
        3
    nicevar  
       2017-03-03 12:02:58 +08:00
    ss 客户端配置有问题,试着加入白名单看看
    blackshadow
        4
    blackshadow  
       2017-03-03 13:06:40 +08:00
    我的 ss 也打不开。。。。
    oldliu
        5
    oldliu  
       2017-03-03 13:13:06 +08:00
    找不到博客

    找不到您要查找的博客。如果您是此博客的拥有者,请登录。

    转到 Blogger

    。。。
    zengshusen
        6
    zengshusen  
       2017-03-03 15:23:33 +08:00 via Android
    Open Source Blog
    News about Google's open source student programs and software releases
    Introducing Python Fire, a library for automatically generating command line interfaces
    Thursday, March 2, 2017
    Today we are pleased to announce the open-sourcing of Python Fire. Python Fire generates command line interfaces (CLIs) from any Python code. Simply call the Fire function in any Python program to automatically turn that program into a CLI. The library is available from pypi via `pip install fire`, and the source is available on GitHub.
    Python Fire will automatically turn your code into a CLI without you needing to do any additional work. You don't have to define arguments, set up help information, or write a main function that defines how your code is run. Instead, you simply call the `Fire` function from your main module, and Python Fire takes care of the rest. It uses inspection to turn whatever Python object you give it -- whether it's a class, an object, a dictionary, a function, or even a whole module -- into a command line interface, complete with tab completion and documentation, and the CLI will stay up-to-date even as the code changes.
    To illustrate this, let's look at a simple example.
    #!/usr/bin/env python
    import fire

    class Example(object):
    def hello(self, name='world'):
    """Says hello to the specified name."""
    return 'Hello {name}!'.format(name=name)

    def main():
    fire.Fire(Example)

    if __name__ == '__main__':
    main()
    When the Fire function is run, our command will be executed. Just by calling Fire, we can now use the Example class as if it were a command line utility.
    $ ./example.py hello
    Hello world!
    $ ./example.py hello David
    Hello David!
    $ ./example.py hello --name=Google
    Hello Google!
    Of course, you can continue to use this module like an ordinary Python library, enabling you to use the exact same code both from Bash and Python. If you're writing a Python library, then you no longer need to update your main method or client when experimenting with it; instead you can simply run the piece of your library that you're experimenting with from the command line. Even as the library changes, the command line tool stays up to date.
    At Google, engineers use Python Fire to generate command line tools from Python libraries. We have an image manipulation tool built by using Fire with the Python Imaging Library, PIL. In Google Brain, we use an experiment management tool built with Fire, allowing us to manage experiments equally well from Python or from Bash.
    Every Fire CLI comes with an interactive mode. Run the CLI with the `--interactive` flag to launch an IPython REPL with the result of your command, as well as other useful variables already defined and ready to use. Be sure to check out Python Fire's documentation for more on this and the other useful features Fire provides.
    Between Python Fire's simplicity, generality, and power, we hope you find it a useful library for your own projects.
    By David Bieber, Software Engineer on Google Brain
    Share on Google+ Share on Twitter Share on Facebook

    Labels: open source release , Python , releases
      

    Google Privacy Terms
    yylzcom
        7
    yylzcom  
       2017-03-03 15:26:17 +08:00
    Introducing Python Fire, a library for automatically generating command line interfaces
    Thursday, March 2, 2017

    打开没问题……

    另外提问问题最好贴上 log ,不然谁都不能快速准确帮你解决问题
    swulling
        8
    swulling  
       2017-03-03 15:27:25 +08:00
    没问题,自己的梯子问题
    xdeng
        9
    xdeng  
       2017-03-03 15:29:15 +08:00
    DNS
    vnady
        10
    vnady  
    OP
       2017-03-03 16:15:01 +08:00
    <img href=" ">
    vnady
        11
    vnady  
    OP
       2017-03-03 16:17:36 +08:00
    <img src=" ">
    vnady
        12
    vnady  
    OP
       2017-03-03 16:19:33 +08:00
    ![log]( )
    vnady
        13
    vnady  
    OP
       2017-03-04 09:55:19 +08:00
    @yylzcom

    1 、在 `user-rule.txt` 中添加了如下规则:
    ||googleblog.com

    2 、服务器上的 log 提示( WARNING&ERROR ):
    yylzcom
        14
    yylzcom  
       2017-03-04 10:01:53 +08:00
    @vnady #13 chrome 配合 switchyomega 试试看,我没编辑过 user-rule.txt
    https://chrome.google.com/webstore/detail/padekgcemlokbadohgkifijomclgjgif

    你的服务端日志没看到 googleblog 这个域名啊?你看我的日志里明显有出现 googleblog.com 这个域名
    vnady
        15
    vnady  
    OP
       2017-03-04 11:06:33 +08:00
    @yylzcom 奇怪的是日志里没有出现 googleblog.com 这个域名。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3460 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 11:40 · PVG 19:40 · LAX 03:40 · JFK 06:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.