Omodoro - simple python script to use the pomodoro technique

Hello everyone,
did you ever have the feeling that your productivity is not high enough?
That you're wasting too much time on reddit, facebook, youtube or <insert-online-community-here>?
Maybe you should try the pomodoro technique! It keeps you focused on important tasks, lets you set goals to achieve and also makes sure that you take breaks to regain energy.
I wrote a simple python script to work with the pomodoro technique. It's called omodoro. It displays reminders and ensures that you do your tasks but also take your breaks.
Maybe anyone of you wants to try it out and provide feedback - it would be appreciated!
It's available on github: omodoro
There's also a PKGBUILD in the AUR:
https://aur.archlinux.org/packages/omodoro-git/
I hope, you like it!
Greetings,
Oliver
Last edited by okraits (2014-02-11 22:17:54)

I've always wanted to try the pomodoro technique out but never actually have. I guess this is my excuse to do it. Looks like a nice little script; I'll check it out when I get the chance.

Similar Messages

  • Tidy -- simple python script to clean annoying files and directories

    Hi all,
    recently I opened a much-used flash drive and there was a lot of files like Thumbs.db, Mac OS' ._*, .DS_Store, etc all over it, making using it really annoying.
    So I decided to mimic a simple utility I saw as a plugin in Rockbox, which takes all of these files and deletes them.
    The result is a simple python script which you can find at:
    http://github.com/houbysoft/short/blob/master/tidy
    Usage should be self-explanatory. Be warned, by default, it deletes everything that matches the regular expressions without warning (this should be fine though, so if you want to be safe, try the -s and -v (simulate, verbose) or -p (prompt) options first.
    As usual, any feedback is welcome, and if you know of other files it should clean, please post them here!

    Hi all,
    recently I opened a much-used flash drive and there was a lot of files like Thumbs.db, Mac OS' ._*, .DS_Store, etc all over it, making using it really annoying.
    So I decided to mimic a simple utility I saw as a plugin in Rockbox, which takes all of these files and deletes them.
    The result is a simple python script which you can find at:
    http://github.com/houbysoft/short/blob/master/tidy
    Usage should be self-explanatory. Be warned, by default, it deletes everything that matches the regular expressions without warning (this should be fine though, so if you want to be safe, try the -s and -v (simulate, verbose) or -p (prompt) options first.
    As usual, any feedback is welcome, and if you know of other files it should clean, please post them here!

  • 4 is not compatable with my HP simple pass identity protection using the fingertip reader. How do i make it work? IE9 works fine. Do I have to stop using FireFox??

    I have a HP DV7-4165 that has Windows 7 64 bit and features the HP simple pass identity protection using the fingertip reader. My Firefox support says " If you have the Firefox browser on your computer when your HP SimplePass Identity Protection software is installed, a Firefox extension will also be installed that enables support for use of fingerprints with the Firefox browser." Once I updated to Firefox 4 it doesn't work anymore.

    I have the same problem. Hopefully, those with HP Simplepass from Egistec will have relief. Here's the email I got from their customer support:
    "Thank you for contacting EgisTec and your interest on our products.
    Currently HP SimplePass does not support Firefox 4. However, our development team is working on this and the updated version of HP SimplePass will support Firefox4 in the near future. We will inform you by mail when it is ready.
    Please visit our website regularly to look for further updates on our products.
    Thank you very much for your valuable feedback.
    Yours Sincerely
    EgisTec Customer Service"

  • Need help with simple python script (renaming and moving folder)

    I have this script for use with sabnzbd, what it does is rename all folders in the desired directory, replacing any spaces with dots (example: Movie 2011 HD -> Movie.2011.HD).
    #!/usr/bin/env python2
    workdir = '/media/stuff/movies' #### CHANGE this line to your movie directory
    for path, dirnames, filenames in os.walk(workdir):
    print "path:", path
    for dirname in dirnames:
    if dirname.find(' ') > -1 :
    # Yes, a space in the directory name, so replace it:
    newname = dirname.replace(' ','.')
    fulldirname = path + '/' + dirname
    fullnewname = path + '/' + newname
    print "Rename" , fulldirname, " ", fullnewname
    os.rename(fulldirname, fullnewname)
    What I would like it to do is 1. rename only the movie I run the script on (instead of /media/stuff/movies as above, the entire movie folder), and then 2. move the movie into /media/stuff/movies. Or vice versa! (I'd just prefer not to have it run on the entire movie directory).
    Appreciate any help!

    Just my two cents:
    I would not use walkdir but as usual a combination of find and python.
    A simplified version of the script could look like this:
    #!/usr/bin/python
    # -*- coding: utf8 -*-
    import os, shutil
    # Define target dir
    target_dir = "/media/stuff/movies/"
    # Loop through all found files
    for source_file in os.popen ("find ."):
    # Remove \n
    source_file = source_file[:-1]
    extension = source_file[-3:]
    # Only process video files
    if (extension == 'mkv') or (extension == 'avi') or (extension == 'mp4'):
    target_file = source_file.split('/')
    target = target_file[len(target_file)-1]
    target = target.replace(' ','.')
    shutil.copy (source_file, targetdir + target)
    Of course you might first want to print out instead of really copy files.

  • Please help with executing the c-shell script by using the exe class

    I try to use the exec class to execute a c-shell script in my java gui program like this. But I don't get anything when clicking on the start button.
    here is my code:
    Runtime r = Runtime.getRuntime();
    r.exec("./DDMReportEvents");
    ./DDMReportEvents is the name of the c-shell script.

    I think Runtime.exec runs DOS batch files, but not Unix shell scripts.
    Try:
    r.exec("csh -c ./DDMReportEvents");
    to get the shell to run the shell script.

  • Pywu: Simple python script for Weather Underground's API

    This is a script I wrote several years ago for use with conky. I've cleaned it up some and released it for anyone else who may like to use it. It allows you to pull data from Weather Underground's API.
    You need an API key from here to use it.
    Github repo is here: https://github.com/dh4/pywu
    An AUR package is here: https://aur.archlinux.org/packages/pywu/
    Let me know if you find it useful or have any issues with it.

    dibblethewrecker wrote:i really want to learn python - when ever i think about it i always feel to tired to start!
    just download diveintopython and the official documentation at python.org, that should keep you busy for a while,

  • Python script to automate the manual recovery of BPEL instances in SOA 11g

    I have a requirement for automating the manual recovery of BPEL instances pending for recovery at a particular time. It will be called inside a cron job.
    Any help will be much appreciated.
    Thanks in advance,
    Ravi Prakash

    Hi,
    When I try to recover the instance that is waiting for manual recovery, I didn't see anything happening.
    Also the the fault policy is active and working fine during the retry intervals. That means If I disable one of the webservices and enable them during the retry it is success after some failure retries.
    Any ides why the recovery not working in SOA 10.1.3.3
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Does v2 SDK use the same technique as v1 SDK to get skeleton?

    For the first version of Kinect, this paper show its technique of how can it gets each joint position.
    http://research.microsoft.com/apps/pubs/?id=145347
    In v2, there are a few significant improvements on the skeleton information. (e.g. more anatomically correctness, joint rotation, hand state, ... )
    Is the key algorithm still the same?
    Will Microsoft have plan to publish any papers about these new improvements?
    This would help me a lot in researching based on SDK's skeleton.

    I think these guys had success on the iOS:
    http://forums.adobe.com/thread/855200?tstart=60

  • Python script to parse 'iwlist scan' into a table

    Hi,
    I've written a small python script that parses the output of the command "iwlist interface scan" into a table.
    Why ?
    Like many arch linux users I think, I use netcfg instead of something like network manager or wicd. So the most natural way to scan for wifi networks in range is iwlist scan. But the output of this command is huge and I find it difficult to retrieve information. So this script parses it into a table : one network, one line.
    Example output
    Name Address Quality Channel Encryption
    wifi_1 01:23:45:67:89:AB 100 % 11 WPA v.1
    wifi_2 01:23:45:67:89:AC 76 % 11 WEP
    wifi_3 01:23:45:67:89:AD 51 % 11 Open
    wifi_4 01:23:45:67:89:AE 50 % 11 WPA v.1
    wifi_5 01:23:45:67:89:AF 43 % 4 Open
    wifi_6 01:23:45:67:89:AG 43 % 4 WPA v.1
    Details
    It reads from stdin so you use it like that: iwlist wlan0 scan | iwlistparse.py
    The width of the columns is determined by what's in it.
    You can easily do a bit more than just parsing the info: in the example above, the quality has been calculated to percents from a ratio (e.g. 46/70).
    It is sorted, too.
    Customization
    It's python so it's easy to customize. See the comments in the code.
    Code
    #!/usr/bin/env python
    # iwlistparse.py
    # Hugo Chargois - 17 jan. 2010 - v.0.1
    # Parses the output of iwlist scan into a table
    import sys
    # You can add or change the functions to parse the properties of each AP (cell)
    # below. They take one argument, the bunch of text describing one cell in iwlist
    # scan and return a property of that cell.
    def get_name(cell):
    return matching_line(cell,"ESSID:")[1:-1]
    def get_quality(cell):
    quality = matching_line(cell,"Quality=").split()[0].split('/')
    return str(int(round(float(quality[0]) / float(quality[1]) * 100))).rjust(3) + " %"
    def get_channel(cell):
    return matching_line(cell,"Channel:")
    def get_encryption(cell):
    enc=""
    if matching_line(cell,"Encryption key:") == "off":
    enc="Open"
    else:
    for line in cell:
    matching = match(line,"IE:")
    if matching!=None:
    wpa=match(matching,"WPA Version ")
    if wpa!=None:
    enc="WPA v."+wpa
    if enc=="":
    enc="WEP"
    return enc
    def get_address(cell):
    return matching_line(cell,"Address: ")
    # Here's a dictionary of rules that will be applied to the description of each
    # cell. The key will be the name of the column in the table. The value is a
    # function defined above.
    rules={"Name":get_name,
    "Quality":get_quality,
    "Channel":get_channel,
    "Encryption":get_encryption,
    "Address":get_address,
    # Here you can choose the way of sorting the table. sortby should be a key of
    # the dictionary rules.
    def sort_cells(cells):
    sortby = "Quality"
    reverse = True
    cells.sort(None, lambda el:el[sortby], reverse)
    # You can choose which columns to display here, and most importantly in what order. Of
    # course, they must exist as keys in the dict rules.
    columns=["Name","Address","Quality","Channel","Encryption"]
    # Below here goes the boring stuff. You shouldn't have to edit anything below
    # this point
    def matching_line(lines, keyword):
    """Returns the first matching line in a list of lines. See match()"""
    for line in lines:
    matching=match(line,keyword)
    if matching!=None:
    return matching
    return None
    def match(line,keyword):
    """If the first part of line (modulo blanks) matches keyword,
    returns the end of that line. Otherwise returns None"""
    line=line.lstrip()
    length=len(keyword)
    if line[:length] == keyword:
    return line[length:]
    else:
    return None
    def parse_cell(cell):
    """Applies the rules to the bunch of text describing a cell and returns the
    corresponding dictionary"""
    parsed_cell={}
    for key in rules:
    rule=rules[key]
    parsed_cell.update({key:rule(cell)})
    return parsed_cell
    def print_table(table):
    widths=map(max,map(lambda l:map(len,l),zip(*table))) #functional magic
    justified_table = []
    for line in table:
    justified_line=[]
    for i,el in enumerate(line):
    justified_line.append(el.ljust(widths[i]+2))
    justified_table.append(justified_line)
    for line in justified_table:
    for el in line:
    print el,
    print
    def print_cells(cells):
    table=[columns]
    for cell in cells:
    cell_properties=[]
    for column in columns:
    cell_properties.append(cell[column])
    table.append(cell_properties)
    print_table(table)
    def main():
    """Pretty prints the output of iwlist scan into a table"""
    cells=[[]]
    parsed_cells=[]
    for line in sys.stdin:
    cell_line = match(line,"Cell ")
    if cell_line != None:
    cells.append([])
    line = cell_line[-27:]
    cells[-1].append(line.rstrip())
    cells=cells[1:]
    for cell in cells:
    parsed_cells.append(parse_cell(cell))
    sort_cells(parsed_cells)
    print_cells(parsed_cells)
    main()
    I hope you find it useful. Please report bugs, I haven't tested it a lot. You may have to customize it though, because I think not all iwlist scan outputs are the same. Again, see comments, it should be easy.

    This tool is very helpfull. I am trying to add a new function to the existing code to parse the signal level parameter from the output of iwlist wlan0 scan, but I am getting lot of issues .Since I am new to python script can anyone help me to extract the signal level also from the scan put put.
    The parametr to be used is Signal level=-44 dBm ,I am trying to create a one more column with Signal level and print its out in the table.
    Example:-
    Signal level
    -44db
    The error I am getting
      File "iwlist_parser_Testing.py", line 146, in <module>
        main()
      File "iwlist_parser_Testing.py", line 144, in main
        print_cells(parsed_cells)
      File "iwlist_parser_Testing.py", line 123, in print_cells
        print_table(table)
      File "iwlist_parser_Testing.py", line 102, in print_table
        widths=map(max,map(lambda l:map(len,l),zip(*table))) #functional magic
      File "iwlist_parser_Testing.py", line 102, in <lambda>
        widths=map(max,map(lambda l:map(len,l),zip(*table))) #functional magic
    TypeError: object of type 'NoneType' has no len()
    Could some pls help me to solve this issue
    Thanks

  • Dhcpcd hook problem: start python script within hook

    Dear fellow Arch fans,
    I'm encountering a rather annoying problem:
    When I lose my internet connection my pidgin client doesn't get 'informed' about this and I won't receive IMs for an unspecified amount of time. I thought that I could work around this by myself, therefore I wrote two scripts in Python which connect/disconnect all active Pidgin-accounts using DBus. Both of them work fine. I also wrote a dhcpcd hook which should "listen" for a "NOCARRIER" and a "BOUND" reason which for itself also works fine (puts some output in a logfile).
    The problem now is to invoke the python scripts from within the hook. My hook looks as follows:
    lf='/var/log/myhook.log'
    case $reason in
    NOCARRIER)
    echo "nocarrier branch" >> $lf
    sudo -u os python2 /usr/lib/dhcpcd/dhcpcd-hooks/\
    scripts/pidgin_dbus_discon.py >> $lf
    BOUND)
    sudo -u os python2 /usr/lib/dhcpcd/dhcpcd-hooks/
    scripts/pidgin_dbus_con.py >> $lf
    echo "bound branch" >> $lf
    echo $reason >> $lf
    esac
    A sample output from the logfile /var/log/myhook.log after two cable pulls looks like
    nocarrier branch
    CARRIER
    bound branch
    nocarrier
    CARRIER
    bound
    But even on unsuccessful invocation the pidgin_dbus_con.py-script should at least print
    con-script started
    con-script finished
    Does anyone have a clue what the problem might be here?
    I would appreciate any help!
    os
    Last edited by os (2010-12-29 13:47:15)

    If I enable dhcpcd like this: "systemctl enable dhcpcd", i.e. w/o using an interface name, it kind of works:
    May 16 19:42:57 epbyminw1076 dhcpcd[315]: eno1: waiting for carrier
    May 16 19:43:01 epbyminw1076 dhcpcd[315]: eno1: carrier acquired
    May 16 19:43:01 epbyminw1076 dhcpcd[315]: DUID 00:01:00:01:19:92:10:5e:6c:3b:e5:33:0a:0a
    May 16 19:43:01 epbyminw1076 dhcpcd[315]: eno1: IAID e5:33:0a:0a
    May 16 19:43:01 epbyminw1076 dhcpcd[315]: eno1: soliciting a DHCP lease
    May 16 19:48:18 epbyminw1076 dhcpcd[315]: eno1: offered 10.6.44.58 from 10.6.0.3
    May 16 19:48:18 epbyminw1076 dhcpcd[315]: eno1: ignoring offer of 10.6.44.58 from 10.6.0.6
    May 16 19:48:22 epbyminw1076 dhcpcd[315]: eno1: leased 10.6.44.58 for 259200 seconds
    May 16 19:48:22 epbyminw1076 dhcpcd[315]: eno1: adding route to 10.6.0.0/18
    May 16 19:48:22 epbyminw1076 dhcpcd[315]: eno1: adding default route via 10.6.0.1
    But it takes several minutes to obtain an IP-address.
    Last edited by yarmash (2014-05-16 17:12:51)

  • Writing OS Script to use at file CC.

    Hi ,
    I have a Requirement in which i have to write a script and use the script as OS command in sender file adapter.
    Requirement --
    When ever the communication channel read a file from directories at FTP server delete that file and paste that file in different folder at FTP server.
    I have no knowledge with OS script . My server is running on Microsoft server 2008.
    Please let me know how to write a script and where to place the file in XI server.
    Regards,
    Navneet

    Hello,
    Please find info about using OS command in File Adapter in links below:
    /people/santhosh.kumarv/blog/2008/07/27/glimpse-at-os-command-yet-another-scenario
    /people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions
    http://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature
    /people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi
    What concerns path for Script i usually use /usr/sap/bin/ but i think that you can choose any available path on your PI server.
    BR,
    Dzmitry

  • Deployed lists in a SharePoint hosted app use the wrong content type.

    I am using Visual Studio Ultimate 2013 to deploy a SharePoint hosted app to my SharePoint 2013 development environment. 
    I have created 2 lists, one of which is using a custom content type with custom columns and the other is just a simple custom list definition and instance, all of which are deployed inside the same feature.
    However when I go to the simple list, it is using the content type from the other list, even though in the schema.xml shows that it is not supposed to use this content type. I have checked the content type ID and it is not referencing my custom content type,
    but for some reason the list is using that content type.
    I remember seeing this same issue a few months ago while creating a SP2010 sandbox solution. It could well be something I'm doing wrong when creating the lists/content type.
    Steps to recreate this issue:
    Create a SharePoint hosted app in VS
    Create some custom fields
    Create a custom content type
    Create a list based on that content type
    Create another list not based on the content type
    Delete feature that VS creates for the second list and add the list def and instance to the main feature (containing the other list and content type)
    Deploy and go to second list, note that it has the custom fields from the first list.
    Any advice on what to do about this would be great. I have tried deleting the list and recreating it in VS several times but that didn't work.
    Thanks
    David

    Hi
    I have now tested against a trail Office  365 Developer site and I had to make a few adjustments
    - change the url
    - change the target to SharePoint Onlne
    - change the url 
    I still wasn't happy so I created a new SharePoint Hosted app and pointed at the above developer site.  I copied my CrossDomainExec.js and stripped all my code except my CopyItemInSameLIbrary method which hasn't changed since I created this post. 
    - changed the App Manifest permissions to Web -full Control ( was previously tenant)
    I still got errors which is really painful as you don't even see the POST request in Fiddler
    The URL used for my POST is as follows ( note host URL is fictitious)
    "https://myapphell-547d8061d39e38.sharepoint.com/sites/appsdev/RESTTestSHA/_api/SP.AppContextSite(@target)/web/Getfilebyserverrelativeurl('/sites/appsdev/Shared Documents/SrcDoc.docx')/copyTo(strNewUrl='/sites/appsdev/Shared Documents/DestDoc.docx', bOverWrite=true)?@target='https://myapphell.sharepoint.com/sites/appsdev'" String
    Ran the app a second time and now I see......Wow it WORKS!!!!!! ..Can't be true can it?
    .... next I will switch the target url to my on prem farm to see if this still works so watch this space!
    Daniel
    Freelance consultant

  • Using the " character in a to be executed command (EMM)

    Hi,
    I ran against a small challange building a feature in a EMM based menu.
    I would like to have an user to change the number dialed in a chat-script but the chat-script command uses the character " in it's command.
    The same character " is also used to mark the beginning and the end in the <IOSExecCommand> and the <IOSConfigCommand>.
    When executing the feature it give's an error message back stating: EMM TCL Error: extra characters after close-quot.
    Which is not weird because there are a lot of " in the command line and normally you can put multiple command-lines in a single ExecCommand - or ConfigCommand line to mark the beginning and the end of a single command-line.
    According to TCL language script you could write the character " as \" or \\" but neither one of them does the trick to make it work.
    The ConfigCommand I want to execute looks like this:
    <IOSConfigCommand>"no chat-script internet " "chat-script internet "" "ATDT*98*2#" TIMEOUT 60 CONNECT"</IOSConfigCommand>
    Does anyone have an idea how to solve this?
    I'm kind of stuck with it.
    Kind regards,
    Jorn van Riel

    Instead of using IOSConfigCommand, use EmbeddedTCL instead.  For example:
          ios_config "no chat-script internet" {chat-script internet "" "ATDT*98*2#" TIMEOUT 60 CONNECT} 

  • Using the effect/distort&transform/transform... menu

    Mac 10.7.4//Illustrator CS5.1 (15.1.0)
    1) I had group consisting of several objects
    2) I used the subject effect to create two copies spaced horizontally apart
    3) Now I need one more copy of the original further yet horizonally,  selecting the original group and using the subject menu, or option dragging  I get three copies, I just need one.
    4) If I option drag to make a new copy (and two extras) and then in the appreaance dialog I edit the the transform fx to 0 copies, I end up with one copy appearing where the first copy was, but selecting  shows all the selection blue outlines where the copied original should be (i.e. where I want this 3rd copy to be)   So I have ann object with blue selection anchor points but the object shows up far away horizontally.
    I sure hope I have described this well enough for people to comment or help.
    screen shot below
    Selecting the isolated image on the right and the blue anchors show up to the left,  The place where the blue anchors are are the place I dragged the original group to.  The isolated image to the right is where the first copy from the subject command.  Editing the blue achor points does cause the 'image' to the right to change.   I've tried quiting Illustrator and reoppening the file

    I AM duplicating an object that already has the effect/distort&tranform/transform effect applied.   Problem is I want want the first two copies spaced 1" apart, then the third copy like 4" away from the original.
    I can duplicate this on a new file, just using a square and circle grouped together.   Use effect/distort&tranform/transform effect  to make two copies.  Then option drag the original some where.  In the appearnce window edit the transform effect to change to 0 copies. In this second group, is there anyway to eliminate the transform effect?  (deleting removes the whole object)
    (I did find you can click the eyeball and not see the effect, i.e. the copies).
    In my simple file I could use the white arrow and click on the copies and delete them, but not in my work in progress.
    So is there a way to remove an effect after its been applied?

  • Simple calculator in html5 using web form elements

    Hello
    I would like to make an educational miniwebsite with my son who is getting interested in internet programming.
    I was wondering if html5 could be used to do simple math in html5 using the input of web form elements, such as radio button (for the choice of math operation: add/sub/mult/div) and two numbers in input fields.
    Then a submit equivalent would generate the output result, preferrably in a field still on the same page (without going to another page, as it is the case with submit).

    I think that you might be looking for something like this:
    http://www.developerdrive.com/2012/06/creating-a-web-page-calculator-using-the-html5-outpu t-element/

Maybe you are looking for

  • Why server side shared object doesn't work for me ?

    application.onPublish = function (client, p_stream)      var myInfo = SharedObject.get(p_stream.name);      myInfo.setProperty("live", true); I set the sharedobject using code above,now I can publish video,but so is not set(from admin console, "share

  • Acrobat 9.1.1 crashes repeatedly

    I use Acrobat Professional all day long to generate and view PDF documents. I never had a single problem with version 8. I recently installed Acrobat Professional version 9 which updated itself to version 9.1 during the installation. While it works o

  • Can't enter text in a box?

    I have a government form that I created in LiveCycle and it automatically filled in the correct boxes with a text box.  In the design view mode the orange boxes exist but some boxes allow me to enter text and numbers and others will not.  I can't det

  • Iphoto 08 lost archives of one photo

    Every time I open iPhoto this happens. I think lost archives of one photo and now I get a message coming up on the screen saying 'iPhoto library found a photo that was not imported' 'Would you like to import it?' Whether I say yes or no another messa

  • Flat file upload in Process Chain error!

    Dear Expert:    We wirte routine in infopackage and use ftp upload flat file from BW Application server(AL11--> can open the file), I manually upload, it can sucessful upload, but in Process chain, it always deal with the process and display yellow l