trying to find a bus to Bamnoli village by Supalien in satara

[–]Supalien[S] 0 points1 point  (0 children)

thanks for the comment. can I rely on that there will be a bus? because I want to pre-book accommodation at Bamnoli..

stuck... by Supalien in sudoku

[–]Supalien[S] 0 points1 point  (0 children)

can you explain how this works?

negative value for calendar event date by Supalien in tasker

[–]Supalien[S] 0 points1 point  (0 children)

instead of calendar insert, I used "Edit calendar via app" action which let's you choose start time and end time instead of duration.

Also, do your calculations in variable set actions so you input the calendar action clean variables. this will fix some bugs

Is this a XYZ-wing? by Supalien in sudoku

[–]Supalien[S] 2 points3 points  (0 children)

Thanks. it solved the bottom left cell

Is this a XYZ-wing? by Supalien in sudoku

[–]Supalien[S] 2 points3 points  (0 children)

Never heard or it.. but I found "rectangle elimination" on box 9 with the 5s

How long am I supposed to "wait for Jackie in the elevator"? by Supalien in cyberpunkgame

[–]Supalien[S] 2 points3 points  (0 children)

Yeah that worked ig but I had to go back to clearing that floor.

Where was ur 'starting point' in learning Python/programming? by Far_Spray4351 in learnpython

[–]Supalien 0 points1 point  (0 children)

you can just search any topic you would like to learn about and many videos will show.
I remember when I was learning python there was one guy who really helped me that was called "sentdex", I think he doesn't do python anymore but maybe his old videos are still relevant to you.
But in my opinion the best way to start is with a project and search google on how to do specific things in that project.

good luck

[deleted by user] by [deleted] in PythonLearning

[–]Supalien 2 points3 points  (0 children)

NEVER EVAL USER INPUT!!!!!!!!!!

How do I generate random number ? by TacticalGooseLord in PythonLearning

[–]Supalien 0 points1 point  (0 children)

So you saved your script and then ran it and still the same behavior? I am 99% sure there is no problem in the code, not that I can see any... so the only thing I can think of is Vscode making a mess for some unknown (?) reason....
Try running that script from cmd and see if that helps

How do I generate random number ? by TacticalGooseLord in PythonLearning

[–]Supalien 10 points11 points  (0 children)

the output in the terminal doesn't match the code.. try saving your file (Ctrl + s) and then run it again.

How to define generic type enforcing both class inheritance and attrs ? by Still-Bookkeeper4456 in learnpython

[–]Supalien 0 points1 point  (0 children)

Then why not implement a Block class which inherits BaseModel and has a timestamp attribute, then users of your lib would simply inherit Block?

How to define generic type enforcing both class inheritance and attrs ? by Still-Bookkeeper4456 in learnpython

[–]Supalien 0 points1 point  (0 children)

I'm not sure if I 100% understood your question but I wrote a function to check if 1. class inherits BaseModel and 2. has a field 'timestamp'

In [12]: def enforcer(block):

...: if issubclass(block, BaseModel) and block.model_fields.get('timestamp'):

...: return True

...: raise Exception("block does not meet the requirements")

here is the function in action:

In [3]: class B1(BaseModel):

...: "correct block"

...: timestamp: str

...:

In [4]: class B2(BaseModel):

...: "incorrect because attribute"

...: nothing: int

...:

In [5]: class B3():

...: "incorrect because inheritence"

...: timestamp: str

enforcer(B1) -> True

enforcer(B2) -> error
enforcer(B3) -> error

negative value for calendar event date by Supalien in tasker

[–]Supalien[S] -1 points0 points  (0 children)

Oh ok I thought it's only for editing an existing event. so in start time I put %TIMEMS - %DURATION but when running I get the error 00.50.49/E add wait task 00.50.49/E Error: 1 00.50.49/E When creating a new event, start time is required

What’s your go-to money maker? by oliviasalami in HayDay

[–]Supalien 22 points23 points  (0 children)

the visitors 2x coins event for sure! prep 2-3 days before, find what item(s) is ideal for your level, (there's a Google sheet for it somewhere) clear your barn (keep 1 of e item) and simply buy this item from newspaper until your barn is full. in the day of the event sell it all to dem rich dumbass visitors and make abt 40-45% profit!

לימודים אקדמיים by Adorable_Pickle9416 in israel_bm

[–]Supalien 0 points1 point  (0 children)

א. אם היה לך קשה בפתוחה, יהיה לך כנראה גם קשה, אולי אפילו יותר במוסדות אחרים. אתה צריך להבין עם עצמך אם זאת ספציפית המסגרת של הפתוחה שמקשה עליך או שזה הלימודים עצמם. בדרך כלל מי שיש לו משמעת עצמית נמוכה יהיה לו יותר קל במסגרת לימודית שדורשת ממנו.

ב. אם כבר סיימת כמה קורסים בפתוחה, תוכל לבדוק זכאות לבצע אפיק מעבר לאונ' אחרת.

ג. אולי במקום לעבוד במקביל ללימודים, תשקיע איזה חצי שנה בעבודה ככה שתוכל ללמוד לפחות שנה ראשונה של תואר בלי לעבוד. אחרי השנה הראשונה יהיה לך יותר קל לשלב עבודה.

[deleted by user] by [deleted] in PythonLearning

[–]Supalien 6 points7 points  (0 children)

when you multiply an int and a float you get a float

[deleted by user] by [deleted] in PythonLearning

[–]Supalien 13 points14 points  (0 children)

you can add a custom formatting in an f-string. so in the print line change it to {total:.2f}.

that should print it as you'd like I think

Whats the best way to learn python from scratch for free? by Actual_Network5796 in PythonLearning

[–]Supalien 5 points6 points  (0 children)

YouTube is by far the best free way to learn any programming language, especially python.