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
what are the shebang line ?
2018-01-09T08:08:10.000220
Micki
pythondev_help_Micki_2018-01-09T08:08:10.000220
1,515,485,290.00022
28,324
pythondev
help
`#!/bin/bash` same on both if thats what you mean
2018-01-09T08:08:35.000374
Tanesha
pythondev_help_Tanesha_2018-01-09T08:08:35.000374
1,515,485,315.000374
28,325
pythondev
help
I ran `chmod +x get_prod_staging` to give me permissions to run it
2018-01-09T08:10:14.000055
Tanesha
pythondev_help_Tanesha_2018-01-09T08:10:14.000055
1,515,485,414.000055
28,326
pythondev
help
idk :confused:
2018-01-09T08:10:42.000036
Micki
pythondev_help_Micki_2018-01-09T08:10:42.000036
1,515,485,442.000036
28,327
pythondev
help
how about if you change the shebang to `$!/bin/sh`?
2018-01-09T08:12:39.000260
Floy
pythondev_help_Floy_2018-01-09T08:12:39.000260
1,515,485,559.00026
28,328
pythondev
help
since that’ll execute the file in bash, or a compatibile shell
2018-01-09T08:12:51.000059
Floy
pythondev_help_Floy_2018-01-09T08:12:51.000059
1,515,485,571.000059
28,329
pythondev
help
Someone has just said that the file might have windows_style line endings
2018-01-09T08:15:48.000112
Tanesha
pythondev_help_Tanesha_2018-01-09T08:15:48.000112
1,515,485,748.000112
28,330
pythondev
help
"windows uses \r\n as a line ending which is a carriage return character and a newline character unix just uses \n"
2018-01-09T08:16:07.000081
Tanesha
pythondev_help_Tanesha_2018-01-09T08:16:07.000081
1,515,485,767.000081
28,331
pythondev
help
Is this right?
2018-01-09T08:16:11.000411
Tanesha
pythondev_help_Tanesha_2018-01-09T08:16:11.000411
1,515,485,771.000411
28,332
pythondev
help
It can happen
2018-01-09T08:16:30.000290
Cecila
pythondev_help_Cecila_2018-01-09T08:16:30.000290
1,515,485,790.00029
28,333
pythondev
help
: /bin/bash^M: bad interpreter:
2018-01-09T08:16:45.000165
Tanesha
pythondev_help_Tanesha_2018-01-09T08:16:45.000165
1,515,485,805.000165
28,334
pythondev
help
I think thats what ^M is showing me
2018-01-09T08:16:56.000314
Tanesha
pythondev_help_Tanesha_2018-01-09T08:16:56.000314
1,515,485,816.000314
28,335
pythondev
help
If you run `file` on your script file it might let you know
2018-01-09T08:17:07.000100
Cecila
pythondev_help_Cecila_2018-01-09T08:17:07.000100
1,515,485,827.0001
28,336
pythondev
help
what so like `file get_prod_staging`
2018-01-09T08:17:28.000292
Tanesha
pythondev_help_Tanesha_2018-01-09T08:17:28.000292
1,515,485,848.000292
28,337
pythondev
help
yeah
2018-01-09T08:18:57.000139
Cecila
pythondev_help_Cecila_2018-01-09T08:18:57.000139
1,515,485,937.000139
28,338
pythondev
help
Linux CR example output: ```→ file test.sh test.sh: Bourne-Again shell script text executable, ASCII text``` Windows CR example output: ```→ file testwin.sh testwin.sh: Bourne-Again shell script text executable, ASCII text, with CRLF line terminators```
2018-01-09T08:19:49.000093
Cecila
pythondev_help_Cecila_2018-01-09T08:19:49.000093
1,515,485,989.000093
28,339
pythondev
help
``` (env) root@ubuntu:/data/sites/tsl.quiet.sh/0.5/bin# file get_prod_staging get_prod_staging: Bourne-Again shell script, ASCII text executable, with CRLF li ne te...
2018-01-09T08:20:16.000543
Tanesha
pythondev_help_Tanesha_2018-01-09T08:20:16.000543
1,515,486,016.000543
28,340
pythondev
help
Yep, looks like it
2018-01-09T08:20:25.000291
Cecila
pythondev_help_Cecila_2018-01-09T08:20:25.000291
1,515,486,025.000291
28,341
pythondev
help
well damn,
2018-01-09T08:20:31.000276
Tanesha
pythondev_help_Tanesha_2018-01-09T08:20:31.000276
1,515,486,031.000276
28,342
pythondev
help
So i need to create the script on a Linuz machine?
2018-01-09T08:20:46.000379
Tanesha
pythondev_help_Tanesha_2018-01-09T08:20:46.000379
1,515,486,046.000379
28,343
pythondev
help
You should be able to convert them on the server
2018-01-09T08:21:10.000252
Cecila
pythondev_help_Cecila_2018-01-09T08:21:10.000252
1,515,486,070.000252
28,344
pythondev
help
ah nice, ill have a look into it see what i can find out. Thanks for the advice
2018-01-09T08:21:32.000165
Tanesha
pythondev_help_Tanesha_2018-01-09T08:21:32.000165
1,515,486,092.000165
28,345
pythondev
help
`tr -d '\015' <DOS-file >UNIX-file` might work
2018-01-09T08:21:40.000483
Cecila
pythondev_help_Cecila_2018-01-09T08:21:40.000483
1,515,486,100.000483
28,346
pythondev
help
source: <https://stackoverflow.com/questions/2613800/how-to-convert-dos-windows-newline-crlf-to-unix-newline-n-in-a-bash-script>
2018-01-09T08:21:54.000222
Cecila
pythondev_help_Cecila_2018-01-09T08:21:54.000222
1,515,486,114.000222
28,347
pythondev
help
think I located the issue, I was using `str(x)` instead of `x.strftime(%Y-%m-%d %H:%M:%S)` when inserting to the db. Thanks for mentioning to trace back through :grinning:
2018-01-09T08:55:29.000262
Milo
pythondev_help_Milo_2018-01-09T08:55:29.000262
1,515,488,129.000262
28,348
pythondev
help
awesome, glad to hear you got it sorted!
2018-01-09T09:01:05.000127
Zack
pythondev_help_Zack_2018-01-09T09:01:05.000127
1,515,488,465.000127
28,349
pythondev
help
guys, I’d like to get your opinion on a style question. I usually deal with statements like ```operation = self.querybyiref(data) if operation == -1: abort(401) if operation == 0: abort(404) else: return jsonify(operation), 200 ``` but...
2018-01-09T09:03:38.000178
Maya
pythondev_help_Maya_2018-01-09T09:03:38.000178
1,515,488,618.000178
28,350
pythondev
help
elif? lol
2018-01-09T09:04:38.000103
Porsha
pythondev_help_Porsha_2018-01-09T09:04:38.000103
1,515,488,678.000103
28,351
pythondev
help
:slightly_smiling_face:
2018-01-09T09:04:49.000132
Maya
pythondev_help_Maya_2018-01-09T09:04:49.000132
1,515,488,689.000132
28,352
pythondev
help
please use formatting with ` or ``` :slightly_smiling_face:
2018-01-09T09:05:15.000048
Micki
pythondev_help_Micki_2018-01-09T09:05:15.000048
1,515,488,715.000048
28,353
pythondev
help
`lol`
2018-01-09T09:05:22.000013
Porsha
pythondev_help_Porsha_2018-01-09T09:05:22.000013
1,515,488,722.000013
28,354
pythondev
help
<@Micki> sorry, my bad.
2018-01-09T09:05:49.000726
Maya
pythondev_help_Maya_2018-01-09T09:05:49.000726
1,515,488,749.000726
28,355
pythondev
help
one of the things I really wish Python had is `switch`
2018-01-09T09:06:53.000491
Dominica
pythondev_help_Dominica_2018-01-09T09:06:53.000491
1,515,488,813.000491
28,356
pythondev
help
spoke to soon! Still getting the error. Very weird. When inserting to a db, should I leave it as a datetime object?
2018-01-09T09:07:09.000371
Milo
pythondev_help_Milo_2018-01-09T09:07:09.000371
1,515,488,829.000371
28,357
pythondev
help
you should use `elif` :slightly_smiling_face:
2018-01-09T09:07:47.000264
Micki
pythondev_help_Micki_2018-01-09T09:07:47.000264
1,515,488,867.000264
28,358
pythondev
help
and you could do something like `status = operation_to_status.get(operation)`
2018-01-09T09:08:22.000401
Micki
pythondev_help_Micki_2018-01-09T09:08:22.000401
1,515,488,902.000401
28,359
pythondev
help
yeah - I just learned yesterday thanks to <@Rafael> that the database driver should convert it for you, I believe.
2018-01-09T09:08:30.000209
Zack
pythondev_help_Zack_2018-01-09T09:08:30.000209
1,515,488,910.000209
28,360
pythondev
help
with `operation_to_status` being a dict
2018-01-09T09:08:34.000305
Micki
pythondev_help_Micki_2018-01-09T09:08:34.000305
1,515,488,914.000305
28,361
pythondev
help
but that's more usefull if you have a really long list of `if`
2018-01-09T09:09:25.000270
Micki
pythondev_help_Micki_2018-01-09T09:09:25.000270
1,515,488,965.00027
28,362
pythondev
help
yes but if the operation is not -1 or 0 I have to return it as payload
2018-01-09T09:09:53.000447
Maya
pythondev_help_Maya_2018-01-09T09:09:53.000447
1,515,488,993.000447
28,363
pythondev
help
if &gt; elif &gt; else should work just fine in that scenario
2018-01-09T09:10:50.000176
Porsha
pythondev_help_Porsha_2018-01-09T09:10:50.000176
1,515,489,050.000176
28,364
pythondev
help
or an `if x or y &gt; else`
2018-01-09T09:11:39.000221
Porsha
pythondev_help_Porsha_2018-01-09T09:11:39.000221
1,515,489,099.000221
28,365
pythondev
help
ah ok this might be my problem then. Thanks again for the help
2018-01-09T09:12:06.000177
Milo
pythondev_help_Milo_2018-01-09T09:12:06.000177
1,515,489,126.000177
28,366
pythondev
help
yeah. I mean note that any existing data in your db might be saved in a way that each read will cause a problem
2018-01-09T09:12:54.000062
Zack
pythondev_help_Zack_2018-01-09T09:12:54.000062
1,515,489,174.000062
28,367
pythondev
help
you might want to take a peek at the raw data in the db, see what the values look like that are causing you trouble vs the norm
2018-01-09T09:13:13.000313
Zack
pythondev_help_Zack_2018-01-09T09:13:13.000313
1,515,489,193.000313
28,368
pythondev
help
ok
2018-01-09T09:14:25.000516
Maya
pythondev_help_Maya_2018-01-09T09:14:25.000516
1,515,489,265.000516
28,369
pythondev
help
I’m gonna try it
2018-01-09T09:14:32.000254
Maya
pythondev_help_Maya_2018-01-09T09:14:32.000254
1,515,489,272.000254
28,370
pythondev
help
thanks
2018-01-09T09:14:35.000309
Maya
pythondev_help_Maya_2018-01-09T09:14:35.000309
1,515,489,275.000309
28,371
pythondev
help
```if operation == -1: abort(401) elif operation == 0: abort(404) else: return jsonify(operation), 200```
2018-01-09T09:15:45.000778
Porsha
pythondev_help_Porsha_2018-01-09T09:15:45.000778
1,515,489,345.000778
28,372
pythondev
help
thanks for the snippet. Btw, is ```elif``` vs ```if``` just syntax sugar? I mean, there is no difference in the style. am I wrong?
2018-01-09T09:21:11.000030
Maya
pythondev_help_Maya_2018-01-09T09:21:11.000030
1,515,489,671.00003
28,373
pythondev
help
no
2018-01-09T09:21:15.000372
Floy
pythondev_help_Floy_2018-01-09T09:21:15.000372
1,515,489,675.000372
28,374
pythondev
help
yeah its weird did do that and showed create table and it is datetime. However after removed the strftime it now is not inserting to my db!
2018-01-09T09:22:39.000096
Milo
pythondev_help_Milo_2018-01-09T09:22:39.000096
1,515,489,759.000096
28,375
pythondev
help
essentially, if the first if is true and is compared, all following else ifs won’t be evaluated
2018-01-09T09:22:58.000676
Floy
pythondev_help_Floy_2018-01-09T09:22:58.000676
1,515,489,778.000676
28,376
pythondev
help
even if they evaluate to true
2018-01-09T09:23:05.000405
Floy
pythondev_help_Floy_2018-01-09T09:23:05.000405
1,515,489,785.000405
28,377
pythondev
help
<https://stackoverflow.com/a/20259390/214892>
2018-01-09T09:23:37.000240
Floy
pythondev_help_Floy_2018-01-09T09:23:37.000240
1,515,489,817.00024
28,378
pythondev
help
its in java, but the logic is the same
2018-01-09T09:23:43.000416
Floy
pythondev_help_Floy_2018-01-09T09:23:43.000416
1,515,489,823.000416
28,379
pythondev
help
thanks
2018-01-09T09:24:12.000248
Maya
pythondev_help_Maya_2018-01-09T09:24:12.000248
1,515,489,852.000248
28,380
pythondev
help
wait is the strftime on read or on write?
2018-01-09T09:29:12.000509
Zack
pythondev_help_Zack_2018-01-09T09:29:12.000509
1,515,490,152.000509
28,381
pythondev
help
how do I change the mysql timeout variables?
2018-01-09T10:00:58.000357
Milo
pythondev_help_Milo_2018-01-09T10:00:58.000357
1,515,492,058.000357
28,382
pythondev
help
mysql configuration
2018-01-09T10:03:06.000716
Floy
pythondev_help_Floy_2018-01-09T10:03:06.000716
1,515,492,186.000716
28,383
pythondev
help
should be a `my.cnf` in your base installation directory
2018-01-09T10:03:56.000740
Floy
pythondev_help_Floy_2018-01-09T10:03:56.000740
1,515,492,236.00074
28,384
pythondev
help
I located that but it doesn't have the values for `new_read_timeout` and `net_write_timeout`
2018-01-09T10:13:25.000286
Milo
pythondev_help_Milo_2018-01-09T10:13:25.000286
1,515,492,805.000286
28,385
pythondev
help
It's also odd because my cnf file is compared with the internets is located at: ``` /etc/mysql/mysql.conf.d/mysqld.cnf ```
2018-01-09T10:14:07.000557
Milo
pythondev_help_Milo_2018-01-09T10:14:07.000557
1,515,492,847.000557
28,386
pythondev
help
did you restart it?
2018-01-09T10:25:16.000345
Floy
pythondev_help_Floy_2018-01-09T10:25:16.000345
1,515,493,516.000345
28,387
pythondev
help
some values don’t have defaults
2018-01-09T10:25:30.000878
Floy
pythondev_help_Floy_2018-01-09T10:25:30.000878
1,515,493,530.000878
28,388
pythondev
help
yes what I am doing now is from the command line; ``` set net_write_timeout = 120 ```
2018-01-09T10:29:30.000424
Milo
pythondev_help_Milo_2018-01-09T10:29:30.000424
1,515,493,770.000424
28,389
pythondev
help
sorry restart what exactly?
2018-01-09T10:29:44.000294
Milo
pythondev_help_Milo_2018-01-09T10:29:44.000294
1,515,493,784.000294
28,390
pythondev
help
the mysql server process
2018-01-09T10:30:31.000585
Floy
pythondev_help_Floy_2018-01-09T10:30:31.000585
1,515,493,831.000585
28,391
pythondev
help
eg `sudo service mysqld restart`
2018-01-09T10:30:40.000180
Floy
pythondev_help_Floy_2018-01-09T10:30:40.000180
1,515,493,840.00018
28,392
pythondev
help
will do that now
2018-01-09T10:30:43.000218
Milo
pythondev_help_Milo_2018-01-09T10:30:43.000218
1,515,493,843.000218
28,393
pythondev
help
and you don’t do that via the command line
2018-01-09T10:30:47.000238
Floy
pythondev_help_Floy_2018-01-09T10:30:47.000238
1,515,493,847.000238
28,394
pythondev
help
you have to open up the my.cnf file
2018-01-09T10:31:00.000268
Floy
pythondev_help_Floy_2018-01-09T10:31:00.000268
1,515,493,860.000268
28,395
pythondev
help
and add `net_write_timeout=120` to the file
2018-01-09T10:31:16.000256
Floy
pythondev_help_Floy_2018-01-09T10:31:16.000256
1,515,493,876.000256
28,396
pythondev
help
oh ok that makes sense
2018-01-09T10:31:23.000816
Milo
pythondev_help_Milo_2018-01-09T10:31:23.000816
1,515,493,883.000816
28,397
pythondev
help
because these processes don’t often run on environment variables, unless otherwise specified
2018-01-09T10:31:51.000558
Floy
pythondev_help_Floy_2018-01-09T10:31:51.000558
1,515,493,911.000558
28,398
pythondev
help
has worked now, fingers crossed I don't get the error!
2018-01-09T10:38:00.000248
Milo
pythondev_help_Milo_2018-01-09T10:38:00.000248
1,515,494,280.000248
28,399
pythondev
help
I meant does anyone use cassandra-driver? Curious if it will pull schema for all keyspaces?
2018-01-09T11:15:31.000561
Daron
pythondev_help_Daron_2018-01-09T11:15:31.000561
1,515,496,531.000561
28,400
pythondev
help
Worst pip install ever, cassandra-driver
2018-01-09T11:27:08.000132
Daron
pythondev_help_Daron_2018-01-09T11:27:08.000132
1,515,497,228.000132
28,401
pythondev
help
how so?
2018-01-09T11:28:37.000291
Floy
pythondev_help_Floy_2018-01-09T11:28:37.000291
1,515,497,317.000291
28,402
pythondev
help
Ten minutes so far
2018-01-09T11:29:07.000144
Daron
pythondev_help_Daron_2018-01-09T11:29:07.000144
1,515,497,347.000144
28,403
pythondev
help
about 10 errors with you need to install and blank lines.
2018-01-09T11:29:24.000516
Daron
pythondev_help_Daron_2018-01-09T11:29:24.000516
1,515,497,364.000516
28,404
pythondev
help
ugh ubuntu 12.04 base os on the machine I am having to use. No wonder
2018-01-09T11:29:59.000131
Daron
pythondev_help_Daron_2018-01-09T11:29:59.000131
1,515,497,399.000131
28,405
pythondev
help
bingo
2018-01-09T11:32:31.000400
Floy
pythondev_help_Floy_2018-01-09T11:32:31.000400
1,515,497,551.0004
28,406
pythondev
help
that’ll do it
2018-01-09T11:32:34.000035
Floy
pythondev_help_Floy_2018-01-09T11:32:34.000035
1,515,497,554.000035
28,407
pythondev
help
Anyone ever faced this issue? `UserWarning: matplotlib is currently using a non-GUI backend, so cannot show the figure "matplotlib is currently using a non-GUI backend, "`
2018-01-09T14:11:59.000473
Estrella
pythondev_help_Estrella_2018-01-09T14:11:59.000473
1,515,507,119.000473
28,408
pythondev
help
yeah, usually with osx
2018-01-09T14:14:38.000051
Floy
pythondev_help_Floy_2018-01-09T14:14:38.000051
1,515,507,278.000051
28,409
pythondev
help
there’s a bunch of possible solutions if you google that error
2018-01-09T14:14:51.000041
Floy
pythondev_help_Floy_2018-01-09T14:14:51.000041
1,515,507,291.000041
28,410
pythondev
help
I did none worked
2018-01-09T14:34:33.000021
Estrella
pythondev_help_Estrella_2018-01-09T14:34:33.000021
1,515,508,473.000021
28,411
pythondev
help
And now I get '_xsrf argument missing from POST' as well
2018-01-09T14:34:50.000042
Estrella
pythondev_help_Estrella_2018-01-09T14:34:50.000042
1,515,508,490.000042
28,412
pythondev
help
Question here, I'm using Pyexcel to read the contents of an excel file, but using `pyexcel.get_book_dict` does not get the hidden rows and columns. Does anyone know a setting to allow pyexcel to read hidden rows and columns. I can't seem to find it. Thanks in Advance! :slightly_smiling_face:
2018-01-09T15:44:01.000045
Titus
pythondev_help_Titus_2018-01-09T15:44:01.000045
1,515,512,641.000045
28,413
pythondev
help
<https://stackoverflow.com/q/31257353/214892>
2018-01-09T15:47:11.000002
Floy
pythondev_help_Floy_2018-01-09T15:47:11.000002
1,515,512,831.000002
28,414
pythondev
help
that is for openpyxl, would that be the same as for pyexcel since the code i'm working with is using pyexcel
2018-01-09T15:52:15.000357
Titus
pythondev_help_Titus_2018-01-09T15:52:15.000357
1,515,513,135.000357
28,415
pythondev
help
pyexcel is a wrapper library and uses that to access the files
2018-01-09T15:57:28.000105
Floy
pythondev_help_Floy_2018-01-09T15:57:28.000105
1,515,513,448.000105
28,416
pythondev
help
so, that should be relevant
2018-01-09T15:57:35.000104
Floy
pythondev_help_Floy_2018-01-09T15:57:35.000104
1,515,513,455.000104
28,417
pythondev
help
when I compiled python 3.6 from source
2018-01-09T16:13:53.000021
Danyel
pythondev_help_Danyel_2018-01-09T16:13:53.000021
1,515,514,433.000021
28,418
pythondev
help
and try running pip I get an error message
2018-01-09T16:13:59.000264
Danyel
pythondev_help_Danyel_2018-01-09T16:13:59.000264
1,515,514,439.000264
28,419
pythondev
help
any idea
2018-01-09T16:14:20.000408
Danyel
pythondev_help_Danyel_2018-01-09T16:14:20.000408
1,515,514,460.000408
28,420
pythondev
help
probably a missing dependency when compiling python
2018-01-09T16:16:47.000496
Micki
pythondev_help_Micki_2018-01-09T16:16:47.000496
1,515,514,607.000496
28,421
pythondev
help
not sure what should be installed for ssl
2018-01-09T16:17:05.000032
Micki
pythondev_help_Micki_2018-01-09T16:17:05.000032
1,515,514,625.000032
28,422
pythondev
help
this are the requirements for debian/ubuntu `apt-get install build-essential zlib1g-dev libbz2-dev libssl-dev libreadline-dev libncurses5-dev libsqlite3-dev libgdbm-dev libdb-dev libexpat-dev libpcap-dev liblzma-dev libpcre3-dev tk-dev`
2018-01-09T16:17:48.000425
Micki
pythondev_help_Micki_2018-01-09T16:17:48.000425
1,515,514,668.000425
28,423