Skip to content

Instantly share code, notes, and snippets.

View pranayaggarwal's full-sized avatar

Pranay Kumar Aggarwal pranayaggarwal

  • CS2 at Adobe Systems
  • New Delhi
View GitHub Profile
@pranayaggarwal
pranayaggarwal / model.json
Created August 24, 2021 04:31
CustomTrainedModel.json
{"format": "graph-model", "generatedBy": "2.5.0", "convertedBy": "TensorFlow.js Converter v3.8.0", "signature": {"inputs": {"f0_hz:0": {"name": "f0_hz:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "-1"}]}}, "loudness_db:0": {"name": "loudness_db:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "-1"}]}}}, "outputs": {"Identity_18:0": {"name": "Identity_18:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1000"}, {"size": "1"}]}}, "Identity_22:0": {"name": "Identity_22:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1000"}, {"size": "1"}]}}, "Identity_2:0": {"name": "Identity_2:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "64000"}]}}, "Identity_20:0": {"name": "Identity_20:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1000"}, {"size": "65"}]}}, "Identity_15:0": {"name": "Identity_15:0", "dtype": "DT_FLOAT", "tensorShape": {"dim": [{"size": "1"}, {"size": "1000"}, {"size": "1"}]}}, "Iden
# For cutting the video
ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4
# Embed srt to video
ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi
# If the subtitle is embedded in the container video.mkv, you can do this:
ffmpeg -i video.mkv -vf subtitles=video.mkv out.avi
@pranayaggarwal
pranayaggarwal / NextHigerPalindrome.cpp
Created June 12, 2021 11:38
Next higher palindrome using the same set of digits
#include <iostream>
#include <algorithm>
using namespace std;
void reverse(string& str)
{
std::reverse(str.begin(), str.end());
}
// Example program
#include <iostream>
#include <string>
template <typename T>
class Smart_pointer
{
T *ptr;
class my_ptr {
value_type* operator->(); // In case value_type does not have -> operator further
const value_type* operator->() const;
OR
value_type& operator->(); // In case value_type does have -> operator
const value_type& operator->() const;
};
Demo 2: Pointer-to-member of object and Pointer-to-member of pointer
==================================================================
struct Foo {
int a (); // Member functions
int b ();
};
int (Foo :: * p); // p is pointer to some member variable of Foo