s3rius / alarmix Goto Github PK
View Code? Open in Web Editor NEWAlarm clock based on Unix-sockets and python.
Alarm clock based on Unix-sockets and python.
alarmix/alarmix/daemon/alarm_manager.py
Lines 117 to 121 in 4392f46
There is a way to rewrite this with set compressions. Should be more readable (subjective, ofc) and possibly faster.
Something like that (typing from phone, so look for errors/typos):
self.alarms[When.auto.value] = {
alarm_time for alarm_time in self.alarms[When.auto.value]
if alarm_time >= datetime.now()
}
Also datetime.now()
calculated for every record in set. I don't think thats a problem, but something inside me screams when I see filtering with dynamic value ๐
Why on earth should we depend on MPV? We have to replace it with pure python.
If you set up an alarm at 09:30 on weekdays.
You'll see it in a list even after buzzing.
โ ~ alarmc
+------------+----------------+
| alarm time | remaining time |
+------------+----------------+
| 15:35 | 0:36:02 |
| 09:30 | 18:31:02 |
+------------+----------------+
โ ~ alarmc
+------------+----------------+
| alarm time | remaining time |
+------------+----------------+
| 9:30 | 20:56:53 |
+------------+----------------+
I hate it. Add padding zero at the start of hours and minutes if needed in order to achieve this:
โ ~ alarmc
+------------+----------------+
| alarm time | remaining time |
+------------+----------------+
| 09:30 | 20:56:53 |
+------------+----------------+
We need to redesign our logo and update README.md.
Our current logo is just a simple free png of ringing watches. We need something more simple.
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.