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
maybe it's the vscode python-debugger, running the code from cli doesn't throw expcetion as i just noticed
2019-02-11T06:00:39.050600
Shawana
pythondev_help_Shawana_2019-02-11T06:00:39.050600
1,549,864,839.0506
7,621
pythondev
help
``` jkelly  jBook  ~  dev  scratch  %  cat scratch.py import sys print('ohai') sys.exit(0) jkelly  jBook  ~  dev  scratch  %  docker run -it -v `pwd`:/code -w /code --rm python:3.6 python scratch.py ohai jkelly  jBook  ~  dev  scratch  %  ```
2019-02-11T06:00:39.050700
Karoline
pythondev_help_Karoline_2019-02-11T06:00:39.050700
1,549,864,839.0507
7,622
pythondev
help
the vscode error is this: ``` Ausnahme: SystemExit 0 File "<dir>\hoco\GUI\qtapp.py", line 25, in run sys.exit(app.exec_()) File "<dir>\hoco\GUI\qtapp.py", line 39, in <module> run() File "C:\Python37\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python37\Lib...
2019-02-11T06:01:45.051400
Shawana
pythondev_help_Shawana_2019-02-11T06:01:45.051400
1,549,864,905.0514
7,623
pythondev
help
yeah under normal circumstances that won't print anything
2019-02-11T06:02:03.051600
Karoline
pythondev_help_Karoline_2019-02-11T06:02:03.051600
1,549,864,923.0516
7,624
pythondev
help
but also - you don't need to call it. just the application close normally and it'll return 0 by default
2019-02-11T06:02:23.052000
Karoline
pythondev_help_Karoline_2019-02-11T06:02:23.052000
1,549,864,943.052
7,625
pythondev
help
yes, and that's breaking my workflow, because vscode throws this expection - i could avoid by using the code above...
2019-02-11T06:02:59.052600
Shawana
pythondev_help_Shawana_2019-02-11T06:02:59.052600
1,549,864,979.0526
7,626
pythondev
help
so even if you don't call sys.exit at all, when run via vscode it shows this exception being thrown?
2019-02-11T06:03:42.053500
Karoline
pythondev_help_Karoline_2019-02-11T06:03:42.053500
1,549,865,022.0535
7,627
pythondev
help
as you mentioned the try: except Exception handling is bad practice.. that makes me ponder on how to do better :mhhhm no
2019-02-11T06:05:02.054900
Shawana
pythondev_help_Shawana_2019-02-11T06:05:02.054900
1,549,865,102.0549
7,628
pythondev
help
I mean - it's not the end of the world. It's just a bit odd.
2019-02-11T06:05:20.055500
Karoline
pythondev_help_Karoline_2019-02-11T06:05:20.055500
1,549,865,120.0555
7,629
pythondev
help
If it really makes things better and cleaner in your circumstances, go for it. I'd just be curious to see why in this particular environment it behaves that way
2019-02-11T06:05:42.056200
Karoline
pythondev_help_Karoline_2019-02-11T06:05:42.056200
1,549,865,142.0562
7,630
pythondev
help
python for automation help. At my current job (which is annoying me - but will save that conversation for job advice channel :wink:), we are building automation robots that perform desktop tasks which we originally used a tool called UiPath, but now we have been told we cannot use it and have to use their internal tool...
2019-02-11T06:08:49.060100
Arturo
pythondev_help_Arturo_2019-02-11T06:08:49.060100
1,549,865,329.0601
7,631
pythondev
help
Selenium handles web stuff - is this a native app or on the web?
2019-02-11T06:09:36.061100
Karoline
pythondev_help_Karoline_2019-02-11T06:09:36.061100
1,549,865,376.0611
7,632
pythondev
help
ahh, found something app.exec_() is required for running the QT-App and returning the exit_code when closed, so far expected when calling sys.exit on it, it should close without exception as expected too.. but vscode debugger also tracks "uncaught exceptions", that's where the debugger throws it out
2019-02-11T06:09:43.061400
Shawana
pythondev_help_Shawana_2019-02-11T06:09:43.061400
1,549,865,383.0614
7,633
pythondev
help
native
2019-02-11T06:09:45.061500
Arturo
pythondev_help_Arturo_2019-02-11T06:09:45.061500
1,549,865,385.0615
7,634
pythondev
help
but eventually will be on the web
2019-02-11T06:09:58.061800
Arturo
pythondev_help_Arturo_2019-02-11T06:09:58.061800
1,549,865,398.0618
7,635
pythondev
help
but for now native
2019-02-11T06:10:05.062100
Arturo
pythondev_help_Arturo_2019-02-11T06:10:05.062100
1,549,865,405.0621
7,636
pythondev
help
yeah selenium won't help there
2019-02-11T06:10:22.062400
Karoline
pythondev_help_Karoline_2019-02-11T06:10:22.062400
1,549,865,422.0624
7,637
pythondev
help
ah ok
2019-02-11T06:10:30.062600
Arturo
pythondev_help_Arturo_2019-02-11T06:10:30.062600
1,549,865,430.0626
7,638
pythondev
help
found something that might be useful, <http://pywinauto.github.io/>
2019-02-11T06:18:58.063000
Arturo
pythondev_help_Arturo_2019-02-11T06:18:58.063000
1,549,865,938.063
7,639
pythondev
help
can anyone comment on it?
2019-02-11T06:19:06.063400
Arturo
pythondev_help_Arturo_2019-02-11T06:19:06.063400
1,549,865,946.0634
7,640
pythondev
help
Hello
2019-02-11T06:38:11.063900
Kera
pythondev_help_Kera_2019-02-11T06:38:11.063900
1,549,867,091.0639
7,641
pythondev
help
I want to add the reset function on QSpectrumAnalyzer... (<https://github.com/xmikos/qspectrumanalyzer>)
2019-02-11T06:38:54.064500
Kera
pythondev_help_Kera_2019-02-11T06:38:54.064500
1,549,867,134.0645
7,642
pythondev
help
Can someone help please with some questions that I have?
2019-02-11T06:39:07.065000
Kera
pythondev_help_Kera_2019-02-11T06:39:07.065000
1,549,867,147.065
7,643
pythondev
help
Anyone?
2019-02-11T07:20:12.065500
Kera
pythondev_help_Kera_2019-02-11T07:20:12.065500
1,549,869,612.0655
7,644
pythondev
help
Don't ask to ask – simply ask your question.
2019-02-11T07:20:22.065800
Melynda
pythondev_help_Melynda_2019-02-11T07:20:22.065800
1,549,869,622.0658
7,645
pythondev
help
Ok then... The function that restarts HackRF is "hackrf_spiflash -r". I have implemented all the changes necessary and I have created a process_reset(self) that's on the backends folder on hackrf_sweep.py. I just need somehelp at this point on how to implement the "hackrf_spiflash -r".
2019-02-11T07:24:19.067500
Kera
pythondev_help_Kera_2019-02-11T07:24:19.067500
1,549,869,859.0675
7,646
pythondev
help
I'm not sure where you're stuck – `hackrf_spiflash` doesn't appear to exist in that repository at all…
2019-02-11T07:29:01.068100
Melynda
pythondev_help_Melynda_2019-02-11T07:29:01.068100
1,549,870,141.0681
7,647
pythondev
help
it's in after a firmware update
2019-02-11T07:41:06.068200
Kera
pythondev_help_Kera_2019-02-11T07:41:06.068200
1,549,870,866.0682
7,648
pythondev
help
<#C07EFMZ1N|help> I am trying to group by movie id using the group by function by user id. i am getting an error message 'function' object has no attribute '_get_object_id' group_movie=user_list.groupby("userId").agg({'movieId':lambda x: (set(x))}) group-movie shows the user id and movie id. Any idea where i am going ...
2019-02-11T07:48:56.068800
Edwardo
pythondev_help_Edwardo_2019-02-11T07:48:56.068800
1,549,871,336.0688
7,649
pythondev
help
Can you help?
2019-02-11T07:50:03.068900
Kera
pythondev_help_Kera_2019-02-11T07:50:03.068900
1,549,871,403.0689
7,650
pythondev
help
would help to know what you’re using for this
2019-02-11T07:55:13.069300
Hiroko
pythondev_help_Hiroko_2019-02-11T07:55:13.069300
1,549,871,713.0693
7,651
pythondev
help
sqlalchemy?
2019-02-11T07:55:19.069500
Hiroko
pythondev_help_Hiroko_2019-02-11T07:55:19.069500
1,549,871,719.0695
7,652
pythondev
help
also, you can format your code in messages for readability
2019-02-11T07:55:36.069900
Hiroko
pythondev_help_Hiroko_2019-02-11T07:55:36.069900
1,549,871,736.0699
7,653
pythondev
help
Please use the snippet feature, or backticks, when sharing code. You can do so by clicking on the :heavy_plus_sign: on the left of the input box for a snippet. For more information on snippets click <https://get.slack.help/hc/en-us/articles/204145658-Create-a-snippet|here>. For more information on inline code formattin...
2019-02-11T07:55:43.070200
Leana
pythondev_help_Leana_2019-02-11T07:55:43.070200
1,549,871,743.0702
7,654
pythondev
help
check the inline code formatting link above
2019-02-11T07:55:54.070500
Hiroko
pythondev_help_Hiroko_2019-02-11T07:55:54.070500
1,549,871,754.0705
7,655
pythondev
help
Not until I know what the problem is, no… Please explain what you're trying to do, and what the problem is, with any relevant errors…
2019-02-11T08:11:04.070700
Melynda
pythondev_help_Melynda_2019-02-11T08:11:04.070700
1,549,872,664.0707
7,656
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-02-11T10:25:55.072400
Leana
pythondev_help_Leana_2019-02-11T10:25:55.072400
1,549,880,755.0724
7,657
pythondev
help
sir_botalot. haha, can you provide some example of good question formats? that's my struggle.
2019-02-11T10:59:31.074300
Nola
pythondev_help_Nola_2019-02-11T10:59:31.074300
1,549,882,771.0743
7,658
pythondev
help
"Hey everyone! I'm working on [quick project description]. I'm having an issue where [describe the problem and the error you're getting]. I've tried [potential solution A, potential solution B, etc.]. Can someone offer some advice?"
2019-02-11T11:28:30.075700
Carmen
pythondev_help_Carmen_2019-02-11T11:28:30.075700
1,549,884,510.0757
7,659
pythondev
help
<https://stackoverflow.com/help/how-to-ask>
2019-02-11T11:28:49.076000
Karoline
pythondev_help_Karoline_2019-02-11T11:28:49.076000
1,549,884,529.076
7,660
pythondev
help
"Hello! I'm working with [insert tool here], and it's giving me an error message [add error message here] when I try to do [XYZ task you're trying to do]. Does anyone know what this means and how to fix it?"
2019-02-11T11:29:33.076300
Carmen
pythondev_help_Carmen_2019-02-11T11:29:33.076300
1,549,884,573.0763
7,661
pythondev
help
Anyone use conda-build here? I've been writing some basic build automation to get my packages available cross-platform. There's this handy bit in the meta.yaml for source: git_url Unfortunately, using a private key with a password presents some problems with automation. I tried using a https api key (gitlab) for th...
2019-02-11T11:30:58.077300
Francie
pythondev_help_Francie_2019-02-11T11:30:58.077300
1,549,884,658.0773
7,662
pythondev
help
<@Karoline> thank you <@Carmen> you're replying to a thread. I think you meant to put this in the main channel
2019-02-11T11:34:50.077900
Nola
pythondev_help_Nola_2019-02-11T11:34:50.077900
1,549,884,890.0779
7,663
pythondev
help
IMO a wheel is the easiest way to get it cross platform, if you're using gitlab you can use their CI service to build the wheels and upload them somewhere
2019-02-11T11:35:08.078700
Jonas
pythondev_help_Jonas_2019-02-11T11:35:08.078700
1,549,884,908.0787
7,664
pythondev
help
Or deploy right to pypi if you configure some secrets
2019-02-11T11:35:21.079200
Jonas
pythondev_help_Jonas_2019-02-11T11:35:21.079200
1,549,884,921.0792
7,665
pythondev
help
<@Arturo> PyWinAuto will probably do what you need it to. You can also look into `pyautogui` as per <https://automatetheboringstuff.com/chapter18/>
2019-02-11T11:35:55.080000
Carmen
pythondev_help_Carmen_2019-02-11T11:35:55.080000
1,549,884,955.08
7,666
pythondev
help
`python setup.py bdist_wheel &amp;&amp; twine ...`
2019-02-11T11:36:01.080200
Jonas
pythondev_help_Jonas_2019-02-11T11:36:01.080200
1,549,884,961.0802
7,667
pythondev
help
Negatory. I was replying specifically to your request for question formats.
2019-02-11T11:36:37.080300
Carmen
pythondev_help_Carmen_2019-02-11T11:36:37.080300
1,549,884,997.0803
7,668
pythondev
help
cool thanks, will check it out <@Carmen>
2019-02-11T11:41:31.081000
Arturo
pythondev_help_Arturo_2019-02-11T11:41:31.081000
1,549,885,291.081
7,669
pythondev
help
Thanks for responses. I'm confined to using conda build as we have standarized on using anaconda for managing our in-house packages. It solves a variety of virtual env and package compatibility problems. One other thing I've noticed in looking at other's conda recipes is that they use a file URL. I might have to re...
2019-02-11T11:53:07.082400
Francie
pythondev_help_Francie_2019-02-11T11:53:07.082400
1,549,885,987.0824
7,670
pythondev
help
I'm trying to create a loop that looks for a text, and if found append to a new column, I'm struggling with it.
2019-02-11T11:55:35.083800
Nola
pythondev_help_Nola_2019-02-11T11:55:35.083800
1,549,886,135.0838
7,671
pythondev
help
<@Nola> you are missing a `)` at the end of `if row['final_desc_2']).str.contains(row_1['sequence']`
2019-02-11T11:57:26.085200
Clemmie
pythondev_help_Clemmie_2019-02-11T11:57:26.085200
1,549,886,246.0852
7,672
pythondev
help
Also have an extra one misplaced in the same statement `row['final_desc_2'])` the `)` shouldn’t be there
2019-02-11T11:58:07.085900
Clemmie
pythondev_help_Clemmie_2019-02-11T11:58:07.085900
1,549,886,287.0859
7,673
pythondev
help
<@Clemmie> sorry i altered the code before dropping to help better understand the need. this was the previous code and error
2019-02-11T11:59:20.086000
Nola
pythondev_help_Nola_2019-02-11T11:59:20.086000
1,549,886,360.086
7,674
pythondev
help
`row['final_desc_2']` is apparently returning `None`
2019-02-11T11:59:53.086800
Hiroko
pythondev_help_Hiroko_2019-02-11T11:59:53.086800
1,549,886,393.0868
7,675
pythondev
help
Well there you are calling `.str` on a print statement which won’t work. That is because you still have an `)` in the wrong place - before `.str`, should be at the end
2019-02-11T12:00:41.087600
Clemmie
pythondev_help_Clemmie_2019-02-11T12:00:41.087600
1,549,886,441.0876
7,676
pythondev
help
<@Hiroko> it is the `print` returning None -
2019-02-11T12:01:06.088100
Clemmie
pythondev_help_Clemmie_2019-02-11T12:01:06.088100
1,549,886,466.0881
7,677
pythondev
help
yeah, you’re still missing the closing parens for the `print` call
2019-02-11T12:01:31.088800
Hiroko
pythondev_help_Hiroko_2019-02-11T12:01:31.088800
1,549,886,491.0888
7,678
pythondev
help
oh, right
2019-02-11T12:01:58.089100
Hiroko
pythondev_help_Hiroko_2019-02-11T12:01:58.089100
1,549,886,518.0891
7,679
pythondev
help
`print(...).str(..)`
2019-02-11T12:02:05.089400
Hiroko
pythondev_help_Hiroko_2019-02-11T12:02:05.089400
1,549,886,525.0894
7,680
pythondev
help
yeah, good catch
2019-02-11T12:02:09.089600
Hiroko
pythondev_help_Hiroko_2019-02-11T12:02:09.089600
1,549,886,529.0896
7,681
pythondev
help
<@Nola> would suggest you use an editor with bracket matching enabled
2019-02-11T12:02:33.090000
Hiroko
pythondev_help_Hiroko_2019-02-11T12:02:33.090000
1,549,886,553.09
7,682
pythondev
help
so you can see where a particular bracket/etc matches up in the block you’re in
2019-02-11T12:02:57.090800
Hiroko
pythondev_help_Hiroko_2019-02-11T12:02:57.090800
1,549,886,577.0908
7,683
pythondev
help
Fair enough, that's unlucky. Just to note, you can install wheel files through Conda, conda and conda build are separate things
2019-02-11T12:13:44.091400
Jonas
pythondev_help_Jonas_2019-02-11T12:13:44.091400
1,549,887,224.0914
7,684
pythondev
help
While conda does help with virtualenv issues (which by themselves are not that tricky) I found the lack of a lockfile does nothing to help with compatibility issues and is pretty much the same as `pip` and a `requirements.txt`. Unless you're distributing native extensions conda/conda-build is really overkill. Anyway, ...
2019-02-11T12:14:34.091600
Jonas
pythondev_help_Jonas_2019-02-11T12:14:34.091600
1,549,887,274.0916
7,685
pythondev
help
Hi all, I'm currently testing out an api on postman wherein the json body is pass to `xdata` via form-data. Now I usually handle `application/json` so I have no idea how to replicate this. Upon clicking code in postman for python, this is what it tells me to do. ``` import requests url = "<http://v2.xend.com.ph/rates...
2019-02-11T12:32:00.095500
Philip
pythondev_help_Philip_2019-02-11T12:32:00.095500
1,549,888,320.0955
7,686
pythondev
help
The json body I'm testing out: `{"destination": 1, "package_type": "OP", "pickup": 2} `
2019-02-11T12:32:51.096000
Philip
pythondev_help_Philip_2019-02-11T12:32:51.096000
1,549,888,371.096
7,687
pythondev
help
I know I can simply manipulate the payload from postman's generated code, but I would like to understand how to handle `form-data` in requests in general.
2019-02-11T12:34:57.096800
Philip
pythondev_help_Philip_2019-02-11T12:34:57.096800
1,549,888,497.0968
7,688
pythondev
help
ok i will look that up, see how to use it
2019-02-11T12:40:27.096900
Nola
pythondev_help_Nola_2019-02-11T12:40:27.096900
1,549,888,827.0969
7,689
pythondev
help
Welp, this worked ``` files = {'xdata': (None, json.dumps(args))} response = <http://requests.post|requests.post>(url, files=files) ``` TIL how to send a “multipart/form-data” with requests in python
2019-02-11T12:45:58.097700
Philip
pythondev_help_Philip_2019-02-11T12:45:58.097700
1,549,889,158.0977
7,690
pythondev
help
Requests is a lovely library.
2019-02-11T12:52:46.097900
Carmen
pythondev_help_Carmen_2019-02-11T12:52:46.097900
1,549,889,566.0979
7,691
pythondev
help
It's my go-to for HTTP automation. I only branch out when I need something specific like UI interaction.
2019-02-11T12:53:17.098900
Carmen
pythondev_help_Carmen_2019-02-11T12:53:17.098900
1,549,889,597.0989
7,692
pythondev
help
For the record, what would the best practice for an api payload be? `application/json` or `multipart/form-data`?
2019-02-11T12:54:23.099600
Philip
pythondev_help_Philip_2019-02-11T12:54:23.099600
1,549,889,663.0996
7,693
pythondev
help
I normally expect my requests in a form of json, thus me having no knowledge of `multipart/form-data` up till now.
2019-02-11T12:55:38.100900
Philip
pythondev_help_Philip_2019-02-11T12:55:38.100900
1,549,889,738.1009
7,694
pythondev
help
application/json out of those two
2019-02-11T12:56:32.102100
Jettie
pythondev_help_Jettie_2019-02-11T12:56:32.102100
1,549,889,792.1021
7,695
pythondev
help
multipart/* is browser-centric, imo
2019-02-11T12:56:44.102700
Jettie
pythondev_help_Jettie_2019-02-11T12:56:44.102700
1,549,889,804.1027
7,696
pythondev
help
100% depends on the API. If it's intended to be a JSON API, you send `application/json`. If it's something that nominally accepts POSTs from forms, `multipart/form-data`. Normally an actual API will prefer the former.
2019-02-11T12:56:54.103200
Carmen
pythondev_help_Carmen_2019-02-11T12:56:54.103200
1,549,889,814.1032
7,697
pythondev
help
The latter tends to be for endpoints that accept form posts directly.
2019-02-11T12:57:14.103700
Carmen
pythondev_help_Carmen_2019-02-11T12:57:14.103700
1,549,889,834.1037
7,698
pythondev
help
I see, thanks for the tip <@Jettie> <@Carmen> :taco: :taco:
2019-02-11T12:58:33.104700
Philip
pythondev_help_Philip_2019-02-11T12:58:33.104700
1,549,889,913.1047
7,699
pythondev
help
The api response is kinda weird as well tbh ``` &lt;br /&gt; &lt;b&gt;Notice&lt;/b&gt;: Undefined variable: length in &lt;b&gt;/var/www/html/app/controllers/rates.php&lt;/b&gt; on line &lt;b&gt;155&lt;/b&gt; &lt;br /&gt; &lt;br /&gt; &lt;b&gt;Notice&lt;/b&gt;: Undefined variable: width in &lt;b&gt;/var/www/html/app/c...
2019-02-11T12:59:07.105500
Philip
pythondev_help_Philip_2019-02-11T12:59:07.105500
1,549,889,947.1055
7,700
pythondev
help
lmao
2019-02-11T12:59:45.106400
Jettie
pythondev_help_Jettie_2019-02-11T12:59:45.106400
1,549,889,985.1064
7,701
pythondev
help
So yeah, browser-centric huh? php? :slightly_smiling_face:
2019-02-11T12:59:47.106500
Philip
pythondev_help_Philip_2019-02-11T12:59:47.106500
1,549,889,987.1065
7,702
pythondev
help
That's...not really weird. That just means they didn't set up error logging appropriately.
2019-02-11T12:59:48.106600
Carmen
pythondev_help_Carmen_2019-02-11T12:59:48.106600
1,549,889,988.1066
7,703
pythondev
help
Which, unfortunately, is not weird at all for PHP sites.
2019-02-11T13:00:09.107300
Carmen
pythondev_help_Carmen_2019-02-11T13:00:09.107300
1,549,890,009.1073
7,704
pythondev
help
Oh sorry, I may have used a wrong term. :slightly_smiling_face:
2019-02-11T13:00:16.107600
Philip
pythondev_help_Philip_2019-02-11T13:00:16.107600
1,549,890,016.1076
7,705
pythondev
help
not weird? it's not valid JSON anymore :p
2019-02-11T13:00:23.107800
Jettie
pythondev_help_Jettie_2019-02-11T13:00:23.107800
1,549,890,023.1078
7,706
pythondev
help
that's a 10 on my weirdness scale for an API
2019-02-11T13:00:37.108400
Jettie
pythondev_help_Jettie_2019-02-11T13:00:37.108400
1,549,890,037.1084
7,707
pythondev
help
Yup, fails with `res.json()`
2019-02-11T13:00:46.108600
Philip
pythondev_help_Philip_2019-02-11T13:00:46.108600
1,549,890,046.1086
7,708
pythondev
help
Which is kinda sad tbh
2019-02-11T13:00:51.108800
Philip
pythondev_help_Philip_2019-02-11T13:00:51.108800
1,549,890,051.1088
7,709
pythondev
help
Tell the owner to fix their site
2019-02-11T13:01:02.109000
Jonas
pythondev_help_Jonas_2019-02-11T13:01:02.109000
1,549,890,062.109
7,710
pythondev
help
Get a job offer out of it
2019-02-11T13:01:21.109500
Clemmie
pythondev_help_Clemmie_2019-02-11T13:01:21.109500
1,549,890,081.1095
7,711
pythondev
help
Tried reaching out to them, it appears they have a lot more issue at hand aside from their api. :confused:
2019-02-11T13:01:24.109600
Philip
pythondev_help_Philip_2019-02-11T13:01:24.109600
1,549,890,084.1096
7,712
pythondev
help
I actually raised this to management already. They told me to just integrate it temporarily to our api /shrug
2019-02-11T13:02:25.110500
Philip
pythondev_help_Philip_2019-02-11T13:02:25.110500
1,549,890,145.1105
7,713
pythondev
help
Hi, I have a function f1 that takes as input another function f2 and returns an value. f1 is called on a series of inputs (lambda invocation). Is there a way to pass an argument to f2, and an additional return value from f2 back to the root that then modifies the next input to f2 and so on..?
2019-02-11T13:09:22.113300
Angele
pythondev_help_Angele_2019-02-11T13:09:22.113300
1,549,890,562.1133
7,714
pythondev
help
To phrase it another way: Is it possible to process values based on previous frames in Python's MoviePy library? Specifically, the VideoFileClip.fl_image() function?
2019-02-11T13:10:50.114900
Angele
pythondev_help_Angele_2019-02-11T13:10:50.114900
1,549,890,650.1149
7,715
pythondev
help
You're describing the `reduce` pattern.
2019-02-11T13:11:28.115400
Carmen
pythondev_help_Carmen_2019-02-11T13:11:28.115400
1,549,890,688.1154
7,716
pythondev
help
Are you sending the `f1` input into `f2`, or just calling `f2` as part of processing the input for `f1`, and its parameters are completely separate?
2019-02-11T13:12:46.116600
Carmen
pythondev_help_Carmen_2019-02-11T13:12:46.116600
1,549,890,766.1166
7,717
pythondev
help
The latter
2019-02-11T13:13:12.116800
Angele
pythondev_help_Angele_2019-02-11T13:13:12.116800
1,549,890,792.1168
7,718
pythondev
help
Do you have a complete list of the inputs you're applying the function to, or is it something that happens inside the MoviePy library code, and thus you can only provide a lambda that they're invoking?
2019-02-11T13:21:48.120600
Carmen
pythondev_help_Carmen_2019-02-11T13:21:48.120600
1,549,891,308.1206
7,719
pythondev
help
I have a complete list of the inputs (all frames in the video clip) in advance. But based on each frame's processing in f2 (my own user defined function) I want to modify the input to the subsequent call to f2 (which processes the next frame)
2019-02-11T13:24:42.121900
Angele
pythondev_help_Angele_2019-02-11T13:24:42.121900
1,549,891,482.1219
7,720