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
how did you get pymssql to format like that?
2017-09-08T00:23:39.000032
Virgen
pythondev_help_Virgen_2017-09-08T00:23:39.000032
1,504,830,219.000032
92,703
pythondev
help
I don't think either is better, I just wanted to find a doc
2017-09-08T00:32:01.000007
Beula
pythondev_help_Beula_2017-09-08T00:32:01.000007
1,504,830,721.000007
92,704
pythondev
help
<@Beula> which do you use? And, out of curiosity, what db do you use? I'm pretty new to this, so I would rather spend my time learning on what most people use. I mean, if everyone uses pymssql, I don't want to waste my time with pyodbc.
2017-09-08T00:48:13.000215
Virgen
pythondev_help_Virgen_2017-09-08T00:48:13.000215
1,504,831,693.000215
92,705
pythondev
help
I use postgres and psycopg2 usually
2017-09-08T00:48:58.000010
Beula
pythondev_help_Beula_2017-09-08T00:48:58.000010
1,504,831,738.00001
92,706
pythondev
help
<@Virgen> <https://stackoverflow.com/a/9739020>
2017-09-08T00:50:47.000201
Collette
pythondev_help_Collette_2017-09-08T00:50:47.000201
1,504,831,847.000201
92,707
pythondev
help
Why postgres over sql? Feel free to say Google it...
2017-09-08T00:51:32.000091
Virgen
pythondev_help_Virgen_2017-09-08T00:51:32.000091
1,504,831,892.000091
92,708
pythondev
help
Postgres is open source, fast, modern, free, easy to run anywhere
2017-09-08T00:53:00.000152
Beula
pythondev_help_Beula_2017-09-08T00:53:00.000152
1,504,831,980.000152
92,709
pythondev
help
Thx! Ill check it out. Well, I'm off for tonight. Thx for the info, Ill read more into it tomorrow.
2017-09-08T00:56:03.000127
Virgen
pythondev_help_Virgen_2017-09-08T00:56:03.000127
1,504,832,163.000127
92,710
pythondev
help
Have a great rest of your day!
2017-09-08T00:56:19.000132
Virgen
pythondev_help_Virgen_2017-09-08T00:56:19.000132
1,504,832,179.000132
92,711
pythondev
help
you too!
2017-09-08T00:57:16.000191
Beula
pythondev_help_Beula_2017-09-08T00:57:16.000191
1,504,832,236.000191
92,712
pythondev
help
Hi, I'm struggling with some Flask migration issues. I restructured my app and SQLAlchemy is no longer picking up my models. :disappointed: Would anyone be able to help me debug this?
2017-09-08T01:16:07.000037
Leena
pythondev_help_Leena_2017-09-08T01:16:07.000037
1,504,833,367.000037
92,713
pythondev
help
<@Leena>, post your question and sample code in <#C0LN2AD7T|flask>
2017-09-08T01:17:00.000128
Winnifred
pythondev_help_Winnifred_2017-09-08T01:17:00.000128
1,504,833,420.000128
92,714
pythondev
help
Ah okay thanks!
2017-09-08T01:17:10.000076
Leena
pythondev_help_Leena_2017-09-08T01:17:10.000076
1,504,833,430.000076
92,715
pythondev
help
Hey guys
2017-09-08T06:27:37.000358
Rosalind
pythondev_help_Rosalind_2017-09-08T06:27:37.000358
1,504,852,057.000358
92,716
pythondev
help
I am kinda struggling to understand this &gt;&gt; [Word for Word in WORD_TOKENS if not Word in STOP_WORDS]
2017-09-08T06:27:50.000129
Rosalind
pythondev_help_Rosalind_2017-09-08T06:27:50.000129
1,504,852,070.000129
92,717
pythondev
help
I do not understand how this for loop works no matter how hard I try to understand
2017-09-08T06:28:18.000051
Rosalind
pythondev_help_Rosalind_2017-09-08T06:28:18.000051
1,504,852,098.000051
92,718
pythondev
help
In layman term, what is the best explaination for this kinda for statement
2017-09-08T06:28:59.000140
Rosalind
pythondev_help_Rosalind_2017-09-08T06:28:59.000140
1,504,852,139.00014
92,719
pythondev
help
<@Rosalind> did you try to open it up to a 'normal' for loop?
2017-09-08T06:29:25.000127
Sean
pythondev_help_Sean_2017-09-08T06:29:25.000127
1,504,852,165.000127
92,720
pythondev
help
``` for word in WORD_TOKENS: if Word not in STOP_WORDS: yield Word ``` Hope this helps
2017-09-08T06:30:17.000026
Sean
pythondev_help_Sean_2017-09-08T06:30:17.000026
1,504,852,217.000026
92,721
pythondev
help
Is it the same thing??
2017-09-08T06:30:29.000130
Rosalind
pythondev_help_Rosalind_2017-09-08T06:30:29.000130
1,504,852,229.00013
92,722
pythondev
help
yes
2017-09-08T06:30:38.000069
Sean
pythondev_help_Sean_2017-09-08T06:30:38.000069
1,504,852,238.000069
92,723
pythondev
help
but you can use the one liner to create an array variable, ex: ` NON_STOP_WORDS = [Word for Word in WORD_TOKENS if not Word in STOP_WORDS] `
2017-09-08T06:31:09.000072
Sean
pythondev_help_Sean_2017-09-08T06:31:09.000072
1,504,852,269.000072
92,724
pythondev
help
How do you actually break it down?
2017-09-08T06:31:20.000186
Rosalind
pythondev_help_Rosalind_2017-09-08T06:31:20.000186
1,504,852,280.000186
92,725
pythondev
help
It's more like a yield than a return
2017-09-08T06:31:24.000262
Fabiola
pythondev_help_Fabiola_2017-09-08T06:31:24.000262
1,504,852,284.000262
92,726
pythondev
help
but otherwise spot on
2017-09-08T06:31:32.000118
Fabiola
pythondev_help_Fabiola_2017-09-08T06:31:32.000118
1,504,852,292.000118
92,727
pythondev
help
<@Fabiola> thanks
2017-09-08T06:31:39.000237
Sean
pythondev_help_Sean_2017-09-08T06:31:39.000237
1,504,852,299.000237
92,728
pythondev
help
<@Rosalind> you divide it in 3 parts: the _yielding_ part is the first `Word` , then you have the _loop_ `for Word in WORD_TOKENS` and lastly, you have the _condition_ `if not Word in STOP_WORDS`
2017-09-08T06:32:59.000095
Sean
pythondev_help_Sean_2017-09-08T06:32:59.000095
1,504,852,379.000095
92,729
pythondev
help
Because sometimes, there are cases like (word in word_token if not in word_token etc etc
2017-09-08T06:33:17.000076
Rosalind
pythondev_help_Rosalind_2017-09-08T06:33:17.000076
1,504,852,397.000076
92,730
pythondev
help
Ohhh!
2017-09-08T06:33:27.000099
Rosalind
pythondev_help_Rosalind_2017-09-08T06:33:27.000099
1,504,852,407.000099
92,731
pythondev
help
Word (Yield) for Word (for loop condition)
2017-09-08T06:33:49.000370
Rosalind
pythondev_help_Rosalind_2017-09-08T06:33:49.000370
1,504,852,429.00037
92,732
pythondev
help
True??
2017-09-08T06:33:54.000005
Rosalind
pythondev_help_Rosalind_2017-09-08T06:33:54.000005
1,504,852,434.000005
92,733
pythondev
help
`(yield) (for loop) (condition: if True then yield)` does that make sense?
2017-09-08T06:34:32.000085
Fabiola
pythondev_help_Fabiola_2017-09-08T06:34:32.000085
1,504,852,472.000085
92,734
pythondev
help
Oh man, this is so helpful ,thank you so much sensai!
2017-09-08T06:34:56.000001
Rosalind
pythondev_help_Rosalind_2017-09-08T06:34:56.000001
1,504,852,496.000001
92,735
pythondev
help
The regular case is `[x for for x in thing]`. Adding the conditional allows you to drop elements if you don't want them.
2017-09-08T06:36:07.000213
Fabiola
pythondev_help_Fabiola_2017-09-08T06:36:07.000213
1,504,852,567.000213
92,736
pythondev
help
I see, i see
2017-09-08T06:36:25.000019
Rosalind
pythondev_help_Rosalind_2017-09-08T06:36:25.000019
1,504,852,585.000019
92,737
pythondev
help
yes, more often (I) use it without the condition
2017-09-08T06:36:46.000294
Sean
pythondev_help_Sean_2017-09-08T06:36:46.000294
1,504,852,606.000294
92,738
pythondev
help
can someone help me? Sublime Text builds without output
2017-09-08T08:48:25.000419
Hannah
pythondev_help_Hannah_2017-09-08T08:48:25.000419
1,504,860,505.000419
92,739
pythondev
help
I'm currently poking around with opencv, to be more spesific lane detection. My question is why when i run my code on my stationary windows pc, it works fine but when i run it on my macbook pro 2016 it looking very bad, almost like it doesnt work like it should or something. ``` import numpy as np from PIL import ImageGrab import cv2 import time def process_img(image): original_image = image # convert to gray processed_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) # edge detection processed_img = cv2.Canny(processed_img, threshold1 = 200, threshold2=300) return processed_img def main(): last_time = time.time() while True: screen = np.array(ImageGrab.grab(bbox=(0,40,800,640))) #print('Frame took {} seconds'.format(time.time()-last_time)) last_time = time.time() new_screen = process_img(screen) cv2.imshow('window', new_screen) #cv2.imshow('window',cv2.cvtColor(screen, cv2.COLOR_BGR2RGB)) if cv2.waitKey(25) &amp; 0xFF == ord('q'): cv2.destroyAllWindows() break main() ```
2017-09-08T08:59:55.000366
Shirl
pythondev_help_Shirl_2017-09-08T08:59:55.000366
1,504,861,195.000366
92,740
pythondev
help
<@Hannah> you'll need to provide a bit more information for someone to help you
2017-09-08T09:00:56.000298
Ciera
pythondev_help_Ciera_2017-09-08T09:00:56.000298
1,504,861,256.000298
92,741
pythondev
help
<@Shirl> please use the `+` on the left of the input box for snippet formatting :slightly_smiling_face:
2017-09-08T09:01:31.000315
Ciera
pythondev_help_Ciera_2017-09-08T09:01:31.000315
1,504,861,291.000315
92,742
pythondev
help
and <@Shirl>, what’s the difference between windows output and mac?
2017-09-08T09:02:01.000022
Meg
pythondev_help_Meg_2017-09-08T09:02:01.000022
1,504,861,321.000022
92,743
pythondev
help
`just looks different or something` isn’t too detailed
2017-09-08T09:02:14.000175
Meg
pythondev_help_Meg_2017-09-08T09:02:14.000175
1,504,861,334.000175
92,744
pythondev
help
sry lads trying to wrap this into code but slack aint working with me today :stuck_out_tongue:
2017-09-08T09:02:44.000554
Shirl
pythondev_help_Shirl_2017-09-08T09:02:44.000554
1,504,861,364.000554
92,745
pythondev
help
no on mac it doesnt really work
2017-09-08T09:02:55.000363
Shirl
pythondev_help_Shirl_2017-09-08T09:02:55.000363
1,504,861,375.000363
92,746
pythondev
help
Ok, the while loop got print func that tests how good it performs, on mac it prints once and then nothing, the opencv "window" is very laggy
2017-09-08T09:04:43.000081
Shirl
pythondev_help_Shirl_2017-09-08T09:04:43.000081
1,504,861,483.000081
92,747
pythondev
help
you need to use backticks, you are currently using quotes :wink:
2017-09-08T09:05:13.000105
Vada
pythondev_help_Vada_2017-09-08T09:05:13.000105
1,504,861,513.000105
92,748
pythondev
help
Here is the source btw : <https://pythonprogramming.net/open-cv-basics-python-plays-gta-v/?completed=/game-frames-open-cv-python-plays-gta-v/>
2017-09-08T09:05:58.000246
Shirl
pythondev_help_Shirl_2017-09-08T09:05:58.000246
1,504,861,558.000246
92,749
pythondev
help
you didn’t have any problems installing opencv on mac?
2017-09-08T09:07:07.000518
Meg
pythondev_help_Meg_2017-09-08T09:07:07.000518
1,504,861,627.000518
92,750
pythondev
help
lol thanks :slightly_smiling_face:
2017-09-08T09:07:52.000023
Shirl
pythondev_help_Shirl_2017-09-08T09:07:52.000023
1,504,861,672.000023
92,751
pythondev
help
nope i installed it using conda
2017-09-08T09:08:26.000019
Shirl
pythondev_help_Shirl_2017-09-08T09:08:26.000019
1,504,861,706.000019
92,752
pythondev
help
smart
2017-09-08T09:09:07.000144
Meg
pythondev_help_Meg_2017-09-08T09:09:07.000144
1,504,861,747.000144
92,753
pythondev
help
ok, without any error output, not much we can do here
2017-09-08T09:09:21.000115
Meg
pythondev_help_Meg_2017-09-08T09:09:21.000115
1,504,861,761.000115
92,754
pythondev
help
do `cvtColor` and `Canny` raise any exceptions that you can catch?
2017-09-08T09:09:59.000511
Meg
pythondev_help_Meg_2017-09-08T09:09:59.000511
1,504,861,799.000511
92,755
pythondev
help
Looking for help resolving 502 error hosting flask app on VPS. App works fine locally. Followed instructions: <https://www.digitalocean.com/community/questions/flask-nginx-uwsgi-ubuntu-tutorial> . 502 on going to the domain and logs don't seem to say anything :neutral_face:
2017-09-08T10:13:36.000712
Sean
pythondev_help_Sean_2017-09-08T10:13:36.000712
1,504,865,616.000712
92,756
pythondev
help
so if you ssh to the server, can you see that your python application is listening?
2017-09-08T10:28:41.000336
Junita
pythondev_help_Junita_2017-09-08T10:28:41.000336
1,504,866,521.000336
92,757
pythondev
help
it's running as a service somewhere
2017-09-08T10:28:57.000267
Sean
pythondev_help_Sean_2017-09-08T10:28:57.000267
1,504,866,537.000267
92,758
pythondev
help
i'm not that experienced with uwsgi/nginx
2017-09-08T10:29:05.000215
Sean
pythondev_help_Sean_2017-09-08T10:29:05.000215
1,504,866,545.000215
92,759
pythondev
help
or for example as they say in the guide, trying to go to port 5000, is it up?
2017-09-08T10:29:07.000233
Junita
pythondev_help_Junita_2017-09-08T10:29:07.000233
1,504,866,547.000233
92,760
pythondev
help
`lsof -i :&lt;port&gt;` if you are looking for a port
2017-09-08T10:29:14.000211
Beula
pythondev_help_Beula_2017-09-08T10:29:14.000211
1,504,866,554.000211
92,761
pythondev
help
Or just `curl localhost:5000` to make sure your app is listening
2017-09-08T10:29:52.000274
Beula
pythondev_help_Beula_2017-09-08T10:29:52.000274
1,504,866,592.000274
92,762
pythondev
help
5k doesn't work
2017-09-08T10:29:52.000631
Sean
pythondev_help_Sean_2017-09-08T10:29:52.000631
1,504,866,592.000631
92,763
pythondev
help
i think the app crash(es)
2017-09-08T10:30:07.000020
Sean
pythondev_help_Sean_2017-09-08T10:30:07.000020
1,504,866,607.00002
92,764
pythondev
help
is it logging anything?
2017-09-08T10:30:16.000368
Junita
pythondev_help_Junita_2017-09-08T10:30:16.000368
1,504,866,616.000368
92,765
pythondev
help
What if you try to run the commands manually, acting like the `.service` file?
2017-09-08T10:30:36.000377
Beula
pythondev_help_Beula_2017-09-08T10:30:36.000377
1,504,866,636.000377
92,766
pythondev
help
it sits waiting for confiuration
2017-09-08T10:32:27.000383
Sean
pythondev_help_Sean_2017-09-08T10:32:27.000383
1,504,866,747.000383
92,767
pythondev
help
`[uWSGI] getting INI configuration from foobar.ini`
2017-09-08T10:32:43.000327
Sean
pythondev_help_Sean_2017-09-08T10:32:43.000327
1,504,866,763.000327
92,768
pythondev
help
So you are saying that your application itself is running, and it is `uWSGI` that isn't? If you aren't sure, start at the application, then step to uwsgi
2017-09-08T10:33:22.000655
Beula
pythondev_help_Beula_2017-09-08T10:33:22.000655
1,504,866,802.000655
92,769
pythondev
help
how can i verify if it's running? curling just gives connection refused
2017-09-08T10:34:06.000385
Sean
pythondev_help_Sean_2017-09-08T10:34:06.000385
1,504,866,846.000385
92,770
pythondev
help
i don't know how uwsgi/nginx run the application
2017-09-08T10:34:14.000520
Sean
pythondev_help_Sean_2017-09-08T10:34:14.000520
1,504,866,854.00052
92,771
pythondev
help
You need to find the port your app should be listening on and try to reach it, are you sure you are trying the right port?
2017-09-08T10:35:41.000237
Beula
pythondev_help_Beula_2017-09-08T10:35:41.000237
1,504,866,941.000237
92,772
pythondev
help
they talk about sockets instead of ports, does this matter?
2017-09-08T10:36:35.000156
Sean
pythondev_help_Sean_2017-09-08T10:36:35.000156
1,504,866,995.000156
92,773
pythondev
help
Or specific to the guide you are following - did you get the “Hello There” (or whatever your app’s equivalent is before the section “Create the WSGI Entry Point”
2017-09-08T10:36:46.000393
Junita
pythondev_help_Junita_2017-09-08T10:36:46.000393
1,504,867,006.000393
92,774
pythondev
help
yeah
2017-09-08T10:41:55.000665
Sean
pythondev_help_Sean_2017-09-08T10:41:55.000665
1,504,867,315.000665
92,775
pythondev
help
sorry for late response, had to ddouble check that
2017-09-08T10:42:03.000563
Sean
pythondev_help_Sean_2017-09-08T10:42:03.000563
1,504,867,323.000563
92,776
pythondev
help
so you can reach it on the port directly, outside of uwsgi then?
2017-09-08T10:44:07.000530
Junita
pythondev_help_Junita_2017-09-08T10:44:07.000530
1,504,867,447.00053
92,777
pythondev
help
yeah, both of the 'tests' work
2017-09-08T10:44:30.000380
Sean
pythondev_help_Sean_2017-09-08T10:44:30.000380
1,504,867,470.00038
92,778
pythondev
help
`uwsgi --socket....` and `python foo.py`
2017-09-08T10:44:42.000356
Sean
pythondev_help_Sean_2017-09-08T10:44:42.000356
1,504,867,482.000356
92,779
pythondev
help
afterwards `curl localhost:5000`
2017-09-08T10:44:48.000774
Sean
pythondev_help_Sean_2017-09-08T10:44:48.000774
1,504,867,488.000774
92,780
pythondev
help
what’s in your ini file?
2017-09-08T10:45:32.000391
Junita
pythondev_help_Junita_2017-09-08T10:45:32.000391
1,504,867,532.000391
92,781
pythondev
help
same as in the link
2017-09-08T10:46:43.000018
Sean
pythondev_help_Sean_2017-09-08T10:46:43.000018
1,504,867,603.000018
92,782
pythondev
help
and the wsgi.py is in the same folder?
2017-09-08T10:48:15.000130
Junita
pythondev_help_Junita_2017-09-08T10:48:15.000130
1,504,867,695.00013
92,783
pythondev
help
yes
2017-09-08T10:48:27.000018
Sean
pythondev_help_Sean_2017-09-08T10:48:27.000018
1,504,867,707.000018
92,784
pythondev
help
are the paths in the .service file all correct?
2017-09-08T10:49:21.000353
Junita
pythondev_help_Junita_2017-09-08T10:49:21.000353
1,504,867,761.000353
92,785
pythondev
help
i actually had earlier an typo there which i fixed, don't know if this matters though
2017-09-08T10:50:21.000237
Sean
pythondev_help_Sean_2017-09-08T10:50:21.000237
1,504,867,821.000237
92,786
pythondev
help
double checking now
2017-09-08T10:50:29.000264
Sean
pythondev_help_Sean_2017-09-08T10:50:29.000264
1,504,867,829.000264
92,787
pythondev
help
yup, all correct
2017-09-08T10:52:28.000015
Sean
pythondev_help_Sean_2017-09-08T10:52:28.000015
1,504,867,948.000015
92,788
pythondev
help
and when running `sudo systemctl start myproject` you see no errors?
2017-09-08T10:54:16.000275
Junita
pythondev_help_Junita_2017-09-08T10:54:16.000275
1,504,868,056.000275
92,789
pythondev
help
jup
2017-09-08T10:54:49.000281
Sean
pythondev_help_Sean_2017-09-08T10:54:49.000281
1,504,868,089.000281
92,790
pythondev
help
Any errors printed in the syslog (`journalctl`)?
2017-09-08T10:55:35.000577
Beula
pythondev_help_Beula_2017-09-08T10:55:35.000577
1,504,868,135.000577
92,791
pythondev
help
`$ journalctl No journal files were found. -- No entries --`
2017-09-08T10:55:55.000011
Sean
pythondev_help_Sean_2017-09-08T10:55:55.000011
1,504,868,155.000011
92,792
pythondev
help
how does your `/etc/nginx/sites-available/myproject` look - is the socket file correct? if you copy the path, can you see it?
2017-09-08T10:56:01.000181
Junita
pythondev_help_Junita_2017-09-08T10:56:01.000181
1,504,868,161.000181
92,793
pythondev
help
yup
2017-09-08T10:57:18.000822
Sean
pythondev_help_Sean_2017-09-08T10:57:18.000822
1,504,868,238.000822
92,794
pythondev
help
and when doing `grep server_name /etc/nginx/sites-enabled/* -RiI` you see your server listed?
2017-09-08T10:57:56.000654
Junita
pythondev_help_Junita_2017-09-08T10:57:56.000654
1,504,868,276.000654
92,795
pythondev
help
yup
2017-09-08T11:01:21.000456
Sean
pythondev_help_Sean_2017-09-08T11:01:21.000456
1,504,868,481.000456
92,796
pythondev
help
and I’m guessing running the syntax error test returns no errors?
2017-09-08T11:02:10.000203
Junita
pythondev_help_Junita_2017-09-08T11:02:10.000203
1,504,868,530.000203
92,797
pythondev
help
and running `sudo systemctl restart nginx` returns no errors?
2017-09-08T11:02:18.000690
Junita
pythondev_help_Junita_2017-09-08T11:02:18.000690
1,504,868,538.00069
92,798
pythondev
help
both no errors
2017-09-08T11:03:08.000594
Sean
pythondev_help_Sean_2017-09-08T11:03:08.000594
1,504,868,588.000594
92,799
pythondev
help
umm now it's saying it's running
2017-09-08T11:04:02.000239
Sean
pythondev_help_Sean_2017-09-08T11:04:02.000239
1,504,868,642.000239
92,800
pythondev
help
it should be properly setup then.
2017-09-08T11:04:11.000364
Junita
pythondev_help_Junita_2017-09-08T11:04:11.000364
1,504,868,651.000364
92,801
pythondev
help
` Active: active (running) since Fri 2017-09-08 17:47:49 EEST; 15min ago`
2017-09-08T11:04:25.000621
Sean
pythondev_help_Sean_2017-09-08T11:04:25.000621
1,504,868,665.000621
92,802