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
oh ha nope, bad assumption on my part :wink:
2018-03-05T10:46:21.000056
Elisha
pythondev_help_Elisha_2018-03-05T10:46:21.000056
1,520,246,781.000056
37,224
pythondev
help
data analysis yes, crypto market no
2018-03-05T10:46:34.000066
Elisha
pythondev_help_Elisha_2018-03-05T10:46:34.000066
1,520,246,794.000066
37,225
pythondev
help
ahhh ok. were u able to dichepher the listofdictionary and use it in comprehension with if-else condition ?
2018-03-05T10:47:10.000494
Refugia
pythondev_help_Refugia_2018-03-05T10:47:10.000494
1,520,246,830.000494
37,226
pythondev
help
maybe wrap `v['BV'] if tk in v['T'] else 0` in `[ ]`
2018-03-05T11:00:23.000430
Elisha
pythondev_help_Elisha_2018-03-05T11:00:23.000430
1,520,247,623.00043
37,227
pythondev
help
i've run into similar errors and had to do that
2018-03-05T11:00:40.000529
Elisha
pythondev_help_Elisha_2018-03-05T11:00:40.000529
1,520,247,640.000529
37,228
pythondev
help
no idea why
2018-03-05T11:00:45.000578
Elisha
pythondev_help_Elisha_2018-03-05T11:00:45.000578
1,520,247,645.000578
37,229
pythondev
help
maybe `v['BV'] if hasattr(v, '__iter__') and tk in v['T']`
2018-03-05T11:04:19.000130
Floy
pythondev_help_Floy_2018-03-05T11:04:19.000130
1,520,247,859.00013
37,230
pythondev
help
check if `v` is an iterable
2018-03-05T11:04:58.000557
Floy
pythondev_help_Floy_2018-03-05T11:04:58.000557
1,520,247,898.000557
37,231
pythondev
help
Good morning lovely people! I'm trying to figure out if something is possible in Python 3. I know that in a class, I can write functions that allow me to cast my class to primatives using functions like __str__ and __int__. What I'd like to do though is be able to cast the class to a pandas Dataframe
2018-03-05T11:12:32.000672
Yvone
pythondev_help_Yvone_2018-03-05T11:12:32.000672
1,520,248,352.000672
37,232
pythondev
help
Is object to object cast supported?
2018-03-05T11:12:51.000180
Yvone
pythondev_help_Yvone_2018-03-05T11:12:51.000180
1,520,248,371.00018
37,233
pythondev
help
I wouldn’t
2018-03-05T11:16:25.000834
Floy
pythondev_help_Floy_2018-03-05T11:16:25.000834
1,520,248,585.000834
37,234
pythondev
help
use the DF constructor
2018-03-05T11:16:30.000746
Floy
pythondev_help_Floy_2018-03-05T11:16:30.000746
1,520,248,590.000746
37,235
pythondev
help
`class MyCoolClass(pd.DataFrame)`?
2018-03-05T11:17:22.000697
Yvone
pythondev_help_Yvone_2018-03-05T11:17:22.000697
1,520,248,642.000697
37,236
pythondev
help
hi guys, i'm fairly new to python and planning to learn more (esp. django) by creating my own personal website. Can you recommend any specific hosting?
2018-03-05T11:30:36.000316
Lisandra
pythondev_help_Lisandra_2018-03-05T11:30:36.000316
1,520,249,436.000316
37,237
pythondev
help
self hosting is pretty cheap and fun to learn!
2018-03-05T11:35:21.000098
Elisha
pythondev_help_Elisha_2018-03-05T11:35:21.000098
1,520,249,721.000098
37,238
pythondev
help
$5 for a domain name then just route requests to your own IP, forward traffic to some box on your network and let it run 24/7
2018-03-05T11:35:57.000779
Elisha
pythondev_help_Elisha_2018-03-05T11:35:57.000779
1,520,249,757.000779
37,239
pythondev
help
then crank through some apache/nginx docs, it's a good weekend project :wink:
2018-03-05T11:36:12.000039
Elisha
pythondev_help_Elisha_2018-03-05T11:36:12.000039
1,520,249,772.000039
37,240
pythondev
help
in my case I have two old Dell PowerEdges running in my living room, sounds like a jet engine but my apartment stays warm
2018-03-05T11:36:57.000397
Elisha
pythondev_help_Elisha_2018-03-05T11:36:57.000397
1,520,249,817.000397
37,241
pythondev
help
<@Lisandra> Alternatively, if you don't want the headache of learning/running your own server, Heroku and Google app engine offer some really cheap/free services for hosting apps
2018-03-05T11:38:38.000033
Porsha
pythondev_help_Porsha_2018-03-05T11:38:38.000033
1,520,249,918.000033
37,242
pythondev
help
When ever a loop is massaging over the contents of a list (iterable) try to implement same via list comprehension
2018-03-05T11:51:23.000393
Tammi
pythondev_help_Tammi_2018-03-05T11:51:23.000393
1,520,250,683.000393
37,243
pythondev
help
i tried this as well, but doesnt work
2018-03-05T11:52:36.000075
Refugia
pythondev_help_Refugia_2018-03-05T11:52:36.000075
1,520,250,756.000075
37,244
pythondev
help
Thanks to our sponsors, <https://digitalocean.com|Digital Ocean> and <https://sentry.io|Sentry> for providing hosting &amp; services helping us host our <https://www.pyslackers.com|website> and Sir Bot-a-lot. If you are planning on using one of those services please use our referral codes: 1. <https://m.do.co/c/457f09...
2018-03-05T11:53:01.000502
Hyo
pythondev_help_Hyo_2018-03-05T11:53:01.000502
1,520,250,781.000502
37,245
pythondev
help
<@Lisandra> You can use digitalocean if you want to help the community :slightly_smiling_face: They are pretty good and quite cheap
2018-03-05T11:53:47.000628
Micki
pythondev_help_Micki_2018-03-05T11:53:47.000628
1,520,250,827.000628
37,246
pythondev
help
`k = [v['BV'] if hasattr(v, '__iter__') and tk in v['T'] else 0 for v in getticks_listofdict for tk in ticker_list]` tried this, still same error `TypeError: argument of type 'float' is not iterable`
2018-03-05T11:56:12.000076
Refugia
pythondev_help_Refugia_2018-03-05T11:56:12.000076
1,520,250,972.000076
37,247
pythondev
help
thanks a lot guys! will look into all your suggestions. but will definitely check out digitalocean first :wink:
2018-03-05T11:56:33.000892
Lisandra
pythondev_help_Lisandra_2018-03-05T11:56:33.000892
1,520,250,993.000892
37,248
pythondev
help
<@Elisha> Do you have an estimate of the cost of running those ?
2018-03-05T11:57:27.000693
Micki
pythondev_help_Micki_2018-03-05T11:57:27.000693
1,520,251,047.000693
37,249
pythondev
help
I don't, but: ``` kraete@HKLabs:~$ uptime 11:44:47 up 61 days, 14:35, 6 users, load average: 0.11, 0.16, 0.17 ``` im not really hammering them
2018-03-05T11:58:26.000742
Elisha
pythondev_help_Elisha_2018-03-05T11:58:26.000742
1,520,251,106.000742
37,250
pythondev
help
i can't say i pay too much attention to my electric bill either lol
2018-03-05T11:59:05.000670
Elisha
pythondev_help_Elisha_2018-03-05T11:59:05.000670
1,520,251,145.00067
37,251
pythondev
help
maybe like $5-10/mo extra maybe? ill have to actually look
2018-03-05T11:59:25.000487
Elisha
pythondev_help_Elisha_2018-03-05T11:59:25.000487
1,520,251,165.000487
37,252
pythondev
help
ok thanks :slightly_smiling_face: and did you buy them ? or someone gave them to you
2018-03-05T11:59:47.000820
Micki
pythondev_help_Micki_2018-03-05T11:59:47.000820
1,520,251,187.00082
37,253
pythondev
help
i might be borking the models but i have a 1950 i bought for $100 from a local company that was upgrading infrastructure, i got a 2250 for free from my job when we moved over to the cloud
2018-03-05T12:00:35.000670
Elisha
pythondev_help_Elisha_2018-03-05T12:00:35.000670
1,520,251,235.00067
37,254
pythondev
help
craigslist is wonderfull, carrying those beasts a mile is not so much
2018-03-05T12:01:09.000365
Elisha
pythondev_help_Elisha_2018-03-05T12:01:09.000365
1,520,251,269.000365
37,255
pythondev
help
atm I'm renting one @ovh maybe one day I'll move to one in house
2018-03-05T12:02:20.000510
Micki
pythondev_help_Micki_2018-03-05T12:02:20.000510
1,520,251,340.00051
37,256
pythondev
help
need to move first ¯\_(ツ)_/¯
2018-03-05T12:02:27.000890
Micki
pythondev_help_Micki_2018-03-05T12:02:27.000890
1,520,251,347.00089
37,257
pythondev
help
just be careful if you don't have an SO or roommate, you'll end up living in a server closet like me
2018-03-05T12:08:16.000252
Elisha
pythondev_help_Elisha_2018-03-05T12:08:16.000252
1,520,251,696.000252
37,258
pythondev
help
hahaha
2018-03-05T12:08:37.000142
Floy
pythondev_help_Floy_2018-03-05T12:08:37.000142
1,520,251,717.000142
37,259
pythondev
help
at least you’re getting some extra heat in the winter
2018-03-05T12:08:53.000536
Floy
pythondev_help_Floy_2018-03-05T12:08:53.000536
1,520,251,733.000536
37,260
pythondev
help
I'm trying to write a library that enforces calling one function when performing an operation against a single object and another function when using multiple objects. They both do REST requests and one endpoint accepts and array and another accepts a single object. What I'd like to do is use a decorator, maybe inspect...
2018-03-05T12:13:53.000583
Yvone
pythondev_help_Yvone_2018-03-05T12:13:53.000583
1,520,252,033.000583
37,261
pythondev
help
what do you mean by `multiple objects`?
2018-03-05T12:32:09.000570
Floy
pythondev_help_Floy_2018-03-05T12:32:09.000570
1,520,253,129.00057
37,262
pythondev
help
eg, is the function operating over a list?
2018-03-05T12:32:23.000169
Floy
pythondev_help_Floy_2018-03-05T12:32:23.000169
1,520,253,143.000169
37,263
pythondev
help
yup
2018-03-05T12:32:26.000437
Yvone
pythondev_help_Yvone_2018-03-05T12:32:26.000437
1,520,253,146.000437
37,264
pythondev
help
during class creation, should dunder methods come before user-defined methods or vice versa?
2018-03-05T12:32:27.000467
Shaun
pythondev_help_Shaun_2018-03-05T12:32:27.000467
1,520,253,147.000467
37,265
pythondev
help
what is your opinion + rationale?
2018-03-05T12:32:37.000758
Shaun
pythondev_help_Shaun_2018-03-05T12:32:37.000758
1,520,253,157.000758
37,266
pythondev
help
ok, so why not just check for list length, <@Yvone>
2018-03-05T12:32:41.000336
Floy
pythondev_help_Floy_2018-03-05T12:32:41.000336
1,520,253,161.000336
37,267
pythondev
help
and raise an error when appropriate
2018-03-05T12:32:54.000537
Floy
pythondev_help_Floy_2018-03-05T12:32:54.000537
1,520,253,174.000537
37,268
pythondev
help
That allows me to validate that you're hitting the correct function for the plural
2018-03-05T12:33:05.000839
Yvone
pythondev_help_Yvone_2018-03-05T12:33:05.000839
1,520,253,185.000839
37,269
pythondev
help
but I want to detect if you're doing
2018-03-05T12:33:12.000386
Yvone
pythondev_help_Yvone_2018-03-05T12:33:12.000386
1,520,253,192.000386
37,270
pythondev
help
` for x in range(3): do_single_func()`
2018-03-05T12:33:27.000569
Yvone
pythondev_help_Yvone_2018-03-05T12:33:27.000569
1,520,253,207.000569
37,271
pythondev
help
Because that would result in 3 API calls rather than 1
2018-03-05T12:33:39.000147
Yvone
pythondev_help_Yvone_2018-03-05T12:33:39.000147
1,520,253,219.000147
37,272
pythondev
help
I write the docs
2018-03-05T12:33:46.000201
Yvone
pythondev_help_Yvone_2018-03-05T12:33:46.000201
1,520,253,226.000201
37,273
pythondev
help
But people still call the single
2018-03-05T12:33:52.000408
Yvone
pythondev_help_Yvone_2018-03-05T12:33:52.000408
1,520,253,232.000408
37,274
pythondev
help
I’m a little confused
2018-03-05T12:38:44.000475
Floy
pythondev_help_Floy_2018-03-05T12:38:44.000475
1,520,253,524.000475
37,275
pythondev
help
Two functions
2018-03-05T12:38:57.000148
Yvone
pythondev_help_Yvone_2018-03-05T12:38:57.000148
1,520,253,537.000148
37,276
pythondev
help
send_array()
2018-03-05T12:39:00.000412
Yvone
pythondev_help_Yvone_2018-03-05T12:39:00.000412
1,520,253,540.000412
37,277
pythondev
help
send_single()
2018-03-05T12:39:03.000152
Yvone
pythondev_help_Yvone_2018-03-05T12:39:03.000152
1,520,253,543.000152
37,278
pythondev
help
The problem is people are calling:
2018-03-05T12:39:16.000527
Yvone
pythondev_help_Yvone_2018-03-05T12:39:16.000527
1,520,253,556.000527
37,279
pythondev
help
for x in huge_list: send_single(x)
2018-03-05T12:39:35.000546
Yvone
pythondev_help_Yvone_2018-03-05T12:39:35.000546
1,520,253,575.000546
37,280
pythondev
help
as opposed to
2018-03-05T12:39:38.000627
Yvone
pythondev_help_Yvone_2018-03-05T12:39:38.000627
1,520,253,578.000627
37,281
pythondev
help
send_array(huge_list)
2018-03-05T12:39:47.000698
Yvone
pythondev_help_Yvone_2018-03-05T12:39:47.000698
1,520,253,587.000698
37,282
pythondev
help
gotcha. unless you want to implement some sort of throttling, there really isn’t a way to do this in your api
2018-03-05T12:40:00.000405
Floy
pythondev_help_Floy_2018-03-05T12:40:00.000405
1,520,253,600.000405
37,283
pythondev
help
Make sense?
2018-03-05T12:40:00.000557
Yvone
pythondev_help_Yvone_2018-03-05T12:40:00.000557
1,520,253,600.000557
37,284
pythondev
help
because each request is its own isolated request-response connection
2018-03-05T12:40:17.000283
Floy
pythondev_help_Floy_2018-03-05T12:40:17.000283
1,520,253,617.000283
37,285
pythondev
help
And I'm not really trying to do it server side, I've got a python library that the users use
2018-03-05T12:40:23.000595
Yvone
pythondev_help_Yvone_2018-03-05T12:40:23.000595
1,520,253,623.000595
37,286
pythondev
help
And I'm trying to enforce that they don't call send_single in a loop
2018-03-05T12:40:35.000668
Yvone
pythondev_help_Yvone_2018-03-05T12:40:35.000668
1,520,253,635.000668
37,287
pythondev
help
So I was thinking to just look for a `for` statement somewhere in inspect.stack()
2018-03-05T12:40:55.000750
Yvone
pythondev_help_Yvone_2018-03-05T12:40:55.000750
1,520,253,655.00075
37,288
pythondev
help
or a jmp table
2018-03-05T12:41:00.000369
Yvone
pythondev_help_Yvone_2018-03-05T12:41:00.000369
1,520,253,660.000369
37,289
pythondev
help
`assert not in loop` basically
2018-03-05T12:41:38.000011
Yvone
pythondev_help_Yvone_2018-03-05T12:41:38.000011
1,520,253,698.000011
37,290
pythondev
help
I would do some sort of throttling. Doesn't really make sense to do that in the client anyways
2018-03-05T12:41:47.000540
Micki
pythondev_help_Micki_2018-03-05T12:41:47.000540
1,520,253,707.00054
37,291
pythondev
help
The point is we don't want to throttle
2018-03-05T12:42:06.000247
Yvone
pythondev_help_Yvone_2018-03-05T12:42:06.000247
1,520,253,726.000247
37,292
pythondev
help
oh how I wish we could stop people from writing loops like that when talking to databases..
2018-03-05T12:42:12.000306
Sharee
pythondev_help_Sharee_2018-03-05T12:42:12.000306
1,520,253,732.000306
37,293
pythondev
help
Usingle the send_single() funciton causes an upload time of 4-5 hours. Using the sned_array() takes 3 seconds
2018-03-05T12:42:28.000487
Yvone
pythondev_help_Yvone_2018-03-05T12:42:28.000487
1,520,253,748.000487
37,294
pythondev
help
Or maybe count the interval between each call to `send_single` and log something
2018-03-05T12:42:31.000051
Micki
pythondev_help_Micki_2018-03-05T12:42:31.000051
1,520,253,751.000051
37,295
pythondev
help
Not worried about getting spammed - huge scale
2018-03-05T12:42:43.000192
Yvone
pythondev_help_Yvone_2018-03-05T12:42:43.000192
1,520,253,763.000192
37,296
pythondev
help
We just want the data scis to write functions that go faster
2018-03-05T12:42:55.000593
Yvone
pythondev_help_Yvone_2018-03-05T12:42:55.000593
1,520,253,775.000593
37,297
pythondev
help
Run time optimization
2018-03-05T12:43:02.000091
Yvone
pythondev_help_Yvone_2018-03-05T12:43:02.000091
1,520,253,782.000091
37,298
pythondev
help
Does anybody here uses Telegram?
2018-03-05T12:43:30.000081
Ashley
pythondev_help_Ashley_2018-03-05T12:43:30.000081
1,520,253,810.000081
37,299
pythondev
help
There's this one bot - <https://telegram.me/DropMailBot> ( create fake email adress for ya )
2018-03-05T12:43:47.000474
Ashley
pythondev_help_Ashley_2018-03-05T12:43:47.000474
1,520,253,827.000474
37,300
pythondev
help
Anybody knows how it works?
2018-03-05T12:43:54.000604
Ashley
pythondev_help_Ashley_2018-03-05T12:43:54.000604
1,520,253,834.000604
37,301
pythondev
help
Or could possibly work?
2018-03-05T12:43:58.000779
Ashley
pythondev_help_Ashley_2018-03-05T12:43:58.000779
1,520,253,838.000779
37,302
pythondev
help
what the app or the service?
2018-03-05T12:44:13.000738
Floy
pythondev_help_Floy_2018-03-05T12:44:13.000738
1,520,253,853.000738
37,303
pythondev
help
The bot itself
2018-03-05T12:44:23.000089
Ashley
pythondev_help_Ashley_2018-03-05T12:44:23.000089
1,520,253,863.000089
37,304
pythondev
help
Like how does it create the address that we can use
2018-03-05T12:44:46.000233
Ashley
pythondev_help_Ashley_2018-03-05T12:44:46.000233
1,520,253,886.000233
37,305
pythondev
help
And instantly knows if there's new emails coming
2018-03-05T12:44:55.000085
Ashley
pythondev_help_Ashley_2018-03-05T12:44:55.000085
1,520,253,895.000085
37,306
pythondev
help
¯\_(ツ)_/¯
2018-03-05T12:45:34.000275
Floy
pythondev_help_Floy_2018-03-05T12:45:34.000275
1,520,253,934.000275
37,307
pythondev
help
lol
2018-03-05T12:45:56.000682
Ashley
pythondev_help_Ashley_2018-03-05T12:45:56.000682
1,520,253,956.000682
37,308
pythondev
help
I can think of a couple ways to do it, but whether they’re the ones being used is hard to know without actually having a look in telegram’s infrastructure
2018-03-05T12:46:08.000074
Floy
pythondev_help_Floy_2018-03-05T12:46:08.000074
1,520,253,968.000074
37,309
pythondev
help
I can think of a couple ways to do it - I have NONE in my head.. So it'd be awesome to hear out your ideas
2018-03-05T12:46:37.000166
Ashley
pythondev_help_Ashley_2018-03-05T12:46:37.000166
1,520,253,997.000166
37,310
pythondev
help
well, telegram already has your email with it, right? so its basically a middleman
2018-03-05T12:48:05.000188
Floy
pythondev_help_Floy_2018-03-05T12:48:05.000188
1,520,254,085.000188
37,311
pythondev
help
create a fake mail account that’s mapped to your email
2018-03-05T12:48:19.000048
Floy
pythondev_help_Floy_2018-03-05T12:48:19.000048
1,520,254,099.000048
37,312
pythondev
help
and then act as a proxy
2018-03-05T12:48:27.000526
Floy
pythondev_help_Floy_2018-03-05T12:48:27.000526
1,520,254,107.000526
37,313
pythondev
help
Telegram is not connected to email
2018-03-05T12:49:10.000342
Ashley
pythondev_help_Ashley_2018-03-05T12:49:10.000342
1,520,254,150.000342
37,314
pythondev
help
So DropMail creates an email account for you and forwards the status/emails to your telegram account?
2018-03-05T12:50:08.000747
Jama
pythondev_help_Jama_2018-03-05T12:50:08.000747
1,520,254,208.000747
37,315
pythondev
help
Yes, exactly
2018-03-05T12:51:21.000739
Ashley
pythondev_help_Ashley_2018-03-05T12:51:21.000739
1,520,254,281.000739
37,316
pythondev
help
I always used 10 Minute Mail kinda services for that
2018-03-05T12:51:52.000417
Ashley
pythondev_help_Ashley_2018-03-05T12:51:52.000417
1,520,254,312.000417
37,317
pythondev
help
but now it's even more easier than that
2018-03-05T12:51:59.000515
Ashley
pythondev_help_Ashley_2018-03-05T12:51:59.000515
1,520,254,319.000515
37,318
pythondev
help
So one way you could do this is register a domain and setup a wildcard email address for it, *@mydomain.com, then you can create mailboxes using a short UUID where the time it takes to cycle through the possibilities means its highly unlikely someone getting an account again within a reasonable period, say 3 years, the...
2018-03-05T13:23:04.000666
Jama
pythondev_help_Jama_2018-03-05T13:23:04.000666
1,520,256,184.000666
37,319
pythondev
help
I’ve been trying to wrap my head around this functionality for about 2 weeks, and have made it no where. I’d like a record to be ‘bookmarked’, and then have groups made up of those bookmarks. <https://gist.github.com/colonelrascals/f8385009c6a233948a81f050c0a8094d> I’d like to be able to add/delete bookmarks within ...
2018-03-05T14:42:26.000691
Florida
pythondev_help_Florida_2018-03-05T14:42:26.000691
1,520,260,946.000691
37,320
pythondev
help
<@Florida> what’s the `Resource` for?
2018-03-05T14:46:27.000037
Floy
pythondev_help_Floy_2018-03-05T14:46:27.000037
1,520,261,187.000037
37,321
pythondev
help
ah, nevermind
2018-03-05T14:46:45.000711
Floy
pythondev_help_Floy_2018-03-05T14:46:45.000711
1,520,261,205.000711
37,322
pythondev
help
I see it in Bookmark
2018-03-05T14:46:50.000021
Floy
pythondev_help_Floy_2018-03-05T14:46:50.000021
1,520,261,210.000021
37,323