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 | >Use git stash when you want to record the current state of the working directory and the index, but want to go back to a clean working directory. The command saves your local modifications away and reverts the working directory to match the HEAD commit. | 2017-12-29T17:45:32.000052 | Meg | pythondev_help_Meg_2017-12-29T17:45:32.000052 | 1,514,569,532.000052 | 106,203 |
pythondev | help | ```
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git stash
pyslackers_website/slack/templates/slack/index.html: needs merge
pyslackers_website/slack/templates/slack/index.html: needs merge
pyslackers_website/slack/templates/slack/index.html: unmerged (6e48f250339b24494434d0bda54a338ef50fb659)
pyslacker... | 2017-12-29T17:45:32.000090 | Deedee | pythondev_help_Deedee_2017-12-29T17:45:32.000090 | 1,514,569,532.00009 | 106,204 |
pythondev | help | could you paste the output of `git status` it looks like you are in process of doing a rebase | 2017-12-29T17:45:37.000128 | Ciera | pythondev_help_Ciera_2017-12-29T17:45:37.000128 | 1,514,569,537.000128 | 106,205 |
pythondev | help | ```
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git status
rebase in progress; onto db610e9
You are currently rebasing branch 'master' on 'db610e9'.
(fix conflicts and then run "git rebase --continue")
(use "git rebase --skip" to skip this patch)
(use "git rebase --abort" to check out the origin... | 2017-12-29T17:46:04.000043 | Deedee | pythondev_help_Deedee_2017-12-29T17:46:04.000043 | 1,514,569,564.000043 | 106,206 |
pythondev | help | do a `git rebase --abort` and after another `git status` | 2017-12-29T17:47:01.000119 | Ciera | pythondev_help_Ciera_2017-12-29T17:47:01.000119 | 1,514,569,621.000119 | 106,207 |
pythondev | help | lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean | 2017-12-29T17:47:29.000125 | Deedee | pythondev_help_Deedee_2017-12-29T17:47:29.000125 | 1,514,569,649.000125 | 106,208 |
pythondev | help | ok. then assuming the `pyslackers` remote is named `upstream` | 2017-12-29T17:47:55.000006 | Ciera | pythondev_help_Ciera_2017-12-29T17:47:55.000006 | 1,514,569,675.000006 | 106,209 |
pythondev | help | yes | 2017-12-29T17:47:59.000049 | Deedee | pythondev_help_Deedee_2017-12-29T17:47:59.000049 | 1,514,569,679.000049 | 106,210 |
pythondev | help | `git pull upstream master` | 2017-12-29T17:48:04.000075 | Ciera | pythondev_help_Ciera_2017-12-29T17:48:04.000075 | 1,514,569,684.000075 | 106,211 |
pythondev | help | and then to sync your fork on github `git push origin master` | 2017-12-29T17:48:17.000145 | Ciera | pythondev_help_Ciera_2017-12-29T17:48:17.000145 | 1,514,569,697.000145 | 106,212 |
pythondev | help | ```
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git pull upstream master
From <https://github.com/pyslackers/website>
* branch master -> FETCH_HEAD
Already up-to-date.
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git push origin master
Username for '<https://githu... | 2017-12-29T17:51:45.000157 | Deedee | pythondev_help_Deedee_2017-12-29T17:51:45.000157 | 1,514,569,905.000157 | 106,213 |
pythondev | help | thanks for `git stash` <@Meg> | 2017-12-29T17:52:21.000190 | Deedee | pythondev_help_Deedee_2017-12-29T17:52:21.000190 | 1,514,569,941.00019 | 106,214 |
pythondev | help | Or am I just supposed to ignore that? | 2017-12-29T17:52:51.000118 | Deedee | pythondev_help_Deedee_2017-12-29T17:52:51.000118 | 1,514,569,971.000118 | 106,215 |
pythondev | help | no that's because you have some merge commit in your master that aren't on pyslackers | 2017-12-29T17:53:47.000119 | Ciera | pythondev_help_Ciera_2017-12-29T17:53:47.000119 | 1,514,570,027.000119 | 106,216 |
pythondev | help | I'm not sure what's the easiest way to fix that :thinking_face: | 2017-12-29T17:54:14.000113 | Ciera | pythondev_help_Ciera_2017-12-29T17:54:14.000113 | 1,514,570,054.000113 | 106,217 |
pythondev | help | Link for those interested <https://github.com/khdc-me/website/commits/master> | 2017-12-29T17:54:34.000107 | Ciera | pythondev_help_Ciera_2017-12-29T17:54:34.000107 | 1,514,570,074.000107 | 106,218 |
pythondev | help | I guess this is what I've been fighting with. haha FORMAT THE DRIVE! | 2017-12-29T17:54:38.000122 | Deedee | pythondev_help_Deedee_2017-12-29T17:54:38.000122 | 1,514,570,078.000122 | 106,219 |
pythondev | help | <https://github.com/pyslackers/website/commits/master> | 2017-12-29T17:54:39.000096 | Ciera | pythondev_help_Ciera_2017-12-29T17:54:39.000096 | 1,514,570,079.000096 | 106,220 |
pythondev | help | j/k | 2017-12-29T17:54:40.000146 | Deedee | pythondev_help_Deedee_2017-12-29T17:54:40.000146 | 1,514,570,080.000146 | 106,221 |
pythondev | help | ok so `git checkout master` (just to be sure) | 2017-12-29T17:56:04.000005 | Ciera | pythondev_help_Ciera_2017-12-29T17:56:04.000005 | 1,514,570,164.000005 | 106,222 |
pythondev | help | then `git fetch upstream` (just to be sure bis) | 2017-12-29T17:56:18.000179 | Ciera | pythondev_help_Ciera_2017-12-29T17:56:18.000179 | 1,514,570,178.000179 | 106,223 |
pythondev | help | `git reset --hard upstream/master` to clear your master and use the upstream (pyslackers) one | 2017-12-29T17:56:45.000110 | Ciera | pythondev_help_Ciera_2017-12-29T17:56:45.000110 | 1,514,570,205.00011 | 106,224 |
pythondev | help | `git push origin master --force` to push your local master to your fork | 2017-12-29T17:57:10.000187 | Ciera | pythondev_help_Ciera_2017-12-29T17:57:10.000187 | 1,514,570,230.000187 | 106,225 |
pythondev | help | ```
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git checkout master
Already on 'master'
Your branch is up-to-date with 'origin/master'.
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git fetch upstream
lex@lana:~/Development/Python/PyCharm/pyslackers-com/website$ git reset --hard upst... | 2017-12-29T17:59:07.000072 | Deedee | pythondev_help_Deedee_2017-12-29T17:59:07.000072 | 1,514,570,347.000072 | 106,226 |
pythondev | help | <@Ciera> :taco: | 2017-12-29T17:59:22.000138 | Deedee | pythondev_help_Deedee_2017-12-29T17:59:22.000138 | 1,514,570,362.000138 | 106,227 |
pythondev | help | thanks :thumbsup: | 2017-12-29T17:59:37.000009 | Ciera | pythondev_help_Ciera_2017-12-29T17:59:37.000009 | 1,514,570,377.000009 | 106,228 |
pythondev | help | good work on the website :wink: | 2017-12-29T17:59:43.000054 | Ciera | pythondev_help_Ciera_2017-12-29T17:59:43.000054 | 1,514,570,383.000054 | 106,229 |
pythondev | help | no man. thank you! | 2017-12-29T18:00:35.000064 | Deedee | pythondev_help_Deedee_2017-12-29T18:00:35.000064 | 1,514,570,435.000064 | 106,230 |
pythondev | help | you learn somthing every day | 2017-12-29T18:02:46.000237 | Meg | pythondev_help_Meg_2017-12-29T18:02:46.000237 | 1,514,570,566.000237 | 106,231 |
pythondev | help | and git (or whatever VCS) is one of those things you do need to be comfortable with especially if you’re on a team | 2017-12-29T18:03:16.000027 | Meg | pythondev_help_Meg_2017-12-29T18:03:16.000027 | 1,514,570,596.000027 | 106,232 |
pythondev | help | take care to create a new branch before doing any modifications | 2017-12-29T18:08:55.000084 | Ciera | pythondev_help_Ciera_2017-12-29T18:08:55.000084 | 1,514,570,935.000084 | 106,233 |
pythondev | help | yeah. I've been after this for a couple of days. tried reset, just hadn't used `--hard`. anyway, you guys are awesome. | 2017-12-29T18:13:14.000079 | Deedee | pythondev_help_Deedee_2017-12-29T18:13:14.000079 | 1,514,571,194.000079 | 106,234 |
pythondev | help | Does anyone know of a good project structure for a sanic application? | 2017-12-29T20:52:58.000025 | Kayce | pythondev_help_Kayce_2017-12-29T20:52:58.000025 | 1,514,580,778.000025 | 106,235 |
pythondev | help | I'm thinking about doing a straight copy of whatever flask would do. | 2017-12-29T20:54:26.000044 | Kayce | pythondev_help_Kayce_2017-12-29T20:54:26.000044 | 1,514,580,866.000044 | 106,236 |
pythondev | help | Today I will try. Thanks. | 2017-12-30T04:54:39.000025 | Georgeann | pythondev_help_Georgeann_2017-12-30T04:54:39.000025 | 1,514,609,679.000025 | 106,237 |
pythondev | help | New question, how does everyone here use pytest for REST apis?
I ask because I have things such as test_update_user that needs me to
- Setup a test user in the database via `post(/api/user, data=new_user_data)`
- Perform test on user update via `put(/api/user/<username>, data=updated_user_data) `
- Teardown the... | 2017-12-30T13:57:08.000067 | Kayce | pythondev_help_Kayce_2017-12-30T13:57:08.000067 | 1,514,642,228.000067 | 106,238 |
pythondev | help | this might be overkill and I honestly haven't used it but I heard about this on pybyes podcast <https://taverntesting.github.io/> | 2017-12-30T15:05:30.000060 | Seema | pythondev_help_Seema_2017-12-30T15:05:30.000060 | 1,514,646,330.00006 | 106,239 |
pythondev | help | <https://pythonbytes.fm/episodes/show/52/call-your-apis-with-uplink-and-test-them-in-the-tavern> | 2017-12-30T15:05:43.000023 | Seema | pythondev_help_Seema_2017-12-30T15:05:43.000023 | 1,514,646,343.000023 | 106,240 |
pythondev | help | Hello. I'm new to python and am a bit puzzled about using virtualenv and was wondering what the current best practices are surrounding that, especially for beginners | 2017-12-30T23:07:03.000005 | Ute | pythondev_help_Ute_2017-12-30T23:07:03.000005 | 1,514,675,223.000005 | 106,241 |
pythondev | help | <@Sherley> I'm being a *bit* simplistic but the norm is virtualenv for everything. If you use more than one version of Python, it becomes very handy, especially when you start using the switches/options. | 2017-12-30T23:22:48.000067 | Seema | pythondev_help_Seema_2017-12-30T23:22:48.000067 | 1,514,676,168.000067 | 106,242 |
pythondev | help | <@Seema> has virtualenv been phased out in favor of docker? | 2017-12-30T23:24:35.000002 | Ute | pythondev_help_Ute_2017-12-30T23:24:35.000002 | 1,514,676,275.000002 | 106,243 |
pythondev | help | <@Sherley> I'd say start with `pipenv`. It has its quirks, but for an end-user it works better than just plain virtualenv | 2017-12-30T23:25:00.000017 | Collette | pythondev_help_Collette_2017-12-30T23:25:00.000017 | 1,514,676,300.000017 | 106,244 |
pythondev | help | Or is it still accepted to use virtualenv | 2017-12-30T23:25:01.000004 | Ute | pythondev_help_Ute_2017-12-30T23:25:01.000004 | 1,514,676,301.000004 | 106,245 |
pythondev | help | docker is a whole different story | 2017-12-30T23:25:10.000051 | Collette | pythondev_help_Collette_2017-12-30T23:25:10.000051 | 1,514,676,310.000051 | 106,246 |
pythondev | help | Depending on your philosophy and desires, you can use both together or just a virtualenv. They are not the same though can accomplish similar tasks | 2017-12-30T23:25:47.000039 | Seema | pythondev_help_Seema_2017-12-30T23:25:47.000039 | 1,514,676,347.000039 | 106,247 |
pythondev | help | From what I understand, the point of virtualenv is to keep each project and its dependencies isolated | 2017-12-30T23:25:56.000030 | Ute | pythondev_help_Ute_2017-12-30T23:25:56.000030 | 1,514,676,356.00003 | 106,248 |
pythondev | help | Which incidentally also coincides with my understanding of docker's purpose.. Or at least its central one | 2017-12-30T23:26:30.000073 | Ute | pythondev_help_Ute_2017-12-30T23:26:30.000073 | 1,514,676,390.000073 | 106,249 |
pythondev | help | Docker creates composable environments while virtualenv creates a virtual environment, installing to a virtualenv is isolated from the system but available after deactivation. Docker images are created, calling the same image next time will create the original environment | 2017-12-30T23:30:23.000062 | Seema | pythondev_help_Seema_2017-12-30T23:30:23.000062 | 1,514,676,623.000062 | 106,250 |
pythondev | help | There are other advantages and disadvantages. Are you developing for yourself? | 2017-12-30T23:30:59.000068 | Seema | pythondev_help_Seema_2017-12-30T23:30:59.000068 | 1,514,676,659.000068 | 106,251 |
pythondev | help | The pros often come down to how you want to manage dependencies, system files, and whether you are sharing the environment. Virtualenv really does take care of the majority of the issues in a simpler fashion | 2017-12-30T23:34:37.000035 | Seema | pythondev_help_Seema_2017-12-30T23:34:37.000035 | 1,514,676,877.000035 | 106,252 |
pythondev | help | <https://stackoverflow.com/questions/41573587/what-is-the-difference-between-venv-pyvenv-pyenv-virtualenv-virtualenvwrappe> | 2017-12-30T23:38:15.000039 | Seema | pythondev_help_Seema_2017-12-30T23:38:15.000039 | 1,514,677,095.000039 | 106,253 |
pythondev | help | <@Seema> The project that I was interested in is an open source project I found on GitHub | 2017-12-30T23:48:33.000027 | Ute | pythondev_help_Ute_2017-12-30T23:48:33.000027 | 1,514,677,713.000027 | 106,254 |
pythondev | help | The project will typically have a lead either by including a docker file or a requirements. Txt or possibly even both | 2017-12-30T23:49:38.000045 | Seema | pythondev_help_Seema_2017-12-30T23:49:38.000045 | 1,514,677,778.000045 | 106,255 |
pythondev | help | I would follow the project in that case, ymmv | 2017-12-30T23:50:25.000015 | Seema | pythondev_help_Seema_2017-12-30T23:50:25.000015 | 1,514,677,825.000015 | 106,256 |
pythondev | help | Ok. It recommends virtualenv but is missing explicit directions on how to use it in the readme, <http://GitHub.com/hackforla/adopt-civic-art|GitHub.com/hackforla/adopt-civic-art> | 2017-12-30T23:54:42.000007 | Ute | pythondev_help_Ute_2017-12-30T23:54:42.000007 | 1,514,678,082.000007 | 106,257 |
pythondev | help | Like Malinoff said, you can use other virtualenv, either way, you'll create an environment, clone the repo, then pip install -r requirements.txt | 2017-12-31T00:00:55.000009 | Seema | pythondev_help_Seema_2017-12-31T00:00:55.000009 | 1,514,678,455.000009 | 106,258 |
pythondev | help | Like Malinoff said, you can use other virtualenv, either way, you'll create an environment, clone the repo, then pip install -r requirements.txt | 2017-12-31T00:00:55.000009 | Monroe | pythondev_help_Monroe_2017-12-31T00:00:55.000009 | 1,514,678,455.000009 | 27,383 |
pythondev | help | The command will change depending on the program of course | 2017-12-31T00:01:18.000021 | Seema | pythondev_help_Seema_2017-12-31T00:01:18.000021 | 1,514,678,478.000021 | 106,259 |
pythondev | help | The command will change depending on the program of course | 2017-12-31T00:01:18.000021 | Monroe | pythondev_help_Monroe_2017-12-31T00:01:18.000021 | 1,514,678,478.000021 | 27,384 |
pythondev | help | (Off for the night, gn, good luck) | 2017-12-31T00:02:05.000022 | Seema | pythondev_help_Seema_2017-12-31T00:02:05.000022 | 1,514,678,525.000022 | 106,260 |
pythondev | help | (Off for the night, gn, good luck) | 2017-12-31T00:02:05.000022 | Monroe | pythondev_help_Monroe_2017-12-31T00:02:05.000022 | 1,514,678,525.000022 | 27,385 |
pythondev | help | Thanks | 2017-12-31T00:55:26.000040 | Rebecca | pythondev_help_Rebecca_2017-12-31T00:55:26.000040 | 1,514,681,726.00004 | 27,386 |
pythondev | help | Thanks | 2017-12-31T00:55:26.000040 | Ute | pythondev_help_Ute_2017-12-31T00:55:26.000040 | 1,514,681,726.00004 | 106,261 |
pythondev | help | In python list extend method,I saw that when we give "manoj" ,it is storing in the list as 'm','a','n','o',j' I can understand the difference between this behaviour and the behaviour in list append
| 2017-12-31T08:21:48.000049 | Hobert | pythondev_help_Hobert_2017-12-31T08:21:48.000049 | 1,514,708,508.000049 | 27,387 |
pythondev | help | My question in append and extend we are inserting single value,but in extend the single value inputs is passed as multiple single values,concept wise I am ok,what is the use case of doing like this in extend method ,can someone explain? | 2017-12-31T08:24:17.000013 | Hobert | pythondev_help_Hobert_2017-12-31T08:24:17.000013 | 1,514,708,657.000013 | 27,388 |
pythondev | help | a string is an iterable object | 2017-12-31T08:45:40.000073 | Floy | pythondev_help_Floy_2017-12-31T08:45:40.000073 | 1,514,709,940.000073 | 27,389 |
pythondev | help | so when you pass it in via extends, it doesn’t add it wholesale | 2017-12-31T08:45:53.000038 | Floy | pythondev_help_Floy_2017-12-31T08:45:53.000038 | 1,514,709,953.000038 | 27,390 |
pythondev | help | extends iterates over the passed in iterable and adds each index of that iterable to the original list | 2017-12-31T08:46:25.000001 | Floy | pythondev_help_Floy_2017-12-31T08:46:25.000001 | 1,514,709,985.000001 | 27,391 |
pythondev | help | append just adds the new object to the list | 2017-12-31T08:47:06.000036 | Floy | pythondev_help_Floy_2017-12-31T08:47:06.000036 | 1,514,710,026.000036 | 27,392 |
pythondev | help | I don't, but I don't know if I count for an experienced Python dev. :slightly_smiling_face: I'm an very experienced dev who uses Python. For my own hacking around, I tend to just install whatever dependencies I need globally using either Pip or conda -- but if I were on a non-trivial shared project I'd rethink that. | 2017-12-31T15:53:07.000074 | Kendall | pythondev_help_Kendall_2017-12-31T15:53:07.000074 | 1,514,735,587.000074 | 27,393 |
pythondev | help | I'm working on a project that uses NamedTuple to interact with different parts. IS it better to use this data structure or dictionaries within python | 2017-12-31T16:16:03.000034 | Emmett | pythondev_help_Emmett_2017-12-31T16:16:03.000034 | 1,514,736,963.000034 | 27,394 |
pythondev | help | Depends on your preferences for structure mutability | 2017-12-31T16:20:41.000042 | Floy | pythondev_help_Floy_2017-12-31T16:20:41.000042 | 1,514,737,241.000042 | 27,395 |
pythondev | help | I think I'm more concerned about organization now. | 2017-12-31T16:26:30.000046 | Emmett | pythondev_help_Emmett_2017-12-31T16:26:30.000046 | 1,514,737,590.000046 | 27,396 |
pythondev | help | It's preprocessed data- that is being used to signal events between the modules. | 2017-12-31T16:26:49.000015 | Emmett | pythondev_help_Emmett_2017-12-31T16:26:49.000015 | 1,514,737,609.000015 | 27,397 |
pythondev | help | ``` if event and json_data[event]['type'] in route_dict.keys():
class_route = route_dict.get(json_data[event]['type'])
class_route(event_dict=json_data)
# verify we have callback_id response and have handler for it
if callback_id and json_data[callback_id] in route_dict.keys():
route_d... | 2017-12-31T18:27:24.000007 | Emmett | pythondev_help_Emmett_2017-12-31T18:27:24.000007 | 1,514,744,844.000007 | 27,398 |
pythondev | help | I was reading about not checking dict keys and catching the exception. | 2017-12-31T18:27:43.000043 | Emmett | pythondev_help_Emmett_2017-12-31T18:27:43.000043 | 1,514,744,863.000043 | 27,399 |
pythondev | help | Is this a good way of converting it to be like that? | 2017-12-31T18:27:52.000009 | Emmett | pythondev_help_Emmett_2017-12-31T18:27:52.000009 | 1,514,744,872.000009 | 27,400 |
pythondev | help | I was reading also about using `dict.get(key, default)` | 2017-12-31T18:32:28.000042 | Emmett | pythondev_help_Emmett_2017-12-31T18:32:28.000042 | 1,514,745,148.000042 | 27,401 |
pythondev | help | I'm hoping someone could point me in the right direction, please. I'm trying to run a project someone else built but i'm getting the following error: "ImportError: No module named lib.manager". My googling efforts are coming up short. Can anyone tell me which package/module provides this library, please? | 2017-12-31T21:15:50.000025 | Nerissa | pythondev_help_Nerissa_2017-12-31T21:15:50.000025 | 1,514,754,950.000025 | 27,402 |
pythondev | help | I've gone through their documentation to install the dependencies they've listed but the docs seem to have missed something/made an assumption. | 2017-12-31T21:16:36.000001 | Nerissa | pythondev_help_Nerissa_2017-12-31T21:16:36.000001 | 1,514,754,996.000001 | 27,403 |
pythondev | help | Does the folder lib and the file manager.py exist in the folder you are running it from? Make sure the downloaded package is available in your Python path | 2017-12-31T21:37:28.000038 | Maryalice | pythondev_help_Maryalice_2017-12-31T21:37:28.000038 | 1,514,756,248.000038 | 27,404 |
pythondev | help | That's the thing, i'm not sure what package i'm missing. I'm trying to run this z-wave emulator: <https://github.com/Nico0084/py-zwave-emulator> and i've followed the install_repo.txt file listing dependencies. I'm doing this on a fresh Ubuntu 16 in aws. | 2017-12-31T21:45:55.000005 | Nerissa | pythondev_help_Nerissa_2017-12-31T21:45:55.000005 | 1,514,756,755.000005 | 27,405 |
pythondev | help | The lib and manager.py do exist. | 2017-12-31T21:46:01.000024 | Nerissa | pythondev_help_Nerissa_2017-12-31T21:46:01.000024 | 1,514,756,761.000024 | 27,406 |
pythondev | help | I don't do much python so I figure i'm missing something very basic that seasoned folk just always have installed. | 2017-12-31T21:49:38.000039 | Nerissa | pythondev_help_Nerissa_2017-12-31T21:49:38.000039 | 1,514,756,978.000039 | 27,407 |
pythondev | help | looks like | 2017-12-31T21:51:06.000001 | Emmett | pythondev_help_Emmett_2017-12-31T21:51:06.000001 | 1,514,757,066.000001 | 27,408 |
pythondev | help | it's inside of `lib/Singleton` | 2017-12-31T21:51:14.000082 | Emmett | pythondev_help_Emmett_2017-12-31T21:51:14.000082 | 1,514,757,074.000082 | 27,409 |
pythondev | help | <https://github.com/Nico0084/py-zwave-emulator/blob/master/lib/singleton.py#L14> | 2017-12-31T21:53:04.000013 | Emmett | pythondev_help_Emmett_2017-12-31T21:53:04.000013 | 1,514,757,184.000013 | 27,410 |
pythondev | help | <@Floy> so if we use append,it will always add a element as a single element,in extend it will split the single element into multiple elements and extend the list | 2017-12-31T22:59:47.000022 | Hobert | pythondev_help_Hobert_2017-12-31T22:59:47.000022 | 1,514,761,187.000022 | 27,411 |
pythondev | help | Am I right ? | 2017-12-31T23:00:01.000013 | Hobert | pythondev_help_Hobert_2017-12-31T23:00:01.000013 | 1,514,761,201.000013 | 27,412 |
pythondev | help | <@Hobert> `extend` only works with an iterable, whereas `append` works with everything | 2018-01-01T08:28:17.000017 | Floy | pythondev_help_Floy_2018-01-01T08:28:17.000017 | 1,514,795,297.000017 | 27,413 |
pythondev | help | other than that, you’re on the right track | 2018-01-01T08:28:28.000023 | Floy | pythondev_help_Floy_2018-01-01T08:28:28.000023 | 1,514,795,308.000023 | 27,414 |
pythondev | help | Thank you mate :grin: | 2018-01-01T08:31:13.000028 | Hobert | pythondev_help_Hobert_2018-01-01T08:31:13.000028 | 1,514,795,473.000028 | 27,415 |
pythondev | help | Hi guys, happy new year everybody! I’m trying to print out to the console only 10 URLs from the long ‘loc’ list -what am i doing wrong? :sparkles:
`for url in soup.find_all('loc'):`
` for x in range(1, 10):`
` print(url.text)`
` x += 1` | 2018-01-01T11:29:31.000023 | Kylie | pythondev_help_Kylie_2018-01-01T11:29:31.000023 | 1,514,806,171.000023 | 27,416 |
pythondev | help | I assume it’s printing out each url ten times? | 2018-01-01T11:31:07.000083 | Zack | pythondev_help_Zack_2018-01-01T11:31:07.000083 | 1,514,806,267.000083 | 27,417 |
pythondev | help | yeap | 2018-01-01T11:31:28.000055 | Kylie | pythondev_help_Kylie_2018-01-01T11:31:28.000055 | 1,514,806,288.000055 | 27,418 |
pythondev | help | well, actually, no, your `x += 1` kinda borks that as well | 2018-01-01T11:31:29.000123 | Zack | pythondev_help_Zack_2018-01-01T11:31:29.000123 | 1,514,806,289.000123 | 27,419 |
pythondev | help | so try this instead:
```
for url in soup.find_all('loc')[:10]:
print(url.text)
``` | 2018-01-01T11:32:08.000020 | Zack | pythondev_help_Zack_2018-01-01T11:32:08.000020 | 1,514,806,328.00002 | 27,420 |
pythondev | help | thnx <@Zack> | 2018-01-01T11:33:50.000017 | Kylie | pythondev_help_Kylie_2018-01-01T11:33:50.000017 | 1,514,806,430.000017 | 27,421 |
pythondev | help | did it work? | 2018-01-01T11:33:54.000009 | Zack | pythondev_help_Zack_2018-01-01T11:33:54.000009 | 1,514,806,434.000009 | 27,422 |
pythondev | help | yeap | 2018-01-01T11:33:57.000007 | Kylie | pythondev_help_Kylie_2018-01-01T11:33:57.000007 | 1,514,806,437.000007 | 27,423 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.