[Numpy-discussion] yubnub and numpy examples

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Aug 5 10:52:43 EDT 2009


On Wed, Aug 5, 2009 at 10:30 AM, <josef.pktd at gmail.com> wrote:
> On Wed, Aug 5, 2009 at 9:44 AM, John Hunter<jdh2358 at gmail.com> wrote:
>> yubnub is pretty cool -- it's a command line interface for the web.
>> You can enable it in firefox by typing "about:config" in the URL bar,
>> scrolling down to "keyword.URL", right click on the line and choose
>> modify, and set the value to be
>>
>> http://www.yubnub.org/parser/parse?default=g2&command=
>>
>> Then, you can type yubnub commands in the URL bar, eg, to see all
>> commands related to python, type "ls python" in the URL bar.
>>
>> It's easy to create new commands; I just created a new command to load
>> the docs for a numpy function; just type in the URL bar:
>>
>>  npfunc convolve
>>
>> which takes you directly to
>> http://docs.scipy.org/doc/numpy/reference/generated/numpy.convolve.html

Still, it is a lot slower than windows htmlhelp, which is available
for numy and scipy but not for others.

"y mplcodex histogram"  takes pretty long to load


>>
>> I was hoping to create a similar command for the numpy examples, but
>> the URL links in http://www.scipy.org/Numpy_Example_List_With_Doc are
>> some md5 gobbledy-gook.  Is it possible to have nice URLs on this
>> page, so they can be more readily yubnub-ized?

my impression of the example list page:
This page is not really maintained anymore, it is still at numpy 1.2.1
and mostly superseded by the new docs, with examples as part of the
docstrings. (Also because of it's page size, I think it's more
appropriate for browsing than for quick lookups.)

Josef

>>
>> JDH
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>
> looks pretty good, but I would recommend a safe install, instead of
> overwriting the keyword default. This requires typing one additional
> letter, e.g "y npfunc convolve", (and avoids invalidating the firefox
> warranty, and you can do the same with other search/link shortcuts)
>
> Josef
>
>
> from http://www.yubnub.org/documentation/describe_installation
>
> """
>
> Safe Firefox Installation. The safest way to install YubNub is to make
> a Firefox keyword for it. If you're using the Firefox web browser:
>
>    * Right-click the input box at the top of the page (the one under
> the words "Type in a command")
>    * Click "Add a Keyword for this Search"
>    * For the Name, enter "YubNub", and for the Keyword, enter "y"
>    * Press OK
>
> Now you can use YubNub directly from the address bar. For example, try
> typing "y gim porsche 911" into your address bar. Don't forget the "y"
> in front!
> You may have noticed that I said that this is the "safest way" to
> install YubNub. Why safest? Because you must explicitly enter a "y"
> before the YubNub command. This prevents "command spoofing".
>
> For example, suppose someone made a "michael" command. If you typed
> "michael jordan" into YubNub, intending to do a search, you would
> instead go to the site of the person who made the "michael" command.
> Rats! But if you installed YubNub into your Firefox address bar as
> described above, typing "michael jordan" into your address bar would
> do a search for "michael jordan", as you intended. The only way to get
> to that other person's site would be to type "y michael".
>
> If you like to live on the edge like me, you can try one of the other
> installation methods, many of which do not require an initial keyword
> like "y".
>
> """
>



More information about the NumPy-Discussion mailing list