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
I doubt that's the real one
2018-02-23T16:22:02.000100
Stefan
pythondev_help_Stefan_2018-02-23T16:22:02.000100
1,519,402,922.0001
35,824
pythondev
help
ah it is xD
2018-02-23T16:22:12.000008
Stefan
pythondev_help_Stefan_2018-02-23T16:22:12.000008
1,519,402,932.000008
35,825
pythondev
help
It is. He's not me, though, and I'm not him
2018-02-23T16:22:12.000038
Garrett
pythondev_help_Garrett_2018-02-23T16:22:12.000038
1,519,402,932.000038
35,826
pythondev
help
would love some "context dependent auto-complete" (in slack and everywhere else)
2018-02-23T16:22:32.000249
Stefan
pythondev_help_Stefan_2018-02-23T16:22:32.000249
1,519,402,952.000249
35,827
pythondev
help
So if you want a script that's checking for something...long polling? Or some other sort of pubsub model?
2018-02-23T16:23:08.000290
Garrett
pythondev_help_Garrett_2018-02-23T16:23:08.000290
1,519,402,988.00029
35,828
pythondev
help
yea i thought maybe pubsub with zeromq but these are all pretty big :confused:
2018-02-23T16:23:30.000129
Stefan
pythondev_help_Stefan_2018-02-23T16:23:30.000129
1,519,403,010.000129
35,829
pythondev
help
it makes me wonder though when the right way is using the events of sqlalchemy/postgres
2018-02-23T16:23:54.000017
Stefan
pythondev_help_Stefan_2018-02-23T16:23:54.000017
1,519,403,034.000017
35,830
pythondev
help
there are some sort of trigger is postgres but no idea if they are simple to use with python
2018-02-23T16:24:28.000517
Micki
pythondev_help_Micki_2018-02-23T16:24:28.000517
1,519,403,068.000517
35,831
pythondev
help
maybe sfrost over in <#C3X4T24LB|databases> can help you
2018-02-23T16:24:45.000338
Micki
pythondev_help_Micki_2018-02-23T16:24:45.000338
1,519,403,085.000338
35,832
pythondev
help
Do you need the active, outside monitoring? Couldn't updating the database kick off the task directly? SQLAlchemy spawns the process or something?
2018-02-23T16:24:55.000142
Garrett
pythondev_help_Garrett_2018-02-23T16:24:55.000142
1,519,403,095.000142
35,833
pythondev
help
kenneth: i'd like to have an existing process because there will be a lot of predicates that would have to be checked for users
2018-02-23T16:25:48.000435
Stefan
pythondev_help_Stefan_2018-02-23T16:25:48.000435
1,519,403,148.000435
35,834
pythondev
help
so i want to do this processing based on the User class in a separate script
2018-02-23T16:25:58.000134
Stefan
pythondev_help_Stefan_2018-02-23T16:25:58.000134
1,519,403,158.000134
35,835
pythondev
help
when a signal comes in, I can then quickly check which users to send
2018-02-23T16:26:27.000290
Stefan
pythondev_help_Stefan_2018-02-23T16:26:27.000290
1,519,403,187.00029
35,836
pythondev
help
Huh
2018-02-23T16:26:34.000476
Garrett
pythondev_help_Garrett_2018-02-23T16:26:34.000476
1,519,403,194.000476
35,837
pythondev
help
sorry ya’ll i got pulled into something. i appreciate all the feedback and am super thankful for you all
2018-02-23T16:26:47.000247
Tobias
pythondev_help_Tobias_2018-02-23T16:26:47.000247
1,519,403,207.000247
35,838
pythondev
help
(i'm getting signals from external sources, not from users)
2018-02-23T16:27:01.000100
Stefan
pythondev_help_Stefan_2018-02-23T16:27:01.000100
1,519,403,221.0001
35,839
pythondev
help
100k signals a day, i cannot query "which users want to receive this signal" quickly
2018-02-23T16:27:44.000096
Stefan
pythondev_help_Stefan_2018-02-23T16:27:44.000096
1,519,403,264.000096
35,840
pythondev
help
so i want to have a process running that will keep user settings up-to-date and in a way that when a signal comes in, a signal can quickly be checked
2018-02-23T16:28:47.000589
Stefan
pythondev_help_Stefan_2018-02-23T16:28:47.000589
1,519,403,327.000589
35,841
pythondev
help
Yeah, seems like you'd want postgres/etc to publish the update and relevant info, and your script(s) to subscribe to the updates
2018-02-23T16:30:24.000020
Garrett
pythondev_help_Garrett_2018-02-23T16:30:24.000020
1,519,403,424.00002
35,842
pythondev
help
hmmm
2018-02-23T16:30:51.000597
Stefan
pythondev_help_Stefan_2018-02-23T16:30:51.000597
1,519,403,451.000597
35,843
pythondev
help
It honestly seems easiest with Celery but you could do it yourself with RabbitMQ or the like
2018-02-23T16:30:57.000060
Garrett
pythondev_help_Garrett_2018-02-23T16:30:57.000060
1,519,403,457.00006
35,844
pythondev
help
but i figured the "after_insert" event from postgres (in sqlalchemy) only works within a process?
2018-02-23T16:31:05.000541
Stefan
pythondev_help_Stefan_2018-02-23T16:31:05.000541
1,519,403,465.000541
35,845
pythondev
help
mmm
2018-02-23T16:31:22.000440
Stefan
pythondev_help_Stefan_2018-02-23T16:31:22.000440
1,519,403,482.00044
35,846
pythondev
help
Well, yeah, but it would just publish the message
2018-02-23T16:31:31.000408
Garrett
pythondev_help_Garrett_2018-02-23T16:31:31.000408
1,519,403,491.000408
35,847
pythondev
help
The subscribers, in their own processes, would receive the message and decide what to do with it, if anything
2018-02-23T16:31:47.000547
Garrett
pythondev_help_Garrett_2018-02-23T16:31:47.000547
1,519,403,507.000547
35,848
pythondev
help
yea i see what you mean
2018-02-23T16:31:54.000438
Stefan
pythondev_help_Stefan_2018-02-23T16:31:54.000438
1,519,403,514.000438
35,849
pythondev
help
though celery doesn't seem logical with longer running scripts?
2018-02-23T16:32:07.000360
Stefan
pythondev_help_Stefan_2018-02-23T16:32:07.000360
1,519,403,527.00036
35,850
pythondev
help
If your predicates/conditions are long-running, then, yeah, you probably don't need Celery
2018-02-23T16:32:40.000323
Garrett
pythondev_help_Garrett_2018-02-23T16:32:40.000323
1,519,403,560.000323
35,851
pythondev
help
i think rabbitmq would make sense
2018-02-23T16:32:41.000381
Stefan
pythondev_help_Stefan_2018-02-23T16:32:41.000381
1,519,403,561.000381
35,852
pythondev
help
thanks :slightly_smiling_face:
2018-02-23T16:32:51.000326
Stefan
pythondev_help_Stefan_2018-02-23T16:32:51.000326
1,519,403,571.000326
35,853
pythondev
help
If you're able to decide what do to quickly, then Celery tasks would be just fine and less hassle
2018-02-23T16:32:59.000643
Garrett
pythondev_help_Garrett_2018-02-23T16:32:59.000643
1,519,403,579.000643
35,854
pythondev
help
i was just hoping to keep it sqlalchemy/postgres based
2018-02-23T16:33:00.000007
Stefan
pythondev_help_Stefan_2018-02-23T16:33:00.000007
1,519,403,580.000007
35,855
pythondev
help
yea i agree with you
2018-02-23T16:33:11.000052
Stefan
pythondev_help_Stefan_2018-02-23T16:33:11.000052
1,519,403,591.000052
35,856
pythondev
help
maybe indeed through postgres it might be possible
2018-02-23T16:33:36.000650
Stefan
pythondev_help_Stefan_2018-02-23T16:33:36.000650
1,519,403,616.00065
35,857
pythondev
help
With standard pubsub, you could maybe use the pubsub model itself to do the filtering/conditions for you
2018-02-23T16:34:15.000519
Garrett
pythondev_help_Garrett_2018-02-23T16:34:15.000519
1,519,403,655.000519
35,858
pythondev
help
thats also an interesting thought :slightly_smiling_face:
2018-02-23T16:36:00.000597
Stefan
pythondev_help_Stefan_2018-02-23T16:36:00.000597
1,519,403,760.000597
35,859
pythondev
help
thanks
2018-02-23T16:36:06.000148
Stefan
pythondev_help_Stefan_2018-02-23T16:36:06.000148
1,519,403,766.000148
35,860
pythondev
help
interesting split issue I need to split on ```"'"``` or ```' '``` but not both. Suggestions.
2018-02-23T16:38:07.000341
Daron
pythondev_help_Daron_2018-02-23T16:38:07.000341
1,519,403,887.000341
35,861
pythondev
help
on a single quote inside of doubles or just a single quote (for the first one)?
2018-02-23T16:38:56.000105
Garrett
pythondev_help_Garrett_2018-02-23T16:38:56.000105
1,519,403,936.000105
35,862
pythondev
help
Yes
2018-02-23T16:39:06.000134
Daron
pythondev_help_Daron_2018-02-23T16:39:06.000134
1,519,403,946.000134
35,863
pythondev
help
That doesn't answer my question :smile:
2018-02-23T16:39:43.000153
Garrett
pythondev_help_Garrett_2018-02-23T16:39:43.000153
1,519,403,983.000153
35,864
pythondev
help
either single quote or space
2018-02-23T16:39:58.000148
Daron
pythondev_help_Daron_2018-02-23T16:39:58.000148
1,519,403,998.000148
35,865
pythondev
help
`"""This message is 'weird'. It has lots of "'"s in it."""`
2018-02-23T16:40:49.000092
Garrett
pythondev_help_Garrett_2018-02-23T16:40:49.000092
1,519,404,049.000092
35,866
pythondev
help
use case ```cluster_name: Shared_Global_Replication_Cluster``` or ```cluster_name:'Shared_Global_Replication_Cluster'```
2018-02-23T16:40:52.000166
Daron
pythondev_help_Daron_2018-02-23T16:40:52.000166
1,519,404,052.000166
35,867
pythondev
help
Is it always going to follow a colon?
2018-02-23T16:41:07.000518
Garrett
pythondev_help_Garrett_2018-02-23T16:41:07.000518
1,519,404,067.000518
35,868
pythondev
help
ahh good point.
2018-02-23T16:41:17.000264
Daron
pythondev_help_Daron_2018-02-23T16:41:17.000264
1,519,404,077.000264
35,869
pythondev
help
LOL
2018-02-23T16:41:20.000369
Daron
pythondev_help_Daron_2018-02-23T16:41:20.000369
1,519,404,080.000369
35,870
pythondev
help
how about fixed sized :stuck_out_tongue_winking_eye:
2018-02-23T16:41:29.000284
Stefan
pythondev_help_Stefan_2018-02-23T16:41:29.000284
1,519,404,089.000284
35,871
pythondev
help
the simple things
2018-02-23T16:41:30.000015
Daron
pythondev_help_Daron_2018-02-23T16:41:30.000015
1,519,404,090.000015
35,872
pythondev
help
`cluster_name = "cluster_name:'Shared_Global_Replication_Cluster'"[15:-1]`
2018-02-23T16:42:16.000190
Stefan
pythondev_help_Stefan_2018-02-23T16:42:16.000190
1,519,404,136.00019
35,873
pythondev
help
(random number)
2018-02-23T16:42:19.000496
Stefan
pythondev_help_Stefan_2018-02-23T16:42:19.000496
1,519,404,139.000496
35,874
pythondev
help
size will vary. But it will always be cluster_name:
2018-02-23T16:42:57.000312
Daron
pythondev_help_Daron_2018-02-23T16:42:57.000312
1,519,404,177.000312
35,875
pythondev
help
so : works
2018-02-23T16:43:04.000062
Daron
pythondev_help_Daron_2018-02-23T16:43:04.000062
1,519,404,184.000062
35,876
pythondev
help
Thank you both
2018-02-23T16:44:03.000289
Daron
pythondev_help_Daron_2018-02-23T16:44:03.000289
1,519,404,243.000289
35,877
pythondev
help
a quick question people. I want to create a small logger / messenger type of module that I can include in my little python applications. and it will basically be a functionality of sending me logs / messages on slack or whatever. here’s an example. let’s say I have a little script running from cron job every Monday. T...
2018-02-23T19:31:59.000012
Suzette
pythondev_help_Suzette_2018-02-23T19:31:59.000012
1,519,414,319.000012
35,878
pythondev
help
<@Yukiko> There is so much wrong with your code, which tutorial you're using to learn python? * In print statements, you use formatting symbols (`%d`) but you never do an actual formatting (`print '%s' % somevar`) * The comment around `if im == a` makes this check invalid (`a` is a variable, maybe it should be a string...
2018-02-24T02:03:24.000033
Aleida
pythondev_help_Aleida_2018-02-24T02:03:24.000033
1,519,437,804.000033
35,879
pythondev
help
General comments: * don't paste code as image, paste as text instead (and use slack "New code or text snippet" feature) * when asking about errors you should paste tracebacks as well
2018-02-24T02:04:16.000033
Aleida
pythondev_help_Aleida_2018-02-24T02:04:16.000033
1,519,437,856.000033
35,880
pythondev
help
<@Aleida> i shall look into it and get back. thanks!
2018-02-24T02:30:12.000053
Yukiko
pythondev_help_Yukiko_2018-02-24T02:30:12.000053
1,519,439,412.000053
35,881
pythondev
help
I have a (sqlalchemy) model that includes `sources = Column(ARRAY(String))`
2018-02-24T06:25:01.000007
Stefan
pythondev_help_Stefan_2018-02-24T06:25:01.000007
1,519,453,501.000007
35,882
pythondev
help
can someone explain why a query like `User.sources.contains(["reddit"])` then complains with `operator does not exist: character varying[] @&gt; text[]`
2018-02-24T06:25:44.000003
Stefan
pythondev_help_Stefan_2018-02-24T06:25:44.000003
1,519,453,544.000003
35,883
pythondev
help
the full query: `session.query(User).filter(User.sources.contains(["reddit"])).all()`
2018-02-24T06:26:58.000026
Stefan
pythondev_help_Stefan_2018-02-24T06:26:58.000026
1,519,453,618.000026
35,884
pythondev
help
user.sources is an array ?
2018-02-24T06:37:35.000038
Micki
pythondev_help_Micki_2018-02-24T06:37:35.000038
1,519,454,255.000038
35,885
pythondev
help
yes
2018-02-24T06:41:50.000053
Stefan
pythondev_help_Stefan_2018-02-24T06:41:50.000053
1,519,454,510.000053
35,886
pythondev
help
`sources = Column(ARRAY(String))`
2018-02-24T06:41:57.000100
Stefan
pythondev_help_Stefan_2018-02-24T06:41:57.000100
1,519,454,517.0001
35,887
pythondev
help
I did now `sources = Column(ARRAY(String(250)))` but that doesn't help :confused:
2018-02-24T06:42:19.000057
Stefan
pythondev_help_Stefan_2018-02-24T06:42:19.000057
1,519,454,539.000057
35,888
pythondev
help
I'm not sure if you can test if an array is in an array
2018-02-24T06:42:44.000048
Micki
pythondev_help_Micki_2018-02-24T06:42:44.000048
1,519,454,564.000048
35,889
pythondev
help
can you try with `contains('reddit')`
2018-02-24T06:42:58.000030
Micki
pythondev_help_Micki_2018-02-24T06:42:58.000030
1,519,454,578.00003
35,890
pythondev
help
I tried without, but the examples with integer do use `[]`
2018-02-24T06:43:05.000009
Stefan
pythondev_help_Stefan_2018-02-24T06:43:05.000009
1,519,454,585.000009
35,891
pythondev
help
see: <https://stackoverflow.com/a/23545530/1575066>
2018-02-24T06:43:13.000029
Stefan
pythondev_help_Stefan_2018-02-24T06:43:13.000029
1,519,454,593.000029
35,892
pythondev
help
oh ok
2018-02-24T06:43:22.000089
Micki
pythondev_help_Micki_2018-02-24T06:43:22.000089
1,519,454,602.000089
35,893
pythondev
help
DataError: (psycopg2.DataError) malformed array literal: "reddit" LINE 3: WHERE "user".sources @&gt; 'reddit'
2018-02-24T06:43:31.000017
Stefan
pythondev_help_Stefan_2018-02-24T06:43:31.000017
1,519,454,611.000017
35,894
pythondev
help
it looks like it thinks that user.sources is not an array of text
2018-02-24T06:43:59.000065
Micki
pythondev_help_Micki_2018-02-24T06:43:59.000065
1,519,454,639.000065
35,895
pythondev
help
`varying[]`
2018-02-24T06:44:04.000040
Micki
pythondev_help_Micki_2018-02-24T06:44:04.000040
1,519,454,644.00004
35,896
pythondev
help
I did `select * from information_schema.columns where table_name = 'user';`
2018-02-24T06:44:21.000063
Stefan
pythondev_help_Stefan_2018-02-24T06:44:21.000063
1,519,454,661.000063
35,897
pythondev
help
you probably needs both to be `text[]`
2018-02-24T06:44:22.000074
Micki
pythondev_help_Micki_2018-02-24T06:44:22.000074
1,519,454,662.000074
35,898
pythondev
help
data_type is ARRAY, udt_name (whatever that is): _varchar
2018-02-24T06:44:52.000035
Stefan
pythondev_help_Stefan_2018-02-24T06:44:52.000035
1,519,454,692.000035
35,899
pythondev
help
for sources
2018-02-24T06:45:08.000011
Stefan
pythondev_help_Stefan_2018-02-24T06:45:08.000011
1,519,454,708.000011
35,900
pythondev
help
do you have a lot of users ? it's possible one is messed up somewhere. Can you limit the query to one ?
2018-02-24T06:45:14.000070
Micki
pythondev_help_Micki_2018-02-24T06:45:14.000070
1,519,454,714.00007
35,901
pythondev
help
I only made one
2018-02-24T06:45:23.000089
Stefan
pythondev_help_Stefan_2018-02-24T06:45:23.000089
1,519,454,723.000089
35,902
pythondev
help
with session_scope() as session: session.add(User(sources=["reddit"]))
2018-02-24T06:45:29.000020
Stefan
pythondev_help_Stefan_2018-02-24T06:45:29.000020
1,519,454,729.00002
35,903
pythondev
help
its a docker so i can recreate
2018-02-24T06:46:02.000080
Stefan
pythondev_help_Stefan_2018-02-24T06:46:02.000080
1,519,454,762.00008
35,904
pythondev
help
maybe i need to instantiate one user like ["reddit", "twitter"]
2018-02-24T06:46:12.000029
Stefan
pythondev_help_Stefan_2018-02-24T06:46:12.000029
1,519,454,772.000029
35,905
pythondev
help
well idk. I have never done a lot of sqlalchemy
2018-02-24T06:46:35.000087
Micki
pythondev_help_Micki_2018-02-24T06:46:35.000087
1,519,454,795.000087
35,906
pythondev
help
me neither... its weird, but i agree it looks like a text/varchar issue
2018-02-24T06:46:56.000048
Stefan
pythondev_help_Stefan_2018-02-24T06:46:56.000048
1,519,454,816.000048
35,907
pythondev
help
yeah the postgres error is pretty clear
2018-02-24T06:47:12.000073
Micki
pythondev_help_Micki_2018-02-24T06:47:12.000073
1,519,454,832.000073
35,908
pythondev
help
in the model can you set it to text ?
2018-02-24T06:47:46.000024
Micki
pythondev_help_Micki_2018-02-24T06:47:46.000024
1,519,454,866.000024
35,909
pythondev
help
I think String means text
2018-02-24T06:48:03.000114
Stefan
pythondev_help_Stefan_2018-02-24T06:48:03.000114
1,519,454,883.000114
35,910
pythondev
help
sqlalchemy terminology
2018-02-24T06:48:12.000074
Stefan
pythondev_help_Stefan_2018-02-24T06:48:12.000074
1,519,454,892.000074
35,911
pythondev
help
that means text in postgres
2018-02-24T06:48:17.000053
Stefan
pythondev_help_Stefan_2018-02-24T06:48:17.000053
1,519,454,897.000053
35,912
pythondev
help
maybe idk
2018-02-24T06:48:28.000006
Micki
pythondev_help_Micki_2018-02-24T06:48:28.000006
1,519,454,908.000006
35,913
pythondev
help
the "array in array" thing about this also smells to me
2018-02-24T06:48:44.000016
Stefan
pythondev_help_Stefan_2018-02-24T06:48:44.000016
1,519,454,924.000016
35,914
pythondev
help
i should test this with ints
2018-02-24T06:48:48.000002
Stefan
pythondev_help_Stefan_2018-02-24T06:48:48.000002
1,519,454,928.000002
35,915
pythondev
help
it works with integer fyi
2018-02-24T06:49:44.000076
Stefan
pythondev_help_Stefan_2018-02-24T06:49:44.000076
1,519,454,984.000076
35,916
pythondev
help
well probably the model text array then :confused:
2018-02-24T06:50:58.000057
Micki
pythondev_help_Micki_2018-02-24T06:50:58.000057
1,519,455,058.000057
35,917
pythondev
help
can you share the model ?
2018-02-24T06:51:07.000048
Micki
pythondev_help_Micki_2018-02-24T06:51:07.000048
1,519,455,067.000048
35,918
pythondev
help
it's like a dialect thing then
2018-02-24T06:51:35.000007
Stefan
pythondev_help_Stefan_2018-02-24T06:51:35.000007
1,519,455,095.000007
35,919
pythondev
help
using TEXT from this one, it worked: `from sqlalchemy.dialects.postgresql import TEXT`
2018-02-24T06:51:53.000006
Stefan
pythondev_help_Stefan_2018-02-24T06:51:53.000006
1,519,455,113.000006
35,920
pythondev
help
you were right : )
2018-02-24T06:52:17.000046
Stefan
pythondev_help_Stefan_2018-02-24T06:52:17.000046
1,519,455,137.000046
35,921
pythondev
help
:thumbsup:
2018-02-24T06:53:22.000053
Micki
pythondev_help_Micki_2018-02-24T06:53:22.000053
1,519,455,202.000053
35,922
pythondev
help
I have the following folder structure ``` init.py core \ - __init__.py - hello.py - world.py ``` within that `hello.py`, I’m referencing one of the functions from `world.py` ``` from world import some_function ``` and my `init.py` is calling one of the functions in `hello.py`. now when I run `python core/he...
2018-02-24T08:01:17.000050
Suzette
pythondev_help_Suzette_2018-02-24T08:01:17.000050
1,519,459,277.00005
35,923