Skip to content

Instantly share code, notes, and snippets.

View sahilsk's full-sized avatar
🏠
Working from home

S. Meena sahilsk

🏠
Working from home
View GitHub Profile
@sahilsk
sahilsk / moviepy-zoom-in-effect.py
Created July 2, 2023 16:11 — forked from mowshon/moviepy-zoom-in-effect.py
Zoom-in Effect for Moviepy. This function makes the zoom effect smoother.
import moviepy.editor as mp
import math
from PIL import Image
import numpy
def zoom_in_effect(clip, zoom_ratio=0.04):
def effect(get_frame, t):
img = Image.fromarray(get_frame(t))
base_size = img.size
@sahilsk
sahilsk / autoclip.py
Created July 2, 2023 16:11 — forked from abhishtagatya/autoclip.py
Automation Script to Edit Videos for TikTok using Python
# _____ _ _____ _ _
# | _ |_ _| |_ ___| | |_|___
# | | | | _| . | --| | | . |
# |__|__|___|_| |___|_____|_|_| _|
# |_|
#
# By Abhishta (github.com/abhishtagatya)
# pip install gTTs
# pip install moviepy
@sahilsk
sahilsk / augment_video_by_crop_displacement
Created July 2, 2023 16:08 — forked from ferreirafabio/augment_video_by_crop_displacement
Augment videos by relative crop displacements in parallel
% Contributors: Jonas Rothfuss and Fabio Ferreira
import math
import os
import moviepy
import subprocess
import random
import glob
import multiprocessing
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
@sahilsk
sahilsk / video_cropper.py
Created July 2, 2023 16:08 — forked from jhyang12345/video_cropper.py
Video Cropping and Frame addition
from moviepy.editor import *
from moviepy.video.fx.all import crop, fadeout
import cv2
def get_image_clip():
images_list = ["frame79.jpg"] * 30
print(images_list)
clip = ImageSequenceClip(images_list, fps=30)
clip = fadeout(clip, 1, final_color=[32, 32, 32])
return clip
@sahilsk
sahilsk / bash_strict_mode.md
Created February 14, 2023 16:17 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation

Tcpdump

Tcpdump is a commandline tool that is used to dump traffic on a network. This tool comes in hand when you want to analyse network captures within the command line. Basically it can do most of the wireshark job.

NOTE This guide might not be complete it just serve as a reference to me.

Additional Note & Reference

@sahilsk
sahilsk / FB-PE-InterviewTips.md
Created April 18, 2022 02:44 — forked from ameenkhan07/FB-PE-InterviewTips.md
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

@sahilsk
sahilsk / x.json
Created March 5, 2021 20:07 — forked from KensoDev/x.json
{
"Volumes": [
{
"AvailabilityZone": "us-west-2a",
"Attachments": [
{
"AttachTime": "2013-09-17T00:55:03.000Z",
"InstanceId": "i-a071c394",
"VolumeId": "vol-e11a5288",
"State": "attached",
{
"DBInstances": [
{
"PubliclyAccessible": false,
"MasterUsername": "mymasteruser",
"MonitoringInterval": 0,
"LicenseModel": "general-public-license",
"VpcSecurityGroups": [
{
"Status": "active",
@sahilsk
sahilsk / mock_requests.py
Created February 24, 2021 17:41 — forked from evansde77/mock_requests.py
Example of mocking requests calls, python requests.get mock
#!/usr/bin/env python
"""
mocking requests calls
"""
import mock
import unittest
import requests
from requests.exceptions import HTTPError