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
cool will do
2019-02-05T05:40:52.932700
Arturo
pythondev_help_Arturo_2019-02-05T05:40:52.932700
1,549,345,252.9327
6,621
pythondev
help
think it might be to do with my works firewalls and internet.
2019-02-05T06:01:05.933400
Arturo
pythondev_help_Arturo_2019-02-05T06:01:05.933400
1,549,346,465.9334
6,622
pythondev
help
I kept getting blocked even to do a conda install. Not sure how they expect us to work
2019-02-05T06:01:34.934000
Arturo
pythondev_help_Arturo_2019-02-05T06:01:34.934000
1,549,346,494.934
6,623
pythondev
help
it might be worth chatting with your IT if thats the case I’m afraid <@Arturo>
2019-02-05T06:07:57.934500
Vanita
pythondev_help_Vanita_2019-02-05T06:07:57.934500
1,549,346,877.9345
6,624
pythondev
help
yup
2019-02-05T06:09:25.934900
Arturo
pythondev_help_Arturo_2019-02-05T06:09:25.934900
1,549,346,965.9349
6,625
pythondev
help
turns out it was something to do with me upgrading it
2019-02-05T07:06:38.935400
Arturo
pythondev_help_Arturo_2019-02-05T07:06:38.935400
1,549,350,398.9354
6,626
pythondev
help
In case anyone out there is curious, here is a pattern for catching your except block failures in order to recreate a retry loop
2019-02-05T10:07:35.937200
Tanisha
pythondev_help_Tanisha_2019-02-05T10:07:35.937200
1,549,361,255.9372
6,627
pythondev
help
None
2019-02-05T10:08:19.937300
Tanisha
pythondev_help_Tanisha_2019-02-05T10:08:19.937300
1,549,361,299.9373
6,628
pythondev
help
<@Ashley> ^^
2019-02-05T10:08:25.937700
Tanisha
pythondev_help_Tanisha_2019-02-05T10:08:25.937700
1,549,361,305.9377
6,629
pythondev
help
Quick question, static methods dont get implicit first argument but it also seems to be true for methods used as decorators in a class ```class Thingy: def _decorator(f): @functools.wraps(f) def wrapped(inst, *args, **kwargs): return f(inst, *args, **kwargs) return wrapped @_decorator def func(...
2019-02-05T10:27:50.941500
Leida
pythondev_help_Leida_2019-02-05T10:27:50.941500
1,549,362,470.9415
6,630
pythondev
help
so whatchama call that `_decorator`?
2019-02-05T10:28:05.941800
Leida
pythondev_help_Leida_2019-02-05T10:28:05.941800
1,549,362,485.9418
6,631
pythondev
help
its not quite a static method or is it?
2019-02-05T10:28:25.942200
Leida
pythondev_help_Leida_2019-02-05T10:28:25.942200
1,549,362,505.9422
6,632
pythondev
help
its a wrapper
2019-02-05T10:28:53.942400
Hiroko
pythondev_help_Hiroko_2019-02-05T10:28:53.942400
1,549,362,533.9424
6,633
pythondev
help
so you can pass in arguments to the function
2019-02-05T10:29:02.942700
Hiroko
pythondev_help_Hiroko_2019-02-05T10:29:02.942700
1,549,362,542.9427
6,634
pythondev
help
it seems i could use it as a static method for wrapping other functions outside the class too? (ignoring the _ for now)
2019-02-05T10:31:25.943600
Leida
pythondev_help_Leida_2019-02-05T10:31:25.943600
1,549,362,685.9436
6,635
pythondev
help
`Thingy._decorator(print)` would give me back a wrapped `print`?
2019-02-05T10:32:42.944300
Leida
pythondev_help_Leida_2019-02-05T10:32:42.944300
1,549,362,762.9443
6,636
pythondev
help
its not that i want to use it as such rather i feel i have some knowledge missing when it comes to classes in python
2019-02-05T10:33:12.944900
Leida
pythondev_help_Leida_2019-02-05T10:33:12.944900
1,549,362,792.9449
6,637
pythondev
help
how can i add a new key to an existing dict, returning a new dict?
2019-02-05T10:41:36.945500
Coleen
pythondev_help_Coleen_2019-02-05T10:41:36.945500
1,549,363,296.9455
6,638
pythondev
help
you’d have to make a deep copy and add the key
2019-02-05T10:42:22.946000
Hiroko
pythondev_help_Hiroko_2019-02-05T10:42:22.946000
1,549,363,342.946
6,639
pythondev
help
sounds like what you’re asking for is immutable dicts
2019-02-05T10:42:38.946400
Hiroko
pythondev_help_Hiroko_2019-02-05T10:42:38.946400
1,549,363,358.9464
6,640
pythondev
help
Is there such a thing?
2019-02-05T10:51:52.946600
Coleen
pythondev_help_Coleen_2019-02-05T10:51:52.946600
1,549,363,912.9466
6,641
pythondev
help
<https://github.com/MagicStack/immutables>
2019-02-05T10:57:11.947300
Jimmy
pythondev_help_Jimmy_2019-02-05T10:57:11.947300
1,549,364,231.9473
6,642
pythondev
help
probably in there
2019-02-05T10:57:14.947600
Jimmy
pythondev_help_Jimmy_2019-02-05T10:57:14.947600
1,549,364,234.9476
6,643
pythondev
help
well or basically: ``` foo = { **foo, 'bar': 'baz' } ```
2019-02-05T10:58:55.948700
Karoline
pythondev_help_Karoline_2019-02-05T10:58:55.948700
1,549,364,335.9487
6,644
pythondev
help
You can make a frozenset of a dict if all the elements are hashable. When you wanted to use it as a dict you could cast it back to dict (ugly, but workable)
2019-02-05T10:59:31.949400
Clemmie
pythondev_help_Clemmie_2019-02-05T10:59:31.949400
1,549,364,371.9494
6,645
pythondev
help
or course that doesn't stop somebody from modifying it, so it's it's all about the discipline with that approach
2019-02-05T10:59:39.949600
Karoline
pythondev_help_Karoline_2019-02-05T10:59:39.949600
1,549,364,379.9496
6,646
pythondev
help
Thanks guys!
2019-02-05T11:31:03.950300
Coleen
pythondev_help_Coleen_2019-02-05T11:31:03.950300
1,549,366,263.9503
6,647
pythondev
help
I need help with state transition in thread. I can see that init_stae and post init state gets called but trigger dosent get called in thread which I create in post_init. in thread it dosent call go_state connected
2019-02-05T11:36:37.951900
Micki
pythondev_help_Micki_2019-02-05T11:36:37.951900
1,549,366,597.9519
6,648
pythondev
help
transitions = [ {'trigger': 'go_state_init', 'source': ['state_null', 'state_connected', 'state_down'], 'dest': 'state_init', 'before': 'do_state_init', 'after': 'post_init'}, {'trigger': 'go_state_connected', 'source': 'state_init', 'dest': 'state_c...
2019-02-05T11:37:07.952100
Micki
pythondev_help_Micki_2019-02-05T11:37:07.952100
1,549,366,627.9521
6,649
pythondev
help
# Initialize the OLT state machine self.machine = Machine(model=self, states=OpenoltDevice.states, transitions=OpenoltDevice.transitions, send_event=True, initial='state_null') self.go_state_init()
2019-02-05T11:37:32.952300
Micki
pythondev_help_Micki_2019-02-05T11:37:32.952300
1,549,366,652.9523
6,650
pythondev
help
def post_init(self, event): self.log.debug('post_init') # We have reached init state, starting the indications thread # Catch RuntimeError exception try: # Start indications thread self.indications_thread_handle = threading.Thread( target=self.in...
2019-02-05T11:37:54.952500
Micki
pythondev_help_Micki_2019-02-05T11:37:54.952500
1,549,366,674.9525
6,651
pythondev
help
def indications_thread(self): self.log.debug('starting-indications-thread') self.log.debug('connecting to olt', device_id=self.device_id) self.channel_ready_future.result() # blocking call <http://self.log.info|self.log.info>('connected to olt', device_id=self.device_id) self.go...
2019-02-05T11:38:17.952700
Micki
pythondev_help_Micki_2019-02-05T11:38:17.952700
1,549,366,697.9527
6,652
pythondev
help
go_state_connected dosent get called
2019-02-05T11:38:32.953100
Micki
pythondev_help_Micki_2019-02-05T11:38:32.953100
1,549,366,712.9531
6,653
pythondev
help
would your `retry_count = 6` on line 10 reset your couter to 6 on every retry, thus retrying infinitely?
2019-02-05T11:39:06.953200
Claudine
pythondev_help_Claudine_2019-02-05T11:39:06.953200
1,549,366,746.9532
6,654
pythondev
help
let me know if you need any more information
2019-02-05T11:40:55.953700
Micki
pythondev_help_Micki_2019-02-05T11:40:55.953700
1,549,366,855.9537
6,655
pythondev
help
Please use the snippet feature, or backticks, when sharing code. You can do so by clicking on the :heavy_plus_sign: on the left of the input box for a snippet. For more information on snippets click <https://get.slack.help/hc/en-us/articles/204145658-Create-a-snippet|here>. For more information on inline code formattin...
2019-02-05T11:41:45.953800
Leana
pythondev_help_Leana_2019-02-05T11:41:45.953800
1,549,366,905.9538
6,656
pythondev
help
None
2019-02-05T12:24:52.954100
Micki
pythondev_help_Micki_2019-02-05T12:24:52.954100
1,549,369,492.9541
6,657
pythondev
help
None
2019-02-05T12:25:55.954400
Micki
pythondev_help_Micki_2019-02-05T12:25:55.954400
1,549,369,555.9544
6,658
pythondev
help
None
2019-02-05T12:26:27.954700
Micki
pythondev_help_Micki_2019-02-05T12:26:27.954700
1,549,369,587.9547
6,659
pythondev
help
None
2019-02-05T12:26:57.955000
Micki
pythondev_help_Micki_2019-02-05T12:26:57.955000
1,549,369,617.955
6,660
pythondev
help
it seems there is some missing code here right? also, what are the exceptions that you get?
2019-02-05T12:39:37.955600
Karoline
pythondev_help_Karoline_2019-02-05T12:39:37.955600
1,549,370,377.9556
6,661
pythondev
help
i really have no idea what this code is doing but ``` 'source': 'state_init', ``` on the go_state_connected part is the only source you have there thats a string instead of a list. should it be ``` 'source': ['state_init]', ``` like all the other sources?
2019-02-05T12:49:40.957400
Necole
pythondev_help_Necole_2019-02-05T12:49:40.957400
1,549,370,980.9574
6,662
pythondev
help
hey, I'm trying to call a function inside Flask route
2019-02-05T12:49:40.957500
Keva
pythondev_help_Keva_2019-02-05T12:49:40.957500
1,549,370,980.9575
6,663
pythondev
help
None
2019-02-05T12:49:57.957600
Keva
pythondev_help_Keva_2019-02-05T12:49:57.957600
1,549,370,997.9576
6,664
pythondev
help
this one
2019-02-05T12:50:05.958000
Keva
pythondev_help_Keva_2019-02-05T12:50:05.958000
1,549,371,005.958
6,665
pythondev
help
like that:
2019-02-05T12:50:49.958400
Keva
pythondev_help_Keva_2019-02-05T12:50:49.958400
1,549,371,049.9584
6,666
pythondev
help
None
2019-02-05T12:51:17.958500
Keva
pythondev_help_Keva_2019-02-05T12:51:17.958500
1,549,371,077.9585
6,667
pythondev
help
but this route function doesn't stop, if 'check_permissions' return that callback
2019-02-05T12:52:40.959800
Keva
pythondev_help_Keva_2019-02-05T12:52:40.959800
1,549,371,160.9598
6,668
pythondev
help
am I doing something wrong?
2019-02-05T12:53:11.960200
Keva
pythondev_help_Keva_2019-02-05T12:53:11.960200
1,549,371,191.9602
6,669
pythondev
help
if you want to return that call back and have it do the redirect you need to return it in the route not from the function
2019-02-05T12:57:13.961000
Necole
pythondev_help_Necole_2019-02-05T12:57:13.961000
1,549,371,433.961
6,670
pythondev
help
ok.
2019-02-05T12:57:43.961400
Keva
pythondev_help_Keva_2019-02-05T12:57:43.961400
1,549,371,463.9614
6,671
pythondev
help
why does that happen?
2019-02-05T12:57:50.961700
Keva
pythondev_help_Keva_2019-02-05T12:57:50.961700
1,549,371,470.9617
6,672
pythondev
help
inside the route the returns make the browser display stuff etc, but in the function you are just storing the redirect in a vriable and returning it to the route
2019-02-05T12:58:58.962800
Necole
pythondev_help_Necole_2019-02-05T12:58:58.962800
1,549,371,538.9628
6,673
pythondev
help
then the route needs to return it again
2019-02-05T12:59:11.963100
Necole
pythondev_help_Necole_2019-02-05T12:59:11.963100
1,549,371,551.9631
6,674
pythondev
help
ah, thats clear now :slightly_smiling_face:
2019-02-05T13:00:01.963900
Keva
pythondev_help_Keva_2019-02-05T13:00:01.963900
1,549,371,601.9639
6,675
pythondev
help
thank you very much Alan.
2019-02-05T13:00:06.964100
Keva
pythondev_help_Keva_2019-02-05T13:00:06.964100
1,549,371,606.9641
6,676
pythondev
help
hit me up if you get stuck
2019-02-05T13:01:39.964800
Necole
pythondev_help_Necole_2019-02-05T13:01:39.964800
1,549,371,699.9648
6,677
pythondev
help
In tox, I can run `tox -e py36-django21` to run that version of py/django test (present in my `envlist`). I can do `tox -e thistest` to run a defined `[testenv:thistest]` - how do I run a py/django version for just `thistest`?
2019-02-05T13:07:53.965900
Cathern
pythondev_help_Cathern_2019-02-05T13:07:53.965900
1,549,372,073.9659
6,678
pythondev
help
does pycharm (or python) have any tools like resharper has?
2019-02-05T13:31:41.966600
Keva
pythondev_help_Keva_2019-02-05T13:31:41.966600
1,549,373,501.9666
6,679
pythondev
help
eg. suggestions like "inverse if to reduce nesting"
2019-02-05T13:32:00.966900
Keva
pythondev_help_Keva_2019-02-05T13:32:00.966900
1,549,373,520.9669
6,680
pythondev
help
or "you can write this like that" etc, etc.
2019-02-05T13:32:23.967400
Keva
pythondev_help_Keva_2019-02-05T13:32:23.967400
1,549,373,543.9674
6,681
pythondev
help
it would be very hard for python to do that
2019-02-05T13:32:49.967700
Hiroko
pythondev_help_Hiroko_2019-02-05T13:32:49.967700
1,549,373,569.9677
6,682
pythondev
help
c# is a statically typed language, whereas python is dynamic
2019-02-05T13:33:13.968500
Hiroko
pythondev_help_Hiroko_2019-02-05T13:33:13.968500
1,549,373,593.9685
6,683
pythondev
help
due to being non compilled lang?
2019-02-05T13:33:18.968900
Keva
pythondev_help_Keva_2019-02-05T13:33:18.968900
1,549,373,598.9689
6,684
pythondev
help
ah
2019-02-05T13:33:20.969200
Keva
pythondev_help_Keva_2019-02-05T13:33:20.969200
1,549,373,600.9692
6,685
pythondev
help
PyCharm has something akin to this
2019-02-05T13:33:21.969400
Jonas
pythondev_help_Jonas_2019-02-05T13:33:21.969400
1,549,373,601.9694
6,686
pythondev
help
not as advanced, but it suggests refactorings
2019-02-05T13:33:34.969900
Jonas
pythondev_help_Jonas_2019-02-05T13:33:34.969900
1,549,373,614.9699
6,687
pythondev
help
i.e for-loops to list comprehensions
2019-02-05T13:33:41.970200
Jonas
pythondev_help_Jonas_2019-02-05T13:33:41.970200
1,549,373,621.9702
6,688
pythondev
help
but not really on par with resharper or java equivalent
2019-02-05T13:33:44.970300
Hiroko
pythondev_help_Hiroko_2019-02-05T13:33:44.970300
1,549,373,624.9703
6,689
pythondev
help
yeah, nothing as advanced
2019-02-05T13:33:54.970700
Jonas
pythondev_help_Jonas_2019-02-05T13:33:54.970700
1,549,373,634.9707
6,690
pythondev
help
but it does come up with some nifty ones
2019-02-05T13:34:03.971200
Jonas
pythondev_help_Jonas_2019-02-05T13:34:03.971200
1,549,373,643.9712
6,691
pythondev
help
<@Jonas> - actually python never suggested comprehensions instead of loops
2019-02-05T13:34:13.971500
Keva
pythondev_help_Keva_2019-02-05T13:34:13.971500
1,549,373,653.9715
6,692
pythondev
help
do i have to turn it on?
2019-02-05T13:34:16.971800
Keva
pythondev_help_Keva_2019-02-05T13:34:16.971800
1,549,373,656.9718
6,693
pythondev
help
it depends on the complexity of the loop
2019-02-05T13:34:26.972200
Jonas
pythondev_help_Jonas_2019-02-05T13:34:26.972200
1,549,373,666.9722
6,694
pythondev
help
pycharm, not python
2019-02-05T13:34:41.972800
Keva
pythondev_help_Keva_2019-02-05T13:34:41.972800
1,549,373,681.9728
6,695
pythondev
help
```a = [] for i in range(10): a.append(i+10)``` will trigger the suggestion
2019-02-05T13:34:48.973000
Jonas
pythondev_help_Jonas_2019-02-05T13:34:48.973000
1,549,373,688.973
6,696
pythondev
help
but the dynamic nature makes this really hard to do in the general sense.
2019-02-05T13:35:09.973300
Jonas
pythondev_help_Jonas_2019-02-05T13:35:09.973300
1,549,373,709.9733
6,697
pythondev
help
Look for the little yellow lightbulb
2019-02-05T13:35:14.973600
Jonas
pythondev_help_Jonas_2019-02-05T13:35:14.973600
1,549,373,714.9736
6,698
pythondev
help
it doesn't suggest anything :confused:
2019-02-05T13:35:46.974400
Keva
pythondev_help_Keva_2019-02-05T13:35:46.974400
1,549,373,746.9744
6,699
pythondev
help
PyCharm also supports some pretty advanced refactoring tools, like moving methods, renaming, inheritance stuff, but it’s never 100% reliable :disappointed:
2019-02-05T13:36:04.974800
Jonas
pythondev_help_Jonas_2019-02-05T13:36:04.974800
1,549,373,764.9748
6,700
pythondev
help
None
2019-02-05T13:36:14.974900
Keva
pythondev_help_Keva_2019-02-05T13:36:14.974900
1,549,373,774.9749
6,701
pythondev
help
`In the Settings/Preferences dialog (⌘,), select Editor | General | Code Completion.`
2019-02-05T13:36:52.975800
Jonas
pythondev_help_Jonas_2019-02-05T13:36:52.975800
1,549,373,812.9758
6,702
pythondev
help
what do you have active when you open up settings and go to Editor -&gt; Inspections -&gt; Python?
2019-02-05T13:37:04.976100
Hiroko
pythondev_help_Hiroko_2019-02-05T13:37:04.976100
1,549,373,824.9761
6,703
pythondev
help
<https://www.jetbrains.com/help/pycharm/auto-completing-code.html>
2019-02-05T13:37:05.976200
Jonas
pythondev_help_Jonas_2019-02-05T13:37:05.976200
1,549,373,825.9762
6,704
pythondev
help
<https://www.jetbrains.com/help/pycharm/intention-actions.html> and this
2019-02-05T13:37:22.976600
Jonas
pythondev_help_Jonas_2019-02-05T13:37:22.976600
1,549,373,842.9766
6,705
pythondev
help
<@Hiroko>: almost everything is turned on.
2019-02-05T13:40:17.977000
Keva
pythondev_help_Keva_2019-02-05T13:40:17.977000
1,549,374,017.977
6,706
pythondev
help
same with intentions
2019-02-05T13:41:34.977200
Keva
pythondev_help_Keva_2019-02-05T13:41:34.977200
1,549,374,094.9772
6,707
pythondev
help
well, it does suggest type hints
2019-02-05T13:45:39.977500
Keva
pythondev_help_Keva_2019-02-05T13:45:39.977500
1,549,374,339.9775
6,708
pythondev
help
<@Karoline> I dont get any exceptions its just the trigger dosent get called go_state_connected
2019-02-05T14:09:10.978600
Micki
pythondev_help_Micki_2019-02-05T14:09:10.978600
1,549,375,750.9786
6,709
pythondev
help
<@Necole> Thia code is working in another code base. I am just contanerising it
2019-02-05T14:10:10.979400
Micki
pythondev_help_Micki_2019-02-05T14:10:10.979400
1,549,375,810.9794
6,710
pythondev
help
this code basicaly brings up hardware device from init to connected
2019-02-05T14:10:39.980100
Micki
pythondev_help_Micki_2019-02-05T14:10:39.980100
1,549,375,839.9801
6,711
pythondev
help
intersting
2019-02-05T14:10:40.980200
Necole
pythondev_help_Necole_2019-02-05T14:10:40.980200
1,549,375,840.9802
6,712
pythondev
help
I am not sure if there is anything in environment could affect this
2019-02-05T14:11:19.980700
Micki
pythondev_help_Micki_2019-02-05T14:11:19.980700
1,549,375,879.9807
6,713
pythondev
help
None
2019-02-05T14:15:09.980800
Micki
pythondev_help_Micki_2019-02-05T14:15:09.980800
1,549,376,109.9808
6,714
pythondev
help
These are the states
2019-02-05T14:15:19.981200
Micki
pythondev_help_Micki_2019-02-05T14:15:19.981200
1,549,376,119.9812
6,715
pythondev
help
since state machine stops from thread does it depend on any python environment variable?
2019-02-05T14:40:04.982500
Micki
pythondev_help_Micki_2019-02-05T14:40:04.982500
1,549,377,604.9825
6,716
pythondev
help
Given an integer A, you have to find the Ath Perfect Number. A Perfect Number has the following properties : It comprises only 6 and 7. String length in a perfect number is even. It is a palindrome number. For example, 66, 77, 667766 are the perfect number, Where 666, 676, 7, 6 are not. First, four perfect number is:...
2019-02-05T15:12:39.983000
Moira
pythondev_help_Moira_2019-02-05T15:12:39.983000
1,549,379,559.983
6,717
pythondev
help
Can anyone help me with this question?
2019-02-05T15:12:52.983300
Moira
pythondev_help_Moira_2019-02-05T15:12:52.983300
1,549,379,572.9833
6,718
pythondev
help
what have you tried so far?
2019-02-05T15:13:43.983500
Hiroko
pythondev_help_Hiroko_2019-02-05T15:13:43.983500
1,549,379,623.9835
6,719
pythondev
help
None
2019-02-05T15:14:04.983600
Moira
pythondev_help_Moira_2019-02-05T15:14:04.983600
1,549,379,644.9836
6,720