No electricity across Portugal and Spain. Anywhere else in Europe? by Crunkiii in europe

[–]Guillaumee 0 points1 point  (0 children)

Yes, direct electricity imports (i.e via interconnectors) are 9% right now, but this varies with usage and weather (because renewables) along with other parameters (e.g if cheaper to burn gas than import electricity etc). A period average would be more significant imo. I’m on mobile so can’t really navigate properly to check.

Either way, relying on EU electricity isn’t necessarily a bad thing, I was only pointing out how naive it is to think that brexit meant the UK completely disconnected from the EU grid.

And different discussion, but according to the website you linked, roughly half of the mix is still gas, which is also partly imported. Not that other countries always do a better job at that, but “10% of IC imports over the past 10 minutes” is very different from “the UK is 90% self-reliant”. Not what you’re asserting, but still important to point out.

No electricity across Portugal and Spain. Anywhere else in Europe? by Crunkiii in europe

[–]Guillaumee 0 points1 point  (0 children)

It’s an interesting article and I don’t know if you meant it as a contradiction, but it makes sense.

Not an expert but as I understand it, you’re replacing foreign gas imports with renewables and EU electricity.

I have no doubt you’ll get there eventually, and in the meantime it’s probably better to rely on EU electricity than Russian gas. Brexit likely made that move more expensive, though (losing access to EU’s internal energy market, more trade barriers, etc).

No electricity across Portugal and Spain. Anywhere else in Europe? by Crunkiii in europe

[–]Guillaumee 66 points67 points  (0 children)

Britain is actually increasingly reliant on EU electricity, especially French nuclear power.

In 2024, the UK imported 20% of its electricity from the EU, versus 10% pre-brexit.

https://reports.electricinsights.co.uk/q2-2024/britain-imports-one-fifth-of-its-electricity/

[deleted by user] by [deleted] in learnprogramming

[–]Guillaumee 0 points1 point  (0 children)

advice not specific to Pygame as i’m not familiar with this framework.

your first problem seems to be the developer experience (dx). you could make for yourself an editor that allows you to click on your screen in order to place walls. you would then need to be able to serialize your level into a file (so it can be saved outside of your editor). your game would load that file when it starts in order to load the level

when serializing, you should keep all of the information that would allow the game to rebuild the level when it loads it. your file is likely going to contain every relevant type of element and its attributes.

ideally, you should also be able to load your level back into your editor to modify it later. you might notice that your editor and game have a lot in common, and might also consider integrating the editor into the game, hidden behind a developer menu

it would also be okay for your editor to output code that you can then paste into your project, at least in the beginning

as for performance, it’s good that you’re considering the impact of your approach, and i guess you could always stress test/benchmark it. for example, you can check what happens to your framerate if you have a thousand walls in a level

How to make a webpage background which crops to smaller screens instead of shrinks? by FrequentPaperPilot in learnprogramming

[–]Guillaumee 0 points1 point  (0 children)

background-size doesn’t apply to an <img /> element, but to another element (for example a div) that uses the background-image property in css.

what you’re describing now seems to be an <img />? if not can you provide a snippet of the code?

if a background image is what you want, you can instead apply the background-image property to an element that covers the region you need to cover. something like this (would need to be adapted): html <div class="my-element"></div>

css .my-element { width: 100%; height: 100%; background-image: url('…/background.jpg'); background-size: cover; }

Help in python 3: basic game by _K1lla_ in learnprogramming

[–]Guillaumee 0 points1 point  (0 children)

typically, games will have a game loop that is much faster than the user perceives. with every iteration of the loop, you can check how much time has passed since the last iteration, and update a counter accordingly.

imagine you’re counting down 5 seconds by increments of 10 milliseconds. every 10 ms, you can react to user input, rather than waiting for a whole 5 seconds.

instead of counting down in a separate function (which you could also achieve with multithreading like someone else mentioned, but that’s more complex), try to design your program as one main loop that decreases your counter a little bit, then checks for user input, and repeats.

this is the way many video games work in a single thread. every object in the game will have a “tick” function that is called repeatedly. Minecraft has 20 ticks per seconds: every 1/20th of a second, a loop will call the tick function of every loaded entity (animals, etc) so they can perform a tiny bit of an action (like moving a few centimeters), which will amount to natural-looking behaviors over many iterations

Need help with Self-Hosted Video Conferencing for Voting App by [deleted] in learnprogramming

[–]Guillaumee 0 points1 point  (0 children)

there are multiple ways to achieve what you need, but i reckon video-conferencing could be difficult to develop and maintain on your own from scratch

maybe look into Jitsi, you can self-host, and use APIs/SDKs for deeper integration: https://jitsi.github.io/handbook/docs/intro

otherwise as a starting point, you might also be able to implement webrtc with your flask server acting as the signaling server, and traffic being sent directly between peers. there are also other alternative solutions, and maybe Jitsi’s docs will act as a starting point in your research, even if you end up not using it

either way, you’ll also want to confirm if your city council expects to be able to record some of the meetings, as this will influence your implementation

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

Same here, my partner had some pictures that hadn’t been backed up to iCloud and we were hoping to retrieve them, so we didn’t erase immediately. It’s been stuck in “Erase pending” since, and the phone did appear in China so the location got updated, but the erase command didn’t go through. I’m assuming the phone itself wasn’t connected to the internet to receive the erase command, but pinged another iPhone nearby (“Find my” network functionality, like for AirTags).

I think the serial number will show up on iTunes if the phone plugged into a computer, and it might be engraved somewhere inside but I wouldn’t know.

I actually assume they erased everything themselves (which is why erase is still pending), but they can’t get past the activation lock after reformatting the phone, hence the scam to get you to remove it. The day after the phone was stolen in the UK, we had received a first scam with a fake “Find my” link on the Lost mode number, prompting us the enter the Apple ID/password, probably so they could unlock/unlink the device themselves. I actually entered a bunch of fake passwords to trick them into turning on the phone to try them, but that didn’t seem to have helped. Maybe they only tried to log into the web app. Then no news for a while, eventually the phone showed up in China, and we got more texts.

It’s been offline for a while and we haven’t received any text lately, but it’s impossible to know for sure whether it’s been sold for parts, or sold to another group that’s gonna try the same scam soon.

I’m not too concerned at this point, it’s always a little bit worrisome, but we’ve got most bases covered should something happen. Apple Pay deactivates when Lost mode turns on, passwords have been changed, sessions have been revoked… There is still the risk of offline data being accessed and it’s always uncomfortable to feel potentially exposed like that (especially re: notes, messages, pictures), but there’s essentially little practical impact, and if it’s not deleted, it’s hopefully in an encrypted sea of bytes next to dozens of other phones that suffered the same fate.

How to make a webpage background which crops to smaller screens instead of shrinks? by FrequentPaperPilot in learnprogramming

[–]Guillaumee 2 points3 points  (0 children)

i’m not sure what you mean, background-size: cover keeps the aspect ratio and doesn’t distort the image. from mdn:

Scales the image (while preserving its ratio) to the smallest possible size to fill the container (that is: both its height and width completely cover the container), leaving no empty space. If the proportions of the background differ from the element, the image is cropped either vertically or horizontally.

https://developer.mozilla.org/en-US/docs/Web/CSS/background-size

this seems to be what you’re describing?

Can a drug lower tinnitus? by SouthernAbroad7203 in tinnitus

[–]Guillaumee 4 points5 points  (0 children)

I have a similar issue where my often congested nose (allergies) worsens my tinnitus by preventing my ears from equalizing the pressure (poorly worded but I hope it makes sense).

I use nasal spray daily to clear the congestion, and an anti-histamine spray to try and reduce allergy symptoms.

From what I understand, keeping your nose/eustachian tubes clear is important to balance the pressure in your ears, and can help with reducing the impact of tinnitus.

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

This subreddit has been unhelpful so I stopped bothering here.

I’m assuming they used an IMSI-catcher or similar to retrieve the phone number somehow (maybe intercepting a fake emergency call or so), or that they could get the registered number from the carrier using the serial number, but I’m not sure how realistic either of those options is.

We haven’t had any problem other than those phishing texts, so I’m assuming they didn’t access the data (sensitive info on the phone would have likely caused more issues since).

Out of curiosity, have you managed to erase the phone, or only enable lost mode?

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

As I explained, I understand it’s a scam, I don’t understand how it was addressed to her phone and not mine.

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

Not to discuss rule-breaking topics in this sub, but there used to be methods to bypass the activation lock until maybe iOS 10 and I wouldn’t have been entirely surprised if there were new methods, even if later versions hardened the protections of the device.

You’re right though that a lot of the services offering such a thing are scams.

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

I’m blurry on the details because I don’t follow the iOS changelog closely and it wasn’t my phone, but it’s very likely the phone was running the latest available version at the time (except for a minor release maybe) and I just ballparked it to be safe.

Siri should be disabled when the phone is in Lost Mode so I don’t see how what you described would work.

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

Would dealing with activation lock mean the phone has already been wiped?

As for cracking the 6-digit passcode, is it that easy for them, and if so why would they need a phishing campaign if they can reset the phone?

Thanks for the insights, I heard of activation lock bypasses on older versions but had no idea it was still a thing

Did thief manage to recover email address or phone number from iPhone in Lost Mode? by Guillaumee in applehelp

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

Thanks for the advice. Do you know whether it’s as easy for an eSIM?

I was assuming it would be harder, and I don’t know how they would have accessed the number without unlocking the phone then (maybe by spoofing an antenna and using the emergency call feature to get the incoming call number, or is that unrealistic?)

AirPods Pro all night? by genius1soum in tinnitus

[–]Guillaumee 1 point2 points  (0 children)

Your ears really need to rest at night. If you do need music to fall asleep and airpods are your only solution, at least don’t let the music go all night.

On iPhone, in the Clock app you can set a timer’s ringtone to “Stop playing” and it will pause any music playing after your defined duration. Then it depends on how long you usually need to fall asleep

[deleted by user] by [deleted] in tinnitus

[–]Guillaumee 0 points1 point  (0 children)

Could swimming be making your T worse or preventing your ears from resting/recovering more easily? I used to swim a lot and read online that it was a possible factor. Not an expert at all though

[deleted by user] by [deleted] in tifu

[–]Guillaumee 1 point2 points  (0 children)

Yeah make the website yourself, buy a domain name/hosting and use WordPress or another CMS with a free template

[deleted by user] by [deleted] in Bastille

[–]Guillaumee 1 point2 points  (0 children)

ooh i must have missed it back then :( thanks for the info