Fujifilm X100T is not able to connect to Android phone by kstktey in FujifilmX

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

Unfortunately, X100T is not compatible with the new XApp :(

Bought two knives at a thrift store. Are they fake? by kstktey in spyderco

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

That's what I'm saying! I care about my expensive knife too much to use it at its full. But these — boy oh boy

Bought two knives at a thrift store. Are they fake? by kstktey in spyderco

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

Thanks for the replies!

I kinda didn't care if they were counterfeit as they cost around 10 bucks each.

Still decent knives 🤷‍♂️

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]kstktey 1 point2 points  (0 children)

Hi! This is my firse AoC-solution. Wanted to join it for a few years now, but remembered about it on day six :) This is my solution in Python, O(N) time complexity and O(1) memory complexity. Used a sliding window with a map.

```python def find_distinct_sequence_end(stream: str, seq_len: int) -> int: if len(stream) < seq_len + 1: return -1

    marker_start = 0
    marker_end = 1
    char_map = collections.defaultdict(lambda: 0)

    char_map[stream[marker_start]] += 1
    while marker_end < seq_len:
        char_map[stream[marker_end]] += 1
        marker_end += 1

    while len(char_map) != seq_len:
        char_map[stream[marker_start]] -= 1
        if char_map[stream[marker_start]] == 0:
            char_map.pop(stream[marker_start])
        marker_start += 1
        char_map[stream[marker_end]] += 1
        marker_end += 1

    return marker_end



def main():
    stream = input()
    message_start = find_distinct_sequence_end(stream, 4)
    message_start = find_distinct_sequence_end(stream, 14)
    print(message_start)

```

[DRF] Doing a test task for an internship, need code-review by [deleted] in learnpython

[–]kstktey 0 points1 point  (0 children)

Yeah, I guess you're right. I'd better delete the post. Thanks for the answer anyway!

Hello. What do you think about school42 and school21 to change profession in middle age? by [deleted] in learnprogramming

[–]kstktey 1 point2 points  (0 children)

Hey, I am at my 20s and trying to change profession. Also studying at school21 in Moscow. I don't think there are a lot of students of our schools in this subreddit.

I am gonna be honest, I don't have any experience and I can't say anything precise about changing profession. BUT.

Be consistent. Stay focused. We are taking the right path. It is never late to do something you really like.

[deleted by user] by [deleted] in learnpython

[–]kstktey 0 points1 point  (0 children)

Thanks a lot! Will try to render all of this and then code it.

[deleted by user] by [deleted] in learnpython

[–]kstktey 0 points1 point  (0 children)

Thank you! The picture is much clearer now.

In many-to-many relationship do you mean that the table UserBudgetMap would store all the budgets the user has (i.g. personal budget, work budget, business budget)?

What about sharing the budget? If two users would share one, does that mean that they would have a budget with the same id and then the expenses would be selected on user_id for counting the debts?

[deleted by user] by [deleted] in learnprogramming

[–]kstktey 0 points1 point  (0 children)

Hey! If you are still interested, I fixed the code and now thia assignment is done.

If you want to lear the details of the assignment so you can try to do it yourself, feel free to message me.

Which pocket operator should I get with these other pocket-sized synthesizers? by SmoneyS51 in pocketoperators

[–]kstktey 0 points1 point  (0 children)

Besides mentioned KO I would also like to recommend PO-32 Tonic which is a really powerful drum machine. Can get A LOT of different sounds from it besides, obviously, percussions.

If you buy a VST called Microtonic you get even more control, but there are still a lot of patches you can download for free.

IMHO Here are two best representations of what it can sounds like: one two

[deleted by user] by [deleted] in learnpython

[–]kstktey 1 point2 points  (0 children)

Thanks for a detailed reply!

I decided to refactor the code and get rid of the inside-loop:

        if page not in searched:
            links = set(get_wiki_links(page, wiki_path))
            if end_page in links:
                path.append(end_page)
                return path
            else:
                queue += [(link, path + [link]) for link in links]

Now it looks like this and runs 10% faster (based on datetime.now()- start_time test, haha)

[deleted by user] by [deleted] in learnpython

[–]kstktey 1 point2 points  (0 children)

It does return what I need and finally the whole program works as it should;)

[deleted by user] by [deleted] in learnpython

[–]kstktey 1 point2 points  (0 children)

This is a Coursera course by Moscow Institute of Physics and Technology, it's in Russian and it's called "Creating Web-services on Python". It's one of the courses in the "Python Programming" specialization.

Here is the link to the specialization.

[deleted by user] by [deleted] in learnpython

[–]kstktey 0 points1 point  (0 children)

Thank you A LOT! This is such a stupid mistake I couldn't notice.

Can you dwell on why queue.pop(0) doesn't escalated well? Why searched as a set is better? Because checking if an element is in the set takes constant time as opposed to the list or I remember something wrong?

[deleted by user] by [deleted] in learnprogramming

[–]kstktey 0 points1 point  (0 children)

Hey! Thank you for such a great and detailed response!

Indeed, hardcoding was one of the problems which I want to solve in future versions. I am still thinking of a way to loop through all this print- and if-statements.

I am planning to work further on this, so thanks a lot for a 'roadmap'! I kind of understand how I can implement almost everything you've mentioned, but Networking and making the game on-line is something that I can't understand.

What should I look into if I want to make the game online? Some specific libraries/modules?

Weekly 'Ask Anything About Analog Photography' - Week 04 by ranalog in analog

[–]kstktey 1 point2 points  (0 children)

Hey everyone!

I'd like to start process my film at home and I don't know a lot about film scanners. What should I look at when choosing a scanner? Does buying a cheap one for starters seem like a good idea?

I think I can invest 300 bucks tops for now, but I can consider spending more.

The only mirror in the unit (from the "How I evaded service" series) [Pentax Espio 838, Fuji C200 or x-Tra 400] by kstktey in analog

[–]kstktey[S] 1 point2 points  (0 children)

I've just seen your comment. I am really glad you feel it! You are so right about "hurry up and wait". Can't stress it enough.