nieceandtows

joined 2 years ago
MODERATOR OF
[–] nieceandtows@programming.dev 4 points 2 years ago (12 children)

My financial knowledge is pretty bad, but I login to Lemmy every day, so I could give a shot moderating reports.

[–] nieceandtows@programming.dev 6 points 2 years ago (3 children)

I only know about piracy. What else did they block access for?

[–] nieceandtows@programming.dev 21 points 2 years ago (1 children)

Oof. Not sure which hurt more, the face plant or the embarrassment.

[–] nieceandtows@programming.dev 0 points 2 years ago* (last edited 2 years ago) (2 children)

Please feel free to suggest changes to make the code more efficient.

EDIT: for some reason, < is not showing up properly inside a code block. Kindly replace it with the right symbol when you test.

Python:

import sys

input_string = sys.argv[1]

matches = {
    "}": "{",
    "]": "[",
    ")": "("
}

bracket_matches_strict = []

def get_matching_substring_strict(string):
    substring = ''
    index_start = -1
    index_end = -1
    bracket_counts = {
        "{": 0,
        "[": 0,
        "(": 0
    }
    for index, letter in enumerate(string):
        if letter in matches.values():
            if index_start == -1:
                index_start = index
            substring += letter
            bracket_counts[letter] += 1
        if letter in matches.keys():
            if not substring:
                break
            if substring[-1] == matches[letter]:
                substring = substring[:-1]
                bracket_counts[matches[letter]] -= 1
                if not [cnt for cnt in bracket_counts.values() if cnt]:
                    index_end = index
                if [cnt for cnt in bracket_counts.values() if cnt &lt; 0]:
                    break
            else:
                break

    if index_start != -1 and index_end != -1:
        matching_substring = string[index_start:index_end + 1]
        return len(matching_substring), matching_substring

for i in range(len(input_string)):
    bracket_substring_strict = get_matching_substring_strict(input_string[i:])
    if bracket_substring_strict:
        bracket_matches_strict.append(bracket_substring_strict)

print(sorted(bracket_matches_strict)[-1][1])
[–] nieceandtows@programming.dev 13 points 2 years ago (1 children)

I just ask them to start playing and learn as I go. Lot easier that way.

[–] nieceandtows@programming.dev 29 points 2 years ago (4 children)

I thought this way in the beginning, but the way gog never even built a Linux client while valve literally made Linux a viable gaming platform from proton to steam deck, I buy all my games from steam now.

[–] nieceandtows@programming.dev 2 points 2 years ago (1 children)

Keeps the self righteous suicide away

[–] nieceandtows@programming.dev 2 points 2 years ago (3 children)

So I have a question here. I live in USA. I have setup stremio with torrentio lite because I don’t have real debrid yet. I have provided the same stremio login to my parents who live in India because I’ve already set everything up. If I set up stremio with debrid, can I still share my login with my parents? I’m asking because I read something about real debrid banning your account if you use it from multiple ip addresses simultaneously.

[–] nieceandtows@programming.dev 5 points 2 years ago (2 children)

As much as it is necessary, greed is something very abstract and extremely difficult to prove in courts.

[–] nieceandtows@programming.dev 12 points 2 years ago (8 children)

That looks very promising. Hopefully the battery improves drastically. Having never bought into the VR space, I’m very excited for this one. Let’s see how it pans out.

[–] nieceandtows@programming.dev 36 points 2 years ago (17 children)

And then put it where?

[–] nieceandtows@programming.dev 3 points 2 years ago (1 children)

Yeah reading the book, I can see how the words from then have evolved to words from now, and it's very rewarding when I'm able to understand a verse without any help from the guide.

view more: ‹ prev next ›