How to redirect 'print' output to a file using python?
import sys
orig_stdout = sys.stdout
f = open('out.txt', 'w')
sys.stdout = f
for i in range(2):
print 'i = ', i
sys.stdout = orig_stdout
f.close()
How to redirect 'print' output to a file using python?
'Turn BitLocker on' missing on usb drive
'Turn BitLocker on' appears on all HD partitions, but not on USB drives.
Solution: Insert the USB stick in question - In Disk Manager right click on the partition and Delete Volume then New Simple Volume.
After formatting in Disk Management, you need to physically disconnect and reconnect the removable drive. Then the "Turn on Bitlocker" button appears in the Explorer context menu.
How to remove choices in Google Forms?
https://nathannagele.com/how-to-remove-choices-in-google-forms/
Go to Google Form in Chrome browser -> click Menu (3 dots) -> Add-ons -> install 'Choice Eliminator Lite' -> go back to the Form -> click the drop-down element -> click the Add-ons icon -> click 'Choice Eliminator Lite' -> click 'configure' -> tick 'Eliminate Choices'.
Done.
How can I scale the content of an iFrame?
<iframe src="https://xxx.html" style="border:none; overflow: hidden; position: relative; width: 1044px; height: 1730px; -ms-zoom: 0.5; -moz-transform: scale(0.5); -moz-transform-origin: 0px 0; -o-transform: scale(0.5); -o-transform-origin: 0 0; -webkit-transform: scale(0.5); -webkit-transform-origin: 0 0;" title="xxx"></iframe>
How to extract a section from a video with ffmpeg?
Use this to cut video from [start]
for [duration]
:
ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4
Here, the options mean the following:
-ss
specifies the start time, e.g. 00:01:23.000
or 83
(in seconds)-t
specifies the duration of the clip (same format).-t
you can also supply the end time with -to
.-c copy
copies the first video, audio, and subtitle bitstream from the input to the output file without re-encoding them. This won't harm the quality and make the command run within seconds.Note that if you've used -ss
, you have to subtract this from the -to
timestamp. For example, if you cut with -ss 3 -i in.mp4 -to 5
, the output will be five seconds long.
For more info, see https://trac.ffmpeg.org/wiki/Seeking