« first day (2077 days earlier)      last day (2889 days later) » 

8:02 PM
Bleh, just found 2 dead pixels. I'm never going to be able to use the monitor again.
 
Sadness
 
I wish I could just unsee them.
 
Solution: use a tiling WM configured so that window borders always encompass the dead pixels.
 
That's not a bad idea.
 
@WayneWerner well it's matplotlib under the hood anyway:)
I haven't seen _[0] yet, bit crazy
 
8:04 PM
o.O now I'm ultra-confused...
 
Just submitted my first patch to Python!
5
 
import matplotlib.pyplot as plt
plt.plot([_[1] for _ in data])
x_labels = [_[0] for _ in data]
 
@MattDMo congrats:)
 
works fine...
@MattDMo Nice!
 
it's just a documentation fix, but it's something...
 
8:05 PM
@WayneWerner apart from working fine, does it set the x labels? It shouldn't
 
import matplotlib.pyplot as plt
plt.plot([_[1] for _ in data])
x_labels = [_[0] for _ in data]
plt.gca().set_xticklabels(x_labels)
that truncates my x axis to 7 values
instead of the 41 elements that I have
 
oh, yeah
you have to manually set xticks to have the full range(len(data))
plt.xticks(range(len(data))) should work, I think
if it was a numeric plot, you wouldn't wanteach data point to have ticks of its own
hey, you can do plt.xticks(range(len(data)),[_[0] for _ in data]) unless I'm mistaken
 
What's the data look like? [('a', 1), ('b', 2), ('c', 5)]?
And you want line plot with the letter as tick labels?
 
yeah
 
proof that Jon Skeet is not omnipotent
 
8:10 PM
@AndrasDeak oh, yeah, I think that would be nicer
 
import matplotlib.pyplot as plt

d = [('a', 1), ('b', 2), ('c', 5)]
N = len(d)

fig, ax = plt.subplots()

ax.plot([val for label, val in d])

ax.set_xticks(range(N))
ax.set_xticklabels([label for label, val in d])

plt.show()
 
import matplotlib.pyplot as plt
plt.plot([_[1] for _ in data])
plt.gca().set_xticklabels([_[0] for _ in data])
_ = plt.gca().set_xticks(list(range(len(data))))
This seems to work (using Jupyter notebook)
 
that's plausible
 
If you do fig, ax = plt.subplots() then you can avoid plt.gca()
All plt.gca does is get (the) current axes, or ax, object.
 
reaching synergy with Fizzy's solution, I suggest [label for label,_ in data]
 
8:14 PM
 
Readabability counts, kids.
 
and yes, getting ax is better, I just wanted to be quick about it (my note about "making it fancy" was partly for this)
 
My result
 
@Wayne if you're in a jupyter notebook then add this to the top
import matplotlib
matplotlib.rcParams['figure.figsize'] = (10, 10)
Or whatever dimensions you want. Makes a big difference.
 
you can set an axes' aspect to make it elongated in the horizontal direction
for your specific case
 
8:16 PM
And obviously you should be using %matplotlib inline if not already.
 
also, fig.tight_layout() is usually necessary, but your figure seems already tightly bound (can be due to jupyter)
 
@Ffisegydd Oh, much lovelier
 
I usually do something like (18,12) for my plots, makes them pretty massive, though depends on screen size and res'n.
 
20,10 produces this one for me
Which is pretty perfect for my screen size
 
does (null) really hold information?
 
8:19 PM
Yeah if you want a custom fig size just for a one off then fig, ax = plt.subplots(fig_kw={'figsize': some_dimensions_in_a_tuple}) is doable.
 
@Ffisegydd isn't that overkill for a single kwarg?
I mean the kwarg dict syntax
 
@Andras plt.subplots accepts fig_kw as a keyword dict that is passed to plt.figure
So you can't just say figsize=... in the subplots call.
 
but plt.subplots(figsize=...) also passes it on, I think
 
@AndrasDeak They're actually counts of the first character in a data cell. I was curious what the groupings looked like. The (nulls) are ones that don't have any data in that cell
 
Oh yes it does.
 
8:20 PM
maybe I'm confusing it with something else...
 
It's got **fig_kw defined.
subplot_kw you need to specify as a dict.
 
I didn't want to exclude them, because I thought it was an interesting data point
 
8:38 PM
DOOM is down to £24 in the Steam Summer Sale. I cannot recommend that game enough if you liked the originals (cc. @tristan if you need to relax, get the game)
@idjaw MGS:TPP in down to £18 in the summer sale.
I seem to remember you wanting it.
Possibly others.
 
I think of all the little unconcious things people do, the nervous leg twitch is the most annoying.
My coworker has been doing it all day, and there's no polite way to say "hey stop moving".
 
Yes there is, just ask them to stop it.
 
What about the "I have weird muscle pain in my leg and this makes it better" leg twitches?
 
I'm talking about the one where they lift their heel up and down really fast.
@Ffisegydd with the sage advice.
 
"The trick to doing thing is just to do thing." I could write a motivational book.
 
8:46 PM
Yeah, that's what I do. I have a solid desk, so people can't see it. :P
 
Page 1: "Just fuc*ing do it."
Page 2: <blank>
Page 3: "Still here, eh? I assume you went and did it. As a reward here are 300 pages of cat photos."
 
I'd buy it.
 
@MorganThrapp for me it's hearing it, not seeing it.
 
@davidism Ah, that makes sense. We have carpet.
 
I want to buy all these awesome looking games on Steam but keeps on saying "Already in library". I don't understand :/
 
@MorganThrapp Shia LaBeuf seems awesome
 
@WayneWerner I'd say interesting, but yeah.
Did you see Fury?
 
@MorganThrapp Movie?
 
8:56 PM
Yeah.
 
Don't think so
 
It looked like it was going to be "Yet another american war movie", but I was VERY impressed.
 
I wonder how hard those dancers had to concentrate to not burst out into laughter every time
 
Definitely worth seeing.
 
Every time I see that ending scene I think, "That man has a majestic beard!"
 
8:59 PM
This has to be the weirdest attempt at reading lines from a file I've seen.
zip(f.read().replace('\n', ' '))
 
@davidism shotgun programming at its best
Or spaghetti programming
 
I went to stackoverflow.com/tags/python/info# I see under Interactive Python learning Tab they list many sites to learn Python. Been checking those links out. Does anyone recommend any other sites or courses I should look into. Anyone take a bootcamp or online course with a live instructor?
 
Don't use lpthw
On phone so cannot link wiki pages.
Someone else will though hopefully.
 
@Ffisegydd thanks. I haven't had a chance to take a look at all the deals yet. I might get it at that price.
 
It's well worth it.
 
9:12 PM
 
@davidism thanks, i will read this.
 
I'm a fan of the official Python3 tutorial
go through that and join the python tutor mailing list
Answer as many questions sent to the list as you can
If you don't have a firm grasp of most python techniques in 12 months, you've probably not been doing that
 
10:00 PM
@MorganThrapp there's a parody of that movie in which Brad Pitt falls into a vat of Rogain. It was called Furry
 
user559633
10:20 PM
@Ffisegydd thanks for the head's up; appreciated. i'd need to get a gaming pc to play, unfortunately
 
11:03 PM
When you put <td></td> into SO answer it doesn't escape the html in answer preview?
I don't care what tags, just why it doesn't escape
 
html sanitizer eats almost everything
it's escaped in block code, I think
 
yeah :) then it escapes it :) but it passes if you don't add `
interesting, I knew they're using something to prevent xss, they're not dumb. :))
What're you doing @AndrasDeak
 
you have to be careful on a site frequented by smart programming-savvy people:P
most of them will break your site just to see if they can and what happens
also see this thread
@MarkoMackic trying to get off of SO, walk my dog and get to sleep;)
 
I'm planning to sleep too, I go my friend :) Good night
 
@MarkoMackic good night
 
11:19 PM
What on earth? I just got 10 rep for something and now I can chat?
 
if it wasn't the middle of the night for most of the people, I'd have oneboxed that:P
I don't want to give Fizzy a seizure when he comes back
welcome @BoxTechy
 
Sorry... I'm from Eastern US! Hi
 
note that you don't have to (read: shouldn't) include greetings in your posts:)
 
Got it!
 
that constitutes noise, and is unnecessary as such
you'll get used to it quick if it bothers you;)
 
11:24 PM
Also who's Fizzy?
 
Ffisegydd
 
Is there a way that I could print values without the print command from a file like I would in the shell?
Like >>>3+4 returns 7
and >>>'he'+'llo' returns 'hello'
 
why do you want to do that without print if print is exactly made for that?
the shell just automatically prints it for you...
 
Just out of curiosity
 
read the Zen of Python
 
11:30 PM
What
 
Gimme a sec
Ok
Also great advice, why called Zen of Python when fulfills all programming languages
 
Have you seen C++?
but yeah, most of them are what Guido van Rossum finds starightforward and common sense
 
oh ok
also dat easter egg tho
...
 
11:52 PM
Has anyone else ever looked at the implementation of the Zen? And also what this namespace provides? Good stuff :D
@BoxTechy there is certainly a way you could do it, but it would be the most atrocious hackish code, doing something like github.com/ajalt/fuckitpy
 
Sorry didn't see you yhere
True, for 'he'+'llo' I could do
a='he'
b='llo'
a=list(a)
b=list(b)
c=[]
for i in a: c.append(i)
for i in b: c.append(i)
c=''.join(c)
 

« first day (2077 days earlier)      last day (2889 days later) »