« first day (3063 days earlier)      last day (2110 days later) » 

00:00
Ah, no, right, those mailer tests. Unittest as run by nose or pytest. Apologies. (Korcu, or "that thing she's jibbering on about". ;)
My tests are pytest-driven.
@roganjosh The link I was referring to was definitely not unittest.
I just linked to the code base they used
@amcgregor Yes, I was referring to the account_story.py
Heh. :roganjosh has steered you towards chaos and confusion!: :willpower critical fail:
@Code-Apprentice oh, I see your point, sorry. I failed to follow the specific convo link.
00:12
@Aran-Fey thanks, appreciate the vote of confidence :)
@amcgregor chaotic evil, what can I say?
My chaotic neutral self loves you regardless of your dietary choices.
Isn't there a testing library where you write your tests in docstrings using syntax that looks like the python repl?
doctest
yah, that's probably what I'm thinking of
Is it used for unit testing?
00:21
Of isolated units, yes. Much of the stdlib is tested that way, AFIK, or was.
Basically, a mechanism to tightly couple simple, short tests, in REPL syntax, directly to the documentation (module/class/function "docstring"), which should include samples anyway, right?
Yeah, that's the same impression I got
It has a looser syntax for matching lists and things, thus my re-use in korcu; it's briefer, despite the leading GTs and dots and things. ;P
Those are clearly one-and-a-half right shifts
 
1 hour later…
01:29
Isn't coldspeed a mod anymore?
Seems I've met all the moderators but
Travis J
 
5 hours later…
06:55
@Simon don't be silly. Here are the mods stackoverflow.com/users?tab=moderators
People nominating for mod are typically not mods.
 
2 hours later…
09:14
cbg
09:34
cbg
 
2 hours later…
11:07
hi guys, anyone can help with PCA in python?
Hello. Ask your question and you'll see if anyone can and is willing to help.
I m trying to use PCA for cluster but i don't have a target in my dataset, and i dont know how create this one (if need)
what do you mean by "target"?
like this examples scikit-learn.org/stable/datasets/index.html have a "target_name" attribute
ad example in Iris dataset have a target like 3 plants and when cluster automatically divided this plants in tre different color and points
in this way
the whole point of a pca is to see and reduce variables that contribute towards a "target" though.
what do you expect to get out of a so-called pca without a target?
11:15
This is more than just PCA so I'm missing some background. Aren't those coloured blobs separate input datasets?
the colours are the output classes for the data points
In other words, where are those clusters coming from?
@ParitoshSingh so that's some kind of classification based on the PCA?
it can't be a simple linear division because there's a fuzzy line between blue and green
this image in particular? seems to be a plot after the pca has been done
bivariable plot of 2 highest pca variables, with colours to indicate outputs
anyway, I'm familiar with PCA the linear algebra operation but not PCA the machine learning approach
@ParitoshSingh "outputs"
classes in a classification problem
11:17
yeah, so I don't know how that works
the true values so to speak
I create a table with user in row and all film in columns and the value are ratings for this movie
@ParitoshSingh Doesn't sound like true to me. If it's the output of classification it's the best guess. Right?
you can treat this plot in particular like some hand-wavey magic really.
i try to cluster same user for same film review
11:19
its just "supposed" to be a representation of how the two pca variables together are capable of segregating the classes
you can treat it same as bivariate plot of any original features/variables, pca or no pca.
its just that same thing. The pca part has already been done by the time that graph is plotted.
Question: Which one of these is preferable and why?
class FooBar(Foo, Bar):
    def __init__(self, bar='bar'):
        Foo.__init__(self)
        Bar.__init__(self, bar)

class FooBar(Foo, Bar):
    def __init__(self, bar='bar'):
        super().__init__()
        super(Foo, self).__init__(bar)
I made a user table row and column movie, I can only make clusters than the right users?
i m following this guide
The main thing to realise is this
you dont need to colour your datapoints, thus skipping over dealing with the "Target" class so to speak
that plot in particular however uses the colours to indicate true labels, and usually visually seeing their segregation gives us an indication of how easy or hard it would be to segregate them
@AndrasDeak I know, I had a weird idea :-$
11:27
pca in and of itself doesn't have to indicate any of that.
@ParitoshSingh "true labels" again. So you're saying that those colours are part of the input data!
yes, yes they are!
the training set so to speak
we know the real values/labels
and if i merge my user target ad example (male or famale user) near the 2 principal component?
13 mins ago, by Paritosh Singh
the colours are the output classes for the data points
11:29
told ya, its just hand-wavey magic :P
you could've just said "yes" when I started with chat.stackoverflow.com/transcript/message/45548773#45548773
ah, whoops haha, my bad
hm, well but
i guess i misunderstood you when you said separate input datasets
its the same dataset
but, those are the 3 true labels in the target class.
:|
16 mins ago, by Andras Deak
In other words, where are those clusters coming from?
and the answer is "botanists"
yep, yep indeed
one of these days I'll just start assuming that I'm always right, the way I'm supposed to :P
11:33
im sure it will probably work out for you most of the time anyways :P
frankly, its just an issue of semantics really, best i can tell
in ML, if we ever say true labels/output classes, usually we dont worry about how those labels were actually marked. we assume their "truthiness".
so, for us, its just, 1 dataset, true labels, mimic true labels based on features best you can using ML
(in classification atleast.)
Yeah, sure. But that's all "input" so "how do I recreate this for my dataset" is a moot point, which would've been my original point 15 minutes ago
ducks and hides yep, pretty much.
but can i create a target?
i m doing something ....and seams work :s
the bottom line is, does it make sense?
i hope :D
11:42
What do you want that target to do?
Aren't you really trying to define clusters using your PCA output?
this work for me is just an example to understand the philosophy of the PCA
i m try to cluster for gender now
male and famale user
Perhaps go through this
OK. So my point is this: the colours in the figure you found are not the output of clustering or PCA. The colours correspond to data already in the dataset.
In your case this would correspond to you having a "male/female" label for each of your data points.
pca in and of itself, is just a "reconstruction" or representation of multiple features (say n) by new features that capture the same relevant information with less than n features.
inherently, it doesn't tell you anything about the target.
This is a series of data in the initial set, but they are divided according to the PCA philosophy. In the sense that similar dimensions are projected separately and different dimensions are distant.
sorry, same dimensions are near, otherwise are very far
if you see this iris setosa are all near , because probabily have similar dimension
11:47
the image in pic, your dataset is different yes?
or, are you working on the iris dataset all along.
they have movie reviews
30 mins ago, by theantomc
I create a table with user in row and all film in columns and the value are ratings for this movie
i send my image, but is not very significant
29 mins ago, by theantomc
i try to cluster same user for same film review
FWIW I have no idea what that means
11:49
@theantomc I see
that tells me one thing: gender is irrelevant in the movie taste of people, for that movie
so, based on the review, are you trying to classify if the writer was a male or female?
you might see a difference with a romcom or a war movie
@AndrasDeak Exactly
you got a point
OK, so what are you trying to do? :)
You already have a version of the "iris" figure for your data. Complete with "target info"
@AndrasDeak i will make another algorithm for analisys like TSNE for cluster in right way, because where PCA are very low
Because cut more dimensions and variance is very poor
11:52
I understood only half of that (my fault this time). Are you saying you're trying to come up with a different measure (and algorithm) according to which you can separate the red and the blue points?
yes right!
OK. So...that's no longer PCA, right? Because what you have is what PCA can tell you about that dataset.
because PCA use just 2 dimensions or similar
thats not really PCA's "fault" per se. its just telling you your data is tough to segregate in that representation
what you're looking for, are the steps after/excluding pca. you're basically asking about making classification models
11:54
TSNE require PCA first
ah, I see
TSNE, PCA, are all "analysis" steps.
I guess PCA is just a filter to throw away irrelevant features, then comes the proper classification
But not PCA with 2 dimensions, with more dimensions ..on website of sklearn say (about example 50)
Hoping that in higher-dimensional space the datasets separate?
11:55
yep. we usually use the top n pca variables, capable of capturing 90%+ variance.
that makes sense to me
looking at the comp1 and comp2 axes the points overlap, but if you rotate it into the 14th dimension you see the points come apart
That would still mean that you need to do some kind of clustering on the PCA-filtered data though.
^
classification usually for classification problems, we dont bother with clustering. or atleast i dont see why one would want to
"supervised" learning to be more specific.
at the risk of losing model explainability, pca is just a step of reducing the dimensions so hopefully the ml algos can do a better job separating things. but you have to do the actual model building afterwards on those variables
Ha, this reminded me of an answer I posted to a similar question. They had a huge dataset with many dimensions and wanted to cluster it. I added an incomplete answer showing them that they at least have a chance of clustering because there are gaps in the data
12:14
unclear stackoverflow.com/questions/55022834ŠŠµ-Š¼Š¾Š³Ńƒ-Š·Š°ŃŃ‚Š°Š²Šøть-рŠ°Š±Š¾Ń‚Š°Ń‚ŃŒ-тŠµŃŃ‚-Š“Š»Ń‌​-Š°ŃŠøŠ½Ń…Ń€Š¾Š½Š½Š¾Š³Š¾-ŠŗŠ¾Š“Š°-Š²-tornado-python-3-6
Š¾Š¹ Š¾Š¹ Š¾Š¹
You type fast o.o
I had to look up the Russian website...
same, but i was only halfway through my sentence
funny, i never noticed the python-3.6 tag before
 
2 hours later…
13:48
cabbage
jjj
jjj
cabbage
So I was thinking, all these really rare radioactive elements...they're rare now, but hundreds, thousands, millions of years ago...surely they'd have been much more common?
...and you know what that means? Radioactive dinosaurs!
Or: Spiderman, Hulk, Daredevil, Doc Manhattan, and Fantastic Four: all legend, rather than fiction.
potato
Banana
You?
13:52
@toonarmycaptain More like radio-insensitive polyextremeophiles, and a much higher incidence of radiographic fungus (consuming gamma radiation as a food source)ā€¦ more towards the billions of years (~4B) than millions. XP
@amcgregor So, radioactive shrooms? xD
no, shrooms that eat radiation
are those even a thing?
(Though there are still fungal species with the phototrophic [via melanin] properties, notably found around nuclear meltdown scenes such as the Elephant's Foot from Chernobyl.)
Yes, those are totally a thing.
Doesn't seem like a very safe food source. Unlike hydrothermal vents.
I was primarily thinking about elements like Radium, Thorium, and Uranium/Plutonium's halflives are on the order of millions of years?
13:58
Good old fungus, breaking down everything. (The pressure exerted by fungal cells as they invade neighbouring spaces is intense. Enough to punch through steel.)
@toonarmycaptain but that also means that the amount of uranium we have now was roughly twice as much millions of years ago
(natural and artificial fission reactors notwithstanding)
@amcgregor but gamma rays aren't even things. Basically an extreme form of photosynthesis.
Yup; exploiting photons typically only damaging to other life.
life, uh, finds a way
True or 8x when the dinosaurs were around. Still, it was Thorium/Radium I was thinking of, on the order of thousands of years. Thorium 65million years ago...2^40625 more prevalent than today, unless my math's wrong.
Or, you know, there's other factors involved *shrug*
It's a bit complicated because radioactive elements decay into one another.
I wouldn't be surrpised if the thorium we had wasn't primarily the remnant of some ancient huge thorium repository, but rather the newer product of radioactive decay chains starting from slower-decaying materials
> 232Th is a primordial nuclide, having existed in its current form for over ten billion years; it was forged in the cores of dying stars through the r-process and scattered across the galaxy by supernovae and neutron star mergers.
so maybe not
> In the universe, thorium is among the rarest of the primordial elements, because it is one of the two elements that can be produced only in the r-process (the other being uranium), and also because it has slowly been decaying away from the moment it formed.
other thorium isotopes seem different though
> Natural thorium is usually almost pure 232Th, which is the longest-lived and most stable isotope of thorium, having a half-life comparable to the age of the universe.
gotcha!
> The other natural thorium isotopes are much shorter-lived; of them, only 230Th is usually detectable, occurring in secular equilibrium with its parent 238U, and making up at most 0.04% of natural thorium.
"secular equilibrium" is the steady-state reached by a pair of a slow-decaying isotope and its fast-decaying child, if I recall correctly
I was taught some of this, but it wasn't yesterday and it was never along my main interests
14:12
@AndrasDeak This information, while genuinely fascinating, will have little impact on my intention to declare at Bible study tonight that the biblical Nephilim were actually Marvel superheros.
I'm just saying that the Earth wasn't a ball of plutonium 1Gyrs ago :P
and you might want to consider the fact that being subjected to ionizing radiation will typically kill people rather than turning them into arthropod-mammal hybrids ;)
I'm reading a pickled file, and decoding each line of it; but I am not sure what to do with the characters which then appear at the beginning of the resulted string. On Windows I'd just replace the standard newline /r/n but not sure what to do on Linux. The resulted string has some junk characters at the beginning. Any suggestions?
probably an encoding issue
Do you have a small example?
I'll write one now. For decoding I'm using utf-8.
the other half is the encoding ;)
14:22
@AndrasDeak And you make a fair, if not quoteworthy, point. I too was taught some of that physics, though likely not to the same level you. That said, 'typically' - sounds like there's a risk-reward equation there worthy of consideration.
well if it's Bible study then a different bar applies to "typically kills people"
from pathlib import Path
class SmallDemonstration:
    def __init__(self, path):
        self.file_path = path

    def to_json(self):
        data = []
        with open(str(self.file_path), 'rb') as f:
            for line in f.readlines():
                value = self.byte_to_string(line)

                if value != '':
                    value = value.strip()
                    data.append(value)
        return data

    @staticmethod
    def byte_to_string(input_bytes):

        try:
            return input_bytes.decode("utf-8", errors="ignore")
Is this compact enough?
And I uploaded one of the files here
ha, pickle sent through a shady file exchange site, what could go wrong :D
:-)))))) right.
is there a place I can upload files to here?
Aah, get a VM for your VM!
So, then the hanging question, where did these pickle files come from?
14:35
\o cbg
I trust you so I downloaded it, but next time use a decent code paste service
the mangled characters are already in the file, assuming it's utf8-encoded
so yeah, what Paritosh asked
@MooingRawr cbg
@ParitoshSingh Streamed tweets with Tweepy. keyword 'Trump" :-))
So, you made the pickles yourself off of Tweepy variables?
I think he asked how they got written to the file
14:38
I made them, yes.
no way :P
my vim recognizes it as latin2
ok. Did you specify an encoding at that step?
You're in Germany so that's reasonable
q^@.<80>^CXó^T^@^@{"created_at":"Wed Mar 06 09:35:49 +0000 2019"
start of line 2 ^
the ^@ and <80> are non-text characters
@ParitoshSingh no, just dumped them in a file :-D I
so perhaps tell/show us how exactly you did that ^
14:40
perhaps an mvce of that portion too? The key thing to realise is that if you want to avoid encoding decoding errors, you need the knowledge of both sides. the encodings must be consistent at both ends.
usually, if you're trying to fix issues at unpickling, or "reading" and seeing issues crop up with encodings, you're already one step late to where the problem actually happened.
@AndrasDeak can I paste the streaming part of the code here? It's a bit long, would it be ok?
nope
use a code paste service
i might not understand encodings too well, but thats a lesson ive learnt well.
And we probably don't need the streaming part, just the IO-relevant bits. But that's less of an issue.
@ParitoshSingh indeed. I just saw a post by deceze explaining encoding issues, I didn't read it all but it seemed informative enough kunststube.net/encoding
ooh, that looks like a good link
for me, it was ned's unipain slides that finally helped make some sense of what all these issues were all about
the funny thing is, once it all clicks, its pretty simple to follow along with. But i still remember when facing encoding errors, it was chaos to figure out anything. Mostly because it was the "wrong end" of the problem, so to speak
14:47
I'm very happy to say that my work involves neither text nor times.
sent it here
@Nasrin perfect, thanks
    @staticmethod
    def _store(data, path, file_name):

        with open(str(path / file_name), 'ab') as f:
            pickle.dump(data, f)
I think I should add an endoding to _store
yes
OK, so, pickle.dump should be matched by a pickle.load in your code on the other side. Why aren't you doing that?
pickles are self-contained. The same way you wouldn't try to parse a .zip file yourself, you should use pickle to unpickle.
@AndrasDeak because it gives me a very large file and then I chunk it into smalled ones
14:50
uuuh, do you have a single call to pickle.dump, the output of which is large?
or are you appending independent pickles into the same file?
(note that we're way deep in XY problem territory)
no it's the same file. Afterwards it'll be a very large file and I'll have some data for my analysis. I have a chunk utility and I'll chuck this file into smaller ones (like the one I sent you)
I know it's the same file. The question is whether there's 1 big pickle or many smaller pickles inside.
Anyway, this sounds like a very bad approach. At best you should keep your pickles separate and pickle.load them separately. Even better: use a database or similar data structure that lets you append to it and also retrieve part of the data reliably. Hacking along a pile of pickles with a custom parser sounds like a recipe for disaster.
@AndrasDeak sounds way better than what I am doing
It would probably even be less work to manually parse json, and that would occupy roughly the same space and be safe. Still, doing the same thing with json would be equally wrong (multiple objects stuffed inside a json aren't valid json.)
I just realized I'm dumping multiple pickles in a file. I wasn't paying attention to that. Now I know where those characters come from :-)) Thanks
14:57
using a database or something like hdf5 (assuming that applies, I'm not sure) would probably also mean less storage need for your ascii data
@Nasrin no problem...but please don't tell me that now you can change your custom parser to account for that :P
:-))))
 
1 hour later…
16:05
cbg
m8_
m8_
Morning folks...I'm looking to make pie charts for each column in a dataframe. The charts will show percent NULLS (50% NULL and 50% non-NULL, e.g.). Can someone point me in a direction for an efficient way to do this? Currently, I am filtering each column and then making a single pie chart, but this feels cumbersome.
Maybe there is an easier way, without filter, to generate these charts per column in one graphic?
Don't worry about "an effiiceint way" until you get "a way".
3
m8_
m8_
I have that. Filtering by column and making a chart
If you have working code, you should post it on Code Review to get feedback on how to improve it.
m8_
m8_
Right, was just wondering if someone could more quickly point out a resource or method.
16:14
I am woefully ignorant about visualization in Python. I assume you are using matplotlib, right? I only know that this is a thing. I don't know how to use it.
m8_
m8_
Yup, no worries. Thanks anyways
16:43
My dad asking me about using git and this being something I know more about than him, and can actually advise him in, is a pretty surreal moment (he's an electrician whose coding exp originated via using PCBs and microcontrollers in the 70/80s, and writing some C++ in Delphi in the 90s).
Kudos for him getting into git
Bonus kudos for writing C++ in Delphi. (I kid, I kidā€¦ silly Borland doing too much at once! ;)
:pets her TurboPascal 5.5, 7, and Turbo-C boxes:
@AndrasDeak Well he's not really programming, he's building an online learning platform using some software...and that software wants him to set up git so that instead of completely reinstalling the software for updates he can just rebase his copy of the core code with it's config and plugins and the changes will be updated...I'm not sure how much I trust that to be seamless, but I suppose it's workable.
17:06
Hopefully it isn't all binary files :)
ā€¦ I also typically let Git work out if rebasing is the best approach when pulling. Nobody wants to be this guy:
user image
3
@toonarmycaptain The root of my "dedicated server" VMs is itself git-managed, generally absorbing some utilities from /usr/bin, most of /etc, and so forth. Post-receive hook to automatically identify all packages owning all files modified, all init.d scripts for those packages, and automatically reloads/restarts where appropriate. (Branch to checkout on first boot passed by kernel command line.)
It's rarely bit me, and has never bit me in ways Git for source projects has (where I end up duplicating the entire tree prior to an operation I deem "risky"ā€¦ Just To Be Safeā„¢ā€¦)
@amcgregor I haven't asked him whatever happened to the accounts package he was building...
17:37
@amcgregor I see it potentially biting him in terms of him having to merge the changes in over his changes or changes by plugins he's installed, or updates being incompatible etc, but maybe he'll be fine.
sounds like a recipe for merge conflicts to me
unless the only files he is supposed to touch are like config files that are never modified in the code proper
18:01
@toonarmycaptain A graphical diff tool (e.g. FileMerge on Mac, or even the official GitHub client) can go a long way towards helping resolve conflicts like that. Seeing sprays of <<<<<<<<<< and ========== and >>>>>>>>>>> all over the place can be intimidating. (Much easier to visually split between 'ours' and 'theirs' to pick winning chunks.)
@amcgregor assuming the content is text
Absolutely. Though GitHub does have some pretty impressive content-aware diffing. (E.g. it can highlight what part of an image changed.) Not sure if they gifted that functionality to their desktop app, though.
18:26
Awesome. Python 3.7 is the toddler what breaks all my things.
Time to dig through release notes to see what changed in the import machinery and unicode codec machinery between 3.6 and 3.7ā€¦
You can no longer raise StopIteration inside generators
Well, that'd do it, right there. :| Alternative is to just return early?
Yeah
(Only happens in the "arbitrary text" token handler and one utility, shouldn't be too hard to fix.) Question, though, does next(generator) itself still raise StopIteration in the return-early case? (I suppose it would.)
@amcgregor Which is all well on good on my machine, not so good if he's only got access to a shell on a server somewhere, or if he can't install git on his hosting provider's server? We'll see.
18:37
@toonarmycaptain That's where you bring GitHub Pull Requests into play. At my work we've done the occasional PR develop→master deployment; handy to also integrate into the review cycle.
@amcgregor sounds easy enough to test
>>> def gen():
...     return 42
...     yield
...

>>> next(gen())
---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
<ipython-input-319-a0da5d0657dd> in <module>
----> 1 next(gen())

StopIteration: 42
Indeed, it does (tested it myself a few minutes ago). Wouldn't make sense for that pattern to change.
@amcgregor Oh you're saying have his repo on github, and then just reclone the repo after pulling the changes in there? I didn't think of that. Of course that might mean having 3rd party plugins also in that remote repo...
18:52
@toonarmycaptain Nope, not quite what I was suggesting, though server-side scrapping and re-cloning is totally how my app workers are built. (With a pip cache mounted between each build node.) I was suggesting issuing "updates from the upstream forked repo" as pull requests, basically, avoiding the need to manage merges locally where possible.
(Merge conflicts would need more manual intervention, of course.)
@vaultah Yikes, okay, to clarify (since I appear to have this caseā€¦) generator raising StopIteration bad, what about the iterator protocol next method? I'm hoping still safe/sane thereā€¦
Yup, local testing seems OK on that.
:phew:
Assuming he's got git, unless there's a merge conflict, there shouldn't be an issue. I don't understand what "issuing "updates from the upstream forked repo" as pull requests," would look like if what he's done is clone the repo to the server and modified it, without managing his changes etc in a github account.
Here's the section from the manual: https://paste.ofcode.org/svPkFkvdNe9WxAXfvnZgR
NB I've never really used git aside from via desktop/pycharm/web, so I've not really executed any commands in git manually before. Working through the git tutorial is on my lengthy TODO list ;)
@toonarmycaptain pro-tip: learngitbranching.js.org
it's a fun game that teaches you the concept and basic operations
19:07
Visit repo on GitHub, PR tab, New, selecting the upstream repo originally forked as the origin, the fork as the target, submit. Accept PR, squash+merge (or just merge), you're updated.
@AndrasDeak It's already a bookmark ;)
good, good :P
In my own application deployment cases, it's issuing a manual PR from develop to master on the same repo.
19:21
@amcgregor You can do that to a remote repo on a server from github.com? Maybe I'm misunderstanding what you're saying.
@toonarmycaptain Backwards. ;P Issue a PR to your own repo (the fork) requesting merge of the upstream remote into your copy.
Sorry, I meant remote as in the repo on the webserver, not the origin he'll clone it from on github. I still don't get how I can manage a PR on github unless I have a repo on github, rather than simply cloning the original repo on the server.
19:42
@toonarmycaptain A ha. Indeed, I'm assuming use of GitHub as a "canonical store for source code" and broker of automation around that code, e.g. your server would know to "pull" and update itself due to a push hook registered in GitHub against that repository.
ā€¦ I'm clearly too spoiled by my server automation these days. ¬_¬
Oh yea, that's what I meant earlier when I was talking about having his repo on github, then recloning his webserver copy from his repo on github (I guess updating or rebasing are better terms?) with changes. Still doesn't fill me with confidence, if he's got to install plugins which change the code on his local machine, unless he has them in his repo too.
Like the link I shared said, the manual for the software he's using makes it sound like you update your installation in place by running git pull origin and then running their software's upgrade applet.
@amcgregor Well, you're running a server, rather than paying for some hosting ;)
19:57
@toonarmycaptain In some cases (VMs on Rackspace, so still not bare-metal despite 3+ year uptimes). In a majority of cases, I'm utilizing heroku-like build and cloud infrastructure with native GitHub integration.
Average CMS application cost for my CMS hosted there: 0.5ā‚¬/day.
what a weird monetary unit :P
~equivalent to CA$22/month. (Or "$22 CAD" if your locale prefers that. ;)
(One big reason for my choice to use them, they have a datacenter literally down the street from me. ;^)
do you often pop in to watch the servers purr?
Nope, and I'd be upset if I even could. eStruxture MTL-2 is a secured site. ;P
20:44
Hi All, can anyone help me out with some code and logic in Python?
You should probably post your problem; nobody's gonna want to sign up to help you without knowing what they're getting themselves into
21:07
To add to that, who knows someone later on might come and answer your question.
Adapted from the channel topic of ##webdev on Freenode IRC: "Ask, don't ask to ask, and have patience. [Online chat] is async, yo."
we have something like that in our rules
I wouldn't call IRC entirely async though. Here you know that whatever you post will be readable next week or forever.
last time I was on IRC you had to actually be in the room to see the transcript
@vaultah It ain't pretty, but it works! Thank you so much again!
Now to bump version and roll a releaseā€¦
21:50
bump up the jam
wim
wim
you know your code is not DRY when you have to fix the same bug in 12 different places.
22:08
hello I need some help plotting a scatter plot using pandas and matplotlib.
I would like to plot a series and have the header of the series be the X axis, and it's value be the y axis.
let me show my df sample
have you carefully read the docs?
Yes, but my issue is that the docs mention that to do a scatter plot I must have an x and a y series. however I only want to do a 1-dimension scatter plot. pandas.pydata.org/pandas-docs/stable/reference/api/…
what is a "1-dimension scatter plot"?
11 mins ago, by ex080
I would like to plot a series and have the header of the series be the X axis, and it's value be the y axis.
X and Y == 2 dimensions
also what's a "header" of a series?
you said you'll show a sample
22:25
one sec
was drawing it
       rockA  rockB
red       17     55
green     45     25
blue      18     32
something like that
I dont think this is called a scatterplot, but im not sure what the correct name for this kind of plot is
The Y dimension being the value for that row
technically it's a scatter plot but semantically it's closer to a barplot
and the X-axis having the labels
cbg, with python sqlite3 do you actually want to just use the execute command and input the raw SQL or is that only suppose to be used as a last resort?
i usually use orm mappers so i dont have to write raw sql
That plot sounds a bit specific so I wouldn't be surprised if there weren't a built-in solution for it (it definitely isn't a thing in matplotlib). I'm pretty sure you could convert (melt? something else?) that dataframe into another one, one that has an integer column encoding the original columns, a second column encoding the colour, and a third one with the values. Then you could feed that into other_df.plot.scatter
22:32
hmm good idea andras let me try that
@ex080 im familiar with orm mapping in django but is that the norm/encouraged
i figure I should focus my attention for learning how to program with database towards the way that I should program it
I think that's the way to go writing raw statements can get tedious and messy fast. with psycopg2 it is easy to define the database model as python class and then build out from there. psycopg2 handles the connections, pooling, and data manipulations for you.
also never ever parameterize your queries by hand, but I hope that goes without saying
Andras the workaround worked
ima go look in the docs
to see if there is an actual name for this type of plot
maybe if i transpose the df
then plot
Don't bet on it: the coordinates that correspond to "rockA", "rockB" etc are completely arbitrary. Look at a barplot instead, that might suit your needs.
22:48
turns out this type of plot is called a dot plot
and as u said it is similar to bar plot
sounds a bit esoteric to me
think u r right
but as long as it works for you that's fine
23:19
pffft, apparently you can't tell OPs who clearly don't know what they're doing to read a tutorial without getting flagged for being unfriendly anymore
good news is the mods let it slide
That information is not inherently unwelcoming, I tell that to confused people every now and then.
what's wrong with reading a tutorial. it's how we learn
tone matters a lot
I try not to let it show just how frustrated I am at seeing the 3 thousandth poorly researched question that day, with various varying degrees of success
haha try not let to let it get to ya
23:25
the hard part is not letting yourself go at them :P
found an example
Ha, I eventually realized "perc" is short for "percentile" but "75 perc" reads as "75 minutes" in my native language. Made me do a double take.
that elusive chart has had me going crazy for the past couple mins

« first day (3063 days earlier)      last day (2110 days later) »