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
And how did you open currentsearch?
2018-01-22T15:30:02.000004
Keli
pythondev_help_Keli_2018-01-22T15:30:02.000004
1,516,635,002.000004
30,424
pythondev
help
<@Staci> on one line
2018-01-22T15:30:10.000170
Ramonita
pythondev_help_Ramonita_2018-01-22T15:30:10.000170
1,516,635,010.00017
30,425
pythondev
help
currentsearch = open(‘CS.txt’, “a+“)
2018-01-22T15:30:23.001128
Ramonita
pythondev_help_Ramonita_2018-01-22T15:30:23.001128
1,516,635,023.001128
30,426
pythondev
help
On one line with `\n` in the text?
2018-01-22T15:32:58.000207
Keli
pythondev_help_Keli_2018-01-22T15:32:58.000207
1,516,635,178.000207
30,427
pythondev
help
Where does `line` come from? it may have a `\\n` at the end, but it is difficult to tell without looking at the data and code.
2018-01-22T15:33:38.000450
Keli
pythondev_help_Keli_2018-01-22T15:33:38.000450
1,516,635,218.00045
30,428
pythondev
help
yes
2018-01-22T15:33:51.000830
Ramonita
pythondev_help_Ramonita_2018-01-22T15:33:51.000830
1,516,635,231.00083
30,429
pythondev
help
it is between each entry
2018-01-22T15:33:57.000393
Ramonita
pythondev_help_Ramonita_2018-01-22T15:33:57.000393
1,516,635,237.000393
30,430
pythondev
help
And those don't show up when you `print(fname, "[", line_no, ",", index, "] ", line, sep="")`?
2018-01-22T15:35:36.001270
Keli
pythondev_help_Keli_2018-01-22T15:35:36.001270
1,516,635,336.00127
30,431
pythondev
help
correct
2018-01-22T15:36:34.000264
Ramonita
pythondev_help_Ramonita_2018-01-22T15:36:34.000264
1,516,635,394.000264
30,432
pythondev
help
Weird, sorry I'm not sure what's going on.
2018-01-22T15:38:02.000152
Keli
pythondev_help_Keli_2018-01-22T15:38:02.000152
1,516,635,482.000152
30,433
pythondev
help
I will note for you <@Ramonita> that you are making a `tuple` into a `string` in your `cs = ...` line
2018-01-22T15:42:38.000030
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:42:38.000030
1,516,635,758.00003
30,434
pythondev
help
just fyi
2018-01-22T15:42:40.000022
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:42:40.000022
1,516,635,760.000022
30,435
pythondev
help
yes i know
2018-01-22T15:47:04.000684
Ramonita
pythondev_help_Ramonita_2018-01-22T15:47:04.000684
1,516,636,024.000684
30,436
pythondev
help
<@Ramonita> I just tested what you're trying to do and it works fine for me writing into a `.txt` with an escape character at the end
2018-01-22T15:49:35.000561
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:49:35.000561
1,516,636,175.000561
30,437
pythondev
help
using ``` with open(&lt;filepath&gt;, 'w') as f: s = str((1,2,3,4, "Okay")) f.write("{}\n".format(s)) ```
2018-01-22T15:50:25.000436
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:50:25.000436
1,516,636,225.000436
30,438
pythondev
help
there is the link to the code I modified.
2018-01-22T15:52:43.000060
Ramonita
pythondev_help_Ramonita_2018-01-22T15:52:43.000060
1,516,636,363.00006
30,439
pythondev
help
So are you attempting to write the results to a file?
2018-01-22T15:55:34.000582
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:55:34.000582
1,516,636,534.000582
30,440
pythondev
help
yes
2018-01-22T15:55:53.001039
Ramonita
pythondev_help_Ramonita_2018-01-22T15:55:53.001039
1,516,636,553.001039
30,441
pythondev
help
Okay because the print statement only prints to console
2018-01-22T15:56:05.000947
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:56:05.000947
1,516,636,565.000947
30,442
pythondev
help
yes
2018-01-22T15:56:12.000849
Ramonita
pythondev_help_Ramonita_2018-01-22T15:56:12.000849
1,516,636,572.000849
30,443
pythondev
help
however i have added code to it
2018-01-22T15:56:22.000289
Ramonita
pythondev_help_Ramonita_2018-01-22T15:56:22.000289
1,516,636,582.000289
30,444
pythondev
help
that we where dicussing above
2018-01-22T15:56:33.000501
Ramonita
pythondev_help_Ramonita_2018-01-22T15:56:33.000501
1,516,636,593.000501
30,445
pythondev
help
Paste the entire edited code if you could
2018-01-22T15:56:55.000448
Cherlyn
pythondev_help_Cherlyn_2018-01-22T15:56:55.000448
1,516,636,615.000448
30,446
pythondev
help
Okay let me test it out
2018-01-22T16:01:00.000535
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:01:00.000535
1,516,636,860.000535
30,447
pythondev
help
Okay I see the error
2018-01-22T16:05:06.000115
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:05:06.000115
1,516,637,106.000115
30,448
pythondev
help
Let me see if this fixes it
2018-01-22T16:05:24.000837
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:05:24.000837
1,516,637,124.000837
30,449
pythondev
help
Okay <@Ramonita> I should have asked this at first cause it would have solved the issue instantly
2018-01-22T16:06:36.000226
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:06:36.000226
1,516,637,196.000226
30,450
pythondev
help
In `line = fo.readline()` change it to `line = fo.readline().replace("\\n", "")`
2018-01-22T16:07:02.000466
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:07:02.000466
1,516,637,222.000466
30,451
pythondev
help
<@Ramonita> Okay what I said above is actually not going to work due to the way the script works. The only line you need to change is `cs = ...` Change it to this `cs = str((fname, line_no, index, line)).replace("\\n", "")`
2018-01-22T16:22:05.001049
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:22:05.001049
1,516,638,125.001049
30,452
pythondev
help
That will get you what you're looking for
2018-01-22T16:22:23.000029
Cherlyn
pythondev_help_Cherlyn_2018-01-22T16:22:23.000029
1,516,638,143.000029
30,453
pythondev
help
anyone good with jupyter and nginx ? I’m trying to setup juypter behind nginx and an elb in aws and i keep getting ```[W 15:29:17.051 NotebookApp] 400 GET /terminals/websocket/1 (10.141.25.49) 1.84ms referer=None```
2018-01-22T18:30:13.000224
Micaela
pythondev_help_Micaela_2018-01-22T18:30:13.000224
1,516,645,813.000224
30,454
pythondev
help
<@Micaela> have you enabled proxy protocol on your ELB?
2018-01-22T18:43:48.000199
Noel
pythondev_help_Noel_2018-01-22T18:43:48.000199
1,516,646,628.000199
30,455
pythondev
help
iirc you need that for websockets to work
2018-01-22T18:43:57.000112
Noel
pythondev_help_Noel_2018-01-22T18:43:57.000112
1,516,646,637.000112
30,456
pythondev
help
and ` listen 80 proxy_protocol;` in your nginx config
2018-01-22T18:44:24.000230
Noel
pythondev_help_Noel_2018-01-22T18:44:24.000230
1,516,646,664.00023
30,457
pythondev
help
let me check the elb settings, i don’t think i added
2018-01-22T18:44:43.000251
Micaela
pythondev_help_Micaela_2018-01-22T18:44:43.000251
1,516,646,683.000251
30,458
pythondev
help
let me add `proxy_protocol`
2018-01-22T18:44:46.000162
Micaela
pythondev_help_Micaela_2018-01-22T18:44:46.000162
1,516,646,686.000162
30,459
pythondev
help
theres some additional info that might be helpful in <https://trac.nginx.org/nginx/ticket/650>
2018-01-22T18:45:37.000305
Noel
pythondev_help_Noel_2018-01-22T18:45:37.000305
1,516,646,737.000305
30,460
pythondev
help
in particular: &gt;&gt;&gt; We've seen a couple of 400 errors shortly after applying proxy_protocol policy to the ELB, while nginx has been using old configuration (listen on 80/tcp without "proxy_protocol" parameter turned on) and ELB was using HTTP health checks, but this was expected.
2018-01-22T18:46:08.000082
Noel
pythondev_help_Noel_2018-01-22T18:46:08.000082
1,516,646,768.000082
30,461
pythondev
help
thank you
2018-01-22T18:46:43.000719
Micaela
pythondev_help_Micaela_2018-01-22T18:46:43.000719
1,516,646,803.000719
30,462
pythondev
help
hey is it possible to randomly select one of the "if" propositions?
2018-01-22T19:05:46.000458
Pennie
pythondev_help_Pennie_2018-01-22T19:05:46.000458
1,516,647,946.000458
30,463
pythondev
help
```for i in bloo: if a = 0: print(a) print(b) print(c)```
2018-01-22T19:08:02.000266
Pennie
pythondev_help_Pennie_2018-01-22T19:08:02.000266
1,516,648,082.000266
30,464
pythondev
help
like print randomly a b or c
2018-01-22T19:08:14.000064
Pennie
pythondev_help_Pennie_2018-01-22T19:08:14.000064
1,516,648,094.000064
30,465
pythondev
help
sure, could get a random value, if it’s below .33, print a, if it’s .33 or above and .66 or below print b, above .66 print c, something like that?
2018-01-22T19:10:05.000652
Zack
pythondev_help_Zack_2018-01-22T19:10:05.000652
1,516,648,205.000652
30,466
pythondev
help
nice thanks
2018-01-22T19:10:55.000092
Pennie
pythondev_help_Pennie_2018-01-22T19:10:55.000092
1,516,648,255.000092
30,467
pythondev
help
<@Zack> lets say I do this ``` for i in range (6): if a == 0: print(a) print(b) print(c) ```
2018-01-22T19:13:58.000183
Pennie
pythondev_help_Pennie_2018-01-22T19:13:58.000183
1,516,648,438.000183
30,468
pythondev
help
And I want only things to be printed maximum twice
2018-01-22T19:14:14.000134
Pennie
pythondev_help_Pennie_2018-01-22T19:14:14.000134
1,516,648,454.000134
30,469
pythondev
help
a can only ppear twice
2018-01-22T19:14:19.000139
Pennie
pythondev_help_Pennie_2018-01-22T19:14:19.000139
1,516,648,459.000139
30,470
pythondev
help
b only twice and c too
2018-01-22T19:14:24.000661
Pennie
pythondev_help_Pennie_2018-01-22T19:14:24.000661
1,516,648,464.000661
30,471
pythondev
help
but you want the order to be randomized?
2018-01-22T19:14:41.000267
Zack
pythondev_help_Zack_2018-01-22T19:14:41.000267
1,516,648,481.000267
30,472
pythondev
help
yes
2018-01-22T19:14:44.000361
Pennie
pythondev_help_Pennie_2018-01-22T19:14:44.000361
1,516,648,484.000361
30,473
pythondev
help
actually I posted my problem on data_science
2018-01-22T19:15:10.000653
Pennie
pythondev_help_Pennie_2018-01-22T19:15:10.000653
1,516,648,510.000653
30,474
pythondev
help
it's logic problem I don't know how to approach it
2018-01-22T19:15:22.000037
Pennie
pythondev_help_Pennie_2018-01-22T19:15:22.000037
1,516,648,522.000037
30,475
pythondev
help
would you mind take a look a stuck 2 as I solved my first problem one hour ago
2018-01-22T19:15:39.000030
Pennie
pythondev_help_Pennie_2018-01-22T19:15:39.000030
1,516,648,539.00003
30,476
pythondev
help
but this one is too hard I am getting crazy :stuck_out_tongue:
2018-01-22T19:15:48.000397
Pennie
pythondev_help_Pennie_2018-01-22T19:15:48.000397
1,516,648,548.000397
30,477
pythondev
help
so there’s a `random.shuffle`
2018-01-22T19:15:51.000032
Zack
pythondev_help_Zack_2018-01-22T19:15:51.000032
1,516,648,551.000032
30,478
pythondev
help
so if you just created a list, ``` for item in random.shuffle([a, a, b, b, c, c]): print(item) ```
2018-01-22T19:17:08.000225
Zack
pythondev_help_Zack_2018-01-22T19:17:08.000225
1,516,648,628.000225
30,479
pythondev
help
mmmm i see
2018-01-22T19:17:41.000173
Pennie
pythondev_help_Pennie_2018-01-22T19:17:41.000173
1,516,648,661.000173
30,480
pythondev
help
oh, oops, actually just checked the docs, random.shuffle is in place
2018-01-22T19:17:42.000074
Zack
pythondev_help_Zack_2018-01-22T19:17:42.000074
1,516,648,662.000074
30,481
pythondev
help
``` values = [a,a,b,b,c,c] random.shuffle(values) for item in values: print(item) ```
2018-01-22T19:18:30.000176
Zack
pythondev_help_Zack_2018-01-22T19:18:30.000176
1,516,648,710.000176
30,482
pythondev
help
a, b, and c are assignments i.e. names, they need to be defined before the shuffle and values list creation
2018-01-22T19:20:17.000107
Monroe
pythondev_help_Monroe_2018-01-22T19:20:17.000107
1,516,648,817.000107
30,483
pythondev
help
do you want to refer to something that is called 'a' or the string 'a'?
2018-01-22T19:20:54.000589
Monroe
pythondev_help_Monroe_2018-01-22T19:20:54.000589
1,516,648,854.000589
30,484
pythondev
help
how can I say after an if condition in a loop go back to the beginning of the loop?
2018-01-22T19:51:06.000167
Pennie
pythondev_help_Pennie_2018-01-22T19:51:06.000167
1,516,650,666.000167
30,485
pythondev
help
by using break?
2018-01-22T19:51:09.000475
Pennie
pythondev_help_Pennie_2018-01-22T19:51:09.000475
1,516,650,669.000475
30,486
pythondev
help
use `elif` for the rest of the ifs
2018-01-22T19:54:28.000006
Floy
pythondev_help_Floy_2018-01-22T19:54:28.000006
1,516,650,868.000006
30,487
pythondev
help
the correct conditional will evaluate and execute, then skip the rest
2018-01-22T19:54:49.000579
Floy
pythondev_help_Floy_2018-01-22T19:54:49.000579
1,516,650,889.000579
30,488
pythondev
help
or `continue` works
2018-01-22T19:54:50.000425
Zack
pythondev_help_Zack_2018-01-22T19:54:50.000425
1,516,650,890.000425
30,489
pythondev
help
even with more `if`s in the loop?
2018-01-22T19:55:09.000376
Floy
pythondev_help_Floy_2018-01-22T19:55:09.000376
1,516,650,909.000376
30,490
pythondev
help
this is what I have
2018-01-22T19:55:10.000200
Pennie
pythondev_help_Pennie_2018-01-22T19:55:10.000200
1,516,650,910.0002
30,491
pythondev
help
yup
2018-01-22T19:55:16.000093
Zack
pythondev_help_Zack_2018-01-22T19:55:16.000093
1,516,650,916.000093
30,492
pythondev
help
``` while a !=2 and b !=2: a=0 b=0 rn= (randint(1, 2) if df.loc[i,'SorD'] == 'D': if rn = 1 and a &lt; 3: df.loc[i,'N'] = 13 df.loc[i,'Size'] = 24 df.loc[i,'Space'] = 13 a+1 if rn = 2 and b &lt; 3: df.loc[i,'N'] = 13 ...
2018-01-22T19:55:16.000158
Pennie
pythondev_help_Pennie_2018-01-22T19:55:16.000158
1,516,650,916.000158
30,493
pythondev
help
so, your code is using single equals, so its assinging that vlaue to `rn`
2018-01-22T19:55:58.000311
Floy
pythondev_help_Floy_2018-01-22T19:55:58.000311
1,516,650,958.000311
30,494
pythondev
help
the two if blocks should operate twice on the loop
2018-01-22T19:56:00.000015
Pennie
pythondev_help_Pennie_2018-01-22T19:56:00.000015
1,516,650,960.000015
30,495
pythondev
help
should be `rn == 1` and `rn == 2`
2018-01-22T19:56:08.000522
Floy
pythondev_help_Floy_2018-01-22T19:56:08.000522
1,516,650,968.000522
30,496
pythondev
help
True
2018-01-22T19:56:17.000853
Pennie
pythondev_help_Pennie_2018-01-22T19:56:17.000853
1,516,650,977.000853
30,497
pythondev
help
a and b can be after the beginning of the loop?
2018-01-22T19:56:34.000100
Pennie
pythondev_help_Pennie_2018-01-22T19:56:34.000100
1,516,650,994.0001
30,498
pythondev
help
<@Floy> good catch. :slightly_smiling_face:
2018-01-22T19:56:35.000900
Zack
pythondev_help_Zack_2018-01-22T19:56:35.000900
1,516,650,995.0009
30,499
pythondev
help
that loop will also never end, because they’re assigned inside the loop to 0 on each iteration
2018-01-22T19:57:26.000837
Zack
pythondev_help_Zack_2018-01-22T19:57:26.000837
1,516,651,046.000837
30,500
pythondev
help
ho ok ty
2018-01-22T19:57:38.000731
Pennie
pythondev_help_Pennie_2018-01-22T19:57:38.000731
1,516,651,058.000731
30,501
pythondev
help
so I will put them outside
2018-01-22T19:57:42.000875
Pennie
pythondev_help_Pennie_2018-01-22T19:57:42.000875
1,516,651,062.000875
30,502
pythondev
help
or wait, I guess I misread the conditional, it will never iterate more than once, more accurately
2018-01-22T19:58:30.000262
Zack
pythondev_help_Zack_2018-01-22T19:58:30.000262
1,516,651,110.000262
30,503
pythondev
help
or end. nevermind, ignore me, it’s later here. :stuck_out_tongue:
2018-01-22T19:58:57.000386
Zack
pythondev_help_Zack_2018-01-22T19:58:57.000386
1,516,651,137.000386
30,504
pythondev
help
I think there is something wrong with my code
2018-01-22T20:00:02.000192
Pennie
pythondev_help_Pennie_2018-01-22T20:00:02.000192
1,516,651,202.000192
30,505
pythondev
help
I have a syntax error
2018-01-22T20:00:06.000018
Pennie
pythondev_help_Pennie_2018-01-22T20:00:06.000018
1,516,651,206.000018
30,506
pythondev
help
yeah, its early in the morning for you <@Zack> when’s your bedtime?
2018-01-22T20:00:07.000771
Floy
pythondev_help_Floy_2018-01-22T20:00:07.000771
1,516,651,207.000771
30,507
pythondev
help
2am?
2018-01-22T20:00:14.000151
Floy
pythondev_help_Floy_2018-01-22T20:00:14.000151
1,516,651,214.000151
30,508
pythondev
help
:smile:
2018-01-22T20:00:15.000458
Floy
pythondev_help_Floy_2018-01-22T20:00:15.000458
1,516,651,215.000458
30,509
pythondev
help
<@Pennie> are you using an ide or something like atom/sublime?
2018-01-22T20:00:32.000579
Floy
pythondev_help_Floy_2018-01-22T20:00:32.000579
1,516,651,232.000579
30,510
pythondev
help
atom :slightly_smiling_face:
2018-01-22T20:00:37.000785
Pennie
pythondev_help_Pennie_2018-01-22T20:00:37.000785
1,516,651,237.000785
30,511
pythondev
help
ok, you should have syntax checking on there
2018-01-22T20:00:48.000056
Floy
pythondev_help_Floy_2018-01-22T20:00:48.000056
1,516,651,248.000056
30,512
pythondev
help
SyntaxError: invalid syntax
2018-01-22T20:00:50.000232
Pennie
pythondev_help_Pennie_2018-01-22T20:00:50.000232
1,516,651,250.000232
30,513
pythondev
help
show you where
2018-01-22T20:00:50.000294
Floy
pythondev_help_Floy_2018-01-22T20:00:50.000294
1,516,651,250.000294
30,514
pythondev
help
line 81, this line if df.loc[i,'SorD'] == 'D':
2018-01-22T20:01:09.000124
Pennie
pythondev_help_Pennie_2018-01-22T20:01:09.000124
1,516,651,269.000124
30,515
pythondev
help
```a=0 b=0 while a !=2 and b !=2: rn= (randint(1, 2) if df.loc[i,'SorD'] == 'D': if rn == 1 and a &lt; 3: df.loc[i,'N'] = 13 df.loc[i,'Size'] = 24 df.loc[i,'Space'] = 13 a+1 if rn == 2 and b &lt; 3: df.loc[i,'N'] = 13 df...
2018-01-22T20:01:20.000477
Pennie
pythondev_help_Pennie_2018-01-22T20:01:20.000477
1,516,651,280.000477
30,516
pythondev
help
soon. :slightly_smiling_face:
2018-01-22T20:01:42.000202
Zack
pythondev_help_Zack_2018-01-22T20:01:42.000202
1,516,651,302.000202
30,517
pythondev
help
can I do that?
2018-01-22T20:01:58.000055
Pennie
pythondev_help_Pennie_2018-01-22T20:01:58.000055
1,516,651,318.000055
30,518
pythondev
help
no
2018-01-22T20:02:01.000614
Floy
pythondev_help_Floy_2018-01-22T20:02:01.000614
1,516,651,321.000614
30,519
pythondev
help
you see what I am trying to do?
2018-01-22T20:02:11.000176
Pennie
pythondev_help_Pennie_2018-01-22T20:02:11.000176
1,516,651,331.000176
30,520
pythondev
help
its a list, apparently
2018-01-22T20:02:11.000687
Floy
pythondev_help_Floy_2018-01-22T20:02:11.000687
1,516,651,331.000687
30,521
pythondev
help
list, you need to access by index point
2018-01-22T20:02:21.000844
Floy
pythondev_help_Floy_2018-01-22T20:02:21.000844
1,516,651,341.000844
30,522
pythondev
help
whatever `i` is, needs to be an int
2018-01-22T20:02:32.000009
Floy
pythondev_help_Floy_2018-01-22T20:02:32.000009
1,516,651,352.000009
30,523