« first day (2103 days earlier)      last day (3069 days later) » 

00:19
$('#fac_ignore_email').attr('checked') ? form_values['fac_ignore_email'] = 1 : form_values['fac_ignore_email'] = 0
for one
form_values.fac_ignore_email = $('#fac_ignore_email').prop('checked') ? 1: 0;
or ... even
form_values.fac_ignore_email = +$('#fac_ignore_email').prop('checked');
oh, I forgot about .prop()....I don't use jquery that much brain must be slow
yeah, attr is not goign to do anything good there...
basically since that was unchecked by default, the code was equal to form_values.fac_ignore_email = 0;
nope, usually when I see .attr() I assume a tiered setup is needed (like var options = { some_option: { foo: "bar", baz:"foo"}....})
but maybe I just run into weird code
or maybe the fact that ever job I get which involves JS has some mixed up, hybrid front-end with back-end all together UI which is why I avoid those jobs like the plague
'checked' is related to checkboxes here,
the property changes, but the attribute doesn't
00:34
yes, JQuery returns the prop when calling attr on checkboxes (but that doesn't make it correct as I think it literally returns the string "checked" instead of boolean true like .prop() does)....I usually use if (elementName.checked) ... either way :)
sometimes I see if ($('#blah').is(':checked')) and I always wonder if that is some cross-browser stuff I never ran into or just someone who learned soley from w3schools
00:50
this
user559633
For anyone that's interested, boss screen for FTL (going to lose) twitch.tv/0xkeen
@AnttiHaapala I would say that is insane but considering the last few weeks; I'm not sure what qualifies as insane anymore
paying around with python-pptx. Can't figure out how to add a picture from a url. All the examples are loading from local paths
Anyone have any suggestions?
I haven't used pptx; I've used docx lib tho, and it was quite deficient...
so the answer probably is: "you can't." excepting of course you load the url and then add the image from local path
hmm, my issue is this is being done via my website. I'd rather not have to download and store all the images
and clean them up after I use them
er.. download to my webserver
01:05
@tristan Good run!
user559633
Thanks!
user559633
That was like a 3.5h stream
I jumped in at the first boss encounter not knowing it was the first
so I got excited when you beat it. Then you said "that is 1 of 3"
user559633
Ha. Yeah, it's brutal.
user559633
If you luck out and you can get to a repair node, it's not that bad, but that almost never happens
01:09
have you ever beat the game
user559633
yeah, twice
Nice! Would have probably been interesting to stream my hitman absolution runs when I was doing them on purist diffixulty. I stopped halfway. It was pretty fun and frustrating at the same time
user559633
If you end up streaming it, let me know. I'd watch
I would need to brush up on those maps. It's been a couple years. Those challenges were really fun
01:27
hey guys. i tried installing python via brew install python but when i check with python -V it still shows python 2.7.11 when i would like to move to 3.5.1 on Mac
user559633
@idjaw Sure, yeah, I think that more complicated games/map based games are more fun to watch when the streamer knows what's going on
how do i make it show 3.5.1 when I enter the command "python -V"
user559633
if you go for it, let me know and i'll help you with option setup
user559633
@btrballin make the brew installed python come up in the PATH before the system python
user559633
01:31
i hardly used python before. would it be okay to remove the default version of 2.7.11 on the system and replace it with 3.5.1?
user559633
no, don't do that. some system utilities depend on it existing
user559633
the correct answer is to look into virtual environments
i see..in that case i guess i installed python 3 then
had to go to the pharmacy and am taking the scenic route just to look for more Pokemon. This is horrible
DSM
DSM
02:01
As fads go, this one seems mostly harmless.
This may not be possible with python, but could I automate using an application in Linux with Python?
DSM
DSM
The answer is probably yes, but you'll need to be more specific to get more useful advice.
There is an application that I have used to turn m4p(DRM Protected Apple Music) to MP3, which can be played by anything. I would like to use this in an application but there is no API so I might make a server that acts as an API by using this app
DSM
DSM
02:20
Then yeah, you can do it. Google for things like "python gui automation"; I haven't needed to do it so I don't know the best library these days, but I've seen it done.
Again, may not be the right place to ask, but if I needed to create a server capable of automating a task how would I do that?
How could I use apps that rely on GUI without actually using the GUI?
DSM
DSM
Maybe I wasn't clear. That's what I mean by "python gui automation". You write a program, only instead of calling into an API, you call into a tool which moves the mouse pointer and clicks things, etc. Then you can write a server around that as you see fit.
[Note that I'm setting aside the ethical and legal issues involved in writing a server to circumvent DRM.]
02:36
I'm likely going to be running my whole application with NodeJS and the platofrm I plan on using, OpenShift, supports that but I cant use both Node and Python in the same server
It will also be easier for me to make an API so I can call it as need be
But my issue is I dont know how/if I can control the application if there is no graphical server interface, just command line
02:48
@idjaw I am of two minds of getting Pokemon Go: on the one outdoor activities with children; on the other I remember the addition that is Pokemon from the 90s....that was a dark path
DSM
DSM
Wait, I thought the problem was that the application only had a GUI. If it allows you to call it from the command line, everything's easy. What am I missing?
I would say your best bet then would be to learn Linux command line - it is an awesome and powerful tool
I dont know if I can call it from command line
I know Linux command Line decently
DSM
DSM
That's the first thing to find out, then. If you can, everything is quite straightforward.
Dont think I can
Any way to make so that I can
DSM
DSM
02:53
Not easily, which is why sometimes we have to fall back on the gui automation tricks I was talking about before.
@JGreenwell I never got in to Pokemon in the 90s and never played any of the games. I think I'm just jumping in to the hype.
DSM
DSM
But ISTM "How could I use apps that rely on GUI without actually using the GUI?" and " I dont know how/if I can control the application if there is no graphical server interface" are almost opposites.
I'm kinda confused as well currently because it uses a GUI, but I don't know how to work with it on a server where I cant use a graphical interface
My brother (little by un dia) used to work at a Toys'R'Us and organized weekly table-top tournaments (including Pokemon card game)....which meant company supplied card packs.....so evil ;)
DSM
DSM
You can often get by with a pseudo-X interface like Xvfb or something.
03:04
granted the BattleTech tabletop stuff and building steampunk based games were eviler - and lead to some of the first MUDs I ever made which was very educational :)
 
2 hours later…
05:04
Morning
 
1 hour later…
06:35
cbg
I love working at scale. I pointed a colleague to intern(), and they promptly saved 3GB of memory footprint.
And yet, in Python 2 intern was documented under Non-essential built-in functions
cbg folks
@MartijnPieters what is interning...?
@AndyK reusing the same string object for the same value.
Python does this for all ids in your code, for example.
You can do so explicitly; but only do this if you either a) do a lot of dictionary lookups on those strings (Python can optimise with a pointer check first) or there is a lot of repetition (as there was for this project).
06:51
would you mind a quick example @MartijnPieters...?
or anyone actually
@AndyK somestring = intern(somestring). Do this consistently and there will only ever be one str object with that value in memory.
Say you are processing a large body of text and you need to map each word to some statistics. The corpus of text is really large, there are a lot of words that'll be occurring often. Your statistics include references to other words in the corpus; say 'common next word' or something.
Because you are reading this text from another source (file, network) and splitting the text into words, you'll have a lot of string objects. Many of those string objects will have the same value (e.g. "any" or "some"), and each of those str objects takes memory.
By interning those words, you tell Python to examine the value and giving you the one copy it has stored already; so each time you produce a separate word string you ask Python does this value already exist? If so, give me the one singleton object for it.
You use that one singleton copy everywhere. This can reduce memory significantly.
So comparisons/lookups will also be faster...
Thanks @MartijnPieters
07:08
But that makes storing a new string object slower, right?
It can also speed up dictionary lookups, as Python will first use is to see if a given dictionary key in the hashed slot is the key you are testing with.
@ByteCommander it makes the initial processing of strings ever so slightly slower as there is an additional equality test being done, yes.
But hey, 3GB!
Yeah, sure.
Cool thing. I did not know about it before.
Typo or Cannot Reproduce Update multiple rows if not null in SQLAlchemy - xGlorify - 2016-07-18 12:42:46Z
07:30
Hey guys I installed Anaconda, conda commands work fine in command line tool. I am also using visual studio. In the Python 64-bit 3.5 Interactive I typed the following:
>>> import sys
>>> sys.version
'3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]'
but conda commands return errors
>>> conda list
  File "<stdin>", line 1
    conda list
             ^
SyntaxError: invalid syntax
Is this because theInteractive tool is not supposed to work like the command line? Or am I missing some setup in VS?
@Käsebrot you do conda commands in the command line, not in the Python shell.
Exit python and try it there.
command line does work fine. I was just wondering if the python shell is supposed to do the same
but that was the answer ty @Ffisegydd !
@Käsebrot The python shell is for typing python commands into, conda is meant to work in the base cmd/PowerShell
o rly powershell?
So when you type conda list into the Python shell, it tries to parse it as python syntax, and so fails.
07:35
lol powershell works
can I setup conda commands in visual studio
I mean it does say that it is using Anaconda,right? see above
I don't know, I don't use Visual Studio.
kk pycharm?
What about it?
what do you use?
I use PyCharm and Atom.
07:38
what is atom?
Google it.
an editor
sry for being annoying :D
I am just getting started with python
@Käsebrot Then you definitely want to try a good IDE, like PyCharm. Look into virtual environments, too.
you mean it is better than VS? :O
I don't think I've ever heard of a Python developer having a good time using VS.
And I've heard quite a few times people complaining about it.
07:43
mkay
I know pycharm already but it felt veeery different
guess I'll have to get used to it ;)
Honestly, use whatever you want. But if you choose to use something that isn't the norm then that's your choice, and you'll have to accept that people will not be able to help you with it.
so pycharm is considered the norm? ThenI'll gowith it
no problem
It's one of the norms.
together with?
Aton?
m
07:47
ty
I'll get pycharm, Jetbrains always do a good job
Don't buy it, get the community version.
I know
thankls
At least until you're used to it and decide that you want to use it full time (the paid version is worth it IMO)
okay thank you for advise pals
Cabbage!
@Jon Sorry Jon, wasn’t around last night
08:22
lol in Pycharm the shortcut for running a script is "Alt + Shift + F10"
^^
in VS I just hit F5
cbg @poke
08:36
Morning Cbg.
Re: Editors - i feel like doing at least the first bit of your development in a regular ol' text editor is beneficial. The autocomplete stuff in Pycharm is handy, but I feel like it would have got in the way/made me learn slower if I'd used it at the start.
Was pleased Jetbrains made Android Studio though, when I started working on app stuff.
I use vim plugin for pycharm
and it is great
how does that work? I can't imagine what that looks like. Also, just read Martijns thing above about intern. Omg. Mind blown.
@Withnail basically the same pycharm with vim-like code navigation
ergggh!
:D Editors and IDEs are whole worlds of YMMV though.
yeah
pycharm pro is really really comfy.
08:42
It's so good. It's like being wrapped in a big warm fluffy blankey.
Yeah, just renewed my license actually. Still get student rates on it for this year \o/
My only problem with it is that I can set the theme to dark. Meaning I invariably get blinded when I tab out into, e.g. the chat or to look something up on a webpage. What idiot decided black on white was the best idea for webpages? Back to greenscreen, I say.
@Withnail oh dude...dude dude dude.
Just a sec, I don't have it on my work PC but let me see if I can find it.
Whhhhhaaaaat? I have darkreader, but it's pretty patchy.
Ah yeah Dark Reader was what I was gonna link.
Better than nothing.
@Withnail do you get blinded?
I tried using light theme but it looked so weird
08:50
Blinded is overstating it obbviously. But if you've been using dark theme and homebrew theme for terminal for a while, then open a new browser window AND BLAM OMG THERE'S BEEN A NUCLEAR EXPLOSION ON MY SCREEEN AAAHHHHH MY EYEEEEEESS AIIIIEEEEEEEEE, it's pretty bright.
i feel that at night
I tried using accessibility software for a while to invert it, but that was a massive pain. I also have this problem in Excel. Why can't I have a black spreadsheet with white writing, FOR THE LOVE OF GOD WHY? /numbersproblems
oh dark-reader is nice
Yeah. The developer behind it is pretty good as well, I've emailed him a couple of times about features and things, and he always takes the time to answer.
mfw our website looks much much better with dark-reader than the original
08:55
lol. My default design now is 'make it look like darkreader/think of the nerds'.
haxor
09:14
Cabbage
Morning PM.
> python, java
The main SO site seems a bit sluggish for me at the moment. The Python tag page is ok, but questions are taking ages to open. Actually, it's not just SO, other SE sites are similarly slow.
I don't have that problem
09:17
@khajvah Yeah. I guess "too broad" could also apply.
@khajvah Ok. It might just be my region. Or my ISP.
yeah we are far from each other
09:33
The best thing about Django is that in the end, you will something else to blame your messy architecture on
:feelsgood:
09:46
is there an updated version/another similar book to Black Hat Python, that uses 3.x?
I couldn't see a new version of it, wondered if there was something comparable.
10:07
concerning the black bg vs. white bg thingy, I would really like to use black backgrounds because I look like a 1337 hax0r then, but I can read feck all with a dark theme
I've heard other short sighted people mention the same. And I don't really wanna have my glasses on all the time because it's not that bad. But bad enough to be not able to read stuff on a dark theme...
@khajvah you might want to check out stuff like f.lux which automatically makes your monitor light more "red" at night. It's better on the eyes.
for haxor thing, you can just open a few terminal windows and run random commands
or just run hackertyper: hackertyper.net
nice
10:24
haha brilliant. f.lux is lovely, I use something similar on my phone.
what is f.lux, @Withnail?
google it...
The thing GeckStar mentioned, it changes the colour temperature of your screen for nights, so it's not like having a sun blasting in your face. Or google it, yeah. :p
The android version is Twilight.
Cabbage
10:46
<grumpy cat> Good. </grumpy cat>
cabbage
> For a desktop alternative, try RedShift (Linux) or on Windows the app which has no relation to this project whatsoever, whose name cannot be said aloud or whispered as it is a Trademark, lets call it Lord Voldemort of the blue light flux filtering apps.Guessed it? Let us know in the comments.
heh
>text massage
I don't really get the question. What do you want to send to the server that is not a text message? It seems like he/she differentiates between text messages and commands, but aren't they inherently one and the same?
@GeckStar I think they mean that they don't just want to log the stuff they're sending...
or something
I'm fairly certain OP doesn't know it either
tool req / POB stackoverflow.com/questions/38456551/… "I am totally aware that StackOverFlow is not the place to get advice on this but I need your help"
Questions like that baffle me. If you don't already know one of those languages, why on earth are you trying to build a CV system in one of them? If you do, well, use the library in the language you know.
11:00
@PM2Ring I am using openCV with python to identify mainframe objects
@PM2Ring Python is much easier to pick up also..
@Anarach Why are you telling me this?
@PM2Ring I am saying python is works well with open CV in my experience
Yes... but he was posting a question that needed closed, rather than answered.
@Anarach I'm sure it does. It's certainly a popular combination. However...
@Withnail We see lots of openCV questions from people who have almost no skill with core Python. So they ask some really odd questions.
Huh. How do they imagine that's going to go, building a CV system from scratch? :D
11:04
Eg, a week or so ago, the OP was building a program that tracks the position of the user's eyes in a video stream. It was for some sort of hands-free GUI thing, IIRC. But the OP didn't know how to print a simple error message if his eye detection code didn't actually detect an eyeball.
Mildly worried the system might accidentally, e.g. laser the user's eyes out.
maybe they missed the URL, were trying to use opencv with c++:P
@Withnail I don't think lasers were involved, just video frames.
BUT HOW DO YOU KNOW???///, etc.
I think Open CV is a MUCH MUCH better option to read objects from screen than using the language's build in libraries since not everyone is a hardcore developer and generally it will be a pain in the butt
11:08
@Anarach which built-in libraries are you referring to?
and who are you arguing with?:D
@Withnail This one
Questions like that baffle me. If you don't already know one of those languages, why on earth are you trying to build a CV system in one of them? If you do, well, use the library in the language you know.
Not arguing As I am not worthy of that :-P
I'm pretty sure the library for computer vision is mostly opencv, which comes in very few implementations
@Anarach if arguing was connected to worthiness, the internet would be a much happier place
4
My point stands tbf. I think you've misunderstood what I'm saying - read the question PM was referencing. They were asking for language and library recommendations.
Very sage @AndrasDeak
11:10
@Anarach No one is saying "don't use openCV". Obviously, it's the thing to use for stuff like this.
@AndrasDeak Well Said :-p
@Anarach It appears that the OP of that openCV question does not know how to code in either Python or Java, or at least doesn't yet have enough coding experience to take on an advanced project. So they really need to get some solid experience in the core language (in either Java or Python) before they even contemplate doing something like this.
maybe they should try jquery
@PM2Ring Yeah! , I didnt notice that.. my bad...
@AndrasDeak jquery?
It's OK guys, they'll learn tkinter instead
Thanks Chaotic, I have taken note of tkiner and qt for UI design. I will read about them — Yas 56 secs ago
brace yourselves
11:17
Ha ha ha ha
tkinter is pain .. To be brutally honest
and looks horrible
If you think tkinter looks bad now, you should've seen what it looked like several years ago. It was a real shocker.
Should I learn Java or Python to do CV?
_some time passes_
Ok, cool, i'll learn about designing GUIs now.
_everyone looks at each other_
@PM2Ring Oh.. I am talking about several years ago.. ! have not seen the new version..
@Withnail EXACTLY MY mind voice ROFL
I've mostly used GTK2+. I guess I'll have to install & start learning GTK3 oneof these days... In the last year or so I've learned a bit of Tkinter, mostly so I could answer Tkinter questions on SO.
^^How come my formatting isn't working?
11:21
multiline kills formatting
@Anarach It's still a bit plain, but at least its rendering is a lot cleaner now.
only quotes/code are left for multiline
@PM2Ring I see.. I have heard of this new thing or old.. called Kivy..
11:21
I looked at kivy and it seemed really simple
I don't know how useful it is for actual guis (I was trying to write an android app)
but it seemed reasonably easy to use at least for starters
@AndrasDeak I have seen some demos and it looked pretty cool and more importantly 'Modern'
@Anarach well the question is, how much work does it take to make it look modern?:)
@Anarach Kivy is supposed to be good. It's multi-platform, and primarily focused on touch interfaces, but it provides full mouse support as well, of course. However, it's still a bit flakey, from what I've heard, but that could just be the Python bindings for it, rather than the Kivy core.
I'm sure we can draw something modern in MS paint
postmodern, even
with the whole flat design hype lately, I'm pretty sure you could
flat design and minimalism
11:25
Gah, my laptop's dying (see moans passim about this, the power problem still not resolved) so I'm using my wife's laptop, which is an i5 rather than an i7, and 4gb rather than 8Gb RAM. sobs it's so slow.
what are you doing with it?
I just upgraded from 4GB to 8GB some weeks ago. I feel for you
Installing some stuff/using Pycharm/syncing dropbox. Using Chrome as the browser, which is the obvious weakpoint. Fans are going full blast.
as long as you got any browser running, multitasking becomes a pain on 4GB
i.e. if you're not using some minimal Linux distro or something. On Windows it became a pain for me
Looxury. I'm on a 2GHz Pentium IV with 2GB of RAM.
11:29
:)
Just looking at it. Chrome has all the memory and Dropbox has all the CPU (it's still syncing up)
do you pedal that as well, PM?
cbg @ChaoticTwist
@Withnail :P Some days, I'm tempted to go back to the Amiga. :) I've still got an A2000, packed away in a box. With a large amount of (mostly portable) C source and POV-Ray scene files and image files on its hard drives.
11:33
@AndrasDeak How was the performance of the app that you wrote with kivy?
How did it compare to the usual way to writing android apps?
I suppose I should get myself a PCI SCSI card and rescue some of those files, before it's too late.
@PM2Ring you must be a patient man!
My friend had an amiga, I was always very jealous. He had a cracking animation package on there as well.
Made some great (well, we thought they were great) animated short films with it. :D
@ChaoticTwist I do have some of those old files on this machine. I rescued those via floppy disk. But I don't have the patience to rescue all my goodies that way.
@PM2Ring I was referring to your system specs. You must be a patient man to use that and not descend into madness :P
11:39
@ChaoticTwist Hey, it's faster than the 30MHz Amiga. :)
on second thought, what do I know? maybe you've descended into madness already.
Good call.
slowly backs away
The 1st machine I programmed had a clock speed measure in kilohertz.
The IBM System/360 Model 20 was the smallest member of the IBM System/360 family announced in November 1964. The Model 20 supported only a subset of the System/360 instruction set, with binary numbers limited to 16 bits and no floating point. In later years it would have been classified as a 16-bit minicomputer rather than a mainframe, but the term "minicomputer" was not current, and in any case IBM wanted to emphasize the compatibility of the Model 20 rather than its differences. Developed by IBM in Böblingen, Germany, the system was intended for data processing and as a replacement for ta...
They made us work on 8086 at the Uni. I lost my shit in the second session.
11:42
I don't blame you. By all reports, the architecture of those early Intel chips was horrible, although I never used them myself.
Yeah, I guess it was something about learning the history and how things progressed from there.
But thinking about it still sends shivers down my spine.
Thankfully the next year we switched to 8-bit ARM processors.
where did you study?
Electronics Engineering
oh that makes sense
oops
I read that as "what"
11:45
I have had only one class where I touched assembly
Manipal University. It's in India.
and I barely touched it
We had 4 subjects related to assembly. 2 with 8086, 2 with ARM
I've never touched assembly language on Intel machines. But I did a bit of assembly on the IBM 360, and some on the Amiga.
I hated assembly
11:47
oh man, I loved assembly
too bad it was only MASM and not the linux version
We didn't have linux version either.
I don't like hardware stuff
It was later offered as an elective
@khajvah Me neither.
I am an uncoool person
11:49
Assembly can be painfully tedious. But nothing else in programming can give you the same feeling of ultimate control that you get from having written some good assembly code that does what it's supposed to do. :)
^ that
knowing that you're only this far away from manipulating <2.5v and >2.5v signals
Assembly looks so daunting but it is super powerful. I was going through this repo on github. It has the source code of the Original Apollo 11 Guidance Computer (AGC). It's written completely in assembly.
oh I wouldn't be a programmer if I lived in those days
@WayneWerner: I am kinda terrified by that thought. It's like I have the power to wreak havoc. And there's no one to stop me.
@PM2Ring I guess it makes sense in embedded world
11:53
@ChaoticTwist The worst you can do is not much different than the worst you can do programming today.
Even with Python you can (un)intentionally create a segfault
done that :(
@WayneWerner Intentionally is the keyword
ooh you changed it :P
it's harder to do by accident, sure, but it's still possible
I made django's server seg fault
which I did recently ;)
11:54
It's easier to fry up everything when you're just this far away from manipulating <2.5v and >2.5v signals
Nah... I mean, unless you just don't care.
To me it seems like the difference between walking along the edge of a cliff and walking through the city
like... how often do you ever fall down just walking around?
I always had this irrational fear of accidentally blowing the whole thing up.
pretty rarely, right?
iirc, the first Rollercoaster Tycoon game was written in Assembly.
And the fact that they gave us training kits that looked like "movie bombs" didn't help the fact
11:56
lol
@WayneWerner unless you are extremely drunk, i.e. programming in C
oh man, you got access to some pure hardware? That's pretty nice ;)
> programming in C outside the Ballmer peak
FTFY ;)
Yeah. 8086 connected to a LCD panel. We were asked to flash "hello world"
:P
Although, what you're saying is correct. It's not any more dangerous than any other programming language.
11:58
oh man, that's lovely
C is equally Fuckable.
we just had to deal with our Windows... XP? hardware/software
I am a noob, we had windows 7s
and nothing hardware related(thanks god)
We had embedded Linux the next year
Yeah, it was back in 2008, I think, when I was doing the Assembly class
11:59
well one class about hardware but only theoretical
available as an elective

« first day (2103 days earlier)      last day (3069 days later) »