timothycrosley / concentration Goto Github PK
View Code? Open in Web Editor NEWStay focused on work when you want, and goof off when you don't.
License: MIT License
Stay focused on work when you want, and goof off when you don't.
License: MIT License
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'
There have been improvements since the last release in 2016. How would you feel about releasing from master?
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 .
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?
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?
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.
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,
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.
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/
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".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.