« first day (3344 days earlier)      last day (1605 days later) » 
00:00 - 21:0021:00 - 00:00

12:00 AM
heh... "Microsoft .NET Framework 4.5 is already a part of this operating system. You do not need to install the .NET Framework 4.5 redistributable." - except apparently it's not... sighs
 
I feel you. A couple of days ago my laptop (which was suspended) decided to install windoze updates in the middle of the night, woke me up with a fan spinning at maximum speed, failed to install the update, and broke my windoze install
 
so try and fine one it might accept and "The .NET Framework 4.7.2 is not supported on this operating system."
trying to install this app for testing... get "This page can't be displayed" when I click on the link to take me to it
/me scratches head
 
@wim the name didn't go out of scope, the function remembers the module it is created in and can will look it up there.
 
so I can't install the .net version needed 'cos it already exists but the program doesn't think it does... might have to put it down to a borked program then
 
If it's lost in a local scope, I'd say, "don't do that." But regardless, on the whole topic, my position is "don't do that."
But I'll consider mentioning the point in my answer...
Wouldn't a local scope make it a closure though? So not lost...
 
12:16 AM
>>> A = np.arange(4*7).reshape(4,7)
... template = np.array([[ 8,  9],
...                      [15, 16],
...                      [22, 23]])
... B = np.lib.stride_tricks.as_strided(A, shape=(A.shape[0] - template.shape[0] + 1, A.shape[1] - template.shape[1] + 1) + template.shape, strides=A.strides*2)
... match, = zip(*(B == template).all((-2, -1)).nonzero())

>>> match
(1, 1)
@wim efficient if you have the memory and there's an exact match ^
(roughly O(A.size**2) in memory)
 
anyways, I added this opinionated prefatory remark to my answer:
> This is a bad idea, don't do it. Instead, use a regular dictionary and use dict.setdefault where apropos, so when keys are missing under normal usage you get the expected KeyError. If you insist on getting this behavior, here's how to shoot yourself in the foot:
 
12:51 AM
I've never heard "apropos" in that context. I thought it exclusively meant "speaking of which"
 
1:01 AM
@AndrasDeak scratch that. O(A.size * template.size) memory.
 
oh there you go... just had to reboot Windows for things to work... sighs
(probably should remember by now that windows requires a reboot for some things to work even though it shouldn't really... blah blah blah...)
only time I think I've had to reboot Linux is when I've recompiled the kernel
 
 
3 hours later…
wim
4:15 AM
@AaronHall Right, but the data structure shouldn't need to rely upon resolving its own name in order to work properly. Imagine that all existing dicts would just stop working if you do del dict. That's just unbinding a name, no reason for it to break the container completely (especially when this wart that can be trivially avoided with 2 more lines)
 
4:40 AM
The CoC help page says that we have the option of contacting moderators in chat. Is there any particular room for this?
 
4:51 AM
@wim imagine we delete a class name from a module's namespace. Does that make any sense either? Or any other function? Why delete this one?
It feels like a made-up problem.
that doesn't really exist...
bedtime!
 
5:52 AM
cbg guys o/
So I gave a lot of thought about my mongodb problem.. And finally decided to update record right after inserting it. The update will add one more attribute with ObjectId hex string as its value.
With this approach, there might occur a race condition that, after inserting, update never happened because of some reason.
 
wim
phew ... hard one
 
congrats?
 
wim
@AaronHall I delete things from namespaces all the time, for various reasons. And if you delete a class from a module namespace, then you don't really expect existing instances of the class to just blow up. I can already see I won't convince you here, so let's just agree to disagree.
 
6:33 AM
cbg
def hunt(n):
    datasets = []
    for item in data:
        print(f"Extracting Provider {item[0]}")
        r = requests.get(item[5])
        soup = BeautifulSoup(r.text, 'html.parser')
        suk = [item.get_text("\n", strip=True).replace('\n[', ' [')
               for item in soup.findAll('div', {'id': 'category-tree'})]
        datasets.append(suk)


thread = futures.ThreadPoolExecutor(max_workers=20)
speed = thread.submit(hunt, range(63))
i not see 20 threads starts together in same time? it's still the same. kindly correct my wrong.
 
6:57 AM
why do you expect 20 threads? you only submit one task.
 
so in range(63) it's not mean to make 20 threads then 20 and so on?
 
wim
@MisterMiyagi no interest in AoC?
 
> submit(fn, *args, **kwargs)
> Schedules the callable, fn, to be executed as fn(*args **kwargs)
 
wim
and don't call your pool "thread" what terrible variable names
 
@wim am just testing it.
 
7:02 AM
@wim Still have a pile of toy projects that are first in line. Didn't plan to do AOC with Python anyways -- I'd like to try Rust a bit more.
 
7:20 AM
hi,i am trying to read in text from a website and some of the text is formatted e.g. bold. is there a way i can unformat the text so it is just plain text?
 
7:33 AM
@ThelurkerLurker What are you using to read the text? Can you provide a bit more information?
 
user10984358
7:46 AM
if you are reading it with BS4 then you will get the text <b>text</b> you want to change the source to remove the <b> tag?
 
its a reddit api (PRAW) that can read submissions - some of the responses i am getting are bolded - i want it to be plain text
 
how is it bolded? <b>text</b> or [b]text[/b] or **text** or ...?
 
@Aran-Fey I think Reddit is markdown, might be their own kind though.
 
so i actually tried to encode as utf 8 to see what im looking at
so one that works fine is :b'frustrating is what it is' /
frustrating is what it is
but with this item it looks like
𝙗𝙚𝙚𝙥 𝙗𝙚𝙚𝙥 𝙡𝙚𝙩𝙩𝙪𝙘𝙚
and as utf-8:
b'\xf0\x9d\x99\x97\xf0\x9d\x99\x9a\xf0\x9d\x99\x9a\xf0\x9d\x99\xa5 \xf0\x9d\x99\x97\xf0\x9d\x99\x9a\xf0\x9d\x99\x9a\xf0\x9d\x99\xa5 \xf0\x9d\x99\xa1\xf0\x9d\x99\x9a\xf0\x9d\x99\xa9\xf0\x9d\x99\xa9\xf0\x9d\x99\xaa\xf0\x9d\x99\x98\xf0\x9d\x99\x9a'
i suppose i could do a check that looks to see if \ in the utf-8 encoding and ignore that one if i cant convert it
 
Why do you have to encode it to see what it looks like...?
that text has no formatting as far as I can tell. It's just a sequence of unicode characters
>>> text = b'\xf0\x9d\x99\x97\xf0\x9d\x99\x9a\xf0\x9d\x99\x9a\xf0\x9d\x99\xa5 \xf0\x9d\x99\x97\xf0\x9d\x99\x9a\xf0\x9d\x99\x9a\xf0\x9d\x99\xa5 \xf0\x9d\x99\xa1\xf0\x9d\x99\x9a\xf0\x9d\x99\xa9\xf0\x9d\x99\xa9\xf0\x9d\x99\xaa\xf0\x9d\x99\x98\xf0\x9d\x99\x9a'.decode()
>>> import unicodedata
>>> unicodedata.name(text[0])
'MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL B'
well, I guess the formatting is built into the character there
 
8:03 AM
im just trying stuff to see if i either convert this text or i think simpler would be to just ignore it
 
>>> unicodedata.normalize('NFKD', text).encode('ascii', 'ignore').decode()
'beep beep lettuce'
 
thank you!
 
Hello all, I'm new here. And I have a Python(Tkinter) doubt. It is small one that is why I couldn't posted as a question in the forum.

While using Tkinter, If I want to have multiple functions assigned to a single button:

>>> self.testbutn = Button(self, text="test", command = lamda:[func1(), func2()])

how many functions can we be able to give? I probably need 4 functions to be combines.
 
As far as I can tell, tkinter buttons only accept 1 function
 
8:18 AM
which is not really a problem because you can just write a function that calls multiple other functions
which is exactly what every answer in the question you linked is doing
 
But there is particular answer with 19 up votes, which he has used single line command
that is what I have mentioned in my question
 
...so? It's still a single function that calls multiple other functions
 
So, you are saying, he might have defined a function for that line.
 
Yes, lambda defines a function
>>> command = lambda:[func1(), func2()]
>>> command
<function <lambda> at 0x000001E9A41016A8>
 
alrighty. Bulb turned on. I should test it
thanks though
 
9:01 AM
Hi. I have been trying to replace the values of a column in a dataframe like: df['from'] = df['from'][:-4], I just want to keep last 4 characters from each string of column 'from' but this won't work
 
Does anyone know a good tool to convert a PDF to CSV file? I was asked to do calculations of a data that is found on a 30 pages long document?
 
has anyone used moviepy? I am trying to concatenate 3 video clips - which it does successfully however it extends clip 2 before starting clip 3. e.g. if the last frame in clip 2 is 5 seconds, once concatenated the last frame in clip 2 before starting clip 3 is about 15 seconds. how can i stop this from happening?
	from moviepy.editor import VideoFileClip, concatenate_videoclips

	clip3 = VideoFileClip("1.mp4")
	clip2 = VideoFileClip("2.mp4")
	clip1 = VideoFileClip("3.mp4")

	final_clip = concatenate_videoclips([clip1,clip2,clip3])
	final_clip.write_videofile("final.mp4")
 
sounds like a bug
> You have many other options there (see the doc of the function). *function docs are neither linked nor otherwise findable*
Thanks, moviepy docs. Great job.
 
9:16 AM
going to try CompositeVideoClip - i found a reference to this issue in stackoverflow.com/questions/58236963/…
 
@JaakkoSeppälä there is no straight forward and fail-safe way to export data from pdf. is transcribing it by hand impossible? because in my experience that's usually faster and about as safe as trying to find a programmatical solution
 
except now that breaks my audio
 
Hi. Maybe someone is able to help here: stackoverflow.com/questions/59301357/… ?
 
9:36 AM
@MikaelKen please have a look at the room rules. Your answer is very new, give people on SO time to answer.
 
Maybe add a python tag
Blows my mind how many people come here to advertise their questions after they neglect to properly tag it
 
be advised that "<thing I want> won't work" is not a clear problem description, and asking multiple open ended questions is not a good way to get clear answers.
If you feel the need to nudge people to answer your question, please make sure your question is in a state that people will want to answer it.
 
@Arne I have to do a data analysis from data which is spread from several files with total length 1141 pages.
 
did you read this article already?
 
Sorry :0
 
9:59 AM
recbg
 
@Arne I tried the example PyPDF2. It gave me a warning "PdfReadWarning: PdfFileReader stream/file object is not in binary mode. It may not be read correctly. [pdf.py:1079]".
 
did you open the file with 'rb' mode, as in the example?
 
@JaakkoSeppälä sorry, I'm not an expert. I only entered your question into google and pasted the first link here that looked trustworthy 🙃
 
10:16 AM
Does someone know this: I have been trying to replace the values of a column in a dataframe like: df['from'] = df['from'][:-4], I just want to keep last 4 characters from each string of column 'from' but this won't work ?
 
11:13 AM
>>> df
               a
0         abasbs
1   asagsgagssgg
2  agagaagagsags

>>> df.a.str[:4]
0    abas
1    asag
2    agag
Name: a, dtype: object
note that [:-4] means "everything except last 4 characters", if you're telling the truth you need [-4:]
 
11:25 AM
yes, my bad. thanks
By the way, is there an easy way to add labeling to edges in networkx?
 
 
2 hours later…
2:03 PM
Hi everyone
I am trying to refresh data automatically into google sheets from salesforce
I am already aware of the G-Connector Salesforce add-on
However it allows only 15 refreshes as it is a trial version product
Can I do this using python and in the process overcome this blocker?
 
you can probably use python to pay for a higher tier
 
First I need to figure out what Salesforce is. Wikipedia says "Salesforce is the primary enterprise offering within the Salesforce platform". Ah.
 
Its a CRM software
 
Since "enterprise" means "efficient at extracting money from middle management", I suspect it will be difficult to find a totally free solution
Perhaps ask middle management to foot the bill for a full G-Connector license?
 
No other way then?
 
2:09 PM
Not necessarily, I just think it won't be exquisitely well-documented
For example when I google "salesforce api" I can't make heads or tails of the first five results
There's definitely an API for inserting data into Google Sheets, so if you can find an API for extracting data from salesforce, then the problem of "extracting data from salesforce and inserting it into Google Sheets" is 90% solved. You just have to glue them together.
... Call it 75% solved if you need the data to update the very instant that anybody makes any changes within the salesforce interface
Just run the updater every tenth of a second on a loop?
 
I'm sure there would be no throttling involved in that endeavour ;)
 
2:40 PM
cbg o/
 
2:50 PM
cbg
 
@OakDev I kicked you because despite my many explicit pushbacks you're trying to make others write code for you. That's not going to happen. Go learn python or some other language. I'm asking you as a room owner to leave us alone with this and similar problems.
 
And here I thought they were offering a finished script
 
As did I, but even so, his previous behaviour still fit the bill.
 
It crossed my mind that this was the meaning of the message, but considering their history I doubt it. And even if so, nobody asked for that except for himself, so this is just noise. Again.
I'm not going to err on the side of good faith with known problem users
 
Usually when people want to share code they're proud of, they'll just provide a github link or something, without asking if anyone wants to see it. I know that I, personally, force my animation projects upon an unwilling audience
 
2:55 PM
Speaking of which, you've been slacking with animations! We need them gifs :P
 
@Kevin Never squander the opportunity to impose your creativity on a unwilling audience!
 
Here's a half-baked one that I hoped would be more interesting than it is:
 
That looks nice
 
Quadtree? Neat!
 
It needs twice as much pizazz if I'm going to put it in my repository
 
2:58 PM
Can you get it to draw the circle by recurring down the quadtree until the closeness of the lines forms a solid (filled in) circle? Or would that end up too small?
 
@OakDev upon closer inspection I have realized that you have finally found someone to do your work for you. I apologize for kicking you a few minutes ago, I didn't expect that you'd have working code. I suggest that the next time you want someone to write your code for you, start on SO main and skip visiting this room with it.
 
Hi Everyone,
 
hello
 
nice :)
 
3:04 PM
Makes me want to try to toss a basketball through it on my phone...
 
wow that gif is awesome!
 
I guess my frustration is that it lacks thorough "continuity" -- for example, when the circle crosses the equator, a bunch of lines spontaneously appear in the new quadrant, with no easing or anything.
I could make the boundaries fade in from white to gray over the course of several frames, but then one orbital cycle would take 64 times as many frames
 
how does fading require additional frames? O.o
 
Perhaps you're envisioning it as the boundaries fading in slowly while the circle continues to move. What I'm proposing is that the circle's movement halts until the boundary fades in completely. I could do the "async fading" of the former, but I suspect the result would no longer recognizably resemble a quadtree
 
user11867329
@AndrasDeak I have a useful code. I am simply asking if anyone needs it. Sorry for asking.
 
3:14 PM
It's alright, but nobody does. Most people here can write their own code when they need it.
 
I can't, I'm incompetent! \o/
 
Besides, all my code is going to spontaneously combust in 20 days, so what's the point to it all... descends into nihilism
 
What, are you writing in Python 2?
 
Yeah, baby!
 
3:17 PM
@KieranMoynihan think of yourself as Goku. Once you let go of these burdens you'll soar like a dragon.
 
user11867329
Or Rock Lee
 
I'll be able to ride a walrus into the sunset ( :=)
 
don't overdo it! :P
 
no no, that's just the spirit
 
user11867329
@Arne < ^
 
3:24 PM
Today is documentation day for me.. Fun, fun.
 
it's mid-term grading day for me, so perhaps you're better off
 
I have a 12 hour corporate training course that I ought to be slogging through right now
 
That's true, at least I only have to write about my own messy code ;)
 
Here's me hoping the winterbash knitting thing would output a pattern, sadly, I am disappointed.
 
3:27 PM
Followed by two additional training courses, which I hope hope hope are five minutes long each
Don't dash my hopes. Let me watch the sunset, and tell me about the farm where the bunnies play...
 
@AndrasDeak Ooh fun! What do you teach?
 
a kind of intro mechanics
 
Cool :)
 
Can you teach me how to change my oil? :-P
 
@Kevin Not sure if it's that kind of mechanics... but you never know!
 
3:31 PM
@Kevin I wish :D
 
From TV I know the approximate steps are 1) locate cap; 2) unscrew cap; 3) rapidly dodge the stream of gunk that falls out, or else become doused by black goo and mug for the camera
Step 4 is unclear to me because nobody has ever dodged the gunkstream
 
0) lift the car...
a lot of students would die at that step
 
If it's a black comedy, become pinned by the car and convince your small child or animal companion to get help, with hilarious results
The odds of rescue are in your favor, but make peace with the possibility that you will grow a very long white beard or become a skeleton or both
 
@Kevin 0) Take out new mortgage on house, 1) Go to dealership, 3) Request oil change, 4) Hand over approximately half of funds raised by new mortgage.
 
just change the car
 
3:34 PM
"Go on Scruffy! Go get help!" Scruffy runs off and comes back shortly with the can of beer you trained him to retrieve
I guess that's help of a kind.
 
anesthesia
 
"Not what I wanted exactly, but as long as we're here..." [crack, sip, ahh]
 
The real joke here is that Scruffy is actually your small child, not your animal companion ;D
 
@MisterMiyagi the true devops mentality. no need to wait till the horse has broken a leg before you shoot it, as soon as it starts to look funny we get out the guns
 
Turning them off and on again wasn't working as expected...
 
3:51 PM
@MisterMiyagi This is how I change the ink in my inkjet printer
 
@PaulMcG That's so inefficient; you have to move all the cords. No, you buy a new printer, then swap the ink from one to the other. This is the most cost/energy efficient method.
 
4:25 PM
@KieranMoynihan What code are you documenting? What's the project about?
 
he's working on a white paper about using pythoff in 2020
 
@Dodge A system for automated ingestion and the linking together and execution of various processing tools in an order dependent on input data
So that things can happen without a human needing to be in the office.
 
I'm sure Bob will be relieved that he can finally go home and see how much his little boy has grown over the years
 
Oh, like a Rube Goldberg machine but with code, nice :)
 
Sure... But I would take issue with "intentionally designed to perform a simple task in an indirect and overly complicated way".
 
4:32 PM
Yes, of course, no offense intended, I was probably thinking of my code when I said that
 
This corporate training site has menu buttons with a granite texture and I am 100% down with this 1997 web aesthetic
 
Ha, I'm not saying my implementation probably isn't more complicated than it has to be, but it's not intentional :)
 
Extremely thrown for a loop that it recommends Chrome rather than IE since the latter is endemic in my industry
How am I supposed to immerse myself in a last-century experience if I'm using a browser from this century? My mind may disintegrate under the strain
 
@Kevin never heard that idiom before
 
I was kind of hoping Firefox edged in there for 1999, but sadly not, only 2002.
 
4:42 PM
'99 was more of an Opera time if you felt hipstery
 
Module 1 of this training is giving advice on what to do in case of catastrophic widget unreticulation during the manufacturing process. Although I work closely with the widget database, I have never been to the widget factory, since it is 500 miles away.
If I ever do go there, I'll remember the training and dodge the red-hot flying splines with ease
 
sounds like great use of your time
 
It probably reduces my employer's liability insurance premium, so it's a rational choice from their end
 
I'm so glad the internet stopped using flash to play video/audio </random_thought>
 
I want to agree in principle, but. My home laptop refuses to run WebGL applications, so my web experience is gradually being replaced with gray boxes saying "sorry, not supported"
 
4:53 PM
huh o.O
 
But webGL is awesome! A month or so ago I leared about some really cool modules you can use to create fancy 3d visualizations in the browser. First time I contemplated switching to jupyter notebooks.
example: k3d
 
It's one of the reasons why sooner or later I'm going to bring Ol' Lappy behind the shed while I tearfully load my hunting rifle
 
it'll be in a better place
 
A related frustration: I have some .swf files of games which I have a sentimental attachment to, which I can't figure out how to run any more, and I am resentful of this
I haven't tried very hard, mind
 
oh, the good old days
 
4:56 PM
flash still works perfectly fine on both Windows and linux in my experience
 
Yeah, my firefox reluctantly, but allows playing flash
have you tried just opening it with a browser or something?
 
local swf files regularly cause problems though. Like opening a download dialog instead of being played in the browser
 
Huh!
 
I did try "right click -> open with -> firefox" . I forget what the result was, but it wasn't "Kevin enjoys his nostalgic game"
 
something something python http server
 
5:01 PM
@wim You know what, I hear you. I have grepped (actually "glimpsed") a few million lines of Python code for ^del and there's fewer that 100 hits. When it's del global_name, most of the time it looks super-hacky. When in a config, it's done to not pollute the user shell, which would seem to be your sort-of use-case. Is that common enough to edit my answer to handle the problem? I don't feel like it is... yet. But I'll think about it some more, thanks for the feedback.
Irrelevant: there's many more hits for inefficacious del local_name in local namespaces, usually right before exiting the code blocks...
 
Is the python-2.x tag going to be removed from this room come the new year?
 
no idea
if I had to guess, probably not
 
Opening swfs with firefox was never a perfect user experience -- it used to be that I could play the game, but it might be oddly stretched, and elements that would usually be offscreen were visible past where the border ought to have been. It was actually kind of neat to see what was left on the cutting room floor.
Much like seeing the funky sprite flickering on the edge of an NES game that was designed for TVs with substantial overscan
 
oh, I forgot: Firefox actually no longer saves data for local swf files, so I had to create a tiny HTML page for every game I wanted to save locally
so maybe "still works perfectly" wasn't entirely true
 
the obvious solution is to only play roguelikes
 
5:12 PM
To play Colonization, your computer must have:
• a 386SX processor or better (For best play, we recommend at least a full 386 with a system speed of 33MHz or more),
• at least 575,000 bytes (approx. 565 Kb) of free conventional memory,
• VGA graphics or better, and
• DOS version 5.0 or higher.
 
awww, 33 MHz, how adorable
 
What a game.
Even Ol' Lappy can probably run that.
 
I had a heck of a time getting Myst running a while back because it needed Quicktime 5 specifically, and I had like Quicktime 42
>>> "Quicktime 42" < "Quicktime 5"
True
 
Hi all. I know nothing about Python and have just installed it on a Windows 10 box because when attempting to run the npm 'node-gyp' it complains it cannot find the executable. I even added the Python location to the path as C:\apps\Python\Python38-32. However when I run the command it still says it cannot find it.
Should the path be pointing directly to the python.exe file or just the parent folder?
 
@Kevin hahaha, nice lazy programming
 
5:29 PM
(Ok, in reality the most recent QuickTime is 7, so the problem wasn't literally because of lazy string comparisons)
 
user10984358
its 10.x actually :p
 
@Elijah Is C:\apps\Python\Python38-32 a directory or the path to your python .exe?
 
user10984358
unless you aren't talking about QuickTime Player
 
@Elijah Based on github.com/felixrieseberg/windows-build-tools/issues/56 it seems like this is a common issue. Unfortunately I see a lot more "hey guys, none of the previous suggestions helped, any ideas?" messages than "this will definitely fix it" messages
 
@TheNamesAlc Only if you're a maccer
 
5:31 PM
@Elijah Whoops, I didn't even see that question. It should point to the parent folder.
 
user10984358
I remember having to install QuickTime on windows during my school days to play .mov files, did they stop releasing it for windows like they did with safari?
 
user10984358
as for swf games I used to right click drag them to an f icon this was some flash exe that was a flash based application, they came with those cd's you get for digital magazines. I do open with that and they worked fine, I doubt you can get such exe's nowadays
 
Last release for Windows was 7.7.9 for Vista and Windows 7 Platform Support
 
Google tells me that you can still get a standalone flash player, although the download link is in an obscure corner of the site
 
user10984358
I dont see a compelling reason to use that in a Mac as well, I just use QuickTime as a "cheap free wired airplay"
 
user10984358
5:39 PM
even though mobile games are "this gen" flash games they dont pull me like flash did
 
user10984358
right click -> loop (or next?) was like an universal cheat, it lets you skip levels kinda lol
 
@Aran-Fey It is a directory
 
Did you reboot after changing your PATH?
 
5:57 PM
Hello everyone! Does PyAV support an array of bytes as an input value?
 
My gut says "yes" but my brain says "try it and see what happens"
 
I only shut down the terminals and reopened them. That usually all I've ever had to do to get the environment updates. I'm on a company computer and I cannot tell the difference if something is locked down or if something is not configured correctly. Such a nightmare. I'll try rebooting just to cross that off the list. I actually rebooted now to come back and find this message did not get pushed. Corporate stuff prevents a lot of websites from working correctly. I have to click send multiple times to get it to work.
Also, it still does not figure out that Python is there when I run the command.
but running a call to python itself on my own it finds it.
 
@Kevin haha, okay :)
 
6:13 PM
This training course's quiz asked me to order the seven kinds of widgets in order of most bleggful to most grubeful, which you can only really do on your first try if you've been paying attention and taking notes. I guess they're being serious about this.
Not like your usual course whose quiz is like "which of these is the most bleggful kind of widget? A) grube-widget B) blegg-widget C) Kevin Bacon D) all of the above"
 
user11867329
@AndrasDeak Don't you think the answer could benefit the community? What's your opinion?
 
You mean the answer to the question you asked the other day? It's already benefiting our community -- anyone that needs a csv-to-xml parser can search for it on the main site :-)
There may be thousands of users that might help themselves in this way! In comparison, asking in here "does anyone need this cool thing?" will help, in the very best case scenario, about seven users. So from that perspective, the community is already well-served even without any kind of signal boosting.
 
user11867329
6:29 PM
@Kevin As previously mentioned, I checked about 30 pages of "csv xml" questions and none require no config, like the one C.Nivs gave. Which is INDEPENDENT OF COL/ROW #.
 
user11867329
That's just my two cents.
 
user11867329
It's literally all "This works fine for my specific csv"
 
user11867329
with static tags
 
user11867329
I could edit my question.
 
If the post really is useful to a wide audience, then it will rise to the top on its own accord :-)
 
6:33 PM
hi, i am trying to convert a python script into a function and I want to hardcode the arguments:
e.g. argparser.add_argument("--file", required=True, help="file to upload")
there are a few of these argparser items
def initialize_upload(youtube, options):
  tags = None
  if options.keywords:
    tags = options.keywords.split(",")

  body=dict(
    snippet=dict(
      title=options.title,
      description=options.description,
      tags=tags,
      categoryId=options.category
    ),
    status=dict(
      privacyStatus=options.privacyStatus
    )
  )
 
user11867329
@Kevin No, because it was closed :))
 
im unsure what 'options' is? a dictionary?
 
Well shucks :-( The good news is, even a closed post is indexed by Google
@ThelurkerLurker I don't think it's a dictionary, because dictionaries usually don't have keywords or title or description attributes. Perhaps you can look at the code that calls this function and see where the object is being created.
And/or stick a print(type(options)) inside the function, and see what gets displayed when you run the program
 
user11867329
@Kevin Not indefinitely, though, right? It was up for less than a day.
 
Good question. I've never been totally clear about what happens to closed posts in the long run. I know closed-as-dupe posts hang around pretty much indefinitely...
 
6:49 PM
My first version of today's part 2 took around 4.5 hrs to run. I'm struggling with ideas to pare that down.
 
Quiz: what is the final production step of widget manufacture?
Me: I forget, but it's on the final bullet point of the previous slide, so I'll just go back and check. [click]
previous slide: there are fifteen steps in widget manufacture, starting with resource acquisition... [over the next three minutes, the fifteen bullet points appear one at a time at a snails pace]
Me: what crime have I performed to merit this punishment.
 
@davidism Oops, I think my request for rigor on that answer hurt the answerer's feelings
I wasn't trying to badger him, I just wanted objective verification ;_;
 
7:24 PM
Quiz: How many steps are involved in the process of reticulating splines?
Me: [I ctrl-f through the course transcript for "process of reticulating splines". Zero hits.]
Me: ... [I ctrl-f for "spline reticulation process". One hit.]
Me: ooh, they really went all out for this one.
Rearranging the order of words and picking synonyms to foil ctrl-f'ers is an advanced tactic
 
@Kevin if you pass do we get to call you "certified"?
 
"Certified Kevin"
 
I already am certifiable, but you'll have to trust me, because I ate the documents that proved it
 
cer·ti·fi·a·ble
adjective
1. able or needing to be certified.
**2. officially recognized as needing treatment for mental disorder.**
Whatever, formatting is not my strong suit
 
summons the vast powers of certification... that's all I remember from the training...
 
7:34 PM
@OakDev no
 
7:48 PM
24 hours ago, by roganjosh
On a similar topic, I decided today that I'm done with parsing a bajillion spreadsheets, I'd rather have something embedded in my app that I can just replace the existing spreadsheets with, but with my own validation as data is entered. I've settled with jexcel for now to start researching the event hooks. I don't suppose anyone has done something similar and has other suggestions?
Well, in only 1 day, and with JS ability little more sophisticated than the scrawlings on a public toilet wall, this seems like a really neat solution to do away with spreadsheet parsing
Quite a lot of work on the Flask side to adjust to all the different things that people might want to do, but they can add rows/columns anywhere they like to their heart's content and I don't lose sight of the cells I actually care about. A surprisingly happy day :)
 
@roganjosh jexcel looks pretty nice, good find!
 
The only thing it lacks are tabs, so there's extra effort in propagating changes through the "sheets" (oh, and $ from Excel from basic formulas). But, provided that you start with a set template each time, you can track every movement in rows/columns and there's a pre-change hook that you can test to make sure they don't delete the row/column of things you care about before they do it
 
wim
8:22 PM
anyone else get annoyed by the totally bunk physics in the last AoC?
 
Are you implying that real-world particles aren't gravitationally attracted to each other with the same force regardless of mass or distance? I'm skeptical
 
@Kevin David Icke's your guy, then. He'll open your eyes
 
@wim I was only annoyed by the "energy" :'(
 
One interesting thing about the bunk physics is that gravity is effectively strongest when two particles have two spatial coordinates in common, and one different. So inhabitants of that universe could perform simple experiments to determine the axes of orientation of spacetime.
Unlike in our universe, where the is no apparent way to determine the universal "up" direction
 
I'm not sure I understand that first part, but I had a long day
 
8:33 PM
I haven't explained myself very rigorously. Perhaps I can construct an illustrative example.
 
[0,0,0] vs [0,0,n] will be attracted [0,0,+-1]. [0,0,0] vs [n,n,n] will be attracted [+-1,+-1,+-1].
 
wim
O and (1, 1, 1000000000000) will still be attracted the same
the n-body analogy was really poor and forced
 
Once I do the math it may turn out that axis-aligned particles have the weakest gravity
 
Well it is an n-body problem. Just not very planetary.
@Kevin I could understand that
 
wim
it could have been a really interesting problem if gravity was related to distance
 
8:36 PM
@wim I suspect the programming puzzle aspect would've been unsolvable
 
wim
yeah I get that, the problem goal would have to be a different one, but I still think you could make an interesting puzzle out of the system
 
huh, I looked at reddit now and those orbits look pretty interesting
 
Consider two particles A(x=0, y=0) and B(x=5,y=0), initially at rest. After two seconds, they have passed one another in space and have velocities of (2, 0) and (-2,0) respectively. Then, consider two particles C(x=0,y=0) and D(x=4,y=3). After two seconds, they have passed one another with velocities (2,2) and (-2,-2) respectively.
The initial distance between A and B is five units. The initial distance between C and D is five units. But after two seconds, the C&D system has considerably more total velocity than the A&B system.
 
I'm not even sure Euclidean metric is fair here
In any case we agree that axis-aligned is "weaker", whatever that means, right?
 
wim
I wish complex numbers were iterable in python
 
8:41 PM
@wim they should only be as iterable as tuples :P
 
wim
I am so sick of writing (int(z.real), -int(z.imag))
 
So write a helper or a complexint helper class?
 
wim
grrr
don't be so sensible
I'm surprised there hasn't been a quaternion-themed puzzle in AoC yet. Seems right up his alley.
 
@wim Okay. So tuple(map(int, map(partial(getattr, z), ['real', 'imag'])))
 
wim
I'm gonna pretend I didn't see that.
 
8:47 PM
@AndrasDeak Ok, then let's use the manhattan metric to establish distance. A(x=0, y=0) passes by B(x=8, y=0) at T=3. Meanwhile, C(x=0, y=0) passes by D(x=4,y=4) at T=2. So despite both systems' particles initially having a manhattan distance of 8, the collision in the first system occurs one second later than the collision in the second system.
 
heh
 
The only valid response would be to really slowly open a drawer, pull out a red marker and slowly put a cross against the interview sheet
 
00:00 - 21:0021:00 - 00:00

« first day (3344 days earlier)      last day (1605 days later) »