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 to sort a dictionary by its value
2019-06-01T04:03:19.310100
Viviana
pythondev_help_Viviana_2019-06-01T04:03:19.310100
1,559,361,799.3101
26,221
pythondev
help
Make a list of items from it, sort the list, then make a dictionary from the list of items. Don’t forget to use `collections.OrderedDict` for that
2019-06-01T04:08:40.310200
Chester
pythondev_help_Chester_2019-06-01T04:08:40.310200
1,559,362,120.3102
26,222
pythondev
help
I'm looking to split a string into words of 2. Example: "this is a string" outcome: ["this is", "is a", "a strong"] Is there an efficient way of doing this? I'm sure I've seen this in a nltk example somewhere
2019-06-01T05:19:57.311600
Nikki
pythondev_help_Nikki_2019-06-01T05:19:57.311600
1,559,366,397.3116
26,223
pythondev
help
Look at `pairwise` recipe <https://docs.python.org/3/library/itertools.html#itertools-recipes> ``` &gt;&gt;&gt; list(pairwise("this is a string".split())) [('this', 'is'), ('is', 'a'), ('a', 'string')] ```
2019-06-01T05:25:02.311800
Chester
pythondev_help_Chester_2019-06-01T05:25:02.311800
1,559,366,702.3118
26,224
pythondev
help
Rough example: ``` s = "this is a string" words = s.split(' ') index = 0 index_end = 2 for i in range(len(words)): is_two_words = len(words[index:index_end]) if is_two_words == 2: print words[index:index_end] index += 1 index_end += 1 ```
2019-06-01T05:25:59.312400
Nikki
pythondev_help_Nikki_2019-06-01T05:25:59.312400
1,559,366,759.3124
26,225
pythondev
help
Oooh nice
2019-06-01T05:28:20.312500
Nikki
pythondev_help_Nikki_2019-06-01T05:28:20.312500
1,559,366,900.3125
26,226
pythondev
help
works perfect - thank you
2019-06-01T05:29:53.312700
Nikki
pythondev_help_Nikki_2019-06-01T05:29:53.312700
1,559,366,993.3127
26,227
pythondev
help
as a rule, while practicing algorithm questions (on a platform like codility), is it fine if I look up the solution after a long winded attempt which does not solve all test cases?
2019-06-01T06:30:59.313700
Conrad
pythondev_help_Conrad_2019-06-01T06:30:59.313700
1,559,370,659.3137
26,228
pythondev
help
I am not sure how to "get" these problems. some of them come to me immediately, some after some thought, but some don't always come to me
2019-06-01T06:31:19.314200
Conrad
pythondev_help_Conrad_2019-06-01T06:31:19.314200
1,559,370,679.3142
26,229
pythondev
help
one such problem: <https://app.codility.com/demo/results/training5GFD5R-CXT/>
2019-06-01T06:31:32.314500
Conrad
pythondev_help_Conrad_2019-06-01T06:31:32.314500
1,559,370,692.3145
26,230
pythondev
help
on one hand, ideally I would like to be able to solve without assistance. but on the other hand, I can't spend days fumbling
2019-06-01T06:32:29.315300
Conrad
pythondev_help_Conrad_2019-06-01T06:32:29.315300
1,559,370,749.3153
26,231
pythondev
help
<https://codility.com/media/train/solution-stone-wall.pdf> huh, the solution pdf calls it a greedy strategy and does something similar to what I was doing. only it does it properly and mine does not lol
2019-06-01T06:35:43.316000
Conrad
pythondev_help_Conrad_2019-06-01T06:35:43.316000
1,559,370,943.316
26,232
pythondev
help
I tried to find the pattern in the rectangles, when they started and when they ended, in the example case given in the question
2019-06-01T06:36:16.316600
Conrad
pythondev_help_Conrad_2019-06-01T06:36:16.316600
1,559,370,976.3166
26,233
pythondev
help
my algorithm fails for cases like [1, 1, 1] which should be possible with 1 block
2019-06-01T06:36:38.317000
Conrad
pythondev_help_Conrad_2019-06-01T06:36:38.317000
1,559,370,998.317
26,234
pythondev
help
regardless, I'd like to know how I was supposed to go from my half-assed solution to the one given by codility (or similar) under a time limit :confused:
2019-06-01T06:45:55.317600
Conrad
pythondev_help_Conrad_2019-06-01T06:45:55.317600
1,559,371,555.3176
26,235
pythondev
help
can you give me code for that
2019-06-01T07:09:29.317700
Viviana
pythondev_help_Viviana_2019-06-01T07:09:29.317700
1,559,372,969.3177
26,236
pythondev
help
you have literally all the steps in order...
2019-06-01T07:11:05.318400
Jettie
pythondev_help_Jettie_2019-06-01T07:11:05.318400
1,559,373,065.3184
26,237
pythondev
help
Hi I have few queries. I'm not able to scrape the content message of the replies in python from selenium import webdriver from selenium.webdriver.common.keys import Keys from <http://selenium.webdriver.common.by|selenium.webdriver.common.by> import By import time from selenium.webdriver.common.action_chains import ActionChains from selenium import webdriver chrome_path = "/Users/Downloads/chromedriver" driver = webdriver.Chrome(executable_path=chrome_path) driver.get('<https://www.youtube.com/watch?v=Yir001m_EnM>') driver.execute_script('window.scrollTo(1, 500);') time.sleep(5) driver.execute_script('window.scrollTo(1, 3000);') comments=driver.find_elements_by_xpath('//*[@id="content-text"]') name=driver.find_elements_by_xpath('//*[@id="author-text"]') replies=driver.find_elements_by_xpath('//*[@id="replies"]') while True: try: loadMoreButton = driver.find_element_by_xpath('//*[@id="more"]') time.sleep(2) loadMoreButton.click() time.sleep(5) except Exception as e: print(e) break time.sleep(10) number_of_items=len(name) for i in range (number_of_items): #print(name[i].text + " : ") #print(comments[i].text) print(replies[i].text) driver.quit() (edited) My code snippet I'm getting the replies count like (View 16 replies) not the content messsage
2019-06-01T07:19:58.318800
Roxie
pythondev_help_Roxie_2019-06-01T07:19:58.318800
1,559,373,598.3188
26,238
pythondev
help
can you confirm that you actually load all the replies?
2019-06-01T07:24:47.319700
Jettie
pythondev_help_Jettie_2019-06-01T07:24:47.319700
1,559,373,887.3197
26,239
pythondev
help
My output looks like this actually ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View 39 replies', '', '', 'View 2 replies', '', '', '', 'View reply', '', '', '', '', '', 'View reply', '', '', '', '', '', '', '', '', 'View reply', '', '', 'View reply', '', '', '', '', 'View 43 replies', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View 2 replies', '', '', '', '', '', 'View 17 replies', '', '', '', '', 'View 13 replies', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View reply', '', 'View reply', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View 5 replies', '', '', '', '', '', 'View reply', '', 'View 28 replies', '', '', 'View 27 replies', '', '', 'View reply', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View reply', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View 9 replies', 'View reply', '', '', '', 'View reply', '', 'View 13 replies', '', '', '', 'View reply', 'View 9 replies', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'View 11 replies', '', '', '', '', 'View 2 replies', '', '', '', '', '', 'View reply', '', '', '', '', '', '', 'View reply', '', '', '', '', '', '', '', 'View reply', '', '', '', 'View 2 replies', '', '', '', '']
2019-06-01T07:26:30.320300
Roxie
pythondev_help_Roxie_2019-06-01T07:26:30.320300
1,559,373,990.3203
26,240
pythondev
help
If the replies are available for that comments it is extracting the count of those replies not the content message
2019-06-01T07:27:38.321300
Roxie
pythondev_help_Roxie_2019-06-01T07:27:38.321300
1,559,374,058.3213
26,241
pythondev
help
Sorry my updated code import time import csv from selenium import webdriver from selenium.webdriver.common.keys import Keys chrome_path = "/Users/Downloads/chromedriver" page_url = "<https://www.youtube.com/watch?v=qBp1rCz_yQU>" driver = webdriver.Chrome(executable_path=chrome_path) driver.get(page_url) time.sleep(2) title = driver.find_element_by_xpath('//*[@id="container"]/h1/yt-formatted-string').text print(title) SCROLL_PAUSE_TIME = 2 CYCLES = 100 html = driver.find_element_by_tag_name('html') html.send_keys(Keys.PAGE_DOWN) html.send_keys(Keys.PAGE_DOWN) time.sleep(SCROLL_PAUSE_TIME * 3) for i in range(CYCLES): html.send_keys(Keys.END) time.sleep(SCROLL_PAUSE_TIME) comment_elems = driver.find_elements_by_xpath('//*[@id="content-text"]') all_comments = [elem.text for elem in comment_elems] #print(all_comments) replies_elems =driver.find_elements_by_xpath('//*[@id="replies"]') all_replies = [elem.text for elem in replies_elems] print(all_replies) write_file = "output_replies.csv" with open(write_file, "w") as output: for line in all_replies: output.write(line + '\n')
2019-06-01T07:29:35.322000
Roxie
pythondev_help_Roxie_2019-06-01T07:29:35.322000
1,559,374,175.322
26,242
pythondev
help
Yes It loading all the replies
2019-06-01T07:34:08.322400
Roxie
pythondev_help_Roxie_2019-06-01T07:34:08.322400
1,559,374,448.3224
26,243
pythondev
help
from that video comments
2019-06-01T07:34:25.322800
Roxie
pythondev_help_Roxie_2019-06-01T07:34:25.322800
1,559,374,465.3228
26,244
pythondev
help
I want to find the permutation of a particular string. I dont want to use `itertools.permutations`
2019-06-01T07:35:14.323400
Lanelle
pythondev_help_Lanelle_2019-06-01T07:35:14.323400
1,559,374,514.3234
26,245
pythondev
help
eg: abc - abc, bac, cab, cba , acb, bca
2019-06-01T07:35:41.324000
Lanelle
pythondev_help_Lanelle_2019-06-01T07:35:41.324000
1,559,374,541.324
26,246
pythondev
help
is this homework?
2019-06-01T07:45:00.324700
Jettie
pythondev_help_Jettie_2019-06-01T07:45:00.324700
1,559,375,100.3247
26,247
pythondev
help
To whom your asking ?
2019-06-01T07:52:55.325100
Roxie
pythondev_help_Roxie_2019-06-01T07:52:55.325100
1,559,375,575.3251
26,248
pythondev
help
<@Roxie> please use code snippets. It does syntax highlighting and makes it easier to read
2019-06-01T08:28:40.325900
Ashley
pythondev_help_Ashley_2019-06-01T08:28:40.325900
1,559,377,720.3259
26,249
pythondev
help
Or triple back ticks
2019-06-01T08:29:43.327400
Hiroko
pythondev_help_Hiroko_2019-06-01T08:29:43.327400
1,559,377,783.3274
26,250
pythondev
help
Snippets are also collapsible so they don't dominate chat
2019-06-01T08:31:35.329600
Ashley
pythondev_help_Ashley_2019-06-01T08:31:35.329600
1,559,377,895.3296
26,251
pythondev
help
None
2019-06-01T08:31:40.329700
Roxie
pythondev_help_Roxie_2019-06-01T08:31:40.329700
1,559,377,900.3297
26,252
pythondev
help
(very useful for those on mobile :wink: )
2019-06-01T08:32:02.330500
Ashley
pythondev_help_Ashley_2019-06-01T08:32:02.330500
1,559,377,922.3305
26,253
pythondev
help
This is fine now?
2019-06-01T08:32:03.330600
Roxie
pythondev_help_Roxie_2019-06-01T08:32:03.330600
1,559,377,923.3306
26,254
pythondev
help
Yeah, thanks
2019-06-01T08:32:12.330800
Ashley
pythondev_help_Ashley_2019-06-01T08:32:12.330800
1,559,377,932.3308
26,255
pythondev
help
Yup I can understand
2019-06-01T08:32:19.331100
Roxie
pythondev_help_Roxie_2019-06-01T08:32:19.331100
1,559,377,939.3311
26,256
pythondev
help
<@Lanelle> think about counting. We use base-10 for our number system, which means we have 10 characters to represent different numbers. We start with 0 and increment until we reach 9. What is the next thing we do, now that we've run out of characters? We "carry the 1" and start on the next number place with `10`. Notice how we have a 1 in the tens place and a 0 in the ones place. This is because we have 1 ten and 0 ones. We started over with the ones and looped back around to zero
2019-06-01T08:34:23.333400
Ashley
pythondev_help_Ashley_2019-06-01T08:34:23.333400
1,559,378,063.3334
26,257
pythondev
help
Binary works the same way. It's just a base-2 system, so there's only 2 number characters, and the number places are exponents of 2 instead of 10 (e.g. the ones place, the twos place, the fours place)
2019-06-01T08:35:21.335100
Ashley
pythondev_help_Ashley_2019-06-01T08:35:21.335100
1,559,378,121.3351
26,258
pythondev
help
If I wanted all the permutations of base-10 numbers that go up to 999, I would just start counting at 000
2019-06-01T08:36:56.336600
Ashley
pythondev_help_Ashley_2019-06-01T08:36:56.336600
1,559,378,216.3366
26,259
pythondev
help
The trick is that the characters I use to represent the numbers doesn't actually matter, so long as they're consistent
2019-06-01T08:37:36.337500
Ashley
pythondev_help_Ashley_2019-06-01T08:37:36.337500
1,559,378,256.3375
26,260
pythondev
help
<@Roxie> so it looks like you're trying to scrape YouTube comments. Selenium is actually a very bad scraping tool. It's an abstraction around the WebDriver protocol, which is meant for automated testing that simulates user behavior. YouTube actually has an API that you can make web requests to directly to get comments and comment threads from a video. I highly recommend you use that instead
2019-06-01T08:43:36.340700
Ashley
pythondev_help_Ashley_2019-06-01T08:43:36.340700
1,559,378,616.3407
26,261
pythondev
help
<@Ashley> Yeah I tried API also I'm not sure about where the replies lies. I have scraped the comments with API. Will share the snippet now
2019-06-01T09:17:22.342100
Roxie
pythondev_help_Roxie_2019-06-01T09:17:22.342100
1,559,380,642.3421
26,262
pythondev
help
You're looking for comment threads. <https://developers.google.com/youtube/v3/docs/commentThreads>
2019-06-01T09:31:57.342400
Carmen
pythondev_help_Carmen_2019-06-01T09:31:57.342400
1,559,381,517.3424
26,263
pythondev
help
None
2019-06-01T09:37:44.342500
Roxie
pythondev_help_Roxie_2019-06-01T09:37:44.342500
1,559,381,864.3425
26,264
pythondev
help
Yup, This is my snippet. Here I can able to scrape comments. How can I scape the replies ? where it lies in snippet
2019-06-01T09:38:28.343600
Roxie
pythondev_help_Roxie_2019-06-01T09:38:28.343600
1,559,381,908.3436
26,265
pythondev
help
<https://developers.google.com/youtube/v3/docs/commentThreads#replies>
2019-06-01T09:42:16.343800
Carmen
pythondev_help_Carmen_2019-06-01T09:42:16.343800
1,559,382,136.3438
26,266
pythondev
help
It appears you're trying to pull that data on line 74 of your snippet.
2019-06-01T09:42:46.344400
Carmen
pythondev_help_Carmen_2019-06-01T09:42:46.344400
1,559,382,166.3444
26,267
pythondev
help
Yeah exactly what method I need to apply for this ? comments.list ?
2019-06-01T09:47:50.345100
Roxie
pythondev_help_Roxie_2019-06-01T09:47:50.345100
1,559,382,470.3451
26,268
pythondev
help
How to define that in my snippet
2019-06-01T09:48:05.345500
Roxie
pythondev_help_Roxie_2019-06-01T09:48:05.345500
1,559,382,485.3455
26,269
pythondev
help
I have taken the reply count with replies = item["snippet"]["totalReplyCount"]
2019-06-01T10:16:19.346000
Roxie
pythondev_help_Roxie_2019-06-01T10:16:19.346000
1,559,384,179.346
26,270
pythondev
help
I'm not sure about the reply content can anyone suggest me with that
2019-06-01T10:16:48.346700
Roxie
pythondev_help_Roxie_2019-06-01T10:16:48.346700
1,559,384,208.3467
26,271
pythondev
help
&gt;&gt;&gt; The replies object is a container that contains a list of replies to the comment, if any exist. The replies.comments property represents the list of comments itself.
2019-06-01T10:40:29.346900
Hiroko
pythondev_help_Hiroko_2019-06-01T10:40:29.346900
1,559,385,629.3469
26,272
pythondev
help
It’s right there in the documentation
2019-06-01T10:40:45.347400
Hiroko
pythondev_help_Hiroko_2019-06-01T10:40:45.347400
1,559,385,645.3474
26,273
pythondev
help
Look at the json structure of the response
2019-06-01T10:41:53.348200
Hiroko
pythondev_help_Hiroko_2019-06-01T10:41:53.348200
1,559,385,713.3482
26,274
pythondev
help
Yeah, 4pm for me sounds good. That can give us a few hours together each day.
2019-06-01T11:16:28.348300
Jennell
pythondev_help_Jennell_2019-06-01T11:16:28.348300
1,559,387,788.3483
26,275
pythondev
help
can poetry ensure i have the correct python version?
2019-06-01T11:44:12.348700
Eugenio
pythondev_help_Eugenio_2019-06-01T11:44:12.348700
1,559,389,452.3487
26,276
pythondev
help
or is it only for package versions?
2019-06-01T11:44:21.348900
Eugenio
pythondev_help_Eugenio_2019-06-01T11:44:21.348900
1,559,389,461.3489
26,277
pythondev
help
You have to specify the supported python versions range (or a specific one), and it won’t install on an unsupported python
2019-06-01T11:45:23.349000
Chester
pythondev_help_Chester_2019-06-01T11:45:23.349000
1,559,389,523.349
26,278
pythondev
help
so it wont handle installing one, but you can define the version as a dependency?
2019-06-01T11:46:01.349200
Eugenio
pythondev_help_Eugenio_2019-06-01T11:46:01.349200
1,559,389,561.3492
26,279
pythondev
help
Oh, it won’t install pythons for you
2019-06-01T11:46:23.349400
Chester
pythondev_help_Chester_2019-06-01T11:46:23.349400
1,559,389,583.3494
26,280
pythondev
help
`pyenv` does the job though
2019-06-01T11:46:32.349600
Chester
pythondev_help_Chester_2019-06-01T11:46:32.349600
1,559,389,592.3496
26,281
pythondev
help
im on windows and just looking to make sure if someone downloads something i did in python they can install the packages and ensure they have the correct python version
2019-06-01T11:47:16.349800
Eugenio
pythondev_help_Eugenio_2019-06-01T11:47:16.349800
1,559,389,636.3498
26,282
pythondev
help
so i guess a combination of poetry and pyenv is all i need?
2019-06-01T11:47:26.350000
Eugenio
pythondev_help_Eugenio_2019-06-01T11:47:26.350000
1,559,389,646.35
26,283
pythondev
help
pyenv doesn’t work on windows afaik
2019-06-01T11:48:00.350200
Chester
pythondev_help_Chester_2019-06-01T11:48:00.350200
1,559,389,680.3502
26,284
pythondev
help
but it’s not really needed because the system does not depend on any particular python version
2019-06-01T11:48:17.350400
Chester
pythondev_help_Chester_2019-06-01T11:48:17.350400
1,559,389,697.3504
26,285
pythondev
help
you can install multiple pythons from nuget/chocolatey/python.org site without a hassle
2019-06-01T11:48:48.350600
Chester
pythondev_help_Chester_2019-06-01T11:48:48.350600
1,559,389,728.3506
26,286
pythondev
help
how do you manage which python is "active" though?
2019-06-01T11:49:28.350800
Eugenio
pythondev_help_Eugenio_2019-06-01T11:49:28.350800
1,559,389,768.3508
26,287
pythondev
help
In windows, you have to be explicit. There’s also `py.exe` wrapper that allows you to select the desired version ad hoc
2019-06-01T11:50:28.351200
Chester
pythondev_help_Chester_2019-06-01T11:50:28.351200
1,559,389,828.3512
26,288
pythondev
help
I’m not sure if poetry works on windows, but you can check easily
2019-06-01T11:50:40.351400
Chester
pythondev_help_Chester_2019-06-01T11:50:40.351400
1,559,389,840.3514
26,289
pythondev
help
oh
2019-06-01T11:50:50.351600
Eugenio
pythondev_help_Eugenio_2019-06-01T11:50:50.351600
1,559,389,850.3516
26,290
pythondev
help
the command runs at least, i was just about to try it out
2019-06-01T11:51:10.351800
Eugenio
pythondev_help_Eugenio_2019-06-01T11:51:10.351800
1,559,389,870.3518
26,291
pythondev
help
"Poetry requires Python 2.7 or 3.4+. It is multi-platform and the goal is to make it work equally well on Windows, Linux and OSX."
2019-06-01T11:52:14.352000
Eugenio
pythondev_help_Eugenio_2019-06-01T11:52:14.352000
1,559,389,934.352
26,292
pythondev
help
Ok great
2019-06-01T11:54:22.352200
Chester
pythondev_help_Chester_2019-06-01T11:54:22.352200
1,559,390,062.3522
26,293
pythondev
help
on windows you might want to install python from the store
2019-06-01T11:57:41.352400
Jimmy
pythondev_help_Jimmy_2019-06-01T11:57:41.352400
1,559,390,261.3524
26,294
pythondev
help
it's probably a lot easier
2019-06-01T11:57:46.352600
Jimmy
pythondev_help_Jimmy_2019-06-01T11:57:46.352600
1,559,390,266.3526
26,295
pythondev
help
windows store you mean?
2019-06-01T12:12:02.353000
Eugenio
pythondev_help_Eugenio_2019-06-01T12:12:02.353000
1,559,391,122.353
26,296
pythondev
help
ah nice, didnt know about that
2019-06-01T12:12:40.353200
Eugenio
pythondev_help_Eugenio_2019-06-01T12:12:40.353200
1,559,391,160.3532
26,297
pythondev
help
actually if you try to run python from the commandline, if its not available it'll automatically open up the store page for python
2019-06-01T12:15:44.353400
Eugenio
pythondev_help_Eugenio_2019-06-01T12:15:44.353400
1,559,391,344.3534
26,298
pythondev
help
any snippets to start?
2019-06-01T13:04:12.353800
Lanelle
pythondev_help_Lanelle_2019-06-01T13:04:12.353800
1,559,394,252.3538
26,299
pythondev
help
print([(a, b, c) for a in 'abc' for b in 'abc' for c in 'abc']) any way of making this more generic for each word. i want to have a function that takes a word and does the above
2019-06-01T13:40:50.354800
Lanelle
pythondev_help_Lanelle_2019-06-01T13:40:50.354800
1,559,396,450.3548
26,300
pythondev
help
If you break it out of being a one-liner you'll probably find a way to adapt it
2019-06-01T14:16:01.355700
Raven
pythondev_help_Raven_2019-06-01T14:16:01.355700
1,559,398,561.3557
26,301
pythondev
help
<@Raven> ```&gt;&gt;&gt; for a in 'abc': ... for b in 'abc': ... for c in 'abc': ... print(a,b,c) ...```
2019-06-01T14:18:43.356000
Lanelle
pythondev_help_Lanelle_2019-06-01T14:18:43.356000
1,559,398,723.356
26,302
pythondev
help
Right, so you can see that you've repeated something... so factor that out to a variable
2019-06-01T14:19:14.356400
Raven
pythondev_help_Raven_2019-06-01T14:19:14.356400
1,559,398,754.3564
26,303
pythondev
help
You can look at each part of the code, see where you've 'hard-coded' something, and refactor it to be based on the input instead
2019-06-01T14:19:43.357000
Raven
pythondev_help_Raven_2019-06-01T14:19:43.357000
1,559,398,783.357
26,304
pythondev
help
```&gt;&gt;&gt; word='evening' &gt;&gt;&gt; for i in word: ... for j in word: ... for k in word: ... print(i,j,k)```
2019-06-01T14:20:59.357200
Lanelle
pythondev_help_Lanelle_2019-06-01T14:20:59.357200
1,559,398,859.3572
26,305
pythondev
help
it works but only 3 letters are getting printed
2019-06-01T14:21:14.357600
Lanelle
pythondev_help_Lanelle_2019-06-01T14:21:14.357600
1,559,398,874.3576
26,306
pythondev
help
Sure, because you've hard-coded 3 loops
2019-06-01T14:21:23.357900
Raven
pythondev_help_Raven_2019-06-01T14:21:23.357900
1,559,398,883.3579
26,307
pythondev
help
how can i have n loops
2019-06-01T14:21:32.358100
Lanelle
pythondev_help_Lanelle_2019-06-01T14:21:32.358100
1,559,398,892.3581
26,308
pythondev
help
Put the loops inside another loop from 1 to N
2019-06-01T14:21:45.358400
Raven
pythondev_help_Raven_2019-06-01T14:21:45.358400
1,559,398,905.3584
26,309
pythondev
help
i didnt get that..
2019-06-01T14:23:57.359300
Lanelle
pythondev_help_Lanelle_2019-06-01T14:23:57.359300
1,559,399,037.3593
26,310
pythondev
help
You want to iterate over all the possible 'digits', for all the possible 'positions'. There are 7 positions in 'evening', and 7 digits (if you allow duplicates). So you can go from there
2019-06-01T14:24:55.359500
Raven
pythondev_help_Raven_2019-06-01T14:24:55.359500
1,559,399,095.3595
26,311
pythondev
help
hmmm
2019-06-01T14:25:31.359900
Lanelle
pythondev_help_Lanelle_2019-06-01T14:25:31.359900
1,559,399,131.3599
26,312
pythondev
help
<@Raven> any snippets that you can share please?
2019-06-01T14:29:04.360500
Lanelle
pythondev_help_Lanelle_2019-06-01T14:29:04.360500
1,559,399,344.3605
26,313
pythondev
help
Sadly not. This isn't the sort of thing most people will code themselves when there are tools for it in the standard library
2019-06-01T14:32:32.361000
Raven
pythondev_help_Raven_2019-06-01T14:32:32.361000
1,559,399,552.361
26,314
pythondev
help
Ok, confirmed it works for me
2019-06-01T14:36:40.361100
Charisse
pythondev_help_Charisse_2019-06-01T14:36:40.361100
1,559,399,800.3611
26,315
pythondev
help
How do you normally do this? tmate? Or do you have a zoom?
2019-06-01T14:37:08.361300
Charisse
pythondev_help_Charisse_2019-06-01T14:37:08.361300
1,559,399,828.3613
26,316
pythondev
help
Also I’ve created a calendar invite. If you want to be on it, DM me your email
2019-06-01T14:46:19.361500
Charisse
pythondev_help_Charisse_2019-06-01T14:46:19.361500
1,559,400,379.3615
26,317
pythondev
help
<@Lanelle>: To execute a loop from 1 to N, you do this: ```for i in range(N): # Your code here```
2019-06-01T15:59:29.363100
Carmen
pythondev_help_Carmen_2019-06-01T15:59:29.363100
1,559,404,769.3631
26,318
pythondev
help
hey guys - I have a silly pretty much unrelated-to-python question ... anyone have any idea how to read an SSH key file into a command line argument? I need to run a command like `docker-compose --verbose build --build-arg SSH_PRIVATE_KEY="$(cat ./.ssh/id_rsa)" app1` but I'm on a windows command line so $(cat ...) doesn't work.
2019-06-01T17:25:20.365000
Frankie
pythondev_help_Frankie_2019-06-01T17:25:20.365000
1,559,409,920.365
26,319
pythondev
help
hello everyone
2019-06-01T18:32:29.365200
Serita
pythondev_help_Serita_2019-06-01T18:32:29.365200
1,559,413,949.3652
26,320