DSMB

u/DSMB


r/Python•

I'm basically a beginner when it comes to Python, and the other day I really wanted to get the most out of the VS Code tooltip that renders docstrings and type hints. So I spent all day reading and testing and as far as I could tell, the only situation where you can annotate variables to display a comment in this tooltip is for class variables.

Eventually my thought process led me to try this:

import time

class Var:
    x = 0
    '''0, 1, or 2'''

def foo():
    class Var:
        x:time.time
        '''Time in seconds since the Epoch'''
    Var.x = time.time_ns()
    print(Var.x)

def bar():
    class Var:
        x: int = 0
10474

r/Backup•

I just have a bunch of HDDs that I mostly don't use. It's mostly media and files (~2TB) I will never modify. I can copy the data, but I won't know when something becomes corrupted. It's not super critical so I'm not investing in 3-2-1 backup philosophy.

Basically, I imagine the software mirroring the HDD to another location, and the software also ensures files are identical and flags potential corruption for review, or even just repairs it on the go.

Backup solutions with servers confuse me. I don't think sync options like Rsync will do anything to flag corruption.

I'm currently looking at list of folder sync tools here [https://www.winhelponline.com/blog/compare-two-directories-files-fi

27

r/linuxmint•

I've set up multi-boot on my Laptop (Lenovo Yoga). I started fresh with a clean Windows 11 install. Then resized the system partition, created a separate EFI partition for GRUB, swap space, 3 system partitions and a data partition. I installed Ubuntu, Pop, and Mint.

GRUB was installed on the second EFI partition, with the Windows Boot Manager added. My boot order is USB, then GRUB, then Windows Boot Manager.

This setup has worked fine for weeks. Windows 11 did some updates, and then when the computer started, I got a UEFI boot menu (Ubuntu, Windows Boot Manager). Ubuntu being the UEFI entry for GRUB. I selected Ubuntu, and it just basically refreshed the boot menu. I turned off the laptop

25

r/joplinapp•

I'm migrating from OneNote, and imported a bunch of notes. This itself was... extremely messy and much data didn't import.

Anyway, I'm now trying to sync using OneDrive, and basically it doesn't work. I synced on my Windows PC where all my notes are. A whole bunch of files are added to OneDrive/Apps/Joplin, as expected.

Then on my other laptop running Linux Mint, I select OneDrive to sync, log in, try to sync... and nothing happens. I tried the delete and redownload everything, and it redownloaded the 5 default notes, and one other that I created. So it seems that when I added OneDrive to Joplin on the second (Linux) laptop, it just deleted everything in OneDrive from the first laptop and

22

r/techsupport•

I'm backing up drivers before wiping everything, and I note two different Windows command line utilities for this, dism and pnputils.

I tried both, and dism exported an additional 12 drivers, all starting with "ntprint.inf_x86".

Additionally, dism also exports an additional .PNF file for each driver. I assume this is just because they are storing the driver information differently? But what's the point when it already exports the same .INF file?

Can anyone clarify why dism exports an additional setup file and detects additional drivers?

51

r/ProtonMail•

I tried sending an email to one of my proton pass aliases plus detail from my gmail, and it came back as "full".

Basically, I sent an email to [email protected] and it bounced.

Is this possible? I've only just started with Proton so I'm just testing it out and getting a feel for it atm.

Cheers

21

r/Office365•

To clarify, I am constantly struggling to bring up the move or cross cursor when hovering on cell borders.

The border tolerance is literally 1 pixel. The fill handle is maybe 3x3 pixels.

I swear it didn't used to be this difficult to select cell borders in older Excel 2010 etc, and my mouse is only at 50% speed, with 'enhance pointer precision' enabled. Also, I thought Windows, maybe XP, used to have an option to slow cursor speed by holding shift? (maybe it was a mod?)

My current strategy is to move the cursor at maybe a 10 degree angle to slow vertical translation.

Does anyone know anything I can do to make this easier, or is it just a skill issue?

31

r/learnpython•

I'm refactoring my code and putting most imports inside functions. I have a function that in the type hints references a class that is imported inside the function. Here is pseudocode:

def my_function(param1:abc.AClass):
   from abc import abc

When this file compiles Python throws an exception:

NameError: name 'abc' is not defined

Yes this makes sense. Yes I can remove the hint and it works, and yes docstrings mostly make up for this. But can I suppress it so I can keep the type hints?

027

r/comp_chem•

Posting this for anyone else who might have the same issue.

Open Babel namespaces are accessed directly from generic openbabel namespace. This includes OBAminoAcidProperty, OBElements, OBGenericDataType, OBResidueAtomProperty, OBResidueIndex, and OBResidueProperty.

The openbabel package for Python allows Python to interface with the C++ Open Babel library, installed separately. It uses SWIG to create Python bindings.

Examples and explanations for Python coding are given in the official docs. Note the documentation link on the [package website](htt

21

r/excel•

I am using Microsoft Excel 365 MSO (Version 2501 Build 16.0.18429.20132) 64-bit.

I have a folder with a workbook and a bunch of files. This is in my OneDrive.

The workbook has a bunch of links to those files in the folder. I initially just created the hyperlink and pointed to the file in the folder and the links seemed to be relative. Indeed, the "address" field only showed the file name. The links worked fine.

I have now moved to another device, my OneDrive is synced, and I open the workbook. Now when I click a link, it opens a web browser for me to log in. The links all have an address starting with "https://d.docs.live.net". I tried to recreate links but they all instantly convert to a

07

r/Garmininstinct•

Went for a run today. GPS was not accurately tracking distance. Distance was reading short and pace was reading slow. Was definitely running faster than 6 min/km, and was running with a friend who was tracking us faster and further on his Garmin watch.

After syncing on my phone, map doesn't show on activity.

When I sync my time with GPS time, it is a whopping 10 minutes out. It's normally accurate to the second.

Are there any know issues that would explain this, or troubleshooting steps I can take? Already tried resetting by holding the light/ctrl button for 15s, no good.

10

r/Garmininstinct•

Overall, I'm glad I got it.

I do realise that my issues are not going to be relevant to many, but it may be relevant to some who may decide to jump on a Garmin watch. Unfortunately, the main issues I have extend well beyond the Instinct, and are inherent to basically the whole Garmin ecosystem in general.

Pros:

  • Excellent display. Very legible at all angles and I love it.
  • Customisable watch face. Plenty of options to get what you want at an immediate glance.
  • Power saving mode. Ability to disable functions like connectivity to extend battery is excellent. The control wheel is also super convenient for disabling power saving for when I want to sync.
  • Battery life. Probably the biggest
1618