Skip to content

Instantly share code, notes, and snippets.

View sayan801's full-sized avatar
🎯
Focusing

Chandra Shekhar Sengupta sayan801

🎯
Focusing
View GitHub Profile
@sayan801
sayan801 / calculateRoadLengthValueFunction.py
Last active April 26, 2020 13:06
calculate Road Length Value
import math
import numpy
delta = .01
roadLengthValues = {}
def calculateRoadLengthValueFunction(length):
hypotenuse = math.sqrt((length * length) + (4*4))
roadLength = (4 * hypotenuse) + (8 - (2*length))
return roadLength
@sayan801
sayan801 / Extract Audio from Video Using MediaMuxer
Created October 7, 2014 11:54
Extract Audio from Video Using MediaMuxer
private boolean cloneMediaUsingMuxer(String srcMedia, String dstMediaPath,
int expectedTrackCount, int degrees) throws IOException {
// Set up MediaExtractor to read from the source.
//AssetFileDescriptor srcFd = mResources.openRawResourceFd(srcMedia);
MediaExtractor extractor = new MediaExtractor();
extractor.setDataSource(srcMedia);
int trackCount = extractor.getTrackCount();
//assertEquals("wrong number of tracks", expectedTrackCount, trackCount);
// Set up MediaMuxer for the destination.
MediaMuxer muxer;