Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 days ago.
Improve this question
import subprocess
import os
# Set the path of the video and subtitle files
video_file = "myvideo.mp4"
subtitle_file = "sample.srt"
# Set the path and name of the output file
output_file = "output.mp4"
# Use FFmpeg to merge the video and subtitle files
subprocess.call(["ffmpeg", "-i" ,video_file, "-vf" ,subtitle_file, output_file], shell=True)
i am trying to add subtitles in mp4 video file using ffmpeg command in code below, code is running without error but code is not generating output file with subtitles.
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 months ago.
Improve this question
I have a pythion script which I run as:
config = ScriptRunConfig(
source_directory='logic',
script='sense/myscript.py',
arguments = ['--val', 'decode'],
compute_target=target,
environment=myenv_local,
)
# submit script to AML
run = exp.submit(config)
The script which I run has these steps at the end of script:
print('---- Fitting pipeline')
pipeline.fit(X_train,y_train)
print('Saving joblibs')
dill.dump(pipeline, gzip.open('./outputs/baseModel_LR_MONTH0_5D.gz',"wb"))
print('---- Finished.')
The output in azureml looks like this:
---- Fitting pipeline
Saving joblibs
But it never prints the "---- Finished." and shows that the job is running:
The model I save to output is there in the run and I can download it:
The problem was it was still processing. Thee job lib being produced was about 27GB that's why it looked like it was stuck but actually, it was writing files.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed last year.
Improve this question
So im trying to load an image with pygame but i don't know exactly what its supposed to look and all the examples I've seen are from people on windows and the ones on mac don't seem to help.
This is what I'm currently trying but it doesn't work and says there is no such file or directory as this.
sky_surface = pygame.image.load('/Macintosh HD/Users/Amin/Desktop/Sky.png').convert()
I do have an image called 'Sky.png' on my desktop.
screenshot of image directory as shown in finder
Actually, Macintosh HD should not be a part of the pathname -- the correct path should be, in your case here, /Users/Amin/Desktop/Sky.png.
MacOS (I'm on Monterey now) should have a feature to copy a pathname of a file. In Finder you may right-click on a file to get the context menu and then press option key. You should see the Copy ... as Pathname entry. This will copy the valid pathname to your clipboard -- and as you'll see, it won't contain Macintosh HD prefix.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
https://github.com/AZHenley/teenytinycompiler.git
Can you get this to run I got it from this website:
http://web.eecs.utk.edu/~azh/blog/teenytinycompiler1.html
I followed this tutorial and it failed to load the source file.
I am new to python.
this is a screenshot of when I ran the python project
You never pass in the source file. The command you have now only starts the TeenyTiny compiler. You can pass in the source file as follows.
"C:/Users/Ackeem/AppData/Local/Programs/Python/Python39/python.exe" "C:/Users/Ackeem/Desktop/teenyTIny Compiler/teenytinycompiler/part2/teenytiny.py" "C:/Users/Ackeem/Desktop/teenyTIny Compiler/teenytinycompiler/part2/hello.tiny"
Your code did run but there were no parameters passed to it.
sys.argv is the object that holds parameters being passed.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I am trying to rename a file in downloads folder and I get (I translate)
OSError: [WinError 123] Syntax of filename, catalog name or label is wrong: 'C:\\Users\\Miaoulis\\Downloads\\feed.xml' -> 'C:\\Users\\Miaoulis\\Downloads\\VECTOR_03-10-2020 16:49_new.xml'
using windows 10, Kaspersky Internet Security and the following
import os
src = 'C:\\Users\\Miaoulis\\Downloads\\feed.xml'
dst = 'C:\\Users\\Miaoulis\\Downloads\\VECTOR_'+str(file_date)+'_new.xml'
if os.path.isfile(src):
os.rename(src, dst)
thank you
The destination file name has a colon. Try renaming without colon.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
import xlrd
path = input('enter the path')
data = xlrd.open_workbook(r'path)
The program doesn't work ,the reason is 'path' does not exist.
So what is the correct way to write the code?
import xlrd
path = input('enter path:')
data = xlrd.open_workbook(path)
This is supposed to work, your issue is you pass a string that just says 'path' instead of the path variable that has the path.
You can use a relative or absolute path.