workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
```import calendar, datetime; calendar.month_name[datetime.date.today().month]```
2017-10-25T03:13:00.000237
Cristy
pythondev_help_Cristy_2017-10-25T03:13:00.000237
1,508,901,180.000237
98,203
pythondev
help
Help - I cant seem to get PyDev to recognise proper completions of RxPy - Observable.subscribe() is the only Observable completion that seems to work, Observable.create is not there ?? I've pip installed, put the egg file in pythonpath and "import rx" works fine - help
2017-10-25T05:27:28.000294
Wanita
pythondev_help_Wanita_2017-10-25T05:27:28.000294
1,508,909,248.000294
98,204
pythondev
help
<@Wanita> FYI we have <#C7PFU2B2Q|rxpy> channel created not so long ago :slightly_smiling_face:
2017-10-25T05:40:52.000510
Collette
pythondev_help_Collette_2017-10-25T05:40:52.000510
1,508,910,052.00051
98,205
pythondev
help
Hi all . I need slack nodejs group can i help me ?
2017-10-25T08:21:28.000258
Neomi
pythondev_help_Neomi_2017-10-25T08:21:28.000258
1,508,919,688.000258
98,206
pythondev
help
What's the code that spit that out?
2017-10-25T11:41:21.000881
Lory
pythondev_help_Lory_2017-10-25T11:41:21.000881
1,508,931,681.000881
98,207
pythondev
help
do you want the full error stack
2017-10-25T11:43:18.000249
Chong
pythondev_help_Chong_2017-10-25T11:43:18.000249
1,508,931,798.000249
98,208
pythondev
help
that would probably be helpful
2017-10-25T11:44:18.000620
Lory
pythondev_help_Lory_2017-10-25T11:44:18.000620
1,508,931,858.00062
98,209
pythondev
help
and the code itself that you were running that initially threw an error if that's not the original trace back
2017-10-25T11:44:45.000287
Lory
pythondev_help_Lory_2017-10-25T11:44:45.000287
1,508,931,885.000287
98,210
pythondev
help
from the list here: <https://teamtreehouse.com/library/topic:python/q:python> which ones do you think i should go for next, i have done the python basics. and the practice ones
2017-10-25T11:52:13.000478
Amee
pythondev_help_Amee_2017-10-25T11:52:13.000478
1,508,932,333.000478
98,211
pythondev
help
<@Amee> I always think the best way to learn is to work on a project that interests you. In building it out you will learn several concepts and strengthen your knowledge on concepts you already know
2017-10-25T12:08:57.000554
Lory
pythondev_help_Lory_2017-10-25T12:08:57.000554
1,508,933,337.000554
98,212
pythondev
help
Anybody seem this issue with pyOpenSSL on Ubuntu 14.04?
2017-10-25T12:21:43.000427
Mallie
pythondev_help_Mallie_2017-10-25T12:21:43.000427
1,508,934,103.000427
98,213
pythondev
help
`AttributeError: 'module' object has no attribute 'Cryptography_HAS_SSL_ST'`
2017-10-25T12:21:45.000319
Mallie
pythondev_help_Mallie_2017-10-25T12:21:45.000319
1,508,934,105.000319
98,214
pythondev
help
It's come out of nowhere, and doesn't happen on other systems
2017-10-25T12:21:58.000002
Mallie
pythondev_help_Mallie_2017-10-25T12:21:58.000002
1,508,934,118.000002
98,215
pythondev
help
&gt; 14.04 :open_mouth:
2017-10-25T12:26:27.000761
Suellen
pythondev_help_Suellen_2017-10-25T12:26:27.000761
1,508,934,387.000761
98,216
pythondev
help
you should update openssl
2017-10-25T12:27:10.000569
Suellen
pythondev_help_Suellen_2017-10-25T12:27:10.000569
1,508,934,430.000569
98,217
pythondev
help
That is what I ended up doing successfully after a few tries - turns out the overall issue was an incompatibility between `cryptography` and `pyOpenSSL`
2017-10-25T12:30:17.000353
Mallie
pythondev_help_Mallie_2017-10-25T12:30:17.000353
1,508,934,617.000353
98,218
pythondev
help
But it was silent, and neither of the versions had changed (or at least, I hadn't planned on them changing)
2017-10-25T12:30:32.000477
Mallie
pythondev_help_Mallie_2017-10-25T12:30:32.000477
1,508,934,632.000477
98,219
pythondev
help
good ol' revision incompatibility
2017-10-25T12:31:09.000629
Lory
pythondev_help_Lory_2017-10-25T12:31:09.000629
1,508,934,669.000629
98,220
pythondev
help
So now they are both up-to-date I guess? yay lol
2017-10-25T12:33:25.000699
Mallie
pythondev_help_Mallie_2017-10-25T12:33:25.000699
1,508,934,805.000699
98,221
pythondev
help
Go check the Tracks area and do the Learn Python track
2017-10-25T12:45:41.000313
Frieda
pythondev_help_Frieda_2017-10-25T12:45:41.000313
1,508,935,541.000313
98,222
pythondev
help
So, I find myself recreating an existing Java application in Python. One aspect is to generate an output XML file that must conform to a DTD file. I've been using lxml.etree for generating the xml file. I have one problem. The DTD requires certain types of nodes to occur before other types. Before I start write sorting logic, is there anything that would consult a specified DTD and sort accordingly?
2017-10-25T14:10:43.000306
Margrett
pythondev_help_Margrett_2017-10-25T14:10:43.000306
1,508,940,643.000306
98,223
pythondev
help
Assuming no, any best practice on sorting peer nodes by node-type?
2017-10-25T14:11:55.000098
Margrett
pythondev_help_Margrett_2017-10-25T14:11:55.000098
1,508,940,715.000098
98,224
pythondev
help
<@Margrett>, I’m drawing a blank, sorry
2017-10-25T14:36:18.000028
Meg
pythondev_help_Meg_2017-10-25T14:36:18.000028
1,508,942,178.000028
98,225
pythondev
help
are you looking for something like with spring beans xml configuration?
2017-10-25T14:36:39.000670
Meg
pythondev_help_Meg_2017-10-25T14:36:39.000670
1,508,942,199.00067
98,226
pythondev
help
something along the lines of importing <http://www.springframework.org/dtd/spring-beans.dtd> and going from there?
2017-10-25T14:37:37.000653
Meg
pythondev_help_Meg_2017-10-25T14:37:37.000653
1,508,942,257.000653
98,227
pythondev
help
<@Margrett> Sorting? I'm confused, why don't you just define your schema or add the nodes in the correct order?
2017-10-25T14:41:14.000003
Mallie
pythondev_help_Mallie_2017-10-25T14:41:14.000003
1,508,942,474.000003
98,228
pythondev
help
i don’t think so. you’ll have to generate the file and then validate it.
2017-10-25T14:41:16.000512
Johana
pythondev_help_Johana_2017-10-25T14:41:16.000512
1,508,942,476.000512
98,229
pythondev
help
unless there is something new. I used to do HL7 messaging which had a similar workflow.
2017-10-25T14:41:34.000338
Johana
pythondev_help_Johana_2017-10-25T14:41:34.000338
1,508,942,494.000338
98,230
pythondev
help
Oh I re-read - to move from invalid to a valid schema, :disappointed:
2017-10-25T14:41:42.000320
Mallie
pythondev_help_Mallie_2017-10-25T14:41:42.000320
1,508,942,502.00032
98,231
pythondev
help
Anything trying to be more clever than <@Johana> suggestion is probably just going to make things worse
2017-10-25T14:42:56.000223
Mallie
pythondev_help_Mallie_2017-10-25T14:42:56.000223
1,508,942,576.000223
98,232
pythondev
help
it would be hard to catch all the edge cases.
2017-10-25T14:43:35.000195
Johana
pythondev_help_Johana_2017-10-25T14:43:35.000195
1,508,942,615.000195
98,233
pythondev
help
you might be able to do something creative with a jinja2 template.
2017-10-25T14:44:23.000135
Johana
pythondev_help_Johana_2017-10-25T14:44:23.000135
1,508,942,663.000135
98,234
pythondev
help
i did that once with some HL7 messages.
2017-10-25T14:44:45.000451
Johana
pythondev_help_Johana_2017-10-25T14:44:45.000451
1,508,942,685.000451
98,235
pythondev
help
``` {% for person in persons %} &lt;person&gt; &lt;name&gt;{{ person.name }}&lt;/name&gt; &lt;/person&gt; {% endif %} ```
2017-10-25T14:51:56.000657
Johana
pythondev_help_Johana_2017-10-25T14:51:56.000657
1,508,943,116.000657
98,236
pythondev
help
<@Margrett> :point_up: I don’t know how much your data is changing but your schema definition should help you build the template. Then all you need to do is pass in all the data and it automagically shows up in the right order…
2017-10-25T14:54:12.000280
Johana
pythondev_help_Johana_2017-10-25T14:54:12.000280
1,508,943,252.00028
98,237
pythondev
help
then you don’t even have to fiddle with any xml at all just data. :wink:
2017-10-25T14:55:43.000168
Johana
pythondev_help_Johana_2017-10-25T14:55:43.000168
1,508,943,343.000168
98,238
pythondev
help
Thanks for the responses. Part of the tools purpose is to transform unstructured data from old systems into a nice tidy XML that our product understands.
2017-10-25T15:11:12.000049
Margrett
pythondev_help_Margrett_2017-10-25T15:11:12.000049
1,508,944,272.000049
98,239
pythondev
help
I'm converting it form a pure GUI to a backend python module + GUI
2017-10-25T15:12:06.000207
Margrett
pythondev_help_Margrett_2017-10-25T15:12:06.000207
1,508,944,326.000207
98,240
pythondev
help
So, I don't know what wacky things my end-users are going to do.
2017-10-25T15:12:23.000035
Margrett
pythondev_help_Margrett_2017-10-25T15:12:23.000035
1,508,944,343.000035
98,241
pythondev
help
you might also look into what capabilities pycharm has with xml. it is quite powerful when it comes to xml.
2017-10-25T15:13:03.000151
Johana
pythondev_help_Johana_2017-10-25T15:13:03.000151
1,508,944,383.000151
98,242
pythondev
help
I think I've settled on adding a hidden `_sort_rank = integer` to each of my ~40 object types
2017-10-25T15:13:07.000157
Margrett
pythondev_help_Margrett_2017-10-25T15:13:07.000157
1,508,944,387.000157
98,243
pythondev
help
Then, using bisect to do sorted inserts as objects are child objects are added
2017-10-25T15:13:35.000119
Margrett
pythondev_help_Margrett_2017-10-25T15:13:35.000119
1,508,944,415.000119
98,244
pythondev
help
I wasn't planning on sorting that early, but I'm now realizing it could have a hidden payoff in the GUI phase
2017-10-25T15:13:55.000114
Margrett
pythondev_help_Margrett_2017-10-25T15:13:55.000114
1,508,944,435.000114
98,245
pythondev
help
looks like a fun challenge.
2017-10-25T15:14:03.000452
Johana
pythondev_help_Johana_2017-10-25T15:14:03.000452
1,508,944,443.000452
98,246
pythondev
help
except for the xml part.
2017-10-25T15:14:11.000312
Johana
pythondev_help_Johana_2017-10-25T15:14:11.000312
1,508,944,451.000312
98,247
pythondev
help
xml bleh.
2017-10-25T15:14:18.000375
Johana
pythondev_help_Johana_2017-10-25T15:14:18.000375
1,508,944,458.000375
98,248
pythondev
help
Lol, XML has been my constant love/hate relationship for ~10 years.
2017-10-25T15:14:36.000175
Margrett
pythondev_help_Margrett_2017-10-25T15:14:36.000175
1,508,944,476.000175
98,249
pythondev
help
but i know how it is. HL7 was for health system integration and it was the most complex xml crap i have ever dealt with.
2017-10-25T15:14:47.000509
Johana
pythondev_help_Johana_2017-10-25T15:14:47.000509
1,508,944,487.000509
98,250
pythondev
help
My favorite part was the early days of 32 bit applications. $1,000+ "enterprise" XML editors that were unable to open a 10 MB xml file.
2017-10-25T15:16:10.000104
Margrett
pythondev_help_Margrett_2017-10-25T15:16:10.000104
1,508,944,570.000104
98,251
pythondev
help
Watched them start opening the file, then shoot to using 2GB of memory, then either freeze or crash.
2017-10-25T15:16:44.000084
Margrett
pythondev_help_Margrett_2017-10-25T15:16:44.000084
1,508,944,604.000084
98,252
pythondev
help
No idea what they heck they were doing
2017-10-25T15:16:51.000237
Margrett
pythondev_help_Margrett_2017-10-25T15:16:51.000237
1,508,944,611.000237
98,253
pythondev
help
More silly XML stuff. A past employer purchased an XML based workflow processing engine / app server that we apparently spent so much on, we had to delay reporting earnings.
2017-10-25T15:20:02.000554
Margrett
pythondev_help_Margrett_2017-10-25T15:20:02.000554
1,508,944,802.000554
98,254
pythondev
help
My team was told to use it, but I never had training on it, on a big project. I continued to write my logic in XLST, because it was what I used for everything else.
2017-10-25T15:20:14.000499
Margrett
pythondev_help_Margrett_2017-10-25T15:20:14.000499
1,508,944,814.000499
98,255
pythondev
help
is it an EDI app?
2017-10-25T15:20:17.000382
Johana
pythondev_help_Johana_2017-10-25T15:20:17.000382
1,508,944,817.000382
98,256
pythondev
help
something like Rhapsody?
2017-10-25T15:20:52.000055
Johana
pythondev_help_Johana_2017-10-25T15:20:52.000055
1,508,944,852.000055
98,257
pythondev
help
What I'm writing now?
2017-10-25T15:20:58.000038
Margrett
pythondev_help_Margrett_2017-10-25T15:20:58.000038
1,508,944,858.000038
98,258
pythondev
help
the XML based workflow processing engine
2017-10-25T15:21:08.000127
Johana
pythondev_help_Johana_2017-10-25T15:21:08.000127
1,508,944,868.000127
98,259
pythondev
help
those are typically called EDI apps
2017-10-25T15:21:16.000586
Johana
pythondev_help_Johana_2017-10-25T15:21:16.000586
1,508,944,876.000586
98,260
pythondev
help
Electronic Data Interchange
2017-10-25T15:21:29.000397
Johana
pythondev_help_Johana_2017-10-25T15:21:29.000397
1,508,944,889.000397
98,261
pythondev
help
i’ve worked with a few. just curious.
2017-10-25T15:21:53.000209
Johana
pythondev_help_Johana_2017-10-25T15:21:53.000209
1,508,944,913.000209
98,262
pythondev
help
Kind of. We were using it to enhance our identity management solution. So grab events from PeopleSoft, then propagate changes in a bunch of login systems and purchasing apps.
2017-10-25T15:22:33.000579
Margrett
pythondev_help_Margrett_2017-10-25T15:22:33.000579
1,508,944,953.000579
98,263
pythondev
help
Then reverse that process when someone gets terminated
2017-10-25T15:22:47.000038
Margrett
pythondev_help_Margrett_2017-10-25T15:22:47.000038
1,508,944,967.000038
98,264
pythondev
help
yea and you have to move little widgets around.
2017-10-25T15:23:02.000444
Johana
pythondev_help_Johana_2017-10-25T15:23:02.000444
1,508,944,982.000444
98,265
pythondev
help
So, the XLST stuff was processing this giant XML doc in ~2 seconds
2017-10-25T15:23:35.000138
Margrett
pythondev_help_Margrett_2017-10-25T15:23:35.000138
1,508,945,015.000138
98,266
pythondev
help
We ported everything into this big expensive engine, and it was &gt;1 hour
2017-10-25T15:23:54.000113
Margrett
pythondev_help_Margrett_2017-10-25T15:23:54.000113
1,508,945,034.000113
98,267
pythondev
help
i mainly used it to report results of infections diseases to the USDA.
2017-10-25T15:25:42.000103
Johana
pythondev_help_Johana_2017-10-25T15:25:42.000103
1,508,945,142.000103
98,268
pythondev
help
That looks way more sophisticated than we had.
2017-10-25T15:25:49.000214
Margrett
pythondev_help_Margrett_2017-10-25T15:25:49.000214
1,508,945,149.000214
98,269
pythondev
help
I'm struggling to remember the name. The whole thing was web based.
2017-10-25T15:26:20.000689
Margrett
pythondev_help_Margrett_2017-10-25T15:26:20.000689
1,508,945,180.000689
98,270
pythondev
help
I did write code in Symantec Workflow, looks a little more similar.
2017-10-25T15:27:38.000235
Margrett
pythondev_help_Margrett_2017-10-25T15:27:38.000235
1,508,945,258.000235
98,271
pythondev
help
SilverStream
2017-10-25T15:34:00.000243
Margrett
pythondev_help_Margrett_2017-10-25T15:34:00.000243
1,508,945,640.000243
98,272
pythondev
help
gotta love windows nt.
2017-10-25T15:35:21.000556
Johana
pythondev_help_Johana_2017-10-25T15:35:21.000556
1,508,945,721.000556
98,273
pythondev
help
ah i see you build web apps in it and it will deploy them at a very expensive cost.
2017-10-25T15:36:51.000305
Johana
pythondev_help_Johana_2017-10-25T15:36:51.000305
1,508,945,811.000305
98,274
pythondev
help
mirth may be able to do what you want as well. it’s opensource and geared to HL7 but HL7 is XML like anything else so i’m sure it can do a lot.
2017-10-25T15:46:54.000200
Johana
pythondev_help_Johana_2017-10-25T15:46:54.000200
1,508,946,414.0002
98,275
pythondev
help
the big benefit i see a system that is geared for sending XML messages is that they typically have logging, retrying, etc. built in. It makes it really nice to just set it up and forget about it. I remember sometimes my workflow might hang up but the help desk guy had a login where he could restart the process.
2017-10-25T15:51:36.000617
Johana
pythondev_help_Johana_2017-10-25T15:51:36.000617
1,508,946,696.000617
98,276
pythondev
help
I would have killed for that back in ID mgmt days.
2017-10-25T15:52:37.000433
Margrett
pythondev_help_Margrett_2017-10-25T15:52:37.000433
1,508,946,757.000433
98,277
pythondev
help
Hey all, would anyone know how to, using requests, to add a time.sleep to the requests get call and read the page after a number of seconds?
2017-10-25T15:55:45.000163
Elsie
pythondev_help_Elsie_2017-10-25T15:55:45.000163
1,508,946,945.000163
98,278
pythondev
help
<@Elsie> afaik requests only includes functionality for a single request and is blocking so if you want to space out multiple requests you should be able to add the delay yourself in between
2017-10-25T16:03:29.000228
Antionette
pythondev_help_Antionette_2017-10-25T16:03:29.000228
1,508,947,409.000228
98,279
pythondev
help
Ok and excuse my ignorance but would I be calling for the same url?
2017-10-25T16:04:09.000049
Elsie
pythondev_help_Elsie_2017-10-25T16:04:09.000049
1,508,947,449.000049
98,280
pythondev
help
Hmmm, that depends on what you're trying to do? Maybe take a step back and explain your overall goal?
2017-10-25T16:05:17.000279
Antionette
pythondev_help_Antionette_2017-10-25T16:05:17.000279
1,508,947,517.000279
98,281
pythondev
help
Essentially scrape a page that has ajax calls or is built with react on their frontend
2017-10-25T16:07:37.000218
Elsie
pythondev_help_Elsie_2017-10-25T16:07:37.000218
1,508,947,657.000218
98,282
pythondev
help
ohhh, then ignore my previous answer
2017-10-25T16:08:24.000207
Antionette
pythondev_help_Antionette_2017-10-25T16:08:24.000207
1,508,947,704.000207
98,283
pythondev
help
requests will just return the content from a single request, it will not render any javascript
2017-10-25T16:08:52.000706
Antionette
pythondev_help_Antionette_2017-10-25T16:08:52.000706
1,508,947,732.000706
98,284
pythondev
help
So would their be any work around to this other than running a selenium script?
2017-10-25T16:09:33.000669
Elsie
pythondev_help_Elsie_2017-10-25T16:09:33.000669
1,508,947,773.000669
98,285
pythondev
help
there*
2017-10-25T16:09:37.000564
Elsie
pythondev_help_Elsie_2017-10-25T16:09:37.000564
1,508,947,777.000564
98,286
pythondev
help
You can hit up <#C5PHT9EGK|webscraping>, they'll probably get into the nitty gritty more
2017-10-25T16:10:26.000323
Mallie
pythondev_help_Mallie_2017-10-25T16:10:26.000323
1,508,947,826.000323
98,287
pythondev
help
I don't know any alternatives. When I was in that situation, I just used selenium
2017-10-25T16:10:33.000149
Mirian
pythondev_help_Mirian_2017-10-25T16:10:33.000149
1,508,947,833.000149
98,288
pythondev
help
Yeah I'd agree with <@Mallie>, go to <#C5PHT9EGK|webscraping> if you can/want to talk about it in more detail. Overall the two approaches would be to use a browser engine/driver like selenium or be able to identify the ajax calls being made and then make those requests directly yourself
2017-10-25T16:11:43.000272
Antionette
pythondev_help_Antionette_2017-10-25T16:11:43.000272
1,508,947,903.000272
98,289
pythondev
help
ok thanks all
2017-10-25T16:11:56.000132
Elsie
pythondev_help_Elsie_2017-10-25T16:11:56.000132
1,508,947,916.000132
98,290
pythondev
help
How do you type hint a function as a variable received in a function? `def myfunc(func: function):`
2017-10-25T16:33:07.000396
Meghan
pythondev_help_Meghan_2017-10-25T16:33:07.000396
1,508,949,187.000396
98,291
pythondev
help
On 3.6.
2017-10-25T16:33:21.000008
Meghan
pythondev_help_Meghan_2017-10-25T16:33:21.000008
1,508,949,201.000008
98,292
pythondev
help
mypy seems cool with it, or is ignoring it, but the interpreter doesn't like it: ``` def fun() -&gt; None: pass def receiver(func: function): pass ``` ``` mypy scratch.py python scratch.py Traceback (most recent call last): File "scratch.py", line 5, in &lt;module&gt; def receiver(func: function): NameError: name 'function' is not defined ```
2017-10-25T16:36:42.000229
Meghan
pythondev_help_Meghan_2017-10-25T16:36:42.000229
1,508,949,402.000229
98,293
pythondev
help
<@Meghan> Haven't tried it, but here's one solution: <https://stackoverflow.com/questions/46163672/python-3-nameerror-name-function-is-not-defined>
2017-10-25T16:40:54.000152
Anette
pythondev_help_Anette_2017-10-25T16:40:54.000152
1,508,949,654.000152
98,294
pythondev
help
Callable, perhaps? PyCharm seems to be okay with it and mypy doesn't complain.
2017-10-25T16:41:06.000281
Meghan
pythondev_help_Meghan_2017-10-25T16:41:06.000281
1,508,949,666.000281
98,295
pythondev
help
Oh, that's so much more work. But, that is what I found as well. Thanks.
2017-10-25T16:42:04.000285
Meghan
pythondev_help_Meghan_2017-10-25T16:42:04.000285
1,508,949,724.000285
98,296
pythondev
help
is there anything in Python that will take a dictionary / array of whatever structure and convert it to JSON as is? Everything I have seen so far is about defining serializers etc?
2017-10-25T21:01:05.000032
Rosita
pythondev_help_Rosita_2017-10-25T21:01:05.000032
1,508,965,265.000032
98,297
pythondev
help
Json.dumps()
2017-10-25T21:02:04.000179
Johana
pythondev_help_Johana_2017-10-25T21:02:04.000179
1,508,965,324.000179
98,298
pythondev
help
doesnt do nested objects?
2017-10-25T21:02:29.000063
Rosita
pythondev_help_Rosita_2017-10-25T21:02:29.000063
1,508,965,349.000063
98,299
pythondev
help
e.g. if I have django model that has several other relationships fetched as part of a query it only ever encodes the first level
2017-10-25T21:03:42.000235
Rosita
pythondev_help_Rosita_2017-10-25T21:03:42.000235
1,508,965,422.000235
98,300
pythondev
help
I'm not sure about a Django model.
2017-10-25T21:04:42.000178
Johana
pythondev_help_Johana_2017-10-25T21:04:42.000178
1,508,965,482.000178
98,301
pythondev
help
well just think of it as nested objects
2017-10-25T21:05:04.000162
Rosita
pythondev_help_Rosita_2017-10-25T21:05:04.000162
1,508,965,504.000162
98,302