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
No, you need to use `questions`
2018-02-16T20:17:06.000125
Garrett
pythondev_help_Garrett_2018-02-16T20:17:06.000125
1,518,812,226.000125
34,524
pythondev
help
`question` will always be the last question asked in that loop
2018-02-16T20:17:14.000186
Garrett
pythondev_help_Garrett_2018-02-16T20:17:14.000186
1,518,812,234.000186
34,525
pythondev
help
so f.write(questions)?
2018-02-16T20:24:43.000045
Felecia
pythondev_help_Felecia_2018-02-16T20:24:43.000045
1,518,812,683.000045
34,526
pythondev
help
<@Felecia> What do you want the script to do?
2018-02-16T20:28:03.000063
Porsha
pythondev_help_Porsha_2018-02-16T20:28:03.000063
1,518,812,883.000063
34,527
pythondev
help
to export the questions and answers to a text file
2018-02-16T20:28:32.000192
Felecia
pythondev_help_Felecia_2018-02-16T20:28:32.000192
1,518,812,912.000192
34,528
pythondev
help
so everytime its ran,its filled out and then creates a list in txt file in the same directory
2018-02-16T20:29:43.000025
Felecia
pythondev_help_Felecia_2018-02-16T20:29:43.000025
1,518,812,983.000025
34,529
pythondev
help
You could do something like this
2018-02-16T20:51:08.000146
Porsha
pythondev_help_Porsha_2018-02-16T20:51:08.000146
1,518,814,268.000146
34,530
pythondev
help
Or an alternative dict comprehension
2018-02-16T21:14:11.000115
Porsha
pythondev_help_Porsha_2018-02-16T21:14:11.000115
1,518,815,651.000115
34,531
pythondev
help
plz help on this simple code
2018-02-17T01:16:07.000042
Neomi
pythondev_help_Neomi_2018-02-17T01:16:07.000042
1,518,830,167.000042
34,532
pythondev
help
def mystrcmp(x,y): print (x.lower(),y.lower()) if(str(x.lower()) == str(y.lower())): print ("true") else: print ("false")
2018-02-17T01:16:09.000032
Neomi
pythondev_help_Neomi_2018-02-17T01:16:09.000032
1,518,830,169.000032
34,533
pythondev
help
mystrcmp("python", "pTHYON")
2018-02-17T01:16:20.000039
Neomi
pythondev_help_Neomi_2018-02-17T01:16:20.000039
1,518,830,180.000039
34,534
pythondev
help
it gives incorrect output
2018-02-17T01:16:28.000008
Neomi
pythondev_help_Neomi_2018-02-17T01:16:28.000008
1,518,830,188.000008
34,535
pythondev
help
i am no expect but the elipses look a bit strange to me on line 3
2018-02-17T01:41:24.000079
Joanie
pythondev_help_Joanie_2018-02-17T01:41:24.000079
1,518,831,684.000079
34,536
pythondev
help
if str(x.lower()) == str(y.lower()):
2018-02-17T01:41:55.000019
Joanie
pythondev_help_Joanie_2018-02-17T01:41:55.000019
1,518,831,715.000019
34,537
pythondev
help
also changing to string if you are passing string in?
2018-02-17T01:42:11.000004
Joanie
pythondev_help_Joanie_2018-02-17T01:42:11.000004
1,518,831,731.000004
34,538
pythondev
help
i tried without str too
2018-02-17T01:42:54.000021
Neomi
pythondev_help_Neomi_2018-02-17T01:42:54.000021
1,518,831,774.000021
34,539
pythondev
help
Removed str, removes extra pair of brackets
2018-02-17T01:43:39.000024
Neomi
pythondev_help_Neomi_2018-02-17T01:43:39.000024
1,518,831,819.000024
34,540
pythondev
help
still same
2018-02-17T01:43:44.000034
Neomi
pythondev_help_Neomi_2018-02-17T01:43:44.000034
1,518,831,824.000034
34,541
pythondev
help
well i just wrote a quick function almost identical and it seems to work
2018-02-17T01:45:20.000015
Joanie
pythondev_help_Joanie_2018-02-17T01:45:20.000015
1,518,831,920.000015
34,542
pythondev
help
however i saw in the way you called it
2018-02-17T01:45:24.000077
Joanie
pythondev_help_Joanie_2018-02-17T01:45:24.000077
1,518,831,924.000077
34,543
pythondev
help
"python" NOT == "pTHYON"
2018-02-17T01:45:35.000059
Joanie
pythondev_help_Joanie_2018-02-17T01:45:35.000059
1,518,831,935.000059
34,544
pythondev
help
did you expect true or false from the way you called it?
2018-02-17T01:46:18.000076
Joanie
pythondev_help_Joanie_2018-02-17T01:46:18.000076
1,518,831,978.000076
34,545
pythondev
help
The issue is just the if and else part
2018-02-17T01:49:45.000005
Neomi
pythondev_help_Neomi_2018-02-17T01:49:45.000005
1,518,832,185.000005
34,546
pythondev
help
it never reads the second line in if
2018-02-17T01:50:02.000026
Neomi
pythondev_help_Neomi_2018-02-17T01:50:02.000026
1,518,832,202.000026
34,547
pythondev
help
uh
2018-02-17T01:51:24.000053
Joanie
pythondev_help_Joanie_2018-02-17T01:51:24.000053
1,518,832,284.000053
34,548
pythondev
help
i was just saying the way you called it i expect to evaluate to false
2018-02-17T01:51:33.000048
Joanie
pythondev_help_Joanie_2018-02-17T01:51:33.000048
1,518,832,293.000048
34,549
pythondev
help
mystrcmp("python", "pTHYON") = false
2018-02-17T01:51:40.000036
Joanie
pythondev_help_Joanie_2018-02-17T01:51:40.000036
1,518,832,300.000036
34,550
pythondev
help
mystrcmp("python", "pYTHON")
2018-02-17T01:51:47.000063
Joanie
pythondev_help_Joanie_2018-02-17T01:51:47.000063
1,518,832,307.000063
34,551
pythondev
help
= true
2018-02-17T01:51:50.000081
Joanie
pythondev_help_Joanie_2018-02-17T01:51:50.000081
1,518,832,310.000081
34,552
pythondev
help
mystrcmp("python", "pTHYON") - whats wrong in calling like this
2018-02-17T01:53:07.000039
Neomi
pythondev_help_Neomi_2018-02-17T01:53:07.000039
1,518,832,387.000039
34,553
pythondev
help
the idea is to convert both to lowecase and compare
2018-02-17T01:53:24.000008
Neomi
pythondev_help_Neomi_2018-02-17T01:53:24.000008
1,518,832,404.000008
34,554
pythondev
help
that will be false
2018-02-17T01:54:01.000072
Joanie
pythondev_help_Joanie_2018-02-17T01:54:01.000072
1,518,832,441.000072
34,555
pythondev
help
you have not typed python
2018-02-17T01:54:08.000063
Joanie
pythondev_help_Joanie_2018-02-17T01:54:08.000063
1,518,832,448.000063
34,556
pythondev
help
in the second argument
2018-02-17T01:54:12.000002
Joanie
pythondev_help_Joanie_2018-02-17T01:54:12.000002
1,518,832,452.000002
34,557
pythondev
help
you have typed
2018-02-17T01:54:14.000054
Joanie
pythondev_help_Joanie_2018-02-17T01:54:14.000054
1,518,832,454.000054
34,558
pythondev
help
pthyon
2018-02-17T01:54:16.000018
Joanie
pythondev_help_Joanie_2018-02-17T01:54:16.000018
1,518,832,456.000018
34,559
pythondev
help
that is not python
2018-02-17T01:54:20.000004
Joanie
pythondev_help_Joanie_2018-02-17T01:54:20.000004
1,518,832,460.000004
34,560
pythondev
help
def cmp(x, y): print(x.lower(), y.lower()) if str(x.lower()) == str(y.lower()): print('true') else: print('false') cmp('python', 'pYTHON') # true cmp('python', 'pTHYON') # false
2018-02-17T01:54:49.000022
Joanie
pythondev_help_Joanie_2018-02-17T01:54:49.000022
1,518,832,489.000022
34,561
pythondev
help
this works
2018-02-17T01:54:53.000037
Joanie
pythondev_help_Joanie_2018-02-17T01:54:53.000037
1,518,832,493.000037
34,562
pythondev
help
...
2018-02-17T01:56:34.000042
Joanie
pythondev_help_Joanie_2018-02-17T01:56:34.000042
1,518,832,594.000042
34,563
pythondev
help
OMG, now I get you!
2018-02-17T01:56:35.000050
Neomi
pythondev_help_Neomi_2018-02-17T01:56:35.000050
1,518,832,595.00005
34,564
pythondev
help
:stuck_out_tongue:
2018-02-17T01:56:37.000077
Neomi
pythondev_help_Neomi_2018-02-17T01:56:37.000077
1,518,832,597.000077
34,565
pythondev
help
lol
2018-02-17T01:56:39.000039
Joanie
pythondev_help_Joanie_2018-02-17T01:56:39.000039
1,518,832,599.000039
34,566
pythondev
help
i was going to be very sad in a minute
2018-02-17T01:56:45.000028
Joanie
pythondev_help_Joanie_2018-02-17T01:56:45.000028
1,518,832,605.000028
34,567
pythondev
help
lol
2018-02-17T01:56:46.000029
Joanie
pythondev_help_Joanie_2018-02-17T01:56:46.000029
1,518,832,606.000029
34,568
pythondev
help
haha
2018-02-17T01:56:49.000082
Neomi
pythondev_help_Neomi_2018-02-17T01:56:49.000082
1,518,832,609.000082
34,569
pythondev
help
:stuck_out_tongue:
2018-02-17T01:56:51.000017
Neomi
pythondev_help_Neomi_2018-02-17T01:56:51.000017
1,518,832,611.000017
34,570
pythondev
help
python doesnt equal pthyon
2018-02-17T01:56:54.000053
Joanie
pythondev_help_Joanie_2018-02-17T01:56:54.000053
1,518,832,614.000053
34,571
pythondev
help
!!!
2018-02-17T01:56:55.000018
Joanie
pythondev_help_Joanie_2018-02-17T01:56:55.000018
1,518,832,615.000018
34,572
pythondev
help
maybe im bad at explaining lol
2018-02-17T01:57:04.000011
Joanie
pythondev_help_Joanie_2018-02-17T01:57:04.000011
1,518,832,624.000011
34,573
pythondev
help
OMG, m so silly!
2018-02-17T01:57:09.000072
Neomi
pythondev_help_Neomi_2018-02-17T01:57:09.000072
1,518,832,629.000072
34,574
pythondev
help
glad you got it :slightly_smiling_face:
2018-02-17T01:57:26.000061
Joanie
pythondev_help_Joanie_2018-02-17T01:57:26.000061
1,518,832,646.000061
34,575
pythondev
help
yea
2018-02-17T01:58:55.000020
Neomi
pythondev_help_Neomi_2018-02-17T01:58:55.000020
1,518,832,735.00002
34,576
pythondev
help
I have 1 more question
2018-02-17T02:01:23.000002
Neomi
pythondev_help_Neomi_2018-02-17T02:01:23.000002
1,518,832,883.000002
34,577
pythondev
help
def count_digits(x): c=0 # how to apply the loop here? q = x/10 r = x%10 if (q&gt;0): c=c+1 return count_digits(q) else: print (c) #l = "12345" #print (len(l))
2018-02-17T02:01:26.000028
Neomi
pythondev_help_Neomi_2018-02-17T02:01:26.000028
1,518,832,886.000028
34,578
pythondev
help
<@Neomi> "apply the loop"?
2018-02-17T04:06:17.000027
Aleida
pythondev_help_Aleida_2018-02-17T04:06:17.000027
1,518,840,377.000027
34,579
pythondev
help
for c in??
2018-02-17T04:13:33.000073
Neomi
pythondev_help_Neomi_2018-02-17T04:13:33.000073
1,518,840,813.000073
34,580
pythondev
help
loop should run till q &gt;=0
2018-02-17T04:14:12.000064
Neomi
pythondev_help_Neomi_2018-02-17T04:14:12.000064
1,518,840,852.000064
34,581
pythondev
help
if(q&gt;=0).. keep doing the q = x/10 r = x%10 if (q&gt;0): c=c+1
2018-02-17T04:15:00.000055
Neomi
pythondev_help_Neomi_2018-02-17T04:15:00.000055
1,518,840,900.000055
34,582
pythondev
help
I have no idea how to read that, sorry. You might want to read about `for` and `while` loops
2018-02-17T04:29:06.000009
Aleida
pythondev_help_Aleida_2018-02-17T04:29:06.000009
1,518,841,746.000009
34,583
pythondev
help
ok
2018-02-17T06:49:49.000067
Neomi
pythondev_help_Neomi_2018-02-17T06:49:49.000067
1,518,850,189.000067
34,584
pythondev
help
I have this weird problem, when I run my script via crontab the script wont exit
2018-02-17T07:38:25.000070
Lashawna
pythondev_help_Lashawna_2018-02-17T07:38:25.000070
1,518,853,105.00007
34,585
pythondev
help
i have a cron that executes and I have tried using lock files and even a socket to only have 1 instance runningh
2018-02-17T07:38:54.000001
Lashawna
pythondev_help_Lashawna_2018-02-17T07:38:54.000001
1,518,853,134.000001
34,586
pythondev
help
but it wont quit
2018-02-17T07:39:01.000067
Lashawna
pythondev_help_Lashawna_2018-02-17T07:39:01.000067
1,518,853,141.000067
34,587
pythondev
help
if I do a ps -A | grep python there are tons of processes
2018-02-17T07:39:17.000016
Lashawna
pythondev_help_Lashawna_2018-02-17T07:39:17.000016
1,518,853,157.000016
34,588
pythondev
help
and keeps growing
2018-02-17T07:39:21.000010
Lashawna
pythondev_help_Lashawna_2018-02-17T07:39:21.000010
1,518,853,161.00001
34,589
pythondev
help
any idea whats going on?
2018-02-17T07:39:26.000042
Lashawna
pythondev_help_Lashawna_2018-02-17T07:39:26.000042
1,518,853,166.000042
34,590
pythondev
help
you probably have something in the script that makes it hang.
2018-02-17T07:39:43.000025
Micki
pythondev_help_Micki_2018-02-17T07:39:43.000025
1,518,853,183.000025
34,591
pythondev
help
Infinite loop ? ask for input ?
2018-02-17T07:39:50.000052
Micki
pythondev_help_Micki_2018-02-17T07:39:50.000052
1,518,853,190.000052
34,592
pythondev
help
nope
2018-02-17T07:54:10.000070
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:10.000070
1,518,854,050.00007
34,593
pythondev
help
ive even made it simple exit if there is a lock file
2018-02-17T07:54:24.000057
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:24.000057
1,518,854,064.000057
34,594
pythondev
help
or if the socket is open
2018-02-17T07:54:30.000010
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:30.000010
1,518,854,070.00001
34,595
pythondev
help
it works from command line
2018-02-17T07:54:49.000020
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:49.000020
1,518,854,089.00002
34,596
pythondev
help
but from cron it lingers
2018-02-17T07:54:55.000036
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:55.000036
1,518,854,095.000036
34,597
pythondev
help
try: import socket s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) ## Create an abstract socket, by prefixing it with null. s.bind( '\0postconnect_gateway_notify_lock') except socket.error as e: error_code = e.args[0] error_string = e.args[1] print ("Process already running. Exiting") sys.exit ...
2018-02-17T07:54:58.000011
Lashawna
pythondev_help_Lashawna_2018-02-17T07:54:58.000011
1,518,854,098.000011
34,598
pythondev
help
ive tried different ways and they all work from cmdline but not crontab
2018-02-17T07:55:32.000006
Lashawna
pythondev_help_Lashawna_2018-02-17T07:55:32.000006
1,518,854,132.000006
34,599
pythondev
help
might be stuck on the socket creation ? permission ? idk :confused:
2018-02-17T07:56:30.000007
Micki
pythondev_help_Micki_2018-02-17T07:56:30.000007
1,518,854,190.000007
34,600
pythondev
help
try to put print statement and check the cron output
2018-02-17T07:56:55.000029
Micki
pythondev_help_Micki_2018-02-17T07:56:55.000029
1,518,854,215.000029
34,601
pythondev
help
Anyone have any good tips on writing a readme? Mine always look like a sysadmin wrote it
2018-02-17T09:16:56.000063
Tobias
pythondev_help_Tobias_2018-02-17T09:16:56.000063
1,518,859,016.000063
34,602
pythondev
help
&lt;- is a recovering sysadmin
2018-02-17T09:17:11.000103
Tobias
pythondev_help_Tobias_2018-02-17T09:17:11.000103
1,518,859,031.000103
34,603
pythondev
help
<@Tobias> <https://gist.github.com/PurpleBooth/109311bb0361f32d87a2>
2018-02-17T09:52:07.000101
Henrietta
pythondev_help_Henrietta_2018-02-17T09:52:07.000101
1,518,861,127.000101
34,604
pythondev
help
Thanks!
2018-02-17T09:53:59.000096
Tobias
pythondev_help_Tobias_2018-02-17T09:53:59.000096
1,518,861,239.000096
34,605
pythondev
help
No probs :thumbsup:
2018-02-17T09:56:50.000029
Henrietta
pythondev_help_Henrietta_2018-02-17T09:56:50.000029
1,518,861,410.000029
34,606
pythondev
help
are there convenient ways for acquiring all possible URLs/Pages of a website for scraping? I've considered using the google sitemap since I have access to this
2018-02-17T10:08:31.000086
Theressa
pythondev_help_Theressa_2018-02-17T10:08:31.000086
1,518,862,111.000086
34,607
pythondev
help
if you can trust the sitemap
2018-02-17T10:14:34.000169
Floy
pythondev_help_Floy_2018-02-17T10:14:34.000169
1,518,862,474.000169
34,608
pythondev
help
and how recent it is
2018-02-17T10:15:12.000044
Floy
pythondev_help_Floy_2018-02-17T10:15:12.000044
1,518,862,512.000044
34,609
pythondev
help
I can always generate a new one
2018-02-17T10:15:19.000090
Theressa
pythondev_help_Theressa_2018-02-17T10:15:19.000090
1,518,862,519.00009
34,610
pythondev
help
I'm doing this with permission for my company
2018-02-17T10:15:33.000050
Theressa
pythondev_help_Theressa_2018-02-17T10:15:33.000050
1,518,862,533.00005
34,611
pythondev
help
gotcha
2018-02-17T10:16:08.000087
Floy
pythondev_help_Floy_2018-02-17T10:16:08.000087
1,518,862,568.000087
34,612
pythondev
help
so whats the goal here?
2018-02-17T10:16:12.000089
Floy
pythondev_help_Floy_2018-02-17T10:16:12.000089
1,518,862,572.000089
34,613
pythondev
help
find every page that has a form on it
2018-02-17T10:16:20.000132
Theressa
pythondev_help_Theressa_2018-02-17T10:16:20.000132
1,518,862,580.000132
34,614
pythondev
help
we use Magento as a web platform and a lot of hands go into editing it, not just the web devs
2018-02-17T10:16:45.000066
Theressa
pythondev_help_Theressa_2018-02-17T10:16:45.000066
1,518,862,605.000066
34,615
pythondev
help
thing is we have a lot of products and those are all configured using a template so I don't need to crawl each one most likely
2018-02-17T10:17:26.000031
Theressa
pythondev_help_Theressa_2018-02-17T10:17:26.000031
1,518,862,646.000031
34,616
pythondev
help
hmm, ok. and are all these public pages?
2018-02-17T10:17:51.000085
Floy
pythondev_help_Floy_2018-02-17T10:17:51.000085
1,518,862,671.000085
34,617
pythondev
help
yep, or at least the ones we're concerned about
2018-02-17T10:18:03.000038
Theressa
pythondev_help_Theressa_2018-02-17T10:18:03.000038
1,518,862,683.000038
34,618
pythondev
help
to generate a report for SEO/Marketing purposes
2018-02-17T10:18:16.000004
Theressa
pythondev_help_Theressa_2018-02-17T10:18:16.000004
1,518,862,696.000004
34,619
pythondev
help
understood. makes your job easier
2018-02-17T10:18:27.000102
Floy
pythondev_help_Floy_2018-02-17T10:18:27.000102
1,518,862,707.000102
34,620
pythondev
help
I think sitemap will be my goto
2018-02-17T10:18:46.000071
Theressa
pythondev_help_Theressa_2018-02-17T10:18:46.000071
1,518,862,726.000071
34,621
pythondev
help
otherwise, I’d suggest tossing scrapy at it and checking each page for a `&lt;form&gt;`tag
2018-02-17T10:20:50.000002
Floy
pythondev_help_Floy_2018-02-17T10:20:50.000002
1,518,862,850.000002
34,622
pythondev
help
but with your sitemap, you should be able to get away with using `requests` and `beautifulsoup`
2018-02-17T10:21:08.000114
Floy
pythondev_help_Floy_2018-02-17T10:21:08.000114
1,518,862,868.000114
34,623