« first day (3736 days earlier)      last day (1205 days later) » 
00:00 - 23:0023:00 - 00:00

12:03 AM
:) I think I've just been overcome by my noob-athon 2 hour battle with git today so I have +3 sympathy
 
you just have to git gud
 
Start: <cracks fingers>. I've been through https://learngitbranching.js.org/. I got this.

Middle: "Hi all. I don't suppose anyone has 5 mins spare to help me with some github merges and check if I'm about to break stuff?" on Slack to my team. No reply.

End: Please kill me
I thought I should just confront my fears head-on. In the good news, I managed to preserve the code needed for deployment. In the not-so-good news, I lost some of my new code along the way. So much for getting over my git anxiety. Life is so much more simple when you're committing alone; IntelliJ is overwhelming on a 13" screen with merge issues
 
Did you check the reflog? It's hard to actually lose code.
 
Honestly, I was totally lost. I clicked buttons and stuff happened. It's the first step in gitting gud, though
 
you should probably use git from the command line
and of course never panic :P
 
12:15 AM
I tried that, but it threw issues and then the IntelliJ interface had a nice "resolve" button. I couldn't not click that one
 
lol
 
It would have been a bit easier if the other team had told me beforehand that they had started a new branch on my repo several days before I actually realised, and we'd have at least been developing in the same direction. Oh well, it's fixed
 
1:13 AM
morning cabbage
 
1:37 AM
Man, I just discovered Window's Math Input Panel and got excited for a second before I realized that the magicians at Microsoft somehow managed to screw it up. The OCR is solid, but there's no way to copy the formula, the "insert" button straight up doesn't work, and if you try to close the app, it minimizes into your system tray instead -.-
 
classic microsoft
I've had desktop apps minimize on "x" before. They were MS skype and MS Teams.
also signature malware helpful autostart by default
 
Pretty sure Skype already did that even before Microsoft bought it though
 
Ha, I didn't even remember at first that they didn't start out as MS. That's when the linux version started sucking if I recall correctly. But it's not so bad these days, probably exactly as bad as the windows version.
Or perhaps it's just that I don't use skype. Teams I do use, and I'm aware that the linux desktop is nerfed compared to the windows one.
 
Speaking of math, does anyone know an easy way to maximize the value of a formula in an equation system? I'm trying to figure out how to optimally distribute my stat points in a game, so I have stat_pool = crit_rate/1 + crit_multi/2 and dmg = crit_rate * crit_multi. I know the result is crit_rate = crit_multi / 2, but I can't figure out how to make Wolfram or any other program calculate it for me
(i.e. the optimal damage output is achieved if my crit_rate:crit_multi ratio is 1:2)
 
Nonlinear equation? Uh-oh.
 
1:49 AM
That one's actually easy to do by hand, but its big brother is giving me trouble, which is why I want to pass on the work to Wolfram
 
my instinct would be to throw Lagrange multipliers at it, i.e. looking for the maximum of the function crit_rate * crit_multi with the constraint crit_rate/1 + crit_multi/2 - stat_pool = 0
But that's just my calculus bias. There's probably an operations research approach to this that even gives you integers.
I guess you just need some kind of constrained optimization solver
 
Okay, after much research, I've decided to stop worrying about it :D
 
2:09 AM
wise :P
 
 
2 hours later…
4:12 AM
Hi everyone
This is my first time in the chat
 
you cant ask help with questions less than 48 hours old
 
Woah really
Is that written somewhere. My apologies
 
cbg
 
that and the reason is explained in the rules, but that doesnt mean no one will help you
 
I see. I just read the rules. Sorry about that.
By the way is there a tensorflow room, similar to this room?
 
4:21 AM
Hasn't this question already been asked?
 
which one?
The one regarding a tensorflow room? I have not seen any.
There was one question similar to this on S.O, but it points to a site which does not function.
 
Was this the one with the broken link?
 
Sorr, I didn't read your full logs so I might be misunderstanding the question.
 
No problems
Oh man, I misunderstood your question...haha
Yes, I have seen this link and read it thoroughly
It does not help me at all
In fact the answerer is not sure of why certain things are happening
 
4:28 AM
That's the extent of my helpfulness
 
haha
do you think there will be more users trickling in at some point of time?
 
probably in 7 hours if trends are accurate
 
 
2 hours later…
sid
7:01 AM
I've a character 'a' that I want to bitwise and with 0xF0, how do I do this with python3 ?
 
7:24 AM
Hi
 
7:37 AM
@sid ord gets the ascii value of a character, so ord('a') & 0xF0 seems to do the job.
 
That's not a question I expected to hear from a senior software developer ._. Arne, you may be underpaid
 
can someone please help me with this thread:
superuser.com/questions/1615679/…
 
Why did you ask that on SuperUser?
 
I saw some python questions there as well... its not the right place?
 
Not really. Programming questions should go on SO
 
7:47 AM
ok. The thing is I'm not able to raise question here :)...
 
Hi. anyone here professional in python ??
 
@Aran-Fey salary negotiations are coming up next week, so I just might quote you on that endorsement =)
 
"Why do you think you deserve this raise?"
"A guy on the internet said I may be underpaid"
"Good enough for me"
 
sounds good to me
may ord stand for "ordentlich mehr verdienen" 🙏
@Mina always scary to say "yes" to such a question, but I do work in a job where I mainly use python, soo.. what'd you wanna know?
 
sid
Thanks Arne!
 
7:59 AM
@Arne hahaha
Now I need to google what it actually stands for though...
 
@Arne Okay, first tnx for your reply.
@Arne I have problem for creating a hex calculator using python. can anyone help me?
 
help works best with specific and constrained questions
 
Not unless you're more specific about your problem
I'm not a professional python programmer, so I'll go try and get more sleep. Rbrb
 
rbrb Mr. Fey
 
rbrb, see you =)
@Mina just in case it isn't clear, "can someone help me with or show me how to do X" is not something actionable. Something like "while trying to do X I got stock trying to do Y through the means Z_0, Z_1, and Z_2" is much more useful
 
8:36 AM
@Arne Ok Tnx.
 
 
1 hour later…
10:03 AM
Cbg All. @AndrasDeak, Laurel, yeah I had my doubts about posting it on this chat- my apologies. I will link the code the next time. 👌
@Marco, you are welcome.
 
@roganjosh If you're clicking buttons you're using Github (or GitLab), not git. What's the issue you're having?
 
Next message sounded like IDE git GUI
 
IntelliJ has full git integration, so the buttons I was clicking was in IntelliJ which builds the commits for me. If you commit on the command line, it also pops up in the IDE
It "helps" with dealing with merge conflicts. But the amount of windows thrown up on my screen to try and review Java code made it pretty overwhelming on the screen. It's fixed now; I'm not great with git so it was just the fun of being presented with conflicts on 2 days of commits when I didn't really know what the other person was changing to get it ready for deployment
 
Battling commits, eh? What jolly fun!
 
When I have some free time (heh) I need to build a repo and break stuff to get over my fears. It didn't exactly go like it does in the tutorials... :P
 
10:38 AM
@roganjosh again: use the command line :P
 
Doesn't mean I'm not still scared of exploding everything :P
In the meantime, I'm currently trying to write a docstring explaining what WORST_BEST does as a parameter. I think the library could have done a better job on naming that one :/
Happily, it's paired with the WORST_REGRET parameter too
 
10:59 AM
Hi
I am trying to put alpha mask on a transparent image using Pillow. But what happens is the current transparency changes to black and the script puts the mask on that image.
is there any way to prevent this?
 
Oof. I just duckduckgo'd "pillow chops", and in retrospect, I don't know why I expected to get any relevant search results for that one
@BlackThunder Sounds to me like you need ImageChops.multiply
 
multiply is just some color effects I guess, I could give it a try tho
 
11:18 AM
I suspect how you're "trying to put alpha mask on transparent image" is a not all too irrelevant aspect of the problem.
 
the image is not completely transparent. it has some transparent parts. I am using putalpha to put the mask
fixed it
instead of pasting mask directly, I created a transparent image, and pasted my original image on it with mask. new_bg.paste(img, (0, 0), mask)
still surprised how it worked 😂
 
11:43 AM
cbg
 
good morning everyone. I'm trying to run a project that was done locally on a VPS server, but I'm having this error:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 342, in _addon_details
    with open(os.path.join(addon_path, 'install.rdf'), 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpkjaqdz42.anticaptcha-plugin_v0.50.xpi/install.rdf'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 4, in <module>
    import crawler3
What to do to make it work?
 
 
1 hour later…
1:19 PM
Someone enquired yesterday about dynamic creation of tests under pytest (or rather this is my answer to how to do an equivalent thing). This article suggests a way to do it with metaclasses.
The advantage being that the failure of one test case does not inhibit the others from being run.
Man, glassfrog has the craziest API ... everything seems extraordinarily indirect.
 
Hi
 
cbg
 
@holdenweb that just sounds like parametrize in complicated. maybe he really dislikes pytest?
 
@holdenweb it's from 2016 yet i can't understand it completely
 
I once had a teammate who implemented an argument parser by first writing a metaclass. maintaining his code was a good reminder why "Simple is better than complex" matters
 
1:29 PM
@Arne The reason given was "I can't compute the parameters outside the test." I asked for an explanation but AFAIK a response was never forthcoming.
I wrote quite a lot of a recursive descent parser for Google Docs before the penny dropped that these were machine-created documents whose syntax was always valid :)
 
hmm, parametrize accepts any iterable, it doesn't need to be a literal container. maybe a test that depends on the results of former tests? I sure hope something like that is never a good idea.
@holdenweb I hope it was fun, at least? ^^
 
1:49 PM
Oh sure. I got to two meta-levels on parsing classes. Great fun. And I may at some stage turn (some of) the code into an article. I haven't been doing enough writing lately.
 
cbg guys, is there anyway to get the database name after loading it in? like con.connect('hello.db') and later someway to get 'hello.db' or the filename or path?
 
why not connect using a path stored as a string?
something like db_path = '/path/to/hello.db';con.connect(db_path)
 
I'm not sure about that, because I saw this in a question and was wondering if con had a method to get the database name too.
@python_user I am aware of this but I dont think the OP is looking for this, Ill try telling this too :p
 
I am not sure about that, getting a db name is different than the db file name
 
I don't believe that's part of the DBAPI, so the how-to is likely to vary between different DB drivers.
 
2:00 PM
What bout SQLite? I mean there should be a method for this right? Can't believe there is nothing, I've searched the docs for some.
 
every db in a sqlite is a file, I have never used queries in sqlite where I wanted to specify the db name
this is as far as my sql / sqlite knowledge goes :D
 
That is true, I am not sure about how OP instantiates the class, maybe take a look here
 
2:16 PM
how do I get rows in that program? do I need to add them in @CoolCloud
 
2:27 PM
@python_user I have no idea :p
 
I am just gonna manually enter them :/ using queries
 
Yea prolly, OP has given nothing in. You are testing the code out? I wouldnt do that much of work out here :p
 
I am just doing this to see how "aliens" fit into all of this
 
My thought was that too, how did the alien1 and 2 appear there
 
half my problems with Tkinter is I can never get the imports correct
 
2:32 PM
python 3.x is tkinter and 2.x is Tkinter , if you are asking about that
 
yeah those things
 
Here the OP has used import tkinter as tk.
 
Hello everyone. I'd like to ask, how can I split a string in python, only if the target character is followed by a particular character?
 
@John An example?
 
I could use this answer here, but I don't know the regex symbols
2
Q: Split a string on a certain character only if it doesn't follow directly after another particular character

gdogg371I have the following code line which is splitting the string data2 up into a list upon instances of a white space: string_list = data2.split() However in some of my data there are dates in the format "28, Dec". Here the above code is splitting on the white space between the date and the month ...

{one,two},{three,four} I would like to split by comma only if before that comma there is the "}" char
 
2:39 PM
Is that a tuple? or a string?
 
so above would become ['{one,two}', '{three,four}']
string
 
So what is the expected output
 
input: {one,two},{three,four} output: ['{one,two}', '{three,four}']
 
@John re.split(r'(?<=\}),', '{one,two},{three,four}')
 
I thought regex was out of options.
 
2:42 PM
my bad
 
(?<=...) is a positive lookbehind docs.python.org/3/library/re.html#regular-expression-syntax, and you put \} there to get a literal brace
@python_user that didn't split anything
@CoolCloud no, they just don't know regex
 
wrong paste :p
 
thank you I appreciate it
 
@John You could also write a function that does this.
@AndrasDeak Ma bad.
 
late morning cabbages, folks
 
2:50 PM
@CoolCloud that is not terribly helpful
 
@AndrasDeak FYI I am working on it.
 
Hi everyone!
 
That's fine. But "write a function that does this" amounts to "you can write code that does this".
@desert_ranger hello
 
Is there anyone in the room who is decent with Tensorflow?
I am stuck on a problem regarding TF 1.0
It would have been really easy with eager execution
But 1.0 is tripping me up
 
AAB
Hi all,
say I have a document as follows {pid: 1, history:[1,2,3,4]}
 
2:54 PM
@AAB Hello!
By the way, here is my question - stackoverflow.com/questions/65600808/…
 
AAB
in pymongo when I run a query I get the document, the dictionary has an array and I iterate over the same.
@desert_ranger Hi
in case of sqlite3 I will have the following 2 tables/relations one with pid and another with history
to get the data I will run an inner join
how do I get the history info as an array?
the only way I see is I run another query on the table
How do I get the output as
name | mob_number, mob_number
 
@AndrasDeak Out of luck, cant find a dynamic answer to that question :(
Non dynamically, this is what I got:
a = '{one,two},{three,four}'
lst = a.split(',')
first = lst[0] + ',' + lst[1]
second = lst[2] + ',' + lst[3]

print([first,second])
 
3:25 PM
@desert_ranger Please see our room rules. Fresh questions from main should not be posted here unless you haven't gotten a useful response after 48 hours. Thanks.
 
@MattDMo
@MattDMo Thank you for the information
Technically, it has been around 30 hours, I just kept editing the question
 
Hey folks, if a chat post merely needs removal I would suggest having a room owner move the post to Trash. Chat flags aren't a great tool, but spam/rude flags aren't the way to go
 
As of now, it seems like it is buried deep somewhere and nobody has even commented on it :)
 
@desert_ranger After 2 days you can always bounty it. Will get lots of attention then
 
@Machavity Thanks !!
 
3:36 PM
Hi, @Andras Deak.
 
AAB
4:08 PM
@Machavity you play team fortress2?
 
@AAB I did for a while
 
@Machavity hey, thanks. I don't think any of us were here. Sorry for bothering you guys :)
 
@AndrasDeak Sok. Second time in a couple of days. Just wanted to make a PSA about it. I mean, we do take reports of snakes in the room seriously ;)
BTW, second time refers to another room
 
Huh. I didn't know about the ah, OK :)
We almost never get false flags here, so if it were recurring we'd have to educate a new user.
@Machavity darned snakes in this darned room :P
 
4:25 PM
`
fav_lang = {
'tyler': 'Python',
'tom': 'C',
'jake': 'Ruby',
}

friends = ['tom', 'jake']

for name in fav_lang:
print(f"Hi {name.title()}.")

if name in friends:
lang = fav_lang[name].title()
print(f"\t{name.title()}, I see you love {lang}!")
`

Hi everyone, I had a question about the code above. I don't fully understand how the lang variable understands to read Python,C,Ruby instead of the first key, which is tyler, tom, jake. How does the code know I want the 2nd value of the dictionary and not the first?
 
fav_lang[name] gets the language associated with the given name
 
So if I understand this correct. If the name is in the friends list, then it will produce the value in the dictionary associated to the friend?
 
Yeah
 
thank you!
 
@TylerEast please see our code formatting guide to chat and practice in the sandbox if neccessary
 
AAB
5:03 PM
@Machavity nice, anyother games you play btw sorry if you find it creepy or something, staying at home with nothing new is just making me weird :/
 
5:53 PM
Hello, how do I create a 3D scatter plot with different colors for each axis (x, y z) values?
 
@Marco I don't understand what you're asking
Do you want to colour the axes, like x/y/z axis red/blue/green, or do you want to colour data points?
 
colour data points
for example, shades of blue for x axis points, shades of green for y axis points and shades of red for z axis points
shades I mean because will vary according to their values
so will exist a color map for each axis I think
 
6:11 PM
why have the axis if you have the colors? Usually you use colors for extra dimensions besides x,y,z
 
@Hakaishin could be without the axis too, I think
 
But like, how are you gonna represent the points? They atleast need to live in 2d space. I mean they dont HAVE to, but what? I dont get where you are going with this
 
Hi
 
stackoverflow.com/q/65616644 not a programming problem
 
@Hakaishin with 3 color maps, one for each of the 3 axes
 
6:15 PM
I need help regards lambda for list
 
@Marco I dont get it, you are gonna have to be more specific
 
@Hakaishin I think I want something like this: encrypted-tbn0.gstatic.com/…
@AndrasDeak any idea or I need to explain more?
 
6:50 PM
@Marco OK, so I feared you might say that. Each point has x, y and z coordinates, but only a single colour. You can't colour a data point according to each axis. The pictures you linked use an independent component (say, w) to colour each point in a given way. If this w component happens to be related to the x, y or z coordinates it's just a coincidence.
Does this make sense to you?
 
@Marco, you can check this- it may assist a bit.
 
@Marco specifically see matplotlib.org/3.3.3/gallery/mplot3d/scatter3d.html. But it's very hard to understand depth information on a 3d scatter plot
Consider using a different kind of representation.
 
should I use List comprehension?
 
@arielma sorry, that's also not clear at all
 
I have list of objects
each object has attribute of Name, which contains string
 
6:55 PM
Yes, use a list comprehension ;)
 
I need to have new list which contains only the object which start with the text TEST in the name field
how to use it? I tried to read but its not so clear
 
@arielma [obj for obj in objects if obj.name.startswith('TEST')]
 
@AndrasDeak wow that plot is so unreadable :D 3d plots are terrible for pictures, they really have to be viewed in something that you can rotate them. Then they do add value
 
brief cbg
 
@Hakaishin yeah, Marco's first linked plot (basically a 3d stem plot) is a lot better in this regard. It anchors each point in 2d.
 
7:07 PM
@AndrasDeak very cool :) tnx
 
Cbg Jon.
 
yeah, that's actually a neat way to do it
 
@arielma you should pick it apart to understand what's going on. List comps are great for such simple use cases. They shouldn't be magic.
 
2021 is off to a fantastic start it seems :p
 
😃
Indeed.
 
7:18 PM
@AndrasDeak, let's say I have a series on apples, another on pineapples and another on strawberries. I want to assign apples to the X axis, pineapples to the Y axis and strawberries to the Z axis, in addition I want the points related to the apples to be plotted in red, the points related to the pineapples to be plotted in green and the relative points strawberries are plotted in blue.
For each of the colors, I would like to have a color map to define the values of each point, according to the intensity of the color. Can I do that?
 
@Marco I don't understand "assign apples to the X axis". Otherwise yes, choosing a colour based on fruit type is perfectly doable.
 
@Jon, how are you doing?
 
@Destroyer-byte same as usual - how's yourself?
 
@AndrasDeak forget this assignment part to the axis, so.
 
Ah that's good. I am good thanks. I'm waiting for my classes to resume.
It starts on the 18th Jan.
 
7:21 PM
@Marco you could even plot the three kinds of fruits in 3 separate scatter3d calls with a fixed colour
 
I get bored without work to do 😂
 
Well... fingers crossed on that one... schedules these days seem to be somewhat fluid
 
Yeahh Indeed.
For the time being I am working on a few projects for improving my python skills.
A few days ago I finished my first Tkinter project.
It was a Mad Libs Generator.
 
Tkinter... something I've managed to avoid mostly successfully for a very long time now :)
 
7:28 PM
@AndrasDeak thanks, I will try this.
 
It is quite nice when all the gui components work together.
 
@Destroyer-byte thanks for the help, I had already taken a look at the site you visited but it didn't qualify me very much.
 
Sure Marco, you are welcome. Ah I see, my apologies.
 
7:42 PM
@AndrasDeak @Destroyer-byte this plot seems ok to you? imgur.com/rwx2Y0n
 
nope
all your z values are probably 0, or otherwise you set wrong z limits manually
 
@Marco, nope it does not look like a common plot to come across.
 
8:27 PM
@Marco funny thing: 3d stem plots were merged into matplotlib 14 days ago
See github.com/matplotlib/matplotlib/pull/18310/files for the changes involved. If you're willing to install matplotlib's master branch you can use it.
alternatively you can copy over the implementation into your own codebase until the new feature gets released
 
9:18 PM
Hi
 
@arielma hello. Have you figured out how that list comp works?
 
yes indeed. tnx
I have other q :)
 
9:35 PM
hi folks! :)
recently I have written an answer, this one:
-2
A: How to merge every two lines of a text file into a single string in Python?

zabopimport pandas as pd You can also use Pandas, in addition to pure Python (which might be more advisable). You can read in the txt to a pandas dataframe: df=pd.read_csv('example.txt',sep='*',header=None) sep should be a string you don't use in the text, so you have only one column in the resulti...

it become downvoted quite a bit, in the comments it is claimed that it is overcomplicated and confusing
 
well, using pandas as a text parser is usually frowned upon
 
@AndrasDeak yes, the values are really close to 0
 
while I admit that this is a non-standard way of doing what the OP wanted to do, and there are better ways, I find that this is interesting as well
@AndrasDeak oh ok
haven't heard about this aspect of it yet :D
should I delete it?
or maybe better question
 
Same way that one has to have a very good reason to give a numpy answer to a non-numpy question. These libraries are so huge that pulling them in for a single task is usually pointless, even harmful.
 
why is it frown upon?
 
9:37 PM
@zabop that's up to you, I haven't read the answer in detail (or even superficially)
 
@AndrasDeak (alright, thanks)
@AndrasDeak I see, thanks!
 
You might have gotten downvotes for different reasons, though. As I said I haven't looked.
 
It's really a very overcomplicated way of doing something that can be done with a loop, a call to next, and a + (and an if to account for an uneven number of lines in the file)
 
alright, thanks both of you :)
 
OK, yeah, that's definitely overkill. Think "how do I carve toothpicks?", and the answer is "first take a chainsaw, find a tree and start chopping until you end up with a toothpick"
 
9:41 PM
probably should be less in love with Pandas
@AndrasDeak xD
 
Not using tools is also something that one has to learn. Seeing nails everywhere and all that.
 
Deleted it is now :D
 
@AndrasDeak these z values close to 0 are relative to the variance values array of my dataset.
 
@zabop the little ray of sunshine is that the person who commented that, wrote their own answer in Python 2, which is not only obsolete but the question was explicitly tagged at Python 3.x. That's not to say your answer wasn't over-engineered, but theirs is under-engineered
 
9:51 PM
@AndrasDeak that I called "apple" on the graph that I showed you
 
@roganjosh That answer also only works for a file with exactly 3 or exactly 4 lines
 
Oh, I just started throwing fruit onto the stage when I saw the print statement. I didn't actually read it :P
(I didn't actually downvote on that basis. I am too tired for main today I think; I do actually read before downvoting :P)
 
@Aran-Fey MVP
 
@roganjosh that's fair enough tbh ;D
 
@Marco OK. I just noted that your z limits seem arbitrary. So either it's because your z values are exactly all zero (in which case there's an automatic z limit), or you set z limits too large. If you set manual z limits you should consider removing them and let pyplot compute meaningful limits.
 
9:56 PM
@AndrasDeak the limits are all automatic.
By now.
It's ok to leave them automatic?
 
Yes, but you should check if your z values are all exactly 0, and whether that's something you expect. When the z values are not all exactly 0 I'd expect tighter z limits, causing your points to spread out along the z axis.
 
Yes, they are all really close to 0.
 
it's just that "automatic limits are nonsense" smells like a bug
@Marco how close are we talking? 1e-16?
What is abs(z_data).max()?
(assuming your data are numpy arrays)
 
@AndrasDeak 0.0827829230967037
 
@AndrasDeak Most Valuable Programmer?
 
10:03 PM
OK, so your plot should not look like that unless you're calling something like ax.set_zlim.
@roganjosh minimal viable product :P monkeyuser.com/2019/mvp
 
I know that :P I've not had a day of feeling noobish so I'm back to my normal dry self
 
@Marco do you see your z limits in the figure? It ranges from -0.05 to 0.05. This should not be the case. Furthermore, if your largest z data is 0.08 then you probably have other non-zero values. 0.08 would lie outside the axes bounds.
it's just really suspicious to me
And at this point I'll stop debugging code I can't see.
 
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xvar, yvar, c='red', label = 'Apple')
ax.scatter(xassim, yassim, c='blue', label = 'Pineapple')
ax.scatter(xcurt, ycurt, c='green', label = 'Strawberry')
ax.legend()
plt.show()
My plot code.

The xvar and yvar are relative to the time series that is being plotted in the z axis.
 
Where do you think you're passing the z data?
 
oops
 
10:10 PM
and then ask yourself why ax.scatter complains when you pass the z data ;)
 
I have pytest file with function
any idea how I can pass it param from jenkinsFile?
 
all these ax.scatter are relative to the x axis, right?
 
@Marco I don't understand the question
 
Oh no, my fault
I will adjust this
 
`
import dataikuapi
import pytest

def setup_list():
    client = dataikuapi.DSSClient("https://XXXX", "YYYYYY")
    client._session.verify = False
    project = client.get_project("ZZZZZZZZZ")
    scenarios = project.list_scenarios()
    scenarios_filter = [obj for obj in scenarios if obj["name"].startswith("TEST")]
    return scenarios_filter

@pytest.mark.parametrize("scenario", setup_list())
def test_scenario_run(scenario, params):
    client = dataikuapi.DSSClient(params['host'], params['api'])
the params gets its value from the JenkinsFile, but how can I use it for the setup_list function?
currently it's working only hard coded
 
10:18 PM
@A.Man are you also arielma?
 
Y :)
 
I was just thinking exactly that. In either case, I think it's a stretch for us to be able to understand the full context of this
 
I just connected from other machine
so I can copy paste the code
 
10:29 PM
@AndrasDeak is it clear enough? :)
 
It's clear that you're arielma. But I barely know anything about pytest.
@Marco, have I not pointed you to the formatting guide yet?
 
@AndrasDeak
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
n = 1024
for i in xvar:
    ax.scatter(apple, strawberry, pineaple)
    i = i + 1
Seems ok now, how can I handle with the legend and the colors for the apple, strawberry and pineaple?
 
I'm absolutely sure that it's not "ok"
also if you have for i in xvar then the final i = i + 1 does nothing
 
Ok, can you help me please?
 
Hold on, it might be correct. What are apple, strawberry and pineapple, respectively?
I liked your previous version with meaningful names (variance, kurtosis etc.) more
 
10:42 PM
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
n = 1024
for i in n:
    ax.scatter(variance, skewness, kurtosis)
 
OK, but that's not what I meant :)
34 mins ago, by Marco
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xvar, yvar, c='red', label = 'Apple')
ax.scatter(xassim, yassim, c='blue', label = 'Pineapple')
ax.scatter(xcurt, ycurt, c='green', label = 'Strawberry')
ax.legend()
plt.show()
Here you had three pairs of data points!
That makes sense to me. Each pair corresponds to a dataset.
In this setup you'd just have to add zvar, zassim, zcurt and it will work, complete with labels.
But now if you have one variable per dataset and you're passing those into a single scatter call then I have no idea what's going on.
 
it's because I thought I did everything wrong in the previous code.
but... I dont't know what to put in zvar, zassim and zurt...
 
No, it was almost correct, but you forgot to pass the z data. I just didn't say this because I was also confused, and I thought you were also using the wrong function (I thought that ax.scatter was different from ax.scatter3d, but these are actually aliases)
 
I have 3 time series, with x and y values
 
@Marco well you want to plot 3d data, yes? So presumably you have 3 coordinates for each data point.
@Marco so why do you want to plot this in 3d? X and y are width and depth information. What is the "height"?
You can look at a 3d plot as samples from a function f(x, y). In this setup x and y are independent variables, and the value of the function gives the height above point (x, y). Can you apply this to your problem?
 
10:47 PM
I think I know now what to put in z values
 
great!
 
00:00 - 23:0023:00 - 00:00

« first day (3736 days earlier)      last day (1205 days later) »