Code Monkey home page Code Monkey logo

concentration's People

Contributors

rkillam avatar rogalski avatar sietse avatar timothycrosley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

concentration's Issues

not working in windows

C:\Users\Pavan Yogi>concentration improve
Traceback (most recent call last):
File "c:\python34\lib\runpy.py", line 170, in _run_module_as_main
"main", mod_spec)
File "c:\python34\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Python34\Scripts\concentration.exe_main
.py", line 9, in
File "c:\python34\lib\site-packages\hug\api.py", line 391, in call
self.commands.get(command)()
File "c:\python34\lib\site-packages\hug\interface.py", line 485, in call
result = self.interface(**pass_to_function)
File "c:\python34\lib\site-packages\hug\interface.py", line 99, in call
return __hug_internal_self._function(*args, **kwargs)
File "c:\python34\lib\site-packages\concentration\run.py", line 28, in improve
with open(settings.HOSTS_FILE, "r+") as hosts_file:
PermissionError: [Errno 13] Permission denied: '/Windows/System32/drivers/etc/hosts'

sorry for not understanding how to add the file to the block list

My English is poor ,hope I can explain my question clearly.
I am so sorry that I always don't understand how to add the websites which I hope not to be opened when I am working .I have add the URL into the file(new file :/etc/concentration.distractors),but it doesn't work. I wonder the format I need to write in ?? thanks a lot .

Invalid syntax with asyncio.async

Hi there,
Firstly let me thank you for writing this ๐Ÿ‘

I can't seem to run concentration because of this error:

[test ~]$ ./.local/bin/concentration 
Traceback (most recent call last):
  File "./.local/bin/concentration", line 7, in <module>
    from concentration.run import __hug__
  File "/home/test/.local/lib/python3.7/site-packages/concentration/run.py", line 10, in <module>
    import hug
  File "/home/test/.local/lib/python3.7/site-packages/hug/__init__.py", line 36, in <module>
    from hug import (authentication, directives, exceptions, format, input_format, introspect,
  File "/home/test/.local/lib/python3.7/site-packages/hug/route.py", line 29, in <module>
    import hug.api
  File "/home/test/.local/lib/python3.7/site-packages/hug/api.py", line 37, in <module>
    from hug._async import asyncio, ensure_future
  File "/home/test/.local/lib/python3.7/site-packages/hug/_async.py", line 30
    ensure_future = asyncio.async  # pragma: no cover
                                ^
SyntaxError: invalid syntax

I've installed with:

[test ~]$ pip -V
pip 18.0 from /usr/lib/python3.7/site-packages/pip (python 3.7)
[test ~]$ pip install --user concentration
Collecting concentration
  Downloading https://files.pythonhosted.org/packages/f8/29/eb2acb729f4197622c2da1c90473431438d9bac18897ddfc05aa1c88dfd1/concentration-1.1.1-py2.py3-none-any.whl
Collecting hug>=2.0.0 (from concentration)
  Downloading https://files.pythonhosted.org/packages/03/69/4987f33c0327bc4550a91858fa7c737ea4516c315801878f48c88921f7a9/hug-2.4.0.tar.gz (68kB)
    100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 71kB 5.8MB/s 
Collecting falcon==1.4.1 (from hug>=2.0.0->concentration)
  Downloading https://files.pythonhosted.org/packages/e8/d0/20bb807dee65f1f163754670557b128eafce1710f6c9c363a38e357f3783/falcon-1.4.1-py2.py3-none-any.whl (159kB)
    100% |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 163kB 10.8MB/s 
Requirement already satisfied: requests in /usr/lib/python3.7/site-packages (from hug>=2.0.0->concentration) (2.19.1)
Collecting python-mimeparse>=1.5.2 (from falcon==1.4.1->hug>=2.0.0->concentration)
  Downloading https://files.pythonhosted.org/packages/26/2e/03bce213a9bf02a2750dcb04e761785e9c763fc11071edc4b447eacbb842/python_mimeparse-1.6.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.4.0 in /usr/lib/python3.7/site-packages (from falcon==1.4.1->hug>=2.0.0->concentration) (1.11.0)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.7/site-packages (from requests->hug>=2.0.0->concentration) (3.0.4)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.7/site-packages (from requests->hug>=2.0.0->concentration) (2.7)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.7/site-packages (from requests->hug>=2.0.0->concentration) (1.23)
Installing collected packages: python-mimeparse, falcon, hug, concentration
  The scripts falcon-bench and falcon-print-routes are installed in '/home/test/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for hug ... done
  The script concentration is installed in '/home/test/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed concentration-1.1.1 falcon-1.4.1 hug-2.4.0 python-mimeparse-1.6.0

This is under python 3.7.0.
Any ideas?

Forcing users to solve a puzzle/do something challenging

What about a feature where (by an optional command line argument) you could turn concentration on for a set period of time and it could NOT be turned off for the duration of that period unless you solved some moderately difficult puzzle or challenge?

A simple challenge (simple to implement, anyways) would have them type some long string, with a typo automatically resetting their progress.

Thoughts?

Run in pre-defined schedule

Would be really cool if we could run this in pre-defined schedule like 09:00-17:00. This feels too simple to have not been thought of already so I wanted to ask it before I start implementing it.

I am unable to get concentration running

using Ubuntu 18.04
python2 default

I did a
pip3 install concentration

and then tried
sudo concentration improve

the Error show concentration command not found,

User file concentration.distractors does not work

Hi,

First, great tool. I needed it.

I just noticed one bug for now. On Manjaro Linux, putting a domain in ~./concentration.distractors has no effect. I ran a sudo concentration loose and a sudo concentration improve but the domains are still not blocked.

However, putting them in /etc/concentration.distractors worked perfectly.

Just a minor detail, but it's nice to keep config files like that in the user's space.

How to disable or shorten the waiting time?

I just updated to the most recent version from a slightly older one when it was first on HN, and now it does this:

########################################################################################ARE YOU SURE?########################################################################################
60 seconds to change your mind. Won't you prefer programming? Or a book?

I wanted to read the docs for this but the link seems broken? https://timothycrosley.github.io/concentration/

SyntaxError: Invalid syntax

Hi.

I've just install this package through "pip" on my Ubuntu 15.10 laptop. However, I'm getting a "SyntaxError" when trying to run "concentration".

aa@romeo:~# concentration Traceback (most recent call last): File "/usr/local/bin/concentration", line 7, in <module> from concentration.run import __hug__ File "/usr/local/lib/python2.7/dist-packages/concentration/run.py", line 65 def take_break(minutes: hug.types.number=5): ^ SyntaxError: invalid syntax
The version pip installed for me was "concentration-1.1.1".

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.