This forum is in archive mode. You will not be able to post new content.

Author Topic: [Python] howdoi.py - Never search for programming answers again  (Read 785 times)

0 Members and 1 Guest are viewing this topic.

Offline d4rkcat

  • Knight
  • **
  • Posts: 287
  • Cookies: 115
  • He who controls the past controls the future. He who controls the present controls the past.
    • View Profile
    • Scripts
[Python] howdoi.py - Never search for programming answers again
« on: January 18, 2015, 05:03:43 AM »
For myself, programming consists of 90% searching on startpage for code examples of what I am trying to accomplish, and 10% fixing the bugs in my buggy code.
Recently I found that there is a better way.

howdoi.py is a simple python script that will look on stackoverflow.com or optionally any of these sites for the answer to your programming questions.

You can install it using pip:

Code: [Select]
pip install howdoi

and using it is as simple as:

Code: [Select]
$ howdoi print stack trace python
> import traceback
>
> try:
>     1/0
> except:
>     print '>>> traceback <<<'
>     traceback.print_exc()
>     print '>>> end of traceback <<<'
> traceback.print_exc()

$ howdoi convert mp4 to animated gif
> video=/path/to/video.avi
> outdir=/path/to/output.gif
> mplayer "$video" \
>         -ao null \
>         -ss "00:01:00" \  # starting point
>         -endpos 10 \ # duration in second
>         -vo gif89a:fps=13:output=$outdir \
>         -vf scale=240:180

$ howdoi create tar archive
> tar -cf backup.tar --exclude "www/subf3" www

So before you waste time in your browser or asking on a forum simple programming questions, give it a go.
I find it very helpful personally.
Enjoy!

https://github.com/gleitz/howdoi
Jabber (OTR required): thed4rkcat@einfachjabber.de    Email (PGP required): thed4rkcat@yandex.com    PGP Key: here and here     Blog

<sofldan> not asking for anyone to hold my hand uber space shuttle door gunner guy.


Offline gray-fox

  • Knight
  • **
  • Posts: 208
  • Cookies: 52
    • View Profile
Re: [Python] howdoi.py - Never search for programming answers again
« Reply #1 on: January 18, 2015, 07:40:36 AM »
Wow, that is great find! It's definetly going to be useful . :) +1
« Last Edit: January 18, 2015, 07:41:18 AM by gray-fox »

Offline konos

  • /dev/null
  • *
  • Posts: 14
  • Cookies: 2
    • View Profile
Re: [Python] howdoi.py - Never search for programming answers again
« Reply #2 on: January 18, 2015, 10:10:42 AM »
Awesome ! +1 Thanks for that.
Better to remain silent and be thought a fool than to speak out and remove all doubt.

Offline Architect

  • Sir
  • ***
  • Posts: 428
  • Cookies: 56
  • STFU
    • View Profile
    • Rootd IRC
Re: [Python] howdoi.py - Never search for programming answers again
« Reply #3 on: February 01, 2015, 05:58:46 PM »
$ howdoi fuck your sister
« Last Edit: February 01, 2015, 05:59:14 PM by Architect »

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: [Python] howdoi.py - Never search for programming answers again
« Reply #4 on: February 01, 2015, 09:47:45 PM »
Quote
redacted@redacted ~ $ howdoi fuck your sister
inR = input

I guess you put it inR
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.