s12

joined 3 years ago
[–] s12@sopuli.xyz 8 points 1 week ago

Just because a Nat 20 isn’t necessarily the cause, doesn’t mean that skill checks don’t crit.

[–] s12@sopuli.xyz 5 points 1 week ago (2 children)

I heard too many stories about people’s hard drives failing after the update for the news to be false. As far as I know, the issue isn’t easily reproducible though.

[–] s12@sopuli.xyz 6 points 1 week ago

Such a wholesome story!
Thanks for sharing.

[–] s12@sopuli.xyz 1 points 3 weeks ago

New here.

Why not just have someone patch the node software to not accept retroactive blocks? Or just avoid building off of those late submission blocks and allow the blockchain to branch? If they continue theirs and have 51%, wouldn’t they just lose their liquidity?

[–] s12@sopuli.xyz 1 points 3 weeks ago (1 children)

Some questions; Why disable updates?
Would you still want to set a user name and password if you don’t want remote access?
What is ZMQ and why bind it to localhost?
Why not set restricted bind port to something really obscure, or even at all if you might not want to open that port?

I noticed this is just for the CLI, not the GUI. How much of the advice transfers over?

[–] s12@sopuli.xyz 3 points 3 weeks ago

I wonder if Kier and Farage are working together.

[–] s12@sopuli.xyz 1 points 3 weeks ago (1 children)

And yet sadly, I can’t even reach “corporate slave” rank.

[–] s12@sopuli.xyz 3 points 3 weeks ago

I’ve recently been watching some Okayu.
This looks really cute.

[–] s12@sopuli.xyz 1 points 1 month ago (1 children)

I would have thought it would be designed against that.
Though the ultra wealthy and powerful would probably find a way around almost anything…

[–] s12@sopuli.xyz 1 points 1 month ago

Just signing won’t be enough. We need to tell our MPs that this thing NEEDS to go in a matter of hours.

[–] s12@sopuli.xyz 0 points 1 month ago (1 children)

I mean… if you were to actually assist with the baking or plumbing, or drive the car; you could technically be an assistant baker, an assistant plumber, or a car driver.

 
 
 

Framework Laptop 16
Linux Mint 22.1 Cinnamon
AMD Ryzen 7 7840HS w/ Radeon 780M Graphics × 8

I keep trying to restart Steam, and I keep getting this. Strangely, the first time I tried to record what was happening, it successfully opened on that occasion, but ~~I couldn't get it to work again.~~ I lowered the resolution to record.

Edit: Since the main image slot doesn't seem to work, I'll try to add it bellow:

Edit 2: NVM, it keeps changing it from ![](https://lemmy.ml/api/v3/image_proxy?url=https%3A%2F%2Fsopuli.xyz%2Fapi%2Fv3%2Fimage_proxy%3Furl%3Dhttps%253A%252F%252Fi.ibb.co%252FRTjTRgH8%252FSteam-UI-issue.webp) to ![](https://lemmy.ml/api/v3/image_proxy?url=https%3A%2F%2Fsopuli.xyz%2Fapi%2Fv3%2Fimage_proxy%3Furl%3Dhttps%253A%252F%252Fi.ibb.co%252FRTjTRgH8%252FSteam-UI-issue.webp)!!!

Edit 3: REALLY?!? Even if I put the link in an inline code block?!?

Update: Strangely, it works consistently when using the desktop shortcut, but consistently fails when using the menu shortcut.

Update 2: I've commented the contents of the two .desktop files.

Update 3: Changing the main Exec in the .desktop that doesn't work to be the same as the one that does didn't work. Although using one of the "sub-options" from the menu short cut such as "Store" or "Library" seems to work, even though the default launch doesn't.

 
 
 

The UK's Stop Killing Games petition is finally back up!

Link to petition: https://petition.parliament.uk/petitions/702074/
Link to campaign: stopkillinggames.com
Link to the campaigner’s initial video

The previous one was closed due to the general election, and it never got the revised response that was requested.
Previous petition.
Previous thread for it.

Update: Link to the campaigner’s video on the response

 

cross-posted from: https://sopuli.xyz/post/18489384

After I started up my computer, having updated the last time I used it, going past the log in screen just shows the desktop background for a little bit, before a black screen with just a cursor. The Lock Screen still works if I shut the laptop lid or leave the computer enough, but the screen doesn’t seem to turn off properly when shutting the lid and most keyboard shortcuts don’t work, though I can still go to tty.

I tried updating. I tried reinstalling Cinnamon. That didn’t work, but installed lxde and selecting that at login worked, but Cinnamon still doesn’t.

I eventually found out that right clicking the black screen Cinnamon desktop still works, and I can get windows such as the terminal like that, but the windows won’t move or resize.

Probably just going to do a new install.

 

After I started up my computer, having updated the last time I used it, going past the log in screen just shows the lock-screen background for a little bit, before a black screen with just a cursor. The Lock Screen still works if I shut the laptop lid or leave the computer enough, but the screen doesn’t seem to turn off properly when shutting the lid and most keyboard shortcuts don’t work, though I can still go to tty.

I tried updating. I tried reinstalling Cinnamon. That didn’t work, but installing lxde and selecting that at login worked, but Cinnamon still doesn’t.

I eventually found out that right clicking the black screen Cinnamon desktop still works, and I can get windows such as the terminal like that, but the windows won’t move or resize.

Probably just going to do a new install.

 

How can av1_amf be used with ffmpeg as stated on the ffmpeg wiki?

I have already tried asking on the ffmpeg user mailing list, but I haven't got a response.

 

Will I need to clean out dust. How would I do this? How often would I need to do this? Are there any good tutorials on how this would be done?

 

I've been using Linux for at least 2 years. I have Linux Mint on my main computer and Debian on my old computer. Trying to apt update says that the connection failed to security.ubuntu.com, deb.debian.org, ftp.uk.debian.org, etc.

Updating directly from sources such as for the Brave Browser still works. Sites not necessary for updating still work. Accessing them through browser doesn't work (It would give a "Connection was reset" error (for Debian) or an error that mentioned DNS (for main computer)). Pinging them seemed to work. Accessing these sites on my phone still works (though it didn't until I accessed them through mobile data and switched back to wifi). Connecting my Linux Mint computer through mobile data to apt update and switching it back to wifi resolved the issue for my Linux Mint computer, but I wasn't able to get my Debian system to connect through my phone.

Any ideas for causes/resolutions?

 

I have a repository that contains multiple programs:

.
└── Programs
    ├── program1
    │   └── Generic_named.py
    └── program2
        └── Generic_named.py

I would like to add testing to this repository.

I have attempted to do it like this:

.
├── Programs
│   ├── program1
│   │   └── Generic_named.py
│   └── program2
│       └── Generic_named.py
└── Tests
    ├── mock
    │   ├── 1
    │   │   └── custom_module.py
    │   └── 2
    │       └── custom_module.py
    ├── temp
    ├── test1.py
    └── test2.py

Where temp is a folder to store each program temporarily with mock versions of any required imports that can not be stored directly with the program.

Suppose we use a hello world example like this:

cat Programs/program1/Generic_named.py
import custom_module

def main():
    return custom_module.out()


cat Programs/program2/Generic_named.py
import custom_module

def main():
    return custom_module.out("Goodbye, World!")


cat Tests/mock/1/custom_module.py
def out():return "Hello, World!"


cat Tests/mock/2/custom_module.py
def out(x):return x

And I were to use these scripts to test it:

cat Tests/test1.py
import unittest
import os
import sys
import shutil

if os.path.exists('Tests/temp/1'):
    shutil.rmtree('Tests/temp/1')

shutil.copytree('Tests/mock/1', 'Tests/temp/1/')
shutil.copyfile('Programs/program1/Generic_named.py', 'Tests/temp/1/Generic_named.py')

sys.path.append('Tests/temp/1')
import Generic_named
sys.path.remove('Tests/temp/1')

class Test(unittest.TestCase):
    def test_case1(self):
            self.assertEqual(Generic_named.main(), "Hello, World!")

if __name__ == '__main__':
    unittest.main()



cat Tests/test2.py
import unittest
import os
import sys
import shutil

if os.path.exists('Tests/temp/2'):
    shutil.rmtree('Tests/temp/2')

shutil.copytree('Tests/mock/2', 'Tests/temp/2')
shutil.copyfile('Programs/program2/Generic_named.py', 'Tests/temp/2/Generic_named.py')

sys.path.append('Tests/temp/2')
import Generic_named
sys.path.remove('Tests/temp/2')

class Test(unittest.TestCase):
    def test_case1(self):
            self.assertEqual(Generic_named.main(), "Goodbye, World!")

if __name__ == '__main__':
    unittest.main()

Both tests pass when run individually:

python3 -m unittest Tests/test1.py
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK


python3 -m unittest Tests/test2.py
.
----------------------------------------------------------------------
Ran 1 test in 0.000s

OK

However, they fail when being run together:

python3 -m unittest discover -p test*.py -s Tests/
.F
======================================================================
FAIL: test_case1 (test2.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/s/Documents/Coding practice/2024/Test Mess/1/Tests/test2.py", line 18, in test_case1
    self.assertEqual(Generic_named.main(), "Goodbye, World!")
AssertionError: 'Hello, World!' != 'Goodbye, World!'
- Hello, World!
+ Goodbye, World!


----------------------------------------------------------------------
Ran 2 tests in 0.001s

FAILED (failures=1)

If I try to use a different temporary name for one of the scripts I am trying to test,

cat Tests/test2.py
import unittest
import os
import sys
import shutil

if os.path.exists('Tests/temp/2'):
    shutil.rmtree('Tests/temp/2')

shutil.copytree('Tests/mock/2', 'Tests/temp/2')
shutil.copyfile('Programs/program2/Generic_named.py', 'Tests/temp/2/Generic_named1.py')

sys.path.append('Tests/temp/2')
import Generic_named1
sys.path.remove('Tests/temp/2')

class Test(unittest.TestCase):
    def test_case1(self):
            self.assertEqual(Generic_named1.main(), "Goodbye, World!")

if __name__ == '__main__':
    unittest.main()

Then I get a different error:

python3 -m unittest discover -p test*.py -s Tests/
.E
======================================================================
ERROR: test_case1 (test2.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/s/Documents/Coding practice/2024/Test Mess/2/Tests/test2.py", line 18, in test_case1
    self.assertEqual(Generic_named1.main(), "Goodbye, World!")
  File "/home/s/Documents/Coding practice/2024/Test Mess/2/Tests/temp/2/Generic_named1.py", line 4, in main
    return custom_module.out("Goodbye, World!")
TypeError: out() takes 0 positional arguments but 1 was given

----------------------------------------------------------------------
Ran 2 tests in 0.001s

FAILED (errors=1)

It seems to be trying to import the same file, despite me using a different file from a different path with the same name. This seems strange, as I've been making sure to undo any changes to the Python Path after importing what I wish to test. Is there any way to mock the path? I can't change the name of the custom_module, as that would require changing the programs I wish to test.

How should I write, approach, or setup these tests such that they can be tested with unittest discover the same as they can individually?

view more: next ›