Giter VIP home page Giter VIP logo

alarmix's Issues

Set compressions

correct_alarms = set()
for alarm_time in self.alarms[When.auto.value]:
if alarm_time >= datetime.now(): # type: ignore
correct_alarms.add(alarm_time)
self.alarms[When.auto.value] = correct_alarms

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 ๐Ÿ™ƒ

Tests.

We have no tests, and any significant changes can break this project without any notice.
image

Wrong remaining time.

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    |
+------------+----------------+

Docs and stuff.

Some people might not understand how this project works. We need to update our README.rst and comments in code. And maybe we can describe alarmd socket protocol.

image

Padding zeros

โžœ  ~ 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    |
+------------+----------------+

Add description to alarms.

Cuz, sometimes I don't quite remember what this alarm is for? And I guess the description will solve the problem.
image

DESIGN, mother***, can you do it?

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.

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.