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 | <@Gia> those arguments (also known as keyword arguments or kwargs) are generally used more for optional arguments | 2018-02-09T11:49:59.000036 | Brande | pythondev_help_Brande_2018-02-09T11:49:59.000036 | 1,518,176,999.000036 | 33,824 |
pythondev | help | <@Ellen> What kind of editor are you using? | 2018-02-09T11:53:23.000375 | Rigoberto | pythondev_help_Rigoberto_2018-02-09T11:53:23.000375 | 1,518,177,203.000375 | 33,825 |
pythondev | help | <@Ellen> A project I'm involved in use flake8 (`pip install flake8` then `python -m flake8 package_name`) | 2018-02-09T12:11:48.000747 | Elijah | pythondev_help_Elijah_2018-02-09T12:11:48.000747 | 1,518,178,308.000747 | 33,826 |
pythondev | help | Also, if you use the PyCharm IDE for development, it helps you point out most of the things as you go. | 2018-02-09T12:12:37.000228 | Elijah | pythondev_help_Elijah_2018-02-09T12:12:37.000228 | 1,518,178,357.000228 | 33,827 |
pythondev | help | And congratulations on your first open source contribution! :+1: | 2018-02-09T12:13:21.000641 | Elijah | pythondev_help_Elijah_2018-02-09T12:13:21.000641 | 1,518,178,401.000641 | 33,828 |
pythondev | help | if i have
```
class Grid:
def __init__(self, left_edge, right_edge, nr_points):
```
and then
```
class MovingWindow(Grid):
def __init__(self, left_edge, right_edge, nr_points, win_prop):
```
is there a way to avoid repeating myself in the constructor for MovingWindow, since it takes the same parameters as the ... | 2018-02-09T12:47:32.000713 | Gia | pythondev_help_Gia_2018-02-09T12:47:32.000713 | 1,518,180,452.000713 | 33,829 |
pythondev | help | this is the whole class, btw
```
class MovingWindow(Grid):
def __init__(self, left_edge, right_edge, nr_points, win_prop):
self._prop = win_prop
super().__init__(left_edge, right_edge, nr_points)
``` | 2018-02-09T12:48:18.000207 | Gia | pythondev_help_Gia_2018-02-09T12:48:18.000207 | 1,518,180,498.000207 | 33,830 |
pythondev | help | in the derived class you can have the the `win_prop` argument and then have `*args` and `**kwargs`. So you'd have
```class MovingWindow(Grid):
def __init__(self, win_prop, *args, **kwargs):
self._prop = win_prop
super().__init__(*args, **kwargs)
```
The `*args` gets tuple unpacked and the `**kwargs`... | 2018-02-09T12:58:55.000436 | Fumiko | pythondev_help_Fumiko_2018-02-09T12:58:55.000436 | 1,518,181,135.000436 | 33,831 |
pythondev | help | sweeeet :slightly_smiling_face: | 2018-02-09T12:59:35.000307 | Gia | pythondev_help_Gia_2018-02-09T12:59:35.000307 | 1,518,181,175.000307 | 33,832 |
pythondev | help | tnx! | 2018-02-09T12:59:38.000545 | Gia | pythondev_help_Gia_2018-02-09T12:59:38.000545 | 1,518,181,178.000545 | 33,833 |
pythondev | help | hello, wondering if anyone has any experience with a python library called plumbum, and replacing shell scripts in general with python | 2018-02-09T13:45:28.000775 | Salvador | pythondev_help_Salvador_2018-02-09T13:45:28.000775 | 1,518,183,928.000775 | 33,834 |
pythondev | help | also just wondering what the bestway to get some feedback on python code i have written | 2018-02-09T13:47:28.000549 | Salvador | pythondev_help_Salvador_2018-02-09T13:47:28.000549 | 1,518,184,048.000549 | 33,835 |
pythondev | help | I haven't used that package, but my first use of Python was automation, replacing shell scripts | 2018-02-09T13:49:17.000179 | Frankie | pythondev_help_Frankie_2018-02-09T13:49:17.000179 | 1,518,184,157.000179 | 33,836 |
pythondev | help | I always used the subprocess module when calling shell commands | 2018-02-09T13:50:42.000636 | Frankie | pythondev_help_Frankie_2018-02-09T13:50:42.000636 | 1,518,184,242.000636 | 33,837 |
pythondev | help | If you have specific questions you can paste code/links here | 2018-02-09T13:51:03.000577 | Frankie | pythondev_help_Frankie_2018-02-09T13:51:03.000577 | 1,518,184,263.000577 | 33,838 |
pythondev | help | ok will do in a sec here | 2018-02-09T13:51:27.000598 | Salvador | pythondev_help_Salvador_2018-02-09T13:51:27.000598 | 1,518,184,287.000598 | 33,839 |
pythondev | help | i have been messing around with both the subprocess module and plumbum | 2018-02-09T13:51:44.000331 | Salvador | pythondev_help_Salvador_2018-02-09T13:51:44.000331 | 1,518,184,304.000331 | 33,840 |
pythondev | help | which im guessing plumbum uses subprocess as well | 2018-02-09T13:52:02.000628 | Salvador | pythondev_help_Salvador_2018-02-09T13:52:02.000628 | 1,518,184,322.000628 | 33,841 |
pythondev | help | seems like there are things that python does really well but also that shell scripts do very well | 2018-02-09T13:52:25.000592 | Salvador | pythondev_help_Salvador_2018-02-09T13:52:25.000592 | 1,518,184,345.000592 | 33,842 |
pythondev | help | like 10 lines of code replace 1 line of shell | 2018-02-09T13:52:41.000023 | Salvador | pythondev_help_Salvador_2018-02-09T13:52:41.000023 | 1,518,184,361.000023 | 33,843 |
pythondev | help | yep, both have their place for sure. | 2018-02-09T13:53:27.000031 | Frankie | pythondev_help_Frankie_2018-02-09T13:53:27.000031 | 1,518,184,407.000031 | 33,844 |
pythondev | help | <https://github.com/yevgenybulochnik/devbox-cli/blob/master/install.py> | 2018-02-09T13:54:23.000189 | Salvador | pythondev_help_Salvador_2018-02-09T13:54:23.000189 | 1,518,184,463.000189 | 33,845 |
pythondev | help | gist is i need to build python3.6 and install the cli globally | 2018-02-09T13:55:46.000240 | Salvador | pythondev_help_Salvador_2018-02-09T13:55:46.000240 | 1,518,184,546.00024 | 33,846 |
pythondev | help | also log what has been done with each command and elapsed time | 2018-02-09T13:56:16.000776 | Salvador | pythondev_help_Salvador_2018-02-09T13:56:16.000776 | 1,518,184,576.000776 | 33,847 |
pythondev | help | the code makes me feel dirty tho lol, like there is probably a cleaner way of doing it | 2018-02-09T13:56:43.000172 | Salvador | pythondev_help_Salvador_2018-02-09T13:56:43.000172 | 1,518,184,603.000172 | 33,848 |
pythondev | help | for xenial | 2018-02-09T13:58:10.000096 | Salvador | pythondev_help_Salvador_2018-02-09T13:58:10.000096 | 1,518,184,690.000096 | 33,849 |
pythondev | help | First thing that jumps out at me is you've re-implemented logging instead of just using the logging module | 2018-02-09T14:01:31.000423 | Frankie | pythondev_help_Frankie_2018-02-09T14:01:31.000423 | 1,518,184,891.000423 | 33,850 |
pythondev | help | <https://docs.python.org/3/howto/logging.html#logging-basic-tutorial> | 2018-02-09T14:01:33.000225 | Frankie | pythondev_help_Frankie_2018-02-09T14:01:33.000225 | 1,518,184,893.000225 | 33,851 |
pythondev | help | second thing is that you should follow PEP8, starting with using camel case for class names | 2018-02-09T14:04:59.000359 | Frankie | pythondev_help_Frankie_2018-02-09T14:04:59.000359 | 1,518,185,099.000359 | 33,852 |
pythondev | help | didnt know that logging module existed lol | 2018-02-09T14:07:17.000209 | Salvador | pythondev_help_Salvador_2018-02-09T14:07:17.000209 | 1,518,185,237.000209 | 33,853 |
pythondev | help | and lastly, if you're doing this on many systems and might need to make changes, I'd recommend using a configuration management framework instead of rolling your own using shell commands or individual python scripts. You should look into Ansible, Chef, Puppet etc for systems automation | 2018-02-09T14:08:09.000130 | Frankie | pythondev_help_Frankie_2018-02-09T14:08:09.000130 | 1,518,185,289.00013 | 33,854 |
pythondev | help | makes sense, i have briefly looked into all of those but wanted to dick around writing something custom | 2018-02-09T14:09:40.000690 | Salvador | pythondev_help_Salvador_2018-02-09T14:09:40.000690 | 1,518,185,380.00069 | 33,855 |
pythondev | help | but maybe this a bit silly in this case | 2018-02-09T14:09:49.000028 | Salvador | pythondev_help_Salvador_2018-02-09T14:09:49.000028 | 1,518,185,389.000028 | 33,856 |
pythondev | help | It's probably good practice, but starting from an existing devops framework will make your life a lot easier | 2018-02-09T14:10:40.000416 | Frankie | pythondev_help_Frankie_2018-02-09T14:10:40.000416 | 1,518,185,440.000416 | 33,857 |
pythondev | help | The other thing I'd recommend, just in general, if you're writing code that deals with shell commands: use the long version of the flags. for example `--timestamping` instead of `-N`. the short flags are good for interactive use, but using the long version makes life easier when you're reading/updating longer scripts | 2018-02-09T14:13:13.000358 | Frankie | pythondev_help_Frankie_2018-02-09T14:13:13.000358 | 1,518,185,593.000358 | 33,858 |
pythondev | help | how about the dv_command class itself | 2018-02-09T14:15:53.000672 | Salvador | pythondev_help_Salvador_2018-02-09T14:15:53.000672 | 1,518,185,753.000672 | 33,859 |
pythondev | help | does that makes sense the way i did it | 2018-02-09T14:16:05.000663 | Salvador | pythondev_help_Salvador_2018-02-09T14:16:05.000663 | 1,518,185,765.000663 | 33,860 |
pythondev | help | a nice configuration management system to ease yourself into the devops mindset is fabric | 2018-02-09T14:16:12.000092 | Fumiko | pythondev_help_Fumiko_2018-02-09T14:16:12.000092 | 1,518,185,772.000092 | 33,861 |
pythondev | help | (given it can be summarised as "bash wrapped in python") | 2018-02-09T14:16:33.000526 | Fumiko | pythondev_help_Fumiko_2018-02-09T14:16:33.000526 | 1,518,185,793.000526 | 33,862 |
pythondev | help | it's what i used when i started, and then i went onto harder ~drugs~ configuration management systems like ansible | 2018-02-09T14:17:00.000567 | Fumiko | pythondev_help_Fumiko_2018-02-09T14:17:00.000567 | 1,518,185,820.000567 | 33,863 |
pythondev | help | Hey all, I just started working with Python and Django. I created an app that I've deployed to an EC2 instance, but I'm getting a 'No 'Access-Control-Allow-Origin' header is present on the requested' error. I'm finding tons of info, but nothing seems to work. Has anyone encountered this? I feel like it's something simp... | 2018-02-09T14:17:25.000285 | Coralie | pythondev_help_Coralie_2018-02-09T14:17:25.000285 | 1,518,185,845.000285 | 33,864 |
pythondev | help | also thanks for the feedback really appreciate it | 2018-02-09T14:18:04.000644 | Salvador | pythondev_help_Salvador_2018-02-09T14:18:04.000644 | 1,518,185,884.000644 | 33,865 |
pythondev | help | +1 for fabric, especially for things you might want to kick off at will vs scheduled/automatic | 2018-02-09T14:18:38.000286 | Frankie | pythondev_help_Frankie_2018-02-09T14:18:38.000286 | 1,518,185,918.000286 | 33,866 |
pythondev | help | havent heard of fabric before but will check that out too | 2018-02-09T14:19:05.000208 | Salvador | pythondev_help_Salvador_2018-02-09T14:19:05.000208 | 1,518,185,945.000208 | 33,867 |
pythondev | help | There's nothing inherently wrong with your class. I think I'd personally treat `sudo` differently, maybe as another kwarg | 2018-02-09T14:19:54.000025 | Frankie | pythondev_help_Frankie_2018-02-09T14:19:54.000025 | 1,518,185,994.000025 | 33,868 |
pythondev | help | Fabric is Python 2 only | 2018-02-09T14:20:11.000215 | Garrett | pythondev_help_Garrett_2018-02-09T14:20:11.000215 | 1,518,186,011.000215 | 33,869 |
pythondev | help | oh man, I didn't realize that. That's about to cause me a big headache, ha | 2018-02-09T14:20:56.000678 | Frankie | pythondev_help_Frankie_2018-02-09T14:20:56.000678 | 1,518,186,056.000678 | 33,870 |
pythondev | help | wow I didn't know it wasn't python 3 compatible | 2018-02-09T14:21:33.000558 | Fumiko | pythondev_help_Fumiko_2018-02-09T14:21:33.000558 | 1,518,186,093.000558 | 33,871 |
pythondev | help | There's a Python 3 equivalent, I just can't remember the name ATM | 2018-02-09T14:21:47.000506 | Garrett | pythondev_help_Garrett_2018-02-09T14:21:47.000506 | 1,518,186,107.000506 | 33,872 |
pythondev | help | (I haven't used it in ages, and only started using python3 when 3.6 came out) | 2018-02-09T14:21:48.000604 | Fumiko | pythondev_help_Fumiko_2018-02-09T14:21:48.000604 | 1,518,186,108.000604 | 33,873 |
pythondev | help | looks like there's a python3 fork, <https://github.com/mathiasertl/fabric/> | 2018-02-09T14:22:45.000003 | Frankie | pythondev_help_Frankie_2018-02-09T14:22:45.000003 | 1,518,186,165.000003 | 33,874 |
pythondev | help | maybe it's <https://github.com/pyinvoke/invoke> ? | 2018-02-09T14:23:28.000423 | Frankie | pythondev_help_Frankie_2018-02-09T14:23:28.000423 | 1,518,186,208.000423 | 33,875 |
pythondev | help | If you're feeling froggy, you could try <https://haarcuba.github.io/warp2/> with Fabric | 2018-02-09T14:28:37.000664 | Monroe | pythondev_help_Monroe_2018-02-09T14:28:37.000664 | 1,518,186,517.000664 | 33,876 |
pythondev | help | or if you just jumped to 3.6 and have nostalgia (rewrite) pains | 2018-02-09T14:29:06.000407 | Monroe | pythondev_help_Monroe_2018-02-09T14:29:06.000407 | 1,518,186,546.000407 | 33,877 |
pythondev | help | `pip install fabric3` works great for fabric on python3 | 2018-02-09T14:35:15.000136 | Brandon | pythondev_help_Brandon_2018-02-09T14:35:15.000136 | 1,518,186,915.000136 | 33,878 |
pythondev | help | That's a CORS issue. <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS> | 2018-02-09T14:37:25.000583 | Frankie | pythondev_help_Frankie_2018-02-09T14:37:25.000583 | 1,518,187,045.000583 | 33,879 |
pythondev | help | <@Frankie>: Thanks for responding. I'm aware of the CORS issue, and I'm trying to allow all (a security risk, but not for what I'm doing). I've tried to set the CORS within the AWS Lambda API and S3 bucket to '*', but it doesn't seem to work. I feel like I'm missing something else. | 2018-02-09T15:13:02.000265 | Coralie | pythondev_help_Coralie_2018-02-09T15:13:02.000265 | 1,518,189,182.000265 | 33,880 |
pythondev | help | run `curl -RIL <http://path-to-offending-resource>` and check the `Access-Control-Allow-Origin` header | 2018-02-09T15:23:15.000037 | Frankie | pythondev_help_Frankie_2018-02-09T15:23:15.000037 | 1,518,189,795.000037 | 33,881 |
pythondev | help | <@Coralie> are you sure your security group for that instance allows the IP and port? | 2018-02-09T15:24:21.000133 | Floy | pythondev_help_Floy_2018-02-09T15:24:21.000133 | 1,518,189,861.000133 | 33,882 |
pythondev | help | <@Rigoberto> I use VSCode and the pylinter has never worked before | 2018-02-09T15:25:58.000164 | Ellen | pythondev_help_Ellen_2018-02-09T15:25:58.000164 | 1,518,189,958.000164 | 33,883 |
pythondev | help | <@Elijah> I'll look into flake8 thanks for the suggestion guys. | 2018-02-09T15:27:00.000188 | Ellen | pythondev_help_Ellen_2018-02-09T15:27:00.000188 | 1,518,190,020.000188 | 33,884 |
pythondev | help | Here's what I receive. HTTP/2 200
content-type: application/json
content-length: 1119
date: Fri, 09 Feb 2018 20:31:16 GMT
x-amzn-requestid: 2db8c1a7-0dd8-11e8-931a-cb41230f1595
allow: GET, POST, HEAD, OPTIONS
x-amzn-remapped-content-length: 1119
x-frame-options: SAMEORIGIN
vary: Accept, Cookie
x-amzn-trace-id: sample... | 2018-02-09T15:31:38.000013 | Coralie | pythondev_help_Coralie_2018-02-09T15:31:38.000013 | 1,518,190,298.000013 | 33,885 |
pythondev | help | Yeah, there are no CORS headers there, so your bucket config isn't working | 2018-02-09T15:32:35.000311 | Frankie | pythondev_help_Frankie_2018-02-09T15:32:35.000311 | 1,518,190,355.000311 | 33,886 |
pythondev | help | When I review the response in the network tab within the chrome inspector, i see everything I'm supposed to be getting. | 2018-02-09T15:33:11.000695 | Coralie | pythondev_help_Coralie_2018-02-09T15:33:11.000695 | 1,518,190,391.000695 | 33,887 |
pythondev | help | Greetings, I need some guidance on something, Django REST Framewrok, does anyone have a example of how to create an endpoint with 2 parameters on the url? for instance /access/{id}/machine/{id}? A link would be helpful. | 2018-02-09T15:33:59.000075 | Lorita | pythondev_help_Lorita_2018-02-09T15:33:59.000075 | 1,518,190,439.000075 | 33,888 |
pythondev | help | In your view, you would define the view and expect as /{access_id}/{machine_id} | 2018-02-09T15:35:39.000561 | Coralie | pythondev_help_Coralie_2018-02-09T15:35:39.000561 | 1,518,190,539.000561 | 33,889 |
pythondev | help | so on the receive function signature would be recieve(self, response, access_id, machine_id)? Thank you <@Coralie> for the bandwidth. | 2018-02-09T15:36:54.000040 | Lorita | pythondev_help_Lorita_2018-02-09T15:36:54.000040 | 1,518,190,614.00004 | 33,890 |
pythondev | help | I would look in the django tutorial | 2018-02-09T15:37:15.000163 | Floy | pythondev_help_Floy_2018-02-09T15:37:15.000163 | 1,518,190,635.000163 | 33,891 |
pythondev | help | it covers this exact issue | 2018-02-09T15:37:22.000093 | Floy | pythondev_help_Floy_2018-02-09T15:37:22.000093 | 1,518,190,642.000093 | 33,892 |
pythondev | help | specifically <https://docs.djangoproject.com/en/2.0/intro/tutorial03/#writing-more-views> | 2018-02-09T15:37:51.000403 | Floy | pythondev_help_Floy_2018-02-09T15:37:51.000403 | 1,518,190,671.000403 | 33,893 |
pythondev | help | note those URL patterns | 2018-02-09T15:38:01.000499 | Floy | pythondev_help_Floy_2018-02-09T15:38:01.000499 | 1,518,190,681.000499 | 33,894 |
pythondev | help | actually this is closer to what I was looking for <https://github.com/alanjds/drf-nested-routers> | 2018-02-09T15:41:59.000432 | Lorita | pythondev_help_Lorita_2018-02-09T15:41:59.000432 | 1,518,190,919.000432 | 33,895 |
pythondev | help | <@Floy> thank you for the link. | 2018-02-09T15:42:07.000148 | Lorita | pythondev_help_Lorita_2018-02-09T15:42:07.000148 | 1,518,190,927.000148 | 33,896 |
pythondev | help | I have a question about packages that I’m worried I don’t know how to phrase…. | 2018-02-09T15:48:24.000296 | Marisela | pythondev_help_Marisela_2018-02-09T15:48:24.000296 | 1,518,191,304.000296 | 33,897 |
pythondev | help | Just ask :smile: | 2018-02-09T15:48:45.000368 | Garrett | pythondev_help_Garrett_2018-02-09T15:48:45.000368 | 1,518,191,325.000368 | 33,898 |
pythondev | help | o7 | 2018-02-09T15:48:52.000480 | Marisela | pythondev_help_Marisela_2018-02-09T15:48:52.000480 | 1,518,191,332.00048 | 33,899 |
pythondev | help | I have a system that involves a bunch of users logging into a platform — these users’ accounts are grouped together (one group per user, many users per group) — the group gets notifications about things happening on other group members’ accounts, and each user has a set of preferences that determine what notifications ... | 2018-02-09T15:49:52.000627 | Marisela | pythondev_help_Marisela_2018-02-09T15:49:52.000627 | 1,518,191,392.000627 | 33,900 |
pythondev | help | all of that logic is hand-written by me at the moment and is uuuuuugly | 2018-02-09T15:50:14.000109 | Marisela | pythondev_help_Marisela_2018-02-09T15:50:14.000109 | 1,518,191,414.000109 | 33,901 |
pythondev | help | I’m not even sure if it makes sense to be looking for a package to help with that, but after someone whapped me over the head with docopt last year, I’ve learned not to underestimate python | 2018-02-09T15:50:51.000449 | Marisela | pythondev_help_Marisela_2018-02-09T15:50:51.000449 | 1,518,191,451.000449 | 33,902 |
pythondev | help | so this is a web application? | 2018-02-09T15:51:22.000478 | Floy | pythondev_help_Floy_2018-02-09T15:51:22.000478 | 1,518,191,482.000478 | 33,903 |
pythondev | help | yep | 2018-02-09T15:51:29.000016 | Marisela | pythondev_help_Marisela_2018-02-09T15:51:29.000016 | 1,518,191,489.000016 | 33,904 |
pythondev | help | ok, what did you use to write it? | 2018-02-09T15:51:37.000498 | Floy | pythondev_help_Floy_2018-02-09T15:51:37.000498 | 1,518,191,497.000498 | 33,905 |
pythondev | help | eg, flask, django? | 2018-02-09T15:51:44.000105 | Floy | pythondev_help_Floy_2018-02-09T15:51:44.000105 | 1,518,191,504.000105 | 33,906 |
pythondev | help | the application itself is written in ruby and react, but the python component is a separate server that runs processes that do statistical analysis and other things that we didn’t want to write into th webapp | 2018-02-09T15:52:16.000278 | Marisela | pythondev_help_Marisela_2018-02-09T15:52:16.000278 | 1,518,191,536.000278 | 33,907 |
pythondev | help | so for the purposes of python at least in theory, this app is just a database that gets updated by a magic black box and a python script | 2018-02-09T15:52:33.000222 | Marisela | pythondev_help_Marisela_2018-02-09T15:52:33.000222 | 1,518,191,553.000222 | 33,908 |
pythondev | help | I’m a script kid at heart, so my inclination is just to code all the logic myself by hand and have it be kinda gnarly to sift through — but I’ve done that stuff too many times in python only to have someone hand me a package that did everything I needed it to better than my code — felt worth pinging a room with my issu... | 2018-02-09T15:53:44.000404 | Marisela | pythondev_help_Marisela_2018-02-09T15:53:44.000404 | 1,518,191,624.000404 | 33,909 |
pythondev | help | ok. one of the things I’ve found useful in not reinventing the wheel is breaking things down | 2018-02-09T15:54:28.000319 | Floy | pythondev_help_Floy_2018-02-09T15:54:28.000319 | 1,518,191,668.000319 | 33,910 |
pythondev | help | and search for python package X | 2018-02-09T15:54:48.000563 | Floy | pythondev_help_Floy_2018-02-09T15:54:48.000563 | 1,518,191,688.000563 | 33,911 |
pythondev | help | where X is something you want to do, like authorization, requests, db connector, etc | 2018-02-09T15:55:13.000282 | Floy | pythondev_help_Floy_2018-02-09T15:55:13.000282 | 1,518,191,713.000282 | 33,912 |
pythondev | help | I like this — I think I can do that here | 2018-02-09T15:55:27.000175 | Marisela | pythondev_help_Marisela_2018-02-09T15:55:27.000175 | 1,518,191,727.000175 | 33,913 |
pythondev | help | I have an event E which has some set of properties, one of which is a user that triggered the event, let’s call him U. Using this event, I need to collect a list of all other users that are themselves related to U - let’s call these guys Ps. Then I need to saturate those users with information about their notification ... | 2018-02-09T15:59:11.000277 | Marisela | pythondev_help_Marisela_2018-02-09T15:59:11.000277 | 1,518,191,951.000277 | 33,914 |
pythondev | help | and ideally, this would take the form of a method that I hand E to and it just goes off and does the rest | 2018-02-09T15:59:43.000556 | Marisela | pythondev_help_Marisela_2018-02-09T15:59:43.000556 | 1,518,191,983.000556 | 33,915 |
pythondev | help | are you already using an ORM for the database? | 2018-02-09T16:00:02.000494 | Frankie | pythondev_help_Frankie_2018-02-09T16:00:02.000494 | 1,518,192,002.000494 | 33,916 |
pythondev | help | postgres with foreign keys connecting all the relevant actors, yes | 2018-02-09T16:00:42.000174 | Marisela | pythondev_help_Marisela_2018-02-09T16:00:42.000174 | 1,518,192,042.000174 | 33,917 |
pythondev | help | but beyond that, are you just constructing queries by hand? | 2018-02-09T16:01:04.000376 | Frankie | pythondev_help_Frankie_2018-02-09T16:01:04.000376 | 1,518,192,064.000376 | 33,918 |
pythondev | help | not entirely, no — I’ve got a set of python abstractions built that handle most of my database objects, so you can invoke a User() object and access things about him that aren’t just in the user table — it’s how I generate statistics | 2018-02-09T16:02:47.000030 | Marisela | pythondev_help_Marisela_2018-02-09T16:02:47.000030 | 1,518,192,167.00003 | 33,919 |
pythondev | help | though I should note that I don’t have anything of the sort for notifications or notification preferences | 2018-02-09T16:03:08.000034 | Marisela | pythondev_help_Marisela_2018-02-09T16:03:08.000034 | 1,518,192,188.000034 | 33,920 |
pythondev | help | this is me trying to decide if I should build one | 2018-02-09T16:03:14.000078 | Marisela | pythondev_help_Marisela_2018-02-09T16:03:14.000078 | 1,518,192,194.000078 | 33,921 |
pythondev | help | using something like <https://www.sqlalchemy.org> will make that a lot easier | 2018-02-09T16:03:18.000246 | Frankie | pythondev_help_Frankie_2018-02-09T16:03:18.000246 | 1,518,192,198.000246 | 33,922 |
pythondev | help | so it would… | 2018-02-09T16:04:46.000166 | Marisela | pythondev_help_Marisela_2018-02-09T16:04:46.000166 | 1,518,192,286.000166 | 33,923 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.