GithubHelp home page GithubHelp logo

444b / jaccuse Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 67 KB

A simple python script to count the [interval] since [thing happened]

License: GNU General Public License v3.0

Python 100.00%
counter raspberry-pi timer

jaccuse's Introduction

About me:

header

  • Maintainer of:

  • 🔭 I’m currently focused on mastering DevOps practices, including CI/CD, automation, and cloud infrastructure management.

  • 🌱 I’m deepening my skills in Go, Python, and exploring tools like Kubernetes, Terraform, and Jenkins.

  • 👯 I’m looking to collaborate on innovative projects in cloud computing and DevOps.

  • 📫 Reach out to me for collaborations or discussions.

You are Page Visits to this profile! Excited to connect with fellow tech enthusiasts!

Statistics and Contributions

GitHub Streak

Please find below my competencies, scaled from Left ( More expertize ) to Right ( Less expertize ) ranking

Languages

Languages are crucial in DevOps for scripting, automation, and development. Python and Bash are particularly important due to their widespread use in automation and system scripting.

Python  Bash  Javascript  Ruby  C  Rust  Solidity  Haskell  Markdown  HTML5  CSS3 

Cloud Platforms + Management + CI/CD + Automation

Tools and platforms for cloud management, version control, and automation are at the heart of DevOps. Kubernetes, Docker, and Jenkins are particularly significant for container orchestration, containerization, and continuous integration/continuous deployment.

Kubernetes  Docker  Jenkins  Git  Github  GCP  AWS  OCI  Grafana  Prometheus  Jira  Heroku   

OS + Hardware

Operating systems, particularly Linux distributions, are fundamental in DevOps for server management, scripting, and running applications.

GNU/Linux  Ubuntu  Debian  CentOS  RHEL  nixOS  Raspberry Pi

footer
Looking to expand your professional network? Let's connect and explore new opportunities together!

jaccuse's People

Contributors

444b avatar

Watchers

 avatar

Forkers

elie-z

jaccuse's Issues

Replace if logic with a dictionary

Instead of using if statements, we can use a dictionary
psuedocode: directionDict ={"up" : 0, "down": 180, etc}
we can set it with sense.set_rotation(directionDict[event.direction])

Fix how double digits are handled

Currently, single digits are shown via sense.show_letter(), which can handle single letters
We can not use this when we use numbers >= 10, so we have a workaround of using sense.show_message()
we need to fix this since sense.show_message() scrolls the value past and this is problematic for any time greater than a second

Function Decorations

def change(canvas, paint):

You can give functions decorations like:
def change(canvas:list, paint:list) -> None:
Then when you hover your mouse over change it'll show you the inputs/output types and the -> is the return type

A way to count in all time periods

An issue is that you have to pick the time periods
A request for a new feature is to start the timer and it automatically changes the time period
if 60s, period = minute
if 60m, period = hour
if 24h, period = day

Duration Dictionary Idea

jaccuse/main.py

Line 196 in 7e10ab5

if duration == "sec":

Instead of this block:

if duration == "sec":
    update_display(counter, duration)
    sleep(1)
    counter += 1
elif duration == "min":
    update_display(counter, duration)
    sleep(60)
    counter += 1
elif duration == "hour":
    update_display(counter, duration)
    sleep(3600)
    counter += 1
elif duration == "day":
    update_display(counter, duration)
    sleep(86400)
    counter += 1
else:
    print("error")
    break

You can have a dictionary like:
duration_dict = {"sec":1, "minute":60, "hour":3600, "day":86400}
And then replace the block with:

if duration:
    update_display(counter, duration)
    sleep(duration_dict[duration])
    counter += 1
else:
    print("error")
    break

Direction idea

if event.direction == "up": # Up button

You can make this just a few lines like:

if event.action == "pressed":
    # Check which direction
    if event.direction == "middle":
        flipped = False # exits the loop
   sense.set_rotation(direction_dict[event.direction])
   sense.show_letter(arrow)    

You could also do:
if event.direction in ["up", "down", "left", "right"]:

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.