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 | <@Reina>
> like if i give 90 and then it will be compare 90 > i so it will append 90 in list
No. The first if will prohibit this and tell you that you must enter a number from the list. | 2017-07-14T01:19:14.669377 | Deedee | pythondev_help_Deedee_2017-07-14T01:19:14.669377 | 1,499,995,154.669377 | 85,203 |
pythondev | help | now i got it | 2017-07-14T01:20:47.684275 | Reina | pythondev_help_Reina_2017-07-14T01:20:47.684275 | 1,499,995,247.684275 | 85,204 |
pythondev | help | Thanks | 2017-07-14T01:20:49.684485 | Reina | pythondev_help_Reina_2017-07-14T01:20:49.684485 | 1,499,995,249.684485 | 85,205 |
pythondev | help | yep | 2017-07-14T01:20:53.685221 | Deedee | pythondev_help_Deedee_2017-07-14T01:20:53.685221 | 1,499,995,253.685221 | 85,206 |
pythondev | help | :+1: | 2017-07-14T01:20:59.686100 | Deedee | pythondev_help_Deedee_2017-07-14T01:20:59.686100 | 1,499,995,259.6861 | 85,207 |
pythondev | help | <@Deedee> oh no, replying to someone else, but was also reading your comment. | 2017-07-14T01:30:42.777758 | Graham | pythondev_help_Graham_2017-07-14T01:30:42.777758 | 1,499,995,842.777758 | 85,208 |
pythondev | help | if you’re using django why not use DRF? | 2017-07-14T01:42:53.893860 | Johana | pythondev_help_Johana_2017-07-14T01:42:53.893860 | 1,499,996,573.89386 | 85,209 |
pythondev | help | I got it install, thats how am getting the records to angular, but its the POST request i haven't grasp with it has yet | 2017-07-14T01:45:41.920867 | Graham | pythondev_help_Graham_2017-07-14T01:45:41.920867 | 1,499,996,741.920867 | 85,210 |
pythondev | help | I use api_view decorator for post in function based views | 2017-07-14T01:46:22.927726 | Shelly | pythondev_help_Shelly_2017-07-14T01:46:22.927726 | 1,499,996,782.927726 | 85,211 |
pythondev | help | ill look into that | 2017-07-14T01:46:53.932511 | Graham | pythondev_help_Graham_2017-07-14T01:46:53.932511 | 1,499,996,813.932511 | 85,212 |
pythondev | help | now i want to understand this code and also want to make such program even more simple which i can understand
```
"""
Create a program that asks the user for a number
and then prints out a list of all the divisors of that number.
(If you don’t know what a divisor is,
it is a number that divides evenly into another number.
For example, 13 is a divisor of 26 because 26 / 13 has no remainder.)
"""
while True:
try:
n = int(input("Please choose a number to divide: "))
list = [d for d in range(1, n + 1) if n % d == 0]
print("The divisors of {} are: \n {}".format(n,list)) if len(list) > 2 \
else print(str(n) + " is a prime number")
except ValueError:
break
#print("Very funny smartass. Now give me a number.")
``` | 2017-07-14T02:02:10.089132 | Reina | pythondev_help_Reina_2017-07-14T02:02:10.089132 | 1,499,997,730.089132 | 85,213 |
pythondev | help | I would presume you'd want to use the range `(1, n)`, the round brackets mean non-inclusive, so if `n` is 5 you'd want to test the in the range `2,3,4`, versus what you have `[1,n]` which means inclusive, so the range `1,2,3,4,5`. | 2017-07-14T02:12:03.200078 | Carri | pythondev_help_Carri_2017-07-14T02:12:03.200078 | 1,499,998,323.200078 | 85,214 |
pythondev | help | As for simplifying it, it's already reasonably straight forward. Alternate approaches could be changing your `list = ` statement to `filter(lambda d: not n % d, range(2, n))`. | 2017-07-14T02:13:04.211864 | Carri | pythondev_help_Carri_2017-07-14T02:13:04.211864 | 1,499,998,384.211864 | 85,215 |
pythondev | help | You'd also want to check that the input is a positive number, you can use `abs(n)` to ensure it's absolute | 2017-07-14T02:14:15.225707 | Carri | pythondev_help_Carri_2017-07-14T02:14:15.225707 | 1,499,998,455.225707 | 85,216 |
pythondev | help | And as an aside, don't shadow builtins. `list` is a builtin, and you're shadowing over that name with your `list = ` assignment. | 2017-07-14T02:14:51.232152 | Carri | pythondev_help_Carri_2017-07-14T02:14:51.232152 | 1,499,998,491.232152 | 85,217 |
pythondev | help | prime number factorization? | 2017-07-14T02:19:07.279349 | Levi | pythondev_help_Levi_2017-07-14T02:19:07.279349 | 1,499,998,747.279349 | 85,218 |
pythondev | help | I would drop the try/except block with:
```
while True:
num = input("Please choose a number to divide: ")
while not num.isnumeric() or int(num) < 1:
# invalid input
num = input("Very funny smartass. Now give me a number.")
``` | 2017-07-14T03:58:51.762682 | Deedee | pythondev_help_Deedee_2017-07-14T03:58:51.762682 | 1,500,004,731.762682 | 85,219 |
pythondev | help | Whole thing maybe redone as:
```
num = input("Please choose a number to divide: ")
while not num.isnumeric() or int(num) < 1:
# invalid input
num = input("Very funny smartass. Now give me a number.")
my_list = [divisor for divisor in range(num) if num % divisor == 0]
print("The divisors of {} are: \n {}".format(num,my_list)) if len(my_list) > 2 \
else print(str(num) + " is a prime number")
``` | 2017-07-14T04:00:03.784990 | Deedee | pythondev_help_Deedee_2017-07-14T04:00:03.784990 | 1,500,004,803.78499 | 85,220 |
pythondev | help | Anyone up? | 2017-07-14T04:33:31.420526 | Chery | pythondev_help_Chery_2017-07-14T04:33:31.420526 | 1,500,006,811.420526 | 85,221 |
pythondev | help | Yup. | 2017-07-14T04:34:29.439409 | Shelly | pythondev_help_Shelly_2017-07-14T04:34:29.439409 | 1,500,006,869.439409 | 85,222 |
pythondev | help | Could you try to answer me a question please? | 2017-07-14T04:34:50.446082 | Chery | pythondev_help_Chery_2017-07-14T04:34:50.446082 | 1,500,006,890.446082 | 85,223 |
pythondev | help | Yes if it is related to python. | 2017-07-14T04:35:45.463718 | Shelly | pythondev_help_Shelly_2017-07-14T04:35:45.463718 | 1,500,006,945.463718 | 85,224 |
pythondev | help | <@Chery> <https://mikeash.com/getting_answers.html> | 2017-07-14T04:36:13.472500 | Collette | pythondev_help_Collette_2017-07-14T04:36:13.472500 | 1,500,006,973.4725 | 85,225 |
pythondev | help | I'm currently learning how to use modules and call other files. It's is possible to have a file named(main.py) and call another file(ship.py). And from ship.py execute a function in main.py Sorry if I'm not explaining clear enough. | 2017-07-14T04:36:28.477305 | Chery | pythondev_help_Chery_2017-07-14T04:36:28.477305 | 1,500,006,988.477305 | 85,226 |
pythondev | help | From the function main.py I want to execute some code of the file ship.py and also I want to do it the other way, from ship.py I want to execute functions of main.py | 2017-07-14T04:37:59.505601 | Chery | pythondev_help_Chery_2017-07-14T04:37:59.505601 | 1,500,007,079.505601 | 85,227 |
pythondev | help | <@Chery> this is called a 'circular import', and that's generally prohibited | 2017-07-14T04:39:07.527960 | Collette | pythondev_help_Collette_2017-07-14T04:39:07.527960 | 1,500,007,147.52796 | 85,228 |
pythondev | help | Oh | 2017-07-14T04:39:17.531194 | Chery | pythondev_help_Chery_2017-07-14T04:39:17.531194 | 1,500,007,157.531194 | 85,229 |
pythondev | help | `main.py` sounds like an entry point, why would you import something from it? | 2017-07-14T04:39:20.532298 | Collette | pythondev_help_Collette_2017-07-14T04:39:20.532298 | 1,500,007,160.532298 | 85,230 |
pythondev | help | I'll search about it | 2017-07-14T04:39:21.532778 | Chery | pythondev_help_Chery_2017-07-14T04:39:21.532778 | 1,500,007,161.532778 | 85,231 |
pythondev | help | ```
# main.py
import ship
ship.some_function()
# ship.py
import main
main.some_other_function()
``` | 2017-07-14T04:39:37.537730 | Carri | pythondev_help_Carri_2017-07-14T04:39:37.537730 | 1,500,007,177.53773 | 85,232 |
pythondev | help | Yeah malinoff, that was my idea, but at main.py I have a function to create a delay_print and I also want to use it at ship.py | 2017-07-14T04:40:25.554059 | Chery | pythondev_help_Chery_2017-07-14T04:40:25.554059 | 1,500,007,225.554059 | 85,233 |
pythondev | help | <@Carri> have you tried to run this snippet before posting? :slightly_smiling_face: | 2017-07-14T04:40:39.558505 | Collette | pythondev_help_Collette_2017-07-14T04:40:39.558505 | 1,500,007,239.558505 | 85,234 |
pythondev | help | as long as you don't do `from main import some_other_function` and `from ship import some_function` you won't have circular import issues. Although the import semantics have changed in Py3.x to help prevent circular imports | 2017-07-14T04:40:41.559166 | Carri | pythondev_help_Carri_2017-07-14T04:40:41.559166 | 1,500,007,241.559166 | 85,235 |
pythondev | help | <@Carri> Like this it gives me an error | 2017-07-14T04:40:48.561695 | Chery | pythondev_help_Chery_2017-07-14T04:40:48.561695 | 1,500,007,248.561695 | 85,236 |
pythondev | help | <@Chery> Restructuring your code would help | 2017-07-14T04:41:05.567030 | Shelly | pythondev_help_Shelly_2017-07-14T04:41:05.567030 | 1,500,007,265.56703 | 85,237 |
pythondev | help | <@Chery> then move `delay_print` into `ship.py` | 2017-07-14T04:41:15.570453 | Collette | pythondev_help_Collette_2017-07-14T04:41:15.570453 | 1,500,007,275.570453 | 85,238 |
pythondev | help | And do `from ship import delay_print` | 2017-07-14T04:41:37.577674 | Collette | pythondev_help_Collette_2017-07-14T04:41:37.577674 | 1,500,007,297.577674 | 85,239 |
pythondev | help | <@Collette> Yeah, that would work, and what about if I put this functions in another file and call them? | 2017-07-14T04:42:32.595372 | Chery | pythondev_help_Chery_2017-07-14T04:42:32.595372 | 1,500,007,352.595372 | 85,240 |
pythondev | help | <@Chery> you don't "call files" in python. You _import_ things from _modules_ and _packages_ | 2017-07-14T04:44:19.630018 | Collette | pythondev_help_Collette_2017-07-14T04:44:19.630018 | 1,500,007,459.630018 | 85,241 |
pythondev | help | <http://bit.ly/pypackages> | 2017-07-14T04:44:40.637204 | Collette | pythondev_help_Collette_2017-07-14T04:44:40.637204 | 1,500,007,480.637204 | 85,242 |
pythondev | help | Thanks to all, currently I'm a novice at Python and coding, and this is the first time I'm dividing my code in different files. | 2017-07-14T04:44:59.643475 | Chery | pythondev_help_Chery_2017-07-14T04:44:59.643475 | 1,500,007,499.643475 | 85,243 |
pythondev | help | <@Collette> oh, sorry. Thanks for everything :slightly_smiling_face: | 2017-07-14T04:45:49.660670 | Chery | pythondev_help_Chery_2017-07-14T04:45:49.660670 | 1,500,007,549.66067 | 85,244 |
pythondev | help | Just asked a Django related question in <#C0LMFRMB5|django> if anyone could help! :slightly_smiling_face: | 2017-07-14T10:49:26.804671 | Graciela | pythondev_help_Graciela_2017-07-14T10:49:26.804671 | 1,500,029,366.804671 | 85,245 |
pythondev | help | People there will see it, pointing it out isn't far off of cross posting. You only been to point it out if there's no action for a while | 2017-07-14T10:54:16.975840 | Beula | pythondev_help_Beula_2017-07-14T10:54:16.975840 | 1,500,029,656.97584 | 85,246 |
pythondev | help | Alright, thought i'd posted the wrong place, apologies <@Beula> | 2017-07-14T11:02:47.283579 | Graciela | pythondev_help_Graciela_2017-07-14T11:02:47.283579 | 1,500,030,167.283579 | 85,247 |
pythondev | help | It happens :) | 2017-07-14T11:03:01.292017 | Beula | pythondev_help_Beula_2017-07-14T11:03:01.292017 | 1,500,030,181.292017 | 85,248 |
pythondev | help | Is any one aware of some API or some other way(free) to retrive DHL's courier tracking details for multiple users (input = user's tracking number) ? | 2017-07-14T11:36:03.429115 | Logan | pythondev_help_Logan_2017-07-14T11:36:03.429115 | 1,500,032,163.429115 | 85,249 |
pythondev | help | no but i remember when i wrote a fedex client that was SOAP. you may need to checkout their web api and create your own. if they provide a swagger file you may be able to autogenerate a client but that might be a stretch, hehe. | 2017-07-14T12:07:49.515120 | Johana | pythondev_help_Johana_2017-07-14T12:07:49.515120 | 1,500,034,069.51512 | 85,250 |
pythondev | help | <@Johana> I think this is the link <http://www.dhl.com/en/parcel_ecommerce/integration/integration_channels/api.html> . But I haven't been able to figure out how to use it. I am working on chat bot using Microsoft's chat bot framework for DHL. | 2017-07-14T12:35:58.402495 | Logan | pythondev_help_Logan_2017-07-14T12:35:58.402495 | 1,500,035,758.402495 | 85,251 |
pythondev | help | yep that looks like it | 2017-07-14T12:36:30.419315 | Johana | pythondev_help_Johana_2017-07-14T12:36:30.419315 | 1,500,035,790.419315 | 85,252 |
pythondev | help | yea if you don’t already see a python-dhl or dhlpy type of project on pypi you will need to write your own but this is good news. you should be able to integrate with dhl nicely with python :wink: | 2017-07-14T12:37:27.449130 | Johana | pythondev_help_Johana_2017-07-14T12:37:27.449130 | 1,500,035,847.44913 | 85,253 |
pythondev | help | we have lots of web apis at work so i’m always writing clients. their docs seem straightforward too. | 2017-07-14T12:38:18.475206 | Johana | pythondev_help_Johana_2017-07-14T12:38:18.475206 | 1,500,035,898.475206 | 85,254 |
pythondev | help | <https://pypi.python.org/pypi/dhl_shipping/2.0.4> | 2017-07-14T12:43:20.626837 | Logan | pythondev_help_Logan_2017-07-14T12:43:20.626837 | 1,500,036,200.626837 | 85,255 |
pythondev | help | Yeah, I haven't worked on similar project before, so there are quite few things I need to figure out before development. | 2017-07-14T12:45:01.677402 | Logan | pythondev_help_Logan_2017-07-14T12:45:01.677402 | 1,500,036,301.677402 | 85,256 |
pythondev | help | <@Shelly> | 2017-07-14T13:16:40.661332 | Kandis | pythondev_help_Kandis_2017-07-14T13:16:40.661332 | 1,500,038,200.661332 | 85,257 |
pythondev | help | <@Kandis> You got the gist? | 2017-07-14T13:17:04.673212 | Shelly | pythondev_help_Shelly_2017-07-14T13:17:04.673212 | 1,500,038,224.673212 | 85,258 |
pythondev | help | yeah i dont understand how this code decide on 6 | 2017-07-14T13:17:28.685996 | Kandis | pythondev_help_Kandis_2017-07-14T13:17:28.685996 | 1,500,038,248.685996 | 85,259 |
pythondev | help | why not 1? | 2017-07-14T13:17:36.689951 | Kandis | pythondev_help_Kandis_2017-07-14T13:17:36.689951 | 1,500,038,256.689951 | 85,260 |
pythondev | help | why does it only output one number | 2017-07-14T13:17:43.693432 | Kandis | pythondev_help_Kandis_2017-07-14T13:17:43.693432 | 1,500,038,263.693432 | 85,261 |
pythondev | help | Your function returns hcf, which is being overwritten everytime whenver hcf is set to i | 2017-07-14T13:18:32.717939 | Shelly | pythondev_help_Shelly_2017-07-14T13:18:32.717939 | 1,500,038,312.717939 | 85,262 |
pythondev | help | because hcf can hold only one number | 2017-07-14T13:18:36.719888 | Cleta | pythondev_help_Cleta_2017-07-14T13:18:36.719888 | 1,500,038,316.719888 | 85,263 |
pythondev | help | but hcf is a name that we give it | 2017-07-14T13:19:08.735905 | Kandis | pythondev_help_Kandis_2017-07-14T13:19:08.735905 | 1,500,038,348.735905 | 85,264 |
pythondev | help | yes. try making HCF a list | 2017-07-14T13:19:28.746198 | Cleta | pythondev_help_Cleta_2017-07-14T13:19:28.746198 | 1,500,038,368.746198 | 85,265 |
pythondev | help | In first loop hcf is 1, next it gets overwritten with 2, next 3, next 6, hcf variable will continue to hold 6 until the loop hits 24 | 2017-07-14T13:19:45.754700 | Shelly | pythondev_help_Shelly_2017-07-14T13:19:45.754700 | 1,500,038,385.7547 | 85,266 |
pythondev | help | it will give you all the numbers | 2017-07-14T13:19:46.755549 | Cleta | pythondev_help_Cleta_2017-07-14T13:19:46.755549 | 1,500,038,386.755549 | 85,267 |
pythondev | help | how? what do you mean | 2017-07-14T13:19:47.755596 | Kandis | pythondev_help_Kandis_2017-07-14T13:19:47.755596 | 1,500,038,387.755596 | 85,268 |
pythondev | help | oh! | 2017-07-14T13:20:16.769914 | Kandis | pythondev_help_Kandis_2017-07-14T13:20:16.769914 | 1,500,038,416.769914 | 85,269 |
pythondev | help | understood :hugging_face: | 2017-07-14T13:20:28.776981 | Kandis | pythondev_help_Kandis_2017-07-14T13:20:28.776981 | 1,500,038,428.776981 | 85,270 |
pythondev | help | :rose: i appreciate it | 2017-07-14T13:20:51.788390 | Kandis | pythondev_help_Kandis_2017-07-14T13:20:51.788390 | 1,500,038,451.78839 | 85,271 |
pythondev | help | We appreciate :taco: here | 2017-07-14T13:21:03.794427 | Shelly | pythondev_help_Shelly_2017-07-14T13:21:03.794427 | 1,500,038,463.794427 | 85,272 |
pythondev | help | just declare hcf=[] before the for loop | 2017-07-14T13:21:04.794802 | Cleta | pythondev_help_Cleta_2017-07-14T13:21:04.794802 | 1,500,038,464.794802 | 85,273 |
pythondev | help | haha interesting i am coincidently listening to spanish music now :taco: | 2017-07-14T13:23:30.869008 | Kandis | pythondev_help_Kandis_2017-07-14T13:23:30.869008 | 1,500,038,610.869008 | 85,274 |
pythondev | help | <@Shelly> :taco:+1000000 | 2017-07-14T13:24:05.887457 | Kandis | pythondev_help_Kandis_2017-07-14T13:24:05.887457 | 1,500,038,645.887457 | 85,275 |
pythondev | help | You would also need to do hcf.append(i), can't just assign to it if you want it to remain a list. | 2017-07-14T14:07:09.261946 | Meghan | pythondev_help_Meghan_2017-07-14T14:07:09.261946 | 1,500,041,229.261946 | 85,276 |
pythondev | help | spanish music is awesome. | 2017-07-14T14:16:52.565672 | Johana | pythondev_help_Johana_2017-07-14T14:16:52.565672 | 1,500,041,812.565672 | 85,277 |
pythondev | help | As in from Spain or in Spanish? The former, maybe. The latter, I think it depends. | 2017-07-14T14:19:22.645063 | Deedee | pythondev_help_Deedee_2017-07-14T14:19:22.645063 | 1,500,041,962.645063 | 85,278 |
pythondev | help | <@Johana> I'm from Spain, what singers are you talking about? | 2017-07-14T14:42:18.363701 | Chery | pythondev_help_Chery_2017-07-14T14:42:18.363701 | 1,500,043,338.363701 | 85,279 |
pythondev | help | latin america wherever. | 2017-07-14T14:42:42.375387 | Johana | pythondev_help_Johana_2017-07-14T14:42:42.375387 | 1,500,043,362.375387 | 85,280 |
pythondev | help | salsa, merengue, bachata, wutevs. | 2017-07-14T14:43:09.388738 | Johana | pythondev_help_Johana_2017-07-14T14:43:09.388738 | 1,500,043,389.388738 | 85,281 |
pythondev | help | pffff :joy: | 2017-07-14T15:18:22.433661 | Bridgett | pythondev_help_Bridgett_2017-07-14T15:18:22.433661 | 1,500,045,502.433661 | 85,282 |
pythondev | help | I guess I could just do another list comp | 2017-07-14T16:45:32.750939 | Staci | pythondev_help_Staci_2017-07-14T16:45:32.750939 | 1,500,050,732.750939 | 85,283 |
pythondev | help | such judgement here | 2017-07-14T16:46:08.766143 | Johana | pythondev_help_Johana_2017-07-14T16:46:08.766143 | 1,500,050,768.766143 | 85,284 |
pythondev | help | Well explain please | 2017-07-14T16:46:18.769974 | Staci | pythondev_help_Staci_2017-07-14T16:46:18.769974 | 1,500,050,778.769974 | 85,285 |
pythondev | help | oh o mean on my preferences in music. i | 2017-07-14T16:46:36.777880 | Johana | pythondev_help_Johana_2017-07-14T16:46:36.777880 | 1,500,050,796.77788 | 85,286 |
pythondev | help | Oh ha, got ya | 2017-07-14T16:46:46.781653 | Staci | pythondev_help_Staci_2017-07-14T16:46:46.781653 | 1,500,050,806.781653 | 85,287 |
pythondev | help | hi <@Julius> | 2017-07-14T16:51:59.912366 | Staci | pythondev_help_Staci_2017-07-14T16:51:59.912366 | 1,500,051,119.912366 | 85,288 |
pythondev | help | I'm looking for a more pythonic way to achieve this: | 2017-07-14T17:15:57.481636 | Staci | pythondev_help_Staci_2017-07-14T17:15:57.481636 | 1,500,052,557.481636 | 85,289 |
pythondev | help | Hi I need some help troubleshooting script that uses boto3 | 2017-07-14T18:06:41.470855 | Margareta | pythondev_help_Margareta_2017-07-14T18:06:41.470855 | 1,500,055,601.470855 | 85,290 |
pythondev | help | anyone familiar? | 2017-07-14T18:06:45.472037 | Margareta | pythondev_help_Margareta_2017-07-14T18:06:45.472037 | 1,500,055,605.472037 | 85,291 |
pythondev | help | Just throw out the question <@Margareta> | 2017-07-14T18:28:03.800221 | Beula | pythondev_help_Beula_2017-07-14T18:28:03.800221 | 1,500,056,883.800221 | 85,292 |
pythondev | help | <@Beula> that was bucket permission :see_no_evil::gun: | 2017-07-14T18:28:45.810460 | Margareta | pythondev_help_Margareta_2017-07-14T18:28:45.810460 | 1,500,056,925.81046 | 85,293 |
pythondev | help | Haha, happens all the time here too | 2017-07-14T18:33:55.884872 | Beula | pythondev_help_Beula_2017-07-14T18:33:55.884872 | 1,500,057,235.884872 | 85,294 |
pythondev | help | is there a way to a use a wildcard in this statement?
```
print('Starting upload to S3')
s3 = boto3.resource('s3')
path = '/var/atlassian/application-data/jira/export'
file_name = path + str(today) + '--0400.zip'
s3_obj_name = str(today) + '--0400.zip'
uploaded = s3.Bucket(bucket_name).upload_file(file_name, s3_obj_name)
print('File' + " " + file_name + " " + 'has been uploaded')
return uploaded
```
im looking to replace `--0400.zip` with some sort of wildcard if it is possible | 2017-07-14T18:34:56.898725 | Margareta | pythondev_help_Margareta_2017-07-14T18:34:56.898725 | 1,500,057,296.898725 | 85,295 |
pythondev | help | I am looking forward for help on decorators . I tried reading through several places on web but I could never get the essence of why do we use decorators in python ? | 2017-07-14T18:42:00.997670 | Helene | pythondev_help_Helene_2017-07-14T18:42:00.997670 | 1,500,057,720.99767 | 85,296 |
pythondev | help | Can someone over here take a lead and explain me ? | 2017-07-14T18:42:15.001101 | Helene | pythondev_help_Helene_2017-07-14T18:42:15.001101 | 1,500,057,735.001101 | 85,297 |
pythondev | help | <https://pythondev.slack.com/archives/C07EW4DNE/p1500071391209406> | 2017-07-14T18:42:38.006158 | Christina | pythondev_help_Christina_2017-07-14T18:42:38.006158 | 1,500,057,758.006158 | 85,298 |
pythondev | help | Any good way to do a for loop where the first iteration value is different that the followings?. I'm trying to generate an unique username. Right now i have:
```
for add_to_the_last in range(10):
if add_to_the_last == 0:
add_to_the_last = ''
username = f'{user.first_name} {user.last_initial}{add_to_the_last}'
if not User.objects.filter(username=username).exist():
break
```
It works but there must be a better way | 2017-07-14T19:01:42.258730 | Mariano | pythondev_help_Mariano_2017-07-14T19:01:42.258730 | 1,500,058,902.25873 | 85,299 |
pythondev | help | well i actually forgot to add the username to the user. | 2017-07-14T19:02:11.264898 | Mariano | pythondev_help_Mariano_2017-07-14T19:02:11.264898 | 1,500,058,931.264898 | 85,300 |
pythondev | help | why are you doing that <@Mariano> ,testing or something else? | 2017-07-14T22:01:18.646278 | Rickey | pythondev_help_Rickey_2017-07-14T22:01:18.646278 | 1,500,069,678.646278 | 85,301 |
pythondev | help | Need some help w/ docker.
When I run `docker images`:
```
REPOSITORY TAG IMAGE ID CREATED SIZE
<http://docker.io/nginx|docker.io/nginx> stable-alpine 2d13ad575b6f 3 days ago 15.5 MB
```
First line in Dockerfile: `FROM nginx:stable-alpine`
When I `docker build -t linked-nginx .`, a new nginx latest is created. | 2017-07-14T22:01:44.648577 | Deedee | pythondev_help_Deedee_2017-07-14T22:01:44.648577 | 1,500,069,704.648577 | 85,302 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.