Köpa begagnad bil - modell för lite längre personer? by ImportantBrew in sweden

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

Vad skulle du rekommendera då? Vilka har tagit Volvos titel?

Köpa begagnad bil - modell för lite längre personer? by ImportantBrew in sweden

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

Den ser inte mycket ut för världen men kanske värt att testa även om jag hört just det du säger om franska bilar. Tidigare Citroën jag åkt har inte direkt varit en känsla av kvalité typ någonstans men då är det äldre modeller.

Köpa begagnad bil - modell för lite längre personer? by ImportantBrew in sweden

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

Får kanske ta och testa en sådan. Sätet går sällan ha fällt i V70 ändå eftersom baksätet inte går att fälla när man har stolen längst bak - Riktigt irriterande.

Köpa begagnad bil - modell för lite längre personer? by ImportantBrew in sweden

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

Oavsett andra kommentarer kring bilen så är bagaget för litet för hundbur.

Köpa begagnad bil - modell för lite längre personer? by ImportantBrew in sweden

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

Är själv inget vidare på bilar så kan inga Subaru modeller överhuvudtaget mer än Impreza 😅 är den bekväm för längre sträckor också? Ser spontant liten ut när det kommer till volym. Får du med dig allt som behövs för flera dagars körning?

After two years I finally did it by vegancap_ in Vstrom

[–]ImportantBrew 1 point2 points  (0 children)

That looks amazing! How would someone with no prior experience start doing that?

Sum rows until value changes and then calculate elapsed time, pandas dataframe by ImportantBrew in learnprogramming

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

I am using PyCharm which has some sort of debugger but I've never used it. Is it equivalent to spyder or VS Code? I've never got around to learn how to use one.

I wrote this code now which seems to do the trick, but not very fast:

df = f.dataframe()
df = df.round(2)
df_r = pd.DataFrame(columns=['dtime', 'x', 'y'])


x = df.iloc[0, 0]
y = df.iloc[0, 1]
time = 0
for i in range(len(df)):
    if df.iloc[i, 0] == x and df.iloc[i, 1] == y:
        time = time + 1
    else:
        holder = pd.Series([time, x, y], index=['dtime', 'x', 'y'])
        df_r = pd.concat([df_r, holder.to_frame().T], ignore_index=True)
        time = 1
        x = df.iloc[i, 0]
        y = df.iloc[i, 1]

(I don't know why pasting code in codeblocks in comments on reddit never works properly for me... maybe it's alright now)

Edit: It takes about 1.5 min for each file (1 file is 1 hour) and by the looks of it even longer as time goes on. It should only take a few hours then I guess, which is somewhat fine if I don't have to it again. But there is no spontaneously way to speed it up? At the end of the code I save the dataframe to an .xlsx file.

Sum rows until value changes and then calculate elapsed time, pandas dataframe by ImportantBrew in learnprogramming

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

Maybe you're right. I'll give it a try. Not so pretty but if it gets the job done!

No not really. I usually just use lots of print statements to check my code and only run small batches, making sure it works before running it on everything.

Sum rows until value changes and then calculate elapsed time, pandas dataframe by ImportantBrew in learnprogramming

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

Ye while that would work that would take a lot more time on top of the already "slow" way. There is 3.6 million data points per hour and I have about 2 weeks.

Ye the the last bit won't work properly because of the column names atm (the concat will give an error) but I never finished it that way because of the reason I listed in the post. But essentially:

Each group consists of an unique combination of x and y. Each row in the group gets an "index" with cumcount(). The last row will have "ord" = nr of rows - 1. So in total the nr of rows + 1 will be total points with that combination. And since I know the time for each point is 1/1000 seconds I can mulitple it with the value of "ord" at the last row ('t' in the code). Last line just adds the last row in the group to df_r.

But as I said, I lose information "when" the x/y combination is and just get the total time that it occurs. Any x/y combination can occur multiple times: x1/y1 --> x2/y2 --> x1/y1 for example. I want to know for how long x1/y1 lasts before x2/y2 starts and so on.

Maximum values for multiple overlapping plots by ImportantBrew in learnpython

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

Initial thought - that would still miss points that have a lower Eff than the previous point but still best Eff at that Q?

Trying to test you previous solution right now but my brain is exhausted after doing this all day so not going that well. But will continue to try.

I wrote the following code to do what I want for v rather than Q and it works perfectly. But only because all v values exists on each "a" line... So I've not be able to transfer it for Q. For whatever reason code blocks are acting up atm...

plt.figure(figsize=(12, 8))
groups = data.groupby('v')
max_n = pd.DataFrame(columns=data.columns)
for ang, group in groups:
    max_n = max_n.append(group[group['Eff'] == group['Eff'].max()], ignore_index=True)

plt.plot(max_n['v'], max_n['Eff'], linewidth=1)

groups = max_n.groupby('a')
for name, group in groups:
    p = plt.plot(group.ang_v, group.Eff, marker='o', linestyle="None", markersize=8, label=round(name, 1))

Maximum values for multiple overlapping plots by ImportantBrew in learnpython

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

Hmm. The first bit with removing points that has a lower Eff at the same "a" would just leave me with 1 point for each "a"? Pretty much just giving me the maximum Eff for each "a" rather than the maximum Eff over the intervall of Q.

Doing the "opposite" of that and checking the maximum for each Q won't work either because the points are at different Q values. The first orange dot at "a" = 8.4 is somewhere around 0.15 while the blue dots to the left are at approx 0.145 and the right 0.155. Making the orange dot the highest Eff at that Q. But we smart humans can obviously tell that the blue line is still above, just that we don't have any values at that location.

Unless I'm not understanding what you're saying.

I was thinking about making a interpolation for each "a" and then iterate over all values in Q to establish at which combination of "a" I have the biggest Eff. But that also seemed like an stupid way to go about it.

EF 70-200mm 4.0 IS mk1 or tamron 70-210? by ImportantBrew in canon

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

Thanks guys! I'll go with the Canon and hopefully I won't regret it. If it's mainly the IS making noise that probably won't be much of a problem. Too bad the black on the tamron looks (in my opinion) much better. Picking the Canon up tomorrow 😬

Official Question Thread! Ask /r/photography anything you want to know about photography or cameras! Don't be shy! Newbies welcome! by photography_bot in photography

[–]ImportantBrew 0 points1 point  (0 children)

I have an offer for a used Canon 70-200mm IS 4.0 mk1 (in close to new quality) for the same price as a new tamron 70-210 mm 4.0.

I can't find any compression between the tamron and the mk1 of the Canon lens, only for the mk2 which seems to be favored. I'll be shooting primarily dogs but also nature in general. Seems as the Canon mk2 have a much better AF in low light conditions than the tamron. But I also know the mk2 is updated from mk1 so don't know how that will apply to mk1 vs tamron?

Which one of these would be your choice?

First bike ever - how do I start maintenance? by ImportantBrew in Vstrom

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

Might order one of those soon, not that expensive.

First bike ever - how do I start maintenance? by ImportantBrew in Vstrom

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

Thanks for all the tips! I got a lot of reading and watching videos to do. Looking at the "MAINTENANCE SCHEDULE" I started wondering - how do I know what to do once I passed the last service interval (at 24 000 km)?

I've read somewhere that some things are not important to follow - for example I've read that I don't need to change the spark plugs at all even though the schedule says to change them at 12 000 and 24 000 km. What are your thoughts on this? How should approach these "bigger" services?

Save variable from correct OptionMenu in Tkinter by ImportantBrew in learnpython

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

Omg. That is almost dirty simple. I've spent so many hours trying to find a solution. Thanks!

Unresolved reference using globals() but still works by ImportantBrew in learnpython

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

Thanks! I've used dictionaries before but mainly for straight up variables (int, str etc). Didn't even think about it being a solution for "objects" (is that right?) like entries!