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
|
Interesting, is weird as when I go check the website or paste the link it works.
|
2019-05-31T12:51:44.254700
|
Arturo
|
pythondev_help_Arturo_2019-05-31T12:51:44.254700
| 1,559,307,104.2547 | 26,121 |
pythondev
|
help
|
Hahaha ok will check it out
|
2019-05-31T12:52:03.254900
|
Arturo
|
pythondev_help_Arturo_2019-05-31T12:52:03.254900
| 1,559,307,123.2549 | 26,122 |
pythondev
|
help
|
What's the proper way to log to a file in a cronjob? I was using print statements then switched to logging but they don't seem to be doing anything. I have my loop with a `tqdm` counter then at each loop I do:
```
<http://logging.info|logging.info>(
datetime.strftime(start_date, '%m-%d-%Y') + ' ' +
datetime.strftime(end_date, '%m-%d-%Y')
)
```
|
2019-05-31T12:58:17.256200
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T12:58:17.256200
| 1,559,307,497.2562 | 26,123 |
pythondev
|
help
|
Those aren't being logged for some reason
|
2019-05-31T12:58:26.256500
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T12:58:26.256500
| 1,559,307,506.2565 | 26,124 |
pythondev
|
help
|
`logging` is the name of the module
|
2019-05-31T12:58:43.256800
|
Hiroko
|
pythondev_help_Hiroko_2019-05-31T12:58:43.256800
| 1,559,307,523.2568 | 26,125 |
pythondev
|
help
|
do you have something like `log = logging.getLogger(__name__)` in the file?
|
2019-05-31T12:59:02.257300
|
Hiroko
|
pythondev_help_Hiroko_2019-05-31T12:59:02.257300
| 1,559,307,542.2573 | 26,126 |
pythondev
|
help
|
I don't, but I have this config that I call every time
|
2019-05-31T12:59:28.257600
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T12:59:28.257600
| 1,559,307,568.2576 | 26,127 |
pythondev
|
help
|
```
def print_to_console_logging_settings():
return logging.basicConfig(
level=<http://logging.INFO|logging.INFO>,
format='%(asctime)s: %(message)s',
datefmt='%m/%d/%Y %H:%M:%S'
)
```
|
2019-05-31T12:59:33.257800
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T12:59:33.257800
| 1,559,307,573.2578 | 26,128 |
pythondev
|
help
|
then there might be somethign malformed as far as whitespace/encoding with your original link that is stripped out when copying
|
2019-05-31T12:59:45.258100
|
Hiroko
|
pythondev_help_Hiroko_2019-05-31T12:59:45.258100
| 1,559,307,585.2581 | 26,129 |
pythondev
|
help
|
that was working without your logging initializer (although that was in the docs) - do I need it?
|
2019-05-31T13:00:05.258600
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:00:05.258600
| 1,559,307,605.2586 | 26,130 |
pythondev
|
help
|
it works locally (windows) but not on the server
|
2019-05-31T13:00:20.258900
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:00:20.258900
| 1,559,307,620.2589 | 26,131 |
pythondev
|
help
|
for some reason my Pyldavis only shows half the visual, anyone know why?
|
2019-05-31T13:02:30.259000
|
Nola
|
pythondev_help_Nola_2019-05-31T13:02:30.259000
| 1,559,307,750.259 | 26,132 |
pythondev
|
help
|
whoa speaking of `logging` im currently killing time reading this bad larry: <https://realpython.com/python-logging-source-code/>
|
2019-05-31T13:04:17.259600
|
Claudine
|
pythondev_help_Claudine_2019-05-31T13:04:17.259600
| 1,559,307,857.2596 | 26,133 |
pythondev
|
help
|
Cool thanks <@Hiroko> :taco:
|
2019-05-31T13:09:06.259800
|
Arturo
|
pythondev_help_Arturo_2019-05-31T13:09:06.259800
| 1,559,308,146.2598 | 26,134 |
pythondev
|
help
|
anyone seen this before
|
2019-05-31T13:14:40.260400
|
Nola
|
pythondev_help_Nola_2019-05-31T13:14:40.260400
| 1,559,308,480.2604 | 26,135 |
pythondev
|
help
|
Hi There
|
2019-05-31T13:32:26.261000
|
Sau
|
pythondev_help_Sau_2019-05-31T13:32:26.261000
| 1,559,309,546.261 | 26,136 |
pythondev
|
help
|
Can someone please explain for me why I am creating the 2 dimensional array, but then when I added one single element to the parituclar spot in the array, it then does the opposite. it adds to all spots in the array
|
2019-05-31T13:33:36.262500
|
Sau
|
pythondev_help_Sau_2019-05-31T13:33:36.262500
| 1,559,309,616.2625 | 26,137 |
pythondev
|
help
|
None
|
2019-05-31T13:33:41.262600
|
Sau
|
pythondev_help_Sau_2019-05-31T13:33:41.262600
| 1,559,309,621.2626 | 26,138 |
pythondev
|
help
|
When I run the code, I got this
|
2019-05-31T13:33:49.263100
|
Sau
|
pythondev_help_Sau_2019-05-31T13:33:49.263100
| 1,559,309,629.2631 | 26,139 |
pythondev
|
help
|
[[u'5'], [u'5'], [u'5'], [u'5'], [u'5'], [u'5'], [u'5'], [u'5'], [u'5']]
|
2019-05-31T13:33:49.263300
|
Sau
|
pythondev_help_Sau_2019-05-31T13:33:49.263300
| 1,559,309,629.2633 | 26,140 |
pythondev
|
help
|
which does not make any sense. The ‘5’ should only be added to the first array of the 2 dimension array
|
2019-05-31T13:34:31.264200
|
Sau
|
pythondev_help_Sau_2019-05-31T13:34:31.264200
| 1,559,309,671.2642 | 26,141 |
pythondev
|
help
|
Any help is so much appriciated
|
2019-05-31T13:34:38.264500
|
Sau
|
pythondev_help_Sau_2019-05-31T13:34:38.264500
| 1,559,309,678.2645 | 26,142 |
pythondev
|
help
|
i don't think you can initialize multiple objects with `arr = [[]]*9` as that makes them all the same array
|
2019-05-31T13:35:30.264900
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:35:30.264900
| 1,559,309,730.2649 | 26,143 |
pythondev
|
help
|
<@Maricruz> I am trying to make 9 subarray in one array
|
2019-05-31T13:36:03.265800
|
Sau
|
pythondev_help_Sau_2019-05-31T13:36:03.265800
| 1,559,309,763.2658 | 26,144 |
pythondev
|
help
|
is that a valid thing to do ?
|
2019-05-31T13:36:09.266200
|
Sau
|
pythondev_help_Sau_2019-05-31T13:36:09.266200
| 1,559,309,769.2662 | 26,145 |
pythondev
|
help
|
I would use NumPy for something like this.
|
2019-05-31T13:36:38.266800
|
Fawn
|
pythondev_help_Fawn_2019-05-31T13:36:38.266800
| 1,559,309,798.2668 | 26,146 |
pythondev
|
help
|
think you gotta do something like:
```
arr = []
for i in range(1,10):
arr.append([])
```
|
2019-05-31T13:36:50.267100
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:36:50.267100
| 1,559,309,810.2671 | 26,147 |
pythondev
|
help
|
<@Maricruz> Fantastic
|
2019-05-31T13:37:42.267500
|
Sau
|
pythondev_help_Sau_2019-05-31T13:37:42.267500
| 1,559,309,862.2675 | 26,148 |
pythondev
|
help
|
Thank you.
|
2019-05-31T13:37:53.268000
|
Sau
|
pythondev_help_Sau_2019-05-31T13:37:53.268000
| 1,559,309,873.268 | 26,149 |
pythondev
|
help
|
but why `arr = [[]]*9`
|
2019-05-31T13:38:03.268400
|
Sau
|
pythondev_help_Sau_2019-05-31T13:38:03.268400
| 1,559,309,883.2684 | 26,150 |
pythondev
|
help
|
does not work ?
|
2019-05-31T13:38:07.268600
|
Sau
|
pythondev_help_Sau_2019-05-31T13:38:07.268600
| 1,559,309,887.2686 | 26,151 |
pythondev
|
help
|
check this out
|
2019-05-31T13:40:01.268900
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:40:01.268900
| 1,559,310,001.2689 | 26,152 |
pythondev
|
help
|
<https://stackoverflow.com/a/2402653/6317183>
|
2019-05-31T13:40:01.269100
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:40:01.269100
| 1,559,310,001.2691 | 26,153 |
pythondev
|
help
|
i've been bitten by what you're doing a bunch in the past haha
|
2019-05-31T13:40:09.269500
|
Maricruz
|
pythondev_help_Maricruz_2019-05-31T13:40:09.269500
| 1,559,310,009.2695 | 26,154 |
pythondev
|
help
|
Anyone know how to return a custom error message with a 40x status code in Flask? I've tried regular make_response with text, aborts, jsonifys and i can't get it to return a response body EVER
|
2019-05-31T14:18:56.270900
|
Joaquina
|
pythondev_help_Joaquina_2019-05-31T14:18:56.270900
| 1,559,312,336.2709 | 26,155 |
pythondev
|
help
|
```def etresponse2(e = '', statuscode = 404, headers = None):
resp = jsonify({'error': e})
resp.status_code = statuscode
# return resp
return abort(statuscode, message=e)```
|
2019-05-31T14:19:19.271400
|
Joaquina
|
pythondev_help_Joaquina_2019-05-31T14:19:19.271400
| 1,559,312,359.2714 | 26,156 |
pythondev
|
help
|
<http://flask.pocoo.org/docs/1.0/patterns/apierrors/>
|
2019-05-31T14:21:12.271900
|
Hiroko
|
pythondev_help_Hiroko_2019-05-31T14:21:12.271900
| 1,559,312,472.2719 | 26,157 |
pythondev
|
help
|
You guys need more information to help me with this? :disappointed:
|
2019-05-31T14:26:43.272100
|
Dennise
|
pythondev_help_Dennise_2019-05-31T14:26:43.272100
| 1,559,312,803.2721 | 26,158 |
pythondev
|
help
|
I think it's some sort of weird interaction between twisted-python and werkzeug exceptions.. ugh
|
2019-05-31T14:28:03.272700
|
Joaquina
|
pythondev_help_Joaquina_2019-05-31T14:28:03.272700
| 1,559,312,883.2727 | 26,159 |
pythondev
|
help
|
<@Dennise> are you saying you want something to run immediately upon installing via `pip`? or that you want your package to provide a command that can be run from the CLI (much like installing `pytest` lets me run the `pytest` command)?
|
2019-05-31T14:41:10.274200
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:41:10.274200
| 1,559,313,670.2742 | 26,160 |
pythondev
|
help
|
Yes <@Ashley>, provide a command that can be run from the CLI
|
2019-05-31T14:49:20.275100
|
Dennise
|
pythondev_help_Dennise_2019-05-31T14:49:20.275100
| 1,559,314,160.2751 | 26,161 |
pythondev
|
help
|
what does your setup.py look like?
|
2019-05-31T14:51:13.275400
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:51:13.275400
| 1,559,314,273.2754 | 26,162 |
pythondev
|
help
|
I have a setup.cfg and look like this <@Ashley>
|
2019-05-31T14:54:19.275800
|
Dennise
|
pythondev_help_Dennise_2019-05-31T14:54:19.275800
| 1,559,314,459.2758 | 26,163 |
pythondev
|
help
|
but what about your setup.py?
|
2019-05-31T14:54:29.276200
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:54:29.276200
| 1,559,314,469.2762 | 26,164 |
pythondev
|
help
|
my setup.py is just
```
from setuptools import setup
setup()
```
|
2019-05-31T14:56:01.276900
|
Dennise
|
pythondev_help_Dennise_2019-05-31T14:56:01.276900
| 1,559,314,561.2769 | 26,165 |
pythondev
|
help
|
the setup.cfg is basically default values for command line arguments provided when installing a package
|
2019-05-31T14:56:30.277400
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:56:30.277400
| 1,559,314,590.2774 | 26,166 |
pythondev
|
help
|
your setup.py is the only place you should worry about for now
|
2019-05-31T14:57:10.277800
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:57:10.277800
| 1,559,314,630.2778 | 26,167 |
pythondev
|
help
|
this should help you get your setup.py fixed up <https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html>
|
2019-05-31T14:57:37.278200
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:57:37.278200
| 1,559,314,657.2782 | 26,168 |
pythondev
|
help
|
to be clear, you should have nothing in your setup.cfg. Don't put things in it until you're certain that you can't do what you want in the setup.py
|
2019-05-31T14:59:27.279400
|
Ashley
|
pythondev_help_Ashley_2019-05-31T14:59:27.279400
| 1,559,314,767.2794 | 26,169 |
pythondev
|
help
|
ooh I see, thanks for the help <@Ashley> I will try that then
|
2019-05-31T15:00:38.279800
|
Dennise
|
pythondev_help_Dennise_2019-05-31T15:00:38.279800
| 1,559,314,838.2798 | 26,170 |
pythondev
|
help
|
:+1:
|
2019-05-31T15:00:48.280000
|
Ashley
|
pythondev_help_Ashley_2019-05-31T15:00:48.280000
| 1,559,314,848.28 | 26,171 |
pythondev
|
help
|
I am trying to copy file on a cisco switch with the following command from a terminal server
how to send password through "device.send_command('copy <scp://admin>...') command"
terminal server access required user pass. Username is admin and I can put it in the command (as you can see). My question is:
how can I send the password to it?
|
2019-05-31T15:26:27.280800
|
Gracie
|
pythondev_help_Gracie_2019-05-31T15:26:27.280800
| 1,559,316,387.2808 | 26,172 |
pythondev
|
help
|
If you have a question, please just ask it. Please do not ask for topic experts; do not DM or ping random users. We cannot begin to answer a question until we actually get a question.
<http://sol.gfxile.net/dontask.html|*Asking Questions*>
|
2019-05-31T15:26:50.281000
|
Leana
|
pythondev_help_Leana_2019-05-31T15:26:50.281000
| 1,559,316,410.281 | 26,173 |
pythondev
|
help
|
I am getting this error on a fresh brand spanken new python 3.7 venv. This is the first command after creating and activating the venv. Any ideas why? I mean the error is clear but I dont know why it would be a problem.
```
(ssot_python_37) vagrant@ubuntu-xenial:~/django-projects$ pip install --upgrade pip
Collecting pip
Using cached <https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl>
Installing collected packages: pip
Found existing installation: pip 19.0.3
Uninstalling pip-19.0.3:
Successfully uninstalled pip-19.0.3
Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '/home/vagrant/django-projects/ssot_python_37/lib/python3.7/site-packages/~ip/_internal'
```
|
2019-05-31T15:44:31.283800
|
Kit
|
pythondev_help_Kit_2019-05-31T15:44:31.283800
| 1,559,317,471.2838 | 26,174 |
pythondev
|
help
|
I used “python3.7 -m venv ssot_python_37” to create it
|
2019-05-31T15:45:47.284200
|
Kit
|
pythondev_help_Kit_2019-05-31T15:45:47.284200
| 1,559,317,547.2842 | 26,175 |
pythondev
|
help
|
after than pip was broken when I tried to use it Id get this
```
(ssot_python_37) vagrant@ubuntu-xenial:~/django-projects$ pip
Traceback (most recent call last):
File "/home/vagrant/django-projects/ssot_python_37/bin/pip3", line 6, in <module>
from pip._internal import main
ImportError: cannot import name 'main' from 'pip._internal' (unknown location)
```
|
2019-05-31T15:49:50.285000
|
Kit
|
pythondev_help_Kit_2019-05-31T15:49:50.285000
| 1,559,317,790.285 | 26,176 |
pythondev
|
help
|
I got around it by recreating the venv and not upgrading pip but Im still curious if anyone knows
|
2019-05-31T16:07:17.287500
|
Kit
|
pythondev_help_Kit_2019-05-31T16:07:17.287500
| 1,559,318,837.2875 | 26,177 |
pythondev
|
help
|
Hey everyone - has anyone here taken software engineering courses in person? I am looking for some hands on experience as I may potentially switch to a software engineering role - any in person classes or bootcamps?
|
2019-05-31T17:01:25.288700
|
Malik
|
pythondev_help_Malik_2019-05-31T17:01:25.288700
| 1,559,322,085.2887 | 26,178 |
pythondev
|
help
|
I teach at a bootcamp, so I have experience there, but may be biased :slightly_smiling_face:
|
2019-05-31T17:35:50.290400
|
Clint
|
pythondev_help_Clint_2019-05-31T17:35:50.290400
| 1,559,324,150.2904 | 26,179 |
pythondev
|
help
|
If anybody is interested in learning Flask/SQL/API's, I would love to have pair programming buddy!
|
2019-05-31T17:44:51.291500
|
Jennell
|
pythondev_help_Jennell_2019-05-31T17:44:51.291500
| 1,559,324,691.2915 | 26,180 |
pythondev
|
help
|
The current scenario is:
switch#copy <scp://[email protected]:/var/mnt/arash.dat> flash:/arash.dat
Password:
Sending file modes: C0775 537577577 arash.dat
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!…!!!!!!
537577577 bytes copied in 4231.660 secs (127037 bytes/sec)
And it is working fine when we run it manually and we can enter the password. But when we need to put the scp command in a script (python using netmiko), we need to remove any needs of entering data during the run and send all the requirements by the “copy scp” command.
How can I put the password value (like Password: in above lines) in the command?
|
2019-05-31T17:53:59.291700
|
Gracie
|
pythondev_help_Gracie_2019-05-31T17:53:59.291700
| 1,559,325,239.2917 | 26,181 |
pythondev
|
help
|
I have tried to improve it, does it work better now? Is this better reasoned? Is the logic of the code better?
|
2019-05-31T18:22:38.292200
|
Melia
|
pythondev_help_Melia_2019-05-31T18:22:38.292200
| 1,559,326,958.2922 | 26,182 |
pythondev
|
help
|
import random
class Robot(object):
def __init__(self):
self.name = None
self.reset()
def reset(self):
self.used_names = []
self.create_name()
while self.name == self.created_name and self.name not in self.used_names:
self.create_name()
self.name = self.created_name
self.used_names.append(self.name)
return self.name
def create_name(self):
alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
self.created_name = random.choice(alphabet) + random.choice(alphabet) + str(random.randrange(0,999,3))
return self.created_name
|
2019-05-31T18:22:47.292400
|
Melia
|
pythondev_help_Melia_2019-05-31T18:22:47.292400
| 1,559,326,967.2924 | 26,183 |
pythondev
|
help
|
I have a list of dictionaries around 100k dictionaries in one list. And I need to apply same operation on each dictionary. Whats the best way to write this? -- I'm thinking of two options - Multiprocessing(Not sure how to do that though)? Convert this dictionary in form of pandas dataframe and process the dataframe? or any other better idea?
|
2019-05-31T21:53:46.296000
|
Leanora
|
pythondev_help_Leanora_2019-05-31T21:53:46.296000
| 1,559,339,626.296 | 26,184 |
pythondev
|
help
|
I don’t know flask very well and I only know APIs from the outside, so I’d be interested in doing this with you if this project isa still underway.
|
2019-05-31T22:02:36.296100
|
Charisse
|
pythondev_help_Charisse_2019-05-31T22:02:36.296100
| 1,559,340,156.2961 | 26,185 |
pythondev
|
help
|
<@Leanora> why don't you use map or lambda functions?
|
2019-05-31T22:09:37.297000
|
Ignacia
|
pythondev_help_Ignacia_2019-05-31T22:09:37.297000
| 1,559,340,577.297 | 26,186 |
pythondev
|
help
|
I think, map is an anti-pattern right? - <https://docs.quantifiedcode.com/python-anti-patterns/readability/using_map_or_filter_where_list_comprehension_is_possible.html?highlight=map>
|
2019-05-31T22:10:26.297100
|
Leanora
|
pythondev_help_Leanora_2019-05-31T22:10:26.297100
| 1,559,340,626.2971 | 26,187 |
pythondev
|
help
|
If not map, you can still go with list comprehension
|
2019-05-31T22:28:14.297300
|
Ignacia
|
pythondev_help_Ignacia_2019-05-31T22:28:14.297300
| 1,559,341,694.2973 | 26,188 |
pythondev
|
help
|
List comprehension is slow.
|
2019-05-31T22:41:02.297500
|
Leanora
|
pythondev_help_Leanora_2019-05-31T22:41:02.297500
| 1,559,342,462.2975 | 26,189 |
pythondev
|
help
|
I haven't messed around with APIs too much yet, I'm really just getting going with learning Flask and sqlalchemy/postgresql. I would definitely be interested in teaming up and seeing what we can do. I'd much rather learn by putting 2 heads together.
|
2019-05-31T22:51:51.297700
|
Jennell
|
pythondev_help_Jennell_2019-05-31T22:51:51.297700
| 1,559,343,111.2977 | 26,190 |
pythondev
|
help
|
"Premature optimization is the root of all evil." Just do a loop, until you know that solution is too slow, and then you can measure what's slow about it and respond to that data.
|
2019-05-31T23:02:03.298800
|
Sasha
|
pythondev_help_Sasha_2019-05-31T23:02:03.298800
| 1,559,343,723.2988 | 26,191 |
pythondev
|
help
|
How did you get these 100k dictionaries?
|
2019-05-31T23:03:32.298900
|
Chester
|
pythondev_help_Chester_2019-05-31T23:03:32.298900
| 1,559,343,812.2989 | 26,192 |
pythondev
|
help
|
cool, when’s a good time? I’m on the west coast, but I can make time happen at various times except for early evening which tends to be dinner and family time
|
2019-05-31T23:09:23.299100
|
Charisse
|
pythondev_help_Charisse_2019-05-31T23:09:23.299100
| 1,559,344,163.2991 | 26,193 |
pythondev
|
help
|
why does this not work?
|
2019-05-31T23:39:24.299400
|
Javier
|
pythondev_help_Javier_2019-05-31T23:39:24.299400
| 1,559,345,964.2994 | 26,194 |
pythondev
|
help
|
```def get_locations(cells):
starting_positions = cells[:]
monster = random.sample(starting_positions,1)
starting_positions.remove(starting_positions.index(monster))
door = random.sample(starting_positions,1)
starting_positions.remove(starting_positions.index(door))
player = random.sample(starting_positions,1)
return monster, door, player```
|
2019-05-31T23:39:47.299700
|
Javier
|
pythondev_help_Javier_2019-05-31T23:39:47.299700
| 1,559,345,987.2997 | 26,195 |
pythondev
|
help
|
In what sense is it not working? Errors, wrong results?
|
2019-05-31T23:44:28.300100
|
Sasha
|
pythondev_help_Sasha_2019-05-31T23:44:28.300100
| 1,559,346,268.3001 | 26,196 |
pythondev
|
help
|
Oh, no, wait... `remove()` goes by value, not by index. You want either `del` or `pop()` for index deletion.
|
2019-05-31T23:47:53.301200
|
Sasha
|
pythondev_help_Sasha_2019-05-31T23:47:53.301200
| 1,559,346,473.3012 | 26,197 |
pythondev
|
help
|
I use del to delete it and it just told me that the value didn't exist
|
2019-05-31T23:48:40.301600
|
Javier
|
pythondev_help_Javier_2019-05-31T23:48:40.301600
| 1,559,346,520.3016 | 26,198 |
pythondev
|
help
|
same error with remove
|
2019-05-31T23:48:44.301800
|
Javier
|
pythondev_help_Javier_2019-05-31T23:48:44.301800
| 1,559,346,524.3018 | 26,199 |
pythondev
|
help
|
```line 8, in get_locations
starting_positions.remove(starting_positions.index(monster))
ValueError: [(3, 1)] is not in list```
|
2019-05-31T23:49:09.302100
|
Javier
|
pythondev_help_Javier_2019-05-31T23:49:09.302100
| 1,559,346,549.3021 | 26,200 |
pythondev
|
help
|
Ah, `sample()` returns a list, even for 1 element.
|
2019-05-31T23:49:34.302600
|
Sasha
|
pythondev_help_Sasha_2019-05-31T23:49:34.302600
| 1,559,346,574.3026 | 26,201 |
pythondev
|
help
|
oh
|
2019-05-31T23:49:46.302800
|
Javier
|
pythondev_help_Javier_2019-05-31T23:49:46.302800
| 1,559,346,586.3028 | 26,202 |
pythondev
|
help
|
thanks!
|
2019-05-31T23:49:48.303000
|
Javier
|
pythondev_help_Javier_2019-05-31T23:49:48.303000
| 1,559,346,588.303 | 26,203 |
pythondev
|
help
|
<@Sasha> :taco:
|
2019-05-31T23:49:56.303300
|
Javier
|
pythondev_help_Javier_2019-05-31T23:49:56.303300
| 1,559,346,596.3033 | 26,204 |
pythondev
|
help
|
You can use `choice()` instead for a single selection.
|
2019-05-31T23:50:03.303500
|
Sasha
|
pythondev_help_Sasha_2019-05-31T23:50:03.303500
| 1,559,346,603.3035 | 26,205 |
pythondev
|
help
|
Really good, but the logic on the while loop still doesn't look quite right. Hard to test as it will almost never get hit.
You probably want `while self.name == self.created_name or self.created_name in self.used_names`
|
2019-05-31T23:50:19.303800
|
Genesis
|
pythondev_help_Genesis_2019-05-31T23:50:19.303800
| 1,559,346,619.3038 | 26,206 |
pythondev
|
help
|
I just wanted to choose and delete. I ended up using unpacking
|
2019-05-31T23:50:21.304100
|
Javier
|
pythondev_help_Javier_2019-05-31T23:50:21.304100
| 1,559,346,621.3041 | 26,207 |
pythondev
|
help
|
<@Javier> If you want to pick values up randomly, you may even write this way :smile: :
```
def get_locations(cells):
monster, door, player = random.sample(cells, 3)
return monster, door, player
```
I'm glad if this code helps you.
|
2019-06-01T00:13:16.305300
|
Ike
|
pythondev_help_Ike_2019-06-01T00:13:16.305300
| 1,559,347,996.3053 | 26,208 |
pythondev
|
help
|
That's what I ended up doing thanks!
|
2019-06-01T00:13:32.305600
|
Javier
|
pythondev_help_Javier_2019-06-01T00:13:32.305600
| 1,559,348,012.3056 | 26,209 |
pythondev
|
help
|
I'm on the east coast, typically available from like 10am-8pm east coast time so that is your time from 7am-5pm? So any time in between that, where we can get a schedule set.
|
2019-06-01T00:29:20.305800
|
Jennell
|
pythondev_help_Jennell_2019-06-01T00:29:20.305800
| 1,559,348,960.3058 | 26,210 |
pythondev
|
help
|
Moved from <#C07F1KB2Q|advanced_python> <@Mirna>
|
2019-06-01T01:00:59.306300
|
Dayna
|
pythondev_help_Dayna_2019-06-01T01:00:59.306300
| 1,559,350,859.3063 | 26,211 |
pythondev
|
help
|
<@Mirna> what have you tried?
|
2019-06-01T01:04:13.306400
|
Chester
|
pythondev_help_Chester_2019-06-01T01:04:13.306400
| 1,559,351,053.3064 | 26,212 |
pythondev
|
help
|
Hrmm, let me think about that. Generally I try to keep afternoons free for learning, so maybe from 1pmish my time?
|
2019-06-01T01:06:40.306600
|
Charisse
|
pythondev_help_Charisse_2019-06-01T01:06:40.306600
| 1,559,351,200.3066 | 26,213 |
pythondev
|
help
|
I am going to merge two cav file and got results as an dictionary
|
2019-06-01T01:30:56.307000
|
Mirna
|
pythondev_help_Mirna_2019-06-01T01:30:56.307000
| 1,559,352,656.307 | 26,214 |
pythondev
|
help
|
I mean, what code have you tried to write? How it failed?
|
2019-06-01T01:44:06.307200
|
Chester
|
pythondev_help_Chester_2019-06-01T01:44:06.307200
| 1,559,353,446.3072 | 26,215 |
pythondev
|
help
|
Looks like the intern job application problem from: <https://clearcode.cc/careers/internships/python-intern/>
|
2019-06-01T01:53:52.307800
|
Sasha
|
pythondev_help_Sasha_2019-06-01T01:53:52.307800
| 1,559,354,032.3078 | 26,216 |
pythondev
|
help
|
In case u want use multi threading or multiprocessing, u can use inbuilt concurrent.features module
|
2019-06-01T02:05:01.308100
|
Ignacia
|
pythondev_help_Ignacia_2019-06-01T02:05:01.308100
| 1,559,354,701.3081 | 26,217 |
pythondev
|
help
|
Who would've thought
|
2019-06-01T03:51:57.309000
|
Nigel
|
pythondev_help_Nigel_2019-06-01T03:51:57.309000
| 1,559,361,117.309 | 26,218 |
pythondev
|
help
|
> Apply by: June 3, 2019
Heh
|
2019-06-01T03:53:17.309200
|
Chester
|
pythondev_help_Chester_2019-06-01T03:53:17.309200
| 1,559,361,197.3092 | 26,219 |
pythondev
|
help
|
so I guess he was looking for someone to do his problem for him
|
2019-06-01T03:56:56.309700
|
Conrad
|
pythondev_help_Conrad_2019-06-01T03:56:56.309700
| 1,559,361,416.3097 | 26,220 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.