Skip to content

Instantly share code, notes, and snippets.

@innat
innat / FFmpeg | Basic Operation on Subtitles.md
Last active February 21, 2024 02:32
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
@lestrrat
lestrrat / stages.md
Last active May 18, 2022 02:19
Seven Stages of Becoming a Go Programmer
  • stage 1: You believe you can make Go do object oriented programming. You want to do this by using clever struct embedding.
  • stage 2: You believe goroutines will solve all of your problems. You want to use goroutines for anything and everything that you can, who cares if the code becomes a bit more complicated
  • stage 3: You believe that instead of object oriented programming, interfaces will solve all of your problems. You want to define everything in terms of interfaces
  • stage 4: You believe channels will solve all of your problems. You want to do everything from synchronization, returning values, and flow control using channels.
  • stage 5: You now believe Go is not as powerful as people claim it to be. You feel like you're stripped of all of the nice tools and constructs that other languages provide.
  • stage 6: You realize that stages 1~5 were all just your imagination. You just didn't want to accept the Go way. Everything starts to make sense.
  • stage 7: You are now at peace
@hartleybrody
hartleybrody / import-db.sh
Last active April 10, 2024 16:09
Copy data from Heroku Postgres into local database
# copy/import data from heroku postgres to localhost pg database
# useful for copying admin's work on live site into local database to reproduce errors
# https://devcenter.heroku.com/articles/heroku-postgres-import-export
# take heroku pg snapshot and download
heroku pg:backups:capture
heroku pg:backups:download
# load the dump into local postgres database, assuming $DATABASE_URL set locally
@kunanit
kunanit / pandas_postgres.py
Created April 24, 2017 14:36
Read postgres database table into pandas dataframe
import pandas as pd
from sqlalchemy import create_engine
# follows django database settings format, replace with your own settings
DATABASES = {
'production':{
'NAME': 'dbname',
'USER': 'user',
'PASSWORD': 'pass',
'HOST': 'rdsname.clqksfdibzsj.us-east-1.rds.amazonaws.com',
@5agado
5agado / Pandas and Seaborn.ipynb
Created February 20, 2017 13:33
Data Manipulation and Visualization with Pandas and Seaborn — A Practical Introduction
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ddm
ddm / share-vpn.sh
Last active May 9, 2018 22:09
Share openvpn/tunnelblick connection on Mac OSX Sierra
#!/usr/bin/env bash
DIR=`dirname $0`
echo 'nat on en0 from $localnet to any -> (en0)' > $DIR/share-vpn.rules
sudo pfctl -f $DIR/share-vpn.rules -e
echo "Use 'sudo pfctl -F all' to clear NAT rules"
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
@miratcan
miratcan / hrtool.py
Created August 19, 2016 10:45
A python script to run hackerrank answers on your local. Just run it in the sample test cases folder that you downloaded from hackerrank.
import re
import glob
import subprocess
from os.path import exists
from sys import exit
INPUT_FOLDER = 'input/'
OUTPUT_FOLDER = 'output/'
@tlancina
tlancina / webpack.config.js
Last active May 8, 2017 21:19
A simple webpack config for TypeScript Ionic 2 starters
var path = require('path');
module.exports = {
entry: [
path.resolve('app/app.ts')
],
output: {
path: path.resolve('www/build/js'),
filename: 'app.bundle.js'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.