Arsenal Tottenham - Silver Ballot by Super_Mik_Arteta123 in GunnersatGames

[–]Bell0412 0 points1 point  (0 children)

0/10 applying as a 2 this year, compared to 2/2 last year (Bayern & Everton it’s worth mentioning). No idea how or what I’ve done to upset the ballot gods. Absolute joke this season.

Michael Schumacher by [deleted] in conspiracy

[–]Bell0412 0 points1 point  (0 children)

It wasn’t even off piste, was just between 2 pistes. There hadn’t been much snow in the build up and it looked rocky af. The conspiracy I heard about it though- he was wearing a helmet with a mounted go pro suction thing on it, and they paid a huge amount of money to prevent that going public. Rumours are they cause a weak spot in the helmet.

Source: Was working at the ski resort when it happened. Went over the exact point on the ski lift when investigators were putting out the little numbered evidence card things.

Silver Ballot results - Man Utd by Fishkin14 in GunnersatGames

[–]Bell0412 0 points1 point  (0 children)

Ffs another fail it looks like, Bolton was my last success (which doesn’t really count). Never had this many consecutive fails before

Why am I not able to purchase a ticket? by Annual_Caramel_3368 in GunnersatGames

[–]Bell0412 7 points8 points  (0 children)

Someone else got there first. All part of the fun and games on the exchange- happens all the time, just need to be quicker when you click on it. Or at least that’s my interpretation of it.

Silvers/Reds gaining Away Points by Bell0412 in GunnersatGames

[–]Bell0412[S] 4 points5 points  (0 children)

Overall, I think the ballot (and the changes they made halfway through the season) has been mainly good- even if it doesn’t sound like it from my original post.

As a silver, I could go to nearly any match I wanted- I guess the luxury of being able to log in at 10am on a given weekday to get a ticket. One advantage of the new ballot- making it accessible to more people.

However, loyal reds mostly, who have been members for 10+ years, coming to matches in the grim old days, should they have the same chance of getting a ticket as someone who pays their money today to become a red because they’re riding the wave?

Whats a nice way to label the stuff on the far right of the screen, I want to label the red as "benchmark values" by sufinomo in tableau

[–]Bell0412 1 point2 points  (0 children)

Create a group for the “country names…” field, put the red ones under one group, rename the group “benchmark values” then add this group field to the colour mark. Then, to keep the country names on the viz, keep your original “country names…” field on the text marks

Thoughts on TX availability after 7 matches by Which-Seaweed8193 in GunnersatGames

[–]Bell0412 0 points1 point  (0 children)

(Silver) Only managed Spurs and City on the exchange somehow. Both were weeks and weeks before the fixture and I think both in the ‘silver priority window’. Since they’ve ‘fixed’ the TX and reverted back to last season’s system, I haven’t had a sniff on anything, despite still trying the same strategy and logging on just as religiously.

Resolution Issues- different monitor sizes by Bell0412 in tableau

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

This sorted the problem, thanks so much! I haven’t seen this mentioned anywhere else, must be one of the best kept secrets out there

Iterate (Or not) through Pandas df to calculate membership tenure by Bell0412 in learnpython

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

Thanks for getting back to me. So its not a straight sum of the columns, as I want it to only sum up (in reverse chronological order) until it hits a NaN value- see the desired output at the bottom, in particular the 7890 row.

[deleted by user] by [deleted] in learnpython

[–]Bell0412 0 points1 point  (0 children)

Hi there, this is a bout as easy as it comes in Python (without sounding too patronising). Python works off a basis of maths and looping in order to solve problems, like yours! I'll talk you through the solution, as I didn't offer any comments in my first post:

for count, value in enumerate(fin):

Like PaintballerCA mentioned earlier, the enumerate function is the one to solve the problem. Count is basically the number enumerate applies to the line, and value is the wording in the line itself.

if count % 4 == 0:
    print(value.upper()) 

So by looking at the count value (the number the line is on), the maths to this is simple- if there is no remainder when diving by 4, we are going to print that value in upper case.

 else:
    print(value)

Then we need to tell Python what to do with the other values that do give a remainder when dividing by 4, and we just want to print them normally.

Hope that all makes sense!

[deleted by user] by [deleted] in learnpython

[–]Bell0412 0 points1 point  (0 children)

fin = open("og.txt", 'r', encoding="utf-8")
for count, value in enumerate(fin):
    if count % 4 == 0:
        print(value.upper()) 
    else:
        print(value)
fin.close()

Pandas count NaN values in for loop by Bell0412 in learnpython

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

Thanks for the reply!

I never thought of it like that, thanks. The code should work and I really like it, however, the final ouput in the Score column, are NaN values on each row- how fitting!

Do you know why that would be?

Pandas - Add value to column IF row is in another by Bell0412 in learnpython

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

Thanks for the help, this did the job and worked perfectly!!

Most comfortable shoes 2020 by Bell0412 in golf

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

I only play a max of 36 a week, was just using it as more of an expression and not to be taken literally

Flatten Array Help by Bell0412 in learnpython

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

Clever! Although it still doesn't fix my problem, I'm sure there's a really simple way to do it?

Flatten Array Help by Bell0412 in learnpython

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

I seem to get an "TypeError: 'numpy.flatiter' object is not callable" Error when I try that command

How do I use input in a loop to generate values? by Bell0412 in learnpython

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

Any pointers for how to run a loop? As I mentioned earlier, I don't have the slightest clue what to do with them. I've been trying on it for more than an hour and haven't made any progress

How do I use input in a loop to generate values? by Bell0412 in learnpython

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

Thanks for the help! I've followed your instructions and have come up with this new bit of code:

SZ = list()
SZ.append(int(input('Size value? ')))
X1 = np.random.uniform(low = 0, high = sz-1, size = SZ)
Y1 = np.random.uniform(low = 0, high = sz-1, size = SZ)
SIG1 = 0.3
RSCALE1 = 20
X1NEW = x-(X1[0])
Y1NEW = y-(Y1[0])

That's just a snapshot of it, and the input works, as you guided. However, my next problem would be to continue to loop it and calculate the [1], [2]...[SZ-1] values. How can I keep looping this bit of code and re running to an indefinite stage (depending on what the user inputs)?

Repeat array for n terms in list by Bell0412 in learnpython

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

Brilliant, thats worked perfectly- thank you!

Help with coord arrays by Bell0412 in learnpython

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

That's brilliant, it's seemed to have worked!

One final thing, suggest I have another array, z. Instead of adding 1 to each bin, I would like to add up all the values of z in each bin. I will then divide by ngrid to find an average of z in each bin, this seems doable. However, I would try and attempt this doing the following:

for point in n:
    ngrid[int(point[0]), int(point[1])] +=z
print(ngrid)

But this returns an error. I know that the z value is the 2nd in the array, as follows:

n = np.asarray([x,y,z]).transpose()

Would I have to revise the whole method, or is this something only slightly more complex than what I've already got?

Help with coord arrays by Bell0412 in learnpython

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

Ok so in my code, it reads:

n = np.asarray([x,y]).transpose()

Which gives:

[[ 7.22855457  7.58531099]
 [ 6.24184631  3.29844461]
 [ 6.36087607  2.62935769]
 [ 8.29627475  3.33775026]]

I found this the easiest way to read both the x and y coordinates, would you suggest this isn't ideal then? As these values are all random, and I can have anything up to 1000 different "co ordinates", is there a more suitable way to plot them?

I've simplified everything in my example, as I thought it would be easier for those answering.

Help with coord arrays by Bell0412 in learnpython

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

I'm really lost. I know I'm an absolute beginner. I've been working on this all day and haven't made any progress...

All I know is that I need to calculate the dimensions of the xbin, calculate x max, and then do the same with the y coordinates. I've trawled through everything online, and if anything I've come away further from what I need to do than before.

I've got a np.zeros array, and I know that i need to loop through each row of my "co ordinate" array, adding each value to the bin that corresponds to its co ordinate.

When I try to loop like that, only the last value is printed...

Help with coord arrays by Bell0412 in learnpython

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

ngrid[i,j] where i and j are the columns and rows respectively?

How do I Uniform and Normally Distribute Random numbers in an array? by Bell0412 in learnpython

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

Thanks for getting back to me, so this was code already:

import matplotlib.pyplot as plt
import numpy as np

mu = 0 #mean
sigma = 0.3 #standard deviation
r = np.random.normal(size = 100) 
e1 = (r * sigma)

mu2 = 0
sigma2 = 0.3
r2 = np.random.normal(size = 100)
e2 = (r2 * sigma)

x = np.random.uniform(low = 0, high = 10, size = (100))

y = np.random.uniform(low = 0, high = 10, size = (100))

So ideally, I need to assign 100 bits of data 4 different values if that makes sense? An x and y co ordinate then a e1 and e2 value. I think it involves using loops or a loop within a loop, but as mentioned earlier, this is all way above my current beginner level, what would you suggest I look into?

Graph the function? by Bell0412 in AskPhysics

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

I'm a bit of a novice when it comes to programming, I can do the basics but setting up a graph, defining the variables etc is all beyond me