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
in 3.6 it's `encoding='utf-8'`
2019-04-22T11:53:18.229000
Kam
pythondev_help_Kam_2019-04-22T11:53:18.229000
1,555,933,998.229
19,921
pythondev
help
in 3.7 it's `text=True`
2019-04-22T11:53:35.229400
Kam
pythondev_help_Kam_2019-04-22T11:53:35.229400
1,555,934,015.2294
19,922
pythondev
help
Thank you, guys.
2019-04-22T11:53:42.229600
Kam
pythondev_help_Kam_2019-04-22T11:53:42.229600
1,555,934,022.2296
19,923
pythondev
help
I have a project where I need to run a websocket server and http server. The websocket server can't be run on a child thread, so I'm currently running the http on a child thread, but I'm not sure if this is a good practice. When running both on the main thread, the websocket server was blocks and the http server never starts. I'm not sure if there's a way for them to share an event loop on the main thread. This is Python 2.7.
2019-04-22T12:00:25.233100
Al
pythondev_help_Al_2019-04-22T12:00:25.233100
1,555,934,425.2331
19,924
pythondev
help
Hello, Not sure what I'm doing wrong, but I'm not able to get the maximum from this list.
2019-04-22T12:00:41.233200
Milly
pythondev_help_Milly_2019-04-22T12:00:41.233200
1,555,934,441.2332
19,925
pythondev
help
what have you tried <@Milly>?
2019-04-22T12:01:19.233700
Clemmie
pythondev_help_Clemmie_2019-04-22T12:01:19.233700
1,555,934,479.2337
19,926
pythondev
help
I just can't think through the logic here. I was able to do something similar with amount,name but I its not working here. I want to just do print max of duration but I know its not as simple as that.
2019-04-22T12:04:03.234100
Milly
pythondev_help_Milly_2019-04-22T12:04:03.234100
1,555,934,643.2341
19,927
pythondev
help
You mean you want the array where number is maximum?
2019-04-22T12:06:29.235100
Junie
pythondev_help_Junie_2019-04-22T12:06:29.235100
1,555,934,789.2351
19,928
pythondev
help
<@Junie> yes. have i set the array up correctly to get that?
2019-04-22T12:09:14.236600
Milly
pythondev_help_Milly_2019-04-22T12:09:14.236600
1,555,934,954.2366
19,929
pythondev
help
sure, but your code is doind all sorts of things wrong
2019-04-22T12:09:33.237200
Clemmie
pythondev_help_Clemmie_2019-04-22T12:09:33.237200
1,555,934,973.2372
19,930
pythondev
help
How to write code type syntax?
2019-04-22T12:10:18.238700
Junie
pythondev_help_Junie_2019-04-22T12:10:18.238700
1,555,935,018.2387
19,931
pythondev
help
the comparison doesn’t work, the print statement is confused, and the break logic, even if everything else worked as written, would just return the first person with a duration over 5
2019-04-22T12:10:44.239200
Clemmie
pythondev_help_Clemmie_2019-04-22T12:10:44.239200
1,555,935,044.2392
19,932
pythondev
help
But you _are_ thinking in the correct general direction
2019-04-22T12:11:03.239900
Clemmie
pythondev_help_Clemmie_2019-04-22T12:11:03.239900
1,555,935,063.2399
19,933
pythondev
help
Yes! that's whats happening! At least my thinking isn't completely wrong. lol <@Clemmie> I just don't know how to execute what I have in my head.
2019-04-22T12:12:08.241800
Milly
pythondev_help_Milly_2019-04-22T12:12:08.241800
1,555,935,128.2418
19,934
pythondev
help
None
2019-04-22T12:12:27.242400
Clemmie
pythondev_help_Clemmie_2019-04-22T12:12:27.242400
1,555,935,147.2424
19,935
pythondev
help
For x durations: A= [] A.append(x[0] Max(A)
2019-04-22T12:12:54.243300
Junie
pythondev_help_Junie_2019-04-22T12:12:54.243300
1,555,935,174.2433
19,936
pythondev
help
you need to have a placeholder to compare through the elements
2019-04-22T12:12:59.243500
Clemmie
pythondev_help_Clemmie_2019-04-22T12:12:59.243500
1,555,935,179.2435
19,937
pythondev
help
you only want to compare x[1] (the numeric part)
2019-04-22T12:13:17.244400
Clemmie
pythondev_help_Clemmie_2019-04-22T12:13:17.244400
1,555,935,197.2444
19,938
pythondev
help
<@Clemmie> it will work
2019-04-22T12:13:18.244500
Junie
pythondev_help_Junie_2019-04-22T12:13:18.244500
1,555,935,198.2445
19,939
pythondev
help
Yeah I think
2019-04-22T12:13:29.244800
Junie
pythondev_help_Junie_2019-04-22T12:13:29.244800
1,555,935,209.2448
19,940
pythondev
help
<@Junie> code will work if you want just the max value, and not the person it belongs to
2019-04-22T12:13:45.245400
Clemmie
pythondev_help_Clemmie_2019-04-22T12:13:45.245400
1,555,935,225.2454
19,941
pythondev
help
so how do i know when to use placeholders next time? or should that be the default thing I do when setting something up?
2019-04-22T12:14:06.245900
Milly
pythondev_help_Milly_2019-04-22T12:14:06.245900
1,555,935,246.2459
19,942
pythondev
help
also I'm trying it now.
2019-04-22T12:14:25.246700
Milly
pythondev_help_Milly_2019-04-22T12:14:25.246700
1,555,935,265.2467
19,943
pythondev
help
<@Clemmie> how to write msg like code snippets?
2019-04-22T12:14:33.247100
Junie
pythondev_help_Junie_2019-04-22T12:14:33.247100
1,555,935,273.2471
19,944
pythondev
help
if you need to keep track of something then you will need a var to keep track of it
2019-04-22T12:14:33.247200
Clemmie
pythondev_help_Clemmie_2019-04-22T12:14:33.247200
1,555,935,273.2472
19,945
pythondev
help
if you are on a desktop, the :heavy_plus_sign: next to the comment box
2019-04-22T12:15:10.247900
Clemmie
pythondev_help_Clemmie_2019-04-22T12:15:10.247900
1,555,935,310.2479
19,946
pythondev
help
On mobile?
2019-04-22T12:15:28.248600
Junie
pythondev_help_Junie_2019-04-22T12:15:28.248600
1,555,935,328.2486
19,947
pythondev
help
on a phone it is not available, but you can use the singe/triple tick ` snippet syntax
2019-04-22T12:15:31.248800
Clemmie
pythondev_help_Clemmie_2019-04-22T12:15:31.248800
1,555,935,331.2488
19,948
pythondev
help
<https://get.slack.help/hc/en-us/articles/202288908-Format-your-messages#inline-code>
2019-04-22T12:15:35.249200
Hiroko
pythondev_help_Hiroko_2019-04-22T12:15:35.249200
1,555,935,335.2492
19,949
pythondev
help
or you can use the "`" symbol
2019-04-22T12:15:36.249400
Leida
pythondev_help_Leida_2019-04-22T12:15:36.249400
1,555,935,336.2494
19,950
pythondev
help
` test`
2019-04-22T12:15:49.249900
Junie
pythondev_help_Junie_2019-04-22T12:15:49.249900
1,555,935,349.2499
19,951
pythondev
help
Yeah thanks
2019-04-22T12:15:57.250200
Junie
pythondev_help_Junie_2019-04-22T12:15:57.250200
1,555,935,357.2502
19,952
pythondev
help
you're wonderful <@Clemmie>! thank you! I really appreciate it <@Junie>
2019-04-22T12:16:01.250400
Milly
pythondev_help_Milly_2019-04-22T12:16:01.250400
1,555,935,361.2504
19,953
pythondev
help
<@Milly> introduction to :taco:
2019-04-22T12:16:19.250700
Clemmie
pythondev_help_Clemmie_2019-04-22T12:16:19.250700
1,555,935,379.2507
19,954
pythondev
help
On mobile it's 3 grave ticks to open a code block and 3 to close it
2019-04-22T15:03:49.251800
Javier
pythondev_help_Javier_2019-04-22T15:03:49.251800
1,555,945,429.2518
19,955
pythondev
help
``` x = [range(10) for item in range(10)] ```
2019-04-22T15:04:40.253000
Javier
pythondev_help_Javier_2019-04-22T15:04:40.253000
1,555,945,480.253
19,956
pythondev
help
how can i break the line `(f'/usr/illumon/illumon-maystreet*/bin/sip_pcap_binlogger --license-file {os.environ["LM_LICENSE_FILE"]} --pcaps {bin_srcdir}/*.pcap.gz --output {bin_srcdir}/{bin_name}',` it doesn't fit
2019-04-22T15:17:05.254800
Kam
pythondev_help_Kam_2019-04-22T15:17:05.254800
1,555,946,225.2548
19,957
pythondev
help
just break it up, python will auto-join it for you
2019-04-22T15:23:21.255400
Karoline
pythondev_help_Karoline_2019-04-22T15:23:21.255400
1,555,946,601.2554
19,958
pythondev
help
```'this string is the same as this string'``` ``` 'this string ' 'is the same as ' 'this string' ```
2019-04-22T15:24:41.256800
Karoline
pythondev_help_Karoline_2019-04-22T15:24:41.256800
1,555,946,681.2568
19,959
pythondev
help
assuming it's between some natural boundary - for example a function argument. if you just want to assign it to a variable, use parens, but don't use commas (as that would be a tuple)
2019-04-22T15:25:37.257700
Karoline
pythondev_help_Karoline_2019-04-22T15:25:37.257700
1,555,946,737.2577
19,960
pythondev
help
Thank you.
2019-04-22T15:28:23.257900
Kam
pythondev_help_Kam_2019-04-22T15:28:23.257900
1,555,946,903.2579
19,961
pythondev
help
np
2019-04-22T15:28:40.258100
Karoline
pythondev_help_Karoline_2019-04-22T15:28:40.258100
1,555,946,920.2581
19,962
pythondev
help
Also for some reason, since that is argument to subprocess.run and I have shell=True for some reason that glob in binary name doesn't get expanded.
2019-04-22T15:33:20.259600
Kam
pythondev_help_Kam_2019-04-22T15:33:20.259600
1,555,947,200.2596
19,963
pythondev
help
with shell=True i thought shell was supposed to expand it for me.
2019-04-22T15:33:53.260100
Kam
pythondev_help_Kam_2019-04-22T15:33:53.260100
1,555,947,233.2601
19,964
pythondev
help
I always have to muck with that every time to remember the right combination of settings - but if I recall that actually should be a list of arguments, right?
2019-04-22T15:36:31.260800
Karoline
pythondev_help_Karoline_2019-04-22T15:36:31.260800
1,555,947,391.2608
19,965
pythondev
help
perhaps somebody who has worked with it more recently can comment for sure
2019-04-22T15:36:52.261200
Karoline
pythondev_help_Karoline_2019-04-22T15:36:52.261200
1,555,947,412.2612
19,966
pythondev
help
i think it's a string if shell=True
2019-04-22T15:39:33.261600
Kam
pythondev_help_Kam_2019-04-22T15:39:33.261600
1,555,947,573.2616
19,967
pythondev
help
Do you also get an 'unable to reload' message ? <https://github.com/paulgureghian/SciKit_Learn_Projects>
2019-04-22T15:52:22.264300
Clayton
pythondev_help_Clayton_2019-04-22T15:52:22.264300
1,555,948,342.2643
19,968
pythondev
help
I don't
2019-04-22T15:53:53.264600
Kam
pythondev_help_Kam_2019-04-22T15:53:53.264600
1,555,948,433.2646
19,969
pythondev
help
It loaded the notebook for you ?
2019-04-22T15:56:18.265000
Clayton
pythondev_help_Clayton_2019-04-22T15:56:18.265000
1,555,948,578.265
19,970
pythondev
help
<@Kam> the glob in binary name expands to `/usr/illumon/illumon-maystreet0/bin/sip_pcap_binlogger /usr/illumon/illumon-maystreet1/bin/sip_pcap_binlogger /usr/illumon/illumon-maystreet2/bin/sip_pcap_binlogger --license-file {os.environ["LM_LICENSE_FILE"]} ...`.
2019-04-22T19:45:28.267000
Brain
pythondev_help_Brain_2019-04-22T19:45:28.267000
1,555,962,328.267
19,971
pythondev
help
It doesn’t look like something I’d want to do probably
2019-04-22T19:46:18.267400
Brain
pythondev_help_Brain_2019-04-22T19:46:18.267400
1,555,962,378.2674
19,972
pythondev
help
what if file exists there?
2019-04-22T19:51:11.267700
Kam
pythondev_help_Kam_2019-04-22T19:51:11.267700
1,555,962,671.2677
19,973
pythondev
help
something like `/usr/illumon/illumon-maystreet-12234323/bin/sip_pcap_binlogger`
2019-04-22T19:51:49.268300
Kam
pythondev_help_Kam_2019-04-22T19:51:49.268300
1,555,962,709.2683
19,974
pythondev
help
if you have only one `sip_pcap_binlogger` under `/usr/illumon/illumon-maystreet*` it is fine I guess. but if you have `/usr/illumon/illumon-maystreet-12234323/bin/sip_pcap_binlogger` and `/usr/illumon/illumon-maystreet-5550505/bin/sip_pcap_binlogger` then that command is going to run `/usr/illumon/illumon-maystreet-12234323/bin/sip_pcap_binlogger` and its first argument will be `/usr/illumon/illumon-maystreet-5550505/bin/sip_pcap_binlogger`
2019-04-22T19:55:09.270800
Brain
pythondev_help_Brain_2019-04-22T19:55:09.270800
1,555,962,909.2708
19,975
pythondev
help
yeah, pretty dangerous, I should say
2019-04-22T19:59:22.271200
Kam
pythondev_help_Kam_2019-04-22T19:59:22.271200
1,555,963,162.2712
19,976
pythondev
help
supposedly one binary at a time.
2019-04-22T19:59:36.271600
Kam
pythondev_help_Kam_2019-04-22T19:59:36.271600
1,555,963,176.2716
19,977
pythondev
help
But you never know, I just never know what version will be there.
2019-04-22T19:59:58.272100
Kam
pythondev_help_Kam_2019-04-22T19:59:58.272100
1,555,963,198.2721
19,978
pythondev
help
I guess i could list files with pathlib.Path(path_to).glob(illumon-maystreet*) and then select the latest one.
2019-04-22T20:00:53.273100
Kam
pythondev_help_Kam_2019-04-22T20:00:53.273100
1,555,963,253.2731
19,979
pythondev
help
that would be saner way
2019-04-22T20:01:05.273500
Kam
pythondev_help_Kam_2019-04-22T20:01:05.273500
1,555,963,265.2735
19,980
pythondev
help
Would it be possible to maintain a consistently-named symlink to the correct version?
2019-04-22T20:21:04.277100
Sasha
pythondev_help_Sasha_2019-04-22T20:21:04.277100
1,555,964,464.2771
19,981
pythondev
help
Most likely, but it's not my group.
2019-04-22T20:31:18.277600
Kam
pythondev_help_Kam_2019-04-22T20:31:18.277600
1,555,965,078.2776
19,982
pythondev
help
I guess we can be thankful that they don't do release management with `sip_pcap_binlogger.release.new.newer.with_patch.latest2`.
2019-04-22T20:34:44.278500
Sasha
pythondev_help_Sasha_2019-04-22T20:34:44.278500
1,555,965,284.2785
19,983
pythondev
help
yeah.
2019-04-22T20:49:33.278700
Kam
pythondev_help_Kam_2019-04-22T20:49:33.278700
1,555,966,173.2787
19,984
pythondev
help
How does the `%{__python}` syntax work? I saw this here <https://python-rpm-porting.readthedocs.io/en/latest/application-modules.html>
2019-04-22T21:02:52.279300
Alethea
pythondev_help_Alethea_2019-04-22T21:02:52.279300
1,555,966,972.2793
19,985
pythondev
help
it's a marco
2019-04-22T22:17:54.279600
Kam
pythondev_help_Kam_2019-04-22T22:17:54.279600
1,555,971,474.2796
19,986
pythondev
help
by default on RHEL favor it would be
2019-04-22T22:20:04.280100
Kam
pythondev_help_Kam_2019-04-22T22:20:04.280100
1,555,971,604.2801
19,987
pythondev
help
`%__python /usr/bin/python`
2019-04-22T22:20:08.280300
Kam
pythondev_help_Kam_2019-04-22T22:20:08.280300
1,555,971,608.2803
19,988
pythondev
help
I need to pick someone's brain on this
2019-04-23T00:10:15.282400
Kam
pythondev_help_Kam_2019-04-23T00:10:15.282400
1,555,978,215.2824
19,989
pythondev
help
I have bunch of log messages in stdout which i capture with logging.getLogger()
2019-04-23T00:11:23.283300
Kam
pythondev_help_Kam_2019-04-23T00:11:23.283300
1,555,978,283.2833
19,990
pythondev
help
messages are `'Processed 107367474 Packets'`
2019-04-23T00:12:39.283800
Kam
pythondev_help_Kam_2019-04-23T00:12:39.283800
1,555,978,359.2838
19,991
pythondev
help
millions of them.
2019-04-23T00:12:46.284100
Kam
pythondev_help_Kam_2019-04-23T00:12:46.284100
1,555,978,366.2841
19,992
pythondev
help
in order to filter them i have this subclass
2019-04-23T00:13:06.284700
Kam
pythondev_help_Kam_2019-04-23T00:13:06.284700
1,555,978,386.2847
19,993
pythondev
help
```class Mess_in_Bin_Conveter_Stdout_Filter(logging.Filter): def filter(self, record): if record.getMessage().startswith('Processed'): pass else: return record.getMessage()```
2019-04-23T00:13:41.284900
Kam
pythondev_help_Kam_2019-04-23T00:13:41.284900
1,555,978,421.2849
19,994
pythondev
help
then in logger configuration i have `_file_handler.addFilter(Mess_in_Bin_Conveter_Stdout_Filter())`
2019-04-23T00:14:09.285400
Kam
pythondev_help_Kam_2019-04-23T00:14:09.285400
1,555,978,449.2854
19,995
pythondev
help
applied to the logger, but it's still logging all those messages.
2019-04-23T00:14:39.285900
Kam
pythondev_help_Kam_2019-04-23T00:14:39.285900
1,555,978,479.2859
19,996
pythondev
help
is there anyway to check
2019-04-23T00:14:49.286100
Kam
pythondev_help_Kam_2019-04-23T00:14:49.286100
1,555,978,489.2861
19,997
pythondev
help
You might try printing the `getMessage()` value... I'm slightly suspicious that it may have more stuff in it before the "Processed" string.
2019-04-23T00:23:45.287100
Sasha
pythondev_help_Sasha_2019-04-23T00:23:45.287100
1,555,979,025.2871
19,998
pythondev
help
That'll also verify that your filter is bring called.
2019-04-23T00:24:12.287400
Sasha
pythondev_help_Sasha_2019-04-23T00:24:12.287400
1,555,979,052.2874
19,999
pythondev
help
```Well i mean here is the example: Processed 107367489 Packets Processed 107367490 Packets Processed 107367491 Packets Processed 107367492 Packets Processed 107367493 Packets Processed 107367494 Packets Processed 107367495 Packets Processed 107367496 Packets Processed 107367497 Packets Processed 107367498 Packets Processed 107367499 Packets Processed 107367500 Packets [INFO ] (140222127471104) 2019-04-22T20:46:45.687495-00:00:00: /bp/bellport/src/bp/device/pcap_multi_file_device.cpp(205): closing ```
2019-04-23T00:26:04.288200
Kam
pythondev_help_Kam_2019-04-23T00:26:04.288200
1,555,979,164.2882
20,000
pythondev
help
of the log
2019-04-23T00:26:12.288500
Kam
pythondev_help_Kam_2019-04-23T00:26:12.288500
1,555,979,172.2885
20,001
pythondev
help
Are the "Processed" lines being generated by logging calls, or just being printed to stdout?
2019-04-23T00:27:50.289000
Sasha
pythondev_help_Sasha_2019-04-23T00:27:50.289000
1,555,979,270.289
20,002
pythondev
help
they are generated by stdout of subprocess.Popen which i log then with `convert_out, convert_err = convert_cmd.communicate()` and `<http://my_logger.info|my_logger.info>(convert_out)` lines
2019-04-23T00:32:01.290600
Kam
pythondev_help_Kam_2019-04-23T00:32:01.290600
1,555,979,521.2906
20,003
pythondev
help
Cool. Can you verify that your filter is being called?
2019-04-23T00:36:11.291100
Sasha
pythondev_help_Sasha_2019-04-23T00:36:11.291100
1,555,979,771.2911
20,004
pythondev
help
yeah i can try to print
2019-04-23T00:36:53.291400
Kam
pythondev_help_Kam_2019-04-23T00:36:53.291400
1,555,979,813.2914
20,005
pythondev
help
so instead of `pass` just do `print(getMessage())` inside of class?
2019-04-23T00:38:05.292200
Kam
pythondev_help_Kam_2019-04-23T00:38:05.292200
1,555,979,885.2922
20,006
pythondev
help
Or raise an exception, or whatever. I'm just worried that it's not correctly attached to the handler somehow.
2019-04-23T00:38:37.292700
Sasha
pythondev_help_Sasha_2019-04-23T00:38:37.292700
1,555,979,917.2927
20,007
pythondev
help
yeah, one sec
2019-04-23T00:40:09.293000
Kam
pythondev_help_Kam_2019-04-23T00:40:09.293000
1,555,980,009.293
20,008
pythondev
help
so this command as a subporcess argument should replicate `'echo -e Processed 107367496 Packets\nJust a test'`
2019-04-23T00:45:01.293800
Kam
pythondev_help_Kam_2019-04-23T00:45:01.293800
1,555,980,301.2938
20,009
pythondev
help
since original command takes 30 mins to finish
2019-04-23T00:45:22.294300
Kam
pythondev_help_Kam_2019-04-23T00:45:22.294300
1,555,980,322.2943
20,010
pythondev
help
Does the original command output a gazillion "Processed" lines that are logged all in one block? If so, the beginning of the first line might have some other stuff.
2019-04-23T00:47:30.295400
Sasha
pythondev_help_Sasha_2019-04-23T00:47:30.295400
1,555,980,450.2954
20,011
pythondev
help
yeah, i think that's the case
2019-04-23T00:49:02.295700
Kam
pythondev_help_Kam_2019-04-23T00:49:02.295700
1,555,980,542.2957
20,012
pythondev
help
since once the command finishes
2019-04-23T00:49:11.296000
Kam
pythondev_help_Kam_2019-04-23T00:49:11.296000
1,555,980,551.296
20,013
pythondev
help
when i tail the log it spills all stdout at once.
2019-04-23T00:49:30.296500
Kam
pythondev_help_Kam_2019-04-23T00:49:30.296500
1,555,980,570.2965
20,014
pythondev
help
with gazillion of those messages
2019-04-23T00:49:51.296800
Kam
pythondev_help_Kam_2019-04-23T00:49:51.296800
1,555,980,591.2968
20,015
pythondev
help
but they all seem to start on the new line
2019-04-23T00:50:09.297100
Kam
pythondev_help_Kam_2019-04-23T00:50:09.297100
1,555,980,609.2971
20,016
pythondev
help
here how it goes
2019-04-23T00:50:13.297300
Kam
pythondev_help_Kam_2019-04-23T00:50:13.297300
1,555,980,613.2973
20,017
pythondev
help
Well, note that the filter is probably going to be called once per log unit, not once per line. So all the output in your `convert_out` will be the message.
2019-04-23T00:51:12.298100
Sasha
pythondev_help_Sasha_2019-04-23T00:51:12.298100
1,555,980,672.2981
20,018
pythondev
help
```[DEBUG ] (140222127471104) 2019-04-22T20:31:57.019979-00:00:00: /bp/bellport/src/bp/feed/utdf/aggregated_price_feed.cpp(42): Initializing utdf_binary feed Press Control-C to exit Processed 107262656 Packets Processed 107262657 Packets```
2019-04-23T00:51:54.298300
Kam
pythondev_help_Kam_2019-04-23T00:51:54.298300
1,555,980,714.2983
20,019
pythondev
help
oh i see.
2019-04-23T00:52:22.298600
Kam
pythondev_help_Kam_2019-04-23T00:52:22.298600
1,555,980,742.2986
20,020