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 | :thumbsup: | 2019-05-31T05:58:03.187200 | Mica | pythondev_help_Mica_2019-05-31T05:58:03.187200 | 1,559,282,283.1872 | 26,021 |
pythondev | help | Guys I have a query that is not clear to me, how could you rewrite / factorize to make more readable? | 2019-05-31T06:14:37.188400 | Eveline | pythondev_help_Eveline_2019-05-31T06:14:37.188400 | 1,559,283,277.1884 | 26,022 |
pythondev | help | None | 2019-05-31T06:14:53.188500 | Eveline | pythondev_help_Eveline_2019-05-31T06:14:53.188500 | 1,559,283,293.1885 | 26,023 |
pythondev | help | subquery contains 2 qs with a different lookup. Those two could be factorized outside and used inside with a Q object? Q(link1) | Q(link2) | 2019-05-31T06:16:41.190100 | Eveline | pythondev_help_Eveline_2019-05-31T06:16:41.190100 | 1,559,283,401.1901 | 26,024 |
pythondev | help | then annotate and values | 2019-05-31T06:17:04.190300 | Eveline | pythondev_help_Eveline_2019-05-31T06:17:04.190300 | 1,559,283,424.1903 | 26,025 |
pythondev | help | I would turn that into a function that possibly calls other functions, each with a meaningful name | 2019-05-31T09:14:19.192200 | Ashley | pythondev_help_Ashley_2019-05-31T09:14:19.192200 | 1,559,294,059.1922 | 26,026 |
pythondev | help | that’s a pretty complicated django query | 2019-05-31T09:18:27.192500 | Hiroko | pythondev_help_Hiroko_2019-05-31T09:18:27.192500 | 1,559,294,307.1925 | 26,027 |
pythondev | help | I’ve got a python package that compiles code with Extensions. The C++ extensions depend on other libraries.
* Do I package the dependencies in my whl file?
* How do I accommodate for different operating systems, i.e. macOS / Linux?
This is finally deployed to our pypi server. | 2019-05-31T09:23:35.193100 | Nisha | pythondev_help_Nisha_2019-05-31T09:23:35.193100 | 1,559,294,615.1931 | 26,028 |
pythondev | help | Conda | 2019-05-31T09:37:38.193400 | Bethany | pythondev_help_Bethany_2019-05-31T09:37:38.193400 | 1,559,295,458.1934 | 26,029 |
pythondev | help | <@Nisha> It really depends. If your package will be used by a very tiny amout of configurations, like one known Linux distro/macos/windows then it's probably worth prebuilding and vendoring. If you don't know exact userbase and their target OSes then I think you have to provide a facility of building extensions upon installation | 2019-05-31T09:39:21.194800 | Nigel | pythondev_help_Nigel_2019-05-31T09:39:21.194800 | 1,559,295,561.1948 | 26,030 |
pythondev | help | And it also depends on whether target OS will have compiler on it | 2019-05-31T09:40:12.195300 | Nigel | pythondev_help_Nigel_2019-05-31T09:40:12.195300 | 1,559,295,612.1953 | 26,031 |
pythondev | help | <@Nigel> very interesting! Upon installation would actually be our best bet here, as the dependencies are handled by `conan`. If you’ve got any links handy to share, I’d greatly appreciate it. | 2019-05-31T09:41:30.196500 | Nisha | pythondev_help_Nisha_2019-05-31T09:41:30.196500 | 1,559,295,690.1965 | 26,032 |
pythondev | help | It’s an internal tool, so I can assume on several build tools to be available. | 2019-05-31T09:42:18.197300 | Nisha | pythondev_help_Nisha_2019-05-31T09:42:18.197300 | 1,559,295,738.1973 | 26,033 |
pythondev | help | I think that the best way of learning is by observing how big folks doing this :slightly_smiling_face:
For example, that's how postgresql driver compiles its extension upon installation: <https://github.com/psycopg/psycopg2/blob/master/setup.py#L213> | 2019-05-31T09:43:26.198400 | Nigel | pythondev_help_Nigel_2019-05-31T09:43:26.198400 | 1,559,295,806.1984 | 26,034 |
pythondev | help | They're handling like almost ever possible situation for windows, linux and macos (referred as `darwin` in their code) | 2019-05-31T09:44:19.199200 | Nigel | pythondev_help_Nigel_2019-05-31T09:44:19.199200 | 1,559,295,859.1992 | 26,035 |
pythondev | help | I think I’ll have to pause deployment for a bit :sweat_smile: | 2019-05-31T09:47:53.199800 | Nisha | pythondev_help_Nisha_2019-05-31T09:47:53.199800 | 1,559,296,073.1998 | 26,036 |
pythondev | help | <@Nigel> in the case of upon installation extension building, that means that you’d have to install it on the server to test the build? | 2019-05-31T09:51:45.201500 | Nisha | pythondev_help_Nisha_2019-05-31T09:51:45.201500 | 1,559,296,305.2015 | 26,037 |
pythondev | help | This is a problem conda was made to solve, why does everyone always sleep on conda :sweat: | 2019-05-31T09:51:54.201700 | Bethany | pythondev_help_Bethany_2019-05-31T09:51:54.201700 | 1,559,296,314.2017 | 26,038 |
pythondev | help | It can install the compilers for you | 2019-05-31T09:52:42.202500 | Bethany | pythondev_help_Bethany_2019-05-31T09:52:42.202500 | 1,559,296,362.2025 | 26,039 |
pythondev | help | Especially if you Target windows this is a pain in the ass | 2019-05-31T09:53:00.203000 | Bethany | pythondev_help_Bethany_2019-05-31T09:53:00.203000 | 1,559,296,380.203 | 26,040 |
pythondev | help | I never tried conda unfortunately :disappointed: | 2019-05-31T09:53:39.203300 | Nigel | pythondev_help_Nigel_2019-05-31T09:53:39.203300 | 1,559,296,419.2033 | 26,041 |
pythondev | help | I have spent little time on conda as well. It’s a great tool, but I chose the `purist` path some time ago. Mainly cause we don’t really care about Windows as well | 2019-05-31T09:56:45.204500 | Nisha | pythondev_help_Nisha_2019-05-31T09:56:45.204500 | 1,559,296,605.2045 | 26,042 |
pythondev | help | I can't make the "console_scripts" executable after install it with pip, maybe I have something wrong on my `setup.cfg` but the documentation say that doesn't support `entry_points` or maybe is my folder layout, not sure. Some one have a example file about this or know how can I fix it | 2019-05-31T10:00:08.204600 | Dennise | pythondev_help_Dennise_2019-05-31T10:00:08.204600 | 1,559,296,808.2046 | 26,043 |
pythondev | help | I have a for loop going through some dates. For each date I gather data and then validate it, if the validation fails, I'd like to sleep for 5 minutes and then try again | 2019-05-31T10:24:45.206100 | Nikki | pythondev_help_Nikki_2019-05-31T10:24:45.206100 | 1,559,298,285.2061 | 26,044 |
pythondev | help | Is there a way for me to restart the loop interation | 2019-05-31T10:25:00.206500 | Nikki | pythondev_help_Nikki_2019-05-31T10:25:00.206500 | 1,559,298,300.2065 | 26,045 |
pythondev | help | Like access the previous interation | 2019-05-31T10:26:25.206800 | Nikki | pythondev_help_Nikki_2019-05-31T10:26:25.206800 | 1,559,298,385.2068 | 26,046 |
pythondev | help | under what circumstances would a validation fail? | 2019-05-31T10:27:18.208100 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:27:18.208100 | 1,559,298,438.2081 | 26,047 |
pythondev | help | if its a malformed date, or something with the data, doing a sleep and restart won’t do anything | 2019-05-31T10:27:39.208600 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:27:39.208600 | 1,559,298,459.2086 | 26,048 |
pythondev | help | That's separate - it fails when a certain condition is met, basically when sums don't match | 2019-05-31T10:30:50.209500 | Nikki | pythondev_help_Nikki_2019-05-31T10:30:50.209500 | 1,559,298,650.2095 | 26,049 |
pythondev | help | Thank you <@Jettie>, do you think using json is the best approach? | 2019-05-31T10:38:18.209900 | Alicia | pythondev_help_Alicia_2019-05-31T10:38:18.209900 | 1,559,299,098.2099 | 26,050 |
pythondev | help | How can I see the current open tab in chrome and get the url | 2019-05-31T10:43:35.210500 | Rodrick | pythondev_help_Rodrick_2019-05-31T10:43:35.210500 | 1,559,299,415.2105 | 26,051 |
pythondev | help | Like I have chrome open and it is on my website `<http://raavcorp.com|raavcorp.com>` | 2019-05-31T10:45:12.211100 | Rodrick | pythondev_help_Rodrick_2019-05-31T10:45:12.211100 | 1,559,299,512.2111 | 26,052 |
pythondev | help | i want python to return `"<http://abc.com|abc.com>", "<http://xyz.com|xyz.com>", "<http://raavcorp.com|raavcorp.com>"` | 2019-05-31T10:45:54.212600 | Rodrick | pythondev_help_Rodrick_2019-05-31T10:45:54.212600 | 1,559,299,554.2126 | 26,053 |
pythondev | help | Seems to work:
```
dates = [1, 2, 3, 4]
class Restart_iter():
def __init__(self, i):
self.i = i
self.index = -1
def next(self):
self.index += 1
return self.i[self.index]
def previous(self):
return self.i[self.index]
x = Restart_iter(dates)
print x.next()
print x.next()
print x.previous()
print x.next()
``` | 2019-05-31T10:45:57.212800 | Nikki | pythondev_help_Nikki_2019-05-31T10:45:57.212800 | 1,559,299,557.2128 | 26,054 |
pythondev | help | no, just an example | 2019-05-31T10:46:08.213200 | Jettie | pythondev_help_Jettie_2019-05-31T10:46:08.213200 | 1,559,299,568.2132 | 26,055 |
pythondev | help | if it's something simple -- why not :p | 2019-05-31T10:46:16.213600 | Jettie | pythondev_help_Jettie_2019-05-31T10:46:16.213600 | 1,559,299,576.2136 | 26,056 |
pythondev | help | `abc` and `xyz ` are the other sites open | 2019-05-31T10:46:19.213900 | Rodrick | pythondev_help_Rodrick_2019-05-31T10:46:19.213900 | 1,559,299,579.2139 | 26,057 |
pythondev | help | but maybe flat csv makes more sense for your data | 2019-05-31T10:46:29.214000 | Jettie | pythondev_help_Jettie_2019-05-31T10:46:29.214000 | 1,559,299,589.214 | 26,058 |
pythondev | help | any ideas? | 2019-05-31T10:48:57.214300 | Rodrick | pythondev_help_Rodrick_2019-05-31T10:48:57.214300 | 1,559,299,737.2143 | 26,059 |
pythondev | help | <@Nikki> ` it fails when a certain condition is met, basically when sums don't match` | 2019-05-31T10:49:54.214600 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:49:54.214600 | 1,559,299,794.2146 | 26,060 |
pythondev | help | so how do you expect this to change in the context of a loop and sleep? | 2019-05-31T10:50:09.215000 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:50:09.215000 | 1,559,299,809.215 | 26,061 |
pythondev | help | Maybe I didn't explain it very well. I have a loop, if during the loop there is an issue with the data I have collected via APIs, I want to sleep and then restart that iteration which is a date | 2019-05-31T10:51:31.216500 | Nikki | pythondev_help_Nikki_2019-05-31T10:51:31.216500 | 1,559,299,891.2165 | 26,062 |
pythondev | help | The above code seems to do the job | 2019-05-31T10:51:46.216900 | Nikki | pythondev_help_Nikki_2019-05-31T10:51:46.216900 | 1,559,299,906.2169 | 26,063 |
pythondev | help | I was practicing a fairly simple problem on Codility and my solution seems to have failed some obscure cases in the performance category. Can anyone think of why this might be so? I can't fathom what's wrong with this.
<https://app.codility.com/demo/results/trainingYYQG2Z-MD8/> | 2019-05-31T10:54:40.218000 | Conrad | pythondev_help_Conrad_2019-05-31T10:54:40.218000 | 1,559,300,080.218 | 26,064 |
pythondev | help | what cases? | 2019-05-31T10:54:57.218400 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:54:57.218400 | 1,559,300,097.2184 | 26,065 |
pythondev | help | I posted a link: that will show which cases failed, but they don't tell you what the cases look like | 2019-05-31T10:55:31.218900 | Conrad | pythondev_help_Conrad_2019-05-31T10:55:31.218900 | 1,559,300,131.2189 | 26,066 |
pythondev | help | I have no way of knowing what went wrong or how to improve it lol | 2019-05-31T10:55:53.219200 | Conrad | pythondev_help_Conrad_2019-05-31T10:55:53.219200 | 1,559,300,153.2192 | 26,067 |
pythondev | help | could it be the language? | 2019-05-31T10:56:44.219400 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:56:44.219400 | 1,559,300,204.2194 | 26,068 |
pythondev | help | wonder if they grade the performance by the same metric regardless of language | 2019-05-31T10:57:06.219900 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:57:06.219900 | 1,559,300,226.2199 | 26,069 |
pythondev | help | I'm not sure, I've never faced a situation so far that I would be failed based on the choice of language | 2019-05-31T10:57:34.220500 | Conrad | pythondev_help_Conrad_2019-05-31T10:57:34.220500 | 1,559,300,254.2205 | 26,070 |
pythondev | help | if anything, I'd argue that I have an advantage because I don't have to do overflow/bounds checking like in C/C++ | 2019-05-31T10:57:47.220900 | Conrad | pythondev_help_Conrad_2019-05-31T10:57:47.220900 | 1,559,300,267.2209 | 26,071 |
pythondev | help | None | 2019-05-31T10:58:47.221400 | Hiroko | pythondev_help_Hiroko_2019-05-31T10:58:47.221400 | 1,559,300,327.2214 | 26,072 |
pythondev | help | ok I wasn't able to understand that at first glance | 2019-05-31T10:59:06.222200 | Conrad | pythondev_help_Conrad_2019-05-31T10:59:06.222200 | 1,559,300,346.2222 | 26,073 |
pythondev | help | so they mean 100,000 '(', followed by 100,000 ')' follow by ')(' | 2019-05-31T10:59:32.223000 | Conrad | pythondev_help_Conrad_2019-05-31T10:59:32.223000 | 1,559,300,372.223 | 26,074 |
pythondev | help | At least for the long one (100k `(` followed by 100k ‘)’) it says the runtime limit is .336 seconds and your runtime was 5.056 | 2019-05-31T10:59:36.223100 | Clemmie | pythondev_help_Clemmie_2019-05-31T10:59:36.223100 | 1,559,300,376.2231 | 26,075 |
pythondev | help | followed by a bad | 2019-05-31T11:00:03.223400 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:00:03.223400 | 1,559,300,403.2234 | 26,076 |
pythondev | help | indeed, it takes ~7s on my machine | 2019-05-31T11:01:54.224300 | Conrad | pythondev_help_Conrad_2019-05-31T11:01:54.224300 | 1,559,300,514.2243 | 26,077 |
pythondev | help | bah | 2019-05-31T11:01:56.224500 | Conrad | pythondev_help_Conrad_2019-05-31T11:01:56.224500 | 1,559,300,516.2245 | 26,078 |
pythondev | help | I think there are a few things you can do | 2019-05-31T11:02:28.224700 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:02:28.224700 | 1,559,300,548.2247 | 26,079 |
pythondev | help | don’t use is_empty in your loop evaluation - catch the indexerror and break out | 2019-05-31T11:03:01.225300 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:03:01.225300 | 1,559,300,581.2253 | 26,080 |
pythondev | help | ah | 2019-05-31T11:03:43.226500 | Conrad | pythondev_help_Conrad_2019-05-31T11:03:43.226500 | 1,559,300,623.2265 | 26,081 |
pythondev | help | I get you. so at the first sign of trouble, end the program right there | 2019-05-31T11:03:51.227000 | Conrad | pythondev_help_Conrad_2019-05-31T11:03:51.227000 | 1,559,300,631.227 | 26,082 |
pythondev | help | also don’t peek - if you pop out an item from the stack that is in your map and is not the partner of the current char, error out | 2019-05-31T11:03:54.227100 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:03:54.227100 | 1,559,300,634.2271 | 26,083 |
pythondev | help | okay but how does that work for this case. I would still have to iterate over 200K parentheses | 2019-05-31T11:04:45.227500 | Conrad | pythondev_help_Conrad_2019-05-31T11:04:45.227500 | 1,559,300,685.2275 | 26,084 |
pythondev | help | might be ok, because you aren’t doing a list lookup and comparison each time, just the comparison | 2019-05-31T11:05:34.228400 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:05:34.228400 | 1,559,300,734.2284 | 26,085 |
pythondev | help | and if it is still not fast enough, you look for other efficiencies | 2019-05-31T11:05:56.228800 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:05:56.228800 | 1,559,300,756.2288 | 26,086 |
pythondev | help | hmmm | 2019-05-31T11:06:20.229100 | Conrad | pythondev_help_Conrad_2019-05-31T11:06:20.229100 | 1,559,300,780.2291 | 26,087 |
pythondev | help | lol and they marked this problem as painless/easy | 2019-05-31T11:06:26.229300 | Conrad | pythondev_help_Conrad_2019-05-31T11:06:26.229300 | 1,559,300,786.2293 | 26,088 |
pythondev | help | another optimization I can think of is to return 0 if the length of the string is not even | 2019-05-31T11:07:03.229700 | Conrad | pythondev_help_Conrad_2019-05-31T11:07:03.229700 | 1,559,300,823.2297 | 26,089 |
pythondev | help | won’t that fail the nested string requirement? | 2019-05-31T11:10:42.230200 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:10:42.230200 | 1,559,301,042.2302 | 26,090 |
pythondev | help | I think a big optimization would be to work from the end of the list instead of inserting and popping at element 0... that causes Python to need to shift every element in the list with every access. | 2019-05-31T11:13:27.231000 | Sasha | pythondev_help_Sasha_2019-05-31T11:13:27.231000 | 1,559,301,207.231 | 26,091 |
pythondev | help | how can the string be a proper nested string if the length of the string is not even? for every left parenthesis there has to be a right parenthesis. this check by itself is not sufficient, but it would work as an optimization | 2019-05-31T11:14:46.231200 | Conrad | pythondev_help_Conrad_2019-05-31T11:14:46.231200 | 1,559,301,286.2312 | 26,092 |
pythondev | help | so insert at the end and remove at the end? | 2019-05-31T11:15:04.231600 | Conrad | pythondev_help_Conrad_2019-05-31T11:15:04.231600 | 1,559,301,304.2316 | 26,093 |
pythondev | help | I had not thought of this | 2019-05-31T11:15:25.231800 | Conrad | pythondev_help_Conrad_2019-05-31T11:15:25.231800 | 1,559,301,325.2318 | 26,094 |
pythondev | help | makes sense | 2019-05-31T11:15:30.232000 | Conrad | pythondev_help_Conrad_2019-05-31T11:15:30.232000 | 1,559,301,330.232 | 26,095 |
pythondev | help | `('a')` is a properly nested string, odd length | 2019-05-31T11:18:23.232100 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:18:23.232100 | 1,559,301,503.2321 | 26,096 |
pythondev | help | now I'm failing two different performance tests, this time due to wrong answer, not timeout :joy: | 2019-05-31T11:19:43.232800 | Conrad | pythondev_help_Conrad_2019-05-31T11:19:43.232800 | 1,559,301,583.2328 | 26,097 |
pythondev | help | thanks <@Sasha> <@Clemmie> :taco: I should be able to take it from here | 2019-05-31T11:19:58.233200 | Conrad | pythondev_help_Conrad_2019-05-31T11:19:58.233200 | 1,559,301,598.2332 | 26,098 |
pythondev | help | unless I misunderstand “S has the form “(U)” or “[U]” or “{U}” where U is a properly nested string;” | 2019-05-31T11:20:07.233300 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:20:07.233300 | 1,559,301,607.2333 | 26,099 |
pythondev | help | the only characters in the string are parentheses | 2019-05-31T11:23:09.233900 | Conrad | pythondev_help_Conrad_2019-05-31T11:23:09.233900 | 1,559,301,789.2339 | 26,100 |
pythondev | help | Ok, I misunderstood that part then | 2019-05-31T11:23:48.234100 | Clemmie | pythondev_help_Clemmie_2019-05-31T11:23:48.234100 | 1,559,301,828.2341 | 26,101 |
pythondev | help | got the 100%, thank you gents | 2019-05-31T11:24:20.234600 | Conrad | pythondev_help_Conrad_2019-05-31T11:24:20.234600 | 1,559,301,860.2346 | 26,102 |
pythondev | help | Hi, I have been working in a python3.5 virtualenv and when I went to use zappa to deploy my django app to AWS, I learned that zappa doesnt support python3.5. I installed 3.7 and created a new virtualenv but I was wondering if there is an easy way to upgrade a 3.5 virtualenv to 3.7 or migrate the packages versus installing everything from scratch. Is this possible? | 2019-05-31T12:06:34.238000 | Kit | pythondev_help_Kit_2019-05-31T12:06:34.238000 | 1,559,304,394.238 | 26,103 |
pythondev | help | well, you should have a requirements file from your previous venv, right? | 2019-05-31T12:07:26.238400 | Hiroko | pythondev_help_Hiroko_2019-05-31T12:07:26.238400 | 1,559,304,446.2384 | 26,104 |
pythondev | help | just create a venv with 3.7, and install the requirements | 2019-05-31T12:07:43.238900 | Hiroko | pythondev_help_Hiroko_2019-05-31T12:07:43.238900 | 1,559,304,463.2389 | 26,105 |
pythondev | help | I didnt have a requirements file really as I started by following a few tutorials I’ll have to dig around and figure out what I installed versus django because there are a ton of packages installed in the 3.5 env. Im new to venv, if cant tell :slightly_smiling_face: | 2019-05-31T12:16:27.242100 | Kit | pythondev_help_Kit_2019-05-31T12:16:27.242100 | 1,559,304,987.2421 | 26,106 |
pythondev | help | also, as I was learning how to create the venv in 3.7 I found two ways to write the syntax that create different results and I was wondering which one was correct or preferred.
```
vagrant@ubuntu-xenial:~/django-projects$ python3.7 -m venv test
vagrant@ubuntu-xenial:~/django-projects$ virtualenv -p /usr/bin/python3.7 test2
Running virtualenv with interpreter /usr/bin/python3.7
Using base prefix '/usr'
New python executable in /home/vagrant/django-projects/test2/bin/python3.7
Also creating executable in /home/vagrant/django-projects/test2/bin/python
Installing setuptools, pip, wheel...
done.
vagrant@ubuntu-xenial:~/django-projects$ ls test*
test:
total 4.0K
drwxr-xr-x 1 vagrant vagrant 192 May 31 2019 ..
drwxr-xr-x 1 vagrant vagrant 416 May 31 2019 bin
drwxr-xr-x 1 vagrant vagrant 224 May 31 2019 .
drwxr-xr-x 1 vagrant vagrant 64 May 31 2019 include
drwxr-xr-x 1 vagrant vagrant 96 May 31 2019 lib
lrwxr-xr-x 1 vagrant vagrant 3 May 31 2019 lib64 -> lib
-rw-r--r-- 1 vagrant vagrant 69 May 31 2019 pyvenv.cfg
test2:
total 0
drwxr-xr-x 1 vagrant vagrant 576 May 31 2019 bin
drwxr-xr-x 1 vagrant vagrant 128 May 31 2019 .
drwxr-xr-x 1 vagrant vagrant 192 May 31 2019 ..
drwxr-xr-x 1 vagrant vagrant 96 May 31 2019 lib
``` | 2019-05-31T12:19:57.243900 | Kit | pythondev_help_Kit_2019-05-31T12:19:57.243900 | 1,559,305,197.2439 | 26,107 |
pythondev | help | Can someone help explain how Python imports work? I’m having a cerebral meltdown over here… read the official docs, spent a day on StackOverflow, but I got nothing but `ModuleNotFoundError` errors as I’m trying to organize a project into multiple files across multiple sub-directories.
For example, when you see something like `from accounts.views import accounts_app`, how do you know if it is:
- A. You are importing a file (i.e. module) `accounts_app.py` from the `accounts/views/` directory?
- B. You are importing a function named `accounts_app` from a `accounts/views.py` file?
- C. You are importing a variable named `accounts_app` from a `accounts/views.py` file? | 2019-05-31T12:23:08.245500 | Nicky | pythondev_help_Nicky_2019-05-31T12:23:08.245500 | 1,559,305,388.2455 | 26,108 |
pythondev | help | I find this <http://bit.ly/pypackages|bit.ly/pypackages> very informative | 2019-05-31T12:24:20.245600 | Chester | pythondev_help_Chester_2019-05-31T12:24:20.245600 | 1,559,305,460.2456 | 26,109 |
pythondev | help | You won't know, generally, short of seeing errors when you try to run things. Generally you don't want the name collisions that would cause such confusion | 2019-05-31T12:28:16.248600 | Clemmie | pythondev_help_Clemmie_2019-05-31T12:28:16.248600 | 1,559,305,696.2486 | 26,110 |
pythondev | help | i have a detached tmux session running some code in ipython
is it ok to edit the underlying code that the tmux session is referencing?
I'm guessing what my ipython shell is using is some compiled bytecode version of my source, but I'm not 100% sure | 2019-05-31T12:28:54.249400 | Jorge | pythondev_help_Jorge_2019-05-31T12:28:54.249400 | 1,559,305,734.2494 | 26,111 |
pythondev | help | all three of those imports are equivalent from an import syntax point of view | 2019-05-31T12:29:13.249600 | Clemmie | pythondev_help_Clemmie_2019-05-31T12:29:13.249600 | 1,559,305,753.2496 | 26,112 |
pythondev | help | <@Jorge> you mean you want the session to keep using old code while you edit the code itself? | 2019-05-31T12:29:44.250100 | Clemmie | pythondev_help_Clemmie_2019-05-31T12:29:44.250100 | 1,559,305,784.2501 | 26,113 |
pythondev | help | yea. its updating some things using `./manage.py shell` | 2019-05-31T12:30:25.250700 | Jorge | pythondev_help_Jorge_2019-05-31T12:30:25.250700 | 1,559,305,825.2507 | 26,114 |
pythondev | help | I'm pretty sure it depends what shell you are using. iPython (i think) will hot-reload code. the standard repl won't | 2019-05-31T12:32:23.252200 | Clemmie | pythondev_help_Clemmie_2019-05-31T12:32:23.252200 | 1,559,305,943.2522 | 26,115 |
pythondev | help | Regarding your question: there’s no definitive way to know beforehand.
But usually you can guess depending on the name. Like in `from something import models`, `models` will most likely be a module.
`from something import parse_stuff` - `parse_stuff` is likely a callable. And so on. | 2019-05-31T12:33:05.252300 | Chester | pythondev_help_Chester_2019-05-31T12:33:05.252300 | 1,559,305,985.2523 | 26,116 |
pythondev | help | ah, yea it looks like autoreload is something that can be configured in ipython, so i'll have to check that out | 2019-05-31T12:34:39.253000 | Jorge | pythondev_help_Jorge_2019-05-31T12:34:39.253000 | 1,559,306,079.253 | 26,117 |
pythondev | help | thanks <@Clemmie> :taco: | 2019-05-31T12:34:56.253500 | Jorge | pythondev_help_Jorge_2019-05-31T12:34:56.253500 | 1,559,306,096.2535 | 26,118 |
pythondev | help | then that’s a server error, not browser | 2019-05-31T12:49:57.254200 | Hiroko | pythondev_help_Hiroko_2019-05-31T12:49:57.254200 | 1,559,306,997.2542 | 26,119 |
pythondev | help | <https://image.slidesharecdn.com/poxtohateoas-120525120943-phpapp01/95/pox-to-hateoas-our-companys-journey-building-a-hypermedia-api-7-638.jpg?cb=1353513821> | 2019-05-31T12:50:57.254400 | Hiroko | pythondev_help_Hiroko_2019-05-31T12:50:57.254400 | 1,559,307,057.2544 | 26,120 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.