A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| r = [] | |
| for i in range(1, 6): | |
| for j in range(7, 9): | |
| r.append((i, j)) | |
| print(r) | |
| print(list((i, j) for i in range(1, 6) for j in range(7,9))) | |
| # [(1, 7), (1, 8), (2, 7), (2, 8), (3, 7), (3, 8), (4, 7), (4, 8), (5, 7), (5, 8)] | |
| # [(1, 7), (1, 8), (2, 7), (2, 8), (3, 7), (3, 8), (4, 7), (4, 8), (5, 7), (5, 8)] |
| # sample example using plotly to plot emojis | |
| import plotly.express as px | |
| import pandas as pd | |
| d = {"1": ["😀", "🥰", "😗"], | |
| "2": [1,2,3] | |
| } | |
| px.scatter(pd.DataFrame(d), x="1", y="2") |
| convert ipynb to md | |
| jupyter nbconvert --to markdown /path/to/example_notebook.ipynb | |
| append md to post.md | |
| cat example_notebook.md | tee -a exampleblog/_posts/YYYY-MM-DD-example-post.md |
| # https://www.geeksforgeeks.org/python-set-operations-union-intersection-difference-symmetric-difference/ | |
| A = {0, 2, 4, 6, 8} | |
| B = {1, 2, 3, 4, 5} | |
| # union | |
| print("Union :", A | B) | |
| # intersection | |
| print("Intersection :", A & B) | |
| def LIS(a): | |
| """Longest Increasing Subsequences""" | |
| L = [1] * len(a) | |
| for i in range(len(a)): | |
| for j in range(i): | |
| if a[j] < a[i] and L[i] < 1+L[j]: | |
| L[i] = 1 + L[j] | |
| return max(L) | |
| a = [5,7,4,-3,9,1,10,4,5,8,9,3] | |
| LIS(a) |
| def fibM(n, d={0: 0, 1: 1}): | |
| """Memoization Fib""" | |
| if n-2 in d and n-1 in d: | |
| return d[n-2] + d[n-1] | |
| else: | |
| d[n-1] = d[n-3] + d[n-2] | |
| return fibM(n-1, d) | |
| fib(25) |
| def fibD(n): | |
| """DP Fib""" | |
| f = [0, 1] | |
| for i in range(2, n+1): | |
| f.append(f[i-2]+f[i-1]) | |
| return f[n] | |
| fib(25) |
| def fibR(n): | |
| """recursive fib""" | |
| if n == 0: | |
| return 0 | |
| if n == 1: | |
| return 1 | |
| return fibR(n-1) + fibR(n-2) | |
| fibR(25) |
sudo apt-get update
sudo apt-get -y install binutils
git clone https://github.com/aws/efs-utils
cd efs-utils
./build-deb.sh