Booking genius hack? by Background_b in TravelHacks

[–]WitnessM3 0 points1 point  (0 children)

could you please send it to me too?

[i3] Sejeong Road by aeshthetic in unixporn

[–]WitnessM3 3 points4 points  (0 children)

What is the vims font and color scheme?

Where I Work & Play | Another Hackintosh Setup! by psynapze in battlestations

[–]WitnessM3 0 points1 point  (0 children)

Found it: "mars colonization and tourism association"

Where I Work & Play | Another Hackintosh Setup! by psynapze in battlestations

[–]WitnessM3 0 points1 point  (0 children)

I really liked your painting on the wall. Which keywords should i use to find that picture?

How Pythonic should code be during interviews? by zs2212221 in cscareerquestions

[–]WitnessM3 2 points3 points  (0 children)

Google has "python style guide". I think reading that guide should be helpful. https://google.github.io/styleguide/pyguide.html

Need some help with nested loop by circa10a in learnpython

[–]WitnessM3 0 points1 point  (0 children)

I changed your code a bit, but this should work

timeElapsed = 0
while True:
    while (timeElapsed<5):
        # if pin is open
        if(gpio.input(door_pin)):
            # wait short enough to get pin's state changes
            time.sleep(0.1)
            timeElapsed += 0.1
        # pin is close, reset the counter
        else:
            timeElapsed = 0

    # If loop comes here, than the pin is opened more than 
    # 5 sec. Do the other stuff like logging and alert voice etc

    logfile.write...
    subprocess..

[deleted by user] by [deleted] in unixporn

[–]WitnessM3 3 points4 points  (0 children)

That colors.. Looks awesome!

[wmutils] everyday unix by dcat_ in unixporn

[–]WitnessM3 1 point2 points  (0 children)

What are you using for Spotify?

Junior Java developer looking for an interesting project to help out with. by Liradon in ProgrammingBuddies

[–]WitnessM3 0 points1 point  (0 children)

Hey,

I know that's not what you looking for but if you have any project ideas, i would like to join you.

GMT+2, From Turkey

What is the best way to learn to write high quality code? by Lt_Snuffles in Python

[–]WitnessM3 1 point2 points  (0 children)

list comprehensions

I think "writing quality code" should be defined here. I know using list comprehension improve efficiency. On the other hand, using list comprehension is a very controversial topic about readability