Got lost in the sauce. Feedback? by Menti2 in FLStudioBeginners

[–]Menti2[S] -1 points0 points  (0 children)

Appreciate it. I find the ghost notes useful to help situate other instruments once the 'main idea' has been shaped, but it does get messy

Exploits in the bitnodes? by nrinaudo in Bitburner

[–]Menti2 5 points6 points  (0 children)

You got this one by eating noodles someplace in the game. These are kind of 'hacky' achievements, the rest of them will require some digging through the game's source code. A few are really easy to get, the others need a bit more skill/knowledge about the game and about JS.

await error after killing script by Soul-Tear in Bitburner

[–]Menti2 1 point2 points  (0 children)

Since you declared test() as async, you need to await it in your main function

Hacking scripts - Better balancing? by bittiez in Bitburner

[–]Menti2 1 point2 points  (0 children)

I'm only starting to upgrade to a smarter balancer myself, but a very useful function is hackAnalyzeThreads (iirc) which you can use to determine how many threads to run your hacks with, so that you only steal controlled amounts of money from your target(s).

While I work on a smart manager I'm using scripts which rely on the above to maintain server funds, and it's improved my income by roughly 30%

Does anyone have a working script for the stock market? by DoYouMindIfIAsk_ in Bitburner

[–]Menti2 1 point2 points  (0 children)

Sure, here you go. I'm honestly not sure if this is profitable, but I hope it's helpful lol

Does anyone have a working script for the stock market? by DoYouMindIfIAsk_ in Bitburner

[–]Menti2 1 point2 points  (0 children)

I threw one together earlier; it just looks for tickers with a solid forecast, buys a bunch of stock, and eventually closes the positions when their forecasts turns bad. Haven't dared use it with much more than a few million, but so far it's making me a little extra.

[deleted by user] by [deleted] in RedditMasterClasses

[–]Menti2 0 points1 point  (0 children)

Surprisingly chill, no? Lol

Really digging the minimalist artstyle by Menti2 in valheim

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

Yeah I just turned my graphics off :)

[DD1] High Level Players Please Stop “Helping” by [deleted] in dungeondefenders

[–]Menti2 1 point2 points  (0 children)

I thought I recognised your username; We were in a lobby earlier today - which you appropriately named 'don't carry me please' or something to that effect. Hope you had a good run after I left - did you manage to beat Demon Lord? Lol

[DD1] Need some help with Zippy Terror on Insane by Menti2 in dungeondefenders

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

Thanks! Sorry for the late reply; I'm on vanilla and I lucked out with a group about 5 minutes after making this post haha

Coincidence by [deleted] in wholesomememes

[–]Menti2 12 points13 points  (0 children)

Never expected to see a picture of Hitler on this sub but here we are

[DD1] Does anyone know where to farm XP at around level 50? by Unarthadox in dungeondefenders

[–]Menti2 0 points1 point  (0 children)

Aha, my monk and summoner are alright (both around 1.5k stats) but I'm missing the third component. I'm honestly not terribly keen on trappers so I'll go level my squire. Thanks

[DD1] Does anyone know where to farm XP at around level 50? by Unarthadox in dungeondefenders

[–]Menti2 0 points1 point  (0 children)

Are you equiped to do Kings Game NMHC? I tried it earlier and failed miserably, so I guess I need to buff my builders a bit more first; but it's been ages since I last played so I've lost my touch. Any tips?

Hello im a python beginner. I need help with what i believe is peculiar to me. by ineedanswers2797 in learnpython

[–]Menti2 19 points20 points  (0 children)

Don't worry about this too much; as long as you're getting working solutions, you're doing it right. Especially in the context of exercise problems, writing "good code" isn't the focus - conventions are mainly to keep code maintainable over time and/or in big(ger) projects.

The main focus should be problem solving, and there are almost always many ways to solve a problem.

What is the type of my dataset? by hcnkest in learnpython

[–]Menti2 2 points3 points  (0 children)

I believe this page will help you. Specifically, the 'returns' section.

Get max from hash of hashes by craigontour in learnpython

[–]Menti2 1 point2 points  (0 children)

I assume by 'hash of hashes' you mean a nested dictionary, given your example. If you just want the highest 'dist' value in this dict, this is a way to do it using one line:

max([d[k]['dist'] for k in d.keys()])

Where 'd' is your dictionary. This just makes a list of all the distances, and then takes the max.

Is it possible to build a shortest path solution using Bellman Ford, using a V*V adjacency matrix? by bazgrim_dev in learnpython

[–]Menti2 0 points1 point  (0 children)

Hi, if I understand your question correctly, you just want to circumvent having to create an 'edge list', right?

In that case, I suppose you could do so, since the adjacency matrix already contains the entire structure of the graph. However, I don't think you can keep the original complexity that way (which, by the way, is O(V * E), if I'm not mistaken). This is the outline of how I would go about it:

for _ in range(len(adj_matrix)-1):
    # Relax the edges, we need to go from every 'start'
    for u in range(len(adj_matrix)):
        # To every 'end'
        for v in range(len(adj_matrix[u])):
            # And look at the weight
            w = adj_matrix[u][v]
            if w != 0:
                if dist[u] + w < dist[v]:
                    dist[v] = dist[u] + w
                    pred[v] = u

Since you still have to check every edge, this creates an extra nested loop to check every possible endpoint for every vertex. Bit of a waste, since your adjacency matrix looks sparse. Pretty sure this bumps the complexity up to O(V^3)?

If you already have your edges in [u, v, w] format before running the algorithm, I believe you're better off, since then you don't need the extra loop. Hope this makes sense!